{"version":3,"sources":["webpack:///./node_modules/@syncfusion/ej2-data/src/adaptors.js","webpack:///./node_modules/@syncfusion/ej2-popups/src/spinner/spinner.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/group.js","webpack:///./node_modules/@syncfusion/ej2-compression/src/compression-writer.js","webpack:///./node_modules/@syncfusion/ej2-data/src/query.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/common/checkbox-filter-base.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/data.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/scroll.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/summary-model-generator.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/aria-service.js","webpack:///./node_modules/@syncfusion/ej2-inputs/src/input/input.js","webpack:///./node_modules/@syncfusion/ej2-data/src/manager.js","webpack:///./src/views/ui-elements/FAMSUI/QuickBalancing.vue?6c7b","webpack:///./node_modules/@syncfusion/ej2-popups/src/common/collision.js","webpack:///./node_modules/@syncfusion/ej2-popups/src/common/position.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/worksheets.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/worksheet.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/cell-style.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/column.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/row.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/image.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/cell.js","webpack:///./node_modules/@syncfusion/ej2-compression/src/zip-archive.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/value-formatter.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/csv-helper.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/blob-helper.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/auto-filters.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/workbook.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-export.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/print.js","webpack:///./src/views/ui-elements/FAMSUI/QuickBalancing.vue?61bc","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js","webpack:///./node_modules/@syncfusion/ej2-base/src/util.js","webpack:///./node_modules/@syncfusion/ej2-base/src/intl/parser-base.js","webpack:///./node_modules/@syncfusion/ej2-base/src/hijri-parser.js","webpack:///./node_modules/@syncfusion/ej2-base/src/intl/date-formatter.js","webpack:///./node_modules/@syncfusion/ej2-base/src/intl/number-formatter.js","webpack:///./node_modules/@syncfusion/ej2-base/src/intl/date-parser.js","webpack:///./node_modules/@syncfusion/ej2-base/src/intl/number-parser.js","webpack:///./node_modules/@syncfusion/ej2-base/src/observer.js","webpack:///./node_modules/@syncfusion/ej2-base/src/internationalization.js","webpack:///./node_modules/@syncfusion/ej2-base/src/intl/intl-base.js","webpack:///./node_modules/@syncfusion/ej2-base/src/ajax.js","webpack:///./node_modules/@syncfusion/ej2-base/src/browser.js","webpack:///./node_modules/@syncfusion/ej2-base/src/event-handler.js","webpack:///./node_modules/@syncfusion/ej2-base/src/template.js","webpack:///./node_modules/@syncfusion/ej2-base/src/template-engine.js","webpack:///./node_modules/@syncfusion/ej2-base/src/virtual-dom.js","webpack:///./node_modules/@syncfusion/ej2-base/src/dom.js","webpack:///./node_modules/@syncfusion/ej2-base/src/base.js","webpack:///./node_modules/@syncfusion/ej2-base/src/notify-property-change.js","webpack:///./node_modules/@syncfusion/ej2-base/src/animation.js","webpack:///./node_modules/@syncfusion/ej2-base/src/module-loader.js","webpack:///./node_modules/@syncfusion/ej2-base/src/component.js","webpack:///./node_modules/@syncfusion/ej2-base/src/child-property.js","webpack:///./node_modules/@syncfusion/ej2-base/src/draggable.js","webpack:///./node_modules/@syncfusion/ej2-base/src/droppable.js","webpack:///./node_modules/@syncfusion/ej2-base/src/keyboard.js","webpack:///./node_modules/@syncfusion/ej2-base/src/l10n.js","webpack:///./node_modules/@syncfusion/ej2-base/src/touch.js","webpack:///./node_modules/@syncfusion/ej2-base/src/sanitize-helper.js","webpack:///./node_modules/@syncfusion/ej2-base/index.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js","webpack:///./src/views/ui-elements/FAMSUI/QuickBalancing.vue","webpack:///src/views/ui-elements/FAMSUI/QuickBalancing.vue","webpack:///./src/views/ui-elements/FAMSUI/QuickBalancing.vue?d7c0","webpack:///./src/views/ui-elements/FAMSUI/QuickBalancing.vue?d59a","webpack:///./node_modules/@syncfusion/ej2-buttons/src/common/common.js","webpack:///./node_modules/@syncfusion/ej2-popups/src/tooltip/tooltip.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/stacked-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/indent-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/caption-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/expand-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-indent-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-header-indent-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-expand-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-drop-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-header-indent-render.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/cell-render-factory.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/responsive-dialog-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/service-locator.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/renderer-factory.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/page-settings.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/column-chooser-settings.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/show-hide.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/aggregate.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/clipboard.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/blazor-action.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/numeric-container.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/pager-message.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/pager.js","webpack:///./node_modules/@syncfusion/ej2-dropdowns/src/common/incremental-search.js","webpack:///./node_modules/@syncfusion/ej2-lists/src/common/list-base.js","webpack:///./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js","webpack:///./node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/drop-down-list.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/pager-dropdown.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/external-message.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/page.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/selection.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/search.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/width-controller.js","webpack:///./node_modules/@syncfusion/ej2-vue-base/src/component-base.js","webpack:///./node_modules/@syncfusion/ej2-vue-base/src/component-decorator.js","webpack:///./node_modules/@syncfusion/ej2-vue-base/src/template.js","webpack:///./node_modules/@syncfusion/ej2-vue-grids/src/grid/columns.directive.js","webpack:///./node_modules/@syncfusion/ej2-vue-grids/src/grid/aggregate-columns.directive.js","webpack:///./node_modules/@syncfusion/ej2-vue-grids/src/grid/aggregates.directive.js","webpack:///./node_modules/@syncfusion/ej2-vue-grids/src/grid/grid.component.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-writer.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/utils.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/dictionary.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/enum.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-main-object-collection.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-string.js","webpack:///./node_modules/@syncfusion/ej2-file-utils/src/stream-writer.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-base.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-name.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-operators.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-dictionary-properties.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-dictionary.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-number.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-array.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-stream.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/cross-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-reference.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-catalog.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/enum.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-cross-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/drawing/pdf-drawing.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-size.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-margins.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/enum.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/enum.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-settings.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/pdf-stream-writer.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-layouter.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-color.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-brush.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-solid-brush.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-pen.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-string-format.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/string-tokenizer.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/enum.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transformation-matrix.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/constants.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/collections/object-object-pair/dictionary.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-transparency.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field-info-collection.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/graphics-element.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/automatic-field-info.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/byte-array.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-table-info.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-name-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-name-record.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-head-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-metrics.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-horizontal-header-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-OS2-Table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-post-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-long-hor-metric.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-cmap-sub-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-cmap-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-glyph-info.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-loca-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-apple-cmap-sub-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-glyph-header.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/input-output/big-endian-writer.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-reader.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-font-metrics.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/unicode-true-type-font.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-text-shape.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl/rtl-bidirectional.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/rtl-renderer.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/primitives/pdf-boolean.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/image-decoder.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-gradient-brush.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/pdf-template.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/tables/light-tables/enum.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/unit-convertor.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-image.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/images/pdf-bitmap.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-resources.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/brushes/pdf-tiling-brush.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-graphics.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-collection.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-layer-collection.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-base.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation-collection.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/page-added-event-arguments.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-page-collection.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document-template.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-templates.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-section-collection.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-document-page-collection.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/general/pdf-cache-collection.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-standard-font.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/pdf-document.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/pdf-borders.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/styles/style.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/element-layouter.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/layout-element.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/base/text-layouter.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/figures/text-element.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/annotation.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/link-annotation.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/action-link-annotation.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/action.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/actions/uri-action.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/uri-annotation.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/annotations/pdf-text-web-link.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/layout/grid-layouter.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-cell.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-column.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-row.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/pages/pdf-page-template-element.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-numbers-convertor.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-template-value-pair.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/multiple-value-field.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/pdf-page-number-field.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/composite-field.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/single-value-field.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/document/automatic-fields/page-count-field.js","webpack:///./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-true-type-font.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/pdf-export.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/focus-strategy.js","webpack:///./node_modules/@syncfusion/ej2-popups/src/popup/popup.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/content-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/group-model-generator.js","webpack:///./node_modules/@syncfusion/ej2-popups/src/common/resize.js","webpack:///./node_modules/@syncfusion/ej2-popups/src/dialog/dialog.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js","webpack:///./node_modules/@syncfusion/ej2-data/src/util.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-merge-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/export-helper.js","webpack:///./node_modules/@syncfusion/ej2-navigations/src/common/h-scroll.js","webpack:///./node_modules/@syncfusion/ej2-navigations/src/common/v-scroll.js","webpack:///./node_modules/@syncfusion/ej2-navigations/src/toolbar/toolbar.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/toolbar.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/sort.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js","webpack:///./node_modules/@syncfusion/ej2-file-utils/src/save.js","webpack:///./node_modules/@syncfusion/ej2-file-utils/src/encoding.js","webpack:///./node_modules/@syncfusion/ej2-buttons/src/button/button.js"],"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__","this","constructor","prototype","create","consts","GroupGuid","Adaptor","ds","options","from","requestType","sortBy","select","skip","group","take","search","count","where","aggregates","expand","type","dataSource","pvt","processResponse","data","query","xhr","JsonAdaptor","_super","apply","arguments","processQuery","dataManager","ret","key","page","result","json","slice","length","countFlg","lazyLoad","keyCount","i","value","agg","queries","fn","call","e","field","undefined","push","args","lazyLoadData","lazyLoadGroup","isCountRequired","getAggregate","onDemandGroupInfo","fieldName","comparer","onPage","formGroupResult","req","onWhere","level","uid","childLevel","records","aggQuery","filterQueries","tmp","getValue","batchRequest","dm","changes","deletedRecordsLen","deletedRecords","addedRecords","insert","changedRecords","update","remove","filter","obj","validate","onAggregates","onSearch","fieldNames","getFieldList","j","getObject","searchKey","ignoreCase","ignoreAccent","onSortBy","fnCompare","sort","endsWith","fnSort","replace","onGroup","size","pageSize","start","pageIndex","end","onRange","onTake","nos","onSkip","onSelect","tableName","position","splice","keyField","Date","UrlAdaptor","hierarchyFilters","temp","getQueryRequest","singles","filterQueryLists","params","url","request","sorts","groups","filters","searches","callAdaptorFunction","name","direction","getFiltersFrom","toJson","keys_3","keys","_i","keys_1","prop","isNull","fields","operator","getRequestQuery","reqParams","_a","keys_2","JSON","stringify","parse","jsonDateReplacer","pvtData","contentType","convertToQueryString","indexOf","request1","param","fromTable","distincts","selects","expands","getResponseHeader","handleTimeZone","timeZoneHandling","parseJson","requests","groupDs","action","isExpand","isArray","val","formRemoteGroupedData","getAggregateResult","items","childLvl","lvl","getGroupedRecords","hasRecords","childGroupedRecords","concat","original","batchUrl","crudUrl","removeUrl","dataType","changed","added","deleted","table","getAddParams","beforeSend","insertUrl","keyColumn","updateUrl","fKey","pKey","predicats","or","pData","aggregateData","res","aggregate","isServerGrouping","groupQuery","addParams","Error","ODataAdaptor","props","_this","accept","multipartAccept","batch","changeSet","batchPre","contentId","batchContent","changeSetContent","batchChangeSetContentType","updateType","getModuleName","onPredicate","predicate","requiresCast","guid","returnValue","getField","replacer","encodeURIComponent","isGuid","toLowerCase","odBiOperator","odUniOperator","odv4UniOperator","onComplexPredicate","predicates","onEachWhere","join","condition","isComplex","onEachSearch","throwError","onEachSort","reverse","onCount","settings","setRequestHeader","overrideMimeType","metaCheck","rootUrl","dataUrls","split","resourceTableName","dataCopy","results","metaData","emptyAndBatch","processBatchResponse","versionCheck","version","parseInt","oDataCount","format","requiresFormat","keys_4","localTimeReplacer","convertObj","dateParse","toLocalTime","localTime","compareAndRemove","initialGuid","getGuid","cid","cSet","generateInsertRequest","generateUpdateRequest","generateDeleteRequest","arr","stat","dateTime","toJSON","generateBodyContent","org","forEach","change","o","date","method","cIdx","jsonObj","substring","exVal","exec","changeGuid","test","isPlainObject","final","valueOf","RemoteSaveAdaptor","ODataV4Adaptor","isDate","onExpand","selected","expanded","exArr","item","splits","ex","onDistinct","distinctFields","map","metaName","dataUrl","dataCount","WebApiAdaptor","_loop_1","x","location","host","_loop_2","_loop_3","state","datTime","Count","Items","WebMethodAdaptor","getData","updateKey","urlParams","AjaxAdaptor","Function","addRecord","updateRecord","deleteRecord","batchUpdate","CacheAdaptor","adaptor","timeStamp","isCrudAction","isInsertAction","cacheAdaptor","guidId","window","localStorage","setItem","setInterval","getItem","forDel","currentTime","requestTime","removeItem","generateKey","currentFilter","newQuery","clone","cachedItems","index","crossDomain","globalTimeOut","spinTemplate","spinCSSClass","DEFT_MAT_WIDTH","DEFT_FAB_WIDTH","DEFT_BOOT_WIDTH","DEFT_BOOT4_WIDTH","CLS_SHOWSPIN","CLS_HIDESPIN","CLS_MATERIALSPIN","CLS_FABRICSPIN","CLS_BOOTSPIN","CLS_BOOT4SPIN","CLS_HIGHCONTRASTSPIN","CLS_SPINWRAP","CLS_SPININWRAP","CLS_SPINCIRCLE","CLS_SPINARC","CLS_SPINLABEL","CLS_SPINTEMPLATE","createSpinner","internalCreateElement","target","radius","makeElement","container","create_spinner_container","cssClass","wrap","classList","add","template","theme","getTheme","width","calculateRadius","setTheme","label","createLabel","inner_wrap","replaceContent","labelEle","textContent","appendChild","createMaterialSpinner","uniqueID","random_generator","timeOut","create_material_element","mat_calculate_attributes","createBootstrap4Spinner","startMatAnimate","globalObject","timeOutVar","globalVariables","spinnerInfo","globalInfo","animateMaterial","createFabricSpinner","create_fabric_element","fb_calculate_attributes","createHighContrastSpinner","getComputedStyle","getPropertyValue","innerContainer","querySelector","svg","removeChild","createBootstrapSpinner","create_bootstrap_element","boot_calculate_attributes","svgBoot","document","createElementNS","viewBoxValue","trans","defaultRadius","setAttribute","insertBefore","firstChild","bootCircle","style","height","y","rad","startArc","defineArcPoints","circleEle","generateSeries","begin","stop","series","increment","formSeries","parseFloat","toFixed","animateBootstrap","id","getAttribute","getElementsByClassName","rotation","circle","boot_animate","isAnimate","setTimeout","bind","inner","innerHTML","defaultSize","previousId","random","combine","charAt","Math","floor","innerCon","themeClass","svgFabric","fabricCirclePath","fabricCircleArc","cls","svgMaterial","matCirclePath","spinnerContainer","spinnerInnerContainer","duration","max","createCircle","easeAnimation","easing","startTime","getTime","diameter","getSize","strokeSize","getStrokeSize","rotate","mat_animation","min","updatePath","path","getDashOffset","transformOrigin","drawArc","PI","parsed","offset","current","timestamp","timecount","innerConainer","trgClass","centerX","centerY","endArc","defineCircle","defineArc","angle","radians","cos","sin","showSpinner","showHideSpinner","isHide","spinnerWrap","contains","spinCheck","svgEle","clearTimeout","hideSpinner","Group","parent","groupSettings","sortedColumns","serviceLocator","sortRequired","isAppliedGroup","isAppliedUnGroup","reorderingColumns","visualElement","className","styles","attrs","helper","gObj","sender","element","allowReordering","column","getColumnByField","firstElementChild","offsetWidth","offsetHeight","dragStart","bindEvents","dragElement","drag","animateDropper","cloneElement","trigger","draggableType","dragStop","preventDrop","rearrangeGroup","getColumnByUid","columns","ungroupColumn","dragField","dropTarget","grouped","querySelectorAll","cols","dropField","dropIndex","dragIndex","flag","c","addColToGroupDrop","addLabel","removeColFromGroupDrop","drop","droppedElement","aria","setDropTarget","setGrabbed","getHeaderTable","allowGrouping","getColumnHeaderByUid","log","moduleName","columnName","headerText","groupColumn","contentRefresh","focus","getService","addEventListener","groupGenerator","dragLabel","l10n","getConstant","updateModel","columnDrag","columnDragStart","dropArea","columnDrop","isDestroyed","on","enableAfterRender","onActionComplete","onPropertyChanged","clickHandler","refreshSortIcons","keyPressHandler","initialEnd","render","onGroupAggregates","blazorActionBegin","updateExpand","removeEventListener","off","isCollapseStateEnabled","expandAll","isServerRendered","updateGroupDropArea","getColumns","col","preventDefault","allowSelection","getSelectedRowIndexes","rows","getContentTable","children","dataRow","getDataRows","grpRow","rowIndex","expandCollapseRows","collapseAll","isEdit","getFocusedElement","row","parentElement","elem","focusModule","currentInfo","applySortFromTarget","unGroupFromTarget","toogleGroupFromHeader","showToggleButton","gHeader","allowSorting","getColumnHeaderByField","sortColumn","trgt","cellIdx","cellIndex","rowIdx","rowNodes","expandElem","toExpand","indent","notify","updateVirtualRows","enableLazyLoading","contentModule","captionExpand","captionCollapse","setExpand","len","display","updateVisibleexpandCollapseRows","getRowsObject","isDataRow","getRowElementByUID","visible","rObj","getRowObjectFromUID","closest","getDataModule","generateQuery","aggregateQuery","getQuery","rowObject","requiresCount","then","renderModule","dataManagerSuccess","expandCollapse","renderGroupDropArea","initDragAndDrop","refreshToggleBtn","groupElem","createElement","showDropArea","clear","initializeGHeaderDrop","initializeGHeaderDrag","dragTarget","distance","instance","handler","arg1","showGroupedColumn","colName","enableColumnVirtualization","setVisible","sortSettings","dataBind","groupAddSortingQuery","isJsComponent","isFromGroup","animator","groupedColumn","childDiv","headerCell","title","tabindex","showUngroupButton","createSeparator","toString","isRemove","headers","showColumnMenu","getGHeaderCell","parent_1","module","properties","oldProperties","refreshHeader","updateGroupedColumn","updateButtonVisibility","freezeRefresh","isVisible","enable","destroy","gridElement","refreshing","clearGrouping","header","gCols","editedData","iterateGroupAggregates","rowData","generateRows","summaryRows","updateSummaryRows","isReact","destroyTemplate","cells","cell","isDataCell","dataUid","updatedData","initData","getCurrentViewRecords","deletedCols","changeds","edit","getPrimaryKeyFieldNames","mergeData","pKeyVal","hasVal","some","cItem","eData","aggrds","aggregateRows","k","aggr","groupedCols","l","childRow","closestParent","parentUid","state_1","isFrozen","ARR_LITERAL_CODES","Int16Array","ARR_LITERAL_LENGTHS","Uint8Array","ARR_DISTANCE_CODES","ARR_DISTANCE_LENGTHS","CompressedStreamWriter","noWrap","pendingBuffer","pendingBufLength","pendingBufCache","pendingBufBitsInCache","bufferPosition","extraBits","currentHash","matchStart","matchLength","matchPrevAvail","blockStart","stringStart","lookAhead","totalBytesIn","inputOffset","inputEnd","windowSize","windowMask","hashSize","hashMask","hashShift","maxDist","checkSum","isHuffmanTreeInitiated","initHuffmanTree","treeLiteral","CompressorHuffmanTree","treeDistances","treeCodeLengths","arrDistances","Uint16Array","arrLiterals","stream","dataWindow","hashHead","hashPrevious","writeZLibHeader","defineProperty","get","enumerable","configurable","compressedString","String","fromCharCode","write","encode","getBytes","inputBuffer","ChecksumCalculator","checksumUpdate","pendingBufferFlush","compressData","headerDate","pendingBufferWriteShortBytes","s","finish","success","fillWindow","canFlush","compressSlow","flush","lookAheadCompleted","slideWindow","prevMatch","prevLen","discardMatch","matchPreviousBest","matchPreviousAvailable","huffmanIsFull","insertString","findLongestMatch","huffmanTallyLit","huffmanTallyDist","huffmanFlushBlock","lastBlock","more","set","subarray","updateHash","m","match","hash","curMatch","chainLen","niceLen","scan","bestEnd","bestLength","limit","stringEnd","scanEnd1","scanEnd","literal","codeFrequencies","dist","lc","huffmanLengthCode","dc","huffmanDistanceCode","stored","storedOffset","storedLength","buildTree","calculateBLFreq","blTreeCodes","codeLengths","huffCodeLengthOrders","opt_len","getEncodedLength","static_len","huffmanFlushStoredBlock","pendingBufferWriteBits","setStaticCodes","huffmanCompressBlock","huffmanReset","huffmanSendAllTrees","pendingBufferAlignToByte","pendingBufferWriteShort","pendingBufferWriteByteBlock","code","buildCodes","treeLength","rank","writeTree","reset","literalLen","writeCodeToStream","bits","uint","Uint32Array","pendingBufferFlushBits","isClose","array","bitReverse","close","writer","elementCount","minCodes","maxLength","codeMinCount","codeFrequency","lengthCount","Int32Array","codeCount","codeLength","codes","lengths","lengthTemp","nextCode","bitsCount","reverseBits","blTree","maxCount","minCount","curLen","nextLen","maxRepeatCount","minRepeatCount","currentRepeatCount","currentCodeLength","codesCount","arrTree","n","freq","pos","pPos","leafsCount","nodesCount","child","values","node","iIndex","constructHuffmanTree","buildLength","first","last","lastVal","second","minDepth","numNodes","numLeafs","overflow","calculateOptimalCodeLength","iIncreasableLength","recreateTree","nodePtr","childPtr","childIndex","bitLength","checksum","buffer","checksum_uint","s1","s2","checkSumBitOffset","steps","checksumIterationCount","checksumBase","Query","subQuery","isChild","lookups","groupedColumns","setKey","using","execute","done","fail","always","executeQuery","executeLocal","cloned","subQuerySelector","distinct","tables","Predicate","fnOperators","sortByForeignKey","order","sortByDesc","range","hierarchy","selectorFn","foreignKey","q","filtered","processOperator","and","combinePredicates","fromJson","fromJSONData","pred","record","isAnd","preds","CheckBoxFilterBase","existingPredicate","foreignKeyQuery","filterState","renderEmpty","valueFormatter","locale","cBoxTrue","checked","cBoxFalse","enableRtl","closeDialog","wireEvents","dlg","keyupHandler","searchHandler","searchBoxKeyUp","dialogObj","unWireEvents","foreignKeyFilter","fColl","mPredicate","fPredicate","filterCollection","columnData","ejpredicate","fpred","matchCase","foreignFilter","isRemote","initalPredicate","foreignKeyValue","searchBoxClick","sInput","refreshCheckboxes","updateSearchIcon","sIcon","getLocalizedLabel","localeObj","updateDataSource","str","actualPredicate","filteredColumns","filterSettings","allowCaseSensitive","isFiltered","getAndSetChkElem","sBox","hideSearchbox","searchBox","inputargs","floatLabelType","placeholder","createInput","spinner","cBox","showDialog","columnType","cancel","filterModel","content","animationSettings","effect","buttons","click","btnClick","buttonModel","isExcel","isPrimary","created","dialogCreated","open","dialogOpen","isStringTemplate","renderResponsiveFilter","isResponsiveFilter","responsiveCnt","appendTo","maxHeight","show","getAllData","X","Y","left","isDevice","openDialog","filterTemplateCol","getFilterItemTemplate","registeredTemplate","filterItemTemplate","renderTemplates","clearFilter","tagName","isForeignColumn","keyCode","fltrBtnHandler","text","check","optr","ddlValue","ej2_instances","isMenuNotEqual","fObj","searchInput","caseSen","defaults","isNotEqual","itemsCnt","coll","generateNullValuePredicates","arg2","arg3","arg4","arg5","arg6","initiateFilter","firstVal","foreignQuery","predicte","fromView","parserFn","addDistinct","filterChoiceCount","filterargs","excelSearchOperator","filterObj","colData","filterEvent","processSearch","getPredicateFromCols","getPredicate","predicateList","isGrid","getForeignKeyColumns","foreignColumn","processDataOperation","filteredColumn","defObj","def","deffered","promise","dataSuccess","isInitial","allPromise","runArray","foreignKeyData","Promise","all","fullData","args1","searchSettings","sSettings","f","filterColumn","filteredData","getDistinct","processDataSource","updateResult","createFilterItems","result_1","selectAll","updateAllCBoxes","updateIndeterminatenBtn","setFocus","prevElem","cBoxes","cBoxes_1","previousSibling","createCheckbox","cloneNode","dummyData","isReactCompiler","btn","cnt","disabled","btnObj","input","indeterminate","nullCounter","selectAllValue","checkBox","isColFiltered","isRndere","formatFn","toView","args_1","checkbox","getCheckedState","checkState","ejValue","lookup","isForeignKey","foreignDataObj","fnAscending","collection","generatePredicate","operate","updateDateFilter","getCaseValue","Data","dataState","isPending","resolver","foreignKeyDataState","initDataManager","addRows","reorderRows","removeRows","crudActions","refreshFilteredCols","toIndex","fromIndex","isAngular","isQueryInvokedFromData","setProperties","skipPage","columnQueryMode","isPrimaryKey","selectQueryFields","filterQuery","searchQuery","sortQuery","virtualGroupPageQuery","pageQuery","isForeign","types","fName","allowPaging","enableVirtualization","enableInfiniteScrolling","pageSettings","currentPage","pageCount","infiniteScrollModule","isGrpFmt","enableGroupByFormat","formatGroupColumn","sortGrp","setSortDirection","sortComparer","getSortDirection","fcolumn","getSearchColumnFieldNames","needForeignKeySearch","fGeneratePredicate","predList","skipFoerign","foreignColEmpty","actualFilter","allowFiltering","colType","foreignCols","defaultFltrCols","_b","columns_1","gridColumn","grabColumnByFieldFromAllCols","excelPredicate","_c","_d","_e","foreignCols_1","column_1","grabColumnByUidFromAllCols","_f","_g","getKey","eventPromise","crud","saveChanges","catch","ready","deferred_1","resolve","reject","getDay","getHours","getMinutes","getSeconds","getMilliseconds","getFormatter","formatVal","pr","previousData","getStateEventArgument","deff","endEdit","setState","offline","getState","getForeignKeyDataState","setForeignKeyDataState","adaptr","dataArgs","isDataChanged","editArgs_1","cancelEdit","colFieldNames","columns_2","allowSearching","__decorate","decorators","desc","r","getOwnPropertyDescriptor","Reflect","decorate","Column","disableHtmlEncode","allowResizing","allowEditing","showInColumnChooser","autoFit","sortDirection","getEditTemplate","editTemplateFn","getFilterTemplate","filterTemplateFn","editType","skeleton","setFormatter","getFormatFunction","setParser","getParserFunction","commands","textAlign","commandsTemplate","templateFn","headerTemplate","headerTemplateFn","itemTemplate","fltrTemplateFn","editTemplate","filterTemplate","foreignKeyField","a_1","xObj","yObj","z","fnDescending","getFreezeTableName","freezeTable","refreshReactColumnTemplateByUid","getParser","getColumnTemplate","getHeaderTemplate","getDomSetter","CommandColumnModel","Scroll","lastScrollTop","previousValues","top","oneTimeReady","widthService","setWidth","uiupdate","setWidthToColumns","toolbarModule","toolbar","refreshOverflow","setHeight","mHdrHeight","getContent","isFrozenGrid","getScrollBarWidth","frozenRows","tbody","getHeaderContent","height_1","getRowHeight","ensureOverflow","refresh","setPadding","scrollWidth","getThreshold","cssProps","getCssProperties","padding","getFrozenMode","border","removePadding","rtl","hDiv","footerDiv","getFooterContent","getSiblingsHeight","appName","info","setScrollLeft","headerModule","getMovableHeader","scrollLeft","onFrozenContentScroll","isPreventScrollEvent","scrollTop","onContentScroll","scrollTarget","isHeader","isLeft","isDown","scrollDown","isFooter","onCustomScrollbarScroll","mCont","mHdr","onTouchScroll","pointerType","pageXY","getPointXY","clientWidth","scrollBar","setPageXY","touches","pageX","pageY","frzCols","mScrollBar","sLeft","sHeight","clientHeight","scrollHeight","css","overflowY","cont","SummaryModelGenerator","footerTemplate","groupFooterTemplate","groupCaptionTemplate","columnSelector","detailTemplate","childGrid","isRowDragable","getIndentCount","buildSummaryData","getGeneratedRow","summaryRow","raw","indents","getIndentByLevel","isDetailGridAlone","indentLength","getGeneratedCell","getCellType","Indent","DetailFooterIntent","attributes","class","getRowUid","cellType","sColumn","scolumn","opt","dummy","single","setTemplate","a","disp","Summary","GroupSummaryModelGenerator","v","indx","GroupSummary","CaptionSummaryModelGenerator","initVal","reduce","prev","cur","isEmpty","CaptionSummary","AriaService","setOptions","setStateAndProperties","config","setSort","setBusy","isBusy","busy","invalid","isGrabbed","grabbed","isTarget","dropeffect","attribute","removeAttribute","role","multiselectable","haspopup","colcount","rowcount","Input","CLASSNAMES","RTL","DISABLE","INPUT","TEXTAREA","INPUTGROUP","FLOATINPUT","FLOATLINE","FLOATTEXT","CLEARICON","CLEARICONHIDE","LABELTOP","LABELBOTTOM","NOFLOATLABEL","INPUTCUSTOMTAG","FLOATCUSTOMTAG","floatType","inputObject","clearButton","createInputContainer","parentNode","createFloatingInput","bindInitialEvent","showClearButton","setClearButton","appendSpan","validateInputType","setPropertyValue","checkInputValue","getParentNode","inputElement","inputValue","_focusFn","_blurFn","getElementsByTagName","wireFloatingEvents","unwireFloatingEvents","floatLinelement","floatLabelElement","customTag","innerText","encodePlaceHolder","inputWrap","updateLabelState","event","checkFloatLabelType","setCssClass","setEnabled","enabled","setEnableRtl","setPlaceholder","setReadonly","readonly","updateIconState","button","createClearButton","initial","baseElement","insertAdjacentElement","wireClearBtnEvents","readOnly","activeElement","validateLabel","tagClass","tag","spanEle","hiddenInput","setValue","elements","oldClass","isReadonly","isRtl","isEnable","inputContainer","disabledAttrs","considerWrapper","removeAttributes","addAttributes","isClear","removeFloating","inputEle","addFloating","iconEle","inputObj","isPrependIcon","floatLine","floatText","wrapper","setRipple","isRipple","_internalRipple","argsButton","_onMouseDownRipple","_onMouseUpRipple","_onMouseRipple","ele","parentEle","createIconEle","iconClass","addIcon","icons","internalCreate","icon","result_2","prependSpan","innerWrapper","containerElement","DataManager","timeTillExpiration","cachingPageSize","enableCaching","jsonp","isCors","defaultQuery","isDataAvailable","setDefaultQuery","buildHierarchy","makeRequest","Deferred","isAjaxAdaptor","getDeferedArgs","nextTick","setImmediate","extendRequest","fnSuccess","fnFail","cache","processData","onSuccess","onFailure","isSelector","error","process","actual","virtualSelectRecords","fnQueryChild","selector","subDeffer","childArgs","subUrl","childReq","subData","ajaxReqOption","httpRequest","virtualRecords","ajax_1","send","pResult","cResult","doAjaxRequest","deff_1","ajax_2","successFunc","ajaxDeffered","failureFunc","ajaxFunc","ajax_3","parentDocument","targetContainer","fit","viewPortElement","axis","elemData","getBoundingClientRect","ownerDocument","containerWidth","getTargetContainerWidth","getViewPortWidth","containerLeft","ContainerLeft","containerRight","ContainerRight","overLeft","overRight","containerHeight","getTargetContainerHeight","getViewPortHeight","containerTop","ContainerTop","containerBottom","ContainerBottom","overTop","overBottom","isCollide","elemOffset","elementRect","right","bottom","yAxis","topCollideCheck","xAxis","leftCollideCheck","topSide","rightSide","leftSide","bottomSide","flip","offsetX","offsetY","positionX","positionY","fixedParent","tEdge","TL","TR","BL","BR","eEdge","oldVisibility","visibility","removeProperty","posX","posY","updateElementData","setPosition","leftFlip","topFlip","setPopup","offsetParent","edge","eStatus","getBodyScrollLeft","deepCheck","collideSide","getBodyScrollTop","innerHeight","getTargetContainerLeft","getTargetContainerTop","documentElement","body","windowWidth","innerWidth","popupRect","calculateRelativeBasedPosition","anchor","fixedElement","anchorPos","tempAnchor","offsetLeft","offsetTop","calculatePosition","currentElement","targetValues","updatePosition","setPosx","setPosy","getElementHCenter","getElementTop","getElementRight","getElementVCenter","getElementLeft","getElementBottom","Worksheets","Worksheet","isSummaryRowBelow","showGridLines","HyperLink","Grouping","FreezePane","MergeCell","MergeCells","mergeCell","inserted","mCell","isIntersecting","intersectingCell","Width","Height","ref","base","compare","CellStyle","numFmtId","backColor","fontName","fontSize","fontColor","italic","bold","underline","wrapText","hAlign","vAlign","numberFormat","borders","Borders","isGlobalStyle","Font","sz","u","color","CellXfs","Alignment","CellStyleXfs","CellStyles","xfId","NumFmt","formatCode","Border","mLine","mColor","lineStyle","Row","Rows","Image","Cell","Cells","CRC32TABLE","ZipArchive","initCrc32Table","files","isMicrosoftBrowser","navigator","msSaveBlob","addItem","file","ZipArchiveItem","addDirectory","directoryName","save","fileName","zipArchive","saveInternal","saveAsBlob","blob","skipFileSave","zipData","dirLength","compressedObject","getCompressedData","constructZippedObject","isDirectory","writeZippedContent","reader_1","FileReader","onload","crc32Value","compressedData","compressedSize","uncompressedDataSize","compressionType","length_1","calculateCrc32Value","readAsArrayBuffer","crc32Table","compressor","currentIndex","nextIndex","subArray","zipParts","extFileAttr","writeHeader","localHeader","centralDir","writeCentralDirectory","zipHeader","getModifiedTime","getModifiedDate","localDirLen","cenDirLen","getArrayBuffer","shift","writeFooter","Blob","externalFileAttribute","directoryHeader","centralLength","localLength","dirEnd","charCodeAt","bytes","modTime","modiDate","getFullYear","getMonth","getDate","itemName","ValueFormatter","cultureName","intl","getDateFormat","getNumberFormat","displayText","CsvHelper","separator","csvStr","formatter","globalStyles","Map","worksheets","parseWorksheet","parseRows","rows_1","parseRow","parseCell","csv","parseCellValue","has","dataUrl_1","URL","createObjectURL","dwlLink","download","href","event_1","createEvent","initEvent","dispatchEvent","revokeObjectURL","BlobHelper","parts","append","part","getBlob","AutoFilters","Workbook","saveType","culture","currencyString","sharedStringCount","unitsProportions","hyperlinkStyle","currency","mSaveType","mArchive","sharedString","mFonts","mBorders","mStyles","printTitles","cellStyles","mNumFmt","mFills","mCellXfs","mCellStyleXfs","drawingCount","imageCount","cellStyle","parserCellStyle","cellStylesIn","tFormat","parserWorksheets","builtInProperties","BuiltInProperties","parserBuiltInProperties","csvHelper","jsonBuiltInProperties","author","comments","category","company","manager","subject","createdDate","modifiedDate","tags","status","jsonSheet","sheet","mergeCells","mergedCellsStyle","mHyperLinks","parserColumns","parserRows","freeze","parserFreezePanes","printTitle","parserPrintTitle","pageSetup","images","parserImages","autoFilters","parseFilters","hyperLinks","mergeOptions","applyProperties","sourceJson","destJson","getCellName","getColumnName","strColumnName","iCurrentDigit","titleRowName","titleColName","printTitleName","fromRow","toRow","fromColumn","toColumn","freezePanes","leftCell","columnsLength","rowsLength","rowId","parserRow","insertMergedCellsStyle","rowToInsert","createCell","insertIndex","styleIndex","cellToInsert","refName","grouping","parseGrouping","parseCells","outlineLevel","isCollapsed","isHidden","cellsLength","spanMin","spanMax","cellId","jsonCell","rowSpan","colSpan","hyperlink","hyperLink","getCellValueType","rId","formula","parseCellType","processMergeCells","spans","GetColors","colors","processColor","colorVal","toUpperCase","rgbColors","processCellValue","cellValue","processedVal","startindex","endIndex","subString","subSplit","subSplit_1","trim","applyGlobalStyle","defStyleIndex","parserBorder","leftBorder","rightBorder","topBorder","bottomBorder","processCellStyle","switchNumberFormat","numFmt","cellStyleXfs","cellXfs","returnFormat","getNumberPattern","useGrouping","getDatePattern","processNumFormatId","compareResult","compareStyle","isNewFont","toCompareStyle","font","isNewBorder","bStyle","isAllBorder","toCompareBorder","allBorderStyle","baseStyle","toOADate","value_1","sstvalue","imagesLength","image","parserImage","lastRow","lastColumn","horizontalFlip","verticalFlip","blobSaveType","blobData","proxyUrl","xlsxMatch","csvMatch","saveWorkbook","saveWorksheets","saveSharedString","saveStyles","saveApp","saveCore","saveContentType","saveTopLevelRelation","saveWorkbookRelation","workbookTemp","sheets","printTitle_1","addToArchive","saveWorksheet","sheetBlob","sheetString","saveSheetView","colString","pixelsToColumnWidth","rowString","pixelsToRowHeight","_h","_j","hLink","saveDrawings","saveSheetRelations","drawings","sheetDrawingString","imgId","pic","updatelastRowOffset","updatelastColumnOffSet","lastRowOffset","lastColOffset","imageData","convertBase64toImage","saveDrawingRelations","picture","iCurHeight","iCurRow","iCurOffset","iRowHeight","convertToPixels","iSpaceInCell","rowHiddenHeight","round","iCurWidth","iCurCol","iColWidth","ColumnWidthToPixels","colHiddenWidth","img","byteStr","atob","ArrayBuffer","drawingRelation","pixels","dDigitWidth","trunc","fileWidth","relStr","paneString","sstStart","si","processString","updateCellXfsStyleXfs","styleTemp","saveNumberFormats","saveFonts","saveFills","saveBorders","saveCellStyleXfs","saveCellXfs","saveCellStyles","compareFontResult","fontId","fillId","borderId","applyAlignment","alignment","horizontal","vertical","numFmtStyle_1","fontStyle","fillsStyle","bordersStyle","cellStyleString","cellXfsStyle","cellStyleXf","saveAlignment","cellXf","alignString","appString","coreString","toISOString","topRelation","wbRelation","contentTypeString","sheetsOverride","xmlString","archiveItem","startCell","endCell","updatedMergedCellStyles","sCell","eCell","dateToTicks","year","month","day","ticksPerDay","daysToMonth365","daysToMonth366","days","isLeapYear","timeToTicks","hour","minute","totalSeconds","ticks","daysTo1899","doubleDateOffset","oaDateMinAsTicks","millisPerDay","ExcelExport","locator","book","workSheet","rowLength","expType","includeHiddenColumn","isCsvExport","isElementIdChanged","gridPool","init","isExporting","footer","exportValueFormatter","grid","exportProperties","isMultipleExport","workbook","isCsv","isBlob","isBlb","workbk","isMultiEx","hierarchyExportMode","expandedRows","gridObject","processRecords","exportingSuccess","blobPromise","exportType","allPromise_1","getColumnData","processInnerRecords","query_1","groupedColLength","blankRows","colDepth","isExportPropertiesPresent","multipleExport","processExcelHeader","childGridLevel","processGridExport","globalResolve","checkAndExport","organisedRows","organiseRows","processExcelFooter","getVisibleColumns","enableFilter","currencyCode","initialIndex","childRows","excelRows","getFrozenColumns","hierarchyPrintMode","gColumns","getGridExportColumns","headerRow","getHeaders","groupIndent","processHeaderContent","processRecordContent","currentViewData","returnType","currentViewRecords","excelRow","processRecordRows","processGroupedRows","processAggregates","startIndex","excelExportProperties","dataSource_1","formatCellValue","cArgs","captionText","getCaptionThemeStyle","captionModelGen","groupCaptionSummaryRows","fillAggregates","childLevels","lIndex","hIndex","tCell","span","col_1","getGridRowModel","templateRowHeight","gCell","valueAccessor","fkData","getFData","idx","excelCellArgs","base64","excelImage","getColumnStyle","isPrinting","returnVal","createChildGrid","childGridObj","actionFailure","failureHandler","beforeDataBound","childGridCell","rowObj","excelExportProps","gRow","intent","rec","byGroup","summaryModel","aggregateModule","prepareSummaryInfo","groupSummaryModel","groupSummaryRows","sRows","customIndex","rows_2","getAggreateValue","Sum","Average","Max","Min","TrueCount","FalseCount","Custom","aggregateStyle","gridCellStyle","row_1","dummyOutlineLevel","dummyGrouping","txt","isVue","JSON1","JSON2","attrname","columnIndex","gridRows","gridColumns","spannedCells","currentCellIndex","gridCell","HeaderIndent","DetailHeader","getIndex","spannedCell","getHeaderThemeStyle","headerTextAlign","excelHeaderCellArgs","parseStyles","getRecordThemeStyle","updateThemeStyle","themestyle","caption","noRows","headerRows","updatedCellIndex","footerRows","spannedCells_1","getConvertedWidth","getCloneProperties","Print","scrollModule","isAsyncPrint","defered","isContentReady","actionBegin","onEmpty","hierarchyPrint","isPrintGrid","contentReady","removeColGroup","printGridObj","printModule","print","renderPrintGrid","printWind","outerHeight","outerWidth","moveTo","resizeTo","screen","availWidth","availHeight","printGrid","viewContainerRef","load","modules","getInjectedModules","injectedModues","setInjectedModules","printgrid","selectedRows","contentDiv","headerDiv","overflowX","waitingPop","printGridElement","depth","groupCaption","colGroups","contentColGroups","hideColGroup","printGridProp","getDateParser","getNumberParser","setCulture","isBlazorPlatform","createInstance","classFunction","arrayParam","unshift","unbind","num","intCrypto","msCrypto","crypto","getRandomValues","secret","combineArray","messageHandler","source","postMessage","nameSpace","isUndefined","fromObj","isNullOrUndefined","deleteObject","isObject","objCon","getEnumValue","enumObject","enumValue","merge","destination","temrObj","tempProp","deepmerge","extend","copied","deep","arguments_1","obj1","src","copy","isArrayChanged","blazorEventExtend","isBlazor","Event","getUniqueID","definedName","debounce","eventFunction","delay","out","later","compareElementParent","message","stack","printWindow","div","links","reference","outerHTML","interval","clearInterval","formatUnit","HijriParser","defaultNumberingSystem","defaultNumberSymbols","latnNumberSystem","ParserBase","getMainObject","cName","getNumberingSystem","numberingSystems","reverseObject","propKeys","propKeys_1","getSymbolRegex","regexStr","RegExp","getSymbolMatch","matchKeys","matchKeys_1","constructRegex","convertValueParts","regex","getDefaultNumberingSystem","nSystem","getCurrentNumericOptions","curObj","numberSystem","needSymbols","blazorMode","digits","numericPair","numberParseRegex","numericRegex","symbolNumberSystem","symbolMatch","getNumberMapper","isNumber","mapper","numberSymbols","timeSeparator","latnNumberSystem_1","nPair","nRegex","blazorCurrencyData","getBlazorCurrencySymbol","dateCorrection","getHijriDate","gDate","tMonth","tYear","yPrefix","julilanOffset","julianNumber","tempMonth","modifiedJulianDate","iyear","cyc","iy","im","tempDay","iln","ii","hYear","hmonth","hDate","toGregorian","mcjdn","julianDate","gDay","gMonth","gYear","abbreviateRegexGlobal","standalone","weekdayKey","timeSetter","h","H","datePartMatcher","DateFormat","dateFormat","option","cldr","dependable","getDependables","calendar","numObject","dateObject","formatOptions","isIslamic","islamicRegex","compareBlazorDateFormats","resPattern","getResultantPattern","dateSeperator","getDateSeparator","ConvertDateToWeekFormat","pattern","numMapper","parserObject","patternMatch","patternMatch_1","char","weekday","monthIndex","designator","eText","era","timeZone","isNaN","intDateFormatter","matches","dateParseRegex","dObject","getCurrentDateValue","matches_1","curval","curvalstr","processNumber","curstr","curlength","substr","desig","dec","retu","timezone","getTimezoneOffset","pattern_1","hourFormat","gmtZeroFormat","getTimeZoneValue","gmtFormat","getWeekOfYear","checkTwodigitNumber","latnParseRegex","tVal","splt","curPattern","no","abs","ishour","errorText","percentSign","minusSign","NumberFormat","numberFormatter","symbolPattern","fOptions","cOptions","dOptions","numericObject","numberMapper","currencySymbol","getCurrencySymbol","defaultCurrencyCode","altSymbol","percentSymbol","minusSymbol","symbols","formatRegex","customFormat","getProperNumericSkeleton","isCurrency","isPercent","getSymbolPattern","isAccount","groupOne","checkValueRange","maximumSignificantDigits","minimumSignificantDigits","maximumFractionDigits","minimumFractionDigits","fractionDigits","defaultCurrency","nData","replaceBlazorCurrency","getFormatData","groupSeparator","groupData","getGroupingDetails","minFrac","minimumFraction","mval","maximumFraction","mfrac","lfrac","isFinite","intNumberFormatter","negativeDataRegex","lastIndexOf","primary","secondary","val1","val2","checkbothExist","isFraction","decide","dint","str1","str2","checkRange","curData","zeroData","fValue","processSignificantDigits","processFraction","minimumIntegerDigits","processMinimumIntegers","toExponential","groupNumbers","nlead","nend","tn","toPrecision","level1","sep","decimalSymbol","level2","prefix","lead","milliseconds","DateParser","dateParser","numOptions","parseOptions","hourOnly","regexString","evalposition","gmtCorrection","zCorrectTemp","isgmtTraversed","nRegx","numbers","canUpdate","charKey","optional","weekData","weekObject","monthData","hour12","periodValur","tval","tzone","hpattern","parseTimeZoneRegx","iString","parserRegex","parsedDateParts","internalDateParse","dobj","tDate","ystrig","is2DigitYear","getDateObject","setMilliseconds","tKeys","century","setFullYear","tKeys_1","tValue","setDate","pDate","lDate","lastDay","setHours","tzValue","setMinutes","retOptions","props_1","curObject","matchString","internalNumberParser","tmatch","getZoneValue","tZone","splitStr","cRegex","ival","parseRegex","groupRegex","NumberParser","numberParser","custom","symbolpattern","symbolRegex","infinity","getParsedNumber","isNegative","tempValue","Infinity","NaN","exponent","convertMaxFracDigits","decimalSplitValue","Observer","context","ranArray","boundedEvents","property","cntxt","notExist","isHandlerPresent","indexLocation","argument","successHandler","errorHandler","blazor","blazorCallback","curObject_1","objs","isTrigger","obj_1","isJson","dateReviver","dPattern","boundedEvents_1","onIntlChange","rightToLeft","cldrData","defaultCulture","Internationalization","getCulture","formatNumber","formatDate","parseDate","parseNumber","isExcelFormat","getActualDateTimeFormat","getActualNumberFormat","getFirstDayOfWeek","getWeekData","blazorCultureFormats","IntlBase","customRegex","fractionRegex","patternRegex","'","dateConverterMapper","defaultFirstDay","firstDayMapper","currencyFormatRegex","curWithoutNumberRegex","typeMapper","0","1","blazorCulture","iType","basicPatterns","tPattern","mode","calendartype","blazorDefaultObject","defaultObject","dateString","numSystem","convertMapper","tempString","curFormatMapper","patternMatcher","needFraction","cSymbol","fractionOnly","changeCurrencySymbol","groupPattern","fraction","fmatch","sym","symbol","getCurrency","formatSplit","customNumberFormat","integerPart","fractionPart","isCurrencyPercent","loc","dateObj","actualPattern","tLength","timeZonePattern","options_1","processSymbol","numrericObject","curCode","hasNegativePattern","defaultMinimum","fractionDigitsPattern","minimumIntegerPattern","groupingPattern","cPattern","minDigits","maxDigits","diff","integer","firstDay","iCulture","aCurrency","rCurrency","iCurrency","pData_1","weeknum","newYear","daynum","nYear","nday","3","4","5","C","P","N","A","E","headerRegex","defaultType","Ajax","async","emitError","eventArgs","XMLHttpRequest","onreadystatechange","stateChange","onLoad","onProgress","onprogress","onAbort","onabort","onError","onerror","onUploadProgress","upload","reason","responseText","readyState","statusText","responseHeaders","getAllResponseHeaders","REGX_MOBILE","REGX_IE","REGX_IE11","REGX_IOS","REGX_IOS7","REGX_ANDROID","REGX_WINDOWS","REGX_VERSION","REGX_BROWSER","OPERA","EDGE","CHROME","PANTHOMEJS","SAFARI","WEBKIT","MSIE","MOZILLA","browserDetails","Browser","extractBrowserDetail","browserInfo","clientInfo","userAgent","language","getEvent","events","isPointer","isTouch","move","isWindows","getTouchStartEvent","getTouchEndEvent","getTouchMoveEvent","getTouchCancelEvent","regX","uA","maxTouchPoints","isMSPointer","isWebView","cordova","PhoneGap","phonegap","forge","touchStartEvent","touchMoveEvent","touchEndEvent","touchCancelEvent","EventHandler","addOrGetEventData","__eventList","eventName","listener","bindTo","intDebounce","debounceListener","eventData","isIE","passive","clearEvents","copyData","eventProp","eventData_1","LINES","QUOTES","IF_STMT","ELSEIF_STMT","ELSE_STMT","FOR_STMT","IF_OR_FOR","CALL_FUNCTION","NOT_NUMBER","WORD","DBL_QUOTED_STR","WORDIF","exp","ARR_OBJ","SINGLE_SLASH","DOUBLE_SLASH","WORDFUNC","WINDOWFUNC","compile","argName","evalExpResult","evalExp","fnCode","varCOunt","localKeys","isClass","singleSpace","matchStr","SPECIAL_CHAR","rlStr","addNameSpace","strs","HandleSpecialCharArrObj","rlStr_1","mtc","fnStr","fNameSpace","ftArray","splRegexp","arrObj","splArrRegexp","SlashReplace","NameSpaceForspecialChar","addNS","ignoreList","emptyStrCheck","NameSpaceArrObj","arrObjReg","tempStr","double","nameSpaceNew","windowFunc","quotes","HAS_ROW","HAS_SVG","blazorTemplates","getRandomId","templateString","compiler","engineObj","component","propName","templateId","blazorTemplateId","randomId","blazorId","childNodes","updateBlazorTemplate","templateName","comp","callBack","ejsIntrop","updateTemplate","resetBlazorTemplate","templateDiv","getElementById","innerTemplates","tempId","tempElement","setTemplateEngine","classObj","getTemplateEngine","Engine","simpleRegex","multipleSplitRegex","idClassSelector","selectMapper","classRegexString","assigner","emptyElements","blockElements","inlineElement","selfClosingElements","fillAttrs","cspElement","nameMapper","startRegex","endRegex","attributeRegex","VirtualDOM","extended","ConvertHTMLToJSon","valArr","vObj","cVal","styleSplit","assignParent","childrens","detach","fromElements","toElement","prepend","vDomSelector","immediateParent","iSelector","curColl","length_2","isDescendant","parent_2","curSelector","processSelector","splitSelector","splitSelector_1","curMap","dSelector","dParent","descendent","dSelector_1","sel","descendentChild","dParent_1","iCurSelector","curParent","accessElement","curMapper","canPush","existValue","temp_1","matched","mapper_1","expected","actualValue","htmlString","isText","tagArray","nodeArray","getLastValue","iterateText","iterateEndTag","iterateStartTag","tagIndex","rest","isSelfTag","names","length_3","tagObject","parent_3","parent_4","parent_5","setStyleAttribute","SVG_REG","addClass","classes","getClassList","classList_1","curClass","removeClass","canRemove","classList_2","classes_1","classArr","isEval","docFrag","createDocumentFragment","executeScript","eleArray","script","head","iKey","needsVDOM","querySelectId","nodeList","charRegex","idList","list","splitId","setId","el","nodeType","addClasses","removeClasses","msMatchesSelector","webkitMatchesSelector","isColEName","Base","isRendered","isComplexArraySetter","allowServerDataBinding","isProtectedOnChange","changedProperties","bulkChanges","ignoreCollectionWatch","finalUpdate","childChangedProperties","modelObserver","addInstance","muteOnChange","prevDetection","serverDataBind","callChildDataBind","clearChanges","getOwnPropertyNames","newChanges","oldChanges","sfBlazor","newValue","oldValue","moduleClass","curKey","defaultValue","getObjectArray","isSetter","isFactory","curType","inst","propertyGetter","propertySetter","oldVal","complexGetter","complexSetter","complexArrayGetter","defCollection","ignore","controlParent","extendFunc","descriptor","complexArrayDefinedCallback","complexArraySetter","oldValueCollection","newValCollection","dFunc","keyString","getParentKey","model_1","getArrayModel","model","ejsAction","isControlParent","arrayFunction","modelObject","Property","propertyDescriptor","addPropertyCollection","Complex","Collection","eventDescriptor","finalContext","getParentContext","NotifyPropertyChanges","classConstructor","propertyType","propList","complexProps","colProps","propNames","complexPropNames","colPropNames","eventNames","propertyName","curText","Animation","ease","linear","easeIn","easeOut","easeInOut","elasticInOut","elasticIn","elasticOut","Animation_1","animate","getModel","elements_1","element_1","delayAnimation","animation","animationId","frameId","cancelAnimationFrame","applyAnimation","step","timerId","prevTimeStamp","startAnimation","avg","timingFunction","progress","requestAnimationFrame","performance","now","newProp","oldProp","rippleEffect","rippleOptions","rippleModel","getRippleModel","rippleFlag","isRippleEnabled","rippleHandler","rippleUpHandler","rippleLeaveHandler","isCenterRipple","sqrt","rippleElement","transform","removeRipple","rippleElements","opacity","lastPageID","MODULE_SUFFIX","ModuleLoader","loadedModules","inject","requiredModules","moduleList","reqLength","clearUnusedModule","modl","moduleList_1","modName","member","isModuleLoaded","moduleObject","memberName","getMemberName","isProperty","loadedModule","clean","usedModules","arg","removableModule","removableModule_1","mod","ChildProperty","parentObj","isParentArray","updateChange","updateTimeOut","changeTime_1","clearUpdate","curIndex","restrictServerDataBind","isSaveChanges","parentKey","complexKeys","isFinal","actionProperty","valueLength","componentCount","lastHistoryLen","versionBasedStatePersistence","Component","needsID","isReactHybrid","moduleLoader","localObserver","detectFunction","enablePersistence","setPersistData","preRender","injectModules","accessMount","mount","getRootElement","actualElement","getLocalData","eleId","ej2StatePersistenceVersion","mergePersistData","renderComplete","wrapperElement","event_2","injectedModules","Inject","isVDOM","triggerStateChange","currentContext","calls","getPersistData","renderReactTemplates","clearTemplate","isHistoryChanged","pageID","history","addOnPersist","persistObj","objValue","getActualProperties","ignoreOnPersist","iterateJsonProperties","newObj","newList","this_1","defaultPosition","isDraggedObject","isDragged","Position","Draggable","dragLimit","Draggable_1","getDefaultPosition","borderWidth","diffX","prevLeft","prevTop","dragProcessStarted","tapHoldTimer","externalInitialize","diffY","parentScrollX","parentScrollY","droppables","toggleEvents","scope","isUnWire","handle","enableTapHold","mobileInitialize","initialize","evt","currentTarget","removeTapholdTimer","tapHoldThreshold","getScrollableParent","scroll","client","tempScrollHeight","tempScrollWidth","getScrollableValues","curTarget","currentStateTarget","isDragStarted","abort","abortSelectors","changedTouches","intCoord","getCoordinates","initialPosition","clientX","clientY","relativeXPosition","relativeYPosition","intDragStart","intDestroy","isPreventSelect","isChangeTouch","intCordinate","styleProp","margin","marginLeft","marginTop","marginRight","marginBottom","intClosest","isReplaceDragEle","currentStateCheck","calculateParentPosition","getMousePosition","isDragScroll","getHelperElement","dragTargetElement","helperElement","parentClientRect","getProperTargetElement","bindDragEvents","dragArea","setDragArea","enableTailMode","posValue","getProcessedPositionValue","dragElePosition","getDragPosition","intDrag","intDragStop","setGlobalDroppables","elementInViewport","pageYOffset","pageXOffset","queryPositionInfo","rect","docHeight","getDocumentWidthHeight","docWidth","eleObj","checkTargetElement","hoverObject","triggerOutFunction","dragData","intOver","tLeft","tTop","pagex","pagey","dLeft","dTop","skipDistanceCheck","helperWidth","helperHeight","draEleTop","draEleLeft","iTop","iLeft","tempDraEleTop","dragValue","enableAutoScroll","scrollIntoView","intOut","docBody","docEle","dragStopCalled","intDrop","eleWidthBound","eleHeightBound","elementArea","tborder","tpadding","lowerKey","prevStyle","pointerEvents","elementFromPoint","oldEle","isdragscroll","dragEle","srcElement","isOffsetParent","cursorAt","draggable","draggedElement","dropIns","getDropInstance","eleInst","eleInst_1","Droppable","mouseOver","area","isDrag","isDropArea","canDrop","coord","KeyboardEvents","isAltKey","altKey","isCtrlKey","ctrlKey","isShiftKey","shiftKey","curkeyCode","which","keyConfigs","configCollection","configCollection_1","rconfig","rKeyObj","KeyboardEvents_1","getKeyConfigData","keyAction","unwireEvents","configCache","keyData","Number","getKeyCode","keyVal","L10n","controlName","localeStrings","setLocale","intLocale","intGetControlConstant","currentLocale","localeObject","SwipeSettings","swipeRegex","Touch","touchAction","tapCount","startEvent","point","updateChangeTouches","isTouchMoved","movedDirection","startPoint","lastMovedPoint","startEventData","hScrollLocked","vScrollLocked","tStampStart","timeOutTapHold","tapHoldEvent","moveEvent","endEvent","cancelEvent","movedPoint","eScrollArgs","calcScrollPoints","scrollArg","startEvents","originalEvent","startX","startY","distanceX","distanceY","scrollDirection","velocity","getVelocity","timeOutTap","swipeFn","tap","tapThreshold","modeclear","isFirefox","endPoint","calcPoints","swipeArgs","swipeDirection","eSwipeArgs","tDistance","swipeSettings","swipeThresholdDistance","defaultArgs","canTrigger","scrollBool","isScrollable","moved","checkSwipe","modeClear","lastTapTime","eleStyle","eTapArgs","pnt","newX","newY","newT","xDist","yDist","removeTags","removeAttrs","jsEvents","SanitizeHtmlHelper","beforeSanitize","selectors","sanitize","output","serializeValue","wrapElement","removeXssTags","removeJsEvents","removeXssAttrs","tempEleValue","removeElement","nodes","localName","attr","hasAttribute","RowRenderer","isSpan","rowTemplate","refreshRow","isChanged","refreshMergeCells","tr","cells_1","rowArgs","cellArgs","attrCopy","chekBoxEnable","isSelected","isCheckBoxSelection","checkAllRows","buildAttributeFromRow","cellRendererFact","isColumnSelected","cellRenderer","getCellRenderer","DetailExpand","td","Filter","CommandColumn","requestTypeAction","isRowSpanned","prevRowCells","uid_1","prevRowCell","rowSpanRange","cellSpan","cellMerge","isSpanned","rowHeight","lazyLoadCssClass","vFTable","frozenColumns","summarycell","lastSummaryCell","firstSummaryCell","isAltRow","rowindex","dataUID","ariaSelected","RowModelGenerator","getInfiniteIndex","generateRow","ensureColumns","generateCell","RowDragIcon","pid","tIndex","parentGid","enableAltRow","selectionModule","checkBoxState","selectedRowIndexes","refreshForeignKeyRow","generateCells","foreignKeyColumns","dummies","oIndex","refreshRows","CellType","RenderType","ToolbarItem","ResponsiveDialogAction","ResponsiveToolbarAction","_vm","_self","staticClass","closeCardAnimationDemo","_v","directives","rawName","expression","formData","fromDate","callback","$$v","$set","errors","_s","toDate","reportDropdown","populateData","report","isTankHidden","DropdownData","tank","loadFamsInformation","staticRenderFns","Vue","use","GridPlugin","Grid","Sort","Search","Page","Toolbar","PdfExport","famsURL","_famsURL","toolbarOptions","columnsSelecteds","activePrompt","activePromptSubGrid","formats","cellAutoWidth","selectedFormat","headerTitle","headerVal","itemsPerPage","componentKey","famsDBData","famsHeaders","famsDBDataSelected","sidebarData","isMounted","selectionOptions","localColforGrid","aggregateColumn","PivottableUsageDetailMasterCostReg","PivotReceiveManualPerTank","PivotReceiveManualPerStore","PivotTransferDetail","PivotTransfer","PivotCostCentreDetail","PivotCostCentre","PivotRegistration","PivotStoreRegistration","PivotStoreMobile","PivotStoreFix","PivotStore","PivotATGClose","PivotATGOpen","PivotATGAll","ATGVSConsumption","provide","Selection","components","flatPickr","vSelect","Datepicker","computed","$refs","gridTable","currentx","mounted","GetDropdownTanks","clearFields","methods","self","isGridHidden","newElement","whenDone","response","onFinally","$ajaxGet","alert","isActive","pad","forceRerender","GetGrid","$vs","iconPack","formatJson","filterVal","jsonData","filename","card","removeRefreshAnimation","pdfExportComplete","excelExportComplete","rowSelected","getSelectedRecords","toolbarClick","pdfExport","excelExport","csvExport","myobject","ClientKey","AccountKey","fromdate","todate","showLoadingOnElement","allowExcelExport","allowPdfExport","selectionSettings","scrollSettings","loading","submit","$el","$ajaxPost","successNotifyGridExpanded","successNotifyDataLoad","successNotify","FailedNotify","scale","getTextNode","childnode","createCheckBox","enableRipple","rippleSpan","frameSpan","labelSpan","TOUCHEND_HIDE_DELAY","TAPHOLD_THRESHOLD","SHOW_POINTER_TIP_GAP","HIDE_POINTER_TIP_GAP","MOUSE_TRAIL_GAP","POINTER_ADJUST","ROOT","DEVICE","ICON","CLOSE","TOOLTIP_WRAP","CONTENT","ARROW_TIP","ARROW_TIP_OUTER","ARROW_TIP_INNER","TIP_BOTTOM","TIP_TOP","TIP_LEFT","TIP_RIGHT","POPUP_ROOT","POPUP_OPEN","POPUP_CLOSE","POPUP_LIB","HIDE_POPUP","Tooltip","isBlazorTooltip","contentTargetValue","contentEvent","contentAnimation","formatPosition","isServerRender","tooltipPositionY","tooltipPositionX","renderArrow","setTipClass","tip","tooltipEle","tipClass","renderPopup","elePos","mouseTrail","getTooltipPosition","popupObj","openPopupHandler","closePopupHandler","offsetPos","calculateTooltipOffset","collisionFlipFit","reposition","needTemplateReposition","findTarget","tooltipEventArgs","tooltipEleWidth","tooltipEleHeight","arrowEle","tipWidth","tipHeight","tipAdjust","showTipPointer","tipHeightAdjust","tipWidthAdjust","updateTipPosition","selEle","removeList","adjustArrow","leftValue","topValue","tooltipWidth","tooltipHeight","arrowInnerELe","tipPosExclude","tipPointerPosition","renderContent","tooltipContent","HTMLElement","enableHtmlSanitizer","enableHtmlParse","templateFunction","tempArr","isBlazorTemplate","renderCloseIcon","isSticky","tipClose","onStickyClose","addDescribedBy","describedby","removeDescribedBy","orgdescribedby","tapHoldHandler","autoCloseTimer","targetHover","touchEndHandler","targetClick","hideTooltip","closeDelay","targetList","ctrlId","targetList_1","target_1","restoreElement","showTooltip","showAnimation","showTimer","hideTimer","isInteracted","observeCallback","beforeRenderArgs","beforeRenderCallback","isBlazorTooltipRendered","interopAdaptor","invokeMethodAsync","beforeRenderBlazor","afterRenderBlazor","contentUpdated","ctrlObj","maxWidth","observedArgs","beforeOpenCallback","openAnimation_1","openDelay","onMouseMove","wireMouseEvents","tooltip","checkCollision","affectedPos","checkCollideTarget","newpos","collidedPosition","eleOffset","arrowleft","windowCollision","hideAnimation","targetElement","hide","isTooltipOpen","tooltipHide","blazorHide","popupHide","proxy","closeAnimation","unwireMouseEvents","tooltipHover","tooltipMouseOut","onMouseOut","enteredElement","relatedTarget","checkForTooltipElement","tooltipElementMouseOut","eventPageX","eventPageY","colpos","keyDown","touchEnd","scrollHandler","opensOn","triggerList","getTriggerList","triggerList_1","wireFocusEvents","touchModule","tapHold","targetList_2","triggerList_2","unwireFocusEvents","targetList_3","triggerList_3","HeaderRender","frzIdx","notfrzIdx","isFirstCol","headercelldiv","getStackedHeaderColumnByHeaderText","lockColumn","colIndex","getColumnIndexByField","lineHeight","ariaService","getFrozenLeftColumnsCount","getFrozenRightColumnsCount","colPosRefresh","renderCustomToolbar","rowRenderingMode","updateCustomResponsiveToolbar","renderPanel","innerDiv","toggleStackClass","setPanel","renderTable","getPanel","createHeaderTable","setTable","initializeHeaderDrag","initializeHeaderDrop","headerPanel","panel","getTable","headerTable","getColGroup","colgroup","setColGroup","colGroup","getRows","tHead","skipDom","createTable","createHeader","tableEle","cellspacing","tblName","getFrozenLeftCount","findHeaderRow","createHeaderContent","thead","bodyCell","rowBody","Header","len_1","updateColGroup","frozenMode","colHeader","rowRenderer","getHeaderCells","colFreezeMode","pop","indexes","getColumnIndexesInView","isXaxis","len_2","RowDragHIcon","lockcolPositionCount","lockColsRendered","appendCells","isFirstObj","isLastCol","isMovable","lastCol","isLockColumn","isFrozenLockColumn","scrollbar","getCellCnt","stackedLockColsCount","getStackedLockColsCount","isStackedLockColumn","isFrozenStack","ensureStackedFrozen","StackedHeader","getColSpan","isFirstCol_1","isLaststackedCol","inViewIndexes","getColumnIndexByUid","isTrue","lockColsCount","getFrozenColSpan","displayVal","clen","getNormalizedColumnIndex","normalizedfrzCols","mTblColGrp","mTbl","refreshUI","freezeReorder","isVFTable","setFrozenTable","getVirtualFreezeHeader","appendContent","updateDefaultCursor","gCells","allowTextWrap","textWrapSettings","wrapMode","stackedHdr","toolbarItems","toolbarLeft","toolbarItem","onclick","showResponsiveCustomSort","showResponsiveCustomFilter","resToolbar","HeaderCellRenderer","hTxtEle","sortEle","gui","chkAllBox","getGui","fltrMenuEle","prepareHeader","hValueAccer","ariaAttr","innerDIV","headerValueAccessor","checkAllWrap","buildAttributeFromCell","appendHtml","matchFlColumns","customAttributes","extendPrepareHeader","gridObj","headerTempID","clipMode","matchFilteredColumns","innerHtml","StackedHeaderCellRenderer","toolTip","IndentCellRenderer","GroupCaptionCellRenderer","fKeyValue","captionTemplate","localizer","tempID","GroupCaptionEmptyCellRenderer","ExpandCellRenderer","HeaderIndentCellRenderer","DetailHeaderIndentCellRenderer","DetailExpandCellRenderer","RowDragDropRenderer","nodeElement","RowDragDropHeaderRenderer","Render","emptyGrid","counter","renderer","headerRenderer","getRenderer","contentRenderer","Content","isLayoutRendered","emptyRow","refreshDataManager","preventUpdate","resetTemplates","editSettings","tempPreventUpdate","commandDelIndex","tempSelectedRecord","dataLength","totalRecordsCount","prevPageMoving","ceil","pagerModule","pagerObj","getGroupCache","refreshContentRows","detailTemplateID","toolbarTemplate","refreshComplete","isFActon","isNeedForeignAction","deffered_1","disablePageWiseAggregates","validateGroupRecords","dataManagerFailure","deferred","fbool","sendBulkRequest","dmSuccess","dmFailure","renderEmptyRow","spanCount","colspan","dynamicColumnChange","updateColumnType","cFormat","equalTo","fmtr","validationRules","isColTypeDef","isServerDateMap","actionArgs","isInfiniteDelete","infiniteScrollSettings","enableCache","isInfiniteEnd","prevCurrentView","updatesOnInitialRender","isInitialLoad","enableImmutableMode","immutableModeRendering","setRowElements","setRowObjects","setRowCount","dataRowCount","buildColumns","isAutoGen","iterateComplexColumns","childKeys","complexCols","instantiateRenderer","addRenderer","cellrender","addCellRenderer","GroupCaption","GroupCaptionEmpty","Expand","group0","groupN","addWhere","curDm","curFilter","rPredicate","updateGroupInfo","untouched","uGroup","itemGroup","uGroupItem","data_1","customAggregate","CellRendererFactory","cellRenderMap","ResponsiveDialogRenderer","sortedCols","sortPredicate","closeCustomDialog","setCustomFilterHeader","refreshCustomFilterOkBtn","renderResponsiveContextMenu","renderCustomFilterDiv","customExFilterClose","refreshCustomFilterClearBtn","onActionCompleteFn","editComplate","isCustomDlgRender","customResponsiveDlg","closeBtn","filterModule","saveBtn","backBtn","customExcelFilterParent","isFilter","isOpen","filterClearBtn","getHeaderTitle","renderResponsiveContent","filterParent","customColumnDiv","sortBtnParent","filteredCols","cDiv","isSort","getSortedFieldsAndDirections","sortButtonClickHandler","divIcon","iconSpan","customFilterColumnClickHandler","columndiv","allowMultiSorting","isSortApplied","resetSortButtons","setSortedCols","getCurrentSortedFields","isRowResponsive","showResponsiveDialog","colDiv","isDialogClose","clearCustomFilter","removeCustomDlgFilterEle","filteredCol","renderResponsiveDialog","enableAdaptiveUI","setFilterModel","createOptions","setTopToChildDialog","renderCustomFilterDialog","customFilterDlg","dialogEle","top_1","outerDiv","getDialogOptions","isCustomFilter","isModal","showCloseIcon","closeOnEscape","adaptiveDlgTarget","beforeDialogClose","renderResponsiveHeader","sortField","closeResponsiveDialog","closeCustomFilter","keyHandler","clearSorting","primaryKeyValue","isAdd","getDialogName","getButtonText","titleDiv","dialogHdrBtnClickHandler","id_1","clearBtn","clearFiltering","filterClear","applyCustomFilter","mainfilterdiv","destroyCustomFilterDialog","customEle","ServiceLocator","services","register","registerAdaptiveService","isAdaptiveUI","responsiveDialogRenderer","RendererFactory","rendererMap","rName","PageSettings","ColumnChooserSettings","ShowHide","showBy","getToggleFields","hideBy","finalized","getKeyBy","columnModel","changedStateColumns","showHideArgs","currentViewCols","emptyVcRows","persistSelection","clearSelection","colsInCurrentView","col1","col2","AggregateColumn","getTemplate","setPropertiesSilent","AggregateRow","Clipboard","copyContent","isSelect","keyDownHandler","pasteHandler","isMacLike","platform","metaKey","cellSelectionMode","clipBoardTextArea","x_1","scrollX","y_1","scrollY","scrollTo","paste","getSelectedRowCellIndexes","cellIndexes","isAvail","rIdx","mRows","frRows","dataRows","getMovableDataRows","getFrozenRightDataRows","getRowByIndex","getCellFromIndex","fTr","mTr","frTr","getColumnByIndex","editModule","updateCell","selectCellsByRange","setCopyData","withHeader","getSelection","getFrozenRightRows","selectedIndexes","headerTextArray","getCopyData","checkBoxSelection","colIndexes","getColumnHeaderByIndex","rowIndexes","setSelectionRange","isCell","splitKey","isElement","queryCommandSupported","execCommand","blur","removeAllRanges","rowCellIndxes","gridObserver","BlazorAction","virtualHeight","onDetailRowClick","addDeleteSuccess","editSuccess","setColumnVisibility","setServerOffSet","modelChanged","onGroupClick","setColVTableWidthAndTranslate","invokeServerDataBind","contentColGroup","dataSourceModified","currentAction","editArgs","rIndex","gridRowId","gridRow","isDetailRow","virtualContentModule","activeKey","blzRowIndex","selectRow","preventScroll","blazorDataLoad","foreignColumnsData","aggRows","aggRow","rowUid","offsetTime","sign","setClientOffSet","batchChanges","getMediaColumns","setVirtualHeight","removeDisplayNone","renderedContentRows","renderedContentCells","setVirtualTrackHeight","VisibleGroupedRowsCount","prevInfo","columnIndexes","translateX","getColumnOffset","startColIndex","endColIndex","virtualEle","setWrapperWidth","adjustTable","dataSourceChanged","refreshOffsets","refreshVirtualElement","serverTimezoneOffset","serverTimeZone","exactTopIndex","rowElements","mergePersistGridData","resetPersistData","parseArgs","persistArgs","contentTable","movableContentTable","movableHeaderTable","dataFailure","SortDescriptor","SortSettings","InfiniteScrollSettings","FilterSettings","SelectionSettings","SearchSettings","RowDropSettings","TextWrapSettings","ResizeSettings","GroupSettings","EditSettings","keyA","frozenRightCount","frozenLeftCount","tablesCount","movableCount","visibleFrozenLeft","visibleFrozenRight","visibleMovable","frozenLeftColumns","frozenRightColumns","movableColumns","media","isFreezeRefresh","tableIndex","componentRefresh","isVirtualAdaptive","vRows","vcRows","vGroupOffsets","pageTemplateChange","mediaBindInstance","asyncTimeOut","enableLogger","Grid_1","keyEntity","selectedRowIndex","scrollPosition","currentObject","pagerTemplate","setFrozenCount","allowRowDragAndDrop","isDetail","isCommandColumn","allowAdding","allowDeleting","extendRequiredModules","contextMenuItems","showColumnChooser","isForeignKeyEnabled","initProperties","initializeServices","mediaCol","isExpanded","isPersistSelection","filterOperators","equal","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","notEqual","startsWith","defaultLocale","EmptyRecord","True","False","InvalidFilterMessage","GroupDropArea","UnGroup","UnGroupButton","GroupDisable","FilterbarTitle","EmptyDataSourceError","Add","Edit","Cancel","Update","Delete","Pdfexport","Excelexport","Wordexport","Csvexport","Columnchooser","Save","Item","EditOperationAlert","DeleteOperationAlert","SaveButton","OKButton","CancelButton","EditFormTitle","AddFormTitle","BatchSaveConfirm","BatchSaveLostChanges","ConfirmDelete","CancelEdit","ChooseColumns","SearchColumns","Matchs","FilterButton","ClearButton","StartsWith","EndsWith","Contains","Equal","NotEqual","LessThan","LessThanOrEqual","GreaterThan","GreaterThanOrEqual","ChooseDate","EnterValue","Copy","Ungroup","autoFitAll","AutoFitAll","AutoFit","Export","FirstPage","LastPage","PreviousPage","NextPage","SortAscending","SortDescending","EditRecord","DeleteRecord","FilterMenu","SelectAll","Blanks","FilterTrue","FilterFalse","NoResult","ClearFilter","Clear","NumberFilter","TextFilter","DateFilter","DateTimeFilter","MatchCase","Between","CustomFilter","CustomFilterPlaceHolder","CustomFilterDatePlaceHolder","AND","OR","ShowRowsWhere","FilterMenuDialogARIA","ExcelFilterDialogARIA","DialogEditARIA","ColumnChooserDialogARIA","ColumnMenuDialogARIA","CustomFilterDialogARIA","SortAtoZ","SortZtoA","SortByOldest","SortByNewest","SortSmallestToLargest","SortLargestToSmallest","downArrow","upArrow","rightArrow","leftArrow","shiftDown","shiftUp","shiftRight","shiftLeft","home","escape","ctrlHome","ctrlEnd","pageUp","pageDown","ctrlAltPageUp","ctrlAltPageDown","altPageUp","altPageDown","altDownArrow","altUpArrow","ctrlDownArrow","ctrlUpArrow","ctrlPlusA","ctrlPlusP","delete","f2","enter","ctrlEnter","shiftEnter","tab","shiftTab","space","ctrlPlusC","ctrlShiftPlusH","ctrlSpace","ctrlLeftArrow","ctrlRightArrow","searchModule","checkLockColumns","processModel","gridRender","addListener","updateStackedFilter","gcol","getShowHideService","hideAtMedia","pushMediaColumn","matchMedia","mediaQueryUpdate","updateMediaColumns","mediaColumn","invokedFromMedia","showHider","refreshMediaCol","footerContent","checkboxColumn","checkboxMode","enableHover","removeMediaListener","removeListener","eventInitializer","hasGridChild","destroyDependentModules","toolTipObj","keyboardModule","enableBoxSelection","enableAutoFill","checkCursor","requireRefresh","requireGridRefresh","isEllipsisTooltip","updateColumnObject","properties_1","updateAutoFillPosition","rowTemplateFn","detailTemplateFn","extendedPropertyChange","maintainSelection","updateRTL","getToolbar","contextMenuModule","getContextMenu","columnMenuModule","getColumnMenu","showFilterBarOperator","updateResizeLines","updateGridLines","columnMenuItems","applyTextWrap","removeTextWrap","case","isModeChg","pending_1","getPrototypeOf","deepWatch","pKeyField","setRowData","gResult","scrollRefresh","isSelectedRowIndexUpdating","setWidthToTable","enableVerticalRendering","fn_1","refreshFilter","setTablesCount","frozenCols","frozenLeft","frozenRight","getTablesCount","headerCells","stdHdrCell","updateColumnModel","updateColumnLevelFrozen","updateFrozenColumns","updateLockableColumns","leftCols","rightCols","movableCols","directFrozenCount","totalFrozenCount","frozenName","frozenCount","isRefresh","inview","vLen","ensureFrozenCols","stackedHeader","individualColumn","stackedColumn","getLocaleConstants","setColumnIndexesInView","setGridHeaderContent","setGridContentTable","setGridContent","setGridHeaderTable","footerElement","getFooterContentTable","getPager","gridPager","setGridPager","getMovableRowByIndex","getFrozenRowByIndex","getFrozenDataRows","getRowElements","getFrozenRightRowByIndex","getRowInfo","getMovableRows","rowsObject","getMovableRowElements","getFrozenRightRowElements","getAllDataRows","includeAdd","getFrozenLeftContentTbody","hdrTbody","freezeRows","addMovableRows","generateDataRows","fRows","mrows","includAdd","dRows","getAllMovableDataRows","getAllFrozenDataRows","getAllFrozenRightDataRows","setCellValue","fieldIdx","rowuID","pkName","selectedRow","movableSelectedRow","rowObjects","movableRowObjects","sRow","mRow","refreshTD","columnUid","rowsObj","getMovableCellFromIndex","getFrozenRightCellFromIndex","getMovableColumnsCount","getMovableColumnHeaderByIndex","getMovableVirtualHeader","getFrozenRightColumnHeaderByIndex","getFrozenRightHeader","getFrozenLeftColumnHeaderByIndex","getFrozenVirtualHeader","isFrozenRight","getMovableRowsObject","getFrozenRightRowsObject","getStackedColumns","getUidByColumnField","rowDropSettings","targetID","getColumnFieldNames","columnNames","getRowTemplate","getDetailTemplate","getEditHeaderTemplate","editHeaderTemplateFn","getEditFooterTemplate","editFooterTemplateFn","getSelectedRows","selectedRecords","selectedRowCellIndexes","getSelectedColumnsUid","selectedColumnsIndexes","showColumns","hideColumns","getFrozenCount","splitFrozenCount","getVisibleFrozenLeftCount","getVisibleFrozenRightCount","getVisibleMovableCount","getFrozenRightColumns","getFrozenLeftColumns","getMovableColumns","getVisibleFrozenColumns","getVisibleFrozenColumnsCount","getVisibleFrozenCount","getFilterUIInfo","visibleFrozenColumns","goToPage","pageNo","updateExternalMessage","isMultiSort","sortModule","removeSortColumn","filterByColumn","filterOperator","filterValue","actualFilterValue","actualOperator","removeFilteredColsByField","isClearFilterBar","isToggle","selectRows","selectCell","searchString","fieldname","startEdit","closeEdit","deleteRow","editCell","saveCell","updateRow","getBatchChanges","enableToolbarItems","enableItems","clipboardModule","recalcIndentWidth","indentWidth","headerCol","contentCol","perPixel","parentOffset","applyWidth","newWidth","resetIndentWidth","minWidth","tgridWidth","getTableWidth","setMinwidthBycalculation","refreshFrozenScrollbar","reorderColumns","fromFName","toFName","reorderModule","reorderColumnByIndex","reorderColumnByTargetIndex","fromIndexes","rowDragAndDropModule","refreshDataSource","disableRowDD","disValue","autoFitColumns","resizeModule","createColumnchooser","columnChooserModule","renderColumnChooser","valueFormatterService","sCols","sLen","parentDetails","parentKeyFieldValue","queryString","initForeignColumn","rendererFactory","createGridPopUpElement","createTooltip","dataReady","popup","tabIndex","gridLines","getTooltipStatus","headerDivTag","htable","ctable","mouseMoveHandler","prevElement","elemNames","hoverFrozenRows","myTableDiv","cssText","mySubDiv","myTable","myTr","mytd","onKeyPressed","mouseClickHandler","focusOutHandler","dblClickHandler","allowKeyboard","keyActionHandler","tapEvent","dataBoundFunction","blazorTemplate","isChildGrid","checkEdit","clonedColumn","ariaOwns","keyPress","editFormValidate","persistedData","dataObj","mergeColumns","storedColumn","storedColumns","localCol","tCol","this_2","presskey","stopImmediatePropagation","collapse","focusHeader","addOutline","focusContent","refreshColumns","fCnt","frCnt","isColFrozen","getMovableContent","frTbl","getFrozenRightContent","colGrp","excelExportModule","pdfExportProperties","pdfDoc","pdfExportModule","groupModule","groupExpandAll","groupCollapseAll","openColumnChooser","detailCollapseAll","detailRowModule","detailExpandAll","clearCellSelection","clearRowSelection","selectCells","rowCellIndexes","selectRowsByRange","isContextMenuOpen","ensureModuleInjected","propertyNames","loggerModule","applyBiggerTheme","getPreviousRowData","previousRowData","hideScroll","mvblScrollBar","mvblChild","getRowIndexByPrimaryKey","pKvalue","getFilteredRecords","getUserAgent","timer","getMovableVirtualContent","getFrozenVirtualContent","rowEle","frozenRigtRows","frHdr","cntRows","getHiddenColumns","calculatePageSizeByParentHeight","pagesize","nonContentHeight","getNoncontentHeight","contentHeight","getSummaryValues","summaryCol","summaryData","serverExcelExport","exportGrid","serverPdfExport","gridModel","getFormat","setHeaderText","form","gridInput","updateRowValue","setForeignKeyData","colpending","resetFilterDlgPosition","filterDlg","gClient","fClient","portals","processRowChanges","batchAsyncUpdate","processBulkRowChanges","dataToBeUpdated","loopstring","assign","setNewData","oldValues","bulkRefresh","deleteRowElement","mtr","out_i_1","this_3","_loop_4","isRowExist","this_4","renderRowElement","mTbody","modelData","addRowObject","moveTbody","getHeight","isInteger","getMovableHeaderTbody","getMovableContentTbody","getFrozenHeaderTbody","getFrozenRightHeaderTbody","getFrozenRightContentTbody","showCustomFilter","CellRenderer","rowChkBox","evaluate","fData","literals","templateID","rNumber","invokeFormatter","refreshCell","parentRow","newTD","cloneAttributes","displayAsCheckBox","localeStr","fromFormatter","checkWrap","setAttributes","isCheckBoxType","isTemplate","colindex","NumericContainer","pagerElement","renderNumericContainer","refreshNumericLinks","updateTotalPages","updateLinksHtml","updateStyles","link","frag","renderFirstNPrev","renderPrevPagerSet","renderNextPagerSet","renderNextNLast","pagerContainer","prevPager","PP","nextPager","NP","next","previousPageNo","currentPageSet","totalPages","customText","updateFirstNPrevStyles","updatePrevPagerSetStyles","updateNextPagerSetStyles","updateNextNLastStyles","firstPage","firstPageDisabled","prevPage","prevPageDisabled","lastPage","lastPageDisabled","nextPage","nextPageDisabled","PagerMessage","pageNoMsgElem","pageCountMsgElem","hideMessage","showMessage","regx","Pager","hasParent","enableExternalMessage","checkpagesizes","defaultConstants","currentPageInfo","totalItemsInfo","totalItemInfo","firstPageTooltip","lastPageTooltip","nextPageTooltip","previousPageTooltip","nextPagerTooltip","previousPagerTooltip","pagerDropDown","pagerAllDropDown","CurrentPageInfo","TotalItemsInfo","FirstPageTooltip","LastPageTooltip","NextPageTooltip","PreviousPageTooltip","NextPagerTooltip","PreviousPagerTooltip","PagerDropDown","PagerAllDropDown","All","containerModule","pagerMessageModule","isReactTemplate","initLocalization","renderFirstPrevDivForDevice","enablePagerMessage","renderNextLastDivForDevice","pagerdropdownModule","addAriaLabel","externalMessageModule","checkGoToPage","currentPageChanged","setDropDownValue","setPageSize","pageSizes","newPageNo","oldPageNo","enableQueryString","updateQueryString","getPagerTemplate","updatedUrl","getUpdatedURL","pushState","uri","prevString","activeClass","prevElementId","incrementalSearch","selectedIndex","elementId","listItems","strLength","li","ul","hasChild","collapsible","iconWrapper","anchorWrap","navigable","getFieldValues","dataItem","fieldData","dataField","ListBase","defaultMappedFields","isChecked","iconCss","hasChildren","htmlAttributes","urlAttributes","imageAttributes","imageUrl","groupBy","defaultAriaAttributes","listRole","itemRole","groupItemRole","itemText","wrapperRole","defaultListBaseOptions","showCheckBox","showIcon","ariaAttributes","listClass","itemClass","processSubChild","sortOrder","groupTemplate","expandIconClass","expandIconPosition","itemNavigable","createList","isSingleLevel","componentInstance","curOpt","typeofData","typeof","createListFromArray","createListFromJson","subChild","createListItemFromArray","generateUL","getModuleClass","generateId","itemCreating","generateSingleLevelLI","generateLI","itemCreated","createListItemFromJson","checkboxElement","anchorElement","curItem","innerEle","imageElemnt","iconElement","getSiblingLI","elementArray","isPrevious","siblingLI","liIndex","liCollections","groupDataSource","curFields","cusQuery","addSorting","getDataSource","itemObj","grpItem","hdr","newtext","_id","createJsonFromElement","curEle","jsonAr","childs","i_1","hasChildNodes","attributes_1","getAllAttributes","elementAttributes","nodeName","nodeValue","renderContentTemplate","ulElement","compiledString","liCollection","currentID","groupTemplateID","renderGroupTemplate","headerItems","headerItems_1","headerData","subDS","subLi","expandElement","innerElements","grpLI","elementID","anchorTag","createTextNode","isFullNavigation","anchorWrapper","uID","blazId","removeBlazorID","liElement","generateIcon","FieldSettings","dropDownBaseClasses","root","hover","noData","fixedHead","ITEMTEMPLATE_PROPERTY","VALUETEMPLATE_PROPERTY","GROUPTEMPLATE_PROPERTY","HEADERTEMPLATE_PROPERTY","FOOTERTEMPLATE_PROPERTY","NORECORDSTEMPLATE_PROPERTY","ACTIONFAILURETEMPLATE_PROPERTY","DropDownBase","preventChange","isPreventChange","getPropObject","newProperty","oldProperty","getValueByText","listData","checkValueCase","isTextByValue","typeOfData","checkingAccent","checkIgnoreCase","getItemValue","checkNonIgnoreCase","itemValue","ignoreDiacritics","textItem","typedText","getFormattedValue","templateCompiler","baseTemplate","checkTemplate","exception","l10nUpdate","noRecordsTemplate","actionFailureTemplate","DropDownBaseresetBlazorTemplates","actionFailureTemplateId","noRecordsTemplateId","tempaltecheck","noDataCompTemp","DropDownBaseupdateBlazorTemplates","l10nLocale","componentLocale","getLocaleName","liElem","getTextByValue","enableRtlElements","bindEvent","jsonElement","resetList","renderItemsBySelect","setListData","noRecord","itemTemplateId","groupTemplateId","valueTemplateId","headerTemplateId","footerTemplateId","updateDataAttribute","invalidAttr","getJSONfromOption","optionGroup","updateFields","scrollTimer","isRequested","isDataFetched","emptyDataRequest","renderItems","bindChildItems","onActionFailure","localDataArgs","childNode","remainingItems","sortedData","updateListValues","raiseDataBound","findListElement","findNode","listArr","dataBoundEventArgs","spliceData","listElements","templateListItem","listOption","fixedHeaderElement","postRender","listElement","focusItem","selectedItem","listEle","groupcheck","groupValue","createListItems","getSortedDataSource","fieldValues","setFloatingHeader","setFixedHeader","zIndex","scrollStop","liHeight","topIndex","currentLi","isTempEmpty","itemcheck","listDataType","isNullData","defaultView","liWidth","firstLi","textField","getIndexByValue","getItems","setFields","selectData","updateSelectElementData","isFiltering","updateSelection","renderList","setUpdateInitial","updateData","setZIndex","isEmptyData","rippleFun","isGroupChecking","itemIndex","itemsCount","selectedItemValue","addItemTemplate","updateActionCompleteData","updateAddItemList","listGroupItem","tempLi","updateDataList","validationAttribute","hidden","itemCount","getDataByValue","dropDownListClasses","disable","inputFocus","iconAnimation","device","backIcon","filterBarClearIcon","filterInput","mobileFilter","clearIcon","clearIconHide","popupFullScreen","disableIcon","hiddenElement","DropDownList","previousValue","isListSearched","checkBlazor","isServerBlazor","initializeData","activeIndex","isPopupOpen","isDocumentClick","isFilterFocus","beforePopupOpen","initRemoteRender","isNotSearchList","isTyped","preventFocus","preventAutoFill","isValidKey","typedString","isEscapeKey","isPreventBlur","isTabKey","actionCompleteData","isUpdated","prevSelectPoints","isSelectCustom","isDropDownClick","preventAltUp","isSecondClick","keyConfigure","down","up","unWireListEvents","wireListEvents","floatLabelChange","floatElement","inputWrapper","resetHandler","clearAll","resetFocusElement","removeHover","removeSelection","removeFocus","resetSelection","getItemData","onChangeEvent","selectedLI","itemData","valueTempElement","setSelection","cloneElements","setHTMLAttributes","htmlAttr","updatedClassValue","setEnable","defaultAttr","validateAttr","getAriaAttributes","hidePopup","preventTabIndex","getNgDirective","getElementByText","getElementByValue","listItems_1","liItem","initValue","updateValues","setHiddenValue","onBlur","isFilterLayout","focusOutAction","focusOut","onFocusOut","onFocus","resetValueHandler","formElement","wireEvent","dropDownClick","focusIn","bindCommonEvent","mobileKeyActionHandler","bindClearEvent","unBindCommonEvent","onMouseClick","onMouseOver","onMouseLeave","charCode","isServerIncrementalSearch","searchKeyEvent","onServerIncrementalSearch","isValidLI","back","closePopup","setHover","hoveredItem","setScrollPosition","spinnerElement","filterInputObj","preventAction","preventHomeEnd","isNavAction","isNavigation","isEditTextBox","isTabAction","updateUpDownAction","pageUpSelection","getPageCount","pageDownSelection","updateHomeEndAction","showPopup","focusDropDown","selectCurrentItem","selectCurrentValueOnTab","isServerNavigation","focusEle","isSelectFocusItem","nextItem","findLi","previousItem","unWireEvent","checkSelector","onDocumentClick","activeStateChange","proxy_1","updateSelectedItem","preventSelect","isSelection","selectedData","selectEventCallback","setSelectOptions","detachChanges","previousItemData","focusedItem","activeItem","valueTemplate","setValueTemplate","previousSelectedLI","dropdownCompiler","dropdownTemplate","templateData","valuecheck","valueCompTemp","selectedItems","dataValue","dataText","eve","detachChangeEvent","defineProperties","preItems","selectedElement","onFilterUp","searchLists","onFilterDown","getSelectionPoints","removeFillSelection","selection","filterType","selectionStart","selectionEnd","clearElement","eventArgs_1","preventDefaultAction","filteringAction","baseEventArgs","focusIndexItem","setSearchBox","popupElement","filterBarPlaceholder","clearIconElement","clearText","searchKeyModule","onInput","checkField_1","checkVal","addNewItem","isExist","actionCompleteDataUpdate","highlightedItem","refreshPopup","popupEle","serverPopupEle","listHeight","popupHeight","setHeaderTemplate","setFooterTemplate","updateServerPopup","searchBoxHeight","offsetValue","getOffsetValue","firstItem","isEmptyList","textIndent","paddingLeft","borderLeftWidth","getFocusElement","createPopup","collision","setSearchBoxPosition","backIconElement","clickOnBackIcon","scrollParentElements","scrollParentElements_1","listScroll","inputParent","animModel","popupInstance","destroyPopup","serverBlazorUpdateSelection","bindServerScrollEvent","resolveCollision","popupStyles","borderTop","borderTopWidth","borderBottom","borderBottomWidth","setPopupPosition","targetType","relateTo","isResetItem","actionList","targetExitViewport","popupOffset","lastItem","lastItemOffsetValue","paddingBottom","inputHeight","popupWidth","inputWidth","scrollBottom","currentOffset","nextBottom","nextOffset","paddingTop","boxRange","isPopupButton","setEleWidth","scrollableParentElements","scrollableParentElements_1","fixedHeader","popupHolderEle","updatedCssClassValues","selectElement","onselect","onchange","footercheck","footerCompTemp","headercheck","headerCompTemp","contentEle","setOldText","setOldValue","refreshPosition","checkData","isChangeValue","isChangeText","checkCustomValue","updateInputFields","checkValidLi","setSelectionData","ddlProps","newClass","invokeRenderPopup","isDropdownComp","proxy_2","onpopstate","clientRenderPopup","renderHightSearch","updateclientItemData","initValueItemData","serverUpdateListElement","isSelectVal","isFocused","attrArray","pagerDropDownDiv","dropDownDiv","defaultTextDiv","pagerCons","pageSizesModule","pageSizesArray","convertValue","dropDownListObject","onChange","beforeValueChange","pageSizeValue","ExternalMessage","externalMessage","isInitialRender","pagerDestroy","dropDownChanged","addAriaAttr","renderReactPagerTemplate","numericContainerNew","numericContainer","numericContainerDiv","replaceChild","isForceCancel","previousPage","keyActions","appendToElement","handlers","complete","updateLayout","inboundChange","__assign","t","isMultiShiftRequest","isMultiCtrlRequest","enableSelectMultiTouch","clearRowCheck","selectRowCheck","selectedRowState","chkAllCollec","isCheckedOnAdd","persistSelectedData","needColumnSelection","isCancelDeSelect","isPreventCellSelect","disableUI","isPersisted","cmdKeyPressed","cellselected","isMultiSelection","isAddRowsToSelection","initialRowSelection","isPrevRowSelection","autoFillRLselection","factory","initializeSelection","onActionBegin","fDataUpdate","getRowObj","hidePopUp","mouseDownHandler","isEditing","formObj","getSelectedMovableRow","getSelectedFrozenRightRow","getCurrentBatchRecordChanges","currentRecords","newRowPosition","primaryKey","enableSimpleMultiRowSelection","addRowsToSelection","selectedMovableRow","selectedFrozenRightRow","isRemoved","frozenData","getRowObjectByIndex","prevSelectedData","isRowType","isRowSelected","activeTarget","can","rowSelectingCallBack","isHybrid","isCtrlPressed","isShiftPressed","previousRow","prevRowIndex","previousRowIndex","actualTarget","isHeaderCheckboxClicked","addMovableArgs","toggle","removed","clearSelectedRow","selectRowCallBack","clearRow","disableInteracted","updateRowSelection","selectMovableRow","selectRowIndex","isHeaderCheckBoxClicked","updateRowProps","targetObj","frRow","mObj","previousMovRow","frozenRightRow","previousFrozenRightRow","getCollectionFromIndexes","isSingleSel","currentRow","prevRow","selectRowFn","rightEle","rowIndexes_1","checkboxOnly","rowIndexes_2","isUnSelected","enableToggle","rowDeselect","addRemoveClassesForRow","clearRowCallBack","selectedEle","updatePersistCollection","updateCheckBoxes","chkState","ensureCheckboxFieldSelection","pKey_1","updatePersistDelete","isPresent","chkBox","nextElementSibling","checkedTarget","setCheckAllState","getPrevIndexes","mouseButton","onClick","clearColumnSelection","mRow_1","fRightRow_1","rowIndex_1","foreignKeyData_1","isRowClicked","checkSelectAllClicked","getCheckAllStatus","updatePersistSelectedData","movableRow","rowDeselectCallBack","cancl_1","rowDeselectObj","rowInString","target_2","rowidx","rowidxex","data_2","isHeaderCheckBxClick","rowIndex_2","data_3","getSelectedMovableCell","getColIndex","isCellType","selectedCell","isCellSelected","prevCIdxs","successCallBack","previousRowCell","prevECIdxs","getCellIndex","currentCell","previousRowCellIndex","cellSelectingArgs","cncl","clearCell","updateCellSelection","selectedRowCellIndex","updateCellProps","stIndex","edIndex","getLastColIndex","addAttribute","cellSelectedArgs","cellSelectArgs","cellLen","addRowCellIndex","addCellsToSelection","movable","hideAutoFill","cellIndexes_1","selectedCellIdx","cellDeselect","cancl","rowCellIndex","isRowAvail","selectedCells","getSelectedCellsElement","rowCell","cLen","bdrElement","showHideBorders","gBRect","x1","y1","x2","y2","isCellDrag","startAFCell","endAFCell","selectLikeExcel","startDIndex","isAutoFillSel","showAFBorders","selectLikeAutoFill","startDCellIndex","drawBorders","createBorders","positionBorders","isLastCell","isLastRow","isFirstRow","isFirstCell","setBorders","bdrStr","stOff","endOff","parentOff","topOffSet","leftOffset","rightOffset","selectDirection","updateStartEndCells","mcBdrElement","frcBdrElement","fhBdrElement","mhBdrElement","frhBdrElement","applyBorders","applyBothFrozenBorders","includes","drawAFBorders","bdrAFBottom","createAFBorders","positionAFBorders","bdrAFLeft","firstCellTop","firstCellLeft","parentRect","sTop","totalHeight","totalWidth","scrolloffSet","bdrAFRight","bdrAFTop","leftRemove","topRemove","hideAFBorders","updateValue","createBeforeAutoFill","getAutoFillCells","startCellIdx","isApply","startrowIdx","endrowIdx","endCellIdx","rowLen","colLen","startCellIndex","trIdx","mouseUpHandler","mUPTarget","lastCell","updateStartCellsIndex","autofill","rindex","isFrozenCol","isFrozenRow","clientRect","colWidth","enableDrag","isUpdate","postion","clearSelAfterRefresh","isInfiniteScroll","onCellFocused","columnPositionChanged","actionBeginFunction","actionCompleteFunction","actionComplete","rowsRemoved","addEventListener_checkbox","removeEventListener_checkbox","isMacOS","keyUpHandler","beforeFragAppend","getCheckAllBox","initPerisistSelection","prevColIndex","checkBoxSelectionChanged","isLeftRightFrozen","renderFrozenRightContent","gobj","chkField","refreshPersistSelection","setRowSelection","mtbody","frtbody","editChkBox","onDataBound","totalRecords","checkSelectAllAction","cRenderer","editForm","getVirtualRowIndex","checkSelectAll","stateStr","vgenerator","rowCache","triggerChkChangeEvent","checkSelect","rowCellSelectionHandler","moveIntoUncheckCollection","updateSelectedRowIndex","selectedVal","isInteraction","checkToSelectAll","isServerRenderedVirtualization","checkedLen","allowColumnSelection","popUpClickHandler","chkSelect","isEqualNode","headerSelectionHandler","byKey","keyArgs","isJump","isContent","isSelectable","headerAction","thLen","childElementCount","getKeyColIndex","applyDownUpKey","applyRightLeftKey","shiftDownKey","applyShiftLeftRightKey","applyHomeEndKey","applyCtrlHomeEndKey","applySpaceSelection","allowNextRowEdit","innerColumn","getstackedColumns","lastIndex","firstIndex","applyUpDown","selectColumn","cIndex","selectColumnsByRange","innerColumnIndexes","detailIndentCell","dragdropIndentCell","selectedCol","isColSelected","isMultiColumns","clearColDependency","previousColumnIndex","updateColSelection","selectedArgs","updateColProps","selectColumns","getselectedCols","selectingArgs","selectColumnWithExisting","isFreeze","newCol","clearIndex","deselectedArgs","isCanceled","columnDeselect","selectedHeader","getSelectedColumnCells","movableRows","isRowTemplate","seletedcells","selectionString","onDataBoundFunction","setCheckAllForEmptyGrid","actionCompleteFunc","actionCompleteHandler","resizeEndFn","checkAllBox","isInfinitecroll","refreshSearch","onSearchComplete","cancelBeginEvent","ColumnWidthService","wFlag","totalColumnsWidth","setColumnWidth","tWidth","difference","tmWidth","collection_1","isWidthUndefined","setUndefinedColumnWidth","cWidth","getWidth","elementWidth","fWidth","isDraggable","freezeLeft","freezeRight","getColumnLevelFrozenColgroup","frCont","editTableCol","frzMode","frozenScrollbar","movableScrollbar","frozencontent","movableContent","frozenWidth","movableWidth","frozenRightScrollbar","frozenRightWidth","placeHolder","previous","getHeightFromDirection","sibling","isWidUndefCount","calcMovableOrFreezeColWidth","tableType","setWidthToFrozenRightTable","freezeWidth","isAutoResize","headerTbl","cntTbl","setWidthToFrozenLeftTable","setWidthToMovableTable","isColUndefined","isWidthAuto","setWidthToFrozenEditTable","setWidthToMovableEditTable","resizeSettings","ComponentBase","hasInjectedModules","hasChildDirective","childDirObjects","ej2Instances","$emit","vueInstance","getInjectedServices","injectables","$vnode","$options","updated","childKey","fetchChildPropValues","curChildDir","assignValueToWrapper","beforeDestroy","tempBeforeDestroyThis","bindProperties","prevModule","curModule","curModule_1","silent","childOption","dirProps","getDirectiveValues","$slots","default","tagMapper","tagNameMapper","dirProp","tagDirectives","keyTags","dir","tagDirectives_1","tagDirective","componentOptions","dirTag","tagDirChild","retObj","getVNodeValue","getMultiLevelDirValue","tagDirectories","tagKey","mulObj","tagDirectories_1","tagDir","mulLevObj","getCamelCaseProps","retProps","$internalHooks","EJComponentDecorator","EJcomponentFactory","_componentTag","proto","watch","newVal","mixins","collectDataFromConstructor","__decorators__","superProto","Super","Extended","vm","_init","plainData","stringCompiler","templateElement","that","returnEle","tempObj","propsData","extends","templateVue","$mount","ColumnsDirective","ColumnsPlugin","install","ColumnDirective","ColumnPlugin","AggregateColumnsDirective","AggregateColumnsPlugin","AggregateColumnDirective","AggregateColumnPlugin","AggregatesDirective","AggregatesPlugin","AggregateDirective","AggregatePlugin","modelProps","GridComponent","models","_trigger","_setProperties","propKey","PdfWriter","streamWriter","pdfDocument","overload","tempOverload","defaultToString","ObjectStatus","Dictionary","toStringFunction","nElements","toStr","pair","previousElement","keysArray","namesOfKeys","index1","pair1","valuesArray","namesOfValues","index2","pair2","containsKey","retutnValue","InternalEnum","PdfMainObjectCollection","objectCollections","mainObjectCollection","primitiveObjectCollection","isNew","objInfo","ObjectInfo","Registered","lookFor","oi","object","getReference","wasNew","trySetReference","found","setReference","pdfObject","isSaving","objectCollectionIndex","pdfReference","StreamWriter","encoding","bufferBlob","bufferText","enc","setBomByte","includeBom","arrayUnicode","uint8","arrayUtf8","utf8","bufferArray","writeLine","PdfDocumentBase","isStreamCopied","objects","pdfCrossTable","currentSavingObject","pdfCatalog","setMainObjectCollection","setCrossTable","cTable","setCatalog","catalog","SW","encoding_1","SW_1","docSave","PdfName","stringStartMark","internalValue","isSaving6","position6","normalizeValue","status6","index6","escapeString","crossTable","newName","stringValue","ch","delimiters","replacements","Operators","forTest","endObj","whiteSpace","slash","newLine","endStream","xref","trailer","startxref","eof","beginText","endText","beginPath","appendLineSegment","stroke","fill","fillEvenOdd","fillStroke","fillStrokeEvenOdd","appendbeziercurve","appendRectangle","saveState","restoreState","paintXObject","modifyCtm","modifyTM","setLineWidth","setLineCapStyle","setLineJoinStyle","setDashPattern","setFlatnessTolerance","closePath","closeStrokePath","closeFillStrokePath","setCharacterSpace","setWordSpace","setHorizontalScaling","setTextLeading","setFont","setRenderingMode","setTextRise","setTextScaling","setCoords","goToNextLine","setText","setTextWithFormatting","setTextOnNewLine","selectcolorspaceforstroking","selectcolorspacefornonstroking","setrbgcolorforstroking","setrbgcolorfornonstroking","setcmykcolorforstroking","setcmykcolorfornonstroking","setgraycolorforstroking","setgraycolorfornonstroking","clipPath","clipPathEvenOdd","endPath","setGraphicsState","comment","evenOdd","setMiterLimit","setColorAndPattern","setColorAndPatternStroking","DictionaryProperties","pages","kids","resources","mediaBox","decodeParms","type1","baseFont","subtype","contents","procset","colorSpace","extGState","xObject","bitsPerComponent","dctdecode","blackIs1","predictor","deviceRgb","annot","annots","ca","CA","xyz","dest","BM","flatedecode","bBox","w","cIDFontType2","cIDToGIDMap","identity","dw","fontDescriptor","cIDSystemInfo","flags","fontBBox","missingWidth","stemV","italicAngle","capHeight","ascent","descent","leading","avgWidth","fontFile2","xHeight","stemH","registry","ordering","supplement","type0","identityH","toUnicode","descendantFonts","background","shading","matrix","antiAlias","function","shadingType","coords","domain","functionType","bitsPerSample","patternType","paintType","tilingType","xStep","yStep","PdfDictionary","dictionary","position7","primitiveItems","suffix","archive","isFont","encrypt","dictionaryProperties","freezeChanges","status7","isSaving7","index7","getArchive","setArchive","setEncrypt","modify","getEncrypt","freezer","bChanged","newDict","onBeginSave","beginSave","onFontDictionaryBeginSave","fontDictionaryBeginSave","onDescendantFontBeginSave","descendantFontBeginSave","onTemplateBeginSave","pageBeginDrawTemplate","pageBeginSave","onBeginAnnotationSave","annotationBeginSave","onSectionBeginSave","saveEvent","sectionBeginSave","bRaiseEvent","saveItems","name_1","SaveSectionCollectionEventHandler","SaveDescendantFontEventHandler","SaveFontDictionaryEventHandler","SaveAnnotationEventHandler","SaveSectionEventHandler","SaveTemplateEventHandler","PdfNumber","position5","status5","isSaving5","index5","rValue","intValue","newNumber","floatToString","number","returnString","PdfArray","startMark","endMark","position9","clonedObject9","internalElements","tempArray","tempNumberArray","pdfNumber","status9","isSaving9","index9","markedChange","newArray","fromRectangle","bounds","tempElements","markChanged","removeAt","PdfStream","dicPrefix","dicSuffix","clonedObject2","bCompress","isImageStream","isFontStream","dataStream2","bCompress2","clearStream","internalStream","writeBytes","onCmapBeginSave","cmapBeginSave","onFontProgramBeginSave","fontProgramBeginSave","compressContent","byteArray","dataArray","sw","getCompressedString","addFilter","filterName","rh","isImage","bytesToString","SaveCmapEventHandler","SaveFontProgramEventHandler","SourceType","ForceEncoding","ObjectType","PdfString","bHex","position1","clonedObject1","bDecrypted","isParentDecrypted","isPacked","isFormField","isColorSpace","isHexString","status1","isSaving1","bConverted","bForceEncoding","bytesToHex","builder","Ascii","pdfEncode","stringMark","escapeSymbols","currentData","CrossTable","newString","toUnicodeArray","bAddPrefix","byteToString","hexStringMark","hexFormatPattern","PdfReference","objNumber","genNumber","index3","position3","status3","isSaving3","returnObject3","PdfReferenceHolder","obj2","index4","position4","objectIndex","status4","isSaving4","primitiveObject","PdfPageOrientation","PdfPageRotateAngle","PdfNumberStyle","PdfDockStyle","PdfAlignmentStyle","TemplateType","PdfCatalog","sections","tempDictionaryProperties","PdfCrossTable","maxGenNumIndex","objectCount","merging","internalTrailer","pdfObjects","saveHead","mappedReferences","markTrailerReferences","saveObjects","saveCount","xrefPos","registerObject","prevXRef","saveSections","saveTrailer","saveTheEndess","objectCollection","objectNum","prepareSubsection","saveSubsection","Free","generation","isFree","addOffsetLength","addGenNumberLength","total","refString","generateFileVersion","iVersion","bNew","getSubReference","objnumber","nextObjNumber","tempIndex","tempkey","tempvalue","None","bForceNew","saveIndirectObject","currentSavingObj","doSaveObject","free","dereference","RegisteredObject","tempOffset","offsetNumber","tempReference","Normal","PointF","SizeF","RectangleF","pointf","sizef","Rectangle","topLeft","PdfPageSize","letter","note","legal","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","b0","b1","b2","b3","b4","b5","archE","archD","archC","archB","archA","flsa","halfLetter","letter11x17","ledger","PdfHorizontalAlignment","PdfVerticalAlignment","PdfTextAlignment","TextRenderingMode","PdfLineJoin","PdfLineCap","PdfDashStyle","PdfFillMode","PdfColorSpace","PdfBlendMode","PdfGraphicsUnit","PdfGridImagePosition","PdfTextDirection","PdfFontStyle","PdfFontFamily","PdfFontType","PdfWordWrapType","PdfSubSuperScript","FontEncoding","TtfCmapFormat","TtfCmapEncoding","TtfPlatformID","TtfMicrosoftEncodingID","TtfMacintoshEncodingID","FontDescriptorFlags","TtfCompositeGlyphFlags","PdfMargins","pdfMargin","setMargins","leftMargin","topMargin","rightMargin","bottomMargin","margin1","margin2","margin3","margin4","PdfPageSettings","margins","pageMargins","rotateAngle","RotateAngle0","pageOrientation","Portrait","pageOrigin","isRotation","setSize","orientation","updateSize","Landscape","getActualSize","LineType","PdfStreamWriter","dictionaryName","writeOperator","executeObject","useEvenOddRule","fillStrokePath","fillPath","closeFillPath","textScaling","strokePath","restoreGraphicsState","saveGraphicsState","startNextLine","writePoint","showText","checkTextParam","writeText","setLeading","setTextRenderingMode","renderingMode","setCharacterSpacing","charSpacing","setWordSpacing","wordSpacing","showNextLineText","setColorSpace","temparg1","temparg2","op","opcode","updateY","string","writeComment","setColorAndSpace","forStroking","setLineDashPattern","patternOffset","setLineDashPatternHelper","tempPattern","miterLimit","setLineCap","lineCapStyle","setLineJoin","lineJoinStyle","appendBezierSegment","setColourWithPattern","colours","patternName","PdfColor","color1","color2","color3","color4","assignRGB","filled","redColor","greenColor","g","blueColor","grayColor","gray","alpha","maxColourChannelValue","cyanColor","magentaColor","yellowColor","blackColor","assignCMYK","red","green","blue","black","cyan","magenta","yellow","Rgb","rgbToString","GrayScale","grayScaleToString","Cmyk","cmykToString","ifStroking","colour","grayStringsSroke","grayStringsFill","rgbStrings","toArray","PdfBrush","PdfSolidBrush","pdfColor","monitorChanges","brush","getResources","currentColorSpace","resetChanges","PdfPen","dashOffsetValue","penDashPattern","pdfDashStyle","Solid","pdfLineCap","pdfLineJoin","penWidth","internalMiterLimit","setBrush","Dash","Dot","DashDot","DashDotDot","pen","sBrush","pdfBrush","currentPen","dashControl","lineJoin","lineCap","lineWidth","getPattern","dashOffset","dashPattern","PdfStringFormat","scalingFactor","wordWrapType","Word","internalLineLimit","textAlignment","verticalAlignment","Top","isRightToLeft","internalCharacterSpacing","internalWordSpacing","clip","pdfSubSuperScript","internalParagraphIndent","firstLineIndent","trailingSpaces","isNoClip","initialLineIndent","StringTokenizer","textValue","currentPosition","getCharsCount","numSymbols","readLine","text2","peekLine","line","readWord","peekWord","word","read","peek","readToEnd","spaces","whiteSpacePattern","PdfStringLayouter","isOverloadWithPosition","layout","arg7","clientSize","doLayout","rectSize","pageHeight","rectangle","reader","lineResult","lines","lineIndent","getLineIndent","layoutLine","numSymbolsInserted","returnedValue","copyToResult","numInserted","finalizeResult","firstLine","paragraphIndent","getLineHeight","lineSpacing","getLineWidth","layoutLineHeight","lineType","FirstParagraphLine","addToLineResult","NewLineBreak","curLine","curIndent","curLineWidth","getWrapType","WordOnly","textRemainder","wordWrap","Character","ln","LayoutBreak","LastParagraphLine","layoutLines","breakType","LineInfo","actualSize","allowPartialLines","lineLimit","expHeight","trimLine","size1","wrapType","PdfStringLayoutResult","empty","PdfLayoutType","PdfLayoutBreakType","PathPointType","PdfFont","Regular","setStyle","metrics","Bold","Italic","Strikeout","Underline","fontMetrics","pdfFontInternals","measureString","charactersFitted","linesFilled","layoutArea","temparg3","layouter","equalsTo","equalsToFont","getInternals","setInternals","internals","applyFormatSettings","realWidth","characterSpacing","whitespacesCount","charSizeMultiplier","syncObject","PdfTransformationMatrix","radDegFactor","transformationMatrix","translate","scaleX","scaleY","whitespace","multiply","degreesToRadians","degreesX","degRadFactor","radiansToDegrees","Matrix","metrixElements","tempMatrix","dispose","ProcedureSets","pdf","imageB","imageC","imageI","TemporaryDictionary","mKeys","mValues","ReferenceError","RangeError","PdfTransparency","PdfAutomaticFieldInfoCollection","automaticFieldsInformation","fieldInfo","automaticFields","PdfGraphicsElement","drawHelper","graphics","bNeedSave","gState","translateTransform","drawInternal","restore","PdfAutomaticField","internalBounds","internalTemplateSize","internalFont","internalBrush","internalPen","internalStringFormat","performDrawHelper","scalingX","scalingY","getFont","stringFormat","draw","location_1","getBrush","defaultFont","getPageFromGraphics","PdfAutomaticFieldInfo","pageNumberFieldLocation","pageNumberField","ByteArray","mPosition","dataView","DataView","readByte","getBuffer","writeFromBase64String","encodedString","chr1","chr2","chr3","enc1","enc2","enc3","enc4","keyStr","resultIndex","totalLength","byteLength","readNextTwoBytes","TtfTableInfo","TtfNameTable","TtfNameRecord","TtfHeadTable","TtfMetrics","macStyle","TtfHorizontalHeaderTable","TtfOS2Table","TtfPostTable","TtfLongHorMetric","TtfCmapSubTable","TtfCmapTable","TtfGlyphInfo","compareTo","glyph","TtfLocaTable","TtfAppleCmapSubTable","TtfMicrosoftCmapSubTable","TtfTrimmedCmapSubTable","TtfGlyphHeader","BigEndianWriter","capacity","int32Size","int16Size","int64Size","bufferLength","internalPosition","writeShort","writeInt","i1","i2","i3","i4","writeUInt","buff","writeString","TtfReader","fontData","isTtcFont","isMacTtf","metricsName","isMacTTF","missedGlyphs","tableNames","entrySelectors","macintoshDictionary","microsoftDictionary","internalMacintoshGlyphs","internalMicrosoftGlyphs","readFontDictionary","nameTable","readNameTable","headTable","readHeadTable","initializeFontName","checkPreambula","numTables","readInt16","tableDirectory","tableKey","readString","readInt32","lowestPosition","fixOffsets","minOffset","MAX_VALUE","tableKeys","fontTag","ttcIdentificationNumber","tableInfo","formatSelector","readUInt16","recordsCount","nameRecords","recordSize","platformID","encodingID","languageID","nameID","unicode","readFixed","fontRevision","checkSumAdjustment","readUInt32","magicNumber","unitsPerEm","readInt64","modified","xMin","yMin","xMax","yMax","lowestReadableSize","fontDirectionHint","indexToLocalFormat","glyphDataFormat","readHorizontalHeaderTable","ascender","descender","lineGap","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","metricDataFormat","numberOfHMetrics","readOS2Table","xAvgCharWidth","usWeightClass","usWidthClass","fsType","ySubscriptXSize","ySubscriptYSize","ySubscriptXOffset","ySubscriptYOffset","ySuperscriptXSize","ySuperscriptYSize","ySuperscriptXOffset","ySuperscriptYOffset","yStrikeoutSize","yStrikeoutPosition","sFamilyClass","panose","readBytes","ulUnicodeRange1","ulUnicodeRange2","ulUnicodeRange3","ulUnicodeRange4","vendorIdentifier","fsSelection","usFirstCharIndex","usLastCharIndex","sTypoAscender","sTypoDescender","sTypoLineGap","usWinAscent","usWinDescent","ulCodePageRange1","ulCodePageRange2","sxHeight","sCapHeight","usDefaultChar","usBreakChar","usMaxContext","readPostTable","formatType","underlinePosition","underlineThickness","isFixedPitch","minType42","maxType42","minType1","maxType1","readWidthTable","glyphCount","advanceWidth","lsb","glyphWidth","readCmapTable","subTables","subTable","readCmapSubTable","getCmapEncoding","Macintosh","Microsoft","Unknown","Apple","readAppleCmapTable","readMicrosoftCmapTable","Trimmed","readTrimmedCmapTable","maxMacIndex","glyphInfo","macintosh","addGlyph","Unicode","microsoft","segCountX2","searchRange","entrySelector","rangeShift","segCount","endCount","readUshortArray","reservedPad","startCount","idDelta","idRangeOffset","glyphID","codeOffset","Symbol","firstCode","entryCount","fontFamily","postScriptName","glyphCode","Undefined","Roman","microsoftGlyphs","macintoshGlyphs","initializeMetrics","horizontalHeadTable","os2Table","postTable","cmapTables","bSymbol","isSymbol","factor","winAscent","macAscent","winDescent","macDescent","fontBox","widthTable","updateWidth","subScriptSizeFactor","superscriptSizeFactor","getGlyph","byteToProcess","unknown","getString","getDefaultGlyph","readLocaTable","bShort","offsets","updateGlyphChars","glyphChars","locaTable","glyphCharKeys","nextKey","processCompositeGlyph","glyphOffset","glyphHeader","numberOfContours","skipBytes","entry","glyphIndex","MoreComponents","Arg1And2AreWords","WeHaveScale","WeHaveAnXyScale","WeHaveTwoByTwo","generateGlyphTable","newLocaTable","newGlyphTable","activeGlyphs","glyphSize","glyphSizeAligned","align","nextGlyphOffset","nextGlyphIndex","oldGlyphOffset","oldNextGlyphOffset","glyphTableSize","updateLocaTable","bLocaIsShort","newLocaTableOut","newLocaUpdated","newLocaSize","getFontProgram","locaTableSize","getFontProgramLength","fontProgramLength","writeCheckSums","writeGlyphs","usedTablesSize","nextTableSize","calculateCheckSum","byte1","byte2","byte3","byte4","setOffset","createInternals","bIsLocaShort","isFontPresent","getGlyphChars","chars","charKeys","getAllGlyphs","allGlyphInfo","readFontProgram","result1","result2","fontProgram","convertString","getCharWidth","codeWidth","isUnicode","sFraction","low","written","PdfFontMetrics","getAscent","getDescent","getLineGap","clearTypeFonts","clearTypeFontCollection","subSuperScript","SubScript","SuperScript","WidthTable","internalWidthTable","StandardWidthTable","widths","swt","UnicodeTrueTypeFont","base64String","nameString","isCompress","isEmbedFont","cmapPrefix","cmapEndCodespaceRange","cmapBeginRange","cmapEndRange","cmapSuffix","fontString","Initialize","ttfReader","charWidth","internalBuffer","ttfMetrics","fontDictionary","cmap","descendantFont","subsetName","getFontName","createDescendantFont","createCmap","createFontDictionary","createFontProgram","isBold","formatName","createFontDescriptor","systemInfo","createSystemInfo","getDescriptorFlags","getBoundBox","descFonts","usedChars","getDescendantWidth","generateCmap","generateFontProgram","chLen","firstGlyphIndex","lastGlyphIndex","firstGlyphIndexWasSet","widthDetails","middlePart","toHexString","nextRange","FixedPitch","Symbolic","Nonsymbolic","isItalic","ForceBold","isCaseChange","setSymbols","ArabicShapeRenderer","arabicCharTable","alef","alefHamza","alefHamzaBelow","alefMadda","lam","hamza","zeroWidthJoiner","hamzaAbove","hamzaBelow","wawHamza","yehHamza","waw","alefMaksura","yeh","farsiYeh","shadda","madda","lwa","lwawh","lwawhb","lwawm","bwhb","fathatan","superScriptalef","vowel","arabicMapTable","getCharacterShape","shape","st","doShape","ligature","ArabicShape","present","shapeCount","getShapeCount","Shapes","Value","Ligature","Type","shapeValue","shapeType","shapeVowel","shapeLigature","shapeShapes","Bidi","indexLevels","mirroringShapeCharacters","doMirrorShaping","getLogicalToVisualString","inputText","rtlCharacters","RtlCharacters","getVisualOrder","setDefaultIndexLevel","doOrder","resultBuilder","sIndex","eIndex","odd","even","pstart","pend","reArrange","textOrder","rtlCharacterTypes","L","LRE","LRO","R","AL","RLE","RLO","PDF","EN","ES","ET","AN","CS","NSM","BN","B","S","WS","ON","charTypes","getCharacterCode","doVisualOrder","levels","characterCodes","setDefaultLevels","setLevels","updateLevels","getEmbeddedCharactersLength","preview","preType","checkNSM","checkEmbeddedCharacters","startType","endType","charType","checkEuropeanDigits","checkArabicCharacters","checkEuropeanNumberSeparator","checkEuropeanNumberTerminator","getLength","checkOtherNeutrals","checkOtherCharacters","pst","checkCommanCharacters","validSet","byte","lt","tt","rt","RtlRenderer","openBracket","closeBracket","wordSpace","customLayout","splitLayout","words","system","customSplitLayout","getGlyphIndex","glyphs","fontInternal","textDirection","bidi","layouted","addChars","reversedLine","ImageFormat","PdfBoolean","objectStatus","saving","boolToStr","PdfGradientBrush","mbackground","mbStroking","mfunction","mpatternDictionary","sh","aa","box","mcolorSpace","csValue","colorSpaceToDeviceName","mshading","patternDictionary","mmatrix","resetFunction","getName","resetPatternDictionary","cloneAntiAliasingValue","cloneBackgroundValue","PdfTemplate","writeTransformation","tempSize","templateSize","pdfGraphics","gr","GetResourceEventHandler","initializeCoordinates","addType","addSubType","PdfBorderOverlapStyle","ImageDecoder","sof1Marker","sof2Marker","sof3Marker","sof5Marker","sof6Marker","sof7Marker","sof9Marker","sof10Marker","sof11Marker","sof13Marker","sof14Marker","sof15Marker","mFormat","mbitsPerComponent","mStream","mHeight","mWidth","mImageData","checkIfJpeg","Jpeg","parseJpegImage","imgData","isLengthExceed","readExceededJPGImage","mJpegHeader","getImageDictionary","imageStream","decodedString","imageDataAsNumberArray","compress","getColorSpace","getDecodeParams","decodeParams","isContinueReading","marker","getMarker","skipStream","noOfBytes","markerLength","mPngHeader","GIF_HEADER","BMP_HEADER","PdfUnitConverter","dpi","updateProportionsHelper","convertUnits","to","convertFromPixels","proportions","pixelPerInch","horizontalResolution","verticalResolution","PdfImage","imageWidth","imageHeight","imagePhysicalDimension","getPointSize","dpiX","dpiY","ucX","ucY","ptWidth","Pixel","Point","ptHeight","PdfBitmap","imageStatus","loadImage","initializeAsync","decoder","PdfResources","baseDictionary","getNames","primitive","sName","generateName","pdfNames","fonts","requireProcedureSet","procedureSetName","procSets","removeFont","Guid","getNewGuidString","xobjects","savable","transDic","parentXObjects","hasSameImageStream","oldReference","values_1","PdfTilingBrush","mStroking","mLocation","mDictionaryProperties","mPage","brushStream","mResources","setBox","setObligatoryFields","mTransformationMatrix","tempBrushStream","tempResource","mBox","tileTransform","mGraphics","resources1","name1","PdfGraphics","previousTextRenderingMode","Fill","previousCharacterSpacing","previousWordSpacing","previousTextScaling","procedureSets","isNormalRender","isUseFontSize","isEmfTextScaled","isEmf","isEmfPlus","isBaselineFormat","emfScalingFactor","colorSpaceChanged","isPointOverload","currentColorSpaces","isImageOptimized","graphicsState","istransparencySet","internalAutomaticFields","startCutIndex","canvasSize","pdfStreamWriter","pdfStringLayoutResult","internalMediaBoxUpperRightBound","clipBounds","pageLayer","bStateSaved","currentBrush","currentFont","bCSInitialized","currentStringFormat","drawPdfTemplate","bNeedScale","getTranslateTransform","getScaleTransform","newLocation","drawString","arg8","arg9","temparg4","temparg5","temparg6","temparg7","temparg8","temparg9","checkCorrectLayoutRectangle","drawStringLayoutResult","drawLine","stateControl","drawRectangle","xOffset","yOffset","layer","drawPathHelper","Winding","isPen","isBrush","isEvenOdd","Alternate","drawImage","physicalDimension","name_2","setResources","resource","getLineBounds","lineIndex","layoutRectangle","lineCount","vShift","getTextVerticalAlignShift","hShift","getHorizontalAlignShift","shouldJustify","textSize","layoutedRectangle","Center","Right","lineAlignment","Middle","Bottom","setLayer","pageSave","performDraw","applyStringSettings","horizontalScalingFactor","subScript","resultHeight","remainingString","drawLayoutResult","underlineStrikeoutText","getNextPage","section","getPages","setClip","tm","getTextRenderingMode","cs","ws","textHeight","boundsHeight","vAlignShift","ttfFont","lineInfo","hAlignShift","drawUnicodeLine","drawAsciiLine","justifyLine","useWordSpace","Justify","rtlRender","blocks","rightAlign","RightToLeft","drawUnicodeBlocks","breakUnicodeLine","tokens","token","convertToUnicode","getUnicodeString","xShift","spaceWidth","tokenWidth","converted","boundsWidth","hasWordSpacing","justifyStyle","goodWidth","hasSpaces","goodLineBreakStyle","strikeout","linePen","createUnderlineStikeoutPen","underlineYOffset","strikeoutYOffset","FillStroke","Stroke","ClipFlag","layoutBounds","firstParagraphLine","Left","lastDocumentCS","lastGraphicsCS","initCurrentColorSpace","penControl","brushControl","fontControl","colorspace","lgb","curSubSuper","prevSubSuper","setTransparency","trasparencies","transp","TransparencyData","name_3","clipTranslateMargins","clipArea","scaleTransform","rotateTransform","getRotateTransform","mediaBoxUpperRightBound","cropBox","textRenderingMode","doRestoreState","popState","drawPath","buildUpPath","pathPoints","pathTypes","fillMode","constructArcPath","typeValue","Start","Bezier3","p2","p3","getBezierPoints","Line","checkFlags","points","pathTypesValuesMask","CloseSubpath","startAng","sweepAngle","getBezierArc","pt","numX1","numY1","numX2","numY2","e1","fragAngle1","numFragments","xcen","ycen","rx","ry","halfAng","kappa","pointsList","thetaValue0","thetaValue1","cos0","cos1","sin0","sin1","transparencyObject","PdfGraphicsState","internalTextRenderingMode","internalTextScaling","pdfColorSpace","pdfPen","pdfFont","alphaPen","alphaBrush","blendMode","PdfPageLayer","streamClipPageTemplates","sublayer","contentLength","pdfPage","clipPageTemplates","layerid","layerName","initializeGraphics","oPage","sc","isSame","origin","clipRect","getActualBounds","PdfCollection","PdfPageLayerCollection","parentLayerCount","optionalContent","lPage","parseLayers","firstArgument","secondArgument","addLayer","insertLayer","loadedPage","saveStream","restoreStream","saveData","PdfPageBase","defLayerIndex","pageDictionary","pdfSection","layers","defaultLayerIndex","returnlayer","layerCollection","PdfAnnotationCollection","alreadyExistsAnnotationError","missingAnnotationException","internalAnnotations","lists","annotation","doAdd","setPage","layoutResult","lastPosition","setColor","PdfPage","annotationCollection","defaultLayer","annotations","setSection","resetProgress","isProgressOn","getClientSize","doc","drawPageTemplates","hasBackTemplates","containsTemplates","backLayer","drawTemplates","hasFrontTemplates","frontLayer","PageAddedEventArgs","PdfSectionPageCollection","PdfDocumentTemplate","leftTemplate","checkElement","topTemplate","rightTemplate","bottomTemplate","evenLeft","evenTop","evenRight","evenBottom","oddLeft","oddTop","oddRight","oddBottom","getLeft","isEven","EvenLeft","OddLeft","getTop","EvenTop","OddTop","getRight","EvenRight","OddRight","getBottom","EvenBottom","OddBottom","pageCollectionIndex","PdfSectionTemplate","rightValue","bottomValue","stampValue","PdfSection","pageAdded","pdfPages","initialSettings","sectionCollection","pagesReferences","pageTemplate","pagesCollection","pointToNativePdf","setPageSettings","PageSettingsState","foreground","documentHeaders","getDocumentTemplates","sectionTemplates","getSectionTemplates","templates","applyDocumentTopTemplate","applyDocumentBottomTemplate","applyDocumentLeftTemplate","applyDocumentRightTemplate","page_1","checkPresence","pageAddedMethod","onPageAdded","document_1","getLeftIndentWidth","getTopIndentHeight","getRightIndentWidth","getBottomIndentHeight","includeMargins","templateWidth","docTemplateWidth","templateHeight","docTemplateHeight","temproaryPages","applyPageSettings","parentSettings","rotateFactor","sectionHeaders","drawTemplatesHelper","pageRotate","PdfSectionCollection","sectionCount","pdfSectionCollection","section_1","checkSection","countPages","PdfDocumentPageCollection","pdfPageCollectionIndex","getLastSection","getPageByIndex","getPage","sectionStartIndex","numPages","PdfCacheCollection","referenceObjects","pdfFontCollection","getGroup","createNewGroup","tGroup","representative","removeGroup","PdfStandardFontMetricsFactory","getMetrics","Helvetica","getHelveticaMetrics","Courier","getCourierMetrics","TimesRoman","getTimesMetrics","getSymbolMetrics","ZapfDingbats","getZapfDingbatsMetrics","subSuperScriptFactor","helveticaBoldItalicAscent","helveticaBoldItalicDescent","helveticaBoldItalicName","arialBoldWidth","helveticaBoldAscent","helveticaBoldDescent","helveticaBoldName","helveticaItalicAscent","helveticaItalicDescent","helveticaItalicName","arialWidth","helveticaAscent","helveticaDescent","helveticaName","courierBoldItalicAscent","courierBoldItalicDescent","courierBoldItalicName","fixedWidth","courierBoldAscent","courierBoldDescent","courierBoldName","courierItalicAscent","courierItalicDescent","courierItalicName","courierAscent","courierDescent","courierName","timesBoldItalicAscent","timesBoldItalicDescent","timesBoldItalicName","timesRomanBoldItalicWidths","timesBoldAscent","timesBoldDescent","timesBoldName","timesRomanBoldWidth","timesItalicAscent","timesItalicDescent","timesItalicName","timesRomanItalicWidth","timesAscent","timesDescent","timesName","timesRomanWidth","symbolAscent","symbolDescent","symbolName","symbolWidth","zapfDingbatsAscent","zapfDingbatsDescent","zapfDingbatsName","zapfDingbatsWidth","PdfStandardFont","fontFamilyPrototype","encodings","pdfFontFamily","checkStyle","initializeInternals","convert","getCharWidthInternal","stFont","fontFamilyEqual","lineReducer","styleEqual","WinAnsiEncoding","charOffset","PdfDocument","isMerging","defaultMargin","isMerge","cacheCollection","documentPageCollection","defaultStandardFont","isCacheEnabled","checkPagesPresence","PdfBorders","defaultBorderPenLeft","dashStyle","defaultBorderPenRight","defaultBorderPenTop","defaultBorderPenBottom","leftPen","rightPen","topPen","bottomPen","PdfPaddings","hasLeftPad","hasRightPad","hasTopPad","hasBottomPad","leftPad","rightPad","bottomPad","topPad","PdfHorizontalOverflowType","PdfGridStyleBase","gridBackgroundBrush","gridTextBrush","gridTextPen","gridFont","gridBackgroundImage","PdfGridStyle","gridBorderOverlapStyle","Overlap","bAllowHorizontalOverflow","gridHorizontalOverflowType","gridCellSpacing","gridCellPadding","PdfGridCellStyle","gridCellBorders","PdfGridRowStyle","gridRowBackgroundBrush","setBackgroundBrush","getCell","backgroundBrush","gridRowTextBrush","setTextBrush","textBrush","gridRowTextPen","setTextPen","textPen","gridRowFont","gridRowBorder","setBorder","setParent","gridRowBackgroundImage","ElementLayouter","layoutElement","getElement","layoutInternal","Layouter","getPaginateBounds","usePaginateBounds","paginateBounds","PdfLayoutFormat","baseFormat","break","boundsSet","layoutType","layoutPaginateBounds","PdfLayoutParams","layoutFormat","PdfLayoutResult","PdfLayoutElement","beginPageLayout","endPageLayout","onBeginPageLayout","onEndPageLayout","bEmbedFonts","newBound","TextLayouter","currentBounds","pageResult","TextPageLayoutResult","remainder","layoutOnPage","getLayoutResult","PdfTextLayoutResult","lastLineBounds","checkCorrectBounds","stringResult","textFinished","doesntFit","FitElement","getTextPageBounds","shiftedRect","verticalShift","remainderText","lastLineTextBounds","PdfTextElement","elementValue","hasPointOverload","isPdfTextElement","drawText","stringLayoutResult","previousPosition","calculateResultBounds","lineSize","maximumWidth","startPosition","PdfAnnotation","textFont","pdfDictionary","internalColor","darkness","nativeRectangle","initialHeight","tempLoacation","PdfLinkAnnotation","PdfActionLinkAnnotation","pdfAction","getSetAction","PdfAction","PdfUriAction","uniformResourceIdentifier","PdfUriAnnotation","pdfUriAction","uriAction","PdfTextWebLink","uniformResourceLocator","uriAnnotation","recalculateBounds","defaultBorder","previousFontStyle","calculateBounds","drawMultipleLineWithPoint","drawMultipleLineWithBounds","PdfGridLayouter","gridInitialWidth","gridSize","parentCellIndex","tempWidth","childheight","hasRowSpanSpan","isRearranged","pageBounds","listOfNavigatePages","columnRanges","currentLocation","breakRow","gridLayoutFormat","currentPageBounds","currentGraphics","FitColumnsToPage","getRow","startLocation","hType","horizontalOverflowType","allowHorizontalOverflow","measureColumnsWidth","determineColumnDrawRanges","isRowHeightSet","startColumn","endColumn","cellWidths","availableWidth","getColumn","subWidths","endArgs","layoutedPages","startPage","cellBounds","cellStartIndex","cellEndIndex","returnObject","raiseBeforePageLayout","currentRowIndex","getHeader","drawRow","repeatRow","originalHeight","repeatRowIndex","rowResult","splitChildRowIndex","isrowFinish","ParentCell","isGridSplit","rowCollection","isFinish","tempResult","raisePageLayouted","allowRowBreakAcrossPages","getNextPageformat","cellPadding","rowBreakHeight","isRowBreaksNextPage","rowBreakHeightValue","i_2","noOfPageCount","repeatHeader","j_1","headerRepeat","j_2","tempResult1","i_3","i_4","OnePage","i_5","NestedGridLayoutResult","recalHeight","ReCalculateHeight","secion","pageGraphics","location_2","cellWidth","totalwidth","i_6","columnWidth","drawCellBorders","columnSpan","isPdfGrid","maximumCellBoundsWidth","largeNavigatePage","rowLayoutBoundsWidth","reArrangePages","pageindex","CheckIfDefaultFormat","defaultFormat","measureTrailingSpaces","noClip","RaiseBeforeCellDraw","raiseBeginCellDraw","PdfGridBeginCellDrawEventArgs","onBeginCellDraw","raiseAfterCellDraw","cellstyle","raiseEndCellDraw","PdfGridEndCellDrawEventArgs","onEndCellDraw","count_1","repeatFlag","PdfGridLayoutResult","newHeight","measureHeight","raiseBeginPageLayout","PdfGridBeginPageLayoutEventArgs","startRowIndex","PdfGridEndPageLayoutEventArgs","raiseEndPageLayout","rowHeightWithSpan","rowSpanExists","maxSpan","currRowIndex","calculatedHeight","LayoutFormat","FitPage","drawRowWithBreak","repeatRowNumber","skipcell","location_4","cancelSpans","isCellMergeContinue","rowOverflowIndex","cellSpacing","rowMergeComplete","calculateHeight","gridHeight","cellHeight","cellstyle1","FinishedDrawingCell","rowBreakPageHeightCellIndex","PdfGridLayoutFormat","GridCellEventArgs","gridRowIndex","gridCellIndex","gridBounds","bSkip","PdfCancelEventArgs","isCancel","BeginPageLayoutEventArgs","EndPageLayoutEventArgs","nextPdfPage","startRow","RowLayoutResult","layoutedBounds","bIsFinished","PdfGridCell","tempval","fontSpilt","finsh","rowSpanRemainingHeight","hasRowSpan","hasColSpan","gridRowSpan","internalIsCellMergeContinue","internalIsRowMergeContinue","internalIsCellMergeStart","internalIsRowMergeStart","remaining","objectValue","isSingleGrid","rowCount","colCount","columnSpanExists","isComplete","measureWidth","slr","getTextFont","webLink","drawCellBackground","getBackgroundBrush","backgroundImage","getBackgroundImage","adjustContentLayoutArea","returnBounds","cancelSubsequentSpans","adjustOuterLayoutArea","getTextPen","getTextBrush","strFormat","getStringFormat","innerLayoutArea","rowFontSplit","layoutRect","Paginate","setSpan","checkSpan","childGridResult","imageBounds","borderOverlapStyle","Inside","p1","Square","currentColIndex","compWidth","calculateWidth","currentValue","internalWidth","PdfGridCellCollection","tempcell","PdfGridColumn","isCustomWidth","PdfGridColumnCollection","internalColumns","initialWidth","isPageWidth","getDefaultWidths","subFactor","PdfGridRow","gridRowOverflowIndex","rowWidth","isRowSpanRowHeightSet","isPageBreakRowSpanApplied","isRowMergeComplete","pdfGrid","bRowSpanExists","gridCells","rowStyle","gridRowBreakHeight","gridResult","bColumnSpanExists","cellIn","rowin","rowWid","PdfGridRowCollection","addRow","temprow","PdfGridHeaderCollection","PdfGrid","hasColumnSpan","beginCellDraw","endCellDraw","bRepeatHeader","gridHeaders","gridStyle","ispageWidth","ischildGrid","measure","parentCell","gridLocation","isRowMergeContinue","isCellMergeStart","isRowMergeStart","maximumRowSpan","cellcolSpan","cellrowSpan","cellmaxSpan","columnCount","childGridColumnWidth","colCount_1","colCount_2","RowCount","ColCount","childGridColWidth","PdfPageTemplateElement","InitiateBounds","dockStyle","resetAlignment","alignmentStyle","setAlignment","isForeground","pdfTemplate","templateType","updateDocking","dock","canBeSet","TopLeft","MiddleLeft","BottomLeft","TopCenter","TopRight","MiddleRight","BottomRight","BottomCenter","MiddleCenter","getAlignmentBounds","getDockBounds","getSimpleAlignmentBounds","getTemplateAlignmentBounds","actualBounds","getSimpleDockBounds","getTemplateDockBounds","PdfNumbersConvertor","intArabic","numberStyle","Numeric","LowerLatin","arabicToLetter","LowerRoman","arabicToRoman","UpperLatin","UpperRoman","retval","retvalM","generateNumber","retvalCM","retvalD","retvalCD","retvalC","retvalXC","retvalL","retvalXL","retvalX","retvalIX","retvalV","retvalIV","retvalI","arabic","convertToLetter","appendChar","magnitude","numberstring","letterLimit","acsiiStartIndex","PdfTemplateValuePair","PdfMultipleValueField","drawLocation","PdfPageNumberField","internalNumberStyle","internalGetValue","PdfCompositeField","internalText","automaticField","PdfSingleValueField","painterGraphics","PdfPageCountField","PdfTrueTypeFont","createFontInternal","getUnicodeLineWidth","calculateStyle","iStyle","equalFont","isEmbed","isUnicodeFont","glyphIndices","resultGlyph","hideColumnInclude","customDataSource","isGrouping","headerOnPages","drawPosition","xPosition","yPosition","pdfPageSettings","exportWithData","processExport","headerPageNumbers","gridDrawPosition","drawPos","processSectionExportProperties","drawHeader","getPageSize","gridTheme","getGridPdfFont","processExportProperties","headerThemeStyle","headerFont","headerBrush","processGridHeaders","setColumnProperties","captionThemeStyle","getSummaryCaptionThemeStyle","processGroupedRecords","processRecord","getFontFamily","getFontStyle","penBrushColor","hexToRgb","borderCaption","getBorderStyle","isTrueType","headerSize","headerStyle","fontFamily_1","captionFont","captionSize","captionStyle","fontFamily_2","recordFont","recordStyle","fontFamily_3","groupIndex","dataSourceItems","captionSummaryModel","isGroupedFooter","eCols","applyTextAndSpan","colIdx","gridHeader","pdfCell","getHorizontalAlignment","getVerticalAlignment","recuHeader","spanCnt","isRoot","cidx","newSpanCnt","fromBottom","drawPageTemplate","fromTop","headerTemplate_1","processContentValidation","drawPageNumber","getBrushFromContent","textPenColor","penColor","setContentFormat","documentHeader","textBrushColor","brushColor","compositeField","pageNumber","getPageNumberStyle","pageNumberType","getPenFromContent","penSize","getDashStyle","isCaption","captionRow","sRows_1","leastCaptionSummaryIndex","getSummaryWithoutTemplate","getTemplateFunction","setRecordThemeStyle","borderRecord","cellLength","textLink","spanCell","gridRow_1","backgroundColor","borderColor","verticalAlign","hex","bigint","FocusStrategy","oneTime","swap","forget","skipFocus","focusByClick","prevIndexes","refMatrix","refreshMatrix","actions","isVirtualScroll","rowModelGen","focusCheck","setActive","enableHeaderFocus","generate","validator","passiveFocus","skipAction","getFocusInfo","elementToFocus","force","beforeArgs","byClick","clickArgs","clearOutline","onKeyPress","skipOn","bValue","outline","swapInfo","jump","toHeader","toFrozen","toFrozenRight","getNextCurrent","active","setActiveByKey","lastIdxCell","clearIndicator","th","inputTarget","filterCell","focusVirtualElement","virtualData","isKeyFocus","fContent","frContent","fHeader","frHeader","setFocusedElement","addFocus","resetFocus","getInfo","focusedColumnUid","FixedContentFocus","FixedRightContentFocus","ContentFocus","FixedHeaderFocus","FixedRightHeaderFocus","HeaderFocus","cFocus","newMovableRows","newFrozenRows","newfrRows","handlerInstance","index_1","bool","focusElement","cellPosition","gridPosition","passiveHandler","restoreFocus","evts","filterfocus","actionsG","restoreFocusWithAction","internalCellFocus","forgetPrevious","getFocusable","allow","emptyTable","inValid","vector","indexesByKey","getCurrentFromAction","editNextRow","isLastCellPrimaryKey","visibleIndex","shouldFocusChange","rN","cN","oRowIndex","oCellIndex","isDirty","nextRowFocusValidate","previousRowFocusValidate","frozenSwap","frSwap","enterFrozen","isHeaderFocus","optionals","defaultLen","isData","isCellWidth","getGridSeletion","headerSwap","fMatrix","current1","current2","hMatrix","current3","SearchBox","searchFocus","searchBlur","headerMat","PositionData","OPEN","Popup","setContent","actionOnScroll","wireScrollEvents","unwireScrollEvents","orientationOnChange","getRelateToElement","relateToElement","targetVisible","isElementOnViewport","targetInvisibleStatus","scrollElement","scrollParents","isElementVisible","checkGetBoundingClientRect","win","windowView","elementView","checkFixedParent","parentDisplay","getAnchorPosition","eleRect","anchorEle","anchorRect","callFlip","callFit","viewPortRect","horz","vert","animationOptions","relativeElement","zIndexElement","getZindexPartial","parentStyle","overflowRegex","parentZindex","childrenZindex","siblingsZindex","finalValue","currentZindexValue","rowDataBound","queryCellInfo","headerCellInfo","dataBound","rowSelecting","rowDeselecting","rowDeselected","cellSelecting","cellSelected","cellDeselecting","cellDeselected","columnSelecting","columnSelected","columnDeselecting","columnDeselected","beforePrint","printComplete","detailDataBound","batchAdd","batchCancel","batchDelete","recordDoubleClick","recordClick","resizeStop","checkBoxChange","beforeCopy","beforePaste","beforeAutoFill","filterChoiceRequest","filterAfterOpen","filterBeforeOpen","filterSearchBegin","exportGroupCaption","initialLoad","uiUpdate","inBoundModelChanged","colGroupRefresh","headerRefreshed","pageComplete","sortComplete","searchComplete","reorderComplete","groupComplete","ungroupComplete","groupAggregates","refreshFooterRenderer","refreshAggregateCell","refreshAggregates","rowSelectionComplete","cellSelectionComplete","beforeCellFocused","cellFocused","keyPressed","columnVisibilityChanged","columnWidthChanged","rowsAdded","columnDragStop","headerDrop","dblclick","toolbarRefresh","bulkSave","autoCol","tooltipDestroy","preventBatch","crudAction","addDeleteAction","doubleTap","beforeExcelExport","excelQueryCellInfo","excelHeaderQueryCellInfo","exportDetailDataBound","beforePdfExport","pdfQueryCellInfo","pdfHeaderQueryCellInfo","freezeRender","filterDialogCreated","filterMenuClose","initForeignKeyColumn","getForeignKeyData","showEmptyGrid","dataStateChange","rtlUpdated","frozenHeight","textWrapRefresh","recordAdded","cancelBegin","editNextValCell","expandChildGrid","printGridInit","exportRowDataBound","exportDataBound","rowPositionChanged","partialRefresh","selectVirtualRow","columnsPrepared","cBoxFltrBegin","cBoxFltrComplete","fltrPrevent","filterCboxValue","componentRendered","detailStateChange","detailIndentCellInfo","virtaulCellFocus","virtualScrollEdit","editReset","getVirtualData","refreshInfiniteModeBlocks","resetInfiniteBlocks","infiniteScrollHandler","infinitePageQuery","infiniteShowHide","appendInfiniteContent","removeInfiniteRows","setInfiniteCache","infiniteEditHandler","initialCollapse","closeFilterDialog","resetColumns","pdfAggregateQueryCellInfo","excelAggregateQueryCellInfo","setGroupCache","lazyLoadScrollHandler","groupCollapse","beforeCheckboxRenderer","refreshHandlers","refreshFrozenColumns","setReorderDestinationElement","setFreezeSelection","beforeRefreshOnDataChange","immutableBatchCancel","checkScrollReset","preventFrozenScrollRefresh","refreshInfiniteCurrentViewData","filterDialogClose","renderResponsiveCmenu","filterCmenuSelect","customFilterClose","setFullScreenDialog","refreshExpandandCollapse","rowModeChange","enterKeyHandler","refreshVirtualMaxPage","ContentRender","freezeRowElements","isLoaded","viewColIndexes","infiniteCache","visibleRows","visibleFrozenRows","rightFreezeRows","isAddRows","isInfiniteFreeze","useGroupCache","mutableData","rafCallback","mContentRows","fContentRows","fHdr","generator","getModelGenerator","droppableDestroy","pressedKey","virtualTable","virtualTrack","createContentTable","initializeContentDrop","currentMovableRows","initialPageRecords","trElement","hdrfrag","tbdy","fCont","virtualInfo","sentinelInfo","borderRightWidth","removeClassByUid","addClassByUid","renderMovableContent","checkCache","setTbody","getTbody","isFrozenLeft","templatetoclear","rootNodes","updateVirtualCells","blockLoad","offsets_1","bSize","blockIndexes","contentPanel","isVFFrozenOnly","bIndex","mhdrData","virtualFrozenHdrRefresh","setRowsInLazyGroup","setInfiniteVisibleRows","rowTemplateID","lastElementChild","isTR","isVFreorder","ensureFrozenHeaderRender","ensureVirtualFrozenHeaderRender","splitRows","getFrozenHeader","parentTable","setIsFrozen","renderNextFrozentPart","maintainRows","initialGroupRows","getCurrentBlockInfiniteRecords","getReorderedVFRows","getReorderedFrozenRows","getReorderedRows","fhdrData","getInfiniteRows","getInfiniteMovableRows","infiniteCacheRows","infiniteRows","testRow","rightRows","rightLen","needFullRefresh","infiniteData","infiniteRowVisibility","contentrows","colG","infiniteFreezeData","mTable","infiniteMovableData","setDisplayNone","trs","getHeaderColGroup","droppable","canSkip","getInfiniteRowIndex","firstRowIndex","oldKeys","newKeys","newRowObjs","oldIndexes","oldRowObjs","batchChangeKeys","getBatchEditedRecords","newIndexes","hasBatch","oldRowElements","currentLen","oldIndex","refreshImmutableContent","isEqual","objectEqualityChecker","setRowValue","old","updateCellIndex","GroupModelGenerator","summaryModelGen","ensureRowVisibility","parentid","childId","isRenderCaption","prevKey","generateCaptionRow","rowCnt","isCaptionRow","aggregatesCount","getCaptionRowCells","visibles","groupedLen","generateIndentCell","captionCells","cIndex_1","tmpFlag","parentID","childID","childGid","gSummary","fkValue","cRow","selectedHandler","minHeight","resizeWestWidth","elementClass","originalWidth","originalX","originalY","originalMouseX","originalMouseY","RESIZE_HANDLER","FOCUSED_HANDLER","RESTRICT_LEFT","RESIZE_WITHIN_VIEWPORT","resizeStart","resize","resizeEnd","setLeft","previousWidth","dialogBorderResize","createResize","resizeBegin","resizing","resizeComplete","getDOMElement","boundary","directions","setBorderResizeElm","resizeHandler","calculateValues","domElement","resizers","onMouseDown","onTouchStart","borderResizers","getEventType","onMouseUp","coordinates","resizeTowards","resizeSouth","resizeNorth","resizeWest","resizeEast","getClientRectValues","containerRectValues","documentHeight","calculateValue","currentpageY","targetRectValues","borderValue","topWithoutborder","targetTop","calculatedTop","boundaryRectValues","currentHeight","rectValues","documentWidth","calculatedWidth","left_1","setMinHeight","minimumHeight","setMaxWidth","setMaxHeight","removeResize","ButtonProps","AnimationSettings","DLG_HEADER_CONTENT","DLG_HEADER","DLG_FOOTER_CONTENT","MODAL_DLG","DLG_CONTENT","DLG_CLOSE_ICON","DLG_OVERLAY","DLG_TARGET","DLG_CONTAINER","SCROLL_DISABLED","DLG_PRIMARY_BUTTON","FULLSCREEN","DLG_CLOSE_ICON_BTN","DLG_HIDE","DLG_SHOW","DLG_UTIL_DEFAULT_TITLE","DLG_UTIL_ROOT","DLG_UTIL_ALERT","DLG_UTIL_CONFIRM","DLG_RESIZABLE","DLG_RESTRICT_LEFT_VALUE","DLG_RESTRICT_WIDTH_VALUE","DLG_REF_ELEMENT","Dialog","initRender","enableResize","setResize","getMinHeight","headerContent","allowMaxHeight","preventVisibility","clonedEle","closeIconClickEventHandler","dlgOverlayClickEventHandler","overlayClickEventArgs","localeText","checkPositionData","prevOnChange","isNumberValue","getEle","computedHeaderHeight","computedFooterHeight","footerEle","headerHeight","footerHeight","onResizeStart","onResizing","onResizeComplete","isBlazorServerRender","computedHeight","computedWidth","resizeHandles","directionValue","toLocaleLowerCase","targetEle","wireWindowResizeEvent","unWireWindowResizeEvent","buttonObj","ftrTemplateContent","focusableElements","isTagName","isContentEdit","primaryButtonEle","buttonIndex_1","firstPrimary","setCSSClass","initialRender","setzIndex","calculatezIndex","setTargetContent","setHeader","setButton","allowDragging","setAllowDragging","setIsModal","dlgContainer","dlgOverlay","refElement","resetResizeIcon","openEventArgs","unBindEvent","closeArgs","activeEle","storeActiveElement","positionChange","setEnableRTL","setOverlayZindex","dialogConHeight","resizeIcon","zIndexValue","handleContent","dragObj","dragEventArgs","buttonContent","buttonType","footerBtn","innerContentElement","sanitizeHelper","templateProps","templateValue","isString","dialogItem","beforeEvent","headerEle","closeIcon","closeIconBtnObj","closeIconTitle","oldCSSClass","getValidFocusNode","disableElement","getAutoFocusNode","validNode","elementMatch","Element","updateSanitizeContent","insertAdjacentHTML","updateIsModal","buttonCount","setTarget","setPopupZindex","windowResizeHandler","classArray","isFullScreen","fullScreen","beforeOpenArgs","openAnimation","beforeCloseArgs","getButtons","DialogUtility","alertDialogObj","dialogElement","okButtonModel","createDialog","alertOptions","confirm","confirmDialogObj","okCancelButtonModel","confirmOptions","dialogObject","formOptions","setAlertButtonModel","setConfirmButtonModel","alertButtonModel","okButton","formButtonModel","cancelButtonModel","cancelButton","buttonPropModel","buttonProps","doesImplementInterface","checkFor","getUpdateUsingRaf","updateFunction","isExportColumns","updateColumnTypeForExportColumns","exportColumns","updatecloneRow","nRows","actualRows","getCollapsedRowsCount","gLen","dataRowCnt","agrCnt","gLevel","recursive","rCount","nLevel","iterateArrayOrObject","iterateExtend","setStyleAndAttributes","copyAttr","exclude","setColumnIndex","ind","prepareColumns","autoWidth","setCssInGridPopUp","popUp","isBottomTail","popUpSpan","targetPosition","getPopupLeftPosition","getPosition","parentsUntil","isID","getElementIndex","inArray","getActualPropFromColl","getUid","appendChildren","parents","calculateAggregate","Global","divNode","isActionPrevent","showConfirmDialog","clName","isServer","addRemoveActiveClasses","getFilterMenuPostion","elementVisible","dlgWidth","leftPos","toogleCheckbox","setChecked","createCboxWithWrap","removeAddCboxClasses","refreshForeignData","getForeignData","lValue","fField","fdata","getDatePredicate","getColumnByForeignKeyValue","filterObject","datePredicate","prevDate","nextDate","prevObj","nextObj","setSeconds","predicateSt","predicateEnd","renderMovable","mEle","isGroupAdaptive","getExpandedState","printMode","getPrintGridModel","printGridModel","extendObjWithFn","getPrototypesOfObj","cpy","cln","measureColumnDepth","checkDepth","indices","refreshFilteredColsUid","ispercentageWidth","percentageCol","undefinedWidthCol","resetRowIndex","rowElms","compareChanges","frozenRightRowElements","gridActionHandler","getCellsByTableName","getCellByColAndRowIndex","mtch_1","addBiggerDialog","dialogs","performComplexDataOperation","mapObject","returnObj","duplicateMap","DataUtil","localeCompare","extractFields","jsonArray","newData","isLazyLoad","groupedArray","getVal","aggs","grp","fKeyData","copyObj","middle","diacritics","fnName","param1","param2","adp","rand","hexs","getItemFromComparer","castRequired","requiresCompleteRecord","sum","average","truecount","falsecount","operatorSymbols","notequal","lessthan","greaterthan","lessthanorequal","greaterthanorequal","notnull","isnull","startswith","endswith","processSymbols","jsonText","jsonReviver","iterateAndReviveArray","iterateAndReviveJson","ms","offSet","toTimeZone","isUTC","utcFormat","hrs","mins","addSelfOffset","jsonReplacer","arrayReplacer","toUTC","utc","unix","datefn","differenceString","localtimefn","norm","CellMergeRender","targetCell_1","colSpanLen","colSpanRange","spanText","backupMergeCells","setMergeCells","generteKey","fname","getMergeCells","mCells","getIndexFromAllColumns","vColumnIndices","ExportHelper","processColumns","columnPromise","fColumns","isHideColumnInclude","processHeaderCells","generateActualColumns","actualColumns","getCellCount","appendGridCells","isIgnoreFirstCell","getGridModel","parentPrimaryKeys","parentKeyField","parentRowData","exportId","actualGridColumns","ExportValueFormatter","internationalization","returnFormattedValue","isServerBlaz","CLS_ROOT","CLS_DISABLE","CLS_HSCROLLBAR","CLS_HSCROLLCON","CLS_NAVARROW","CLS_NAVRIGHTARROW","CLS_NAVLEFTARROW","CLS_HSCROLLNAV","CLS_HSCROLLNAVRIGHT","CLS_HSCROLLNAVLEFT","CLS_DEVICE","CLS_OVERLAY","CLS_RIGHTOVERLAY","CLS_LEFTOVERLAY","OVERLAY_MAXWID","HScroll","browser","browserCheck","customStep","ieCheck","uniqueId","touchHandler","swipe","swipeHandler","scrollEle","createOverlay","createNavIcon","setScrollState","scrollStep","scrollDiv","innerEle_1","ele_1","scrollItems","nav","overlay","navEles","rightOverlayEle","clsRight","navItem","leftEle","eventBinding","clsLeft","navEle","navLeftItem","timeoutFun_1","keyTimeout","eleScrolling","keyTimer","onKeyUp","tabHoldHandler","repeatScroll","clickEventHandler","timeout","scrollDis","timeoutFun","isContinuous","rootEle","frameScrollRequest","swipeEle","scrollUpdating","scrollVal","scrollValue","arrowDisabling","addDisable","removeDisable","arrowIcon","navLeftEle","navRightEle","leftOverlay","rightOverlay","disEle","CLS_VSCROLLBAR","CLS_VSCROLLCON","CLS_NAVUPARROW","CLS_NAVDOWNARROW","CLS_VSCROLLNAV","CLS_VSCROLLNAVUP","CLS_VSCROLLNAVDOWN","CLS_UPOVERLAY","CLS_DOWNOVERLAY","VScroll","scrollEventHandler","createOverlayElement","wheelEventHandler","scrollCnt","navs","overlays","downOverlayEle","clsDown","downEle","upEle","clsUp","navElement","navUpItem","ev","scrollDistance","deltaY","swipeElement","addDisableCls","removeDisableCls","navUpEle","navDownEle","upOverlay","downOverlay","CLS_VERTICAL","CLS_ITEMS","CLS_ITEM","CLS_SEPARATOR","CLS_POPUPICON","CLS_POPUPDOWN","CLS_POPUPOPEN","CLS_TEMPLATE","CLS_POPUPTEXT","CLS_TBARTEXT","CLS_TBAROVERFLOW","CLS_POPOVERFLOW","CLS_TBARBTN","CLS_TBARNAV","CLS_TBARSCRLNAV","CLS_TBARRIGHT","CLS_TBARLEFT","CLS_TBARCENTER","CLS_TBARPOS","CLS_HSCROLLCNT","CLS_VSCROLLCNT","CLS_POPUPNAV","CLS_POPUPCLASS","CLS_POPUP","CLS_TBARBTNTEXT","CLS_TBARNAVACT","CLS_TBARIGNORE","CLS_POPPRI","CLS_HIDDEN","CLS_MULTIROW","CLS_MULTIROWPOS","CLS_MULTIROW_SEPARATOR","CLS_EXTENDABLE_SEPARATOR","CLS_EXTEANDABLE_TOOLBAR","CLS_EXTENDABLECLASS","CLS_EXTENDPOPUP","CLS_EXTENDEDPOPOPEN","resizeContext","moveLeft","moveRight","moveUp","moveDown","popupOpen","popupClose","trgtEle","ctrlTem","clearProperty","popObj","tbarAlign","attrb","enableCollision","tbarItemsCol","isVertical","isExtendedOpen","popupPriCount","wireKeyboardEvent","keyModule","docKeyDown","unwireKeyboardEvent","popCheck","overflowMode","keyCheck","destroyScroll","docEvent","tbarEle","tbarAlgEle","lefts","centers","rights","popEle","destroyItems","tbarItems","destroyMode","tempEle","popupRefresh","elementFocus","fChild","activeEleSwitch","clstElement","tbrNavChk","clst","keyHandling","navChk","scrollChk","popAnimate","eleFocus","popupCheck","popFrstEle","activeEleRemove","tbarScrollChk","eleContains","sib","skipEle","clsList","isPopupElement","popupNav","popupClickHandler","tempItem","clickedArgs","CLS_RTL","getElementOffsetY","renderControl","renderLayout","renderOverflowMode","itemPositioning","checkPopupRefresh","itemsAlign","itemEleDom","innerItem","innerPos","renderSubComponent","tbarItemAlign","showAlwaysInPopup","changeOrientation","initScroll","innerItems","checkOverflow","itemWidthCal","getScrollCntEle","eleWidth","itemWidth","popNav","scrollNav","navEleWidth","toolbarAlign","priorityCheck","offsetWid","removePositioning","setOverflowAttributes","createPopupEle","eleInlineItem","eleItem","multiVar","extendVar","innerNav","createPopupIcon","innerNavDom","checkPriority","pushingPoppedEle","tbarObj","popupPri","eleHeight","sepHeight","nodeIndex","poppedEle","nodePri","tbResize","tbarElement","sepItem","extendEle","popupInit","eleStyles","tbarPopupHandler","toolEle","popupElePos","popIcon","overflowHeight","tbEleData","inEle","pre","checkoffset","popPriority","eleWid","sepCheck","itemPopCount","checkClass","rVal","mrgn","compuStyle","fstEleCheck","tbarEleMrgn","eleWid_1","sepEle","popedEle","tbarPriRef","sepPri","des","elWid","wid","ig","ignoreCount","priEleCnt","eleSep","ignoreCheck","sepDisplay","eleSepWidth","prevSep","previousElementSibling","isVer","dimension","popupEleWidth","popupEleRefresh","ignoreEleFetch","ignoreEle","ignoreInx","tbarWidth","tbarItemsWid","elWidth","btnText","eleSplice","sepBeforePri_1","refreshPositioning","tbarWid","popWid","itemEle","alignDiv","alignEle","leftAlign_1","ctrlTemplate","setAttr","itemElement","getElementByIndex","addItems","extendedOpen","itemsDiv","itemsRerender","itemAgn","items_1","algIndex","removeItems","removeItemByIndex","eleIdx","indexAgn","templateRender","templateProp","isComponent","itemType","toolbarTemplateID","buttonRendering","dom","iconPos","textStr","btnTxt","prefixIcon","suffixIcon","iconPosition","tempDom","tooltipText","itemClick","showTextOn","sTxt","multirowele","tEle","changedProb","popupPriCheck","booleanCheck","itemCol","hideItem","initIndex","eleIndex","innerItems_1","innerItems_2","nextEle","setFlag","removeFlag","initELe","predefinedItems","gridID","preItems_1","itemStr","localeName","ColumnChooser","responsiveFilter","responsiveSort","responsiveBack","createToolbar","addReactToolbarPortals","bindSearchEvents","searchElement","refreshToolbarItems","updateSearchBox","toolbarCreated","isNormal","getResponsiveToolbarItems","clicked","toolbarClickHandler","viewStr","registerTemp","ID","renderResponsiveSearch","isRender","refreshResponsiveToolbarItems","isSearch","searchBoxObj","disableItems","hasData","toolbarItems_1","getItemObject","itemObject","items_2","gID","newArgs","toolbarargs","tarElement","reRenderToolbar","removeResponsiveSearch","rowSelectedFunction","rowDeSelectedFunction","isModelChanged","sortedColumn","getSortedColsIndexByField","sCol","getSortColumnFromField","lastSortedCol","backupSettings","removeSortIcons","updateSortedCols","lastSortedCols","lastCols","restoreSettings","refreshSortSettings","addSortIcons","sortColumns","gObj_1","colObj","initiateSort","showPopUp","colUid","allowUnsort","enableSortMultiTouch","filterElement","updateAriaAttr","isValDiff","makechanges","extension","mimeType","getMimeType","downloadLink","hasDownloadAttribute","isPopupBlocked","onloadend","readAsDataURL","Encoding","emitBOM","encodingType","initBOM","getByteCount","validateNullOrUndefined","utf8Len","getByteCountInternal","codePoint","isHighSurrogate","codeUnit","toCodepoint","highCodeUnit","lowCodeUnit","charIndex","charCount","byteCount","isUtf8","high","getBytesOfUtf8Encoding","getBytesOfUnicodeEncoding","getBytesOfAnsiEncoding","byteCal","getStringOfUtf8Encoding","byteUnicode","getStringofUnicodeEncoding","bufview","charcode","uint16","byteUni","byte16","cssClassName","BUTTON","PRIMARY","ICONBTN","Button","removeRippleEffect","tempContent","setIconCss","controlStatus","btnClickHandler"],"mappings":"kHAAA,oPAAIA,EAAwC,WACxC,IAAIC,EAAgB,SAAUC,EAAGC,GAI7B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,KAClEP,EAAcC,EAAGC,IAE5B,OAAO,SAAUD,E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P,IAAO,KACP,IAAO,QACP,IAAO,QACP,IAAO,QACP,IAAO,QACP,IAAO,OACP,IAAO,QACP,IAAO,QACP,IAAO,QACP,IAAO,OACP,IAAO,IACP,IAAO,IACP,IAAO,QACP,IAAO,QACP,IAAO,QACP,IAAO,IACP,IAAO,IACP,IAAO,MACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,KACP,IAAO,IACP,IAAO,MACP,IAAO,IACP,IAAO,MACP,IAAO,IACP,IAAO,IACP,IAAO,KACP,IAAO,MACP,IAAO,IACP,IAAO,KACP,IAAO,IACP,IAAO,MACP,IAAO,MACP,IAAO,MACP,IAAO,KACP,IAAO,MACP,IAAO,MACP,IAAO,IACP,IAAO,IACP,IAAO,MACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,KACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,KACP,IAAO,OACP,IAAO,KACP,IAAO,KACP,IAAO,KACP,IAAO,IACP,IAAO,IACP,IAAO,KACP,IAAO,KACP,IAAO,IACP,IAAO,KACP,IAAO,KACP,IAAO,IACP,IAAO,IACP,IAAO,KACP,IAAO,OACP,IAAO,IACP,IAAO,KACP,IAAO,IACP,IAAO,KACP,IAAO,MACP,IAAO,IACP,IAAO,KACP,IAAO,KACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,KACP,IAAO,MACP,IAAO,KACP,IAAO,IACP,IAAO,IACP,IAAO,OACP,IAAO,OACP,IAAO,KACP,IAAO,KACP,IAAO,IACP,IAAO,OACP,IAAO,KACP,IAAO,KACP,IAAO,IACP,IAAO,KACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,IACP,IAAO,MACP,IAAO,KACP,IAAO,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,KAAM,aACN,KAAM,cACN,SAAY,WACZ,WAAc,aACd,SAAY,eAMhB+lS,EAAS9lS,gBAAkB,CACvB,KAAM,WACN,KAAM,aACN,KAAM,WACN,SAAY,WACZ,WAAc,aACd,SAAY,YAEhB8lS,EAASa,WAAa,CAClB,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,I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iiB,QAAQgD,SAEjBstB,EAAW,CACP,eAAS,SACVolR,EAAOz3T,UAAW,oBAAgB,GACrCqyC,EAAW,CACP,eAAS,KACVolR,EAAOz3T,UAAW,eAAW,GAChCqyC,EAAW,CACP,gBAAS,IACVolR,EAAOz3T,UAAW,gBAAY,GACjCqyC,EAAW,CACP,gBAAS,IACVolR,EAAOz3T,UAAW,iBAAa,GAClCqyC,EAAW,CACP,eAAS,KACVolR,EAAOz3T,UAAW,gBAAY,GACjCqyC,EAAW,CACP,eAAS,KACVolR,EAAOz3T,UAAW,eAAW,GAChCqyC,EAAW,CACP,gBAAS,IACVolR,EAAOz3T,UAAW,gBAAY,GACjCqyC,EAAW,CACP,kBACDolR,EAAOz3T,UAAW,cAAU,GAC/BqyC,EAAW,CACP,gBAAS,IACVolR,EAAOz3T,UAAW,2BAAuB,GAC5CqyC,EAAW,CACP,kBACDolR,EAAOz3T,UAAW,eAAW,GAChCy3T,EAASplR,EAAW,CAChB,QACDolR,GACIA,EA9RgB,CA+RzB","file":"js/chunk-01939a7a.6d4fb314.js","sourcesContent":["var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { merge, extend, isNullOrUndefined, setValue, getValue } from '@syncfusion/ej2-base';\nimport { DataUtil } from './util';\nimport { Query, Predicate } from './query';\nvar consts = { GroupGuid: '{271bbba0-1ee7}' };\n/**\n * Adaptors are specific data source type aware interfaces that are used by DataManager to communicate with DataSource.\n * This is the base adaptor class that other adaptors can extend.\n * @hidden\n */\nvar Adaptor = /** @class */ (function () {\n /**\n * Constructor for Adaptor class\n * @param {DataOptions} ds?\n * @hidden\n * @returns aggregates\n */\n function Adaptor(ds) {\n // common options for all the adaptors \n this.options = {\n from: 'table',\n requestType: 'json',\n sortBy: 'sorted',\n select: 'select',\n skip: 'skip',\n group: 'group',\n take: 'take',\n search: 'search',\n count: 'requiresCounts',\n where: 'where',\n aggregates: 'aggregates',\n expand: 'expand'\n };\n /**\n * Specifies the type of adaptor.\n * @default Adaptor\n */\n this.type = Adaptor;\n this.dataSource = ds;\n this.pvt = {};\n }\n /**\n * Returns the data from the query processing.\n * @param {Object} data\n * @param {DataOptions} ds?\n * @param {Query} query?\n * @param {XMLHttpRequest} xhr?\n * @returns Object\n */\n Adaptor.prototype.processResponse = function (data, ds, query, xhr) {\n return data;\n };\n return Adaptor;\n}());\nexport { Adaptor };\n/**\n * JsonAdaptor is used to process JSON data. It contains methods to process the given JSON data based on the queries.\n * @hidden\n */\nvar JsonAdaptor = /** @class */ (function (_super) {\n __extends(JsonAdaptor, _super);\n function JsonAdaptor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Process the JSON data based on the provided queries.\n * @param {DataManager} dataManager\n * @param {Query} query\n * @returns Object\n */\n JsonAdaptor.prototype.processQuery = function (dataManager, query) {\n var result = dataManager.dataSource.json.slice(0);\n var count = result.length;\n var countFlg = true;\n var ret;\n var key;\n var lazyLoad = {};\n var keyCount = 0;\n var group = [];\n var page;\n for (var i = 0; i < query.lazyLoad.length; i++) {\n keyCount++;\n lazyLoad[query.lazyLoad[i].key] = query.lazyLoad[i].value;\n }\n var agg = {};\n for (var i = 0; i < query.queries.length; i++) {\n key = query.queries[i];\n if ((key.fn === 'onPage' || key.fn === 'onGroup') && query.lazyLoad.length) {\n if (key.fn === 'onGroup') {\n group.push(key.e);\n }\n if (key.fn === 'onPage') {\n page = key.e;\n }\n continue;\n }\n ret = this[key.fn].call(this, result, key.e, query);\n if (key.fn === 'onAggregates') {\n agg[key.e.field + ' - ' + key.e.type] = ret;\n }\n else {\n result = ret !== undefined ? ret : result;\n }\n if (key.fn === 'onPage' || key.fn === 'onSkip' || key.fn === 'onTake' || key.fn === 'onRange') {\n countFlg = false;\n }\n if (countFlg) {\n count = result.length;\n }\n }\n if (keyCount) {\n var args = {\n query: query, lazyLoad: lazyLoad, result: result, group: group, page: page\n };\n var lazyLoadData = this.lazyLoadGroup(args);\n result = lazyLoadData.result;\n count = lazyLoadData.count;\n }\n if (query.isCountRequired) {\n result = {\n result: result,\n count: count,\n aggregates: agg\n };\n }\n return result;\n };\n /**\n * Perform lazy load grouping in JSON array based on the given query and lazy load details.\n * @param {LazyLoadGroupArgs} args\n */\n JsonAdaptor.prototype.lazyLoadGroup = function (args) {\n var count = 0;\n var agg = this.getAggregate(args.query);\n var result = args.result;\n if (!isNullOrUndefined(args.lazyLoad.onDemandGroupInfo)) {\n var req = args.lazyLoad.onDemandGroupInfo;\n for (var i = req.where.length - 1; i >= 0; i--) {\n result = this.onWhere(result, req.where[i]);\n }\n if (args.group.length !== req.level) {\n var field = args.group[req.level].fieldName;\n result = DataUtil.group(result, field, agg, null, null, args.group[0].comparer, true);\n }\n count = result.length;\n var data = result;\n result = result.slice(req.skip);\n result = result.slice(0, req.take);\n if (args.group.length !== req.level) {\n this.formGroupResult(result, data);\n }\n }\n else {\n var field = args.group[0].fieldName;\n result = DataUtil.group(result, field, agg, null, null, args.group[0].comparer, true);\n count = result.length;\n var data = result;\n if (args.page) {\n result = this.onPage(result, args.page, args.query);\n }\n this.formGroupResult(result, data);\n }\n return { result: result, count: count };\n };\n JsonAdaptor.prototype.formGroupResult = function (result, data) {\n if (result.length && data.length) {\n var uid = 'GroupGuid';\n var childLevel = 'childLevels';\n var level = 'level';\n var records = 'records';\n result[uid] = data[uid];\n result[childLevel] = data[childLevel];\n result[level] = data[level];\n result[records] = data[records];\n }\n return result;\n };\n /**\n * Separate the aggregate query from the given queries\n * @param {Query} query\n */\n JsonAdaptor.prototype.getAggregate = function (query) {\n var aggQuery = Query.filterQueries(query.queries, 'onAggregates');\n var agg = [];\n if (aggQuery.length) {\n var tmp = void 0;\n for (var i = 0; i < aggQuery.length; i++) {\n tmp = aggQuery[i].e;\n agg.push({ type: tmp.type, field: DataUtil.getValue(tmp.field, query) });\n }\n }\n return agg;\n };\n /**\n * Performs batch update in the JSON array which add, remove and update records.\n * @param {DataManager} dm\n * @param {CrudOptions} changes\n * @param {RemoteArgs} e\n */\n JsonAdaptor.prototype.batchRequest = function (dm, changes, e) {\n var i;\n var deletedRecordsLen = changes.deletedRecords.length;\n for (i = 0; i < changes.addedRecords.length; i++) {\n this.insert(dm, changes.addedRecords[i]);\n }\n for (i = 0; i < changes.changedRecords.length; i++) {\n this.update(dm, e.key, changes.changedRecords[i]);\n }\n for (i = 0; i < deletedRecordsLen; i++) {\n this.remove(dm, e.key, changes.deletedRecords[i]);\n }\n return changes;\n };\n /**\n * Performs filter operation with the given data and where query.\n * @param {Object[]} ds\n * @param {{validate:Function}} e\n */\n JsonAdaptor.prototype.onWhere = function (ds, e) {\n if (!ds || !ds.length) {\n return ds;\n }\n return ds.filter(function (obj) {\n if (e) {\n return e.validate(obj);\n }\n });\n };\n /**\n * Returns aggregate function based on the aggregate type.\n * @param {Object[]} ds\n * @param {{field:string} e\n * @param {string}} type\n */\n JsonAdaptor.prototype.onAggregates = function (ds, e) {\n var fn = DataUtil.aggregates[e.type];\n if (!ds || !fn || ds.length === 0) {\n return null;\n }\n return fn(ds, e.field);\n };\n /**\n * Performs search operation based on the given query.\n * @param {Object[]} ds\n * @param {QueryOptions} e\n */\n JsonAdaptor.prototype.onSearch = function (ds, e) {\n if (!ds || !ds.length) {\n return ds;\n }\n if (e.fieldNames.length === 0) {\n DataUtil.getFieldList(ds[0], e.fieldNames);\n }\n return ds.filter(function (obj) {\n for (var j = 0; j < e.fieldNames.length; j++) {\n if (e.comparer.call(obj, DataUtil.getObject(e.fieldNames[j], obj), e.searchKey, e.ignoreCase, e.ignoreAccent)) {\n return true;\n }\n }\n return false;\n });\n };\n /**\n * Sort the data with given direction and field.\n * @param {Object[]} ds\n * @param {{comparer:(a:Object} e\n * @param {Object} b\n */\n JsonAdaptor.prototype.onSortBy = function (ds, e, query) {\n if (!ds || !ds.length) {\n return ds;\n }\n var fnCompare;\n var field = DataUtil.getValue(e.fieldName, query);\n if (!field) {\n return ds.sort(e.comparer);\n }\n if (field instanceof Array) {\n field = field.slice(0);\n for (var i = field.length - 1; i >= 0; i--) {\n if (!field[i]) {\n continue;\n }\n fnCompare = e.comparer;\n if (DataUtil.endsWith(field[i], ' desc')) {\n fnCompare = DataUtil.fnSort('descending');\n field[i] = field[i].replace(' desc', '');\n }\n ds = DataUtil.sort(ds, field[i], fnCompare);\n }\n return ds;\n }\n return DataUtil.sort(ds, field, e.comparer);\n };\n /**\n * Group the data based on the given query.\n * @param {Object[]} ds\n * @param {QueryOptions} e\n * @param {Query} query\n */\n JsonAdaptor.prototype.onGroup = function (ds, e, query) {\n if (!ds || !ds.length) {\n return ds;\n }\n var agg = this.getAggregate(query);\n return DataUtil.group(ds, DataUtil.getValue(e.fieldName, query), agg, null, null, e.comparer);\n };\n /**\n * Retrieves records based on the given page index and size.\n * @param {Object[]} ds\n * @param {{pageSize:number} e\n * @param {number}} pageIndex\n * @param {Query} query\n */\n JsonAdaptor.prototype.onPage = function (ds, e, query) {\n var size = DataUtil.getValue(e.pageSize, query);\n var start = (DataUtil.getValue(e.pageIndex, query) - 1) * size;\n var end = start + size;\n if (!ds || !ds.length) {\n return ds;\n }\n return ds.slice(start, end);\n };\n /**\n * Retrieves records based on the given start and end index from query.\n * @param {Object[]} ds\n * @param {{start:number} e\n * @param {number}} end\n */\n JsonAdaptor.prototype.onRange = function (ds, e) {\n if (!ds || !ds.length) {\n return ds;\n }\n return ds.slice(DataUtil.getValue(e.start), DataUtil.getValue(e.end));\n };\n /**\n * Picks the given count of records from the top of the datasource.\n * @param {Object[]} ds\n * @param {{nos:number}} e\n */\n JsonAdaptor.prototype.onTake = function (ds, e) {\n if (!ds || !ds.length) {\n return ds;\n }\n return ds.slice(0, DataUtil.getValue(e.nos));\n };\n /**\n * Skips the given count of records from the data source.\n * @param {Object[]} ds\n * @param {{nos:number}} e\n */\n JsonAdaptor.prototype.onSkip = function (ds, e) {\n if (!ds || !ds.length) {\n return ds;\n }\n return ds.slice(DataUtil.getValue(e.nos));\n };\n /**\n * Selects specified columns from the data source.\n * @param {Object[]} ds\n * @param {{fieldNames:string}} e\n */\n JsonAdaptor.prototype.onSelect = function (ds, e) {\n if (!ds || !ds.length) {\n return ds;\n }\n return DataUtil.select(ds, DataUtil.getValue(e.fieldNames));\n };\n /**\n * Inserts new record in the table.\n * @param {DataManager} dm\n * @param {Object} data\n * @param {number} position\n */\n JsonAdaptor.prototype.insert = function (dm, data, tableName, query, position) {\n if (isNullOrUndefined(position)) {\n return dm.dataSource.json.push(data);\n }\n else {\n return dm.dataSource.json.splice(position, 0, data);\n }\n };\n /**\n * Remove the data from the dataSource based on the key field value.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {Object} value\n * @param {string} tableName?\n * @returns null\n */\n JsonAdaptor.prototype.remove = function (dm, keyField, value, tableName) {\n var ds = dm.dataSource.json;\n var i;\n if (typeof value === 'object' && !(value instanceof Date)) {\n value = DataUtil.getObject(keyField, value);\n }\n for (i = 0; i < ds.length; i++) {\n if (DataUtil.getObject(keyField, ds[i]) === value) {\n break;\n }\n }\n return i !== ds.length ? ds.splice(i, 1) : null;\n };\n /**\n * Updates existing record and saves the changes to the table.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {Object} value\n * @param {string} tableName?\n * @returns null\n */\n JsonAdaptor.prototype.update = function (dm, keyField, value, tableName) {\n var ds = dm.dataSource.json;\n var i;\n var key;\n if (!isNullOrUndefined(keyField)) {\n key = getValue(keyField, value);\n }\n for (i = 0; i < ds.length; i++) {\n if (!isNullOrUndefined(keyField) && (getValue(keyField, ds[i])) === key) {\n break;\n }\n }\n return i < ds.length ? merge(ds[i], value) : null;\n };\n return JsonAdaptor;\n}(Adaptor));\nexport { JsonAdaptor };\n/**\n * URL Adaptor of DataManager can be used when you are required to use remote service to retrieve data.\n * It interacts with server-side for all DataManager Queries and CRUD operations.\n * @hidden\n */\nvar UrlAdaptor = /** @class */ (function (_super) {\n __extends(UrlAdaptor, _super);\n function UrlAdaptor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Process the query to generate request body.\n * @param {DataManager} dm\n * @param {Query} query\n * @param {Object[]} hierarchyFilters?\n * @returns p\n */\n // tslint:disable-next-line:max-func-body-length\n UrlAdaptor.prototype.processQuery = function (dm, query, hierarchyFilters) {\n var queries = this.getQueryRequest(query);\n var singles = Query.filterQueryLists(query.queries, ['onSelect', 'onPage', 'onSkip', 'onTake', 'onRange']);\n var params = query.params;\n var url = dm.dataSource.url;\n var temp;\n var skip;\n var take = null;\n var options = this.options;\n var request = { sorts: [], groups: [], filters: [], searches: [], aggregates: [] };\n // calc Paging & Range\n if ('onPage' in singles) {\n temp = singles.onPage;\n skip = DataUtil.getValue(temp.pageIndex, query);\n take = DataUtil.getValue(temp.pageSize, query);\n skip = (skip - 1) * take;\n }\n else if ('onRange' in singles) {\n temp = singles.onRange;\n skip = temp.start;\n take = temp.end - temp.start;\n }\n // Sorting\n for (var i = 0; i < queries.sorts.length; i++) {\n temp = DataUtil.getValue(queries.sorts[i].e.fieldName, query);\n request.sorts.push(DataUtil.callAdaptorFunction(this, 'onEachSort', { name: temp, direction: queries.sorts[i].e.direction }, query));\n }\n // hierarchy\n if (hierarchyFilters) {\n temp = this.getFiltersFrom(hierarchyFilters, query);\n if (temp) {\n request.filters.push(DataUtil.callAdaptorFunction(this, 'onEachWhere', temp.toJson(), query));\n }\n }\n // Filters\n for (var i = 0; i < queries.filters.length; i++) {\n request.filters.push(DataUtil.callAdaptorFunction(this, 'onEachWhere', queries.filters[i].e.toJson(), query));\n var keys_3 = typeof request.filters[i] === 'object' ? Object.keys(request.filters[i]) : [];\n for (var _i = 0, keys_1 = keys_3; _i < keys_1.length; _i++) {\n var prop = keys_1[_i];\n if (DataUtil.isNull((request)[prop])) {\n delete request[prop];\n }\n }\n }\n // Searches\n for (var i = 0; i < queries.searches.length; i++) {\n temp = queries.searches[i].e;\n request.searches.push(DataUtil.callAdaptorFunction(this, 'onEachSearch', {\n fields: temp.fieldNames,\n operator: temp.operator,\n key: temp.searchKey,\n ignoreCase: temp.ignoreCase\n }, query));\n }\n // Grouping\n for (var i = 0; i < queries.groups.length; i++) {\n request.groups.push(DataUtil.getValue(queries.groups[i].e.fieldName, query));\n }\n // aggregates\n for (var i = 0; i < queries.aggregates.length; i++) {\n temp = queries.aggregates[i].e;\n request.aggregates.push({ type: temp.type, field: DataUtil.getValue(temp.field, query) });\n }\n var req = {};\n this.getRequestQuery(options, query, singles, request, req);\n // Params\n DataUtil.callAdaptorFunction(this, 'addParams', { dm: dm, query: query, params: params, reqParams: req });\n if (query.lazyLoad.length) {\n for (var i = 0; i < query.lazyLoad.length; i++) {\n req[query.lazyLoad[i].key] = query.lazyLoad[i].value;\n }\n }\n // cleanup\n var keys = Object.keys(req);\n for (var _a = 0, keys_2 = keys; _a < keys_2.length; _a++) {\n var prop = keys_2[_a];\n if (DataUtil.isNull(req[prop]) || req[prop] === '' || req[prop].length === 0) {\n delete req[prop];\n }\n }\n if (!(options.skip in req && options.take in req) && take !== null) {\n req[options.skip] = DataUtil.callAdaptorFunction(this, 'onSkip', skip, query);\n req[options.take] = DataUtil.callAdaptorFunction(this, 'onTake', take, query);\n }\n var p = this.pvt;\n this.pvt = {};\n if (this.options.requestType === 'json') {\n return {\n data: JSON.stringify(req, DataUtil.parse.jsonDateReplacer),\n url: url,\n pvtData: p,\n type: 'POST',\n contentType: 'application/json; charset=utf-8'\n };\n }\n temp = this.convertToQueryString(req, query, dm);\n temp = (dm.dataSource.url.indexOf('?') !== -1 ? '&' : '/') + temp;\n return {\n type: 'GET', url: temp.length ? url.replace(/\\/*$/, temp) : url, pvtData: p\n };\n };\n UrlAdaptor.prototype.getRequestQuery = function (options, query, singles, request, request1) {\n var param = 'param';\n var req = request1;\n req[options.from] = query.fromTable;\n if (options.apply && query.distincts.length) {\n req[options.apply] = 'onDistinct' in this ? DataUtil.callAdaptorFunction(this, 'onDistinct', query.distincts) : '';\n }\n if (!query.distincts.length && options.expand) {\n req[options.expand] = 'onExpand' in this && 'onSelect' in singles ?\n DataUtil.callAdaptorFunction(this, 'onExpand', { selects: DataUtil.getValue(singles.onSelect.fieldNames, query), expands: query.expands }, query) : query.expands;\n }\n req[options.select] = 'onSelect' in singles && !query.distincts.length ?\n DataUtil.callAdaptorFunction(this, 'onSelect', DataUtil.getValue(singles.onSelect.fieldNames, query), query) : '';\n req[options.count] = query.isCountRequired ? DataUtil.callAdaptorFunction(this, 'onCount', query.isCountRequired, query) : '';\n req[options.search] = request.searches.length ? DataUtil.callAdaptorFunction(this, 'onSearch', request.searches, query) : '';\n req[options.skip] = 'onSkip' in singles ?\n DataUtil.callAdaptorFunction(this, 'onSkip', DataUtil.getValue(singles.onSkip.nos, query), query) : '';\n req[options.take] = 'onTake' in singles ?\n DataUtil.callAdaptorFunction(this, 'onTake', DataUtil.getValue(singles.onTake.nos, query), query) : '';\n req[options.where] = request.filters.length || request.searches.length ?\n DataUtil.callAdaptorFunction(this, 'onWhere', request.filters, query) : '';\n req[options.sortBy] = request.sorts.length ? DataUtil.callAdaptorFunction(this, 'onSortBy', request.sorts, query) : '';\n req[options.group] = request.groups.length ? DataUtil.callAdaptorFunction(this, 'onGroup', request.groups, query) : '';\n req[options.aggregates] = request.aggregates.length ?\n DataUtil.callAdaptorFunction(this, 'onAggregates', request.aggregates, query) : '';\n req[param] = [];\n };\n /**\n * Convert the object from processQuery to string which can be added query string.\n * @param {Object} req\n * @param {Query} query\n * @param {DataManager} dm\n */\n UrlAdaptor.prototype.convertToQueryString = function (request, query, dm) {\n return '';\n // this needs to be overridden\n };\n /**\n * Return the data from the data manager processing.\n * @param {DataResult} data\n * @param {DataOptions} ds?\n * @param {Query} query?\n * @param {XMLHttpRequest} xhr?\n * @param {Object} request?\n * @param {CrudOptions} changes?\n */\n UrlAdaptor.prototype.processResponse = function (data, ds, query, xhr, request, changes) {\n if (xhr && xhr.getResponseHeader('Content-Type') &&\n xhr.getResponseHeader('Content-Type').indexOf('application/json') !== -1) {\n var handleTimeZone = DataUtil.timeZoneHandling;\n if (ds && !ds.timeZoneHandling) {\n DataUtil.timeZoneHandling = false;\n }\n data = DataUtil.parse.parseJson(data);\n DataUtil.timeZoneHandling = handleTimeZone;\n }\n var requests = request;\n var pvt = requests.pvtData || {};\n var groupDs = data ? data.groupDs : [];\n if (xhr && xhr.getResponseHeader('Content-Type') &&\n xhr.getResponseHeader('Content-Type').indexOf('xml') !== -1) {\n return (query.isCountRequired ? { result: [], count: 0 } : []);\n }\n var d = JSON.parse(requests.data);\n if (d && d.action === 'batch' && data && data.addedRecords) {\n changes.addedRecords = data.addedRecords;\n return changes;\n }\n if (data && data.d) {\n data = data.d;\n }\n var args = {};\n if (data && 'count' in data) {\n args.count = data.count;\n }\n args.result = data && data.result ? data.result : data;\n var isExpand = false;\n if (Array.isArray(data.result) && data.result.length) {\n var key = 'key';\n var val = 'value';\n var level = 'level';\n if (!isNullOrUndefined(data.result[0][key])) {\n args.result = this.formRemoteGroupedData(args.result, 1, pvt.groups.length - 1);\n }\n if (query && query.lazyLoad.length && pvt.groups.length) {\n for (var i = 0; i < query.lazyLoad.length; i++) {\n if (query.lazyLoad[i][key] === 'onDemandGroupInfo') {\n var value = query.lazyLoad[i][val][level];\n if (pvt.groups.length === value) {\n isExpand = true;\n }\n }\n }\n }\n }\n if (!isExpand) {\n this.getAggregateResult(pvt, data, args, groupDs, query);\n }\n return DataUtil.isNull(args.count) ? args.result : { result: args.result, count: args.count, aggregates: args.aggregates };\n };\n UrlAdaptor.prototype.formRemoteGroupedData = function (data, level, childLevel) {\n for (var i = 0; i < data.length; i++) {\n if (data[i].items.length && Object.keys(data[i].items[0]).indexOf('key') > -1) {\n this.formRemoteGroupedData(data[i].items, level + 1, childLevel - 1);\n }\n }\n var uid = 'GroupGuid';\n var childLvl = 'childLevels';\n var lvl = 'level';\n var records = 'records';\n data[uid] = consts[uid];\n data[lvl] = level;\n data[childLvl] = childLevel;\n data[records] = data[0].items.length ? this.getGroupedRecords(data, !isNullOrUndefined(data[0].items[records])) : [];\n return data;\n };\n UrlAdaptor.prototype.getGroupedRecords = function (data, hasRecords) {\n var childGroupedRecords = [];\n var records = 'records';\n for (var i = 0; i < data.length; i++) {\n if (!hasRecords) {\n for (var j = 0; j < data[i].items.length; j++) {\n childGroupedRecords.push(data[i].items[j]);\n }\n }\n else {\n childGroupedRecords = childGroupedRecords.concat(data[i].items[records]);\n }\n }\n return childGroupedRecords;\n };\n /**\n * Add the group query to the adaptor`s option.\n * @param {Object[]} e\n * @returns void\n */\n UrlAdaptor.prototype.onGroup = function (e) {\n this.pvt.groups = e;\n return e;\n };\n /**\n * Add the aggregate query to the adaptor`s option.\n * @param {Aggregates[]} e\n * @returns void\n */\n UrlAdaptor.prototype.onAggregates = function (e) {\n this.pvt.aggregates = e;\n };\n /**\n * Prepare the request body based on the newly added, removed and updated records.\n * The result is used by the batch request.\n * @param {DataManager} dm\n * @param {CrudOptions} changes\n * @param {Object} e\n */\n UrlAdaptor.prototype.batchRequest = function (dm, changes, e, query, original) {\n var url;\n var key;\n return {\n type: 'POST',\n url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.removeUrl || dm.dataSource.url,\n contentType: 'application/json; charset=utf-8',\n dataType: 'json',\n data: JSON.stringify(extend({}, {\n changed: changes.changedRecords,\n added: changes.addedRecords,\n deleted: changes.deletedRecords,\n action: 'batch',\n table: e[url],\n key: e[key]\n }, DataUtil.getAddParams(this, dm, query)))\n };\n };\n /**\n * Method will trigger before send the request to server side.\n * Used to set the custom header or modify the request options.\n * @param {DataManager} dm\n * @param {XMLHttpRequest} request\n * @returns void\n */\n UrlAdaptor.prototype.beforeSend = function (dm, request) {\n // need to extend this method\n };\n /**\n * Prepare and returns request body which is used to insert a new record in the table.\n * @param {DataManager} dm\n * @param {Object} data\n * @param {string} tableName\n */\n UrlAdaptor.prototype.insert = function (dm, data, tableName, query) {\n return {\n url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,\n data: JSON.stringify(extend({}, {\n value: data,\n table: tableName,\n action: 'insert'\n }, DataUtil.getAddParams(this, dm, query)))\n };\n };\n /**\n * Prepare and return request body which is used to remove record from the table.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {number|string} value\n * @param {string} tableName\n */\n UrlAdaptor.prototype.remove = function (dm, keyField, value, tableName, query) {\n return {\n type: 'POST',\n url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,\n data: JSON.stringify(extend({}, {\n key: value,\n keyColumn: keyField,\n table: tableName,\n action: 'remove'\n }, DataUtil.getAddParams(this, dm, query)))\n };\n };\n /**\n * Prepare and return request body which is used to update record.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {Object} value\n * @param {string} tableName\n */\n UrlAdaptor.prototype.update = function (dm, keyField, value, tableName, query) {\n return {\n type: 'POST',\n url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,\n data: JSON.stringify(extend({}, {\n value: value,\n action: 'update',\n keyColumn: keyField,\n key: DataUtil.getObject(keyField, value),\n table: tableName\n }, DataUtil.getAddParams(this, dm, query)))\n };\n };\n /**\n * To generate the predicate based on the filtered query.\n * @param {Object[]|string[]|number[]} data\n * @param {Query} query\n * @hidden\n */\n UrlAdaptor.prototype.getFiltersFrom = function (data, query) {\n var key = query.fKey;\n var value;\n var prop = key;\n var pKey = query.key;\n var predicats = [];\n if (typeof data[0] !== 'object') {\n prop = null;\n }\n for (var i = 0; i < data.length; i++) {\n if (typeof data[0] === 'object') {\n value = DataUtil.getObject(pKey || prop, data[i]);\n }\n else {\n value = data[i];\n }\n predicats.push(new Predicate(key, 'equal', value));\n }\n return Predicate.or(predicats);\n };\n UrlAdaptor.prototype.getAggregateResult = function (pvt, data, args, groupDs, query) {\n var pData = data;\n if (data && data.result) {\n pData = data.result;\n }\n if (pvt && pvt.aggregates && pvt.aggregates.length) {\n var agg = pvt.aggregates;\n var fn = void 0;\n var aggregateData = pData;\n var res = {};\n if (data.aggregate) {\n aggregateData = data.aggregate;\n }\n for (var i = 0; i < agg.length; i++) {\n fn = DataUtil.aggregates[agg[i].type];\n if (fn) {\n res[agg[i].field + ' - ' + agg[i].type] = fn(aggregateData, agg[i].field);\n }\n }\n args.aggregates = res;\n }\n var key = 'key';\n var isServerGrouping = Array.isArray(data.result) && data.result.length && !isNullOrUndefined(data.result[0][key]);\n if (pvt && pvt.groups && pvt.groups.length && !isServerGrouping) {\n var groups = pvt.groups;\n for (var i = 0; i < groups.length; i++) {\n var level = null;\n if (!isNullOrUndefined(groupDs)) {\n groupDs = DataUtil.group(groupDs, groups[i]);\n }\n var groupQuery = Query.filterQueries(query.queries, 'onGroup')[i].e;\n pData = DataUtil.group(pData, groups[i], pvt.aggregates, level, groupDs, groupQuery.comparer);\n }\n args.result = pData;\n }\n return args;\n };\n UrlAdaptor.prototype.getQueryRequest = function (query) {\n var req = { sorts: [], groups: [], filters: [], searches: [], aggregates: [] };\n req.sorts = Query.filterQueries(query.queries, 'onSortBy');\n req.groups = Query.filterQueries(query.queries, 'onGroup');\n req.filters = Query.filterQueries(query.queries, 'onWhere');\n req.searches = Query.filterQueries(query.queries, 'onSearch');\n req.aggregates = Query.filterQueries(query.queries, 'onAggregates');\n return req;\n };\n UrlAdaptor.prototype.addParams = function (options) {\n var req = options.reqParams;\n if (options.params.length) {\n req.params = {};\n }\n for (var _i = 0, _a = options.params; _i < _a.length; _i++) {\n var tmp = _a[_i];\n if (req[tmp.key]) {\n throw new Error('Query() - addParams: Custom Param is conflicting other request arguments');\n }\n req[tmp.key] = tmp.value;\n if (tmp.fn) {\n req[tmp.key] = tmp.fn.call(options.query, tmp.key, options.query, options.dm);\n }\n req.params[tmp.key] = req[tmp.key];\n }\n };\n return UrlAdaptor;\n}(Adaptor));\nexport { UrlAdaptor };\n/**\n * OData Adaptor that is extended from URL Adaptor, is used for consuming data through OData Service.\n * @hidden\n */\nvar ODataAdaptor = /** @class */ (function (_super) {\n __extends(ODataAdaptor, _super);\n function ODataAdaptor(props) {\n var _this = _super.call(this) || this;\n // options replaced the default adaptor options\n _this.options = extend({}, _this.options, {\n requestType: 'get',\n accept: 'application/json;odata=light;q=1,application/json;odata=verbose;q=0.5',\n multipartAccept: 'multipart/mixed',\n sortBy: '$orderby',\n select: '$select',\n skip: '$skip',\n take: '$top',\n count: '$inlinecount',\n where: '$filter',\n expand: '$expand',\n batch: '$batch',\n changeSet: '--changeset_',\n batchPre: 'batch_',\n contentId: 'Content-Id: ',\n batchContent: 'Content-Type: multipart/mixed; boundary=',\n changeSetContent: 'Content-Type: application/http\\nContent-Transfer-Encoding: binary ',\n batchChangeSetContentType: 'Content-Type: application/json; charset=utf-8 ',\n updateType: 'PUT'\n });\n extend(_this.options, props || {});\n return _this;\n }\n ODataAdaptor.prototype.getModuleName = function () {\n return 'ODataAdaptor';\n };\n /**\n * Generate request string based on the filter criteria from query.\n * @param {Predicate} pred\n * @param {boolean} requiresCast?\n */\n ODataAdaptor.prototype.onPredicate = function (predicate, query, requiresCast) {\n var returnValue = '';\n var operator;\n var guid;\n var val = predicate.value;\n var type = typeof val;\n var field = predicate.field ? ODataAdaptor.getField(predicate.field) : null;\n if (val instanceof Date) {\n val = 'datetime\\'' + DataUtil.parse.replacer(val) + '\\'';\n }\n if (type === 'string') {\n val = encodeURIComponent(val);\n val = '\\'' + val + '\\'';\n if (requiresCast) {\n field = 'cast(' + field + ', \\'Edm.String\\')';\n }\n if (DataUtil.parse.isGuid(val)) {\n guid = 'guid';\n }\n if (predicate.ignoreCase) {\n if (!guid) {\n field = 'tolower(' + field + ')';\n }\n val = val.toLowerCase();\n }\n }\n operator = DataUtil.odBiOperator[predicate.operator];\n if (operator) {\n returnValue += field;\n returnValue += operator;\n if (guid) {\n returnValue += guid;\n }\n return returnValue + val;\n }\n if (!isNullOrUndefined(this.getModuleName) && this.getModuleName() === 'ODataV4Adaptor') {\n operator = DataUtil.odv4UniOperator[predicate.operator];\n }\n else {\n operator = DataUtil.odUniOperator[predicate.operator];\n }\n if (operator === 'substringof') {\n var temp = val;\n val = field;\n field = temp;\n }\n returnValue += operator + '(';\n returnValue += field + ',';\n if (guid) {\n returnValue += guid;\n }\n returnValue += val + ')';\n return returnValue;\n };\n ODataAdaptor.prototype.addParams = function (options) {\n _super.prototype.addParams.call(this, options);\n delete options.reqParams.params;\n };\n /**\n * Generate request string based on the multiple filter criteria from query.\n * @param {Predicate} pred\n * @param {boolean} requiresCast?\n */\n ODataAdaptor.prototype.onComplexPredicate = function (predicate, query, requiresCast) {\n var res = [];\n for (var i = 0; i < predicate.predicates.length; i++) {\n res.push('(' + this.onEachWhere(predicate.predicates[i], query, requiresCast) + ')');\n }\n return res.join(' ' + predicate.condition + ' ');\n };\n /**\n * Generate query string based on the multiple filter criteria from query.\n * @param {Predicate} filter\n * @param {boolean} requiresCast?\n */\n ODataAdaptor.prototype.onEachWhere = function (filter, query, requiresCast) {\n return filter.isComplex ? this.onComplexPredicate(filter, query, requiresCast) : this.onPredicate(filter, query, requiresCast);\n };\n /**\n * Generate query string based on the multiple filter criteria from query.\n * @param {string[]} filters\n */\n ODataAdaptor.prototype.onWhere = function (filters) {\n if (this.pvt.search) {\n filters.push(this.onEachWhere(this.pvt.search, null, true));\n }\n return filters.join(' and ');\n };\n /**\n * Generate query string based on the multiple search criteria from query.\n * @param {{fields:string[]} e\n * @param {string} operator\n * @param {string} key\n * @param {boolean}} ignoreCase\n */\n ODataAdaptor.prototype.onEachSearch = function (e) {\n if (e.fields && e.fields.length === 0) {\n DataUtil.throwError('Query() - Search : oData search requires list of field names to search');\n }\n var filter = this.pvt.search || [];\n for (var i = 0; i < e.fields.length; i++) {\n filter.push(new Predicate(e.fields[i], e.operator, e.key, e.ignoreCase));\n }\n this.pvt.search = filter;\n };\n /**\n * Generate query string based on the search criteria from query.\n * @param {Object} e\n */\n ODataAdaptor.prototype.onSearch = function (e) {\n this.pvt.search = Predicate.or(this.pvt.search);\n return '';\n };\n /**\n * Generate query string based on multiple sort criteria from query.\n * @param {QueryOptions} e\n */\n ODataAdaptor.prototype.onEachSort = function (e) {\n var res = [];\n if (e.name instanceof Array) {\n for (var i = 0; i < e.name.length; i++) {\n res.push(ODataAdaptor.getField(e.name[i]) + (e.direction === 'descending' ? ' desc' : ''));\n }\n }\n else {\n res.push(ODataAdaptor.getField(e.name) + (e.direction === 'descending' ? ' desc' : ''));\n }\n return res.join(',');\n };\n /**\n * Returns sort query string.\n * @param {string[]} e\n */\n ODataAdaptor.prototype.onSortBy = function (e) {\n return e.reverse().join(',');\n };\n /**\n * Adds the group query to the adaptor option.\n * @param {Object[]} e\n * @returns string\n */\n ODataAdaptor.prototype.onGroup = function (e) {\n this.pvt.groups = e;\n return [];\n };\n /**\n * Returns the select query string.\n * @param {string[]} e\n */\n ODataAdaptor.prototype.onSelect = function (e) {\n for (var i = 0; i < e.length; i++) {\n e[i] = ODataAdaptor.getField(e[i]);\n }\n return e.join(',');\n };\n /**\n * Add the aggregate query to the adaptor option.\n * @param {Object[]} e\n * @returns string\n */\n ODataAdaptor.prototype.onAggregates = function (e) {\n this.pvt.aggregates = e;\n return '';\n };\n /**\n * Returns the query string which requests total count from the data source.\n * @param {boolean} e\n * @returns string\n */\n ODataAdaptor.prototype.onCount = function (e) {\n return e === true ? 'allpages' : '';\n };\n /**\n * Method will trigger before send the request to server side.\n * Used to set the custom header or modify the request options.\n * @param {DataManager} dm\n * @param {XMLHttpRequest} request\n * @param {Ajax} settings?\n */\n ODataAdaptor.prototype.beforeSend = function (dm, request, settings) {\n if (DataUtil.endsWith(settings.url, this.options.batch) && settings.type.toLowerCase() === 'post') {\n request.setRequestHeader('Accept', this.options.multipartAccept);\n request.setRequestHeader('DataServiceVersion', '2.0');\n request.overrideMimeType('text/plain; charset=x-user-defined');\n }\n else {\n request.setRequestHeader('Accept', this.options.accept);\n }\n request.setRequestHeader('DataServiceVersion', '2.0');\n request.setRequestHeader('MaxDataServiceVersion', '2.0');\n };\n /**\n * Returns the data from the query processing.\n * @param {DataResult} data\n * @param {DataOptions} ds?\n * @param {Query} query?\n * @param {XMLHttpRequest} xhr?\n * @param {Ajax} request?\n * @param {CrudOptions} changes?\n * @returns aggregateResult\n */\n ODataAdaptor.prototype.processResponse = function (data, ds, query, xhr, request, changes) {\n var metaCheck = 'odata.metadata';\n if ((request && request.type === 'GET') && !this.rootUrl && data[metaCheck]) {\n var dataUrls = data[metaCheck].split('/$metadata#');\n this.rootUrl = dataUrls[0];\n this.resourceTableName = dataUrls[1];\n }\n var pvtData = 'pvtData';\n if (!isNullOrUndefined(data.d)) {\n var dataCopy = ((query && query.isCountRequired) ? data.d.results : data.d);\n var metaData = '__metadata';\n if (!isNullOrUndefined(dataCopy)) {\n for (var i = 0; i < dataCopy.length; i++) {\n if (!isNullOrUndefined(dataCopy[i][metaData])) {\n delete dataCopy[i][metaData];\n }\n }\n }\n }\n var pvt = request && request[pvtData];\n var emptyAndBatch = this.processBatchResponse(data, query, xhr, request, changes);\n if (emptyAndBatch) {\n return emptyAndBatch;\n }\n var versionCheck = xhr && request.getResponseHeader('DataServiceVersion');\n var count = null;\n var version = (versionCheck && parseInt(versionCheck, 10)) || 2;\n if (query && query.isCountRequired) {\n var oDataCount = '__count';\n if (data[oDataCount] || data['odata.count']) {\n count = data[oDataCount] || data['odata.count'];\n }\n if (data.d) {\n data = data.d;\n }\n if (data[oDataCount] || data['odata.count']) {\n count = data[oDataCount] || data['odata.count'];\n }\n }\n if (version === 3 && data.value) {\n data = data.value;\n }\n if (data.d) {\n data = data.d;\n }\n if (version < 3 && data.results) {\n data = data.results;\n }\n var args = {};\n args.count = count;\n args.result = data;\n this.getAggregateResult(pvt, data, args, null, query);\n return DataUtil.isNull(count) ? args.result : { result: args.result, count: args.count, aggregates: args.aggregates };\n };\n /**\n * Converts the request object to query string.\n * @param {Object} req\n * @param {Query} query\n * @param {DataManager} dm\n * @returns tableName\n */\n ODataAdaptor.prototype.convertToQueryString = function (request, query, dm) {\n var res = [];\n var table = 'table';\n var tableName = request[table] || '';\n var format = '$format';\n delete request[table];\n if (dm.dataSource.requiresFormat) {\n request[format] = 'json';\n }\n var keys = Object.keys(request);\n for (var _i = 0, keys_4 = keys; _i < keys_4.length; _i++) {\n var prop = keys_4[_i];\n res.push(prop + '=' + request[prop]);\n }\n res = res.join('&');\n if (dm.dataSource.url && dm.dataSource.url.indexOf('?') !== -1 && !tableName) {\n return res;\n }\n return res.length ? tableName + '?' + res : tableName || '';\n };\n ODataAdaptor.prototype.localTimeReplacer = function (key, convertObj) {\n for (var _i = 0, _a = !isNullOrUndefined(convertObj) ? Object.keys(convertObj) : []; _i < _a.length; _i++) {\n var prop = _a[_i];\n if ((convertObj[prop] instanceof Date)) {\n convertObj[prop] = DataUtil.dateParse.toLocalTime(convertObj[prop]);\n }\n }\n return convertObj;\n };\n /**\n * Prepare and returns request body which is used to insert a new record in the table.\n * @param {DataManager} dm\n * @param {Object} data\n * @param {string} tableName?\n */\n ODataAdaptor.prototype.insert = function (dm, data, tableName) {\n return {\n url: (dm.dataSource.insertUrl || dm.dataSource.url).replace(/\\/*$/, tableName ? '/' + tableName : ''),\n data: JSON.stringify(data, this.options.localTime ? this.localTimeReplacer : null)\n };\n };\n /**\n * Prepare and return request body which is used to remove record from the table.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {number} value\n * @param {string} tableName?\n */\n ODataAdaptor.prototype.remove = function (dm, keyField, value, tableName) {\n var url;\n if (typeof value === 'string' && !DataUtil.parse.isGuid(value)) {\n url = \"('\" + value + \"')\";\n }\n else {\n url = \"(\" + value + \")\";\n }\n return {\n type: 'DELETE',\n url: (dm.dataSource.removeUrl || dm.dataSource.url).replace(/\\/*$/, tableName ? '/' + tableName : '') + url\n };\n };\n /**\n * Updates existing record and saves the changes to the table.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {Object} value\n * @param {string} tableName?\n * @returns this\n */\n ODataAdaptor.prototype.update = function (dm, keyField, value, tableName, query, original) {\n if (this.options.updateType === 'PATCH' && !isNullOrUndefined(original)) {\n value = this.compareAndRemove(value, original, keyField);\n }\n var url;\n if (typeof value[keyField] === 'string' && !DataUtil.parse.isGuid(value[keyField])) {\n url = \"('\" + value[keyField] + \"')\";\n }\n else {\n url = \"(\" + value[keyField] + \")\";\n }\n return {\n type: this.options.updateType,\n url: (dm.dataSource.updateUrl || dm.dataSource.url).replace(/\\/*$/, tableName ? '/' + tableName : '') + url,\n data: JSON.stringify(value, this.options.localTime ? this.localTimeReplacer : null),\n accept: this.options.accept\n };\n };\n /**\n * Prepare the request body based on the newly added, removed and updated records.\n * The result is used by the batch request.\n * @param {DataManager} dm\n * @param {CrudOptions} changes\n * @param {RemoteArgs} e\n * @returns {Object}\n */\n ODataAdaptor.prototype.batchRequest = function (dm, changes, e, query, original) {\n var initialGuid = e.guid = DataUtil.getGuid(this.options.batchPre);\n var url = this.rootUrl ? this.rootUrl + '/' + this.options.batch :\n dm.dataSource.url.replace(/\\/*$/, '/' + this.options.batch);\n e.url = this.resourceTableName ? this.resourceTableName : e.url;\n var args = {\n url: e.url,\n key: e.key,\n cid: 1,\n cSet: DataUtil.getGuid(this.options.changeSet)\n };\n var req = '--' + initialGuid + '\\n';\n req += 'Content-Type: multipart/mixed; boundary=' + args.cSet.replace('--', '') + '\\n';\n this.pvt.changeSet = 0;\n req += this.generateInsertRequest(changes.addedRecords, args, dm);\n req += this.generateUpdateRequest(changes.changedRecords, args, dm, original ? original.changedRecords : []);\n req += this.generateDeleteRequest(changes.deletedRecords, args, dm);\n req += args.cSet + '--\\n';\n req += '--' + initialGuid + '--';\n return {\n type: 'POST',\n url: url,\n dataType: 'json',\n contentType: 'multipart/mixed; charset=UTF-8;boundary=' + initialGuid,\n data: req\n };\n };\n /**\n * Generate the string content from the removed records.\n * The result will be send during batch update.\n * @param {Object[]} arr\n * @param {RemoteArgs} e\n * @returns this\n */\n ODataAdaptor.prototype.generateDeleteRequest = function (arr, e, dm) {\n if (!arr) {\n return '';\n }\n var req = '';\n var stat = {\n 'method': 'DELETE ',\n 'url': function (data, i, key) {\n var url = DataUtil.getObject(key, data[i]);\n if (typeof url === 'number' || DataUtil.parse.isGuid(url)) {\n return '(' + url + ')';\n }\n else if (url instanceof Date) {\n var dateTime = data[i][key];\n return '(' + dateTime.toJSON() + ')';\n }\n else {\n return \"('\" + url + \"')\";\n }\n },\n 'data': function (data, i) { return ''; }\n };\n req = this.generateBodyContent(arr, e, stat, dm);\n return req + '\\n';\n };\n /**\n * Generate the string content from the inserted records.\n * The result will be send during batch update.\n * @param {Object[]} arr\n * @param {RemoteArgs} e\n */\n ODataAdaptor.prototype.generateInsertRequest = function (arr, e, dm) {\n if (!arr) {\n return '';\n }\n var req = '';\n var stat = {\n 'method': 'POST ',\n 'url': function (data, i, key) { return ''; },\n 'data': function (data, i) { return JSON.stringify(data[i]) + '\\n\\n'; }\n };\n req = this.generateBodyContent(arr, e, stat, dm);\n return req;\n };\n /**\n * Generate the string content from the updated records.\n * The result will be send during batch update.\n * @param {Object[]} arr\n * @param {RemoteArgs} e\n */\n ODataAdaptor.prototype.generateUpdateRequest = function (arr, e, dm, org) {\n var _this = this;\n if (!arr) {\n return '';\n }\n var req = '';\n arr.forEach(function (change) { return change = _this.compareAndRemove(change, org.filter(function (o) { return DataUtil.getObject(e.key, o) === DataUtil.getObject(e.key, change); })[0], e.key); });\n var stat = {\n 'method': this.options.updateType + ' ',\n 'url': function (data, i, key) {\n if (typeof data[i][key] === 'number' || DataUtil.parse.isGuid(data[i][key])) {\n return '(' + data[i][key] + ')';\n }\n else if (data[i][key] instanceof Date) {\n var date = data[i][key];\n return '(' + date.toJSON() + ')';\n }\n else {\n return \"('\" + data[i][key] + \"')\";\n }\n },\n 'data': function (data, i) { return JSON.stringify(data[i]) + '\\n\\n'; }\n };\n req = this.generateBodyContent(arr, e, stat, dm);\n return req;\n };\n ODataAdaptor.getField = function (prop) {\n return prop.replace(/\\./g, '/');\n };\n ODataAdaptor.prototype.generateBodyContent = function (arr, e, stat, dm) {\n var req = '';\n for (var i = 0; i < arr.length; i++) {\n req += '\\n' + e.cSet + '\\n';\n req += this.options.changeSetContent + '\\n\\n';\n req += stat.method;\n if (stat.method === 'POST ') {\n req += (dm.dataSource.insertUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + ' HTTP/1.1\\n';\n }\n else if (stat.method === 'PUT ' || stat.method === 'PATCH ') {\n req += (dm.dataSource.updateUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + ' HTTP/1.1\\n';\n }\n else if (stat.method === 'DELETE ') {\n req += (dm.dataSource.removeUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + ' HTTP/1.1\\n';\n }\n req += 'Accept: ' + this.options.accept + '\\n';\n req += 'Content-Id: ' + this.pvt.changeSet++ + '\\n';\n req += this.options.batchChangeSetContentType + '\\n';\n if (!isNullOrUndefined(arr[i]['@odata.etag'])) {\n req += 'If-Match: ' + arr[i]['@odata.etag'] + '\\n\\n';\n delete arr[i]['@odata.etag'];\n }\n else {\n req += '\\n';\n }\n req += stat.data(arr, i);\n }\n return req;\n };\n ODataAdaptor.prototype.processBatchResponse = function (data, query, xhr, request, changes) {\n if (xhr && xhr.getResponseHeader('Content-Type') && xhr.getResponseHeader('Content-Type').indexOf('xml') !== -1) {\n return (query.isCountRequired ? { result: [], count: 0 } : []);\n }\n if (request && this.options.batch && DataUtil.endsWith(request.url, this.options.batch) && request.type.toLowerCase() === 'post') {\n var guid = xhr.getResponseHeader('Content-Type');\n var cIdx = void 0;\n var jsonObj = void 0;\n var d = data + '';\n guid = guid.substring(guid.indexOf('=batchresponse') + 1);\n d = d.split(guid);\n if (d.length < 2) {\n return {};\n }\n d = d[1];\n var exVal = /(?:\\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(d);\n if (exVal) {\n d.replace(exVal[0], '');\n }\n var changeGuid = exVal ? exVal[1] : '';\n d = d.split(changeGuid);\n for (var i = d.length; i > -1; i--) {\n if (!/\\bContent-ID:/i.test(d[i]) || !/\\bHTTP.+201/.test(d[i])) {\n continue;\n }\n cIdx = parseInt(/\\bContent-ID: (\\d+)/i.exec(d[i])[1], 10);\n if (changes.addedRecords[cIdx]) {\n jsonObj = DataUtil.parse.parseJson(/^\\{.+\\}/m.exec(d[i])[0]);\n extend({}, changes.addedRecords[cIdx], this.processResponse(jsonObj));\n }\n }\n return changes;\n }\n return null;\n };\n ODataAdaptor.prototype.compareAndRemove = function (data, original, key) {\n var _this = this;\n if (isNullOrUndefined(original)) {\n return data;\n }\n Object.keys(data).forEach(function (prop) {\n if (prop !== key && prop !== '@odata.etag') {\n if (DataUtil.isPlainObject(data[prop])) {\n _this.compareAndRemove(data[prop], original[prop]);\n var final = Object.keys(data[prop]).filter(function (data) { return data !== '@odata.etag'; });\n if (final.length === 0) {\n delete data[prop];\n }\n }\n else if (data[prop] === original[prop]) {\n delete data[prop];\n }\n else if (data[prop] && original[prop] && data[prop].valueOf() === original[prop].valueOf()) {\n delete data[prop];\n }\n }\n });\n return data;\n };\n return ODataAdaptor;\n}(UrlAdaptor));\nexport { ODataAdaptor };\n/**\n * The OData v4 is an improved version of OData protocols.\n * The DataManager uses the ODataV4Adaptor to consume OData v4 services.\n * @hidden\n */\nvar ODataV4Adaptor = /** @class */ (function (_super) {\n __extends(ODataV4Adaptor, _super);\n function ODataV4Adaptor(props) {\n var _this = _super.call(this, props) || this;\n // options replaced the default adaptor options\n _this.options = extend({}, _this.options, {\n requestType: 'get',\n accept: 'application/json, text/javascript, */*; q=0.01',\n multipartAccept: 'multipart/mixed',\n sortBy: '$orderby',\n select: '$select',\n skip: '$skip',\n take: '$top',\n count: '$count',\n search: '$search',\n where: '$filter',\n expand: '$expand',\n batch: '$batch',\n changeSet: '--changeset_',\n batchPre: 'batch_',\n contentId: 'Content-Id: ',\n batchContent: 'Content-Type: multipart/mixed; boundary=',\n changeSetContent: 'Content-Type: application/http\\nContent-Transfer-Encoding: binary ',\n batchChangeSetContentType: 'Content-Type: application/json; charset=utf-8 ',\n updateType: 'PATCH',\n localTime: false,\n apply: '$apply'\n });\n extend(_this.options, props || {});\n return _this;\n }\n /**\n * @hidden\n */\n ODataV4Adaptor.prototype.getModuleName = function () {\n return 'ODataV4Adaptor';\n };\n /**\n * Returns the query string which requests total count from the data source.\n * @param {boolean} e\n * @returns string\n */\n ODataV4Adaptor.prototype.onCount = function (e) {\n return e === true ? 'true' : '';\n };\n /**\n * Generate request string based on the filter criteria from query.\n * @param {Predicate} pred\n * @param {boolean} requiresCast?\n */\n ODataV4Adaptor.prototype.onPredicate = function (predicate, query, requiresCast) {\n var returnValue = '';\n var val = predicate.value;\n var isDate = val instanceof Date;\n if (query instanceof Query) {\n var queries = this.getQueryRequest(query);\n for (var i = 0; i < queries.filters.length; i++) {\n if (queries.filters[i].e.key === predicate.value) {\n requiresCast = true;\n }\n }\n }\n returnValue = _super.prototype.onPredicate.call(this, predicate, query, requiresCast);\n if (isDate) {\n returnValue = returnValue.replace(/datetime'(.*)'$/, '$1');\n }\n if (DataUtil.parse.isGuid(val)) {\n returnValue = returnValue.replace('guid', '').replace(/'/g, '');\n }\n return returnValue;\n };\n /**\n * Generate query string based on the multiple search criteria from query.\n * @param {{fields:string[]} e\n * @param {string} operator\n * @param {string} key\n * @param {boolean}} ignoreCase\n */\n ODataV4Adaptor.prototype.onEachSearch = function (e) {\n var search = this.pvt.searches || [];\n search.push(e.key);\n this.pvt.searches = search;\n };\n /**\n * Generate query string based on the search criteria from query.\n * @param {Object} e\n */\n ODataV4Adaptor.prototype.onSearch = function (e) {\n return this.pvt.searches.join(' OR ');\n };\n /**\n * Returns the expand query string.\n * @param {string} e\n */\n ODataV4Adaptor.prototype.onExpand = function (e) {\n var _this = this;\n var selected = {};\n var expanded = {};\n var expands = e.expands.slice();\n var exArr = [];\n var selects = e.selects.filter(function (item) { return item.indexOf('.') > -1; });\n selects.forEach(function (select) {\n var splits = select.split('.');\n if (!(splits[0] in selected)) {\n selected[splits[0]] = [];\n }\n selected[splits[0]].push(splits[1]);\n });\n //Auto expand from select query\n Object.keys(selected).forEach(function (expand) {\n if ((expands.indexOf(expand) === -1)) {\n expands.push(expand);\n }\n });\n expands.forEach(function (expand) {\n expanded[expand] = expand in selected ? expand + \"(\" + _this.options.select + \"=\" + selected[expand].join(',') + \")\" : expand;\n });\n Object.keys(expanded).forEach(function (ex) { return exArr.push(expanded[ex]); });\n return exArr.join(',');\n };\n /**\n * Returns the groupby query string.\n * @param {string} e\n */\n ODataV4Adaptor.prototype.onDistinct = function (distinctFields) {\n var fields = distinctFields.map(function (field) { return ODataAdaptor.getField(field); }).join(',');\n return \"groupby((\" + fields + \"))\";\n };\n /**\n * Returns the select query string.\n * @param {string[]} e\n */\n ODataV4Adaptor.prototype.onSelect = function (e) {\n return _super.prototype.onSelect.call(this, e.filter(function (item) { return item.indexOf('.') === -1; }));\n };\n /**\n * Method will trigger before send the request to server side.\n * Used to set the custom header or modify the request options.\n * @param {DataManager} dm\n * @param {XMLHttpRequest} request\n * @param {Ajax} settings\n * @returns void\n */\n ODataV4Adaptor.prototype.beforeSend = function (dm, request, settings) {\n if (settings.type === 'POST' || settings.type === 'PUT' || settings.type === 'PATCH') {\n request.setRequestHeader('Prefer', 'return=representation');\n }\n request.setRequestHeader('Accept', this.options.accept);\n };\n /**\n * Returns the data from the query processing.\n * @param {DataResult} data\n * @param {DataOptions} ds?\n * @param {Query} query?\n * @param {XMLHttpRequest} xhr?\n * @param {Ajax} request?\n * @param {CrudOptions} changes?\n * @returns aggregateResult\n */\n ODataV4Adaptor.prototype.processResponse = function (data, ds, query, xhr, request, changes) {\n var metaName = '@odata.context';\n if ((request && request.type === 'GET') && !this.rootUrl && data[metaName]) {\n var dataUrl = data[metaName].split('/$metadata#');\n this.rootUrl = dataUrl[0];\n this.resourceTableName = dataUrl[1];\n }\n var pvtData = 'pvtData';\n var pvt = request && request[pvtData];\n var emptyAndBatch = _super.prototype.processBatchResponse.call(this, data, query, xhr, request, changes);\n if (emptyAndBatch) {\n return emptyAndBatch;\n }\n var count = null;\n var dataCount = '@odata.count';\n if (query && query.isCountRequired) {\n if (dataCount in data) {\n count = data[dataCount];\n }\n }\n data = !isNullOrUndefined(data.value) ? data.value : data;\n var args = {};\n args.count = count;\n args.result = data;\n this.getAggregateResult(pvt, data, args, null, query);\n return DataUtil.isNull(count) ? args.result : { result: args.result, count: count, aggregates: args.aggregates };\n };\n return ODataV4Adaptor;\n}(ODataAdaptor));\nexport { ODataV4Adaptor };\n/**\n * The Web API is a programmatic interface to define the request and response messages system that is mostly exposed in JSON or XML.\n * The DataManager uses the WebApiAdaptor to consume Web API.\n * Since this adaptor is targeted to interact with Web API created using OData endpoint, it is extended from ODataAdaptor\n * @hidden\n */\nvar WebApiAdaptor = /** @class */ (function (_super) {\n __extends(WebApiAdaptor, _super);\n function WebApiAdaptor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WebApiAdaptor.prototype.getModuleName = function () {\n return 'WebApiAdaptor';\n };\n /**\n * Prepare and returns request body which is used to insert a new record in the table.\n * @param {DataManager} dm\n * @param {Object} data\n * @param {string} tableName?\n */\n WebApiAdaptor.prototype.insert = function (dm, data, tableName) {\n return {\n type: 'POST',\n url: dm.dataSource.url,\n data: JSON.stringify(data)\n };\n };\n /**\n * Prepare and return request body which is used to remove record from the table.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {number} value\n * @param {string} tableName?\n */\n WebApiAdaptor.prototype.remove = function (dm, keyField, value, tableName) {\n return {\n type: 'DELETE',\n url: dm.dataSource.url + '/' + value,\n data: JSON.stringify(value)\n };\n };\n /**\n * Prepare and return request body which is used to update record.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {Object} value\n * @param {string} tableName?\n */\n WebApiAdaptor.prototype.update = function (dm, keyField, value, tableName) {\n return {\n type: 'PUT',\n url: dm.dataSource.url,\n data: JSON.stringify(value)\n };\n };\n WebApiAdaptor.prototype.batchRequest = function (dm, changes, e) {\n var _this = this;\n var initialGuid = e.guid = DataUtil.getGuid(this.options.batchPre);\n var url = dm.dataSource.url.replace(/\\/*$/, '/' + this.options.batch);\n e.url = this.resourceTableName ? this.resourceTableName : e.url;\n var req = [];\n var _loop_1 = function (i, x) {\n changes.addedRecords.forEach(function (j, d) {\n var stat = {\n 'method': 'POST ',\n 'url': function (data, i, key) { return ''; },\n 'data': function (data, i) { return JSON.stringify(data[i]) + '\\n\\n'; }\n };\n req.push('--' + initialGuid);\n req.push('Content-Type: application/http; msgtype=request', '');\n req.push('POST ' + '/api/' + (dm.dataSource.insertUrl || dm.dataSource.crudUrl || e.url)\n + stat.url(changes.addedRecords, i, e.key) + ' HTTP/1.1');\n req.push('Content-Type: ' + 'application/json; charset=utf-8');\n req.push('Host: ' + location.host);\n req.push('', j ? JSON.stringify(j) : '');\n });\n };\n //insertion\n for (var i = 0, x = changes.addedRecords.length; i < x; i++) {\n _loop_1(i, x);\n }\n var _loop_2 = function (i, x) {\n changes.changedRecords.forEach(function (j, d) {\n var stat = {\n 'method': _this.options.updateType + ' ',\n 'url': function (data, i, key) { return ''; },\n 'data': function (data, i) { return JSON.stringify(data[i]) + '\\n\\n'; }\n };\n req.push('--' + initialGuid);\n req.push('Content-Type: application/http; msgtype=request', '');\n req.push('PUT ' + '/api/' + (dm.dataSource.updateUrl || dm.dataSource.crudUrl || e.url)\n + stat.url(changes.changedRecords, i, e.key) + ' HTTP/1.1');\n req.push('Content-Type: ' + 'application/json; charset=utf-8');\n req.push('Host: ' + location.host);\n req.push('', j ? JSON.stringify(j) : '');\n });\n };\n //updation \n for (var i = 0, x = changes.changedRecords.length; i < x; i++) {\n _loop_2(i, x);\n }\n var _loop_3 = function (i, x) {\n changes.deletedRecords.forEach(function (j, d) {\n var state = {\n 'mtd': 'DELETE ',\n 'url': function (data, i, key) {\n var url = DataUtil.getObject(key, data[i]);\n if (typeof url === 'number' || DataUtil.parse.isGuid(url)) {\n return '/' + url;\n }\n else if (url instanceof Date) {\n var datTime = data[i][key];\n return '/' + datTime.toJSON();\n }\n else {\n return \"/'\" + url + \"'\";\n }\n },\n 'data': function (data, i) { return ''; }\n };\n req.push('--' + initialGuid);\n req.push('Content-Type: application/http; msgtype=request', '');\n req.push('DELETE ' + '/api/' + (dm.dataSource.removeUrl || dm.dataSource.crudUrl || e.url)\n + state.url(changes.deletedRecords, i, e.key) + ' HTTP/1.1');\n req.push('Content-Type: ' + 'application/json; charset=utf-8');\n req.push('Host: ' + location.host);\n req.push('', j ? JSON.stringify(j) : '');\n });\n };\n //deletion\n for (var i = 0, x = changes.deletedRecords.length; i < x; i++) {\n _loop_3(i, x);\n }\n req.push('--' + initialGuid + '--', '');\n return {\n type: 'POST',\n url: url,\n contentType: 'multipart/mixed; boundary=' + initialGuid,\n data: req.join('\\r\\n')\n };\n };\n /**\n * Method will trigger before send the request to server side.\n * Used to set the custom header or modify the request options.\n * @param {DataManager} dm\n * @param {XMLHttpRequest} request\n * @param {Ajax} settings\n * @returns void\n */\n WebApiAdaptor.prototype.beforeSend = function (dm, request, settings) {\n request.setRequestHeader('Accept', 'application/json, text/javascript, */*; q=0.01');\n };\n /**\n * Returns the data from the query processing.\n * @param {DataResult} data\n * @param {DataOptions} ds?\n * @param {Query} query?\n * @param {XMLHttpRequest} xhr?\n * @param {Ajax} request?\n * @param {CrudOptions} changes?\n * @returns aggregateResult\n */\n WebApiAdaptor.prototype.processResponse = function (data, ds, query, xhr, request, changes) {\n var pvtData = 'pvtData';\n var pvt = request && request[pvtData];\n var count = null;\n var args = {};\n if (request && request.type.toLowerCase() !== 'post') {\n var versionCheck = xhr && request.getResponseHeader('DataServiceVersion');\n var version = (versionCheck && parseInt(versionCheck, 10)) || 2;\n if (query && query.isCountRequired) {\n if (!DataUtil.isNull(data.Count)) {\n count = data.Count;\n }\n }\n if (version < 3 && data.Items) {\n data = data.Items;\n }\n args.count = count;\n args.result = data;\n this.getAggregateResult(pvt, data, args, null, query);\n }\n args.result = args.result || data;\n return DataUtil.isNull(count) ? args.result : { result: args.result, count: args.count, aggregates: args.aggregates };\n };\n return WebApiAdaptor;\n}(ODataAdaptor));\nexport { WebApiAdaptor };\n/**\n * WebMethodAdaptor can be used by DataManager to interact with web method.\n * @hidden\n */\nvar WebMethodAdaptor = /** @class */ (function (_super) {\n __extends(WebMethodAdaptor, _super);\n function WebMethodAdaptor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Prepare the request body based on the query.\n * The query information can be accessed at the WebMethod using variable named `value`.\n * @param {DataManager} dm\n * @param {Query} query\n * @param {Object[]} hierarchyFilters?\n * @returns application\n */\n WebMethodAdaptor.prototype.processQuery = function (dm, query, hierarchyFilters) {\n var obj = new UrlAdaptor().processQuery(dm, query, hierarchyFilters);\n var getData = 'data';\n var data = DataUtil.parse.parseJson(obj[getData]);\n var result = {};\n var value = 'value';\n if (data.param) {\n for (var i = 0; i < data.param.length; i++) {\n var param = data.param[i];\n var key = Object.keys(param)[0];\n result[key] = param[key];\n }\n }\n result[value] = data;\n var pvtData = 'pvtData';\n var url = 'url';\n return {\n data: JSON.stringify(result),\n url: obj[url],\n pvtData: obj[pvtData],\n type: 'POST',\n contentType: 'application/json; charset=utf-8'\n };\n };\n return WebMethodAdaptor;\n}(UrlAdaptor));\nexport { WebMethodAdaptor };\n/**\n * RemoteSaveAdaptor, extended from JsonAdaptor and it is used for binding local data and performs all DataManager queries in client-side.\n * It interacts with server-side only for CRUD operations.\n * @hidden\n */\nvar RemoteSaveAdaptor = /** @class */ (function (_super) {\n __extends(RemoteSaveAdaptor, _super);\n /**\n * @hidden\n */\n function RemoteSaveAdaptor() {\n var _this = _super.call(this) || this;\n setValue('beforeSend', UrlAdaptor.prototype.beforeSend, _this);\n return _this;\n }\n RemoteSaveAdaptor.prototype.insert = function (dm, data, tableName, query, position) {\n this.pvt.position = position;\n this.updateType = 'add';\n return {\n url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,\n data: JSON.stringify(extend({}, {\n value: data,\n table: tableName,\n action: 'insert'\n }, DataUtil.getAddParams(this, dm, query)))\n };\n };\n RemoteSaveAdaptor.prototype.remove = function (dm, keyField, val, tableName, query) {\n _super.prototype.remove.call(this, dm, keyField, val);\n return {\n type: 'POST',\n url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,\n data: JSON.stringify(extend({}, {\n key: val,\n keyColumn: keyField,\n table: tableName,\n action: 'remove'\n }, DataUtil.getAddParams(this, dm, query)))\n };\n };\n RemoteSaveAdaptor.prototype.update = function (dm, keyField, val, tableName, query) {\n this.updateType = 'update';\n this.updateKey = keyField;\n return {\n type: 'POST',\n url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,\n data: JSON.stringify(extend({}, {\n value: val,\n action: 'update',\n keyColumn: keyField,\n key: val[keyField],\n table: tableName\n }, DataUtil.getAddParams(this, dm, query)))\n };\n };\n RemoteSaveAdaptor.prototype.processResponse = function (data, ds, query, xhr, request, changes, e) {\n var i;\n data = request ? JSON.parse(request.data) : data;\n if (this.updateType === 'add') {\n _super.prototype.insert.call(this, ds, data, null, null, this.pvt.position);\n }\n if (this.updateType === 'update') {\n _super.prototype.update.call(this, ds, this.updateKey, data);\n }\n this.updateType = undefined;\n if (data.added) {\n for (i = 0; i < data.added.length; i++) {\n _super.prototype.insert.call(this, ds, data.added[i]);\n }\n }\n if (data.changed) {\n for (i = 0; i < data.changed.length; i++) {\n _super.prototype.update.call(this, ds, e.key, data.changed[i]);\n }\n }\n if (data.deleted) {\n for (i = 0; i < data.deleted.length; i++) {\n _super.prototype.remove.call(this, ds, e.key, data.deleted[i]);\n }\n }\n return data;\n };\n /**\n * Prepare the request body based on the newly added, removed and updated records.\n * Also perform the changes in the locally cached data to sync with the remote data.\n * The result is used by the batch request.\n * @param {DataManager} dm\n * @param {CrudOptions} changes\n * @param {RemoteArgs} e\n */\n RemoteSaveAdaptor.prototype.batchRequest = function (dm, changes, e, query, original) {\n return {\n type: 'POST',\n url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.url,\n contentType: 'application/json; charset=utf-8',\n dataType: 'json',\n data: JSON.stringify(extend({}, {\n changed: changes.changedRecords,\n added: changes.addedRecords,\n deleted: changes.deletedRecords,\n action: 'batch',\n table: e.url,\n key: e.key\n }, DataUtil.getAddParams(this, dm, query)))\n };\n };\n RemoteSaveAdaptor.prototype.addParams = function (options) {\n var urlParams = new UrlAdaptor();\n urlParams.addParams(options);\n };\n return RemoteSaveAdaptor;\n}(JsonAdaptor));\nexport { RemoteSaveAdaptor };\n/**\n * Ajax Adaptor that is extended from URL Adaptor, is used for handle data operations with user defined functions.\n * @hidden\n */\nvar AjaxAdaptor = /** @class */ (function (_super) {\n __extends(AjaxAdaptor, _super);\n function AjaxAdaptor(props) {\n var _this = _super.call(this) || this;\n // options replaced the default adaptor options\n _this.options = extend({}, _this.options, {\n getData: new Function(),\n addRecord: new Function(),\n updateRecord: new Function(),\n deleteRecord: new Function(),\n batchUpdate: new Function()\n });\n extend(_this.options, props || {});\n return _this;\n }\n AjaxAdaptor.prototype.getModuleName = function () {\n return 'AjaxAdaptor';\n };\n return AjaxAdaptor;\n}(UrlAdaptor));\nexport { AjaxAdaptor };\n/**\n * Cache Adaptor is used to cache the data of the visited pages. It prevents new requests for the previously visited pages.\n * You can configure cache page size and duration of caching by using cachingPageSize and timeTillExpiration properties of the DataManager\n * @hidden\n */\nvar CacheAdaptor = /** @class */ (function (_super) {\n __extends(CacheAdaptor, _super);\n /**\n * Constructor for CacheAdaptor class.\n * @param {CacheAdaptor} adaptor?\n * @param {number} timeStamp?\n * @param {number} pageSize?\n * @hidden\n */\n function CacheAdaptor(adaptor, timeStamp, pageSize) {\n var _this = _super.call(this) || this;\n _this.isCrudAction = false;\n _this.isInsertAction = false;\n if (!isNullOrUndefined(adaptor)) {\n _this.cacheAdaptor = adaptor;\n }\n _this.pageSize = pageSize;\n _this.guidId = DataUtil.getGuid('cacheAdaptor');\n var obj = { keys: [], results: [] };\n window.localStorage.setItem(_this.guidId, JSON.stringify(obj));\n var guid = _this.guidId;\n if (!isNullOrUndefined(timeStamp)) {\n setInterval(function () {\n var data;\n data = DataUtil.parse.parseJson(window.localStorage.getItem(guid));\n var forDel = [];\n for (var i = 0; i < data.results.length; i++) {\n var currentTime = +new Date();\n var requestTime = +new Date(data.results[i].timeStamp);\n data.results[i].timeStamp = currentTime - requestTime;\n if (currentTime - requestTime > timeStamp) {\n forDel.push(i);\n }\n }\n for (var i = 0; i < forDel.length; i++) {\n data.results.splice(forDel[i], 1);\n data.keys.splice(forDel[i], 1);\n }\n window.localStorage.removeItem(guid);\n window.localStorage.setItem(guid, JSON.stringify(data));\n }, timeStamp);\n }\n return _this;\n }\n /**\n * It will generate the key based on the URL when we send a request to server.\n * @param {string} url\n * @param {Query} query?\n * @hidden\n */\n CacheAdaptor.prototype.generateKey = function (url, query) {\n var queries = this.getQueryRequest(query);\n var singles = Query.filterQueryLists(query.queries, ['onSelect', 'onPage', 'onSkip', 'onTake', 'onRange']);\n var key = url;\n var page = 'onPage';\n if (page in singles) {\n key += singles[page].pageIndex;\n }\n queries.sorts.forEach(function (obj) {\n key += obj.e.direction + obj.e.fieldName;\n });\n queries.groups.forEach(function (obj) {\n key += obj.e.fieldName;\n });\n queries.searches.forEach(function (obj) {\n key += obj.e.searchKey;\n });\n for (var filter = 0; filter < queries.filters.length; filter++) {\n var currentFilter = queries.filters[filter];\n if (currentFilter.e.isComplex) {\n var newQuery = query.clone();\n newQuery.queries = [];\n for (var i = 0; i < currentFilter.e.predicates.length; i++) {\n newQuery.queries.push({ fn: 'onWhere', e: currentFilter.e.predicates[i], filter: query.queries.filter });\n }\n key += currentFilter.e.condition + this.generateKey(url, newQuery);\n }\n else {\n key += currentFilter.e.field + currentFilter.e.operator + currentFilter.e.value;\n }\n }\n return key;\n };\n /**\n * Process the query to generate request body.\n * If the data is already cached, it will return the cached data.\n * @param {DataManager} dm\n * @param {Query} query?\n * @param {Object[]} hierarchyFilters?\n */\n CacheAdaptor.prototype.processQuery = function (dm, query, hierarchyFilters) {\n var key = this.generateKey(dm.dataSource.url, query);\n var cachedItems;\n cachedItems = DataUtil.parse.parseJson(window.localStorage.getItem(this.guidId));\n var data = cachedItems ? cachedItems.results[cachedItems.keys.indexOf(key)] : null;\n if (data != null && !this.isCrudAction && !this.isInsertAction) {\n return data;\n }\n this.isCrudAction = null;\n this.isInsertAction = null;\n return this.cacheAdaptor.processQuery.apply(this.cacheAdaptor, [].slice.call(arguments, 0));\n };\n /**\n * Returns the data from the query processing.\n * It will also cache the data for later usage.\n * @param {DataResult} data\n * @param {DataManager} ds?\n * @param {Query} query?\n * @param {XMLHttpRequest} xhr?\n * @param {Ajax} request?\n * @param {CrudOptions} changes?\n */\n CacheAdaptor.prototype.processResponse = function (data, ds, query, xhr, request, changes) {\n if (this.isInsertAction || (request && this.cacheAdaptor.options.batch &&\n DataUtil.endsWith(request.url, this.cacheAdaptor.options.batch) && request.type.toLowerCase() === 'post')) {\n return this.cacheAdaptor.processResponse(data, ds, query, xhr, request, changes);\n }\n data = this.cacheAdaptor.processResponse.apply(this.cacheAdaptor, [].slice.call(arguments, 0));\n var key = query ? this.generateKey(ds.dataSource.url, query) : ds.dataSource.url;\n var obj = {};\n obj = DataUtil.parse.parseJson(window.localStorage.getItem(this.guidId));\n var index = obj.keys.indexOf(key);\n if (index !== -1) {\n obj.results.splice(index, 1);\n obj.keys.splice(index, 1);\n }\n obj.results[obj.keys.push(key) - 1] = { keys: key, result: data.result, timeStamp: new Date(), count: data.count };\n while (obj.results.length > this.pageSize) {\n obj.results.splice(0, 1);\n obj.keys.splice(0, 1);\n }\n window.localStorage.setItem(this.guidId, JSON.stringify(obj));\n return data;\n };\n /**\n * Method will trigger before send the request to server side. Used to set the custom header or modify the request options.\n * @param {DataManager} dm\n * @param {XMLHttpRequest} request\n * @param {Ajax} settings?\n */\n CacheAdaptor.prototype.beforeSend = function (dm, request, settings) {\n if (!isNullOrUndefined(this.cacheAdaptor.options.batch) && DataUtil.endsWith(settings.url, this.cacheAdaptor.options.batch)\n && settings.type.toLowerCase() === 'post') {\n request.setRequestHeader('Accept', this.cacheAdaptor.options.multipartAccept);\n }\n if (!dm.dataSource.crossDomain) {\n request.setRequestHeader('Accept', this.cacheAdaptor.options.accept);\n }\n };\n /**\n * Updates existing record and saves the changes to the table.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {Object} value\n * @param {string} tableName\n */\n CacheAdaptor.prototype.update = function (dm, keyField, value, tableName) {\n this.isCrudAction = true;\n return this.cacheAdaptor.update(dm, keyField, value, tableName);\n };\n /**\n * Prepare and returns request body which is used to insert a new record in the table.\n * @param {DataManager} dm\n * @param {Object} data\n * @param {string} tableName?\n */\n CacheAdaptor.prototype.insert = function (dm, data, tableName) {\n this.isInsertAction = true;\n return this.cacheAdaptor.insert(dm, data, tableName);\n };\n /**\n * Prepare and return request body which is used to remove record from the table.\n * @param {DataManager} dm\n * @param {string} keyField\n * @param {Object} value\n * @param {string} tableName?\n */\n CacheAdaptor.prototype.remove = function (dm, keyField, value, tableName) {\n this.isCrudAction = true;\n return this.cacheAdaptor.remove(dm, keyField, value, tableName);\n };\n /**\n * Prepare the request body based on the newly added, removed and updated records.\n * The result is used by the batch request.\n * @param {DataManager} dm\n * @param {CrudOptions} changes\n * @param {RemoteArgs} e\n */\n CacheAdaptor.prototype.batchRequest = function (dm, changes, e) {\n return this.cacheAdaptor.batchRequest(dm, changes, e);\n };\n return CacheAdaptor;\n}(UrlAdaptor));\nexport { CacheAdaptor };\n","import { isNullOrUndefined, classList, createElement } from '@syncfusion/ej2-base';\nvar globalTimeOut = {};\nvar spinTemplate = null;\nvar spinCSSClass = null;\nvar DEFT_MAT_WIDTH = 30;\nvar DEFT_FAB_WIDTH = 30;\nvar DEFT_BOOT_WIDTH = 30;\nvar DEFT_BOOT4_WIDTH = 36;\nvar CLS_SHOWSPIN = 'e-spin-show';\nvar CLS_HIDESPIN = 'e-spin-hide';\nvar CLS_MATERIALSPIN = 'e-spin-material';\nvar CLS_FABRICSPIN = 'e-spin-fabric';\nvar CLS_BOOTSPIN = 'e-spin-bootstrap';\nvar CLS_BOOT4SPIN = 'e-spin-bootstrap4';\nvar CLS_HIGHCONTRASTSPIN = 'e-spin-high-contrast';\nvar CLS_SPINWRAP = 'e-spinner-pane';\nvar CLS_SPININWRAP = 'e-spinner-inner';\nvar CLS_SPINCIRCLE = 'e-path-circle';\nvar CLS_SPINARC = 'e-path-arc';\nvar CLS_SPINLABEL = 'e-spin-label';\nvar CLS_SPINTEMPLATE = 'e-spin-template';\n/**\n * Function to change the Spinners in a page globally from application end.\n * ```\n * E.g : blazorSpinner({ action: \"Create\", options: {target: targetElement}, type: \"\" });\n * ```\n * @param args\n * @private\n */\nexport function Spinner(action, options, target, type) {\n switch (action) {\n case 'Create':\n var element = document.querySelector(options.target);\n var args = { type: type, target: element, cssClass: options.cssClass,\n label: options.label, width: options.width };\n createSpinner(args);\n break;\n case 'Show':\n showSpinner(document.querySelector(target));\n break;\n case 'Hide':\n hideSpinner(document.querySelector(target));\n break;\n case 'Set':\n var setArgs = { cssClass: options.cssClass, type: type };\n setSpinner(setArgs);\n break;\n }\n}\n/**\n * Create a spinner for the specified target element.\n * ```\n * E.g : createSpinner({ target: targetElement, width: '34px', label: 'Loading..' });\n * ```\n * @param args\n * @private\n */\nexport function createSpinner(args, internalCreateElement) {\n if (!args.target) {\n return;\n }\n var radius;\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n var container = create_spinner_container(args.target, makeElement);\n if (!isNullOrUndefined(args.cssClass)) {\n container.wrap.classList.add(args.cssClass);\n }\n if (!isNullOrUndefined(args.template) || !isNullOrUndefined(spinTemplate)) {\n var template = !isNullOrUndefined(args.template) ? args.template : spinTemplate;\n container.wrap.classList.add(CLS_SPINTEMPLATE);\n replaceContent(container.wrap, template, spinCSSClass);\n }\n else {\n var theme = !isNullOrUndefined(args.type) ? args.type : getTheme(container.wrap);\n var width = !isNullOrUndefined(args.width) ? args.width : undefined;\n radius = calculateRadius(width, theme);\n setTheme(theme, container.wrap, radius, makeElement);\n if (!isNullOrUndefined(args.label)) {\n createLabel(container.inner_wrap, args.label, makeElement);\n }\n }\n container.wrap.classList.add(CLS_HIDESPIN);\n container = null;\n}\nfunction createLabel(container, label, makeElement) {\n var labelEle = makeElement('div', {});\n labelEle.classList.add(CLS_SPINLABEL);\n labelEle.textContent = label;\n container.appendChild(labelEle);\n return labelEle;\n}\nfunction createMaterialSpinner(container, radius, makeElement) {\n var uniqueID = random_generator();\n globalTimeOut[uniqueID] = { timeOut: 0, type: 'Material', radius: radius };\n create_material_element(container, uniqueID, makeElement, CLS_MATERIALSPIN);\n mat_calculate_attributes(radius, container, 'Material', CLS_MATERIALSPIN);\n}\nfunction createBootstrap4Spinner(container, radius, makeElement) {\n var uniqueID = random_generator();\n globalTimeOut[uniqueID] = { timeOut: 0, type: 'Bootstrap4', radius: radius };\n create_material_element(container, uniqueID, makeElement, CLS_BOOT4SPIN);\n mat_calculate_attributes(radius, container, 'Bootstrap4', CLS_BOOT4SPIN);\n}\nfunction startMatAnimate(container, uniqueID, radius) {\n var globalObject = {};\n var timeOutVar = 0;\n globalTimeOut[uniqueID].timeOut = 0;\n globalObject[uniqueID] = globalVariables(uniqueID, radius, 0, 0);\n var spinnerInfo = { uniqueID: uniqueID, container: container, globalInfo: globalObject, timeOutVar: timeOutVar };\n animateMaterial(spinnerInfo);\n}\nfunction createFabricSpinner(container, radius, makeElement) {\n var uniqueID = random_generator();\n globalTimeOut[uniqueID] = { timeOut: 0, type: 'Fabric', radius: radius };\n create_fabric_element(container, uniqueID, CLS_FABRICSPIN, makeElement);\n fb_calculate_attributes(radius, container, CLS_FABRICSPIN);\n}\nfunction createHighContrastSpinner(container, radius, makeElement) {\n var uniqueID = random_generator();\n globalTimeOut[uniqueID] = { timeOut: 0, type: 'HighContrast', radius: radius };\n create_fabric_element(container, uniqueID, CLS_HIGHCONTRASTSPIN, makeElement);\n fb_calculate_attributes(radius, container, CLS_HIGHCONTRASTSPIN);\n}\nfunction getTheme(container) {\n var theme = window.getComputedStyle(container, ':after').getPropertyValue('content');\n return theme.replace(/['\"]+/g, '');\n}\nfunction setTheme(theme, container, radius, makeElement) {\n var innerContainer = container.querySelector('.' + CLS_SPININWRAP);\n var svg = innerContainer.querySelector('svg');\n if (!isNullOrUndefined(svg)) {\n innerContainer.removeChild(svg);\n }\n switch (theme) {\n case 'Material':\n createMaterialSpinner(innerContainer, radius, makeElement);\n break;\n case 'Fabric':\n createFabricSpinner(innerContainer, radius, makeElement);\n break;\n case 'Bootstrap':\n createBootstrapSpinner(innerContainer, radius, makeElement);\n break;\n case 'HighContrast':\n createHighContrastSpinner(innerContainer, radius, makeElement);\n break;\n case 'Bootstrap4':\n createBootstrap4Spinner(innerContainer, radius, makeElement);\n break;\n }\n}\nfunction createBootstrapSpinner(innerContainer, radius, makeElement) {\n var uniqueID = random_generator();\n globalTimeOut[uniqueID] = { timeOut: 0, type: 'Bootstrap', radius: radius };\n create_bootstrap_element(innerContainer, uniqueID, makeElement);\n boot_calculate_attributes(innerContainer, radius);\n}\nfunction create_bootstrap_element(innerContainer, uniqueID, makeElement) {\n var svgBoot = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n var viewBoxValue = 64;\n var trans = 32;\n var defaultRadius = 2;\n svgBoot.setAttribute('id', uniqueID);\n svgBoot.setAttribute('class', CLS_BOOTSPIN);\n svgBoot.setAttribute('viewBox', '0 0 ' + viewBoxValue + ' ' + viewBoxValue);\n innerContainer.insertBefore(svgBoot, innerContainer.firstChild);\n for (var item = 0; item <= 7; item++) {\n var bootCircle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');\n bootCircle.setAttribute('class', CLS_SPINCIRCLE + '_' + item);\n bootCircle.setAttribute('r', defaultRadius + '');\n bootCircle.setAttribute('transform', 'translate(' + trans + ',' + trans + ')');\n svgBoot.appendChild(bootCircle);\n }\n}\nfunction boot_calculate_attributes(innerContainer, radius) {\n var svg = innerContainer.querySelector('svg.e-spin-bootstrap');\n svg.style.width = svg.style.height = radius + 'px';\n var x = 0;\n var y = 0;\n var rad = 24;\n var startArc = 90;\n for (var item = 0; item <= 7; item++) {\n var start = defineArcPoints(x, y, rad, startArc);\n var circleEle = svg.querySelector('.' + CLS_SPINCIRCLE + '_' + item);\n circleEle.setAttribute('cx', start.x + '');\n circleEle.setAttribute('cy', start.y + '');\n startArc = startArc >= 360 ? 0 : startArc;\n startArc = startArc + 45;\n }\n}\nfunction generateSeries(begin, stop) {\n var series = [];\n var start = begin;\n var end = stop;\n var increment = false;\n var count = 1;\n formSeries(start);\n function formSeries(i) {\n series.push(i);\n if (i !== end || count === 1) {\n if (i <= start && i > 1 && !increment) {\n i = parseFloat((i - 0.2).toFixed(2));\n }\n else if (i === 1) {\n i = 7;\n i = parseFloat((i + 0.2).toFixed(2));\n increment = true;\n }\n else if (i < 8 && increment) {\n i = parseFloat((i + 0.2).toFixed(2));\n if (i === 8) {\n increment = false;\n }\n }\n else if (i <= 8 && !increment) {\n i = parseFloat((i - 0.2).toFixed(2));\n }\n ++count;\n formSeries(i);\n }\n }\n return series;\n}\nfunction animateBootstrap(innerContainer) {\n var svg = innerContainer.querySelector('svg.e-spin-bootstrap');\n var id = svg.getAttribute('id');\n for (var i = 1; i <= 8; i++) {\n var circleEle = (innerContainer.getElementsByClassName('e-path-circle_' +\n (i === 8 ? 0 : i))[0]);\n rotation(circleEle, i, i, generateSeries(i, i), id);\n }\n function rotation(circle, start, end, series, id) {\n var count = 0;\n boot_animate(start);\n function boot_animate(radius) {\n if (globalTimeOut[id].isAnimate) {\n ++count;\n circle.setAttribute('r', radius + '');\n if (count >= series.length) {\n count = 0;\n }\n globalTimeOut[id].timeOut = setTimeout(boot_animate.bind(null, series[count]), 18);\n }\n }\n }\n}\nfunction replaceContent(container, template, cssClass) {\n if (!isNullOrUndefined(cssClass)) {\n container.classList.add(cssClass);\n }\n var inner = container.querySelector('.e-spinner-inner');\n inner.innerHTML = template;\n}\nfunction calculateRadius(width, theme) {\n var defaultSize;\n switch (theme) {\n case 'Material':\n defaultSize = DEFT_MAT_WIDTH;\n break;\n case 'Fabric':\n defaultSize = DEFT_FAB_WIDTH;\n break;\n case 'Bootstrap4':\n defaultSize = DEFT_BOOT4_WIDTH;\n break;\n default:\n defaultSize = DEFT_BOOT_WIDTH;\n }\n width = width ? parseFloat(width + '') : defaultSize;\n return theme === 'Bootstrap' ? width : width / 2;\n}\nfunction globalVariables(id, radius, count, previousId) {\n return {\n radius: radius,\n count: count,\n previousId: previousId\n };\n}\nfunction random_generator() {\n var random = '';\n var combine = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for (var i = 0; i < 5; i++) {\n random += combine.charAt(Math.floor(Math.random() * combine.length));\n }\n return random;\n}\nfunction create_fabric_element(innerCon, uniqueID, themeClass, makeElement) {\n var svgFabric = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svgFabric.setAttribute('id', uniqueID);\n svgFabric.setAttribute('class', themeClass);\n var fabricCirclePath = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n fabricCirclePath.setAttribute('class', CLS_SPINCIRCLE);\n var fabricCircleArc = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n fabricCircleArc.setAttribute('class', CLS_SPINARC);\n innerCon.insertBefore(svgFabric, innerCon.firstChild);\n svgFabric.appendChild(fabricCirclePath);\n svgFabric.appendChild(fabricCircleArc);\n}\nfunction create_material_element(innerContainer, uniqueID, makeElement, cls) {\n var svgMaterial = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svgMaterial.setAttribute('class', cls);\n svgMaterial.setAttribute('id', uniqueID);\n var matCirclePath = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n matCirclePath.setAttribute('class', CLS_SPINCIRCLE);\n innerContainer.insertBefore(svgMaterial, innerContainer.firstChild);\n svgMaterial.appendChild(matCirclePath);\n}\nfunction create_spinner_container(target, makeElement) {\n var spinnerContainer = makeElement('div', {});\n spinnerContainer.classList.add(CLS_SPINWRAP);\n var spinnerInnerContainer = makeElement('div', {});\n spinnerInnerContainer.classList.add(CLS_SPININWRAP);\n target.appendChild(spinnerContainer);\n spinnerContainer.appendChild(spinnerInnerContainer);\n return { wrap: spinnerContainer, inner_wrap: spinnerInnerContainer };\n}\nfunction animateMaterial(spinnerInfo) {\n var start = 1;\n var end = 149;\n var duration = 1333;\n var max = 75;\n createCircle(start, end, easeAnimation, duration, spinnerInfo.globalInfo[spinnerInfo.uniqueID].count, max, spinnerInfo);\n spinnerInfo.globalInfo[spinnerInfo.uniqueID].count = ++spinnerInfo.globalInfo[spinnerInfo.uniqueID].count % 4;\n}\nfunction createCircle(start, end, easing, duration, count, max, spinnerInfo) {\n var id = ++spinnerInfo.globalInfo[spinnerInfo.uniqueID].previousId;\n var startTime = new Date().getTime();\n var change = end - start;\n var diameter = getSize((spinnerInfo.globalInfo[spinnerInfo.uniqueID].radius * 2) + '');\n var strokeSize = getStrokeSize(diameter);\n var rotate = -90 * (spinnerInfo.globalInfo[spinnerInfo.uniqueID].count || 0);\n mat_animation(spinnerInfo);\n function mat_animation(spinnerInfo) {\n var currentTime = Math.max(0, Math.min(new Date().getTime() - startTime, duration));\n updatePath(easing(currentTime, start, change, duration), spinnerInfo.container);\n if (id === spinnerInfo.globalInfo[spinnerInfo.uniqueID].previousId && currentTime < duration) {\n globalTimeOut[spinnerInfo.uniqueID].timeOut = setTimeout(mat_animation.bind(null, spinnerInfo), 1);\n }\n else {\n animateMaterial(spinnerInfo);\n }\n }\n function updatePath(value, container) {\n if ((!isNullOrUndefined(container.querySelector('svg.e-spin-material')))\n && (!isNullOrUndefined(container.querySelector('svg.e-spin-material').querySelector('path.e-path-circle')))) {\n var svg = container.querySelector('svg.e-spin-material');\n var path = svg.querySelector('path.e-path-circle');\n path.setAttribute('stroke-dashoffset', getDashOffset(diameter, strokeSize, value, max) + '');\n path.setAttribute('transform', 'rotate(' + (rotate) + ' ' + diameter / 2 + ' ' + diameter / 2 + ')');\n }\n }\n}\nfunction mat_calculate_attributes(radius, container, type, cls) {\n var diameter = radius * 2;\n var svg = container.querySelector('svg.' + cls);\n var path = svg.querySelector('path.e-path-circle');\n var strokeSize = getStrokeSize(diameter);\n var transformOrigin = (diameter / 2) + 'px';\n svg.setAttribute('viewBox', '0 0 ' + diameter + ' ' + diameter);\n svg.style.width = svg.style.height = diameter + 'px';\n svg.style.transformOrigin = transformOrigin + ' ' + transformOrigin + ' ' + transformOrigin;\n path.setAttribute('d', drawArc(diameter, strokeSize));\n if (type === 'Material') {\n path.setAttribute('stroke-width', strokeSize + '');\n path.setAttribute('stroke-dasharray', ((diameter - strokeSize) * Math.PI * 0.75) + '');\n path.setAttribute('stroke-dashoffset', getDashOffset(diameter, strokeSize, 1, 75) + '');\n }\n}\nfunction getSize(value) {\n var parsed = parseFloat(value);\n return parsed;\n}\nfunction drawArc(diameter, strokeSize) {\n var radius = diameter / 2;\n var offset = strokeSize / 2;\n return 'M' + radius + ',' + offset\n + 'A' + (radius - offset) + ',' + (radius - offset) + ' 0 1 1 ' + offset + ',' + radius;\n}\nfunction getStrokeSize(diameter) {\n return 10 / 100 * diameter;\n}\nfunction getDashOffset(diameter, strokeSize, value, max) {\n return (diameter - strokeSize) * Math.PI * ((3 * (max) / 100) - (value / 100));\n}\nfunction easeAnimation(current, start, change, duration) {\n var timestamp = (current /= duration) * current;\n var timecount = timestamp * current;\n return start + change * (6 * timecount * timestamp + -15 * timestamp * timestamp + 10 * timecount);\n}\nfunction fb_calculate_attributes(radius, innerConainer, trgClass) {\n var centerX = radius;\n var centerY = radius;\n var diameter = radius * 2;\n var startArc = 315;\n var endArc = 45;\n var svg = innerConainer.querySelector('.' + trgClass);\n var circle = svg.querySelector('.e-path-circle');\n var path = svg.querySelector('.e-path-arc');\n var transformOrigin = (diameter / 2) + 'px';\n circle.setAttribute('d', defineCircle(centerX, centerY, radius));\n path.setAttribute('d', defineArc(centerX, centerY, radius, startArc, endArc));\n svg.setAttribute('viewBox', '0 0 ' + diameter + ' ' + diameter);\n svg.style.transformOrigin = transformOrigin + ' ' + transformOrigin + ' ' + transformOrigin;\n svg.style.width = svg.style.height = diameter + 'px';\n}\nfunction defineArcPoints(centerX, centerY, radius, angle) {\n var radians = (angle - 90) * Math.PI / 180.0;\n return {\n x: centerX + (radius * Math.cos(radians)),\n y: centerY + (radius * Math.sin(radians))\n };\n}\nfunction defineArc(x, y, radius, startArc, endArc) {\n var start = defineArcPoints(x, y, radius, endArc);\n var end = defineArcPoints(x, y, radius, startArc);\n var d = [\n 'M', start.x, start.y,\n 'A', radius, radius, 0, 0, 0, end.x, end.y\n ].join(' ');\n return d;\n}\nfunction defineCircle(x, y, radius) {\n var d = [\n 'M', x, y,\n 'm', -radius, 0,\n 'a', radius, radius, 0, 1, 0, radius * 2, 0,\n 'a', radius, radius, 0, 1, 0, -radius * 2, 0,\n ].join(' ');\n return d;\n}\n/**\n * Function to show the Spinner.\n * @param container - Specify the target of the Spinner.\n * @private\n */\nexport function showSpinner(container) {\n showHideSpinner(container, false);\n container = null;\n}\nfunction showHideSpinner(container, isHide) {\n var spinnerWrap;\n if (container) {\n spinnerWrap = container.classList.contains(CLS_SPINWRAP) ? container :\n container.querySelector('.' + CLS_SPINWRAP);\n }\n if (container && spinnerWrap) {\n var inner = spinnerWrap.querySelector('.' + CLS_SPININWRAP);\n var spinCheck = void 0;\n spinCheck = isHide ? !spinnerWrap.classList.contains(CLS_SPINTEMPLATE) && !spinnerWrap.classList.contains(CLS_HIDESPIN) :\n !spinnerWrap.classList.contains(CLS_SPINTEMPLATE) && !spinnerWrap.classList.contains(CLS_SHOWSPIN);\n if (spinCheck) {\n var svgEle = spinnerWrap.querySelector('svg');\n if (isNullOrUndefined(svgEle)) {\n return;\n }\n var id = svgEle.getAttribute('id');\n globalTimeOut[id].isAnimate = !isHide;\n switch (globalTimeOut[id].type) {\n case 'Material':\n isHide ? clearTimeout(globalTimeOut[id].timeOut) : startMatAnimate(inner, id, globalTimeOut[id].radius);\n break;\n case 'Bootstrap':\n isHide ? clearTimeout(globalTimeOut[id].timeOut) : animateBootstrap(inner);\n break;\n }\n }\n isHide ? classList(spinnerWrap, [CLS_HIDESPIN], [CLS_SHOWSPIN]) : classList(spinnerWrap, [CLS_SHOWSPIN], [CLS_HIDESPIN]);\n container = null;\n }\n}\n/**\n * Function to hide the Spinner.\n * @param container - Specify the target of the Spinner.\n * @private\n */\nexport function hideSpinner(container) {\n showHideSpinner(container, true);\n container = null;\n}\n/**\n * Function to change the Spinners in a page globally from application end.\n * ```\n * E.g : setSpinner({ cssClass: 'custom-css'; type: 'Material' });\n * ```\n * @param args\n * @private\n */\nexport function setSpinner(args, internalCreateElement) {\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n if (args.template !== undefined) {\n spinTemplate = args.template;\n if (args.template !== undefined) {\n spinCSSClass = args.cssClass;\n }\n }\n var container = document.querySelectorAll('.' + CLS_SPINWRAP);\n for (var index = 0; index < container.length; index++) {\n ensureTemplate(args.template, container[index], args.type, args.cssClass, makeElement);\n }\n}\nfunction ensureTemplate(template, container, theme, cssClass, makeEle) {\n if (isNullOrUndefined(template) && !container.classList.contains(CLS_SPINTEMPLATE)) {\n replaceTheme(container, theme, cssClass, makeEle);\n if (container.classList.contains(CLS_SHOWSPIN)) {\n container.classList.remove(CLS_SHOWSPIN);\n showSpinner(container);\n }\n else {\n container.classList.remove(CLS_HIDESPIN);\n hideSpinner(container);\n }\n }\n else {\n spinTemplate = template;\n if (!isNullOrUndefined(cssClass)) {\n spinCSSClass = cssClass;\n }\n }\n}\nfunction replaceTheme(container, theme, cssClass, makeEle) {\n if (!isNullOrUndefined(cssClass)) {\n container.classList.add(cssClass);\n }\n var svgElement = container.querySelector('svg');\n var radius = theme === 'Bootstrap' ? parseFloat(svgElement.style.height) : parseFloat(svgElement.style.height) / 2;\n var classNames = svgElement.getAttribute('class');\n var svgClassList = classNames.split(/\\s/);\n if (svgClassList.indexOf('e-spin-material') >= 0) {\n var id = svgElement.getAttribute('id');\n clearTimeout(globalTimeOut[id].timeOut);\n }\n setTheme(theme, container, radius, makeEle);\n}\n","import { Draggable, Droppable, isBlazor } from '@syncfusion/ej2-base';\nimport { createElement, closest, remove, classList, addClass, removeClass } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { parentsUntil, isActionPrevent, isGroupAdaptive, updatecloneRow } from '../base/util';\nimport * as events from '../base/constant';\nimport { AriaService } from '../services/aria-service';\nimport { GroupModelGenerator } from '../services/group-model-generator';\nimport { DataUtil } from '@syncfusion/ej2-data';\n/**\n *\n * The `Group` module is used to handle group action.\n */\nvar Group = /** @class */ (function () {\n /**\n * Constructor for Grid group module\n * @hidden\n */\n function Group(parent, groupSettings, sortedColumns, serviceLocator) {\n var _this = this;\n //Internal variables\n this.sortRequired = true;\n this.isAppliedGroup = false;\n this.isAppliedUnGroup = false;\n this.reorderingColumns = [];\n this.visualElement = createElement('div', {\n className: 'e-cloneproperties e-dragclone e-gdclone',\n styles: 'line-height:23px', attrs: { action: 'grouping' }\n });\n this.helper = function (e) {\n var gObj = _this.parent;\n var target = e.sender.target;\n var element = target.classList.contains('e-groupheadercell') ? target :\n parentsUntil(target, 'e-groupheadercell');\n if (!element || (!target.classList.contains('e-drag') && _this.groupSettings.allowReordering)) {\n return false;\n }\n _this.column = gObj.getColumnByField(element.firstElementChild.getAttribute('ej-mappingname'));\n _this.visualElement.textContent = element.textContent;\n _this.visualElement.style.width = element.offsetWidth + 2 + 'px';\n _this.visualElement.style.height = element.offsetHeight + 2 + 'px';\n _this.visualElement.setAttribute('e-mappinguid', _this.column.uid);\n gObj.element.appendChild(_this.visualElement);\n return _this.visualElement;\n };\n this.dragStart = function (e) {\n _this.parent.element.classList.add('e-ungroupdrag');\n if (isBlazor()) {\n e.bindEvents(e.dragElement);\n }\n };\n this.drag = function (e) {\n if (_this.groupSettings.allowReordering) {\n _this.animateDropper(e);\n }\n var target = e.target;\n var cloneElement = _this.parent.element.querySelector('.e-cloneproperties');\n _this.parent.trigger(events.columnDrag, { target: target, draggableType: 'headercell', column: _this.column });\n if (!_this.groupSettings.allowReordering) {\n classList(cloneElement, ['e-defaultcur'], ['e-notallowedcur']);\n if (!(parentsUntil(target, 'e-gridcontent') || parentsUntil(target, 'e-headercell'))) {\n classList(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);\n }\n }\n };\n this.dragStop = function (e) {\n _this.parent.element.classList.remove('e-ungroupdrag');\n var preventDrop = !(parentsUntil(e.target, 'e-gridcontent') || parentsUntil(e.target, 'e-gridheader'));\n if (_this.groupSettings.allowReordering && preventDrop) {\n remove(e.helper);\n if (parentsUntil(e.target, 'e-groupdroparea')) {\n _this.rearrangeGroup(e);\n }\n else if (!(parentsUntil(e.target, 'e-grid'))) {\n var field = _this.parent.getColumnByUid(e.helper.getAttribute('e-mappinguid')).field;\n if (_this.groupSettings.columns.indexOf(field) !== -1) {\n _this.ungroupColumn(field);\n }\n }\n return;\n }\n else if (preventDrop) {\n remove(e.helper);\n return;\n }\n };\n this.animateDropper = function (e) {\n var uid = _this.parent.element.querySelector('.e-cloneproperties').getAttribute('e-mappinguid');\n var dragField = _this.parent.getColumnByUid(uid).field;\n var parent = parentsUntil(e.target, 'e-groupdroparea');\n var dropTarget = parentsUntil(e.target, 'e-group-animator');\n // tslint:disable-next-line\n var grouped = [].slice.call(_this.element.querySelectorAll('.e-groupheadercell'))\n .map(function (e) { return e.querySelector('div').getAttribute('ej-mappingname'); });\n var cols = JSON.parse(JSON.stringify(grouped));\n if (dropTarget || parent) {\n if (dropTarget) {\n var dropField = dropTarget.querySelector('div[ej-mappingname]').getAttribute('ej-mappingname');\n var dropIndex = +(dropTarget.getAttribute('index'));\n if (dropField !== dragField) {\n var dragIndex = cols.indexOf(dragField);\n if (dragIndex !== -1) {\n cols.splice(dragIndex, 1);\n }\n var flag = dropIndex !== -1 && dragIndex === dropIndex;\n cols.splice(dropIndex + (flag ? 1 : 0), 0, dragField);\n }\n }\n else if (parent && cols.indexOf(dragField) === -1) {\n cols.push(dragField);\n }\n _this.element.innerHTML = '';\n if (cols.length && !_this.element.classList.contains('e-grouped')) {\n _this.element.classList.add('e-grouped');\n }\n _this.reorderingColumns = cols;\n for (var c = 0; c < cols.length; c++) {\n _this.addColToGroupDrop(cols[c]);\n }\n }\n else {\n _this.addLabel();\n _this.removeColFromGroupDrop(dragField);\n }\n };\n this.drop = function (e) {\n var gObj = _this.parent;\n var column = gObj.getColumnByUid(e.droppedElement.getAttribute('e-mappinguid'));\n _this.element.classList.remove('e-hover');\n remove(e.droppedElement);\n _this.aria.setDropTarget(_this.parent.element.querySelector('.e-groupdroparea'), false);\n _this.aria.setGrabbed(_this.parent.getHeaderTable().querySelector('[aria-grabbed=true]'), false);\n if (isNullOrUndefined(column) || column.allowGrouping === false ||\n parentsUntil(gObj.getColumnHeaderByUid(column.uid), 'e-grid').getAttribute('id') !==\n gObj.element.getAttribute('id')) {\n _this.parent.log('action_disabled_column', { moduleName: _this.getModuleName(), columnName: column.headerText });\n return;\n }\n _this.groupColumn(column.field);\n };\n this.contentRefresh = true;\n this.aria = new AriaService();\n this.parent = parent;\n this.groupSettings = groupSettings;\n this.serviceLocator = serviceLocator;\n this.sortedColumns = sortedColumns;\n this.focus = serviceLocator.getService('focus');\n this.addEventListener();\n this.groupGenerator = new GroupModelGenerator(this.parent);\n }\n Group.prototype.addLabel = function () {\n if (!this.element.querySelectorAll('.e-group-animator').length) {\n var dragLabel = this.l10n.getConstant('GroupDropArea');\n this.element.innerHTML = dragLabel;\n this.element.classList.remove('e-grouped');\n }\n };\n Group.prototype.rearrangeGroup = function (e) {\n this.sortRequired = false;\n this.updateModel();\n };\n Group.prototype.columnDrag = function (e) {\n if (this.groupSettings.allowReordering) {\n this.animateDropper(e);\n }\n var gObj = this.parent;\n var cloneElement = this.parent.element.querySelector('.e-cloneproperties');\n classList(cloneElement, ['e-defaultcur'], ['e-notallowedcur']);\n if (!parentsUntil(e.target, 'e-groupdroparea') &&\n !(this.parent.allowReordering && parentsUntil(e.target, 'e-headercell'))) {\n classList(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);\n }\n e.target.classList.contains('e-groupdroparea') ? this.element.classList.add('e-hover') : this.element.classList.remove('e-hover');\n };\n Group.prototype.columnDragStart = function (e) {\n if (e.target.classList.contains('e-stackedheadercell')) {\n return;\n }\n var gObj = this.parent;\n var dropArea = this.parent.element.querySelector('.e-groupdroparea');\n this.aria.setDropTarget(dropArea, e.column.allowGrouping);\n var element = e.target.classList.contains('e-headercell') ? e.target : parentsUntil(e.target, 'e-headercell');\n this.aria.setGrabbed(element, true, !e.column.allowGrouping);\n };\n Group.prototype.columnDrop = function (e) {\n var gObj = this.parent;\n if (e.droppedElement.getAttribute('action') === 'grouping') {\n var column = gObj.getColumnByUid(e.droppedElement.getAttribute('e-mappinguid'));\n if (isNullOrUndefined(column) || column.allowGrouping === false ||\n parentsUntil(gObj.getColumnHeaderByUid(column.uid), 'e-grid').getAttribute('id') !==\n gObj.element.getAttribute('id')) {\n return;\n }\n this.ungroupColumn(column.field);\n }\n };\n /**\n * @hidden\n */\n Group.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.uiUpdate, this.enableAfterRender, this);\n this.parent.on(events.groupComplete, this.onActionComplete, this);\n this.parent.on(events.ungroupComplete, this.onActionComplete, this);\n this.parent.on(events.inBoundModelChanged, this.onPropertyChanged, this);\n this.parent.on(events.click, this.clickHandler, this);\n this.parent.on(events.columnDrag, this.columnDrag, this);\n this.parent.on(events.columnDragStart, this.columnDragStart, this);\n this.parent.on(events.headerDrop, this.columnDrop, this);\n this.parent.on(events.columnDrop, this.columnDrop, this);\n this.parent.on(events.headerRefreshed, this.refreshSortIcons, this);\n this.parent.on(events.sortComplete, this.refreshSortIcons, this);\n this.parent.on(events.keyPressed, this.keyPressHandler, this);\n this.parent.on(events.contentReady, this.initialEnd, this);\n this.parent.on(events.onEmpty, this.initialEnd, this);\n this.parent.on(events.initialEnd, this.render, this);\n this.parent.on(events.groupAggregates, this.onGroupAggregates, this);\n this.parent.on('blazor-action-begin', this.blazorActionBegin, this);\n this.parent.on('group-expand-collapse', this.updateExpand, this);\n this.parent.on('persist-data-changed', this.initialEnd, this);\n };\n /**\n * @hidden\n */\n Group.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.initialEnd, this.render);\n this.parent.off(events.uiUpdate, this.enableAfterRender);\n this.parent.off(events.groupComplete, this.onActionComplete);\n this.parent.off(events.ungroupComplete, this.onActionComplete);\n this.parent.off(events.inBoundModelChanged, this.onPropertyChanged);\n this.parent.off(events.click, this.clickHandler);\n this.parent.off(events.columnDrag, this.columnDrag);\n this.parent.off(events.columnDragStart, this.columnDragStart);\n this.parent.off(events.columnDrop, this.columnDrop);\n this.parent.off(events.headerDrop, this.columnDrop);\n this.parent.off(events.headerRefreshed, this.refreshSortIcons);\n this.parent.off(events.sortComplete, this.refreshSortIcons);\n this.parent.off(events.keyPressed, this.keyPressHandler);\n this.parent.off(events.groupAggregates, this.onGroupAggregates);\n this.parent.off('blazor-action-begin', this.blazorActionBegin);\n this.parent.off('group-expand-collapse', this.updateExpand);\n };\n Group.prototype.blazorActionBegin = function () {\n if (this.parent.allowGrouping && !this.parent.isCollapseStateEnabled()) {\n this.expandAll();\n }\n };\n Group.prototype.initialEnd = function () {\n var gObj = this.parent;\n this.parent.off(events.contentReady, this.initialEnd);\n this.parent.off(events.onEmpty, this.initialEnd);\n if (isBlazor() && gObj.isServerRendered) {\n for (var i = 0; i < gObj.columns.length; i++) {\n this.removeColFromGroupDrop(gObj.columns[i].field);\n }\n this.updateGroupDropArea();\n }\n if (this.parent.getColumns().length && this.groupSettings.columns.length) {\n this.contentRefresh = false;\n for (var _i = 0, _a = gObj.groupSettings.columns; _i < _a.length; _i++) {\n var col = _a[_i];\n this.groupColumn(col);\n }\n this.contentRefresh = true;\n }\n };\n Group.prototype.keyPressHandler = function (e) {\n var gObj = this.parent;\n if (e.action !== 'ctrlSpace' && (!this.groupSettings.columns.length ||\n ['altDownArrow', 'altUpArrow', 'ctrlDownArrow', 'ctrlUpArrow', 'enter'].indexOf(e.action) === -1)) {\n return;\n }\n e.preventDefault();\n switch (e.action) {\n case 'altDownArrow':\n case 'altUpArrow':\n var selected = gObj.allowSelection ? gObj.getSelectedRowIndexes() : [];\n if (selected.length) {\n var rows = gObj.getContentTable().querySelector('tbody').children;\n var dataRow = gObj.getDataRows()[selected[selected.length - 1]];\n var grpRow = void 0;\n for (var i = dataRow.rowIndex; i >= 0; i--) {\n if (!rows[i].classList.contains('e-row') && !rows[i].classList.contains('e-detailrow')) {\n grpRow = rows[i];\n break;\n }\n }\n this.expandCollapseRows(grpRow.querySelector(e.action === 'altUpArrow' ?\n '.e-recordplusexpand' : '.e-recordpluscollapse'));\n }\n break;\n case 'ctrlDownArrow':\n this.expandAll();\n break;\n case 'ctrlUpArrow':\n this.collapseAll();\n break;\n case 'enter':\n if (this.parent.isEdit || (closest(e.target, '#' + this.parent.element.id + '_searchbar') !== null)) {\n return;\n }\n var element = this.focus.getFocusedElement();\n var row = element ? element.parentElement.querySelector('[class^=\"e-record\"]') : null;\n if (!row) {\n break;\n }\n this.expandCollapseRows(row);\n break;\n case 'ctrlSpace':\n var elem = gObj.focusModule.currentInfo.element;\n if (elem && elem.classList.contains('e-headercell')) {\n var column = gObj.getColumnByUid(elem.firstElementChild.getAttribute('e-mappinguid'));\n column.field && gObj.groupSettings.columns.indexOf(column.field) < 0 ?\n this.groupColumn(column.field) : this.ungroupColumn(column.field);\n }\n break;\n }\n };\n Group.prototype.clickHandler = function (e) {\n this.expandCollapseRows(e.target);\n this.applySortFromTarget(e.target);\n this.unGroupFromTarget(e.target);\n this.toogleGroupFromHeader(e.target);\n };\n Group.prototype.unGroupFromTarget = function (target) {\n if (target.classList.contains('e-ungroupbutton')) {\n this.ungroupColumn(target.parentElement.getAttribute('ej-mappingname'));\n }\n };\n Group.prototype.toogleGroupFromHeader = function (target) {\n if (this.groupSettings.showToggleButton) {\n if (target.classList.contains('e-grptogglebtn')) {\n if (target.classList.contains('e-toggleungroup')) {\n this.ungroupColumn(this.parent.getColumnByUid(target.parentElement.getAttribute('e-mappinguid')).field);\n }\n else {\n this.groupColumn(this.parent.getColumnByUid(target.parentElement.getAttribute('e-mappinguid')).field);\n }\n }\n else {\n if (target.classList.contains('e-toggleungroup')) {\n this.ungroupColumn(target.parentElement.getAttribute('ej-mappingname'));\n }\n }\n }\n };\n Group.prototype.applySortFromTarget = function (target) {\n var gObj = this.parent;\n var gHeader = closest(target, '.e-groupheadercell');\n if (gObj.allowSorting && gHeader && !target.classList.contains('e-ungroupbutton') &&\n !target.classList.contains('e-toggleungroup')) {\n var field = gHeader.firstElementChild.getAttribute('ej-mappingname');\n if (gObj.getColumnHeaderByField(field).querySelectorAll('.e-ascending').length) {\n gObj.sortColumn(field, 'Descending', true);\n }\n else {\n gObj.sortColumn(field, 'Ascending', true);\n }\n }\n };\n /**\n * Expands or collapses grouped rows by target element.\n * @param {Element} target - Defines the target element of the grouped row.\n * @return {void}\n */\n Group.prototype.expandCollapseRows = function (target) {\n var trgt = parentsUntil(target, 'e-recordplusexpand') ||\n parentsUntil(target, 'e-recordpluscollapse');\n if (trgt) {\n var cellIdx = trgt.cellIndex;\n var rowIdx = trgt.parentElement.rowIndex;\n var rowNodes = this.parent.getContentTable().querySelector('tbody').children;\n var rows = [].slice.call(rowNodes).slice(rowIdx + 1, rowNodes.length);\n var isHide = void 0;\n var expandElem = void 0;\n var dataManager = void 0;\n var query = void 0;\n var toExpand = [];\n var gObj = this.parent;\n var indent = trgt.parentElement.querySelectorAll('.e-indentcell').length;\n var expand = false;\n if (isBlazor() && this.parent.isCollapseStateEnabled()) {\n this.parent.notify('group-expand-collapse', {\n uid: trgt.parentElement.getAttribute('data-uid'),\n isExpand: trgt.classList.contains('e-recordpluscollapse')\n });\n return;\n }\n if (trgt.classList.contains('e-recordpluscollapse')) {\n addClass([trgt], 'e-recordplusexpand');\n removeClass([trgt], 'e-recordpluscollapse');\n trgt.firstElementChild.className = 'e-icons e-gdiagonaldown e-icon-gdownarrow';\n expand = true;\n if (isGroupAdaptive(gObj)) {\n this.updateVirtualRows(gObj, target, expand, query, dataManager);\n }\n if (this.parent.groupSettings.enableLazyLoading) {\n this.parent.contentModule.captionExpand(trgt.parentElement);\n }\n }\n else {\n isHide = true;\n removeClass([trgt], 'e-recordplusexpand');\n addClass([trgt], 'e-recordpluscollapse');\n trgt.firstElementChild.className = 'e-icons e-gnextforward e-icon-grightarrow';\n if (isGroupAdaptive(gObj)) {\n this.updateVirtualRows(gObj, target, !isHide, query, dataManager);\n }\n if (this.parent.groupSettings.enableLazyLoading) {\n this.parent.contentModule.captionCollapse(trgt.parentElement);\n }\n }\n this.aria.setExpand(trgt, expand);\n if (!isGroupAdaptive(gObj) && !this.parent.groupSettings.enableLazyLoading) {\n for (var i = 0, len = rows.length; i < len; i++) {\n if (rows[i].querySelectorAll('td')[cellIdx] &&\n rows[i].querySelectorAll('td')[cellIdx].classList.contains('e-indentcell') && rows) {\n if (isHide) {\n rows[i].style.display = 'none';\n }\n else {\n if (rows[i].querySelectorAll('.e-indentcell').length === indent + 1) {\n rows[i].style.display = '';\n expandElem = rows[i].querySelector('.e-recordplusexpand');\n if (expandElem) {\n toExpand.push(expandElem);\n }\n if (rows[i].classList.contains('e-detailrow')) {\n if (rows[i - 1].querySelectorAll('.e-detailrowcollapse').length) {\n rows[i].style.display = 'none';\n }\n }\n }\n }\n }\n else {\n break;\n }\n }\n this.updateVisibleexpandCollapseRows();\n this.parent.notify(events.refreshExpandandCollapse, { rows: this.parent.getRowsObject() });\n }\n for (var i = 0, len = toExpand.length; i < len; i++) {\n removeClass([toExpand[i]], 'e-recordplusexpand');\n addClass([toExpand[i]], 'e-recordpluscollapse');\n toExpand[i].firstElementChild.className = 'e-icons e-gnextforward e-icon-grightarrow';\n this.expandCollapseRows(toExpand[i]);\n }\n }\n };\n Group.prototype.updateVisibleexpandCollapseRows = function () {\n var rows = this.parent.getRowsObject();\n for (var i = 0, len = rows.length; i < len; i++) {\n if (rows[i].isDataRow && this.parent.getRowElementByUID(rows[i].uid).style.display === 'none') {\n rows[i].visible = false;\n }\n }\n };\n Group.prototype.updateVirtualRows = function (gObj, target, isExpand, query, dataManager) {\n var rObj = gObj.getRowObjectFromUID(target.closest('tr').getAttribute('data-uid'));\n rObj.isExpand = isExpand;\n updatecloneRow(gObj);\n this.parent.notify(events.refreshVirtualMaxPage, {});\n query = gObj.getDataModule().generateQuery(false);\n query.queries = gObj.getDataModule().aggregateQuery(gObj.getQuery().clone()).queries;\n var args = { requestType: 'virtualscroll', rowObject: rObj };\n dataManager = gObj.getDataModule().getData(args, query.requiresCount());\n dataManager.then(function (e) { return gObj.renderModule.dataManagerSuccess(e, args); });\n };\n Group.prototype.expandCollapse = function (isExpand) {\n if (isBlazor() && this.parent.isCollapseStateEnabled()) {\n this.parent.notify('group-expand-collapse', { isExpand: isExpand });\n return;\n }\n if (!isExpand) {\n this.parent.notify(events.initialCollapse, isExpand);\n }\n var rowNodes = this.parent.getContentTable().querySelector('tbody').children;\n var row;\n for (var i = 0, len = rowNodes.length; i < len; i++) {\n if (rowNodes[i].querySelectorAll('.e-recordplusexpand, .e-recordpluscollapse').length) {\n row = rowNodes[i].querySelector(isExpand ? '.e-recordpluscollapse' : '.e-recordplusexpand');\n if (row) {\n row.className = isExpand ? 'e-recordplusexpand' : 'e-recordpluscollapse';\n row.firstElementChild.className = isExpand ? 'e-icons e-gdiagonaldown e-icon-gdownarrow' :\n 'e-icons e-gnextforward e-icon-grightarrow';\n }\n if (!(rowNodes[i].firstElementChild.classList.contains('e-recordplusexpand') ||\n rowNodes[i].firstElementChild.classList.contains('e-recordpluscollapse'))) {\n rowNodes[i].style.display = isExpand ? '' : 'none';\n }\n }\n else {\n rowNodes[i].style.display = isExpand ? '' : 'none';\n }\n }\n this.updateVisibleexpandCollapseRows();\n this.parent.notify(events.refreshExpandandCollapse, { rows: this.parent.getRowsObject() });\n };\n /**\n * Expands all the grouped rows of the Grid.\n * @return {void}\n */\n Group.prototype.expandAll = function () {\n this.expandCollapse(true);\n };\n /**\n * Collapses all the grouped rows of the Grid.\n * @return {void}\n */\n Group.prototype.collapseAll = function () {\n this.expandCollapse(false);\n };\n /**\n * The function is used to render grouping\n * @return {Element}\n * @hidden\n */\n Group.prototype.render = function () {\n this.l10n = this.serviceLocator.getService('localization');\n this.renderGroupDropArea();\n this.initDragAndDrop();\n this.refreshToggleBtn();\n };\n Group.prototype.renderGroupDropArea = function () {\n var groupElem = this.parent.element.querySelector('.e-groupdroparea');\n if (groupElem) {\n remove(groupElem);\n }\n this.element = this.parent.createElement('div', { className: 'e-groupdroparea', attrs: { 'tabindex': '-1' } });\n if (this.groupSettings.allowReordering) {\n this.element.classList.add('e-group-animate');\n }\n this.updateGroupDropArea();\n this.parent.element.insertBefore(this.element, this.parent.element.firstChild);\n if (!this.groupSettings.showDropArea) {\n this.element.style.display = 'none';\n }\n };\n Group.prototype.updateGroupDropArea = function (clear) {\n if (this.groupSettings.showDropArea && !this.groupSettings.columns.length) {\n var dragLabel = this.l10n.getConstant('GroupDropArea');\n this.element.innerHTML = dragLabel;\n this.element.classList.remove('e-grouped');\n }\n else {\n if ((this.element.innerHTML === this.l10n.getConstant('GroupDropArea') && (this.groupSettings.columns.length === 1\n || !this.isAppliedGroup && !this.isAppliedUnGroup)) || clear) {\n this.element.innerHTML = '';\n }\n this.element.classList.add('e-grouped');\n }\n };\n Group.prototype.initDragAndDrop = function () {\n this.initializeGHeaderDrop();\n this.initializeGHeaderDrag();\n };\n Group.prototype.initializeGHeaderDrag = function () {\n var drag = new Draggable(this.element, {\n dragTarget: this.groupSettings.allowReordering ? '.e-drag' : '.e-groupheadercell',\n distance: this.groupSettings.allowReordering ? -10 : 5,\n helper: this.helper,\n dragStart: this.dragStart,\n drag: this.drag,\n dragStop: this.dragStop\n });\n };\n Group.prototype.initializeGHeaderDrop = function () {\n var gObj = this.parent;\n var drop = new Droppable(this.element, {\n accept: '.e-dragclone',\n drop: this.drop\n });\n };\n /**\n * Groups a column by column name.\n * @param {string} columnName - Defines the column name to group.\n * @return {void}\n */\n Group.prototype.groupColumn = function (columnName) {\n var gObj = this.parent;\n var column = gObj.getColumnByField(columnName);\n if (isNullOrUndefined(column) || column.allowGrouping === false ||\n (this.contentRefresh && this.groupSettings.columns.indexOf(columnName) > -1)) {\n this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), columnName: column.headerText });\n return;\n }\n if (isActionPrevent(gObj)) {\n gObj.notify(events.preventBatch, { instance: this, handler: this.groupColumn, arg1: columnName });\n return;\n }\n column.visible = gObj.groupSettings.showGroupedColumn;\n this.colName = columnName;\n this.isAppliedGroup = true;\n if (this.contentRefresh) {\n this.updateModel();\n }\n else {\n this.addColToGroupDrop(columnName);\n }\n this.updateGroupDropArea();\n this.isAppliedGroup = false;\n };\n /**\n * Ungroups a column by column name.\n * @param {string} columnName - Defines the column name to ungroup.\n * @return {void}\n */\n Group.prototype.ungroupColumn = function (columnName) {\n var gObj = this.parent;\n var column = this.parent.enableColumnVirtualization ?\n this.parent.columns.filter(function (c) { return c.field === columnName; })[0] : gObj.getColumnByField(columnName);\n if (isNullOrUndefined(column) || column.allowGrouping === false || this.groupSettings.columns.indexOf(columnName) < 0) {\n return;\n }\n if (isActionPrevent(gObj)) {\n gObj.notify(events.preventBatch, { instance: this, handler: this.ungroupColumn, arg1: columnName });\n return;\n }\n column.visible = true;\n if (isBlazor() && gObj.isServerRendered) {\n var setVisible = [];\n setVisible[0] = column;\n this.parent.notify('setvisibility', setVisible);\n }\n this.colName = column.field;\n var columns = JSON.parse(JSON.stringify(this.groupSettings.columns));\n columns.splice(columns.indexOf(this.colName), 1);\n if (this.sortedColumns.indexOf(columnName) < 0) {\n for (var i = 0, len = gObj.sortSettings.columns.length; i < len; i++) {\n if (columnName === gObj.sortSettings.columns[i].field) {\n gObj.sortSettings.columns.splice(i, 1);\n break;\n }\n }\n }\n var isServerRendered = 'isServerRendered';\n if (isBlazor() && this.parent[isServerRendered]) {\n gObj.sortSettings.columns = gObj.sortSettings.columns;\n }\n if (this.groupSettings.allowReordering) {\n this.reorderingColumns = columns;\n }\n this.groupSettings.columns = columns;\n if (gObj.allowGrouping) {\n this.isAppliedUnGroup = true;\n this.parent.dataBind();\n }\n };\n /**\n * The function used to update groupSettings\n * @return {void}\n * @hidden\n */\n Group.prototype.updateModel = function () {\n var gObj = this.parent;\n var i = 0;\n var columns = JSON.parse(JSON.stringify(this.groupSettings.columns));\n columns = this.reorderingColumns.length ? JSON.parse(JSON.stringify(this.reorderingColumns)) : columns;\n if (this.sortRequired) {\n if (columns.indexOf(this.colName) === -1) {\n columns.push(this.colName);\n }\n this.groupAddSortingQuery(this.colName);\n }\n this.sortRequired = true;\n this.parent.groupSettings.columns = columns;\n this.parent.dataBind();\n };\n /**\n * The function used to trigger onActionComplete\n * @return {void}\n * @hidden\n */\n Group.prototype.onActionComplete = function (e) {\n if (isBlazor() && !this.parent.isJsComponent) {\n e.rows = null;\n }\n var gObj = this.parent;\n if (e.requestType === 'grouping') {\n this.addColToGroupDrop(this.colName);\n }\n else {\n this.removeColFromGroupDrop(this.colName);\n }\n var args = this.groupSettings.columns.indexOf(this.colName) > -1 ? {\n columnName: this.colName, requestType: 'grouping', type: events.actionComplete\n } : { requestType: 'ungrouping', type: events.actionComplete };\n this.parent.trigger(events.actionComplete, extend(e, args));\n this.colName = null;\n };\n Group.prototype.groupAddSortingQuery = function (colName) {\n var i = 0;\n while (i < this.parent.sortSettings.columns.length) {\n if (this.parent.sortSettings.columns[i].field === colName) {\n break;\n }\n i++;\n }\n if (this.parent.sortSettings.columns.length === i) {\n this.parent.sortSettings.columns.push({ field: colName, direction: 'Ascending', isFromGroup: true });\n var isServerRendered = 'isServerRendered';\n if (isBlazor() && this.parent[isServerRendered]) {\n this.parent.sortSettings.columns = this.parent.sortSettings.columns;\n }\n }\n else if (!this.parent.allowSorting) {\n this.parent.sortSettings.columns[i].direction = 'Ascending';\n }\n };\n Group.prototype.createElement = function (field) {\n var gObj = this.parent;\n var direction = 'Ascending';\n var animator = this.parent.createElement('div', { className: 'e-grid-icon e-group-animator' });\n var groupedColumn = this.parent.createElement('div', { className: 'e-grid-icon e-groupheadercell' });\n var childDiv = this.parent.createElement('div', { attrs: { 'ej-mappingname': field } });\n var column = this.parent.getColumnByField(field);\n //Todo headerTemplateID for grouped column, disableHtmlEncode \n var headerCell = gObj.getColumnHeaderByUid(column.uid);\n // if (!isNullOrUndefined(column.headerTemplate)) {\n // if (column.headerTemplate.indexOf('#') !== -1) {\n // childDiv.innerHTML = document.querySelector(column.headerTemplate).innerHTML.trim();\n // } else {\n // childDiv.innerHTML = column.headerTemplate;\n // }\n // childDiv.firstElementChild.classList.add('e-grouptext');\n // } else {\n if (this.groupSettings.allowReordering) {\n childDiv.appendChild(this.parent.createElement('span', {\n className: 'e-drag e-icons e-icon-drag', innerHTML: ' ',\n attrs: { title: 'Drag', tabindex: '-1', 'aria-label': 'Drag the grouped column' }\n }));\n }\n childDiv.appendChild(this.parent.createElement('span', {\n className: 'e-grouptext', innerHTML: column.headerText,\n attrs: { tabindex: '-1', 'aria-label': 'sort the grouped column' }\n }));\n // }\n if (this.groupSettings.showToggleButton) {\n childDiv.appendChild(this.parent.createElement('span', {\n className: 'e-togglegroupbutton e-icons e-icon-ungroup e-toggleungroup', innerHTML: ' ',\n attrs: { tabindex: '-1', 'aria-label': 'ungroup button' }\n }));\n }\n if (headerCell.querySelectorAll('.e-ascending,.e-descending').length) {\n direction = headerCell.querySelector('.e-ascending') ? 'Ascending' : 'Descending';\n }\n childDiv.appendChild(this.parent.createElement('span', {\n className: 'e-groupsort e-icons ' +\n ('e-' + direction.toLowerCase() + ' e-icon-' + direction.toLowerCase()), innerHTML: ' ',\n attrs: { tabindex: '-1', 'aria-label': 'sort the grouped column' }\n }));\n childDiv.appendChild(this.parent.createElement('span', {\n className: 'e-ungroupbutton e-icons e-icon-hide', innerHTML: ' ',\n attrs: { title: isBlazor() ? this.l10n.getConstant('UnGroupButton') : this.l10n.getConstant('UnGroup'),\n tabindex: '-1', 'aria-label': 'ungroup the grouped column' },\n styles: this.groupSettings.showUngroupButton ? '' : 'display:none'\n }));\n groupedColumn.appendChild(childDiv);\n var index = this.groupSettings.columns.indexOf(field);\n if (this.groupSettings.allowReordering) {\n animator.appendChild(groupedColumn);\n animator.appendChild(this.createSeparator());\n groupedColumn = animator;\n }\n return groupedColumn;\n };\n Group.prototype.addColToGroupDrop = function (field) {\n if (this.groupSettings.allowReordering\n && this.parent.element.querySelector('.e-groupdroparea div[ej-mappingname=' + field + ']')) {\n return;\n }\n var column = this.parent.getColumnByField(field);\n if (isNullOrUndefined(column)) {\n return;\n }\n var groupedColumn = this.createElement(field);\n if (this.groupSettings.allowReordering) {\n var index = this.element.querySelectorAll('.e-group-animator').length;\n groupedColumn.setAttribute('index', index.toString());\n }\n this.element.appendChild(groupedColumn);\n //Todo: rtl \n };\n Group.prototype.createSeparator = function () {\n return this.parent.createElement('span', {\n className: 'e-nextgroup e-icons e-icon-next', innerHTML: ' ',\n attrs: { tabindex: '-1', 'aria-label': 'Separator for the grouped columns' },\n styles: this.groupSettings.showUngroupButton ? '' : 'display:none'\n });\n };\n Group.prototype.refreshToggleBtn = function (isRemove) {\n if (this.groupSettings.showToggleButton) {\n var headers = [].slice.call(this.parent.getHeaderTable().getElementsByClassName('e-headercelldiv'));\n for (var i = 0, len = headers.length; i < len; i++) {\n if (!((headers[i].classList.contains('e-emptycell')) || (headers[i].classList.contains('e-headerchkcelldiv')))) {\n var column = this.parent.getColumnByUid(headers[i].getAttribute('e-mappinguid'));\n if (!this.parent.showColumnMenu || (this.parent.showColumnMenu && !column.showColumnMenu)) {\n if (headers[i].querySelectorAll('.e-grptogglebtn').length) {\n remove(headers[i].querySelectorAll('.e-grptogglebtn')[0]);\n }\n if (!isRemove) {\n headers[i].appendChild(this.parent.createElement('span', {\n className: 'e-grptogglebtn e-icons ' +\n (this.groupSettings.columns.indexOf(column.field) > -1 ? 'e-toggleungroup e-icon-ungroup'\n : 'e-togglegroup e-icon-group'), attrs: { tabindex: '-1', 'aria-label': 'Group button' }\n }));\n }\n }\n }\n }\n }\n };\n Group.prototype.removeColFromGroupDrop = function (field) {\n if (!isNullOrUndefined(this.getGHeaderCell(field))) {\n var elem = this.getGHeaderCell(field);\n if (this.groupSettings.allowReordering) {\n var parent_1 = parentsUntil(elem, 'e-group-animator');\n remove(parent_1);\n }\n else {\n remove(elem);\n }\n this.updateGroupDropArea();\n }\n this.isAppliedUnGroup = false;\n };\n Group.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n for (var _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'columns':\n var args = void 0;\n if (this.contentRefresh) {\n if (!this.isAppliedUnGroup) {\n if (!this.isAppliedGroup) {\n this.updateGroupDropArea(true);\n for (var j = 0; j < this.parent.sortSettings.columns.length; j++) {\n if (this.parent.sortSettings.columns[j].isFromGroup) {\n this.parent.sortSettings.columns.splice(j, 1);\n j--;\n }\n }\n for (var i = 0; i < this.groupSettings.columns.length; i++) {\n this.colName = this.groupSettings.columns[i];\n var col = this.parent.getColumnByField(this.colName);\n col.visible = this.parent.groupSettings.showGroupedColumn;\n this.groupAddSortingQuery(this.colName);\n if (i < this.groupSettings.columns.length - 1) {\n this.addColToGroupDrop(this.groupSettings.columns[i]);\n }\n }\n }\n args = {\n columnName: this.colName, requestType: e.properties[prop].length ? 'grouping' : 'ungrouping',\n type: events.actionBegin\n };\n }\n else {\n args = { columnName: this.colName, requestType: 'ungrouping', type: events.actionBegin };\n }\n if (!this.groupSettings.showGroupedColumn) {\n var columns = e.oldProperties[prop];\n for (var i = 0; i < columns.length; i++) {\n if (e.properties[prop].indexOf(columns[i]) === -1) {\n this.parent.getColumnByField(columns[i]).visible = true;\n }\n }\n }\n var requestType = 'requestType';\n if (isBlazor() && this.parent.isServerRendered && this.parent.isCollapseStateEnabled() &&\n args[requestType] === 'grouping') {\n this.parent.refreshHeader();\n }\n this.parent.notify(events.modelChanged, args);\n }\n break;\n case 'showDropArea':\n this.updateGroupDropArea();\n this.groupSettings.showDropArea ? this.element.style.display = '' : this.element.style.display = 'none';\n break;\n case 'showGroupedColumn':\n this.updateGroupedColumn(this.groupSettings.showGroupedColumn);\n this.parent.notify(events.modelChanged, { requestType: 'refresh' });\n break;\n case 'showUngroupButton':\n this.updateButtonVisibility(this.groupSettings.showUngroupButton, 'e-ungroupbutton');\n break;\n case 'showToggleButton':\n this.updateButtonVisibility(this.groupSettings.showToggleButton, 'e-togglegroupbutton ');\n this.parent.refreshHeader();\n break;\n case 'enableLazyLoading':\n this.parent.freezeRefresh();\n break;\n }\n }\n };\n Group.prototype.updateGroupedColumn = function (isVisible) {\n for (var i = 0; i < this.groupSettings.columns.length; i++) {\n this.parent.getColumnByField(this.groupSettings.columns[i]).visible = isVisible;\n }\n };\n Group.prototype.updateButtonVisibility = function (isVisible, className) {\n var gHeader = [].slice.call(this.element.querySelectorAll('.' + className));\n for (var i = 0; i < gHeader.length; i++) {\n gHeader[i].style.display = isVisible ? '' : 'none';\n }\n };\n Group.prototype.enableAfterRender = function (e) {\n if (e.module === this.getModuleName() && e.enable) {\n this.render();\n }\n };\n /**\n * To destroy the reorder\n * @return {void}\n * @hidden\n */\n Group.prototype.destroy = function () {\n var gridElement = this.parent.element;\n if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {\n return;\n }\n // tslint:disable-next-line:no-any\n if (!this.parent.isDestroyed && !this.parent.refreshing) {\n this.clearGrouping();\n }\n this.removeEventListener();\n this.refreshToggleBtn(true);\n remove(this.element);\n //call ejdrag and drop destroy\n };\n /**\n * Clears all the grouped columns of the Grid.\n * @return {void}\n */\n Group.prototype.clearGrouping = function () {\n var cols = JSON.parse(JSON.stringify(this.groupSettings.columns));\n this.contentRefresh = false;\n for (var i = 0, len = cols.length; i < len; i++) {\n if (i === (len - 1)) {\n this.contentRefresh = true;\n }\n this.ungroupColumn(cols[i]);\n }\n this.contentRefresh = true;\n };\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Group.prototype.getModuleName = function () {\n return 'group';\n };\n Group.prototype.refreshSortIcons = function (e) {\n var gObj = this.parent;\n var header;\n var cols = gObj.sortSettings.columns;\n var gCols = gObj.groupSettings.columns;\n var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });\n this.refreshToggleBtn();\n for (var i = 0, len = cols.length; i < len; i++) {\n if (fieldNames.indexOf(cols[i].field) === -1) {\n continue;\n }\n header = gObj.getColumnHeaderByField(cols[i].field);\n if (!gObj.allowSorting && (this.sortedColumns.indexOf(cols[i].field) > -1 ||\n this.groupSettings.columns.indexOf(cols[i].field) > -1)) {\n classList(header.querySelector('.e-sortfilterdiv'), ['e-ascending', 'e-icon-ascending'], []);\n if (cols.length > 1) {\n header.querySelector('.e-headercelldiv').appendChild(this.parent.createElement('span', { className: 'e-sortnumber', innerHTML: (i + 1).toString() }));\n }\n }\n else if (this.getGHeaderCell(cols[i].field) && this.getGHeaderCell(cols[i].field).querySelectorAll('.e-groupsort').length) {\n if (cols[i].direction === 'Ascending') {\n classList(this.getGHeaderCell(cols[i].field).querySelector('.e-groupsort'), ['e-ascending', 'e-icon-ascending'], ['e-descending', 'e-icon-descending']);\n }\n else {\n classList(this.getGHeaderCell(cols[i].field).querySelector('.e-groupsort'), ['e-descending', 'e-icon-descending'], ['e-ascending', 'e-icon-ascending']);\n }\n }\n }\n for (var i = 0, len = gCols.length; i < len; i++) {\n if (fieldNames.indexOf(gCols[i]) === -1) {\n continue;\n }\n gObj.getColumnHeaderByField(gCols[i]).setAttribute('aria-grouped', 'true');\n }\n };\n Group.prototype.getGHeaderCell = function (field) {\n if (this.element && this.element.querySelector('[ej-mappingname=\"' + field + '\"]')) {\n return this.element.querySelector('[ej-mappingname=\"' + field + '\"]').parentElement;\n }\n return null;\n };\n Group.prototype.onGroupAggregates = function (editedData) {\n var aggregates = this.iterateGroupAggregates(editedData);\n var rowData = this.groupGenerator.generateRows(aggregates, {});\n var summaryRows = this.parent.getRowsObject().filter(function (row) { return !row.isDataRow; });\n var updateSummaryRows = rowData.filter(function (data) { return !data.isDataRow; });\n if (this.parent.isReact) {\n this.parent.destroyTemplate(['groupFooterTemplate', 'groupCaptionTemplate', 'footerTemplate']);\n }\n for (var i = 0; i < updateSummaryRows.length; i++) {\n var row = updateSummaryRows[i];\n var cells = row.cells.filter(function (cell) { return cell.isDataCell; });\n var args = { cells: cells, data: row.data, dataUid: summaryRows[i] ? summaryRows[i].uid : '' };\n this.parent.notify(events.refreshAggregateCell, args);\n }\n };\n Group.prototype.iterateGroupAggregates = function (editedData) {\n var updatedData = editedData instanceof Array ? editedData : [];\n var rows = this.parent.getRowsObject();\n var initData = this.parent.getCurrentViewRecords();\n var deletedCols = [];\n var changeds = rows.map(function (row) {\n if (row.edit === 'delete') {\n deletedCols.push(row.data);\n }\n return row.changes instanceof Object ? row.changes : row.data;\n });\n var field = this.parent.getPrimaryKeyFieldNames()[0];\n changeds = updatedData.length === 0 ? changeds : updatedData;\n var mergeData = initData.map(function (item) {\n var pKeyVal = DataUtil.getObject(field, item);\n var value;\n var hasVal = changeds.some(function (cItem) {\n value = cItem;\n return pKeyVal === DataUtil.getObject(field, cItem);\n });\n return hasVal ? value : item;\n });\n var eData = editedData;\n if (!(eData.type && eData.type === 'cancel') && deletedCols.length > 0) {\n for (var i = 0; i < deletedCols.length; i++) {\n var index = mergeData.indexOf(deletedCols[i]);\n mergeData.splice(index, 1);\n }\n }\n var aggregates = [];\n var aggregateRows = this.parent.aggregates;\n for (var j = 0; j < aggregateRows.length; j++) {\n var row = aggregateRows[j];\n for (var k = 0; k < row.columns.length; k++) {\n var aggr = {};\n var type = row.columns[k].type.toString();\n aggr = { type: type.toLowerCase(), field: row.columns[k].field };\n aggregates.push(aggr);\n }\n }\n var result;\n var aggrds;\n var groupedCols = this.parent.groupSettings.columns;\n for (var l = 0; l < groupedCols.length; l++) {\n aggrds = result ? result : mergeData;\n result = DataUtil.group(aggrds, groupedCols[l], aggregates, null, null);\n }\n return result;\n };\n Group.prototype.updateExpand = function (args) {\n var uid = args.uid;\n var isExpand = args.isExpand;\n var rows = this.parent.getRowsObject();\n for (var i = 0; i < rows.length; i++) {\n var row = rows[i];\n if (row.uid === uid || isNullOrUndefined(uid)) {\n row.isExpand = isExpand;\n var _loop_1 = function (j) {\n var childRow = rows[j];\n var closestParent = void 0;\n if (childRow.parentUid !== row.uid) {\n closestParent = rows.filter(function (x) { return x.uid === childRow.parentUid; })[0];\n }\n if (childRow.parentUid === row.uid) {\n childRow.visible = row.isExpand;\n }\n else if (!isNullOrUndefined(closestParent) && childRow.parentUid === closestParent.uid) {\n if (closestParent.isExpand && closestParent.visible === true) {\n childRow.visible = true;\n }\n else if (closestParent.isExpand && closestParent.visible === false) {\n childRow.visible = false;\n }\n }\n if (isNullOrUndefined(uid)) {\n return \"break\";\n }\n };\n for (var j = i + 1; j < rows.length; j++) {\n var state_1 = _loop_1(j);\n if (state_1 === \"break\")\n break;\n }\n }\n }\n this.parent.notify(events.contentReady, { rows: rows, args: { isFrozen: false, rows: rows } });\n };\n return Group;\n}());\nexport { Group };\n","import { Encoding } from '@syncfusion/ej2-file-utils';\n/**\n * array literal codes\n */\nvar ARR_LITERAL_CODES = new Int16Array(286);\nvar ARR_LITERAL_LENGTHS = new Uint8Array(286);\nvar ARR_DISTANCE_CODES = new Int16Array(30);\nvar ARR_DISTANCE_LENGTHS = new Uint8Array(30);\n/**\n * represent compression stream writer\n * ```typescript\n * let compressedWriter = new CompressedStreamWriter();\n * let text: string = 'Hello world!!!';\n * compressedWriter.write(text, 0, text.length);\n * compressedWriter.close();\n * ```\n */\nvar CompressedStreamWriter = /** @class */ (function () {\n /**\n * Initializes compressor and writes ZLib header if needed.\n * @param {boolean} noWrap - optional if true, ZLib header and checksum will not be written.\n */\n function CompressedStreamWriter(noWrap) {\n this.pendingBuffer = new Uint8Array(1 << 16);\n this.pendingBufLength = 0;\n this.pendingBufCache = 0;\n this.pendingBufBitsInCache = 0;\n this.bufferPosition = 0;\n this.extraBits = 0;\n this.currentHash = 0;\n this.matchStart = 0;\n this.matchLength = 0;\n this.matchPrevAvail = false;\n this.blockStart = 0;\n this.stringStart = 0;\n this.lookAhead = 0;\n this.totalBytesIn = 0;\n this.inputOffset = 0;\n this.inputEnd = 0;\n this.windowSize = 1 << 15;\n this.windowMask = this.windowSize - 1;\n this.hashSize = 1 << 15;\n this.hashMask = this.hashSize - 1;\n this.hashShift = Math.floor((15 + 3 - 1) / 3);\n this.maxDist = this.windowSize - 262;\n this.checkSum = 1;\n this.noWrap = false;\n if (!CompressedStreamWriter.isHuffmanTreeInitiated) {\n CompressedStreamWriter.initHuffmanTree();\n CompressedStreamWriter.isHuffmanTreeInitiated = true;\n }\n this.treeLiteral = new CompressorHuffmanTree(this, 286, 257, 15);\n this.treeDistances = new CompressorHuffmanTree(this, 30, 1, 15);\n this.treeCodeLengths = new CompressorHuffmanTree(this, 19, 4, 7);\n this.arrDistances = new Uint16Array((1 << 14));\n this.arrLiterals = new Uint8Array((1 << 14));\n this.stream = [];\n this.dataWindow = new Uint8Array(2 * this.windowSize);\n this.hashHead = new Int16Array(this.hashSize);\n this.hashPrevious = new Int16Array(this.windowSize);\n this.blockStart = this.stringStart = 1;\n this.noWrap = noWrap;\n if (!noWrap) {\n this.writeZLibHeader();\n }\n }\n Object.defineProperty(CompressedStreamWriter.prototype, \"compressedData\", {\n /**\n * get compressed data\n */\n get: function () {\n return this.stream;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CompressedStreamWriter.prototype, \"getCompressedString\", {\n get: function () {\n var compressedString = '';\n if (this.stream !== undefined) {\n for (var i = 0; i < this.stream.length; i++) {\n compressedString += String.fromCharCode.apply(null, this.stream[i]);\n }\n }\n return compressedString;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Compresses data and writes it to the stream.\n * @param {Uint8Array} data - data to compress\n * @param {number} offset - offset in data\n * @param {number} length - length of the data\n * @returns {void}\n */\n CompressedStreamWriter.prototype.write = function (data, offset, length) {\n if (data === undefined || data === null) {\n throw new Error('ArgumentException: data cannot null or undefined');\n }\n var end = offset + length;\n if (0 > offset || offset > end || end > data.length) {\n throw new Error('ArgumentOutOfRangeException: Offset or length is incorrect');\n }\n if (typeof data === 'string') {\n var encode = new Encoding(false);\n encode.type = 'Utf8';\n data = new Uint8Array(encode.getBytes(data, 0, data.length));\n end = offset + data.length;\n }\n this.inputBuffer = data;\n this.inputOffset = offset;\n this.inputEnd = end;\n if (!this.noWrap) {\n this.checkSum = ChecksumCalculator.checksumUpdate(this.checkSum, this.inputBuffer, this.inputOffset, end);\n }\n while (!(this.inputEnd === this.inputOffset) || !(this.pendingBufLength === 0)) {\n this.pendingBufferFlush();\n this.compressData(false);\n }\n };\n /**\n * write ZLib header to the compressed data\n * @return {void}\n */\n CompressedStreamWriter.prototype.writeZLibHeader = function () {\n /* Initialize header.*/\n var headerDate = (8 + (7 << 4)) << 8;\n /* Save compression level.*/\n headerDate |= ((5 >> 2) & 3) << 6;\n /* Align header.*/\n headerDate += 31 - (headerDate % 31);\n /* Write header to stream.*/\n this.pendingBufferWriteShortBytes(headerDate);\n };\n /**\n * Write Most Significant Bytes in to stream\n * @param {number} s - check sum value\n */\n CompressedStreamWriter.prototype.pendingBufferWriteShortBytes = function (s) {\n this.pendingBuffer[this.pendingBufLength++] = s >> 8;\n this.pendingBuffer[this.pendingBufLength++] = s;\n };\n CompressedStreamWriter.prototype.compressData = function (finish) {\n var success;\n do {\n this.fillWindow();\n var canFlush = (finish && this.inputEnd === this.inputOffset);\n success = this.compressSlow(canFlush, finish);\n } while (this.pendingBufLength === 0 && success);\n return success;\n };\n CompressedStreamWriter.prototype.compressSlow = function (flush, finish) {\n if (this.lookAhead < 262 && !flush) {\n return false;\n }\n while (this.lookAhead >= 262 || flush) {\n if (this.lookAhead === 0) {\n return this.lookAheadCompleted(finish);\n }\n if (this.stringStart >= 2 * this.windowSize - 262) {\n this.slideWindow();\n }\n var prevMatch = this.matchStart;\n var prevLen = this.matchLength;\n if (this.lookAhead >= 3) {\n this.discardMatch();\n }\n if (prevLen >= 3 && this.matchLength <= prevLen) {\n prevLen = this.matchPreviousBest(prevMatch, prevLen);\n }\n else {\n this.matchPreviousAvailable();\n }\n if (this.bufferPosition >= (1 << 14)) {\n return this.huffmanIsFull(finish);\n }\n }\n return true;\n };\n CompressedStreamWriter.prototype.discardMatch = function () {\n var hashHead = this.insertString();\n if (hashHead !== 0 && this.stringStart - hashHead <= this.maxDist && this.findLongestMatch(hashHead)) {\n if (this.matchLength <= 5 && (this.matchLength === 3 && this.stringStart - this.matchStart > 4096)) {\n this.matchLength = 3 - 1;\n }\n }\n };\n CompressedStreamWriter.prototype.matchPreviousAvailable = function () {\n if (this.matchPrevAvail) {\n this.huffmanTallyLit(this.dataWindow[this.stringStart - 1] & 0xff);\n }\n this.matchPrevAvail = true;\n this.stringStart++;\n this.lookAhead--;\n };\n CompressedStreamWriter.prototype.matchPreviousBest = function (prevMatch, prevLen) {\n this.huffmanTallyDist(this.stringStart - 1 - prevMatch, prevLen);\n prevLen -= 2;\n do {\n this.stringStart++;\n this.lookAhead--;\n if (this.lookAhead >= 3) {\n this.insertString();\n }\n } while (--prevLen > 0);\n this.stringStart++;\n this.lookAhead--;\n this.matchPrevAvail = false;\n this.matchLength = 3 - 1;\n return prevLen;\n };\n CompressedStreamWriter.prototype.lookAheadCompleted = function (finish) {\n if (this.matchPrevAvail) {\n this.huffmanTallyLit(this.dataWindow[this.stringStart - 1] & 0xff);\n }\n this.matchPrevAvail = false;\n this.huffmanFlushBlock(this.dataWindow, this.blockStart, this.stringStart - this.blockStart, finish);\n this.blockStart = this.stringStart;\n return false;\n };\n CompressedStreamWriter.prototype.huffmanIsFull = function (finish) {\n var len = this.stringStart - this.blockStart;\n if (this.matchPrevAvail) {\n len--;\n }\n var lastBlock = (finish && this.lookAhead === 0 && !this.matchPrevAvail);\n this.huffmanFlushBlock(this.dataWindow, this.blockStart, len, lastBlock);\n this.blockStart += len;\n return !lastBlock;\n };\n CompressedStreamWriter.prototype.fillWindow = function () {\n if (this.stringStart >= this.windowSize + this.maxDist) {\n this.slideWindow();\n }\n while (this.lookAhead < 262 && this.inputOffset < this.inputEnd) {\n var more = 2 * this.windowSize - this.lookAhead - this.stringStart;\n if (more > this.inputEnd - this.inputOffset) {\n more = this.inputEnd - this.inputOffset;\n }\n this.dataWindow.set(this.inputBuffer.subarray(this.inputOffset, this.inputOffset + more), this.stringStart + this.lookAhead);\n this.inputOffset += more;\n this.totalBytesIn += more;\n this.lookAhead += more;\n }\n if (this.lookAhead >= 3) {\n this.updateHash();\n }\n };\n CompressedStreamWriter.prototype.slideWindow = function () {\n this.dataWindow.set(this.dataWindow.subarray(this.windowSize, this.windowSize + this.windowSize), 0);\n this.matchStart -= this.windowSize;\n this.stringStart -= this.windowSize;\n this.blockStart -= this.windowSize;\n for (var i = 0; i < this.hashSize; ++i) {\n var m = this.hashHead[i] & 0xffff;\n this.hashHead[i] = (((m >= this.windowSize) ? (m - this.windowSize) : 0));\n }\n for (var i = 0; i < this.windowSize; i++) {\n var m = this.hashPrevious[i] & 0xffff;\n this.hashPrevious[i] = ((m >= this.windowSize) ? (m - this.windowSize) : 0);\n }\n };\n CompressedStreamWriter.prototype.insertString = function () {\n var match;\n var hash = ((this.currentHash << this.hashShift) ^ this.dataWindow[this.stringStart + (3 - 1)]) & this.hashMask;\n this.hashPrevious[this.stringStart & this.windowMask] = match = this.hashHead[hash];\n this.hashHead[hash] = this.stringStart;\n this.currentHash = hash;\n return match & 0xffff;\n };\n CompressedStreamWriter.prototype.findLongestMatch = function (curMatch) {\n var chainLen = 4096;\n var niceLen = 258;\n var scan = this.stringStart;\n var match;\n var bestEnd = this.stringStart + this.matchLength;\n var bestLength = Math.max(this.matchLength, 3 - 1);\n var limit = Math.max(this.stringStart - this.maxDist, 0);\n var stringEnd = this.stringStart + 258 - 1;\n var scanEnd1 = this.dataWindow[bestEnd - 1];\n var scanEnd = this.dataWindow[bestEnd];\n var data = this.dataWindow;\n if (bestLength >= 32) {\n chainLen >>= 2;\n }\n if (niceLen > this.lookAhead) {\n niceLen = this.lookAhead;\n }\n do {\n if (data[curMatch + bestLength] !== scanEnd ||\n data[curMatch + bestLength - 1] !== scanEnd1 ||\n data[curMatch] !== data[scan] ||\n data[curMatch + 1] !== data[scan + 1]) {\n continue;\n }\n match = curMatch + 2;\n scan += 2;\n /* tslint:disable */\n while (data[++scan] === data[++match] && data[++scan] === data[++match] &&\n data[++scan] === data[++match] && data[++scan] === data[++match] &&\n data[++scan] === data[++match] && data[++scan] === data[++match] &&\n data[++scan] === data[++match] && data[++scan] === data[++match] && scan < stringEnd) {\n /* tslint:disable */\n }\n if (scan > bestEnd) {\n this.matchStart = curMatch;\n bestEnd = scan;\n bestLength = scan - this.stringStart;\n if (bestLength >= niceLen) {\n break;\n }\n scanEnd1 = data[bestEnd - 1];\n scanEnd = data[bestEnd];\n }\n scan = this.stringStart;\n } while ((curMatch = (this.hashPrevious[curMatch & this.windowMask] & 0xffff)) > limit && --chainLen !== 0);\n this.matchLength = Math.min(bestLength, this.lookAhead);\n return this.matchLength >= 3;\n };\n CompressedStreamWriter.prototype.updateHash = function () {\n this.currentHash = (this.dataWindow[this.stringStart] << this.hashShift) ^ this.dataWindow[this.stringStart + 1];\n };\n CompressedStreamWriter.prototype.huffmanTallyLit = function (literal) {\n this.arrDistances[this.bufferPosition] = 0;\n this.arrLiterals[this.bufferPosition++] = literal;\n this.treeLiteral.codeFrequencies[literal]++;\n return this.bufferPosition >= (1 << 14);\n };\n CompressedStreamWriter.prototype.huffmanTallyDist = function (dist, len) {\n this.arrDistances[this.bufferPosition] = dist;\n this.arrLiterals[this.bufferPosition++] = (len - 3);\n var lc = this.huffmanLengthCode(len - 3);\n this.treeLiteral.codeFrequencies[lc]++;\n if (lc >= 265 && lc < 285) {\n this.extraBits += Math.floor((lc - 261) / 4);\n }\n var dc = this.huffmanDistanceCode(dist - 1);\n this.treeDistances.codeFrequencies[dc]++;\n if (dc >= 4) {\n this.extraBits += Math.floor((dc / 2 - 1));\n }\n return this.bufferPosition >= (1 << 14);\n };\n CompressedStreamWriter.prototype.huffmanFlushBlock = function (stored, storedOffset, storedLength, lastBlock) {\n this.treeLiteral.codeFrequencies[256]++;\n this.treeLiteral.buildTree();\n this.treeDistances.buildTree();\n this.treeLiteral.calculateBLFreq(this.treeCodeLengths);\n this.treeDistances.calculateBLFreq(this.treeCodeLengths);\n this.treeCodeLengths.buildTree();\n var blTreeCodes = 4;\n for (var i = 18; i > blTreeCodes; i--) {\n if (this.treeCodeLengths.codeLengths[CompressorHuffmanTree.huffCodeLengthOrders[i]] > 0) {\n blTreeCodes = i + 1;\n }\n }\n var opt_len = 14 + blTreeCodes * 3 + this.treeCodeLengths.getEncodedLength() +\n this.treeLiteral.getEncodedLength() + this.treeDistances.getEncodedLength() + this.extraBits;\n var static_len = this.extraBits;\n for (var i = 0; i < 286; i++) {\n static_len += this.treeLiteral.codeFrequencies[i] * ARR_LITERAL_LENGTHS[i];\n }\n for (var i = 0; i < 30; i++) {\n static_len += this.treeDistances.codeFrequencies[i] * ARR_DISTANCE_LENGTHS[i];\n }\n if (opt_len >= static_len) {\n // Force static trees.\n opt_len = static_len;\n }\n if (storedOffset >= 0 && storedLength + 4 < opt_len >> 3) {\n this.huffmanFlushStoredBlock(stored, storedOffset, storedLength, lastBlock);\n }\n else if (opt_len == static_len) {\n // Encode with static tree.\n this.pendingBufferWriteBits((1 << 1) + (lastBlock ? 1 : 0), 3);\n this.treeLiteral.setStaticCodes(ARR_LITERAL_CODES, ARR_LITERAL_LENGTHS);\n this.treeDistances.setStaticCodes(ARR_DISTANCE_CODES, ARR_DISTANCE_LENGTHS);\n this.huffmanCompressBlock();\n this.huffmanReset();\n }\n else {\n this.pendingBufferWriteBits((2 << 1) + (lastBlock ? 1 : 0), 3);\n this.huffmanSendAllTrees(blTreeCodes);\n this.huffmanCompressBlock();\n this.huffmanReset();\n }\n };\n CompressedStreamWriter.prototype.huffmanFlushStoredBlock = function (stored, storedOffset, storedLength, lastBlock) {\n this.pendingBufferWriteBits((0 << 1) + (lastBlock ? 1 : 0), 3);\n this.pendingBufferAlignToByte();\n this.pendingBufferWriteShort(storedLength);\n this.pendingBufferWriteShort(~storedLength);\n this.pendingBufferWriteByteBlock(stored, storedOffset, storedLength);\n this.huffmanReset();\n };\n CompressedStreamWriter.prototype.huffmanLengthCode = function (len) {\n if (len === 255) {\n return 285;\n }\n var code = 257;\n while (len >= 8) {\n code += 4;\n len >>= 1;\n }\n return code + len;\n };\n CompressedStreamWriter.prototype.huffmanDistanceCode = function (distance) {\n var code = 0;\n while (distance >= 4) {\n code += 2;\n distance >>= 1;\n }\n return code + distance;\n };\n CompressedStreamWriter.prototype.huffmanSendAllTrees = function (blTreeCodes) {\n this.treeCodeLengths.buildCodes();\n this.treeLiteral.buildCodes();\n this.treeDistances.buildCodes();\n this.pendingBufferWriteBits(this.treeLiteral.treeLength - 257, 5);\n this.pendingBufferWriteBits(this.treeDistances.treeLength - 1, 5);\n this.pendingBufferWriteBits(blTreeCodes - 4, 4);\n for (var rank = 0; rank < blTreeCodes; rank++) {\n this.pendingBufferWriteBits(this.treeCodeLengths.codeLengths[CompressorHuffmanTree.huffCodeLengthOrders[rank]], 3);\n }\n this.treeLiteral.writeTree(this.treeCodeLengths);\n this.treeDistances.writeTree(this.treeCodeLengths);\n };\n CompressedStreamWriter.prototype.huffmanReset = function () {\n this.bufferPosition = 0;\n this.extraBits = 0;\n this.treeLiteral.reset();\n this.treeDistances.reset();\n this.treeCodeLengths.reset();\n };\n CompressedStreamWriter.prototype.huffmanCompressBlock = function () {\n for (var i = 0; i < this.bufferPosition; i++) {\n var literalLen = this.arrLiterals[i] & 255;\n var dist = this.arrDistances[i];\n if (dist-- !== 0) {\n var lc = this.huffmanLengthCode(literalLen);\n this.treeLiteral.writeCodeToStream(lc);\n var bits = Math.floor((lc - 261) / 4);\n if (bits > 0 && bits <= 5) {\n this.pendingBufferWriteBits(literalLen & ((1 << bits) - 1), bits);\n }\n var dc = this.huffmanDistanceCode(dist);\n this.treeDistances.writeCodeToStream(dc);\n bits = Math.floor(dc / 2 - 1);\n if (bits > 0) {\n this.pendingBufferWriteBits(dist & ((1 << bits) - 1), bits);\n }\n }\n else {\n this.treeLiteral.writeCodeToStream(literalLen);\n }\n }\n this.treeLiteral.writeCodeToStream(256);\n };\n /**\n * write bits in to internal buffer\n * @param {number} b - source of bits\n * @param {number} count - count of bits to write\n */\n CompressedStreamWriter.prototype.pendingBufferWriteBits = function (b, count) {\n var uint = new Uint32Array(1);\n uint[0] = this.pendingBufCache | (b << this.pendingBufBitsInCache);\n this.pendingBufCache = uint[0];\n this.pendingBufBitsInCache += count;\n this.pendingBufferFlushBits();\n };\n CompressedStreamWriter.prototype.pendingBufferFlush = function (isClose) {\n this.pendingBufferFlushBits();\n if (this.pendingBufLength > 0) {\n var array = new Uint8Array(this.pendingBufLength);\n array.set(this.pendingBuffer.subarray(0, this.pendingBufLength), 0);\n this.stream.push(array);\n }\n this.pendingBufLength = 0;\n };\n CompressedStreamWriter.prototype.pendingBufferFlushBits = function () {\n var result = 0;\n while (this.pendingBufBitsInCache >= 8 && this.pendingBufLength < (1 << 16)) {\n this.pendingBuffer[this.pendingBufLength++] = this.pendingBufCache;\n this.pendingBufCache >>= 8;\n this.pendingBufBitsInCache -= 8;\n result++;\n }\n return result;\n };\n CompressedStreamWriter.prototype.pendingBufferWriteByteBlock = function (data, offset, length) {\n var array = data.subarray(offset, offset + length);\n this.pendingBuffer.set(array, this.pendingBufLength);\n this.pendingBufLength += length;\n };\n CompressedStreamWriter.prototype.pendingBufferWriteShort = function (s) {\n this.pendingBuffer[this.pendingBufLength++] = s;\n this.pendingBuffer[this.pendingBufLength++] = (s >> 8);\n };\n CompressedStreamWriter.prototype.pendingBufferAlignToByte = function () {\n if (this.pendingBufBitsInCache > 0) {\n this.pendingBuffer[this.pendingBufLength++] = this.pendingBufCache;\n }\n this.pendingBufCache = 0;\n this.pendingBufBitsInCache = 0;\n };\n /**\n * Huffman Tree literal calculation\n * @private\n */\n CompressedStreamWriter.initHuffmanTree = function () {\n var i = 0;\n while (i < 144) {\n ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x030 + i) << 8);\n ARR_LITERAL_LENGTHS[i++] = 8;\n }\n while (i < 256) {\n ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x190 - 144 + i) << 7);\n ARR_LITERAL_LENGTHS[i++] = 9;\n }\n while (i < 280) {\n ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x000 - 256 + i) << 9);\n ARR_LITERAL_LENGTHS[i++] = 7;\n }\n while (i < 286) {\n ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x0c0 - 280 + i) << 8);\n ARR_LITERAL_LENGTHS[i++] = 8;\n }\n for (i = 0; i < 30; i++) {\n ARR_DISTANCE_CODES[i] = CompressorHuffmanTree.bitReverse(i << 11);\n ARR_DISTANCE_LENGTHS[i] = 5;\n }\n };\n /**\n * close the stream and write all pending buffer in to stream\n * @returns {void}\n */\n CompressedStreamWriter.prototype.close = function () {\n do {\n this.pendingBufferFlush(true);\n if (!this.compressData(true)) {\n this.pendingBufferFlush(true);\n this.pendingBufferAlignToByte();\n if (!this.noWrap) {\n this.pendingBufferWriteShortBytes(this.checkSum >> 16);\n this.pendingBufferWriteShortBytes(this.checkSum & 0xffff);\n }\n this.pendingBufferFlush(true);\n }\n } while (!(this.inputEnd === this.inputOffset) ||\n !(this.pendingBufLength === 0));\n };\n /**\n * release allocated un-managed resource\n * @returns {void}\n */\n CompressedStreamWriter.prototype.destroy = function () {\n this.stream = [];\n this.stream = undefined;\n this.pendingBuffer = undefined;\n this.treeLiteral = undefined;\n this.treeDistances = undefined;\n this.treeCodeLengths = undefined;\n this.arrLiterals = undefined;\n this.arrDistances = undefined;\n this.hashHead = undefined;\n this.hashPrevious = undefined;\n this.dataWindow = undefined;\n this.inputBuffer = undefined;\n this.pendingBufLength = undefined;\n this.pendingBufCache = undefined;\n this.pendingBufBitsInCache = undefined;\n this.bufferPosition = undefined;\n this.extraBits = undefined;\n this.currentHash = undefined;\n this.matchStart = undefined;\n this.matchLength = undefined;\n this.matchPrevAvail = undefined;\n this.blockStart = undefined;\n this.stringStart = undefined;\n this.lookAhead = undefined;\n this.totalBytesIn = undefined;\n this.inputOffset = undefined;\n this.inputEnd = undefined;\n this.windowSize = undefined;\n this.windowMask = undefined;\n this.hashSize = undefined;\n this.hashMask = undefined;\n this.hashShift = undefined;\n this.maxDist = undefined;\n this.checkSum = undefined;\n this.noWrap = undefined;\n };\n CompressedStreamWriter.isHuffmanTreeInitiated = false;\n return CompressedStreamWriter;\n}());\nexport { CompressedStreamWriter };\n/**\n * represent the Huffman Tree\n */\nvar CompressorHuffmanTree = /** @class */ (function () {\n /**\n * Create new Huffman Tree\n * @param {CompressedStreamWriter} writer instance\n * @param {number} elementCount - element count\n * @param {number} minCodes - minimum count\n * @param {number} maxLength - maximum count\n */\n function CompressorHuffmanTree(writer, elementCount, minCodes, maxLength) {\n this.writer = writer;\n this.codeMinCount = minCodes;\n this.maxLength = maxLength;\n this.codeFrequency = new Uint16Array(elementCount);\n this.lengthCount = new Int32Array(maxLength);\n }\n Object.defineProperty(CompressorHuffmanTree.prototype, \"treeLength\", {\n get: function () {\n return this.codeCount;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CompressorHuffmanTree.prototype, \"codeLengths\", {\n get: function () {\n return this.codeLength;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CompressorHuffmanTree.prototype, \"codeFrequencies\", {\n get: function () {\n return this.codeFrequency;\n },\n enumerable: true,\n configurable: true\n });\n CompressorHuffmanTree.prototype.setStaticCodes = function (codes, lengths) {\n var temp = new Int16Array(codes.length);\n temp.set(codes, 0);\n this.codes = temp;\n var lengthTemp = new Uint8Array(lengths.length);\n lengthTemp.set(lengths, 0);\n this.codeLength = lengthTemp;\n };\n /**\n * reset all code data in tree\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.reset = function () {\n for (var i = 0; i < this.codeFrequency.length; i++) {\n this.codeFrequency[i] = 0;\n }\n this.codes = undefined;\n this.codeLength = undefined;\n };\n /**\n * write code to the compressor output stream\n * @param {number} code - code to be written\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.writeCodeToStream = function (code) {\n this.writer.pendingBufferWriteBits(this.codes[code] & 0xffff, this.codeLength[code]);\n };\n /**\n * calculate code from their frequencies\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.buildCodes = function () {\n var nextCode = new Int32Array(this.maxLength);\n this.codes = new Int16Array(this.codeCount);\n var code = 0;\n for (var bitsCount = 0; bitsCount < this.maxLength; bitsCount++) {\n nextCode[bitsCount] = code;\n code += this.lengthCount[bitsCount] << (15 - bitsCount);\n }\n for (var i = 0; i < this.codeCount; i++) {\n var bits = this.codeLength[i];\n if (bits > 0) {\n this.codes[i] = CompressorHuffmanTree.bitReverse(nextCode[bits - 1]);\n nextCode[bits - 1] += 1 << (16 - bits);\n }\n }\n };\n CompressorHuffmanTree.bitReverse = function (value) {\n return (CompressorHuffmanTree.reverseBits[value & 15] << 12\n | CompressorHuffmanTree.reverseBits[(value >> 4) & 15] << 8\n | CompressorHuffmanTree.reverseBits[(value >> 8) & 15] << 4\n | CompressorHuffmanTree.reverseBits[value >> 12]);\n };\n /**\n * calculate length of compressed data\n * @returns {number}\n */\n CompressorHuffmanTree.prototype.getEncodedLength = function () {\n var len = 0;\n for (var i = 0; i < this.codeFrequency.length; i++) {\n len += this.codeFrequency[i] * this.codeLength[i];\n }\n return len;\n };\n /**\n * calculate code frequencies\n * @param {CompressorHuffmanTree} blTree\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.calculateBLFreq = function (blTree) {\n var maxCount;\n var minCount;\n var count;\n var curLen = -1;\n var i = 0;\n while (i < this.codeCount) {\n count = 1;\n var nextLen = this.codeLength[i];\n if (nextLen === 0) {\n maxCount = 138;\n minCount = 3;\n }\n else {\n maxCount = 6;\n minCount = 3;\n if (curLen !== nextLen) {\n blTree.codeFrequency[nextLen]++;\n count = 0;\n }\n }\n curLen = nextLen;\n i++;\n while (i < this.codeCount && curLen === this.codeLength[i]) {\n i++;\n if (++count >= maxCount) {\n break;\n }\n }\n if (count < minCount) {\n blTree.codeFrequency[curLen] += count;\n }\n else if (curLen !== 0) {\n blTree.codeFrequency[16]++;\n }\n else if (count <= 10) {\n blTree.codeFrequency[17]++;\n }\n else {\n blTree.codeFrequency[18]++;\n }\n }\n };\n /**\n * @param {CompressorHuffmanTree} blTree - write tree to output stream\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.writeTree = function (blTree) {\n var maxRepeatCount;\n var minRepeatCount;\n var currentRepeatCount;\n var currentCodeLength = -1;\n var i = 0;\n while (i < this.codeCount) {\n currentRepeatCount = 1;\n var nextLen = this.codeLength[i];\n if (nextLen === 0) {\n maxRepeatCount = 138;\n minRepeatCount = 3;\n }\n else {\n maxRepeatCount = 6;\n minRepeatCount = 3;\n if (currentCodeLength !== nextLen) {\n blTree.writeCodeToStream(nextLen);\n currentRepeatCount = 0;\n }\n }\n currentCodeLength = nextLen;\n i++;\n while (i < this.codeCount && currentCodeLength === this.codeLength[i]) {\n i++;\n if (++currentRepeatCount >= maxRepeatCount) {\n break;\n }\n }\n if (currentRepeatCount < minRepeatCount) {\n while (currentRepeatCount-- > 0) {\n blTree.writeCodeToStream(currentCodeLength);\n }\n }\n else if (currentCodeLength !== 0) {\n blTree.writeCodeToStream(16);\n this.writer.pendingBufferWriteBits(currentRepeatCount - 3, 2);\n }\n else if (currentRepeatCount <= 10) {\n blTree.writeCodeToStream(17);\n this.writer.pendingBufferWriteBits(currentRepeatCount - 3, 3);\n }\n else {\n blTree.writeCodeToStream(18);\n this.writer.pendingBufferWriteBits(currentRepeatCount - 11, 7);\n }\n }\n };\n /**\n * Build huffman tree\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.buildTree = function () {\n var codesCount = this.codeFrequency.length;\n var arrTree = new Int32Array(codesCount);\n var treeLength = 0;\n var maxCount = 0;\n for (var n = 0; n < codesCount; n++) {\n var freq = this.codeFrequency[n];\n if (freq !== 0) {\n var pos = treeLength++;\n var pPos = 0;\n while (pos > 0 && this.codeFrequency[arrTree[pPos = Math.floor((pos - 1) / 2)]] > freq) {\n arrTree[pos] = arrTree[pPos];\n pos = pPos;\n }\n arrTree[pos] = n;\n maxCount = n;\n }\n }\n while (treeLength < 2) {\n arrTree[treeLength++] =\n (maxCount < 2) ? ++maxCount : 0;\n }\n this.codeCount = Math.max(maxCount + 1, this.codeMinCount);\n var leafsCount = treeLength;\n var nodesCount = leafsCount;\n var child = new Int32Array(4 * treeLength - 2);\n var values = new Int32Array(2 * treeLength - 1);\n for (var i = 0; i < treeLength; i++) {\n var node = arrTree[i];\n var iIndex = 2 * i;\n child[iIndex] = node;\n child[iIndex + 1] = -1;\n values[i] = (this.codeFrequency[node] << 8);\n arrTree[i] = i;\n }\n this.constructHuffmanTree(arrTree, treeLength, values, nodesCount, child);\n this.buildLength(child);\n };\n CompressorHuffmanTree.prototype.constructHuffmanTree = function (arrTree, treeLength, values, nodesCount, child) {\n do {\n var first = arrTree[0];\n var last = arrTree[--treeLength];\n var lastVal = values[last];\n var pPos = 0;\n var path = 1;\n while (path < treeLength) {\n if (path + 1 < treeLength && values[arrTree[path]] > values[arrTree[path + 1]]) {\n path++;\n }\n arrTree[pPos] = arrTree[path];\n pPos = path;\n path = pPos * 2 + 1;\n }\n while ((path = pPos) > 0 && values[arrTree[pPos = Math.floor((path - 1) / 2)]] > lastVal) {\n arrTree[path] = arrTree[pPos];\n }\n arrTree[path] = last;\n var second = arrTree[0];\n last = nodesCount++;\n child[2 * last] = first;\n child[2 * last + 1] = second;\n var minDepth = Math.min(values[first] & 0xff, values[second] & 0xff);\n values[last] = lastVal = values[first] + values[second] - minDepth + 1;\n pPos = 0;\n path = 1;\n /* tslint:disable */\n while (path < treeLength) {\n if (path + 1 < treeLength && values[arrTree[path]] > values[arrTree[path + 1]]) {\n path++;\n }\n arrTree[pPos] = arrTree[path];\n pPos = path;\n path = pPos * 2 + 1;\n } /* tslint:disable */\n while ((path = pPos) > 0 && values[arrTree[pPos = Math.floor((path - 1) / 2)]] > lastVal) {\n arrTree[path] = arrTree[pPos];\n }\n arrTree[path] = last;\n } while (treeLength > 1);\n };\n CompressorHuffmanTree.prototype.buildLength = function (child) {\n this.codeLength = new Uint8Array(this.codeFrequency.length);\n var numNodes = Math.floor(child.length / 2);\n var numLeafs = Math.floor((numNodes + 1) / 2);\n var overflow = 0;\n for (var i = 0; i < this.maxLength; i++) {\n this.lengthCount[i] = 0;\n }\n overflow = this.calculateOptimalCodeLength(child, overflow, numNodes);\n if (overflow === 0) {\n return;\n }\n var iIncreasableLength = this.maxLength - 1;\n do {\n while (this.lengthCount[--iIncreasableLength] === 0) {\n /* tslint:disable */\n }\n do {\n this.lengthCount[iIncreasableLength]--;\n this.lengthCount[++iIncreasableLength]++;\n overflow -= (1 << (this.maxLength - 1 - iIncreasableLength));\n } while (overflow > 0 && iIncreasableLength < this.maxLength - 1);\n } while (overflow > 0);\n this.recreateTree(child, overflow, numLeafs);\n };\n CompressorHuffmanTree.prototype.recreateTree = function (child, overflow, numLeafs) {\n this.lengthCount[this.maxLength - 1] += overflow;\n this.lengthCount[this.maxLength - 2] -= overflow;\n var nodePtr = 2 * numLeafs;\n for (var bits = this.maxLength; bits !== 0; bits--) {\n var n = this.lengthCount[bits - 1];\n while (n > 0) {\n var childPtr = 2 * child[nodePtr++];\n if (child[childPtr + 1] === -1) {\n this.codeLength[child[childPtr]] = bits;\n n--;\n }\n }\n }\n };\n CompressorHuffmanTree.prototype.calculateOptimalCodeLength = function (child, overflow, numNodes) {\n var lengths = new Int32Array(numNodes);\n lengths[numNodes - 1] = 0;\n for (var i = numNodes - 1; i >= 0; i--) {\n var childIndex = 2 * i + 1;\n if (child[childIndex] !== -1) {\n var bitLength = lengths[i] + 1;\n if (bitLength > this.maxLength) {\n bitLength = this.maxLength;\n overflow++;\n }\n lengths[child[childIndex - 1]] = lengths[child[childIndex]] = bitLength;\n }\n else {\n var bitLength = lengths[i];\n this.lengthCount[bitLength - 1]++;\n this.codeLength[child[childIndex - 1]] = lengths[i];\n }\n }\n return overflow;\n };\n CompressorHuffmanTree.reverseBits = [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15];\n CompressorHuffmanTree.huffCodeLengthOrders = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n return CompressorHuffmanTree;\n}());\nexport { CompressorHuffmanTree };\n/**\n * Checksum calculator, based on Adler32 algorithm.\n */\nvar ChecksumCalculator = /** @class */ (function () {\n function ChecksumCalculator() {\n }\n /**\n * Updates checksum by calculating checksum of the\n * given buffer and adding it to current value.\n * @param {number} checksum - current checksum.\n * @param {Uint8Array} buffer - data byte array.\n * @param {number} offset - offset in the buffer.\n * @param {number} length - length of data to be used from the stream.\n * @returns {number}\n */\n ChecksumCalculator.checksumUpdate = function (checksum, buffer, offset, length) {\n var uint = new Uint32Array(1);\n uint[0] = checksum;\n var checksum_uint = uint[0];\n var s1 = uint[0] = checksum_uint & 65535;\n var s2 = uint[0] = checksum_uint >> ChecksumCalculator.checkSumBitOffset;\n while (length > 0) {\n var steps = Math.min(length, ChecksumCalculator.checksumIterationCount);\n length -= steps;\n while (--steps >= 0) {\n s1 = s1 + (uint[0] = (buffer[offset++] & 255));\n s2 = s2 + s1;\n }\n s1 %= ChecksumCalculator.checksumBase;\n s2 %= ChecksumCalculator.checksumBase;\n }\n checksum_uint = (s2 << ChecksumCalculator.checkSumBitOffset) | s1;\n return checksum_uint;\n };\n ChecksumCalculator.checkSumBitOffset = 16;\n ChecksumCalculator.checksumBase = 65521;\n ChecksumCalculator.checksumIterationCount = 3800;\n return ChecksumCalculator;\n}());\nexport { ChecksumCalculator };\n","import { DataUtil } from './util';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\n/**\n * Query class is used to build query which is used by the DataManager to communicate with datasource.\n */\nvar Query = /** @class */ (function () {\n /**\n * Constructor for Query class.\n * @param {string|string[]} from?\n * @hidden\n */\n function Query(from) {\n /** @hidden */\n this.subQuery = null;\n /** @hidden */\n this.isChild = false;\n /** @hidden */\n this.distincts = [];\n this.queries = [];\n this.key = '';\n this.fKey = '';\n if (typeof from === 'string') {\n this.fromTable = from;\n }\n else if (from && from instanceof Array) {\n this.lookups = from;\n }\n this.expands = [];\n this.sortedColumns = [];\n this.groupedColumns = [];\n this.subQuery = null;\n this.isChild = false;\n this.params = [];\n this.lazyLoad = [];\n return this;\n }\n /**\n * Sets the primary key.\n * @param {string} field - Defines the column field.\n */\n Query.prototype.setKey = function (field) {\n this.key = field;\n return this;\n };\n /**\n * Sets default DataManager to execute query.\n * @param {DataManager} dataManager - Defines the DataManager.\n */\n Query.prototype.using = function (dataManager) {\n this.dataManager = dataManager;\n return this;\n };\n /**\n * Executes query with the given DataManager.\n * @param {DataManager} dataManager - Defines the DataManager.\n * @param {Function} done - Defines the success callback.\n * @param {Function} fail - Defines the failure callback.\n * @param {Function} always - Defines the callback which will be invoked on either success or failure.\n *\n *
\n     * let dataManager: DataManager = new DataManager([{ ID: '10' }, { ID: '2' }, { ID: '1' }, { ID: '20' }]);\n     * let query: Query = new Query();\n     * query.sortBy('ID', (x: string, y: string): number => { return parseInt(x, 10) - parseInt(y, 10) });\n     * let promise: Promise< Object > = query.execute(dataManager);\n     * promise.then((e: { result: Object }) => { });\n     * 
\n */\n Query.prototype.execute = function (dataManager, done, fail, always) {\n dataManager = dataManager || this.dataManager;\n if (dataManager) {\n return dataManager.executeQuery(this, done, fail, always);\n }\n return DataUtil.throwError('Query - execute() : dataManager needs to be is set using \"using\" function or should be passed as argument');\n };\n /**\n * Executes query with the local datasource.\n * @param {DataManager} dataManager - Defines the DataManager.\n */\n Query.prototype.executeLocal = function (dataManager) {\n dataManager = dataManager || this.dataManager;\n if (dataManager) {\n return dataManager.executeLocal(this);\n }\n return DataUtil.throwError('Query - executeLocal() : dataManager needs to be is set using \"using\" function or should be passed as argument');\n };\n /**\n * Creates deep copy of the Query object.\n */\n Query.prototype.clone = function () {\n var cloned = new Query();\n cloned.queries = this.queries.slice(0);\n cloned.key = this.key;\n cloned.isChild = this.isChild;\n cloned.dataManager = this.dataManager;\n cloned.fromTable = this.fromTable;\n cloned.params = this.params.slice(0);\n cloned.expands = this.expands.slice(0);\n cloned.sortedColumns = this.sortedColumns.slice(0);\n cloned.groupedColumns = this.groupedColumns.slice(0);\n cloned.subQuerySelector = this.subQuerySelector;\n cloned.subQuery = this.subQuery;\n cloned.fKey = this.fKey;\n cloned.isCountRequired = this.isCountRequired;\n cloned.distincts = this.distincts.slice(0);\n cloned.lazyLoad = this.lazyLoad.slice(0);\n return cloned;\n };\n /**\n * Specifies the name of table to retrieve data in query execution.\n * @param {string} tableName - Defines the table name.\n */\n Query.prototype.from = function (tableName) {\n this.fromTable = tableName;\n return this;\n };\n /**\n * Adds additional parameter which will be sent along with the request which will be generated while DataManager execute.\n * @param {string} key - Defines the key of additional parameter.\n * @param {Function|string} value - Defines the value for the key.\n */\n Query.prototype.addParams = function (key, value) {\n if (typeof value === 'function') {\n this.params.push({ key: key, fn: value });\n }\n else {\n this.params.push({ key: key, value: value });\n }\n return this;\n };\n /**\n * @hidden\n */\n Query.prototype.distinct = function (fields) {\n if (typeof fields === 'string') {\n this.distincts = [].slice.call([fields], 0);\n }\n else {\n this.distincts = fields.slice(0);\n }\n return this;\n };\n /**\n * Expands the related table.\n * @param {string|Object[]} tables\n */\n Query.prototype.expand = function (tables) {\n if (typeof tables === 'string') {\n this.expands = [].slice.call([tables], 0);\n }\n else {\n this.expands = tables.slice(0);\n }\n return this;\n };\n /**\n * Filter data with given filter criteria.\n * @param {string|Predicate} fieldName - Defines the column field or Predicate.\n * @param {string} operator - Defines the operator how to filter data.\n * @param {string|number|boolean} value - Defines the values to match with data.\n * @param {boolean} ignoreCase - If ignore case set to false, then filter data with exact match or else\n * filter data with case insensitive.\n */\n Query.prototype.where = function (fieldName, operator, value, ignoreCase, ignoreAccent) {\n operator = operator ? (operator).toLowerCase() : null;\n var predicate = null;\n if (typeof fieldName === 'string') {\n predicate = new Predicate(fieldName, operator, value, ignoreCase, ignoreAccent);\n }\n else if (fieldName instanceof Predicate) {\n predicate = fieldName;\n }\n this.queries.push({\n fn: 'onWhere',\n e: predicate\n });\n return this;\n };\n /**\n * Search data with given search criteria.\n * @param {string|number|boolean} searchKey - Defines the search key.\n * @param {string|string[]} fieldNames - Defines the collection of column fields.\n * @param {string} operator - Defines the operator how to search data.\n * @param {boolean} ignoreCase - If ignore case set to false, then filter data with exact match or else\n * filter data with case insensitive.\n */\n Query.prototype.search = function (searchKey, fieldNames, operator, ignoreCase, ignoreAccent) {\n if (typeof fieldNames === 'string') {\n fieldNames = [fieldNames];\n }\n if (!operator || operator === 'none') {\n operator = 'contains';\n }\n var comparer = DataUtil.fnOperators[operator];\n this.queries.push({\n fn: 'onSearch',\n e: {\n fieldNames: fieldNames,\n operator: operator,\n searchKey: searchKey,\n ignoreCase: ignoreCase,\n ignoreAccent: ignoreAccent,\n comparer: comparer\n }\n });\n return this;\n };\n /**\n * Sort the data with given sort criteria.\n * By default, sort direction is ascending.\n * @param {string|string[]} fieldName - Defines the single or collection of column fields.\n * @param {string|Function} comparer - Defines the sort direction or custom sort comparer function.\n */\n Query.prototype.sortBy = function (fieldName, comparer, isFromGroup) {\n return this.sortByForeignKey(fieldName, comparer, isFromGroup);\n };\n /**\n * Sort the data with given sort criteria.\n * By default, sort direction is ascending.\n * @param {string|string[]} fieldName - Defines the single or collection of column fields.\n * @param {string|Function} comparer - Defines the sort direction or custom sort comparer function.\n * @param {string} direction - Defines the sort direction .\n */\n Query.prototype.sortByForeignKey = function (fieldName, comparer, isFromGroup, direction) {\n var order = !isNullOrUndefined(direction) ? direction : 'ascending';\n var sorts;\n var temp;\n if (typeof fieldName === 'string' && DataUtil.endsWith(fieldName.toLowerCase(), ' desc')) {\n fieldName = fieldName.replace(/ desc$/i, '');\n comparer = 'descending';\n }\n if (!comparer || typeof comparer === 'string') {\n order = comparer ? comparer.toLowerCase() : 'ascending';\n comparer = DataUtil.fnSort(comparer);\n }\n if (isFromGroup) {\n sorts = Query.filterQueries(this.queries, 'onSortBy');\n for (var i = 0; i < sorts.length; i++) {\n temp = sorts[i].e.fieldName;\n if (typeof temp === 'string') {\n if (temp === fieldName) {\n return this;\n }\n }\n else if (temp instanceof Array) {\n for (var j = 0; j < temp.length; j++) {\n if (temp[j] === fieldName || fieldName.toLowerCase() === temp[j] + ' desc') {\n return this;\n }\n }\n }\n }\n }\n this.queries.push({\n fn: 'onSortBy',\n e: {\n fieldName: fieldName,\n comparer: comparer,\n direction: order\n }\n });\n return this;\n };\n /**\n * Sorts data in descending order.\n * @param {string} fieldName - Defines the column field.\n */\n Query.prototype.sortByDesc = function (fieldName) {\n return this.sortBy(fieldName, 'descending');\n };\n /**\n * Groups data with the given field name.\n * @param {string} fieldName - Defines the column field.\n */\n Query.prototype.group = function (fieldName, fn, format) {\n this.sortBy(fieldName, null, true);\n this.queries.push({\n fn: 'onGroup',\n e: {\n fieldName: fieldName,\n comparer: fn ? fn : null,\n format: format ? format : null\n }\n });\n return this;\n };\n /**\n * Gets data based on the given page index and size.\n * @param {number} pageIndex - Defines the current page index.\n * @param {number} pageSize - Defines the no of records per page.\n */\n Query.prototype.page = function (pageIndex, pageSize) {\n this.queries.push({\n fn: 'onPage',\n e: {\n pageIndex: pageIndex,\n pageSize: pageSize\n }\n });\n return this;\n };\n /**\n * Gets data based on the given start and end index.\n * @param {number} start - Defines the start index of the datasource.\n * @param {number} end - Defines the end index of the datasource.\n */\n Query.prototype.range = function (start, end) {\n this.queries.push({\n fn: 'onRange',\n e: {\n start: start,\n end: end\n }\n });\n return this;\n };\n /**\n * Gets data from the top of the data source based on given number of records count.\n * @param {number} nos - Defines the no of records to retrieve from datasource.\n */\n Query.prototype.take = function (nos) {\n this.queries.push({\n fn: 'onTake',\n e: {\n nos: nos\n }\n });\n return this;\n };\n /**\n * Skips data with given number of records count from the top of the data source.\n * @param {number} nos - Defines the no of records skip in the datasource.\n */\n Query.prototype.skip = function (nos) {\n this.queries.push({\n fn: 'onSkip',\n e: { nos: nos }\n });\n return this;\n };\n /**\n * Selects specified columns from the data source.\n * @param {string|string[]} fieldNames - Defines the collection of column fields.\n */\n Query.prototype.select = function (fieldNames) {\n if (typeof fieldNames === 'string') {\n fieldNames = [].slice.call([fieldNames], 0);\n }\n this.queries.push({\n fn: 'onSelect',\n e: { fieldNames: fieldNames }\n });\n return this;\n };\n /**\n * Gets the records in hierarchical relationship from two tables. It requires the foreign key to relate two tables.\n * @param {Query} query - Defines the query to relate two tables.\n * @param {Function} selectorFn - Defines the custom function to select records.\n */\n Query.prototype.hierarchy = function (query, selectorFn) {\n this.subQuerySelector = selectorFn;\n this.subQuery = query;\n return this;\n };\n /**\n * Sets the foreign key which is used to get data from the related table.\n * @param {string} key - Defines the foreign key.\n */\n Query.prototype.foreignKey = function (key) {\n this.fKey = key;\n return this;\n };\n /**\n * It is used to get total number of records in the DataManager execution result.\n */\n Query.prototype.requiresCount = function () {\n this.isCountRequired = true;\n return this;\n };\n //type - sum, avg, min, max\n /**\n * Aggregate the data with given type and field name.\n * @param {string} type - Defines the aggregate type.\n * @param {string} field - Defines the column field to aggregate.\n */\n Query.prototype.aggregate = function (type, field) {\n this.queries.push({\n fn: 'onAggregates',\n e: { field: field, type: type }\n });\n return this;\n };\n /**\n * Pass array of filterColumn query for performing filter operation.\n * @param {QueryOptions[]} queries\n * @param {string} name\n * @hidden\n */\n Query.filterQueries = function (queries, name) {\n return queries.filter(function (q) {\n return q.fn === name;\n });\n };\n /**\n * To get the list of queries which is already filtered in current data source.\n * @param {Object[]} queries\n * @param {string[]} singles\n * @hidden\n */\n Query.filterQueryLists = function (queries, singles) {\n var filtered = queries.filter(function (q) {\n return singles.indexOf(q.fn) !== -1;\n });\n var res = {};\n for (var i = 0; i < filtered.length; i++) {\n if (!res[filtered[i].fn]) {\n res[filtered[i].fn] = filtered[i].e;\n }\n }\n return res;\n };\n return Query;\n}());\nexport { Query };\n/**\n * Predicate class is used to generate complex filter criteria.\n * This will be used by DataManager to perform multiple filtering operation.\n */\nvar Predicate = /** @class */ (function () {\n /**\n * Constructor for Predicate class.\n * @param {string|Predicate} field\n * @param {string} operator\n * @param {string|number|boolean|Predicate|Predicate[]} value\n * @param {boolean=false} ignoreCase\n * @hidden\n */\n function Predicate(field, operator, value, ignoreCase, ignoreAccent) {\n if (ignoreCase === void 0) { ignoreCase = false; }\n /** @hidden */\n this.ignoreAccent = false;\n /** @hidden */\n this.isComplex = false;\n if (typeof field === 'string') {\n this.field = field;\n this.operator = operator.toLowerCase();\n this.value = value;\n this.ignoreCase = ignoreCase;\n this.ignoreAccent = ignoreAccent;\n this.isComplex = false;\n this.comparer = DataUtil.fnOperators.processOperator(this.operator);\n }\n else if (field instanceof Predicate && value instanceof Predicate || value instanceof Array) {\n this.isComplex = true;\n this.condition = operator.toLowerCase();\n this.predicates = [field];\n if (value instanceof Array) {\n [].push.apply(this.predicates, value);\n }\n else {\n this.predicates.push(value);\n }\n }\n return this;\n }\n /**\n * Adds n-number of new predicates on existing predicate with “and” condition.\n * @param {Object[]} args - Defines the collection of predicates.\n */\n Predicate.and = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return Predicate.combinePredicates([].slice.call(args, 0), 'and');\n };\n /**\n * Adds new predicate on existing predicate with “and” condition.\n * @param {string} field - Defines the column field.\n * @param {string} operator - Defines the operator how to filter data.\n * @param {string} value - Defines the values to match with data.\n * @param {boolean} ignoreCase? - If ignore case set to false, then filter data with exact match or else\n * filter data with case insensitive.\n */\n Predicate.prototype.and = function (field, operator, value, ignoreCase, ignoreAccent) {\n return Predicate.combine(this, field, operator, value, 'and', ignoreCase, ignoreAccent);\n };\n /**\n * Adds n-number of new predicates on existing predicate with “or” condition.\n * @param {Object[]} args - Defines the collection of predicates.\n */\n Predicate.or = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return Predicate.combinePredicates([].slice.call(args, 0), 'or');\n };\n /**\n * Adds new predicate on existing predicate with “or” condition.\n * @param {string} field - Defines the column field.\n * @param {string} operator - Defines the operator how to filter data.\n * @param {string} value - Defines the values to match with data.\n * @param {boolean} ignoreCase? - If ignore case set to false, then filter data with exact match or else\n * filter data with case insensitive.\n */\n Predicate.prototype.or = function (field, operator, value, ignoreCase, ignoreAccent) {\n return Predicate.combine(this, field, operator, value, 'or', ignoreCase, ignoreAccent);\n };\n /**\n * Converts plain JavaScript object to Predicate object.\n * @param {Predicate[]|Predicate} json - Defines single or collection of Predicate.\n */\n Predicate.fromJson = function (json) {\n if (json instanceof Array) {\n var res = [];\n for (var i = 0, len = json.length; i < len; i++) {\n res.push(this.fromJSONData(json[i]));\n }\n return res;\n }\n var pred = json;\n return this.fromJSONData(pred);\n };\n /**\n * Validate the record based on the predicates.\n * @param {Object} record - Defines the datasource record.\n */\n Predicate.prototype.validate = function (record) {\n var predicate = this.predicates ? this.predicates : [];\n var isAnd;\n var ret;\n if (!this.isComplex && this.comparer) {\n return this.comparer.call(this, DataUtil.getObject(this.field, record), this.value, this.ignoreCase, this.ignoreAccent);\n }\n isAnd = this.condition === 'and';\n for (var i = 0; i < predicate.length; i++) {\n ret = predicate[i].validate(record);\n if (isAnd) {\n if (!ret) {\n return false;\n }\n }\n else {\n if (ret) {\n return true;\n }\n }\n }\n return isAnd;\n };\n /**\n * Converts predicates to plain JavaScript.\n * This method is uses Json stringify when serializing Predicate object.\n */\n Predicate.prototype.toJson = function () {\n var predicates;\n var p;\n if (this.isComplex) {\n predicates = [];\n p = this.predicates;\n for (var i = 0; i < p.length; i++) {\n predicates.push(p[i].toJson());\n }\n }\n return {\n isComplex: this.isComplex,\n field: this.field,\n operator: this.operator,\n value: this.value,\n ignoreCase: this.ignoreCase,\n ignoreAccent: this.ignoreAccent,\n condition: this.condition,\n predicates: predicates\n };\n };\n Predicate.combinePredicates = function (predicates, operator) {\n if (predicates.length === 1) {\n if (!(predicates[0] instanceof Array)) {\n return predicates[0];\n }\n predicates = predicates[0];\n }\n return new Predicate(predicates[0], operator, predicates.slice(1));\n };\n Predicate.combine = function (pred, field, operator, value, condition, ignoreCase, ignoreAccent) {\n if (field instanceof Predicate) {\n return Predicate[condition](pred, field);\n }\n if (typeof field === 'string') {\n return Predicate[condition](pred, new Predicate(field, operator, value, ignoreCase, ignoreAccent));\n }\n return DataUtil.throwError('Predicate - ' + condition + ' : invalid arguments');\n };\n Predicate.fromJSONData = function (json) {\n var preds = json.predicates || [];\n var len = preds.length;\n var predicates = [];\n var result;\n for (var i = 0; i < len; i++) {\n predicates.push(this.fromJSONData(preds[i]));\n }\n if (!json.isComplex) {\n result = new Predicate(json.field, json.operator, json.value, json.ignoreCase, json.ignoreAccent);\n }\n else {\n result = new Predicate(predicates[0], json.condition, predicates.slice(1));\n }\n return result;\n };\n return Predicate;\n}());\nexport { Predicate };\n","/* tslint:disable-next-line:max-line-length */\nimport { EventHandler, isNullOrUndefined, extend, classList, addClass, removeClass, Browser, getValue, setValue, isBlazor } from '@syncfusion/ej2-base';\nimport { parentsUntil, getUid, appendChildren, getDatePredicate, getObject, extendObjWithFn, eventPromise, setChecked } from '../base/util';\nimport { remove, debounce } from '@syncfusion/ej2-base';\nimport { DataUtil, Query, DataManager, Predicate } from '@syncfusion/ej2-data';\nimport { createCheckBox } from '@syncfusion/ej2-buttons';\nimport * as events from '../base/constant';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { getForeignData } from '../base/util';\nimport { Dialog } from '@syncfusion/ej2-popups';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';\nimport { getFilterMenuPostion, toogleCheckbox, createCboxWithWrap, removeAddCboxClasses, getColumnByForeignKeyValue } from '../base/util';\n/**\n * @hidden\n * `CheckBoxFilterBase` module is used to handle filtering action.\n */\nvar CheckBoxFilterBase = /** @class */ (function () {\n /**\n * Constructor for checkbox filtering module\n * @hidden\n */\n function CheckBoxFilterBase(parent) {\n this.existingPredicate = {};\n this.foreignKeyQuery = new Query();\n /** @hidden */\n this.filterState = true;\n this.values = {};\n this.renderEmpty = false;\n this.parent = parent;\n this.id = this.parent.element.id;\n this.valueFormatter = new ValueFormatter(this.parent.locale);\n this.cBoxTrue = createCheckBox(this.parent.createElement, false, { checked: true, label: ' ' });\n this.cBoxFalse = createCheckBox(this.parent.createElement, false, { checked: false, label: ' ' });\n this.cBoxTrue.insertBefore(this.parent.createElement('input', {\n className: 'e-chk-hidden', attrs: { type: 'checkbox' }\n }), this.cBoxTrue.firstChild);\n this.cBoxFalse.insertBefore(this.parent.createElement('input', {\n className: 'e-chk-hidden', attrs: { 'type': 'checkbox' }\n }), this.cBoxFalse.firstChild);\n this.cBoxFalse.querySelector('.e-frame').classList.add('e-uncheck');\n if (this.parent.enableRtl) {\n addClass([this.cBoxTrue, this.cBoxFalse], ['e-rtl']);\n }\n }\n /**\n * To destroy the filter bar.\n * @return {void}\n * @hidden\n */\n CheckBoxFilterBase.prototype.destroy = function () {\n this.closeDialog();\n };\n CheckBoxFilterBase.prototype.wireEvents = function () {\n EventHandler.add(this.dlg, 'click', this.clickHandler, this);\n EventHandler.add(this.dlg, 'keyup', this.keyupHandler, this);\n this.searchHandler = debounce(this.searchBoxKeyUp, 200);\n EventHandler.add(this.dialogObj.element.querySelector('.e-searchinput'), 'keyup', this.searchHandler, this);\n };\n CheckBoxFilterBase.prototype.unWireEvents = function () {\n EventHandler.remove(this.dlg, 'click', this.clickHandler);\n EventHandler.remove(this.dlg, 'keyup', this.keyupHandler);\n var elem = this.dialogObj.element.querySelector('.e-searchinput');\n if (elem) {\n EventHandler.remove(elem, 'keyup', this.searchHandler);\n }\n };\n CheckBoxFilterBase.prototype.foreignKeyFilter = function (args, fColl, mPredicate) {\n var _this = this;\n var fPredicate = {};\n var filterCollection = [];\n var query = this.foreignKeyQuery.clone();\n this.options.column.dataSource.\n executeQuery(query.where(mPredicate)).then(function (e) {\n _this.options.column.columnData = e.result;\n _this.parent.notify(events.generateQuery, { predicate: fPredicate, column: _this.options.column });\n args.ejpredicate = fPredicate.predicate.predicates;\n var fpred = fPredicate.predicate.predicates;\n for (var i = 0; i < fpred.length; i++) {\n filterCollection.push({\n field: fpred[i].field,\n predicate: 'or',\n matchCase: fpred[i].ignoreCase,\n ignoreAccent: fpred[i].ignoreAccent,\n operator: fpred[i].operator,\n value: fpred[i].value,\n type: _this.options.type\n });\n }\n args.filterCollection = filterCollection.length ? filterCollection :\n fColl.filter(function (col) { return col.field = _this.options.field; });\n _this.options.handler(args);\n });\n };\n CheckBoxFilterBase.prototype.foreignFilter = function (args, value) {\n var operator = this.options.isRemote ?\n (this.options.column.type === 'string' ? 'contains' : 'equal') : (this.options.column.type ? 'contains' : 'equal');\n var initalPredicate = new Predicate(this.options.column.foreignKeyValue, operator, value, true, this.options.ignoreAccent);\n this.foreignKeyFilter(args, [args.filterCollection], initalPredicate);\n };\n CheckBoxFilterBase.prototype.searchBoxClick = function (e) {\n var target = e.target;\n if (target.classList.contains('e-searchclear')) {\n this.sInput.value = '';\n this.refreshCheckboxes();\n this.updateSearchIcon();\n this.sInput.focus();\n }\n };\n CheckBoxFilterBase.prototype.searchBoxKeyUp = function (e) {\n this.refreshCheckboxes();\n this.updateSearchIcon();\n };\n CheckBoxFilterBase.prototype.updateSearchIcon = function () {\n if (this.sInput.value.length) {\n classList(this.sIcon, ['e-chkcancel-icon'], ['e-search-icon']);\n }\n else {\n classList(this.sIcon, ['e-search-icon'], ['e-chkcancel-icon']);\n }\n };\n /**\n * Gets the localized label by locale keyword.\n * @param {string} key\n * @return {string}\n */\n CheckBoxFilterBase.prototype.getLocalizedLabel = function (key) {\n return this.localeObj.getConstant(key);\n };\n CheckBoxFilterBase.prototype.updateDataSource = function () {\n var dataSource = this.options.dataSource;\n var str = 'object';\n if (!(dataSource instanceof DataManager)) {\n for (var i = 0; i < dataSource.length; i++) {\n if (typeof dataSource !== str) {\n var obj = {};\n obj[this.options.field] = dataSource[i];\n dataSource[i] = obj;\n }\n }\n }\n };\n CheckBoxFilterBase.prototype.updateModel = function (options) {\n this.options = options;\n this.existingPredicate = options.actualPredicate || {};\n this.options.dataSource = options.dataSource;\n this.options.dataManager = options.dataManager ? options.dataManager : options.dataSource;\n this.updateDataSource();\n this.options.type = options.type;\n this.options.format = options.format || '';\n this.options.ignoreAccent = options.ignoreAccent || false;\n this.options.filteredColumns = options.filteredColumns || this.parent.filterSettings.columns;\n this.options.query = options.query || new Query();\n this.options.allowCaseSensitive = options.allowCaseSensitive || false;\n this.options.uid = options.column.uid;\n this.values = {};\n this.localeObj = options.localeObj;\n this.isFiltered = options.filteredColumns.length;\n };\n CheckBoxFilterBase.prototype.getAndSetChkElem = function (options) {\n this.dlg = this.parent.createElement('div', {\n id: this.id + this.options.type + '_excelDlg',\n attrs: { uid: this.options.column.uid },\n className: 'e-checkboxfilter e-filter-popup'\n });\n this.sBox = this.parent.createElement('div', { className: 'e-searchcontainer' });\n if (!options.hideSearchbox) {\n this.sInput = this.parent.createElement('input', {\n id: this.id + '_SearchBox',\n className: 'e-searchinput'\n });\n this.sIcon = this.parent.createElement('span', {\n className: 'e-searchclear e-search-icon e-icons e-input-group-icon', attrs: {\n type: 'text', title: this.getLocalizedLabel('Search')\n }\n });\n this.searchBox = this.parent.createElement('span', { className: 'e-searchbox e-fields' });\n this.searchBox.appendChild(this.sInput);\n this.sBox.appendChild(this.searchBox);\n var inputargs = {\n element: this.sInput, floatLabelType: 'Never', properties: {\n placeholder: this.getLocalizedLabel('Search')\n }\n };\n Input.createInput(inputargs, this.parent.createElement);\n this.searchBox.querySelector('.e-input-group').appendChild(this.sIcon);\n }\n this.spinner = this.parent.createElement('div', { className: 'e-spinner' }); //for spinner\n this.cBox = this.parent.createElement('div', {\n id: this.id + this.options.type + '_CheckBoxList',\n className: 'e-checkboxlist e-fields'\n });\n this.spinner.appendChild(this.cBox);\n this.sBox.appendChild(this.spinner);\n return this.sBox;\n };\n CheckBoxFilterBase.prototype.showDialog = function (options) {\n var args = {\n requestType: events.filterBeforeOpen,\n columnName: this.options.field, columnType: this.options.type, cancel: false\n };\n if (!isBlazor() || this.parent.isJsComponent) {\n var filterModel = 'filterModel';\n args[filterModel] = this;\n }\n this.parent.notify(events.cBoxFltrBegin, args);\n if (args.cancel) {\n return;\n }\n this.dialogObj = new Dialog({\n visible: false, content: this.sBox,\n close: this.closeDialog.bind(this),\n width: (!isNullOrUndefined(parentsUntil(options.target, 'e-bigger')))\n || this.parent.element.classList.contains('e-device') ? 260 : 255,\n target: this.parent.element, animationSettings: { effect: 'None' },\n buttons: [{\n click: this.btnClick.bind(this),\n buttonModel: {\n content: this.getLocalizedLabel(this.isExcel ? 'OKButton' : 'FilterButton'),\n cssClass: 'e-primary', isPrimary: true\n }\n },\n {\n click: this.btnClick.bind(this),\n buttonModel: { cssClass: 'e-flat', content: this.getLocalizedLabel(this.isExcel ? 'CancelButton' : 'ClearButton') }\n }],\n created: this.dialogCreated.bind(this),\n open: this.dialogOpen.bind(this)\n });\n var isStringTemplate = 'isStringTemplate';\n this.dialogObj[isStringTemplate] = true;\n this.renderResponsiveFilter(options);\n this.dlg.setAttribute('aria-label', this.getLocalizedLabel('ExcelFilterDialogARIA'));\n if (options.isResponsiveFilter) {\n var responsiveCnt = document.querySelector('.e-responsive-dialog > .e-dlg-content > .e-mainfilterdiv');\n responsiveCnt.appendChild(this.dlg);\n }\n else {\n this.parent.element.appendChild(this.dlg);\n }\n this.dialogObj.appendTo(this.dlg);\n this.dialogObj.element.style.maxHeight = options.isResponsiveFilter ? 'none' : this.options.height + 'px';\n this.dialogObj.show();\n var content = this.dialogObj.element.querySelector('.e-dlg-content');\n content.appendChild(this.sBox);\n this.wireEvents();\n createSpinner({ target: this.spinner }, this.parent.createElement);\n showSpinner(this.spinner);\n this.getAllData();\n };\n CheckBoxFilterBase.prototype.renderResponsiveFilter = function (options) {\n if (options.isResponsiveFilter) {\n this.dialogObj.buttons = [{}];\n this.dialogObj.position = { X: '', Y: '' };\n this.dialogObj.target = document.querySelector('.e-resfilter > .e-dlg-content > .e-mainfilterdiv');\n this.dialogObj.width = '100%';\n }\n };\n CheckBoxFilterBase.prototype.dialogCreated = function (e) {\n if (this.options.isResponsiveFilter) {\n this.dialogObj.element.style.left = '0px';\n }\n else {\n if (!Browser.isDevice) {\n getFilterMenuPostion(this.options.target, this.dialogObj, this.parent);\n }\n else {\n this.dialogObj.position = { X: 'center', Y: 'center' };\n }\n }\n this.parent.notify(events.filterDialogCreated, e);\n };\n CheckBoxFilterBase.prototype.openDialog = function (options) {\n this.updateModel(options);\n this.getAndSetChkElem(options);\n this.showDialog(options);\n };\n CheckBoxFilterBase.prototype.closeDialog = function () {\n if (this.dialogObj && !this.dialogObj.isDestroyed) {\n var filterTemplateCol = this.options.columns.filter(function (col) { return col.getFilterItemTemplate(); });\n // tslint:disable-next-line:no-any\n var registeredTemplate = this.parent.registeredTemplate;\n if (filterTemplateCol.length && !isNullOrUndefined(registeredTemplate) && registeredTemplate.filterItemTemplate) {\n this.parent.destroyTemplate(['filterItemTemplate']);\n }\n if (this.parent.isReact) {\n this.parent.destroyTemplate(['filterItemTemplate']);\n this.parent.renderTemplates();\n }\n this.parent.notify(events.filterMenuClose, { field: this.options.field });\n this.dialogObj.destroy();\n this.unWireEvents();\n remove(this.dlg);\n this.dlg = null;\n this.parent.notify(events.filterDialogClose, {});\n }\n };\n /** @hidden */\n CheckBoxFilterBase.prototype.clearFilter = function (col) {\n /* tslint:disable-next-line:max-line-length */\n var args = { instance: this, handler: this.clearFilter, cancel: false };\n this.parent.notify(events.fltrPrevent, args);\n if (args.cancel) {\n return;\n }\n this.options.handler({ action: 'clear-filter', field: col ? col.field : this.options.field });\n };\n CheckBoxFilterBase.prototype.btnClick = function (e) {\n if (this.filterState) {\n if (e.target.tagName.toLowerCase() === 'input' && e.target.classList.contains('e-searchinput')) {\n var value = e.target.value;\n if (this.options.column.type === 'boolean') {\n if (value !== '' &&\n this.getLocalizedLabel('FilterTrue').toLowerCase().indexOf(value.toLowerCase()) !== -1) {\n value = true;\n }\n else if (value !== '' &&\n this.getLocalizedLabel('FilterFalse').toLowerCase().indexOf(value.toLowerCase()) !== -1) {\n value = false;\n }\n }\n var args = {\n action: 'filtering', filterCollection: {\n field: this.options.field,\n operator: this.options.isRemote ?\n (this.options.column.type === 'string' ? 'contains' : 'equal') :\n (this.options.column.type === 'date' || this.options.column.type === 'datetime' ||\n this.options.column.type === 'boolean' ? 'equal' : 'contains'),\n value: value, matchCase: false, type: this.options.column.type\n },\n field: this.options.field\n };\n value !== undefined && value !== null && value !== '' ? this.isForeignColumn(this.options.column) ?\n this.foreignFilter(args, value) : this.options.handler(args) : this.closeDialog();\n }\n else {\n if (e.keyCode === 13) {\n this.fltrBtnHandler();\n }\n else {\n var text = e.target.firstChild.textContent.toLowerCase();\n if (this.getLocalizedLabel(this.isExcel ? 'OKButton' : 'FilterButton').toLowerCase() === text) {\n this.fltrBtnHandler();\n }\n else if (this.getLocalizedLabel('ClearButton').toLowerCase() === text) {\n this.clearFilter();\n }\n }\n }\n this.closeDialog();\n }\n else if (!(e.target.tagName.toLowerCase() === 'input')) {\n this.clearFilter();\n this.closeDialog();\n }\n };\n /** @hidden */\n CheckBoxFilterBase.prototype.fltrBtnHandler = function () {\n var checked = [].slice.call(this.cBox.querySelectorAll('.e-check:not(.e-selectall)'));\n var check = checked;\n var optr = 'equal';\n var ddlValue = this.dialogObj.element.querySelector('.e-dropdownlist');\n if (ddlValue) {\n this.options.operator = optr = ddlValue.ej2_instances[0].value;\n }\n this.isMenuNotEqual = this.options.operator === 'notequal';\n var searchInput = this.searchBox.querySelector('.e-searchinput');\n var caseSen = this.options.allowCaseSensitive;\n var defaults = {\n field: this.options.field, predicate: this.isMenuNotEqual ? 'and' : 'or', uid: this.options.uid,\n operator: optr, type: this.options.type, matchCase: caseSen, ignoreAccent: this.options.ignoreAccent\n };\n var isNotEqual = this.itemsCnt !== checked.length && this.itemsCnt - checked.length < checked.length;\n if (isNotEqual && searchInput.value === '') {\n optr = this.isMenuNotEqual ? 'equal' : 'notequal';\n checked = [].slice.call(this.cBox.querySelectorAll('.e-uncheck:not(.e-selectall)'));\n defaults.predicate = this.isMenuNotEqual ? 'or' : 'and';\n defaults.operator = optr;\n }\n var value;\n var val;\n var length;\n var fObj;\n var coll = [];\n if (checked.length !== this.itemsCnt || (searchInput.value && searchInput.value !== '')) {\n for (var i = 0; i < checked.length; i++) {\n value = this.values[parentsUntil(checked[i], 'e-ftrchk').getAttribute('uid')];\n fObj = extend({}, { value: value }, defaults);\n if (value && !value.toString().length) {\n fObj.operator = isNotEqual ? 'notequal' : 'equal';\n }\n if (value === '' || isNullOrUndefined(value)) {\n coll = coll.concat(CheckBoxFilterBase.generateNullValuePredicates(defaults));\n }\n else {\n coll.push(fObj);\n }\n var args = {\n instance: this, handler: this.fltrBtnHandler, arg1: fObj.field, arg2: fObj.predicate, arg3: fObj.operator,\n arg4: fObj.matchCase, arg5: fObj.ignoreAccent, arg6: fObj.value, cancel: false\n };\n this.parent.notify(events.fltrPrevent, args);\n if (args.cancel) {\n return;\n }\n }\n if (this.options.type === 'date' || this.options.type === 'datetime') {\n length = check.length - 1;\n val = this.values[parentsUntil(check[length], 'e-ftrchk').getAttribute('uid')];\n if (isNullOrUndefined(val) && isNotEqual) {\n coll.push({\n field: defaults.field, matchCase: defaults.matchCase, operator: 'equal',\n predicate: 'and', value: null\n });\n }\n }\n this.initiateFilter(coll);\n }\n else {\n this.clearFilter();\n }\n };\n /** @hidden */\n CheckBoxFilterBase.generateNullValuePredicates = function (defaults) {\n var coll = [];\n if (defaults.type === 'string') {\n coll.push({\n field: defaults.field, ignoreAccent: defaults.ignoreAccent, matchCase: defaults.matchCase,\n operator: defaults.operator, predicate: defaults.predicate, value: ''\n });\n }\n coll.push({\n field: defaults.field,\n matchCase: defaults.matchCase, operator: defaults.operator, predicate: defaults.predicate, value: null\n });\n coll.push({\n field: defaults.field, matchCase: defaults.matchCase, operator: defaults.operator,\n predicate: defaults.predicate, value: undefined\n });\n return coll;\n };\n CheckBoxFilterBase.prototype.initiateFilter = function (fColl) {\n var firstVal = fColl[0];\n var predicate;\n if (!isNullOrUndefined(firstVal)) {\n predicate = firstVal.ejpredicate ? firstVal.ejpredicate :\n new Predicate(firstVal.field, firstVal.operator, firstVal.value, !firstVal.matchCase, firstVal.ignoreAccent);\n for (var j = 1; j < fColl.length; j++) {\n predicate = fColl[j].ejpredicate !== undefined ?\n predicate[fColl[j].predicate](fColl[j].ejpredicate) :\n predicate[fColl[j].predicate](fColl[j].field, fColl[j].operator, fColl[j].value, !fColl[j].matchCase, fColl[j].ignoreAccent);\n }\n var args = {\n action: 'filtering', filterCollection: fColl, field: this.options.field,\n ejpredicate: Predicate.or(predicate)\n };\n this.options.handler(args);\n }\n };\n CheckBoxFilterBase.prototype.isForeignColumn = function (col) {\n return col.isForeignColumn ? col.isForeignColumn() : false;\n };\n CheckBoxFilterBase.prototype.refreshCheckboxes = function () {\n var _this = this;\n var val = this.sInput.value;\n var column = this.options.column;\n var query = this.isForeignColumn(column) ? this.foreignKeyQuery.clone() : this.options.query.clone();\n var foreignQuery = this.options.query.clone();\n var pred = query.queries.filter(function (e) { return e && e.fn === 'onWhere'; })[0];\n query.queries = [];\n foreignQuery.queries = [];\n var parsed = (this.options.type !== 'string' && parseFloat(val)) ? parseFloat(val) : val;\n var operator = this.options.isRemote ?\n (this.options.type === 'string' ? 'contains' : 'equal') : (this.options.type ? 'contains' : 'equal');\n var matchCase = true;\n var ignoreAccent = this.options.ignoreAccent;\n var field = this.isForeignColumn(column) ? column.foreignKeyValue : column.field;\n parsed = (parsed === '' || parsed === undefined) ? undefined : parsed;\n var predicte;\n var moduleName = this.options.dataManager.adaptor.getModuleName;\n if (this.options.type === 'boolean') {\n if (parsed !== undefined &&\n this.getLocalizedLabel('FilterTrue').toLowerCase().indexOf(parsed.toLowerCase()) !== -1 && moduleName) {\n parsed = (moduleName() === 'ODataAdaptor' || 'ODataV4Adaptor') ? true : 'true';\n }\n else if (parsed !== undefined &&\n this.getLocalizedLabel('FilterFalse').toLowerCase().indexOf(parsed.toLowerCase()) !== -1 && moduleName) {\n parsed = (moduleName() === 'ODataAdaptor' || 'ODataV4Adaptor') ? false : 'false';\n }\n operator = 'equal';\n }\n if (this.options.type === 'date' || this.options.type === 'datetime') {\n parsed = this.valueFormatter.fromView(val, this.options.parserFn, this.options.type);\n }\n this.addDistinct(query);\n /* tslint:disable-next-line:max-line-length */\n var args = {\n requestType: events.filterSearchBegin,\n filterModel: this, columnName: field, column: column,\n operator: operator, matchCase: matchCase, ignoreAccent: ignoreAccent, filterChoiceCount: null,\n query: query, value: parsed\n };\n if (isBlazor() && !this.parent.isJsComponent) {\n var filterModel = 'filterModel';\n args[filterModel] = {};\n }\n this.parent.trigger(events.actionBegin, args, function (filterargs) {\n filterargs.operator = (isBlazor() && filterargs.excelSearchOperator !== 'none') ?\n filterargs.excelSearchOperator : filterargs.operator;\n predicte = new Predicate(field, filterargs.operator, parsed, filterargs.matchCase, filterargs.ignoreAccent);\n if (_this.options.type === 'date' || _this.options.type === 'datetime') {\n operator = 'equal';\n if (isNullOrUndefined(parsed) && val.length) {\n return;\n }\n var filterObj = {\n field: field, operator: operator, value: parsed, matchCase: matchCase,\n ignoreAccent: ignoreAccent\n };\n predicte = getDatePredicate(filterObj, _this.options.type);\n }\n if (val.length) {\n predicte = !isNullOrUndefined(pred) ? predicte.and(pred.e) : predicte;\n query.where(predicte);\n }\n else if (!isNullOrUndefined(pred)) {\n query.where(pred.e);\n }\n filterargs.filterChoiceCount = !isNullOrUndefined(filterargs.filterChoiceCount) ? filterargs.filterChoiceCount : 1000;\n var fPredicate = {};\n showSpinner(_this.spinner);\n _this.renderEmpty = false;\n if (_this.isForeignColumn(column) && val.length) {\n var colData = ('result' in column.dataSource) ? new DataManager(column.dataSource.result) :\n column.dataSource;\n // tslint:disable-next-line:no-any\n colData.executeQuery(query).then(function (e) {\n var columnData = _this.options.column.columnData;\n _this.options.column.columnData = e.result;\n _this.parent.notify(events.generateQuery, { predicate: fPredicate, column: column });\n if (fPredicate.predicate.predicates.length) {\n foreignQuery.where(fPredicate.predicate);\n }\n else {\n _this.renderEmpty = true;\n }\n _this.options.column.columnData = columnData;\n foreignQuery.take(filterargs.filterChoiceCount);\n _this.search(filterargs, foreignQuery);\n });\n }\n else {\n query.take(filterargs.filterChoiceCount);\n _this.search(filterargs, query);\n }\n });\n };\n CheckBoxFilterBase.prototype.search = function (args, query) {\n if (this.parent.dataSource && 'result' in this.parent.dataSource) {\n this.filterEvent(args, query);\n }\n else {\n this.processSearch(query);\n }\n };\n CheckBoxFilterBase.prototype.getPredicateFromCols = function (columns) {\n var predicates = CheckBoxFilterBase.getPredicate(columns);\n var predicateList = [];\n var fPredicate = {};\n var isGrid = this.parent.getForeignKeyColumns !== undefined;\n var foreignColumn = isGrid ? this.parent.getForeignKeyColumns() : [];\n for (var _i = 0, _a = Object.keys(predicates); _i < _a.length; _i++) {\n var prop = _a[_i];\n var col = void 0;\n if (isGrid && this.parent.getColumnByField(prop).isForeignColumn()) {\n col = getColumnByForeignKeyValue(prop, foreignColumn);\n }\n if (col) {\n this.parent.notify(events.generateQuery, { predicate: fPredicate, column: col });\n if (fPredicate.predicate.predicates.length) {\n predicateList.push(Predicate.or(fPredicate.predicate.predicates));\n }\n }\n else {\n predicateList.push(predicates[prop]);\n }\n }\n return predicateList.length && Predicate.and(predicateList);\n };\n CheckBoxFilterBase.prototype.getQuery = function () {\n return this.parent.getQuery ? this.parent.getQuery().clone() : new Query();\n };\n CheckBoxFilterBase.prototype.getAllData = function () {\n var _this = this;\n var query = this.getQuery();\n query.requiresCount(); //consider take query\n this.addDistinct(query);\n var args = {\n requestType: events.filterChoiceRequest, query: query, filterChoiceCount: null\n };\n if (!isBlazor() || this.parent.isJsComponent) {\n var filterModel = 'filterModel';\n args[filterModel] = this;\n }\n this.parent.trigger(events.actionBegin, args, function (args) {\n args.filterChoiceCount = !isNullOrUndefined(args.filterChoiceCount) ? args.filterChoiceCount : 1000;\n query.take(args.filterChoiceCount);\n if (_this.parent.dataSource && 'result' in _this.parent.dataSource) {\n _this.filterEvent(args, query);\n }\n else {\n _this.processDataOperation(query, true);\n }\n });\n };\n CheckBoxFilterBase.prototype.addDistinct = function (query) {\n var filteredColumn = DataUtil.distinct(this.options.filteredColumns, 'field');\n if (filteredColumn.indexOf(this.options.column.field) <= -1) {\n filteredColumn = filteredColumn.concat(this.options.column.field);\n }\n query.distinct(filteredColumn);\n return query;\n };\n CheckBoxFilterBase.prototype.filterEvent = function (args, query) {\n var _this = this;\n var defObj = eventPromise(args, query);\n this.parent.trigger(events.dataStateChange, defObj.state);\n var def = defObj.deffered;\n def.promise.then(function (e) {\n _this.dataSuccess(e);\n });\n };\n CheckBoxFilterBase.prototype.processDataOperation = function (query, isInitial) {\n var _this = this;\n this.options.dataSource = this.options.dataSource instanceof DataManager ?\n this.options.dataSource : new DataManager(this.options.dataSource);\n var allPromise = [];\n var runArray = [];\n if (this.isForeignColumn(this.options.column) && isInitial) {\n var colData = ('result' in this.options.column.dataSource) ?\n new DataManager(this.options.column.dataSource.result) :\n this.options.column.dataSource;\n this.foreignKeyQuery.params = query.params;\n allPromise.push(colData.executeQuery(this.foreignKeyQuery));\n runArray.push(function (data) { return _this.foreignKeyData = data; });\n }\n allPromise.push(this.options.dataSource.executeQuery(query));\n runArray.push(this.dataSuccess.bind(this));\n var i = 0;\n Promise.all(allPromise).then(function (e) {\n for (var j = 0; j < e.length; j++) {\n runArray[i++](e[j].result);\n }\n });\n };\n CheckBoxFilterBase.prototype.dataSuccess = function (e) {\n this.fullData = e;\n var args1 = { dataSource: this.fullData, executeQuery: true, field: this.options.field };\n this.parent.notify(events.beforeCheckboxRenderer, args1);\n if (args1.executeQuery) {\n var query = new Query();\n if (this.parent.searchSettings && this.parent.searchSettings.key.length) {\n var sSettings = this.parent.searchSettings;\n var fields = sSettings.fields.length ? sSettings.fields : this.options.columns.map(function (f) { return f.field; });\n /* tslint:disable-next-line:max-line-length */\n query.search(sSettings.key, fields, sSettings.operator, sSettings.ignoreCase, sSettings.ignoreAccent);\n }\n if ((this.options.filteredColumns.length)) {\n var cols = [];\n for (var i = 0; i < this.options.filteredColumns.length; i++) {\n var filterColumn = this.options.filteredColumns[i];\n if (this.options.uid) {\n filterColumn.uid = filterColumn.uid || this.parent.getColumnByField(filterColumn.field).uid;\n if (filterColumn.uid !== this.options.uid) {\n cols.push(this.options.filteredColumns[i]);\n }\n }\n else {\n if (filterColumn.field !== this.options.field) {\n cols.push(this.options.filteredColumns[i]);\n }\n }\n }\n var predicate = this.getPredicateFromCols(cols);\n if (predicate) {\n query.where(predicate);\n }\n }\n // query.select(this.options.field);\n var result = new DataManager(args1.dataSource).executeLocal(query);\n var col = this.options.column;\n this.filteredData = CheckBoxFilterBase.getDistinct(result, this.options.field, col, this.foreignKeyData).records || [];\n }\n var data = args1.executeQuery ? this.filteredData : args1.dataSource;\n this.processDataSource(null, true, data, args1);\n this.sInput.focus();\n var args = {\n requestType: events.filterAfterOpen,\n columnName: this.options.field, columnType: this.options.type\n };\n if (!isBlazor() || this.parent.isJsComponent) {\n var filterModel = 'filterModel';\n args[filterModel] = this;\n }\n this.parent.notify(events.cBoxFltrComplete, args);\n };\n CheckBoxFilterBase.prototype.processDataSource = function (query, isInitial, dataSource, args) {\n showSpinner(this.spinner);\n // query = query ? query : this.options.query.clone();\n // query.requiresCount();\n // let result: Object = new DataManager(dataSource as JSON[]).executeLocal(query);\n // let res: { result: Object[] } = result as { result: Object[] };\n this.updateResult();\n this.createFilterItems(dataSource, isInitial, args);\n };\n CheckBoxFilterBase.prototype.processSearch = function (query) {\n this.processDataOperation(query);\n };\n CheckBoxFilterBase.prototype.updateResult = function () {\n this.result = {};\n var predicate = this.getPredicateFromCols(this.options.filteredColumns);\n var query = new Query();\n if (predicate) {\n query.where(predicate);\n }\n var result = new DataManager(this.fullData).executeLocal(query);\n for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {\n var res = result_1[_i];\n this.result[getObject(this.options.field, res)] = true;\n }\n };\n CheckBoxFilterBase.prototype.clickHandler = function (e) {\n var target = e.target;\n var elem = parentsUntil(target, 'e-checkbox-wrapper');\n if (parentsUntil(target, 'e-searchbox')) {\n this.searchBoxClick(e);\n }\n if (elem) {\n var selectAll = elem.querySelector('.e-selectall');\n if (selectAll) {\n this.updateAllCBoxes(!selectAll.classList.contains('e-check'));\n }\n else {\n toogleCheckbox(elem.parentElement);\n }\n this.updateIndeterminatenBtn();\n elem.querySelector('.e-chk-hidden').focus();\n }\n this.setFocus(parentsUntil(elem, 'e-ftrchk'));\n };\n CheckBoxFilterBase.prototype.keyupHandler = function (e) {\n this.setFocus(parentsUntil(e.target, 'e-ftrchk'));\n };\n CheckBoxFilterBase.prototype.setFocus = function (elem) {\n var prevElem = this.dlg.querySelector('.e-chkfocus');\n if (prevElem) {\n prevElem.classList.remove('e-chkfocus');\n }\n if (elem) {\n elem.classList.add('e-chkfocus');\n }\n };\n CheckBoxFilterBase.prototype.updateAllCBoxes = function (checked) {\n var cBoxes = [].slice.call(this.cBox.querySelectorAll('.e-frame'));\n for (var _i = 0, cBoxes_1 = cBoxes; _i < cBoxes_1.length; _i++) {\n var cBox = cBoxes_1[_i];\n removeAddCboxClasses(cBox, checked);\n setChecked(cBox.previousSibling, checked);\n }\n };\n CheckBoxFilterBase.prototype.dialogOpen = function () {\n if (this.parent.element.classList.contains('e-device')) {\n this.dialogObj.element.querySelector('.e-input-group').classList.remove('e-input-focus');\n if (!this.options.isResponsiveFilter) {\n this.dialogObj.element.querySelector('.e-btn').focus();\n }\n }\n };\n CheckBoxFilterBase.prototype.createCheckbox = function (value, checked, data) {\n var elem = checked ? this.cBoxTrue.cloneNode(true) :\n this.cBoxFalse.cloneNode(true);\n setChecked(elem.querySelector('input'), checked);\n var label = elem.querySelector('.e-label');\n var dummyData = extendObjWithFn({}, data, { column: this.options.column, parent: this.parent });\n label.innerHTML = !isNullOrUndefined(value) && value.toString().length ? value :\n this.getLocalizedLabel('Blanks');\n if (typeof value === 'boolean') {\n label.innerHTML = value === true ? this.getLocalizedLabel('True') : this.getLocalizedLabel('False');\n }\n addClass([label], ['e-checkboxfiltertext']);\n if (this.options.template && data[this.options.column.field] !== this.getLocalizedLabel('SelectAll')) {\n label.innerHTML = '';\n var isReactCompiler = this.parent.isReact && this.options.column.filter\n && typeof (this.options.column.filter.itemTemplate) !== 'string';\n if (isReactCompiler) {\n this.options.template(dummyData, this.parent, 'filterItemTemplate', null, null, null, label);\n this.parent.renderTemplates();\n }\n else {\n appendChildren(label, this.options.template(dummyData, this.parent, 'filterItemTemplate'));\n }\n }\n return elem;\n };\n CheckBoxFilterBase.prototype.updateIndeterminatenBtn = function () {\n var cnt = this.cBox.children.length - 1;\n var className = [];\n var disabled = false;\n var elem = this.cBox.querySelector('.e-selectall');\n var selected = this.cBox.querySelectorAll('.e-check:not(.e-selectall)').length;\n var btn;\n if (!this.options.isResponsiveFilter) {\n btn = this.dialogObj.btnObj[0];\n btn.disabled = false;\n }\n var input = elem.previousSibling;\n setChecked(input, false);\n input.indeterminate = false;\n if (cnt === selected) {\n className = ['e-check'];\n setChecked(input, true);\n }\n else if (selected) {\n className = ['e-stop'];\n input.indeterminate = true;\n }\n else {\n className = ['e-uncheck'];\n disabled = true;\n if (btn) {\n btn.disabled = true;\n }\n }\n if (btn) {\n this.filterState = !btn.disabled;\n btn.dataBind();\n }\n removeClass([elem], ['e-check', 'e-stop', 'e-uncheck']);\n addClass([elem], className);\n this.parent.notify(events.refreshCustomFilterOkBtn, { disabled: disabled });\n };\n CheckBoxFilterBase.prototype.createFilterItems = function (data, isInitial, args1) {\n var _a;\n var cBoxes = this.parent.createElement('div');\n var btn;\n var disabled = false;\n if (!this.options.isResponsiveFilter) {\n btn = this.dialogObj.btnObj[0];\n }\n var nullCounter = -1;\n var key = 'ejValue';\n if (!args1.executeQuery) {\n key = args1.field;\n }\n for (var i = 0; i < data.length; i++) {\n var val = getValue(key, data[i]);\n if (val === '' || isNullOrUndefined(val)) {\n nullCounter = nullCounter + 1;\n }\n }\n this.itemsCnt = nullCounter !== -1 ? data.length - nullCounter : data.length;\n if (data.length && !this.renderEmpty) {\n var selectAllValue = this.getLocalizedLabel('SelectAll');\n var checkBox = this.createCheckbox(selectAllValue, false, (_a = {}, _a[this.options.field] = selectAllValue, _a));\n var selectAll = createCboxWithWrap(getUid('cbox'), checkBox, 'e-ftrchk');\n selectAll.querySelector('.e-frame').classList.add('e-selectall');\n cBoxes.appendChild(selectAll);\n var predicate = new Predicate('field', 'equal', this.options.field);\n if (this.options.foreignKeyValue) {\n predicate = predicate.or('field', 'equal', this.options.foreignKeyValue);\n }\n var isColFiltered = new DataManager(this.options.filteredColumns).executeLocal(new Query().where(predicate)).length;\n var isRndere = void 0;\n for (var i = 0; i < data.length; i++) {\n var uid = getUid('cbox');\n this.values[uid] = getValue(key, data[i]);\n var value = getValue(this.options.field, data[i]);\n if (this.options.formatFn) {\n value = this.valueFormatter.toView(value, this.options.formatFn);\n }\n var args_1 = { value: value, column: this.options.column, data: data[i] };\n this.parent.notify(events.filterCboxValue, args_1);\n value = args_1.value;\n if ((value === '' || isNullOrUndefined(value))) {\n if (isRndere) {\n continue;\n }\n isRndere = true;\n }\n var checkbox = this.createCheckbox(value, this.getCheckedState(isColFiltered, this.values[uid]), getValue('dataObj', data[i]));\n cBoxes.appendChild(createCboxWithWrap(uid, checkbox, 'e-ftrchk'));\n }\n this.cBox.innerHTML = '';\n appendChildren(this.cBox, [].slice.call(cBoxes.children));\n this.updateIndeterminatenBtn();\n if (btn) {\n btn.disabled = false;\n }\n disabled = false;\n }\n else {\n cBoxes.appendChild(this.parent.createElement('span', { innerHTML: this.getLocalizedLabel('NoResult') }));\n this.cBox.innerHTML = '';\n appendChildren(this.cBox, [].slice.call(cBoxes.children));\n if (btn) {\n btn.disabled = true;\n }\n disabled = true;\n }\n if (btn) {\n this.filterState = !btn.disabled;\n btn.dataBind();\n }\n var args = { requestType: events.filterChoiceRequest, dataSource: this.renderEmpty ||\n (isBlazor() && this.parent.isServerRendered) ? [] : data };\n if (!isBlazor() || this.parent.isJsComponent) {\n var filterModel = 'filterModel';\n args[filterModel] = this;\n }\n this.parent.notify(events.cBoxFltrComplete, args);\n this.parent.notify(events.refreshCustomFilterOkBtn, { disabled: disabled });\n hideSpinner(this.spinner);\n };\n CheckBoxFilterBase.prototype.getCheckedState = function (isColFiltered, value) {\n if (!this.isFiltered || !isColFiltered) {\n return true;\n }\n else {\n var checkState = this.result[value];\n return this.options.operator === 'notequal' ? !checkState : checkState;\n }\n };\n CheckBoxFilterBase.getDistinct = function (json, field, column, foreignKeyData) {\n var len = json.length;\n var result = [];\n var value;\n var ejValue = 'ejValue';\n var lookup = {};\n var isForeignKey = column && column.isForeignColumn ? column.isForeignColumn() : false;\n while (len--) {\n value = json[len];\n value = getObject(field, value); //local remote diff, check with mdu \n if (!(value in lookup)) {\n var obj = {};\n obj[ejValue] = value;\n lookup[value] = true;\n if (isForeignKey) {\n var foreignDataObj = getForeignData(column, {}, value, foreignKeyData)[0];\n setValue(events.foreignKeyData, foreignDataObj, json[len]);\n value = getValue(column.foreignKeyValue, foreignDataObj);\n }\n setValue(field, isNullOrUndefined(value) ? null : value, obj);\n setValue('dataObj', json[len], obj);\n result.push(obj);\n }\n }\n return DataUtil.group(DataUtil.sort(result, field, DataUtil.fnAscending), 'ejValue');\n };\n CheckBoxFilterBase.getPredicate = function (columns) {\n var cols = DataUtil.distinct(columns, 'field', true) || [];\n var collection = [];\n var pred = {};\n for (var i = 0; i < cols.length; i++) {\n collection = new DataManager(columns).executeLocal(new Query().where('field', 'equal', cols[i].field));\n if (collection.length !== 0) {\n pred[cols[i].field] = CheckBoxFilterBase.generatePredicate(collection);\n }\n }\n return pred;\n };\n CheckBoxFilterBase.generatePredicate = function (cols) {\n var len = cols ? cols.length : 0;\n var predicate;\n var first;\n var operate = 'or';\n first = CheckBoxFilterBase.updateDateFilter(cols[0]);\n first.ignoreAccent = !isNullOrUndefined(first.ignoreAccent) ? first.ignoreAccent : false;\n if (first.type === 'date' || first.type === 'datetime') {\n predicate = getDatePredicate(first, first.type);\n }\n else {\n predicate = first.ejpredicate ? first.ejpredicate :\n new Predicate(first.field, first.operator, first.value, !CheckBoxFilterBase.getCaseValue(first), first.ignoreAccent);\n }\n for (var p = 1; p < len; p++) {\n cols[p] = CheckBoxFilterBase.updateDateFilter(cols[p]);\n if (len > 2 && p > 1 && cols[p].predicate === 'or') {\n if (cols[p].type === 'date' || cols[p].type === 'datetime') {\n predicate.predicates.push(getDatePredicate(cols[p], cols[p].type));\n }\n else {\n predicate.predicates.push(new Predicate(cols[p].field, cols[p].operator, cols[p].value, !CheckBoxFilterBase.getCaseValue(cols[p]), cols[p].ignoreAccent));\n }\n }\n else {\n if (cols[p].type === 'date' || cols[p].type === 'datetime') {\n if (cols[p].predicate === 'and' && cols[p].operator === 'equal') {\n predicate = predicate[operate](getDatePredicate(cols[p], cols[p].type), cols[p].type, cols[p].ignoreAccent);\n }\n else {\n predicate = predicate[(cols[p].predicate)](getDatePredicate(cols[p], cols[p].type), cols[p].type, cols[p].ignoreAccent);\n }\n }\n else {\n /* tslint:disable-next-line:max-line-length */\n predicate = cols[p].ejpredicate ?\n predicate[cols[p].predicate](cols[p].ejpredicate) :\n predicate[(cols[p].predicate)](cols[p].field, cols[p].operator, cols[p].value, !CheckBoxFilterBase.getCaseValue(cols[p]), cols[p].ignoreAccent);\n }\n }\n }\n return predicate || null;\n };\n CheckBoxFilterBase.getCaseValue = function (filter) {\n if (isNullOrUndefined(filter.matchCase)) {\n if (filter.type === 'string' || isNullOrUndefined(filter.type) && typeof (filter.value) === 'string') {\n return false;\n }\n else {\n return true;\n }\n }\n else {\n return filter.matchCase;\n }\n };\n CheckBoxFilterBase.updateDateFilter = function (filter) {\n if ((filter.type === 'date' || filter.type === 'datetime' || filter.value instanceof Date)) {\n filter.type = filter.type || 'date';\n }\n return filter;\n };\n return CheckBoxFilterBase;\n}());\nexport { CheckBoxFilterBase };\n","import { isNullOrUndefined, extend, isBlazor } from '@syncfusion/ej2-base';\nimport { Query, DataManager, Predicate, Deferred, UrlAdaptor } from '@syncfusion/ej2-data';\nimport { setFormatter, isGroupAdaptive, getColumnByForeignKeyValue, refreshFilteredColsUid } from '../base/util';\nimport * as events from '../base/constant';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { CheckBoxFilterBase } from '../common/checkbox-filter-base';\n/**\n * Grid data module is used to generate query and data source.\n * @hidden\n */\nvar Data = /** @class */ (function () {\n /**\n * Constructor for data module.\n * @hidden\n */\n function Data(parent, serviceLocator) {\n this.dataState = { isPending: false, resolver: null, group: [] };\n this.foreignKeyDataState = { isPending: false, resolver: null };\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.initDataManager();\n if (this.parent.isDestroyed || this.getModuleName() === 'foreignKey') {\n return;\n }\n this.parent.on(events.rowsAdded, this.addRows, this);\n this.parent.on(events.rowPositionChanged, this.reorderRows, this);\n this.parent.on(events.rowsRemoved, this.removeRows, this);\n this.parent.on(events.dataSourceModified, this.initDataManager, this);\n this.parent.on(events.destroy, this.destroy, this);\n this.parent.on(events.updateData, this.crudActions, this);\n this.parent.on(events.addDeleteAction, this.getData, this);\n this.parent.on(events.autoCol, this.refreshFilteredCols, this);\n this.parent.on(events.columnsPrepared, this.refreshFilteredCols, this);\n }\n Data.prototype.reorderRows = function (e) {\n this.dataManager.dataSource.json.splice(e.toIndex, 0, this.dataManager.dataSource.json.splice(e.fromIndex, 1)[0]);\n };\n Data.prototype.getModuleName = function () {\n return 'data';\n };\n /**\n * The function used to initialize dataManager and external query\n * @return {void}\n */\n Data.prototype.initDataManager = function () {\n var gObj = this.parent;\n this.dataManager = gObj.dataSource instanceof DataManager ? gObj.dataSource :\n (isNullOrUndefined(gObj.dataSource) ? new DataManager() : new DataManager(gObj.dataSource));\n if (gObj.isAngular && !(gObj.query instanceof Query)) {\n gObj.setProperties({ query: new Query() }, true);\n }\n else {\n this.isQueryInvokedFromData = true;\n gObj.query = gObj.query instanceof Query ? gObj.query : new Query();\n }\n };\n /**\n * The function is used to generate updated Query from Grid model.\n * @return {Query}\n * @hidden\n */\n Data.prototype.generateQuery = function (skipPage) {\n var gObj = this.parent;\n var query = gObj.getQuery().clone();\n if (this.parent.columnQueryMode === 'ExcludeHidden') {\n query.select(this.parent.getColumns().filter(function (column) { return !(column.isPrimaryKey !== true && column.visible === false || column.field === undefined); }).map(function (column) { return column.field; }));\n }\n else if (this.parent.columnQueryMode === 'Schema') {\n var selectQueryFields = [];\n var columns = this.parent.columns;\n for (var i = 0; i < columns.length; i++) {\n selectQueryFields.push(columns[i].field);\n }\n query.select(selectQueryFields);\n }\n this.filterQuery(query);\n this.searchQuery(query);\n this.aggregateQuery(query);\n this.sortQuery(query);\n if (isGroupAdaptive(this.parent)) {\n this.virtualGroupPageQuery(query);\n }\n else {\n this.pageQuery(query, skipPage);\n }\n this.groupQuery(query);\n return query;\n };\n /** @hidden */\n Data.prototype.aggregateQuery = function (query, isForeign) {\n var rows = this.parent.aggregates;\n for (var i = 0; i < rows.length; i++) {\n var row = rows[i];\n for (var j = 0; j < row.columns.length; j++) {\n var cols = row.columns[j];\n var types = cols.type instanceof Array ? cols.type : [cols.type];\n for (var k = 0; k < types.length; k++) {\n query.aggregate(types[k].toLowerCase(), cols.field);\n }\n }\n }\n return query;\n };\n Data.prototype.virtualGroupPageQuery = function (query) {\n var gObj = this.parent;\n var fName = 'fn';\n if (query.queries.length) {\n for (var i = 0; i < query.queries.length; i++) {\n if (query.queries[i][fName] === 'onPage') {\n query.queries.splice(i, 1);\n }\n }\n }\n return query;\n };\n Data.prototype.pageQuery = function (query, skipPage) {\n var gObj = this.parent;\n var fName = 'fn';\n if ((gObj.allowPaging || gObj.enableVirtualization || gObj.enableInfiniteScrolling) && skipPage !== true) {\n gObj.pageSettings.currentPage = Math.max(1, gObj.pageSettings.currentPage);\n if (gObj.pageSettings.pageCount <= 0) {\n gObj.pageSettings.pageCount = 8;\n }\n if (gObj.pageSettings.pageSize <= 0) {\n gObj.pageSettings.pageSize = 12;\n }\n if (query.queries.length) {\n for (var i = 0; i < query.queries.length; i++) {\n if (query.queries[i][fName] === 'onPage') {\n query.queries.splice(i, 1);\n }\n }\n }\n if (!isNullOrUndefined(gObj.infiniteScrollModule) && gObj.enableInfiniteScrolling) {\n this.parent.notify(events.infinitePageQuery, query);\n }\n else {\n query.page(gObj.pageSettings.currentPage, gObj.pageSettings.pageSize);\n }\n }\n return query;\n };\n Data.prototype.groupQuery = function (query) {\n var gObj = this.parent;\n if (gObj.allowGrouping && gObj.groupSettings.columns.length) {\n if (this.parent.groupSettings.enableLazyLoading) {\n query.lazyLoad.push({ key: 'isLazyLoad', value: this.parent.groupSettings.enableLazyLoading });\n }\n var columns = gObj.groupSettings.columns;\n for (var i = 0, len = columns.length; i < len; i++) {\n var column = this.getColumnByField(columns[i]);\n if (!column) {\n this.parent.log('initial_action', { moduleName: 'group', columnName: columns[i] });\n }\n var isGrpFmt = column.enableGroupByFormat;\n var format = column.format;\n if (isGrpFmt) {\n query.group(columns[i], this.formatGroupColumn.bind(this), format);\n }\n else {\n query.group(columns[i], null);\n }\n }\n }\n return query;\n };\n Data.prototype.sortQuery = function (query) {\n var gObj = this.parent;\n if ((gObj.allowSorting || gObj.allowGrouping) && gObj.sortSettings.columns.length) {\n var columns = gObj.sortSettings.columns;\n var sortGrp = [];\n for (var i = columns.length - 1; i > -1; i--) {\n var col = this.getColumnByField(columns[i].field);\n if (col) {\n col.setSortDirection(columns[i].direction);\n }\n else {\n this.parent.log('initial_action', { moduleName: 'sort', columnName: columns[i].field });\n return query;\n }\n var fn = columns[i].direction;\n if (col.sortComparer) {\n this.parent.log('grid_sort_comparer');\n fn = !this.isRemote() ? col.sortComparer.bind(col) : columns[i].direction;\n }\n if (gObj.groupSettings.columns.indexOf(columns[i].field) === -1) {\n if (col.isForeignColumn() || col.sortComparer) {\n query.sortByForeignKey(col.field, fn, undefined, columns[i].direction.toLowerCase());\n }\n else {\n query.sortBy(col.field, fn);\n }\n }\n else {\n sortGrp.push({ direction: fn, field: col.field });\n }\n }\n for (var i = 0, len = sortGrp.length; i < len; i++) {\n if (typeof sortGrp[i].direction === 'string') {\n query.sortBy(sortGrp[i].field, sortGrp[i].direction);\n }\n else {\n var col = this.getColumnByField(sortGrp[i].field);\n query.sortByForeignKey(sortGrp[i].field, sortGrp[i].direction, undefined, col.getSortDirection().toLowerCase());\n }\n }\n }\n return query;\n };\n Data.prototype.searchQuery = function (query, fcolumn, isForeignKey) {\n var sSettings = this.parent.searchSettings;\n var fields = sSettings.fields.length ? sSettings.fields : this.getSearchColumnFieldNames();\n var predicateList = [];\n var needForeignKeySearch = false;\n if (this.parent.searchSettings.key.length) {\n needForeignKeySearch = this.parent.getForeignKeyColumns().some(function (col) { return fields.indexOf(col.field) > -1; });\n var adaptor = !isForeignKey ? this.dataManager.adaptor : fcolumn.dataSource.adaptor;\n if (needForeignKeySearch || (adaptor.getModuleName &&\n adaptor.getModuleName() === 'ODataV4Adaptor')) {\n fields = isForeignKey ? [fcolumn.foreignKeyValue] : fields;\n for (var i = 0; i < fields.length; i++) {\n var column = isForeignKey ? fcolumn : this.getColumnByField(fields[i]);\n if (column.isForeignColumn() && !isForeignKey) {\n predicateList = this.fGeneratePredicate(column, predicateList);\n }\n else {\n predicateList.push(new Predicate(fields[i], sSettings.operator, sSettings.key, sSettings.ignoreCase, sSettings.ignoreAccent));\n }\n }\n var predList = Predicate.or(predicateList);\n predList.key = sSettings.key;\n query.where(predList);\n }\n else {\n query.search(sSettings.key, fields, sSettings.operator, sSettings.ignoreCase, sSettings.ignoreAccent);\n }\n }\n return query;\n };\n Data.prototype.filterQuery = function (query, column, skipFoerign) {\n var gObj = this.parent;\n var predicateList = [];\n var actualFilter = [];\n var foreignColumn = this.parent.getForeignKeyColumns();\n var foreignColEmpty;\n if (gObj.allowFiltering && gObj.filterSettings.columns.length) {\n var columns = column ? column : gObj.filterSettings.columns;\n var colType = {};\n for (var _i = 0, _a = gObj.getColumns(); _i < _a.length; _i++) {\n var col = _a[_i];\n colType[col.field] = col.filter.type ? col.filter.type : gObj.filterSettings.type;\n }\n var foreignCols = [];\n var defaultFltrCols = [];\n for (var _b = 0, columns_1 = columns; _b < columns_1.length; _b++) {\n var col = columns_1[_b];\n var gridColumn = gObj.getColumnByField(col.field);\n if (isNullOrUndefined(col.type) && gridColumn && (gridColumn.type === 'date' || gridColumn.type === 'datetime')) {\n col.type = gObj.getColumnByField(col.field).type;\n }\n if (col.isForeignKey) {\n foreignCols.push(col);\n }\n else {\n defaultFltrCols.push(col);\n }\n }\n if (defaultFltrCols.length) {\n if (gObj.filterSettings.type === 'FilterBar' || gObj.filterSettings.type === 'Menu') {\n for (var i = 0, len = defaultFltrCols.length; i < len; i++) {\n defaultFltrCols[i].uid = defaultFltrCols[i].uid ||\n this.parent.grabColumnByFieldFromAllCols(defaultFltrCols[i].field).uid;\n }\n }\n var excelPredicate = CheckBoxFilterBase.getPredicate(defaultFltrCols);\n for (var _c = 0, _d = Object.keys(excelPredicate); _c < _d.length; _c++) {\n var prop = _d[_c];\n predicateList.push(excelPredicate[prop]);\n }\n }\n if (foreignCols.length) {\n for (var _e = 0, foreignCols_1 = foreignCols; _e < foreignCols_1.length; _e++) {\n var col = foreignCols_1[_e];\n col.uid = col.uid || this.parent.grabColumnByFieldFromAllCols(col.field).uid;\n var column_1 = this.parent.grabColumnByUidFromAllCols(col.uid);\n if (!column_1) {\n this.parent.log('initial_action', { moduleName: 'filter', columnName: col.field });\n }\n if (column_1.isForeignColumn() && getColumnByForeignKeyValue(col.field, foreignColumn) && !skipFoerign) {\n actualFilter.push(col);\n if (!column_1.columnData.length) {\n foreignColEmpty = true;\n }\n predicateList = this.fGeneratePredicate(column_1, predicateList);\n }\n else {\n var excelPredicate = CheckBoxFilterBase.getPredicate(columns);\n for (var _f = 0, _g = Object.keys(excelPredicate); _f < _g.length; _f++) {\n var prop = _g[_f];\n predicateList.push(excelPredicate[prop]);\n }\n }\n }\n }\n if (predicateList.length && !foreignColEmpty) {\n query.where(Predicate.and(predicateList));\n }\n else {\n this.parent.notify(events.showEmptyGrid, {});\n }\n }\n return query;\n };\n Data.prototype.fGeneratePredicate = function (col, predicateList) {\n var fPredicate = {};\n if (col) {\n this.parent.notify(events.generateQuery, { predicate: fPredicate, column: col });\n if (fPredicate.predicate.predicates.length) {\n predicateList.push(fPredicate.predicate);\n }\n }\n return predicateList;\n };\n /**\n * The function is used to get dataManager promise by executing given Query.\n * @param {Query} query - Defines the query which will execute along with data processing.\n * @return {Promise}\n * @hidden\n */\n Data.prototype.getData = function (args, query) {\n var _this = this;\n if (args === void 0) { args = { requestType: '' }; }\n var key = this.getKey(args.foreignKeyData &&\n Object.keys(args.foreignKeyData).length ?\n args.foreignKeyData : this.parent.getPrimaryKeyFieldNames());\n this.parent.log('datasource_syntax_mismatch', { dataState: this.parent });\n if (this.parent.dataSource && 'result' in this.parent.dataSource) {\n var def = this.eventPromise(args, query, key);\n return def.promise;\n }\n else {\n var crud = void 0;\n switch (args.requestType) {\n case 'delete':\n query = query ? query : this.generateQuery();\n var len = Object.keys(args.data).length;\n if (len === 1) {\n crud = this.dataManager.remove(key, args.data[0], query.fromTable, query);\n }\n else {\n var changes = {\n addedRecords: [],\n deletedRecords: [],\n changedRecords: []\n };\n changes.deletedRecords = args.data;\n crud = this.dataManager.saveChanges(changes, key, query.fromTable, query.requiresCount());\n }\n break;\n case 'save':\n if (isBlazor() && this.parent.isServerRendered) {\n this.parent.notify('offset', args);\n }\n query = query ? query : this.generateQuery();\n args.index = isNullOrUndefined(args.index) ? 0 : args.index;\n crud = this.dataManager.insert(args.data, query.fromTable, query, args.index);\n break;\n }\n var promise = 'promise';\n args[promise] = crud;\n if (crud && !Array.isArray(crud) && !crud.hasOwnProperty('deletedRecords')) {\n if (isBlazor()) {\n return crud.then(function (result) {\n return _this.insert(query, args);\n }).catch(function (e) {\n return null;\n });\n }\n else {\n return crud.then(function (result) {\n return _this.insert(query, args);\n });\n }\n }\n else {\n return this.insert(query, args);\n }\n }\n };\n Data.prototype.insert = function (query, args) {\n if (args.requestType === 'save') {\n this.parent.notify(events.recordAdded, args);\n }\n return this.executeQuery(query);\n };\n Data.prototype.executeQuery = function (query) {\n var _this = this;\n if (this.dataManager.ready) {\n var deferred_1 = new Deferred();\n var ready = this.dataManager.ready;\n ready.then(function (e) {\n _this.dataManager.executeQuery(query).then(function (result) {\n deferred_1.resolve(result);\n });\n }).catch(function (e) {\n deferred_1.reject(e);\n });\n return deferred_1.promise;\n }\n else {\n return this.dataManager.executeQuery(query);\n }\n };\n Data.prototype.formatGroupColumn = function (value, field) {\n var gObj = this.parent;\n var serviceLocator = this.serviceLocator;\n var column = this.getColumnByField(field);\n var date = value;\n if (!column.type) {\n column.type = date.getDay ? (date.getHours() > 0 || date.getMinutes() > 0 ||\n date.getSeconds() > 0 || date.getMilliseconds() > 0 ? 'datetime' : 'date') : typeof (value);\n }\n if (isNullOrUndefined(column.getFormatter())) {\n setFormatter(serviceLocator, column);\n }\n var formatVal = ValueFormatter.prototype.toView(value, column.getFormatter());\n return formatVal;\n };\n Data.prototype.crudActions = function (args) {\n var query = this.generateQuery();\n var promise = null;\n var pr = 'promise';\n var key = this.getKey(args.foreignKeyData &&\n Object.keys(args.foreignKeyData).length ? args.foreignKeyData :\n this.parent.getPrimaryKeyFieldNames());\n if (this.parent.dataSource && 'result' in this.parent.dataSource) {\n this.eventPromise(args, query, key);\n }\n switch (args.requestType) {\n case 'save':\n if (isBlazor() && this.parent.isServerRendered) {\n this.parent.notify('offset', args);\n }\n promise = this.dataManager.update(key, args.data, query.fromTable, query, args.previousData);\n break;\n }\n args[pr] = promise ? promise : args[pr];\n this.parent.notify(events.crudAction, args);\n };\n /** @hidden */\n Data.prototype.saveChanges = function (changes, key, original, query) {\n if (query === void 0) { query = this.generateQuery(); }\n query.requiresCount();\n if ('result' in this.parent.dataSource) {\n var state = void 0;\n state = this.getStateEventArgument(query);\n var deff = new Deferred();\n var args = {\n requestType: 'batchsave', changes: changes, key: key, query: query,\n endEdit: deff.resolve\n };\n this.setState({ isPending: true, resolver: deff.resolve });\n this.parent.trigger(events.dataSourceChanged, args);\n return deff.promise;\n }\n else {\n var changedRecords = 'changedRecords';\n var addedRecords = 'addedRecords';\n var data = 'data';\n if (isBlazor() && this.parent.isServerRendered) {\n for (var i = 0; i < changes[changedRecords].length; i++) {\n var args = { data: changes[changedRecords][i] };\n this.parent.notify('offset', args);\n changes[changedRecords][i] = args[data];\n }\n for (var i = 0; i < changes[addedRecords].length; i++) {\n var args = { data: changes[addedRecords][i] };\n this.parent.notify('offset', args);\n changes[addedRecords][i] = args[data];\n }\n }\n var promise = this.dataManager.saveChanges(changes, key, query.fromTable, query, original);\n return promise;\n }\n };\n Data.prototype.getKey = function (keys) {\n if (keys && keys.length) {\n return keys[0];\n }\n return undefined;\n };\n /** @hidden */\n Data.prototype.isRemote = function () {\n return this.dataManager.dataSource.offline !== true && this.dataManager.dataSource.url !== undefined &&\n this.dataManager.dataSource.url !== '';\n };\n Data.prototype.addRows = function (e) {\n for (var i = e.records.length; i > 0; i--) {\n this.dataManager.dataSource.json.splice(e.toIndex, 0, e.records[i - 1]);\n }\n };\n Data.prototype.removeRows = function (e) {\n var json = this.dataManager.dataSource.json;\n this.dataManager.dataSource.json = json.filter(function (value, index) { return e.records.indexOf(value) === -1; });\n };\n Data.prototype.getColumnByField = function (field) {\n var col;\n return (this.parent.columnModel).some(function (column) {\n col = column;\n return column.field === field;\n }) && col;\n };\n Data.prototype.destroy = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.rowsAdded, this.addRows);\n this.parent.off(events.rowsRemoved, this.removeRows);\n this.parent.off(events.dataSourceModified, this.initDataManager);\n this.parent.off(events.destroy, this.destroy);\n this.parent.off(events.updateData, this.crudActions);\n this.parent.off(events.addDeleteAction, this.getData);\n this.parent.off(events.autoCol, this.refreshFilteredCols);\n this.parent.off(events.columnsPrepared, this.refreshFilteredCols);\n };\n Data.prototype.getState = function () {\n return this.dataState;\n };\n Data.prototype.setState = function (state) {\n return this.dataState = state;\n };\n Data.prototype.getForeignKeyDataState = function () {\n return this.foreignKeyDataState;\n };\n Data.prototype.setForeignKeyDataState = function (state) {\n this.foreignKeyDataState = state;\n };\n Data.prototype.getStateEventArgument = function (query) {\n var adaptr = new UrlAdaptor();\n var dm = new DataManager({ url: '', adaptor: new UrlAdaptor });\n var state = adaptr.processQuery(dm, query);\n var data = JSON.parse(state.data);\n return extend(data, state.pvtData);\n };\n Data.prototype.eventPromise = function (args, query, key) {\n var _this = this;\n var state;\n var dataArgs = args;\n state = this.getStateEventArgument(query);\n var def = new Deferred();\n var deff = new Deferred();\n if (args.requestType !== undefined && this.dataState.isDataChanged !== false) {\n state.action = args;\n if (args.requestType === 'save' || args.requestType === 'delete') {\n var editArgs_1 = args;\n editArgs_1.key = key;\n var promise = 'promise';\n editArgs_1[promise] = deff.promise;\n editArgs_1.state = state;\n this.setState({ isPending: true, resolver: deff.resolve });\n dataArgs.endEdit = deff.resolve;\n dataArgs.cancelEdit = deff.reject;\n this.parent.trigger(events.dataSourceChanged, editArgs_1);\n deff.promise.then(function (e) {\n _this.setState({ isPending: true, resolver: def.resolve, group: state.group, aggregates: state.aggregates });\n if (editArgs_1.requestType === 'save') {\n _this.parent.notify(events.recordAdded, editArgs_1);\n }\n _this.parent.trigger(events.dataStateChange, state);\n })\n .catch(function () { return void 0; });\n }\n else {\n this.setState({ isPending: true, resolver: def.resolve, group: state.group, aggregates: state.aggregates });\n this.parent.trigger(events.dataStateChange, state);\n }\n }\n else {\n this.setState({});\n def.resolve(this.parent.dataSource);\n }\n return def;\n };\n /**\n * Gets the columns where searching needs to be performed from the Grid.\n * @return {string[]}\n */\n Data.prototype.getSearchColumnFieldNames = function () {\n var colFieldNames = [];\n var columns = this.parent.getColumns();\n for (var _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {\n var col = columns_2[_i];\n if (col.allowSearching && !isNullOrUndefined(col.field)) {\n colFieldNames.push(col.field);\n }\n }\n return colFieldNames;\n };\n Data.prototype.refreshFilteredCols = function () {\n if (this.parent.allowFiltering && this.parent.filterSettings.columns.length) {\n refreshFilteredColsUid(this.parent, this.parent.filterSettings.columns);\n }\n };\n return Data;\n}());\nexport { Data };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { merge, isNullOrUndefined, extend, Property } from '@syncfusion/ej2-base';\nimport { isBlazor } from '@syncfusion/ej2-base';\nimport { Query, DataUtil } from '@syncfusion/ej2-data';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { getUid, templateCompiler, getForeignData, getObject } from '../base/util';\n/**\n * Represents Grid `Column` model class.\n */\nvar Column = /** @class */ (function () {\n function Column(options, parent) {\n var _this = this;\n /**\n * If `disableHtmlEncode` is set to true, it encodes the HTML of the header and content cells.\n * @default true\n */\n this.disableHtmlEncode = true;\n /**\n * If `allowSorting` set to false, then it disables sorting option of a particular column.\n * By default all columns are sortable.\n * @default true\n */\n this.allowSorting = true;\n /**\n * If `allowResizing` is set to false, it disables resize option of a particular column.\n * By default all the columns can be resized.\n * @default true\n */\n this.allowResizing = true;\n /**\n * If `allowFiltering` set to false, then it disables filtering option and filter bar element of a particular column.\n * By default all columns are filterable.\n * @default true\n */\n this.allowFiltering = true;\n /**\n * If `allowGrouping` set to false, then it disables grouping of a particular column.\n * By default all columns are groupable.\n * @default true\n */\n this.allowGrouping = true;\n /**\n * If `allowReordering` set to false, then it disables reorder of a particular column.\n * By default all columns can be reorder.\n * @default true\n */\n this.allowReordering = true;\n /**\n * If `showColumnMenu` set to false, then it disable the column menu of a particular column.\n * By default column menu will show for all columns\n * @default true\n */\n this.showColumnMenu = true;\n /**\n * If `enableGroupByFormat` set to true, then it groups the particular column by formatted values.\n * @default true\n */\n this.enableGroupByFormat = false;\n /**\n * If `allowEditing` set to false, then it disables editing of a particular column.\n * By default all columns are editable.\n * @default true\n */\n this.allowEditing = true;\n /**\n * It is used to customize the default filter options for a specific columns.\n * * type - Specifies the filter type as menu or checkbox.\n * * ui - to render custom component for specific column it has following functions.\n * * ui.create – It is used for creating custom components.\n * * ui.read - It is used for read the value from the component.\n * * ui.write - It is used to apply component model as dynamically.\n * {% codeBlock src=\"grid/filter-menu-api/index.ts\" %}{% endcodeBlock %}\n *\n * > Check the [`Filter UI`](../../grid/filtering/#custom-component-in-filter-menu) for its customization.\n * @default {}\n */\n this.filter = {};\n /**\n * If `showInColumnChooser` set to false, then hide the particular column in column chooser.\n * By default all columns are displayed in column Chooser.\n * @default true\n */\n this.showInColumnChooser = true;\n /**\n * Defines the `IEditCell` object to customize default edit cell.\n * @default {}\n */\n this.edit = {};\n /**\n * If `allowSearching` set to false, then it disables Searching of a particular column.\n * By default all columns allow Searching.\n * @default true\n */\n this.allowSearching = true;\n /**\n * If `autoFit` set to true, then the particular column content width will be\n * adjusted based on its content in the initial rendering itself.\n * Setting this property as true is equivalent to calling `autoFitColumns` method in the `dataBound` event.\n * @default false\n */\n this.autoFit = false;\n this.sortDirection = 'Descending';\n /** @hidden */\n this.getEditTemplate = function () { return _this.editTemplateFn; };\n /** @hidden */\n this.getFilterTemplate = function () { return _this.filterTemplateFn; };\n merge(this, options);\n this.parent = parent;\n if (this.type === 'none') {\n this.type = (isBlazor() && !isNullOrUndefined(this.template) && isNullOrUndefined(this.field)) ? 'none' : null;\n }\n else if (this.type) {\n this.type = typeof (this.type) === 'string' ? this.type.toLowerCase() : undefined;\n }\n if (this.editType) {\n this.editType = this.editType.toLowerCase();\n }\n if (isNullOrUndefined(this.uid)) {\n this.uid = getUid('grid-column');\n }\n var valueFormatter = new ValueFormatter();\n if (options.format && (options.format.skeleton || options.format.format)) {\n this.setFormatter(valueFormatter.getFormatFunction(extend({}, options.format)));\n this.setParser(valueFormatter.getParserFunction(options.format));\n }\n this.toJSON = function () {\n var col = {};\n var skip = ['filter', 'dataSource', isBlazor() ? ' ' : 'headerText', 'template', 'headerTemplate', 'edit',\n 'editTemplate', 'filterTemplate', 'commandsTemplate', 'parent'];\n var keys = Object.keys(_this);\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === 'columns') {\n col[keys[i]] = [];\n for (var j = 0; j < _this[keys[i]].length; j++) {\n col[keys[i]].push(_this[keys[i]][j].toJSON());\n }\n }\n else if (skip.indexOf(keys[i]) < 0) {\n col[keys[i]] = _this[keys[i]];\n }\n }\n return col;\n };\n if (!this.field) {\n this.allowFiltering = false;\n this.allowGrouping = false;\n this.allowSorting = false;\n if (this.columns) {\n this.allowResizing = this.columns.some(function (col) {\n return col.allowResizing;\n });\n }\n }\n if (this.commands && !this.textAlign) {\n this.textAlign = 'Right';\n }\n if (this.template || this.commandsTemplate) {\n this.templateFn = templateCompiler(this.template || this.commandsTemplate);\n }\n if (this.headerTemplate) {\n this.headerTemplateFn = templateCompiler(this.headerTemplate);\n }\n if (!isNullOrUndefined(this.filter) && this.filter.itemTemplate) {\n this.fltrTemplateFn = templateCompiler(this.filter.itemTemplate);\n }\n if (this.editTemplate) {\n this.editTemplateFn = templateCompiler(this.editTemplate);\n }\n if (this.filterTemplate) {\n this.filterTemplateFn = templateCompiler(this.filterTemplate);\n }\n if (this.isForeignColumn() &&\n (isNullOrUndefined(this.editType) || this.editType === 'dropdownedit' || this.editType === 'defaultedit')) {\n this.editType = 'dropdownedit';\n this.edit.params = extend({\n dataSource: this.dataSource,\n query: new Query(), fields: { value: this.foreignKeyField || this.field, text: this.foreignKeyValue }\n }, this.edit.params);\n }\n if (this.sortComparer) {\n var a_1 = this.sortComparer;\n this.sortComparer = function comparer(x, y, xObj, yObj) {\n if (typeof a_1 === 'string') {\n a_1 = getObject(a_1, window);\n }\n if (this.sortDirection === 'Descending') {\n var z = x;\n x = y;\n y = z;\n var obj = xObj;\n xObj = yObj;\n yObj = obj;\n }\n return a_1(x, y, xObj, yObj);\n };\n }\n if (!this.sortComparer && this.isForeignColumn()) {\n this.sortComparer = function (x, y) {\n x = getObject(_this.foreignKeyValue, getForeignData(_this, {}, x)[0]);\n y = getObject(_this.foreignKeyValue, getForeignData(_this, {}, y)[0]);\n return _this.sortDirection === 'Descending' ? DataUtil.fnDescending(x, y) : DataUtil.fnAscending(x, y);\n };\n }\n }\n /** @hidden */\n Column.prototype.getSortDirection = function () {\n return this.sortDirection;\n };\n /** @hidden */\n Column.prototype.setSortDirection = function (direction) {\n this.sortDirection = direction;\n };\n /** @hidden */\n Column.prototype.getFreezeTableName = function () {\n return this.freezeTable;\n };\n /** @hidden */\n Column.prototype.setProperties = function (column) {\n //Angular two way binding\n var keys = Object.keys(column);\n for (var i = 0; i < keys.length; i++) {\n this[keys[i]] = column[keys[i]];\n //Refresh the react columnTemplates on state change\n if (this.parent && this.parent.isReact && keys[i] === 'template') {\n this.parent.refreshReactColumnTemplateByUid(this.uid);\n }\n }\n };\n /**\n * @hidden\n * It defines the column is foreign key column or not.\n */\n Column.prototype.isForeignColumn = function () {\n return !!(this.dataSource && this.foreignKeyValue);\n };\n /** @hidden */\n Column.prototype.getFormatter = function () {\n return this.formatFn;\n };\n /** @hidden */\n Column.prototype.setFormatter = function (value) {\n this.formatFn = value;\n };\n /** @hidden */\n Column.prototype.getParser = function () {\n return this.parserFn;\n };\n /** @hidden */\n Column.prototype.setParser = function (value) {\n this.parserFn = value;\n };\n /** @hidden */\n Column.prototype.getColumnTemplate = function () {\n return this.templateFn;\n };\n /** @hidden */\n Column.prototype.getHeaderTemplate = function () {\n return this.headerTemplateFn;\n };\n /** @hidden */\n Column.prototype.getFilterItemTemplate = function () {\n return this.fltrTemplateFn;\n };\n /** @hidden */\n Column.prototype.getDomSetter = function () {\n return this.disableHtmlEncode ? 'textContent' : 'innerHTML';\n };\n return Column;\n}());\nexport { Column };\n/**\n * Define options for custom command buttons.\n */\nvar CommandColumnModel = /** @class */ (function () {\n function CommandColumnModel() {\n }\n __decorate([\n Property()\n ], CommandColumnModel.prototype, \"title\", void 0);\n __decorate([\n Property()\n ], CommandColumnModel.prototype, \"type\", void 0);\n __decorate([\n Property()\n ], CommandColumnModel.prototype, \"buttonOption\", void 0);\n return CommandColumnModel;\n}());\nexport { CommandColumnModel };\n","import { Browser, EventHandler } from '@syncfusion/ej2-base';\nimport { addClass, removeClass } from '@syncfusion/ej2-base';\nimport { formatUnit, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { getScrollBarWidth, getUpdateUsingRaf } from '../base/util';\nimport { scroll, contentReady, uiUpdate, onEmpty, headerRefreshed, textWrapRefresh, virtualScrollEdit, infiniteScrollHandler, closeFilterDialog } from '../base/constant';\nimport { lazyLoadScrollHandler, checkScrollReset } from '../base/constant';\nimport { ColumnWidthService } from '../services/width-controller';\n/**\n * The `Scroll` module is used to handle scrolling behaviour.\n */\nvar Scroll = /** @class */ (function () {\n /**\n * Constructor for the Grid scrolling.\n * @hidden\n */\n function Scroll(parent) {\n this.lastScrollTop = 0;\n //To maintain scroll state on grid actions.\n this.previousValues = { top: 0, left: 0 };\n this.oneTimeReady = true;\n this.parent = parent;\n this.widthService = new ColumnWidthService(parent);\n this.addEventListener();\n }\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Scroll.prototype.getModuleName = function () {\n return 'scroll';\n };\n /**\n * @hidden\n */\n Scroll.prototype.setWidth = function (uiupdate) {\n this.parent.element.style.width = formatUnit(this.parent.width);\n if (uiupdate) {\n this.widthService.setWidthToColumns();\n }\n if (this.parent.toolbarModule && this.parent.toolbarModule.toolbar &&\n this.parent.toolbarModule.toolbar.element) {\n this.parent.toolbarModule.toolbar.refreshOverflow();\n }\n };\n /**\n * @hidden\n */\n Scroll.prototype.setHeight = function () {\n var mHdrHeight = 0;\n var content = this.parent.getContent().querySelector('.e-content');\n var height = this.parent.height;\n if (this.parent.isFrozenGrid() && this.parent.height !== 'auto' && this.parent.height.toString().indexOf('%') < 0) {\n height = parseInt(height, 10) - Scroll.getScrollBarWidth();\n }\n if (!this.parent.enableVirtualization && this.parent.frozenRows && this.parent.height !== 'auto') {\n var tbody = this.parent.getHeaderContent().querySelector('tbody');\n mHdrHeight = tbody ? tbody.offsetHeight : 0;\n if (tbody && mHdrHeight) {\n var add = tbody.querySelectorAll('.e-addedrow').length;\n var height_1 = add * this.parent.getRowHeight();\n mHdrHeight -= height_1;\n }\n content.style.height = formatUnit(height - mHdrHeight);\n }\n else {\n content.style.height = formatUnit(height);\n }\n this.ensureOverflow(content);\n if (this.parent.isFrozenGrid()) {\n this.refresh();\n }\n };\n /**\n * @hidden\n */\n Scroll.prototype.setPadding = function () {\n var content = this.parent.getHeaderContent();\n var scrollWidth = Scroll.getScrollBarWidth() - this.getThreshold();\n var cssProps = this.getCssProperties();\n var padding = this.parent.getFrozenMode() === 'Right' || this.parent.getFrozenMode() === 'Left-Right' ? '0.5px' : '1px';\n content.querySelector('.e-headercontent').style[cssProps.border] = scrollWidth > 0 ? padding : '0px';\n content.style[cssProps.padding] = scrollWidth > 0 ? scrollWidth + 'px' : '0px';\n };\n /**\n * @hidden\n */\n Scroll.prototype.removePadding = function (rtl) {\n var cssProps = this.getCssProperties(rtl);\n var hDiv = this.parent.getHeaderContent().querySelector('.e-headercontent');\n hDiv.style[cssProps.border] = '';\n hDiv.parentElement.style[cssProps.padding] = '';\n var footerDiv = this.parent.getFooterContent();\n if (footerDiv && footerDiv.classList.contains('e-footerpadding')) {\n footerDiv.classList.remove('e-footerpadding');\n }\n };\n /**\n * Refresh makes the Grid adoptable with the height of parent container.\n *\n * > The [`height`](grid/#height/) must be set to 100%.\n * @return\n */\n Scroll.prototype.refresh = function () {\n if (this.parent.height !== '100%') {\n return;\n }\n var content = this.parent.getContent();\n this.parent.element.style.height = '100%';\n var height = this.widthService.getSiblingsHeight(content);\n content.style.height = 'calc(100% - ' + height + 'px)'; //Set the height to the '.e-gridcontent';\n if (this.parent.isFrozenGrid()) {\n content.firstElementChild.style.height = 'calc(100% - ' + getScrollBarWidth() + 'px)';\n }\n };\n Scroll.prototype.getThreshold = function () {\n /* Some browsers places the scroller outside the content,\n * hence the padding should be adjusted.*/\n var appName = Browser.info.name;\n if (appName === 'mozilla') {\n return 0.5;\n }\n return 1;\n };\n /**\n * @hidden\n */\n Scroll.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(onEmpty, this.wireEvents, this);\n this.parent.on(contentReady, this.wireEvents, this);\n this.parent.on(uiUpdate, this.onPropertyChanged, this);\n this.parent.on(textWrapRefresh, this.wireEvents, this);\n this.parent.on(headerRefreshed, this.setScrollLeft, this);\n };\n /**\n * @hidden\n */\n Scroll.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(onEmpty, this.wireEvents);\n this.parent.off(contentReady, this.wireEvents);\n this.parent.off(uiUpdate, this.onPropertyChanged);\n this.parent.off(textWrapRefresh, this.wireEvents);\n this.parent.off(headerRefreshed, this.setScrollLeft);\n };\n Scroll.prototype.setScrollLeft = function () {\n if (this.parent.isFrozenGrid()) {\n this.parent.headerModule.getMovableHeader().scrollLeft = this.previousValues.left;\n }\n else {\n this.parent.getHeaderContent().querySelector('.e-headercontent').scrollLeft = this.previousValues.left;\n }\n };\n Scroll.prototype.onFrozenContentScroll = function () {\n var _this = this;\n return function (e) {\n if (_this.content.querySelector('tbody') === null || _this.parent.isPreventScrollEvent) {\n return;\n }\n if (!isNullOrUndefined(_this.parent.infiniteScrollModule) && _this.parent.enableInfiniteScrolling) {\n _this.parent.notify(infiniteScrollHandler, e);\n }\n _this.previousValues.top = e.target.scrollTop;\n };\n };\n Scroll.prototype.onContentScroll = function (scrollTarget) {\n var _this = this;\n var element = scrollTarget;\n var isHeader = element.classList.contains('e-headercontent');\n return function (e) {\n if (_this.content.querySelector('tbody') === null || _this.parent.isPreventScrollEvent) {\n return;\n }\n var target = e.target;\n var left = target.scrollLeft;\n if (!isNullOrUndefined(_this.parent.infiniteScrollModule) && _this.parent.enableInfiniteScrolling) {\n _this.parent.notify(infiniteScrollHandler, { target: e.target, isLeft: _this.previousValues.left !== left });\n }\n if (_this.parent.groupSettings.columns.length && _this.parent.groupSettings.enableLazyLoading) {\n var isDown = _this.previousValues.top < _this.parent.getContent().firstElementChild.scrollTop;\n _this.parent.notify(lazyLoadScrollHandler, { scrollDown: isDown });\n }\n _this.parent.notify(virtualScrollEdit, {});\n var sLimit = target.scrollWidth;\n var isFooter = target.classList.contains('e-summarycontent');\n if (_this.previousValues.left === left) {\n _this.previousValues.top = !isHeader ? _this.previousValues.top : target.scrollTop;\n return;\n }\n _this.parent.notify(closeFilterDialog, e);\n element.scrollLeft = left;\n if (isFooter) {\n _this.header.scrollLeft = left;\n }\n _this.previousValues.left = left;\n _this.parent.notify(scroll, { left: left });\n };\n };\n Scroll.prototype.onCustomScrollbarScroll = function (mCont, mHdr) {\n var _this = this;\n var content = mCont;\n var header = mHdr;\n return function (e) {\n if (_this.content.querySelector('tbody') === null) {\n return;\n }\n var target = e.target;\n var left = target.scrollLeft;\n if (_this.previousValues.left === left) {\n return;\n }\n content.scrollLeft = left;\n header.scrollLeft = left;\n _this.previousValues.left = left;\n _this.parent.notify(scroll, { left: left });\n if (_this.parent.isDestroyed) {\n return;\n }\n };\n };\n Scroll.prototype.onTouchScroll = function (scrollTarget) {\n var _this = this;\n var element = scrollTarget;\n return function (e) {\n if (e.pointerType === 'mouse') {\n return;\n }\n var isFrozen = _this.parent.isFrozenGrid();\n var pageXY = _this.getPointXY(e);\n var left = element.scrollLeft + (_this.pageXY.x - pageXY.x);\n var mHdr = isFrozen ?\n _this.parent.getHeaderContent().querySelector('.e-movableheader') :\n _this.parent.getHeaderContent().querySelector('.e-headercontent');\n var mCont = isFrozen ?\n _this.parent.getContent().querySelector('.e-movablecontent') :\n _this.parent.getContent().querySelector('.e-content');\n if (_this.previousValues.left === left || (left < 0 || (mHdr.scrollWidth - mHdr.clientWidth) < left)) {\n return;\n }\n e.preventDefault();\n mHdr.scrollLeft = left;\n mCont.scrollLeft = left;\n if (isFrozen) {\n var scrollBar = _this.parent.getContent().querySelector('.e-movablescrollbar');\n scrollBar.scrollLeft = left;\n }\n _this.pageXY.x = pageXY.x;\n _this.previousValues.left = left;\n };\n };\n Scroll.prototype.setPageXY = function () {\n var _this = this;\n return function (e) {\n if (e.pointerType === 'mouse') {\n return;\n }\n _this.pageXY = _this.getPointXY(e);\n };\n };\n Scroll.prototype.getPointXY = function (e) {\n var pageXY = { x: 0, y: 0 };\n if (e.touches && e.touches.length) {\n pageXY.x = e.touches[0].pageX;\n pageXY.y = e.touches[0].pageY;\n }\n else {\n pageXY.x = e.pageX;\n pageXY.y = e.pageY;\n }\n return pageXY;\n };\n Scroll.prototype.wireEvents = function () {\n var _this = this;\n if (this.oneTimeReady) {\n var frzCols = this.parent.isFrozenGrid();\n this.content = this.parent.getContent().querySelector('.e-content');\n this.header = this.parent.getHeaderContent().querySelector('.e-headercontent');\n var mCont = this.content.querySelector('.e-movablecontent');\n var fCont = this.content.querySelector('.e-frozencontent');\n var mHdr = this.header.querySelector('.e-movableheader');\n var mScrollBar = this.parent.getContent().querySelector('.e-movablescrollbar');\n if (this.parent.frozenRows) {\n EventHandler.add(frzCols ? mHdr : this.header, 'touchstart pointerdown', this.setPageXY(), this);\n EventHandler.add(frzCols ? mHdr : this.header, 'touchmove pointermove', this.onTouchScroll(frzCols ? mCont : this.content), this);\n }\n if (this.parent.isFrozenGrid()) {\n EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(mCont, mHdr), this);\n EventHandler.add(mCont, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mHdr), this);\n EventHandler.add(mHdr, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mCont), this);\n EventHandler.add(this.content, 'scroll', this.onFrozenContentScroll(), this);\n EventHandler.add(mHdr, 'touchstart pointerdown', this.setPageXY(), this);\n EventHandler.add(mHdr, 'touchmove pointermove', this.onTouchScroll(mCont), this);\n EventHandler.add(mCont, 'touchstart pointerdown', this.setPageXY(), this);\n EventHandler.add(mCont, 'touchmove pointermove', this.onTouchScroll(mHdr), this);\n }\n else {\n EventHandler.add(this.content, 'scroll', this.onContentScroll(this.header), this);\n EventHandler.add(this.header, 'scroll', this.onContentScroll(this.content), this);\n }\n if (this.parent.aggregates.length) {\n EventHandler.add(this.parent.getFooterContent().firstChild, 'scroll', this.onContentScroll(this.content), this);\n }\n this.refresh();\n this.oneTimeReady = false;\n }\n var table = this.parent.getContentTable();\n var sLeft;\n var sHeight;\n var clientHeight;\n getUpdateUsingRaf(function () {\n sLeft = _this.header.scrollLeft;\n sHeight = table.scrollHeight;\n clientHeight = _this.parent.getContent().clientHeight;\n }, function () {\n var args = { cancel: false };\n _this.parent.notify(checkScrollReset, args);\n if (!_this.parent.enableVirtualization && !_this.parent.enableInfiniteScrolling) {\n if (sHeight < clientHeight) {\n addClass(table.querySelectorAll('tr:last-child td'), 'e-lastrowcell');\n if (_this.parent.isFrozenGrid()) {\n addClass(_this.parent.getContent().querySelector('.e-movablecontent').querySelectorAll('tr:last-child td'), 'e-lastrowcell');\n }\n }\n if (!args.cancel) {\n if ((_this.parent.frozenRows > 0 || _this.parent.isFrozenGrid()) && _this.header.querySelector('.e-movableheader')) {\n _this.header.querySelector('.e-movableheader').scrollLeft = _this.previousValues.left;\n }\n else {\n _this.header.scrollLeft = _this.previousValues.left;\n }\n _this.content.scrollLeft = _this.previousValues.left;\n _this.content.scrollTop = _this.previousValues.top;\n }\n }\n if (!_this.parent.enableColumnVirtualization) {\n _this.content.scrollLeft = sLeft;\n }\n if (_this.parent.isFrozenGrid() && _this.header.querySelector('.e-movableheader')) {\n _this.header.querySelector('.e-movableheader').scrollLeft =\n _this.content.querySelector('.e-movablecontent').scrollLeft;\n }\n });\n this.parent.isPreventScrollEvent = false;\n };\n /**\n * @hidden\n */\n Scroll.prototype.getCssProperties = function (rtl) {\n var css = {};\n var enableRtl = isNullOrUndefined(rtl) ? this.parent.enableRtl : rtl;\n css.border = enableRtl ? 'borderLeftWidth' : 'borderRightWidth';\n css.padding = enableRtl ? 'paddingLeft' : 'paddingRight';\n return css;\n };\n Scroll.prototype.ensureOverflow = function (content) {\n content.style.overflowY = this.parent.height === 'auto' ? 'auto' : 'scroll';\n };\n Scroll.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n this.setPadding();\n this.oneTimeReady = true;\n if (this.parent.height === 'auto') {\n this.removePadding();\n }\n this.wireEvents();\n this.setHeight();\n var width = 'width';\n this.setWidth(!isNullOrUndefined(e.properties[width]));\n };\n /**\n * @hidden\n */\n Scroll.prototype.destroy = function () {\n var gridElement = this.parent.element;\n if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {\n return;\n }\n this.removeEventListener();\n //Remove padding\n this.removePadding();\n var cont = this.parent.getContent().querySelector('.e-content');\n removeClass([this.parent.getHeaderContent().querySelector('.e-headercontent')], 'e-headercontent');\n removeClass([cont], 'e-content');\n //Remove height\n cont.style.height = '';\n //Remove width\n this.parent.element.style.width = '';\n //Remove Dom event\n EventHandler.remove(cont, 'scroll', this.onContentScroll);\n };\n /**\n * Function to get the scrollbar width of the browser.\n * @return {number}\n * @hidden\n */\n Scroll.getScrollBarWidth = function () {\n return getScrollBarWidth();\n };\n return Scroll;\n}());\nexport { Scroll };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Row } from '../models/row';\nimport { Column } from '../models/column';\nimport { isNullOrUndefined, isBlazor } from '@syncfusion/ej2-base';\nimport { calculateAggregate, getUid } from '../base/util';\nimport { CellType } from '../base/enum';\nimport { Cell } from '../models/cell';\n/**\n * Summary row model generator\n * @hidden\n */\nvar SummaryModelGenerator = /** @class */ (function () {\n /**\n * Constructor for Summary row model generator\n */\n function SummaryModelGenerator(parent) {\n this.parent = parent;\n }\n SummaryModelGenerator.prototype.getData = function () {\n var _this = this;\n var rows = [];\n var row = this.parent.aggregates.slice();\n for (var i = 0; i < row.length; i++) {\n var columns = row[i].columns.filter(function (column) {\n return !(column.footerTemplate || column.groupFooterTemplate || column.groupCaptionTemplate)\n || _this.columnSelector(column);\n });\n if (columns.length) {\n rows.push({ columns: columns });\n }\n }\n return rows;\n };\n SummaryModelGenerator.prototype.columnSelector = function (column) {\n return column.footerTemplate !== undefined;\n };\n SummaryModelGenerator.prototype.getColumns = function (start, end) {\n var columns = [];\n if (this.parent.allowGrouping) {\n for (var i = 0; i < this.parent.groupSettings.columns.length; i++) {\n columns.push(new Column({}));\n }\n }\n if (this.parent.detailTemplate || !isNullOrUndefined(this.parent.childGrid) || (this.parent.isRowDragable() && !start)) {\n columns.push(new Column({}));\n }\n columns.push.apply(columns, this.parent.getColumns());\n end = end ? end + this.parent.getIndentCount() : end;\n return isNullOrUndefined(start) ? columns : columns.slice(start, end);\n };\n SummaryModelGenerator.prototype.generateRows = function (input, args, start, end, columns) {\n if (input.length === 0) {\n if (args === undefined || !args.count) {\n return [];\n }\n }\n var data = this.buildSummaryData(input, args);\n var rows = [];\n var row = this.getData();\n for (var i = 0; i < row.length; i++) {\n rows.push(this.getGeneratedRow(row[i], data[i], args ? args.level : undefined, start, end, args ? args.parentUid : undefined, columns));\n }\n return rows;\n };\n SummaryModelGenerator.prototype.getGeneratedRow = function (summaryRow, data, raw, start, end, parentUid, columns) {\n var tmp = [];\n var indents = this.getIndentByLevel(raw);\n var isDetailGridAlone = !isNullOrUndefined(this.parent.childGrid);\n var indentLength = this.parent.getIndentCount();\n if (this.parent.isRowDragable()) {\n indents = ['e-indentcelltop'];\n }\n var values = columns ? columns : this.getColumns(start, end);\n for (var i = 0; i < values.length; i++) {\n tmp.push(this.getGeneratedCell(values[i], summaryRow, i >= indentLength ? this.getCellType() :\n i < this.parent.groupSettings.columns.length ? CellType.Indent : CellType.DetailFooterIntent, indents[i], isDetailGridAlone));\n }\n var row = new Row({ data: data, attributes: { class: 'e-summaryrow' } });\n row.cells = tmp;\n if (isBlazor() && this.parent.isServerRendered && !isNullOrUndefined(parentUid)) {\n row.uid = this.parent.getRowUid('grid-row');\n }\n else {\n row.uid = getUid('grid-row');\n }\n row.parentUid = parentUid;\n row.visible = tmp.some(function (cell) { return cell.isDataCell && cell.visible; });\n return row;\n };\n SummaryModelGenerator.prototype.getGeneratedCell = function (column, summaryRow, cellType, indent, isDetailGridAlone) {\n //Get the summary column by display\n var sColumn = summaryRow.columns.filter(function (scolumn) { return scolumn.columnName === column.field; })[0];\n var attrs = {\n 'style': { 'textAlign': column.textAlign },\n 'e-mappinguid': column.uid, index: column.index\n };\n if (indent) {\n attrs.class = indent;\n }\n if (isNullOrUndefined(indent) && isDetailGridAlone) {\n attrs.class = 'e-detailindentcelltop';\n }\n var opt = {\n 'visible': column.visible,\n 'isDataCell': !isNullOrUndefined(sColumn),\n 'isTemplate': sColumn && !isNullOrUndefined(sColumn.footerTemplate\n || sColumn.groupFooterTemplate || sColumn.groupCaptionTemplate),\n 'column': sColumn || {},\n 'attributes': attrs,\n 'cellType': cellType\n };\n opt.column.headerText = column.headerText;\n return new Cell(opt);\n };\n SummaryModelGenerator.prototype.buildSummaryData = function (data, args) {\n var dummy = [];\n var summaryRows = this.getData();\n var single = {};\n var key = '';\n for (var i = 0; i < summaryRows.length; i++) {\n single = {};\n var column = summaryRows[i].columns;\n for (var j = 0; j < column.length; j++) {\n single = this.setTemplate(column[j], (args && args.aggregates) ? args : data, single);\n }\n dummy.push(single);\n }\n return dummy;\n };\n SummaryModelGenerator.prototype.getIndentByLevel = function (data) {\n return this.parent.groupSettings.columns.map(function () { return 'e-indentcelltop'; });\n };\n SummaryModelGenerator.prototype.setTemplate = function (column, data, single) {\n var types = column.type;\n var helper = {};\n var formatFn = column.getFormatter() || (function () { return function (a) { return a; }; })();\n var group = data;\n if (!(types instanceof Array)) {\n types = [column.type];\n }\n for (var i = 0; i < types.length; i++) {\n var key = column.field + ' - ' + types[i].toLowerCase();\n var disp = column.columnName;\n var val = types[i] !== 'Custom' && group.aggregates && key in group.aggregates ? group.aggregates[key] :\n calculateAggregate(types[i], group.aggregates ? group : data, column, this.parent);\n single[disp] = single[disp] || {};\n single[disp][key] = val;\n single[disp][types[i]] = !isNullOrUndefined(val) ? formatFn(val) : ' ';\n if (group.field) {\n single[disp].field = group.field;\n single[disp].key = group.key;\n }\n }\n helper.format = column.getFormatter();\n column.setTemplate(helper);\n return single;\n };\n SummaryModelGenerator.prototype.getCellType = function () {\n return CellType.Summary;\n };\n return SummaryModelGenerator;\n}());\nexport { SummaryModelGenerator };\nvar GroupSummaryModelGenerator = /** @class */ (function (_super) {\n __extends(GroupSummaryModelGenerator, _super);\n function GroupSummaryModelGenerator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GroupSummaryModelGenerator.prototype.columnSelector = function (column) {\n return column.groupFooterTemplate !== undefined;\n };\n GroupSummaryModelGenerator.prototype.getIndentByLevel = function (level) {\n if (level === void 0) { level = this.parent.groupSettings.columns.length; }\n return this.parent.groupSettings.columns.map(function (v, indx) { return indx <= level - 1 ? '' : 'e-indentcelltop'; });\n };\n GroupSummaryModelGenerator.prototype.getCellType = function () {\n return CellType.GroupSummary;\n };\n return GroupSummaryModelGenerator;\n}(SummaryModelGenerator));\nexport { GroupSummaryModelGenerator };\nvar CaptionSummaryModelGenerator = /** @class */ (function (_super) {\n __extends(CaptionSummaryModelGenerator, _super);\n function CaptionSummaryModelGenerator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CaptionSummaryModelGenerator.prototype.columnSelector = function (column) {\n return column.groupCaptionTemplate !== undefined;\n };\n CaptionSummaryModelGenerator.prototype.getData = function () {\n var initVal = { columns: [] };\n return [_super.prototype.getData.call(this).reduce(function (prev, cur) {\n prev.columns = prev.columns.concat(cur.columns);\n return prev;\n }, initVal)];\n };\n CaptionSummaryModelGenerator.prototype.isEmpty = function () {\n return (this.getData()[0].columns || []).length === 0;\n };\n CaptionSummaryModelGenerator.prototype.getCellType = function () {\n return CellType.CaptionSummary;\n };\n return CaptionSummaryModelGenerator;\n}(SummaryModelGenerator));\nexport { CaptionSummaryModelGenerator };\n","/**\n * AriaService\n * @hidden\n */\nvar AriaService = /** @class */ (function () {\n function AriaService() {\n }\n AriaService.prototype.setOptions = function (target, options) {\n var props = Object.keys(options);\n for (var i = 0; i < props.length; i++) {\n setStateAndProperties(target, config[props[i]], options[props[i]]);\n }\n };\n AriaService.prototype.setExpand = function (target, expand) {\n setStateAndProperties(target, config.expand, expand);\n };\n AriaService.prototype.setSort = function (target, direction) {\n setStateAndProperties(target, config.sort, direction, typeof direction === 'boolean');\n };\n AriaService.prototype.setBusy = function (target, isBusy) {\n setStateAndProperties(target, config.busy, isBusy);\n setStateAndProperties(target, config.invalid, null, true);\n };\n AriaService.prototype.setGrabbed = function (target, isGrabbed, remove) {\n setStateAndProperties(target, config.grabbed, isGrabbed, remove);\n };\n AriaService.prototype.setDropTarget = function (target, isTarget) {\n setStateAndProperties(target, config.dropeffect, 'copy', !isTarget);\n };\n return AriaService;\n}());\nexport { AriaService };\n/**\n * @hidden\n */\nfunction setStateAndProperties(target, attribute, value, remove) {\n if (remove && target) {\n target.removeAttribute(attribute);\n return;\n }\n if (target) {\n target.setAttribute(attribute, value);\n }\n}\nvar config = {\n expand: 'aria-expanded',\n role: 'role',\n selected: 'aria-selected',\n multiselectable: 'aria-multiselectable',\n sort: 'aria-sort',\n busy: 'aria-busy',\n invalid: 'aria-invalid',\n grabbed: 'aria-grabbed',\n dropeffect: 'aria-dropeffect',\n haspopup: 'aria-haspopup',\n level: 'aria-level',\n colcount: 'aria-colcount',\n rowcount: 'aria-rowcount'\n};\n","import { createElement, attributes, addClass, removeClass, detach, classList } from '@syncfusion/ej2-base';\nimport { closest, formatUnit, isNullOrUndefined, remove } from '@syncfusion/ej2-base';\nvar CLASSNAMES = {\n RTL: 'e-rtl',\n DISABLE: 'e-disabled',\n INPUT: 'e-input',\n TEXTAREA: 'e-multi-line-input',\n INPUTGROUP: 'e-input-group',\n FLOATINPUT: 'e-float-input',\n FLOATLINE: 'e-float-line',\n FLOATTEXT: 'e-float-text',\n CLEARICON: 'e-clear-icon',\n CLEARICONHIDE: 'e-clear-icon-hide',\n LABELTOP: 'e-label-top',\n LABELBOTTOM: 'e-label-bottom',\n NOFLOATLABEL: 'e-no-float-label',\n INPUTCUSTOMTAG: 'e-input-custom-tag',\n FLOATCUSTOMTAG: 'e-float-custom-tag'\n};\n/**\n * Base for Input creation through util methods.\n */\nexport var Input;\n(function (Input) {\n var privateInputObj = {\n container: null,\n buttons: [],\n clearButton: null\n };\n var floatType;\n /**\n * Create a wrapper to input element with multiple span elements and set the basic properties to input based components.\n * ```\n * E.g : Input.createInput({ element: element, floatLabelType : \"Auto\", properties: { placeholder: 'Search' } });\n * ```\n * @param args\n */\n function createInput(args, internalCreateElement) {\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n var inputObject = { container: null, buttons: [], clearButton: null };\n floatType = args.floatLabelType;\n if (isNullOrUndefined(args.floatLabelType) || args.floatLabelType === 'Never') {\n inputObject.container = createInputContainer(args, CLASSNAMES.INPUTGROUP, CLASSNAMES.INPUTCUSTOMTAG, 'span', makeElement);\n args.element.parentNode.insertBefore(inputObject.container, args.element);\n addClass([args.element], CLASSNAMES.INPUT);\n inputObject.container.appendChild(args.element);\n }\n else {\n createFloatingInput(args, inputObject, makeElement);\n }\n bindInitialEvent(args);\n if (!isNullOrUndefined(args.properties) && !isNullOrUndefined(args.properties.showClearButton) &&\n args.properties.showClearButton && args.element.tagName !== 'TEXTAREA') {\n setClearButton(args.properties.showClearButton, args.element, inputObject, true, makeElement);\n inputObject.clearButton.setAttribute('role', 'button');\n if (inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT)) {\n addClass([inputObject.container], CLASSNAMES.INPUTGROUP);\n }\n }\n if (!isNullOrUndefined(args.buttons) && args.element.tagName !== 'TEXTAREA') {\n for (var i = 0; i < args.buttons.length; i++) {\n inputObject.buttons.push(appendSpan(args.buttons[i], inputObject.container, makeElement));\n }\n }\n if (!isNullOrUndefined(args.element) && args.element.tagName === 'TEXTAREA') {\n addClass([inputObject.container], CLASSNAMES.TEXTAREA);\n }\n validateInputType(inputObject.container, args.element);\n inputObject = setPropertyValue(args, inputObject);\n privateInputObj = inputObject;\n return inputObject;\n }\n Input.createInput = createInput;\n function bindInitialEvent(args) {\n checkInputValue(args.floatLabelType, args.element);\n args.element.addEventListener('focus', function () {\n var parent = getParentNode(this);\n if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline')\n || parent.classList.contains('e-filled')) {\n parent.classList.add('e-input-focus');\n }\n });\n args.element.addEventListener('blur', function () {\n var parent = getParentNode(this);\n if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline')\n || parent.classList.contains('e-filled')) {\n parent.classList.remove('e-input-focus');\n }\n });\n args.element.addEventListener('input', function () {\n checkInputValue(floatType, args.element);\n });\n }\n Input.bindInitialEvent = bindInitialEvent;\n function checkInputValue(floatLabelType, inputElement) {\n var inputValue = inputElement.value;\n if (inputValue !== '' && !isNullOrUndefined(inputValue) && inputElement.parentElement) {\n inputElement.parentElement.classList.add('e-valid-input');\n }\n else if (floatLabelType !== 'Always' && inputElement.parentElement) {\n inputElement.parentElement.classList.remove('e-valid-input');\n }\n }\n function _focusFn() {\n var label = getParentNode(this).getElementsByClassName('e-float-text')[0];\n if (!isNullOrUndefined(label)) {\n addClass([label], CLASSNAMES.LABELTOP);\n if (label.classList.contains(CLASSNAMES.LABELBOTTOM)) {\n removeClass([label], CLASSNAMES.LABELBOTTOM);\n }\n }\n }\n function _blurFn() {\n var parent = getParentNode(this);\n if ((parent.getElementsByTagName('textarea')[0]) ? parent.getElementsByTagName('textarea')[0].value === '' :\n parent.getElementsByTagName('input')[0].value === '') {\n var label = parent.getElementsByClassName('e-float-text')[0];\n if (!isNullOrUndefined(label)) {\n if (label.classList.contains(CLASSNAMES.LABELTOP)) {\n removeClass([label], CLASSNAMES.LABELTOP);\n }\n addClass([label], CLASSNAMES.LABELBOTTOM);\n }\n }\n }\n function wireFloatingEvents(element) {\n element.addEventListener('focus', _focusFn);\n element.addEventListener('blur', _blurFn);\n }\n Input.wireFloatingEvents = wireFloatingEvents;\n function unwireFloatingEvents(element) {\n element.removeEventListener('focus', _focusFn);\n element.removeEventListener('blur', _blurFn);\n }\n function createFloatingInput(args, inputObject, internalCreateElement) {\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n var inputElement;\n var floatLinelement;\n var floatLabelElement;\n if (args.floatLabelType === 'Auto') {\n wireFloatingEvents(args.element);\n }\n if (isNullOrUndefined(inputObject.container)) {\n inputObject.container = createInputContainer(args, CLASSNAMES.FLOATINPUT, CLASSNAMES.FLOATCUSTOMTAG, 'div', makeElement);\n args.element.parentNode.insertBefore(inputObject.container, args.element);\n }\n else {\n if (!isNullOrUndefined(args.customTag)) {\n inputObject.container.classList.add(CLASSNAMES.FLOATCUSTOMTAG);\n }\n inputObject.container.classList.add(CLASSNAMES.FLOATINPUT);\n }\n floatLinelement = makeElement('span', { className: CLASSNAMES.FLOATLINE });\n floatLabelElement = makeElement('label', { className: CLASSNAMES.FLOATTEXT });\n if (!isNullOrUndefined(args.element.id) && args.element.id !== '') {\n floatLabelElement.id = 'label_' + args.element.id.replace(/ /g, '_');\n attributes(args.element, { 'aria-labelledby': floatLabelElement.id });\n }\n if (!isNullOrUndefined(args.element.placeholder) && args.element.placeholder !== '') {\n floatLabelElement.innerText = encodePlaceHolder(args.element.placeholder);\n args.element.removeAttribute('placeholder');\n }\n if (!isNullOrUndefined(args.properties) && !isNullOrUndefined(args.properties.placeholder) &&\n args.properties.placeholder !== '') {\n floatLabelElement.innerText = encodePlaceHolder(args.properties.placeholder);\n }\n if (!floatLabelElement.innerText) {\n inputObject.container.classList.add(CLASSNAMES.NOFLOATLABEL);\n }\n if (inputObject.container.classList.contains('e-float-icon-left')) {\n var inputWrap = inputObject.container.querySelector('.e-input-in-wrap');\n inputWrap.appendChild(args.element);\n inputWrap.appendChild(floatLinelement);\n inputWrap.appendChild(floatLabelElement);\n }\n else {\n inputObject.container.appendChild(args.element);\n inputObject.container.appendChild(floatLinelement);\n inputObject.container.appendChild(floatLabelElement);\n }\n updateLabelState(args.element.value, floatLabelElement);\n if (args.floatLabelType === 'Always') {\n if (floatLabelElement.classList.contains(CLASSNAMES.LABELBOTTOM)) {\n removeClass([floatLabelElement], CLASSNAMES.LABELBOTTOM);\n }\n addClass([floatLabelElement], CLASSNAMES.LABELTOP);\n }\n if (args.floatLabelType === 'Auto') {\n args.element.addEventListener('input', function (event) {\n updateLabelState(args.element.value, floatLabelElement);\n });\n args.element.addEventListener('blur', function (event) {\n updateLabelState(args.element.value, floatLabelElement);\n });\n }\n if (!isNullOrUndefined(args.element.getAttribute('id'))) {\n floatLabelElement.setAttribute('for', args.element.getAttribute('id'));\n }\n }\n function checkFloatLabelType(type, container) {\n if (type === 'Always' && container.classList.contains('e-outline')) {\n container.classList.add('e-valid-input');\n }\n }\n function setPropertyValue(args, inputObject) {\n if (!isNullOrUndefined(args.properties)) {\n for (var _i = 0, _a = Object.keys(args.properties); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'cssClass':\n setCssClass(args.properties.cssClass, [inputObject.container]);\n checkFloatLabelType(args.floatLabelType, inputObject.container);\n break;\n case 'enabled':\n setEnabled(args.properties.enabled, args.element, args.floatLabelType, inputObject.container);\n break;\n case 'enableRtl':\n setEnableRtl(args.properties.enableRtl, [inputObject.container]);\n break;\n case 'placeholder':\n setPlaceholder(args.properties.placeholder, args.element);\n break;\n case 'readonly':\n setReadonly(args.properties.readonly, args.element);\n break;\n }\n }\n }\n return inputObject;\n }\n function updateIconState(value, button) {\n if (value) {\n removeClass([button], CLASSNAMES.CLEARICONHIDE);\n }\n else {\n addClass([button], CLASSNAMES.CLEARICONHIDE);\n }\n }\n function updateLabelState(value, label) {\n if (value) {\n addClass([label], CLASSNAMES.LABELTOP);\n if (label.classList.contains(CLASSNAMES.LABELBOTTOM)) {\n removeClass([label], CLASSNAMES.LABELBOTTOM);\n }\n }\n else {\n if (label.classList.contains(CLASSNAMES.LABELTOP)) {\n removeClass([label], CLASSNAMES.LABELTOP);\n }\n addClass([label], CLASSNAMES.LABELBOTTOM);\n }\n }\n function getParentNode(element) {\n var parentNode = isNullOrUndefined(element.parentNode) ? element\n : element.parentNode;\n if (parentNode && parentNode.classList.contains('e-input-in-wrap')) {\n parentNode = parentNode.parentNode;\n }\n return parentNode;\n }\n /**\n * To create clear button.\n */\n function createClearButton(element, inputObject, initial, internalCreateElement) {\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n var button = makeElement('span', { className: CLASSNAMES.CLEARICON });\n var container = inputObject.container;\n if (!isNullOrUndefined(initial)) {\n container.appendChild(button);\n }\n else {\n var baseElement = inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT) ?\n inputObject.container.querySelector('.' + CLASSNAMES.FLOATTEXT) : element;\n baseElement.insertAdjacentElement('afterend', button);\n }\n if (!isNullOrUndefined(container) &&\n container.classList.contains(CLASSNAMES.FLOATINPUT)) {\n addClass([container], CLASSNAMES.INPUTGROUP);\n }\n addClass([button], CLASSNAMES.CLEARICONHIDE);\n wireClearBtnEvents(element, button, container);\n button.setAttribute('aria-label', 'close');\n return button;\n }\n function wireClearBtnEvents(element, button, container) {\n button.addEventListener('click', function (event) {\n if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {\n event.preventDefault();\n if (element !== document.activeElement) {\n element.focus();\n }\n element.value = '';\n addClass([button], CLASSNAMES.CLEARICONHIDE);\n }\n });\n element.addEventListener('input', function (event) {\n updateIconState(element.value, button);\n });\n element.addEventListener('focus', function (event) {\n updateIconState(element.value, button);\n });\n element.addEventListener('blur', function (event) {\n setTimeout(function () { addClass([button], CLASSNAMES.CLEARICONHIDE); }, 200);\n });\n }\n Input.wireClearBtnEvents = wireClearBtnEvents;\n function validateLabel(element, floatLabelType) {\n var parent = getParentNode(element);\n if (parent.classList.contains(CLASSNAMES.FLOATINPUT) && floatLabelType === 'Auto') {\n var label = getParentNode(element).getElementsByClassName('e-float-text')[0];\n updateLabelState(element.value, label);\n }\n }\n /**\n * To create input box contianer.\n */\n function createInputContainer(args, className, tagClass, tag, internalCreateElement) {\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n var container;\n if (!isNullOrUndefined(args.customTag)) {\n container = makeElement(args.customTag, { className: className });\n container.classList.add(tagClass);\n }\n else {\n container = makeElement(tag, { className: className });\n }\n container.classList.add('e-control-wrapper');\n return container;\n }\n function encodePlaceHolder(placeholder) {\n var result = '';\n if (!isNullOrUndefined(placeholder) && placeholder !== '') {\n var spanEle = document.createElement('span');\n spanEle.innerHTML = '';\n var hiddenInput = (spanEle.children[0]);\n result = hiddenInput.placeholder;\n }\n return result;\n }\n /**\n * Sets the value to the input element.\n * ```\n * E.g : Input.setValue('content', element, \"Auto\", true );\n * ```\n * @param value - Specify the value of the input element.\n * @param element - The element on which the specified value is updated.\n * @param floatLabelType - Specify the float label type of the input element.\n * @param clearButton - Boolean value to specify whether the clear icon is enabled / disabled on the input.\n */\n function setValue(value, element, floatLabelType, clearButton) {\n element.value = value;\n if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {\n validateLabel(element, floatLabelType);\n }\n if (!isNullOrUndefined(clearButton) && clearButton) {\n var parentElement = getParentNode(element);\n if (!isNullOrUndefined(parentElement)) {\n var button = parentElement.getElementsByClassName(CLASSNAMES.CLEARICON)[0];\n if (!isNullOrUndefined(button)) {\n if (element.value && parentElement.classList.contains('e-input-focus')) {\n removeClass([button], CLASSNAMES.CLEARICONHIDE);\n }\n else {\n addClass([button], CLASSNAMES.CLEARICONHIDE);\n }\n }\n }\n }\n checkInputValue(floatLabelType, element);\n }\n Input.setValue = setValue;\n /**\n * Sets the single or multiple cssClass to wrapper of input element.\n * ```\n * E.g : Input.setCssClass('e-custom-class', [element]);\n * ```\n * @param cssClass - Css class names which are needed to add.\n * @param elements - The elements which are needed to add / remove classes.\n * @param oldClass - Css class names which are needed to remove. If old classes are need to remove, can give this optional parameter.\n */\n function setCssClass(cssClass, elements, oldClass) {\n if (!isNullOrUndefined(oldClass) && oldClass !== '') {\n removeClass(elements, oldClass.split(' '));\n }\n if (!isNullOrUndefined(cssClass) && cssClass !== '') {\n addClass(elements, cssClass.split(' '));\n }\n }\n Input.setCssClass = setCssClass;\n /**\n * Set the width to the wrapper of input element.\n * ```\n * E.g : Input.setWidth('200px', container);\n * ```\n * @param width - Width value which is need to add.\n * @param container - The element on which the width is need to add.\n */\n function setWidth(width, container) {\n if (typeof width === 'number') {\n container.style.width = formatUnit(width);\n }\n else if (typeof width === 'string') {\n container.style.width = (width.match(/px|%|em/)) ? (width) : (formatUnit(width));\n }\n }\n Input.setWidth = setWidth;\n /**\n * Set the placeholder attribute to the input element.\n * ```\n * E.g : Input.setPlaceholder('Search here', element);\n * ```\n * @param placeholder - Placeholder value which is need to add.\n * @param element - The element on which the placeholder is need to add.\n */\n function setPlaceholder(placeholder, element) {\n var parentElement;\n placeholder = encodePlaceHolder(placeholder);\n parentElement = getParentNode(element);\n if (parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {\n if (!isNullOrUndefined(placeholder) && placeholder !== '') {\n parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = placeholder;\n parentElement.classList.remove(CLASSNAMES.NOFLOATLABEL);\n element.removeAttribute('placeholder');\n }\n else {\n parentElement.classList.add(CLASSNAMES.NOFLOATLABEL);\n parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = '';\n }\n }\n else {\n if (!isNullOrUndefined(placeholder) && placeholder !== '') {\n attributes(element, { 'placeholder': placeholder, 'aria-placeholder': placeholder });\n }\n else {\n element.removeAttribute('placeholder');\n element.removeAttribute('aria-placeholder');\n }\n }\n }\n Input.setPlaceholder = setPlaceholder;\n /**\n * Set the read only attribute to the input element\n * ```\n * E.g : Input.setReadonly(true, element);\n * ```\n * @param isReadonly\n * - Boolean value to specify whether to set read only. Setting \"True\" value enables read only.\n * @param element\n * - The element which is need to enable read only.\n */\n function setReadonly(isReadonly, element, floatLabelType) {\n if (isReadonly) {\n attributes(element, { readonly: '' });\n }\n else {\n element.removeAttribute('readonly');\n }\n if (!isNullOrUndefined(floatLabelType)) {\n validateLabel(element, floatLabelType);\n }\n }\n Input.setReadonly = setReadonly;\n /**\n * Displays the element direction from right to left when its enabled.\n * ```\n * E.g : Input.setEnableRtl(true, [inputObj.container]);\n * ```\n * @param isRtl\n * - Boolean value to specify whether to set RTL. Setting \"True\" value enables the RTL mode.\n * @param elements\n * - The elements that are needed to enable/disable RTL.\n */\n function setEnableRtl(isRtl, elements) {\n if (isRtl) {\n addClass(elements, CLASSNAMES.RTL);\n }\n else {\n removeClass(elements, CLASSNAMES.RTL);\n }\n }\n Input.setEnableRtl = setEnableRtl;\n /**\n * Enables or disables the given input element.\n * ```\n * E.g : Input.setEnabled(false, element);\n * ```\n * @param isEnable\n * - Boolean value to specify whether to enable or disable.\n * @param element\n * - Element to be enabled or disabled.\n */\n function setEnabled(isEnable, element, floatLabelType, inputContainer) {\n var disabledAttrs = { 'disabled': 'disabled', 'aria-disabled': 'true' };\n var considerWrapper = isNullOrUndefined(inputContainer) ? false : true;\n if (isEnable) {\n element.classList.remove(CLASSNAMES.DISABLE);\n removeAttributes(disabledAttrs, element);\n if (considerWrapper) {\n removeClass([inputContainer], CLASSNAMES.DISABLE);\n }\n }\n else {\n element.classList.add(CLASSNAMES.DISABLE);\n addAttributes(disabledAttrs, element);\n if (considerWrapper) {\n addClass([inputContainer], CLASSNAMES.DISABLE);\n }\n }\n if (!isNullOrUndefined(floatLabelType)) {\n validateLabel(element, floatLabelType);\n }\n }\n Input.setEnabled = setEnabled;\n function setClearButton(isClear, element, inputObject, initial, internalCreateElement) {\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n if (isClear) {\n inputObject.clearButton = createClearButton(element, inputObject, initial, makeElement);\n }\n else {\n remove(inputObject.clearButton);\n inputObject.clearButton = null;\n }\n }\n Input.setClearButton = setClearButton;\n /**\n * Removing the multiple attributes from the given element such as \"disabled\",\"id\" , etc.\n * ```\n * E.g : Input.removeAttributes({ 'disabled': 'disabled', 'aria-disabled': 'true' }, element);\n * ```\n * @param attrs\n * - Array of attributes which are need to removed from the element.\n * @param element\n * - Element on which the attributes are needed to be removed.\n */\n function removeAttributes(attrs, element) {\n for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {\n var key = _a[_i];\n var parentElement = void 0;\n parentElement = getParentNode(element);\n if (key === 'disabled') {\n element.classList.remove(CLASSNAMES.DISABLE);\n }\n if (key === 'disabled' && parentElement.classList.contains(CLASSNAMES.INPUTGROUP)) {\n parentElement.classList.remove(CLASSNAMES.DISABLE);\n }\n if (key === 'placeholder' && parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {\n parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = '';\n }\n else {\n element.removeAttribute(key);\n }\n }\n }\n Input.removeAttributes = removeAttributes;\n /**\n * Adding the multiple attributes to the given element such as \"disabled\",\"id\" , etc.\n * ```\n * E.g : Input.addAttributes({ 'id': 'inputpopup' }, element);\n * ```\n * @param attrs\n * - Array of attributes which is added to element.\n * @param element\n * - Element on which the attributes are needed to be added.\n */\n function addAttributes(attrs, element) {\n for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {\n var key = _a[_i];\n var parentElement = void 0;\n parentElement = getParentNode(element);\n if (key === 'disabled') {\n element.classList.add(CLASSNAMES.DISABLE);\n }\n if (key === 'disabled' && parentElement.classList.contains(CLASSNAMES.INPUTGROUP)) {\n parentElement.classList.add(CLASSNAMES.DISABLE);\n }\n if (key === 'placeholder' && parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {\n parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = attrs[key];\n }\n else {\n element.setAttribute(key, attrs[key]);\n }\n }\n }\n Input.addAttributes = addAttributes;\n function removeFloating(input) {\n var container = input.container;\n if (!isNullOrUndefined(container) && container.classList.contains(CLASSNAMES.FLOATINPUT)) {\n var inputEle = container.querySelector('textarea') ? container.querySelector('textarea') :\n container.querySelector('input');\n var placeholder = container.querySelector('.' + CLASSNAMES.FLOATTEXT).textContent;\n var clearButton = container.querySelector('.e-clear-icon') !== null;\n detach(container.querySelector('.' + CLASSNAMES.FLOATLINE));\n detach(container.querySelector('.' + CLASSNAMES.FLOATTEXT));\n classList(container, [CLASSNAMES.INPUTGROUP], [CLASSNAMES.FLOATINPUT]);\n unwireFloatingEvents(inputEle);\n attributes(inputEle, { 'placeholder': placeholder });\n inputEle.classList.add(CLASSNAMES.INPUT);\n if (!clearButton && inputEle.tagName === 'INPUT') {\n inputEle.removeAttribute('required');\n }\n }\n }\n Input.removeFloating = removeFloating;\n function addFloating(input, type, placeholder, internalCreateElement) {\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n var container = closest(input, '.' + CLASSNAMES.INPUTGROUP);\n floatType = type;\n if (type !== 'Never') {\n var customTag = container.tagName;\n customTag = customTag !== 'DIV' && customTag !== 'SPAN' ? customTag : null;\n var args = { element: input, floatLabelType: type, customTag: customTag, properties: { placeholder: placeholder } };\n var iconEle = container.querySelector('.e-clear-icon');\n var inputObj = { container: container };\n input.classList.remove(CLASSNAMES.INPUT);\n createFloatingInput(args, inputObj, makeElement);\n var isPrependIcon = container.classList.contains('e-float-icon-left');\n if (isNullOrUndefined(iconEle)) {\n if (isPrependIcon) {\n var inputWrap = container.querySelector('.e-input-in-wrap');\n iconEle = inputWrap.querySelector('.e-input-group-icon');\n }\n else {\n iconEle = container.querySelector('.e-input-group-icon');\n }\n }\n if (isNullOrUndefined(iconEle)) {\n if (isPrependIcon) {\n iconEle = container.querySelector('.e-input-group-icon');\n }\n if (isNullOrUndefined(iconEle)) {\n container.classList.remove(CLASSNAMES.INPUTGROUP);\n }\n }\n else {\n var floatLine = container.querySelector('.' + CLASSNAMES.FLOATLINE);\n var floatText = container.querySelector('.' + CLASSNAMES.FLOATTEXT);\n var wrapper = isPrependIcon ? container.querySelector('.e-input-in-wrap') : container;\n wrapper.insertBefore(input, iconEle);\n wrapper.insertBefore(floatLine, iconEle);\n wrapper.insertBefore(floatText, iconEle);\n }\n }\n checkFloatLabelType(type, input.parentElement);\n }\n Input.addFloating = addFloating;\n /**\n * Enable or Disable the ripple effect on the icons inside the Input. Ripple effect is only applicable for material theme.\n * ```\n * E.g : Input.setRipple(true, [inputObjects]);\n * ```\n * @param isRipple\n * - Boolean value to specify whether to enable the ripple effect.\n * @param inputObject\n * - Specify the collection of input objects.\n */\n function setRipple(isRipple, inputObj) {\n for (var i = 0; i < inputObj.length; i++) {\n _internalRipple(isRipple, inputObj[i].container);\n }\n }\n Input.setRipple = setRipple;\n function _internalRipple(isRipple, container, button) {\n var argsButton = [];\n argsButton.push(button);\n var buttons = isNullOrUndefined(button) ?\n container.querySelectorAll('.e-input-group-icon') : argsButton;\n if (isRipple && buttons.length > 0) {\n for (var index = 0; index < buttons.length; index++) {\n buttons[index].addEventListener('mousedown', _onMouseDownRipple, false);\n buttons[index].addEventListener('mouseup', _onMouseUpRipple, false);\n }\n }\n else if (buttons.length > 0) {\n for (var index = 0; index < buttons.length; index++) {\n buttons[index].removeEventListener('mousedown', _onMouseDownRipple, this);\n buttons[index].removeEventListener('mouseup', _onMouseUpRipple, this);\n }\n }\n }\n function _onMouseRipple(container, button) {\n if (!container.classList.contains('e-disabled') && !container.querySelector('input').readOnly) {\n button.classList.add('e-input-btn-ripple');\n }\n }\n function _onMouseDownRipple() {\n var ele = this;\n var parentEle = this.parentElement;\n while (!parentEle.classList.contains('e-input-group')) {\n parentEle = parentEle.parentElement;\n }\n _onMouseRipple(parentEle, ele);\n }\n function _onMouseUpRipple() {\n var ele = this;\n setTimeout(function () { ele.classList.remove('e-input-btn-ripple'); }, 500);\n }\n function createIconEle(iconClass, makeElement) {\n var button = makeElement('span', { className: iconClass });\n button.classList.add('e-input-group-icon');\n return button;\n }\n /**\n * Creates a new span element with the given icons added and append it in container element.\n * ```\n * E.g : Input.addIcon('append', 'e-icon-spin', inputObj.container, inputElement);\n * ```\n * @param position - Specify the icon placement on the input.Possible values are append and prepend.\n * @param iconClass - Icon classes which are need to add to the span element which is going to created.\n * Span element acts as icon or button element for input.\n * @param container - The container on which created span element is going to append.\n * @param inputElement - The inputElement on which created span element is going to prepend.\n */\n // tslint:disable\n function addIcon(position, icons, container, input, internalCreate) {\n // tslint:enable\n var result = typeof (icons) === 'string' ? icons.split(',')\n : icons;\n if (position.toLowerCase() === 'append') {\n for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {\n var icon = result_1[_i];\n appendSpan(icon, container, internalCreate);\n }\n }\n else {\n for (var _a = 0, result_2 = result; _a < result_2.length; _a++) {\n var icon = result_2[_a];\n prependSpan(icon, container, input, internalCreate);\n }\n }\n }\n Input.addIcon = addIcon;\n /**\n * Creates a new span element with the given icons added and prepend it in input element.\n * ```\n * E.g : Input.prependSpan('e-icon-spin', inputObj.container, inputElement);\n * ```\n * @param iconClass - Icon classes which are need to add to the span element which is going to created.\n * Span element acts as icon or button element for input.\n * @param container - The container on which created span element is going to append.\n * @param inputElement - The inputElement on which created span element is going to prepend.\n */\n // tslint:disable\n function prependSpan(iconClass, container, inputElement, internalCreateElement) {\n // tslint:enable\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n var button = createIconEle(iconClass, makeElement);\n container.classList.add('e-float-icon-left');\n var innerWrapper = container.querySelector('.e-input-in-wrap');\n if (isNullOrUndefined(innerWrapper)) {\n innerWrapper = makeElement('span', { className: 'e-input-in-wrap' });\n inputElement.parentNode.insertBefore(innerWrapper, inputElement);\n var result = container.querySelectorAll(inputElement.tagName + ' ~ *');\n innerWrapper.appendChild(inputElement);\n for (var i = 0; i < result.length; i++) {\n innerWrapper.appendChild(result[i]);\n }\n }\n innerWrapper.parentNode.insertBefore(button, innerWrapper);\n if (!container.classList.contains(CLASSNAMES.INPUTGROUP)) {\n container.classList.add(CLASSNAMES.INPUTGROUP);\n }\n _internalRipple(true, container, button);\n return button;\n }\n Input.prependSpan = prependSpan;\n /**\n * Creates a new span element with the given icons added and append it in container element.\n * ```\n * E.g : Input.appendSpan('e-icon-spin', inputObj.container);\n * ```\n * @param iconClass - Icon classes which are need to add to the span element which is going to created.\n * Span element acts as icon or button element for input.\n * @param container - The container on which created span element is going to append.\n */\n function appendSpan(iconClass, container, internalCreateElement) {\n var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;\n var button = createIconEle(iconClass, makeElement);\n if (!container.classList.contains(CLASSNAMES.INPUTGROUP)) {\n container.classList.add(CLASSNAMES.INPUTGROUP);\n }\n var wrap = (container.classList.contains('e-float-icon-left')) ? container.querySelector('.e-input-in-wrap') :\n container;\n wrap.appendChild(button);\n _internalRipple(true, container, button);\n return button;\n }\n Input.appendSpan = appendSpan;\n function validateInputType(containerElement, input) {\n if (input.type === 'hidden') {\n containerElement.classList.add('e-hidden');\n }\n else if (containerElement.classList.contains('e-hidden')) {\n containerElement.classList.remove('e-hidden');\n }\n }\n Input.validateInputType = validateInputType;\n})(Input || (Input = {}));\n","import { Ajax } from '@syncfusion/ej2-base';\nimport { extend, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { DataUtil } from './util';\nimport { Query } from './query';\nimport { ODataAdaptor, JsonAdaptor, CacheAdaptor, RemoteSaveAdaptor, AjaxAdaptor } from './adaptors';\n/**\n * DataManager is used to manage and manipulate relational data.\n */\nvar DataManager = /** @class */ (function () {\n /**\n * Constructor for DataManager class\n * @param {DataOptions|JSON[]} dataSource?\n * @param {Query} query?\n * @param {AdaptorOptions|string} adaptor?\n * @hidden\n */\n function DataManager(dataSource, query, adaptor) {\n var _this = this;\n /** @hidden */\n this.dateParse = true;\n /** @hidden */\n this.timeZoneHandling = true;\n this.requests = [];\n if (!dataSource && !this.dataSource) {\n dataSource = [];\n }\n adaptor = adaptor || dataSource.adaptor;\n if (dataSource && dataSource.timeZoneHandling === false) {\n this.timeZoneHandling = dataSource.timeZoneHandling;\n }\n var data;\n if (dataSource instanceof Array) {\n data = {\n json: dataSource,\n offline: true\n };\n }\n else if (typeof dataSource === 'object') {\n if (!dataSource.json) {\n dataSource.json = [];\n }\n data = {\n url: dataSource.url,\n insertUrl: dataSource.insertUrl,\n removeUrl: dataSource.removeUrl,\n updateUrl: dataSource.updateUrl,\n crudUrl: dataSource.crudUrl,\n batchUrl: dataSource.batchUrl,\n json: dataSource.json,\n headers: dataSource.headers,\n accept: dataSource.accept,\n data: dataSource.data,\n timeTillExpiration: dataSource.timeTillExpiration,\n cachingPageSize: dataSource.cachingPageSize,\n enableCaching: dataSource.enableCaching,\n requestType: dataSource.requestType,\n key: dataSource.key,\n crossDomain: dataSource.crossDomain,\n jsonp: dataSource.jsonp,\n dataType: dataSource.dataType,\n offline: dataSource.offline !== undefined ? dataSource.offline\n : dataSource.adaptor instanceof RemoteSaveAdaptor || dataSource.adaptor instanceof AjaxAdaptor ?\n false : dataSource.url ? false : true,\n requiresFormat: dataSource.requiresFormat\n };\n }\n else {\n DataUtil.throwError('DataManager: Invalid arguments');\n }\n if (data.requiresFormat === undefined && !DataUtil.isCors()) {\n data.requiresFormat = isNullOrUndefined(data.crossDomain) ? true : data.crossDomain;\n }\n if (data.dataType === undefined) {\n data.dataType = 'json';\n }\n this.dataSource = data;\n this.defaultQuery = query;\n if (data.url && data.offline && !data.json.length) {\n this.isDataAvailable = false;\n this.adaptor = adaptor || new ODataAdaptor();\n this.dataSource.offline = false;\n this.ready = this.executeQuery(query || new Query());\n this.ready.then(function (e) {\n _this.dataSource.offline = true;\n _this.isDataAvailable = true;\n data.json = e.result;\n _this.adaptor = new JsonAdaptor();\n });\n }\n else {\n this.adaptor = data.offline ? new JsonAdaptor() : new ODataAdaptor();\n }\n if (!data.jsonp && this.adaptor instanceof ODataAdaptor) {\n data.jsonp = 'callback';\n }\n this.adaptor = adaptor || this.adaptor;\n if (data.enableCaching) {\n this.adaptor = new CacheAdaptor(this.adaptor, data.timeTillExpiration, data.cachingPageSize);\n }\n return this;\n }\n /**\n * Overrides DataManager's default query with given query.\n * @param {Query} query - Defines the new default query.\n */\n DataManager.prototype.setDefaultQuery = function (query) {\n this.defaultQuery = query;\n return this;\n };\n /**\n * Executes the given query with local data source.\n * @param {Query} query - Defines the query to retrieve data.\n */\n DataManager.prototype.executeLocal = function (query) {\n if (!this.defaultQuery && !(query instanceof Query)) {\n DataUtil.throwError('DataManager - executeLocal() : A query is required to execute');\n }\n if (!this.dataSource.json) {\n DataUtil.throwError('DataManager - executeLocal() : Json data is required to execute');\n }\n query = query || this.defaultQuery;\n var result = this.adaptor.processQuery(this, query);\n if (query.subQuery) {\n var from = query.subQuery.fromTable;\n var lookup = query.subQuery.lookups;\n var res = query.isCountRequired ? result.result :\n result;\n if (lookup && lookup instanceof Array) {\n DataUtil.buildHierarchy(query.subQuery.fKey, from, res, lookup, query.subQuery.key);\n }\n for (var j = 0; j < res.length; j++) {\n if (res[j][from] instanceof Array) {\n res[j] = extend({}, {}, res[j]);\n res[j][from] = this.adaptor.processResponse(query.subQuery.using(new DataManager(res[j][from].slice(0))).executeLocal(), this, query);\n }\n }\n }\n return this.adaptor.processResponse(result, this, query);\n };\n /**\n * Executes the given query with either local or remote data source.\n * It will be executed as asynchronously and returns Promise object which will be resolved or rejected after action completed.\n * @param {Query|Function} query - Defines the query to retrieve data.\n * @param {Function} done - Defines the callback function and triggers when the Promise is resolved.\n * @param {Function} fail - Defines the callback function and triggers when the Promise is rejected.\n * @param {Function} always - Defines the callback function and triggers when the Promise is resolved or rejected.\n */\n DataManager.prototype.executeQuery = function (query, done, fail, always) {\n var _this = this;\n var makeRequest = 'makeRequest';\n if (typeof query === 'function') {\n always = fail;\n fail = done;\n done = query;\n query = null;\n }\n if (!query) {\n query = this.defaultQuery;\n }\n if (!(query instanceof Query)) {\n DataUtil.throwError('DataManager - executeQuery() : A query is required to execute');\n }\n var deffered = new Deferred();\n var args = { query: query };\n if (!this.dataSource.offline && (this.dataSource.url !== undefined && this.dataSource.url !== '')\n || (!isNullOrUndefined(this.adaptor[makeRequest])) || this.isAjaxAdaptor(this.adaptor)) {\n var result = this.adaptor.processQuery(this, query);\n if (!isNullOrUndefined(this.adaptor[makeRequest])) {\n this.adaptor[makeRequest](result, deffered, args, query);\n }\n else if (!isNullOrUndefined(result.url) || this.isAjaxAdaptor(this.adaptor)) {\n this.makeRequest(result, deffered, args, query);\n }\n else {\n args = DataManager.getDeferedArgs(query, result, args);\n deffered.resolve(args);\n }\n }\n else {\n DataManager.nextTick(function () {\n var res = _this.executeLocal(query);\n args = DataManager.getDeferedArgs(query, res, args);\n deffered.resolve(args);\n });\n }\n if (done || fail) {\n deffered.promise.then(done, fail);\n }\n if (always) {\n deffered.promise.then(always, always);\n }\n return deffered.promise;\n };\n DataManager.getDeferedArgs = function (query, result, args) {\n if (query.isCountRequired) {\n args.result = result.result;\n args.count = result.count;\n args.aggregates = result.aggregates;\n }\n else {\n args.result = result;\n }\n return args;\n };\n DataManager.nextTick = function (fn) {\n (window.setImmediate || window.setTimeout)(fn, 0);\n };\n DataManager.prototype.extendRequest = function (url, fnSuccess, fnFail) {\n return extend({}, {\n type: 'GET',\n dataType: this.dataSource.dataType,\n crossDomain: this.dataSource.crossDomain,\n jsonp: this.dataSource.jsonp,\n cache: true,\n processData: false,\n onSuccess: fnSuccess,\n onFailure: fnFail\n }, url);\n };\n // tslint:disable-next-line:max-func-body-length\n DataManager.prototype.makeRequest = function (url, deffered, args, query) {\n var _this = this;\n var isSelector = !!query.subQuerySelector;\n var fnFail = function (e) {\n args.error = e;\n deffered.reject(args);\n };\n var process = function (data, count, xhr, request, actual, aggregates, virtualSelectRecords) {\n args.xhr = xhr;\n args.count = count ? parseInt(count.toString(), 10) : 0;\n args.result = data;\n args.request = request;\n args.aggregates = aggregates;\n args.actual = actual;\n args.virtualSelectRecords = virtualSelectRecords;\n deffered.resolve(args);\n };\n var fnQueryChild = function (data, selector) {\n var subDeffer = new Deferred();\n var childArgs = { parent: args };\n query.subQuery.isChild = true;\n var subUrl = _this.adaptor.processQuery(_this, query.subQuery, data ? _this.adaptor.processResponse(data) : selector);\n var childReq = _this.makeRequest(subUrl, subDeffer, childArgs, query.subQuery);\n if (!isSelector) {\n subDeffer.then(function (subData) {\n if (data) {\n DataUtil.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, data, subData, query.subQuery.key);\n process(data, subData.count, subData.xhr);\n }\n }, fnFail);\n }\n return childReq;\n };\n var fnSuccess = function (data, request) {\n if (_this.isAjaxAdaptor(_this.adaptor)) {\n request = extend({}, _this.ajaxReqOption, request);\n }\n if (request.httpRequest.getResponseHeader('Content-Type').indexOf('xml') === -1 && _this.dateParse) {\n data = DataUtil.parse.parseJson(data);\n }\n var result = _this.adaptor.processResponse(data, _this, query, request.httpRequest, request);\n var count = 0;\n var aggregates = null;\n var virtualSelectRecords = 'virtualSelectRecords';\n var virtualRecords = data[virtualSelectRecords];\n if (query.isCountRequired) {\n count = result.count;\n aggregates = result.aggregates;\n result = result.result;\n }\n if (!query.subQuery) {\n process(result, count, request.httpRequest, request.type, data, aggregates, virtualRecords);\n return;\n }\n if (!isSelector) {\n fnQueryChild(result, request);\n }\n };\n var req = this.extendRequest(url, fnSuccess, fnFail);\n if (!this.isAjaxAdaptor(this.adaptor)) {\n var ajax_1 = new Ajax(req);\n ajax_1.beforeSend = function () {\n _this.beforeSend(ajax_1.httpRequest, ajax_1);\n };\n req = ajax_1.send();\n req.catch(function (e) { return true; }); // to handle failure remote requests. \n this.requests.push(ajax_1);\n }\n else {\n this.ajaxReqOption = req;\n var request = req;\n this.adaptor.options.getData({\n data: request.data,\n onSuccess: request.onSuccess, onFailure: request.onFailure\n });\n }\n if (isSelector) {\n var promise = void 0;\n var res = query.subQuerySelector.call(this, { query: query.subQuery, parent: query });\n if (res && res.length) {\n promise = Promise.all([req, fnQueryChild(null, res)]);\n promise.then(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var result = args[0];\n var pResult = _this.adaptor.processResponse(result[0], _this, query, _this.requests[0].httpRequest, _this.requests[0]);\n var count = 0;\n if (query.isCountRequired) {\n count = pResult.count;\n pResult = pResult.result;\n }\n var cResult = _this.adaptor.processResponse(result[1], _this, query.subQuery, _this.requests[1].httpRequest, _this.requests[1]);\n count = 0;\n if (query.subQuery.isCountRequired) {\n count = cResult.count;\n cResult = cResult.result;\n }\n DataUtil.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, pResult, cResult, query.subQuery.key);\n isSelector = false;\n process(pResult, count, _this.requests[0].httpRequest);\n });\n }\n else {\n isSelector = false;\n }\n }\n return req;\n };\n DataManager.prototype.beforeSend = function (request, settings) {\n this.adaptor.beforeSend(this, request, settings);\n var headers = this.dataSource.headers;\n var props;\n for (var i = 0; headers && i < headers.length; i++) {\n props = [];\n var keys = Object.keys(headers[i]);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var prop = keys_1[_i];\n props.push(prop);\n request.setRequestHeader(prop, headers[i][prop]);\n }\n }\n };\n /**\n * Save bulk changes to the given table name.\n * User can add a new record, edit an existing record, and delete a record at the same time.\n * If the datasource from remote, then updated in a single post.\n * @param {Object} changes - Defines the CrudOptions.\n * @param {string} key - Defines the column field.\n * @param {string|Query} tableName - Defines the table name.\n * @param {Query} query - Sets default query for the DataManager.\n */\n DataManager.prototype.saveChanges = function (changes, key, tableName, query, original) {\n var _this = this;\n if (tableName instanceof Query) {\n query = tableName;\n tableName = null;\n }\n var args = {\n url: tableName,\n key: key || this.dataSource.key\n };\n var req = this.adaptor.batchRequest(this, changes, args, query || new Query(), original);\n var doAjaxRequest = 'doAjaxRequest';\n if (this.dataSource.offline) {\n return req;\n }\n if (!isNullOrUndefined(this.adaptor[doAjaxRequest])) {\n return this.adaptor[doAjaxRequest](req);\n }\n else if (!this.isAjaxAdaptor(this.adaptor)) {\n var deff_1 = new Deferred();\n var ajax_2 = new Ajax(req);\n ajax_2.beforeSend = function () {\n _this.beforeSend(ajax_2.httpRequest, ajax_2);\n };\n ajax_2.onSuccess = function (data, request) {\n deff_1.resolve(_this.adaptor.processResponse(data, _this, null, request.httpRequest, request, changes, args));\n };\n ajax_2.onFailure = function (e) {\n deff_1.reject([{ error: e }]);\n };\n ajax_2.send().catch(function (e) { return true; }); // to handle the failure requests. \n return deff_1.promise;\n }\n else {\n return this.doAjaxRequest(req, this.adaptor.options.batchUpdate);\n }\n };\n /**\n * Inserts new record in the given table.\n * @param {Object} data - Defines the data to insert.\n * @param {string|Query} tableName - Defines the table name.\n * @param {Query} query - Sets default query for the DataManager.\n */\n DataManager.prototype.insert = function (data, tableName, query, position) {\n if (tableName instanceof Query) {\n query = tableName;\n tableName = null;\n }\n var req = this.adaptor.insert(this, data, tableName, query, position);\n var doAjaxRequest = 'doAjaxRequest';\n if (this.dataSource.offline) {\n return req;\n }\n if (!isNullOrUndefined(this.adaptor[doAjaxRequest])) {\n return this.adaptor[doAjaxRequest](req);\n }\n else {\n return this.doAjaxRequest(req, this.adaptor.options.addRecord);\n }\n };\n /**\n * Removes data from the table with the given key.\n * @param {string} keyField - Defines the column field.\n * @param {Object} value - Defines the value to find the data in the specified column.\n * @param {string|Query} tableName - Defines the table name\n * @param {Query} query - Sets default query for the DataManager.\n */\n DataManager.prototype.remove = function (keyField, value, tableName, query) {\n if (typeof value === 'object') {\n value = DataUtil.getObject(keyField, value);\n }\n if (tableName instanceof Query) {\n query = tableName;\n tableName = null;\n }\n var res = this.adaptor.remove(this, keyField, value, tableName, query);\n var doAjaxRequest = 'doAjaxRequest';\n if (this.dataSource.offline) {\n return res;\n }\n if (!isNullOrUndefined(this.adaptor[doAjaxRequest])) {\n return this.adaptor[doAjaxRequest](res);\n }\n else {\n var remove = this.adaptor.options.deleteRecord;\n return this.doAjaxRequest(res, remove);\n }\n };\n /**\n * Updates existing record in the given table.\n * @param {string} keyField - Defines the column field.\n * @param {Object} value - Defines the value to find the data in the specified column.\n * @param {string|Query} tableName - Defines the table name\n * @param {Query} query - Sets default query for the DataManager.\n */\n DataManager.prototype.update = function (keyField, value, tableName, query, original) {\n if (tableName instanceof Query) {\n query = tableName;\n tableName = null;\n }\n var res = this.adaptor.update(this, keyField, value, tableName, query, original);\n var doAjaxRequest = 'doAjaxRequest';\n if (this.dataSource.offline) {\n return res;\n }\n if (!isNullOrUndefined(this.adaptor[doAjaxRequest])) {\n return this.adaptor[doAjaxRequest](res);\n }\n else {\n var update = this.adaptor.options.updateRecord;\n return this.doAjaxRequest(res, update);\n }\n };\n DataManager.prototype.isAjaxAdaptor = function (dataSource) {\n return this.adaptor.getModuleName &&\n this.adaptor.getModuleName() === 'AjaxAdaptor';\n };\n DataManager.prototype.successFunc = function (record, request) {\n if (this.isAjaxAdaptor(this.adaptor)) {\n request = extend({}, this.ajaxReqOption, request);\n }\n try {\n DataUtil.parse.parseJson(record);\n }\n catch (e) {\n record = [];\n }\n record = this.adaptor.processResponse(DataUtil.parse.parseJson(record), this, null, request.httpRequest, request);\n this.ajaxDeffered.resolve(record);\n };\n ;\n DataManager.prototype.failureFunc = function (e) {\n this.ajaxDeffered.reject([{ error: e }]);\n };\n ;\n DataManager.prototype.doAjaxRequest = function (res, ajaxFunc) {\n var _this = this;\n res = extend({}, {\n type: 'POST',\n contentType: 'application/json; charset=utf-8',\n processData: false\n }, res);\n this.ajaxDeffered = new Deferred();\n if (!this.isAjaxAdaptor(this.adaptor)) {\n var ajax_3 = new Ajax(res);\n ajax_3.beforeSend = function () {\n _this.beforeSend(ajax_3.httpRequest, ajax_3);\n };\n ajax_3.onSuccess = this.successFunc.bind(this);\n ajax_3.onFailure = this.failureFunc.bind(this);\n ajax_3.send().catch(function (e) { return true; }); // to handle the failure requests.\n }\n else {\n this.ajaxReqOption = res;\n ajaxFunc.call(this, {\n data: res.data, onSuccess: this.successFunc.bind(this),\n onFailure: this.failureFunc.bind(this)\n });\n }\n return this.ajaxDeffered.promise;\n };\n return DataManager;\n}());\nexport { DataManager };\n/**\n * Deferred is used to handle asynchronous operation.\n */\nvar Deferred = /** @class */ (function () {\n function Deferred() {\n var _this = this;\n /**\n * Promise is an object that represents a value that may not be available yet, but will be resolved at some point in the future.\n */\n this.promise = new Promise(function (resolve, reject) {\n _this.resolve = resolve;\n _this.reject = reject;\n });\n /**\n * Defines the callback function triggers when the Deferred object is resolved.\n */\n this.then = this.promise.then.bind(this.promise);\n /**\n * Defines the callback function triggers when the Deferred object is rejected.\n */\n this.catch = this.promise.catch.bind(this.promise);\n }\n return Deferred;\n}());\nexport { Deferred };\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./QuickBalancing.vue?vue&type=style&index=0&id=0bfa750c&prod&lang=scss\"","/**\n * Collision module.\n */\nimport { calculatePosition } from './position';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nvar parentDocument;\nvar targetContainer;\nexport function fit(element, viewPortElement, axis, position) {\n if (viewPortElement === void 0) { viewPortElement = null; }\n if (axis === void 0) { axis = { X: false, Y: false }; }\n if (!axis.Y && !axis.X) {\n return { left: 0, top: 0 };\n }\n var elemData = element.getBoundingClientRect();\n targetContainer = viewPortElement;\n parentDocument = element.ownerDocument;\n if (!position) {\n position = calculatePosition(element, 'left', 'top');\n }\n if (axis.X) {\n var containerWidth = targetContainer ? getTargetContainerWidth() : getViewPortWidth();\n var containerLeft = ContainerLeft();\n var containerRight = ContainerRight();\n var overLeft = containerLeft - position.left;\n var overRight = position.left + elemData.width - containerRight;\n if (elemData.width > containerWidth) {\n if (overLeft > 0 && overRight <= 0) {\n position.left = containerRight - elemData.width;\n }\n else if (overRight > 0 && overLeft <= 0) {\n position.left = containerLeft;\n }\n else {\n position.left = overLeft > overRight ? (containerRight - elemData.width) : containerLeft;\n }\n }\n else if (overLeft > 0) {\n position.left += overLeft;\n }\n else if (overRight > 0) {\n position.left -= overRight;\n }\n }\n if (axis.Y) {\n var containerHeight = targetContainer ? getTargetContainerHeight() : getViewPortHeight();\n var containerTop = ContainerTop();\n var containerBottom = ContainerBottom();\n var overTop = containerTop - position.top;\n var overBottom = position.top + elemData.height - containerBottom;\n if (elemData.height > containerHeight) {\n if (overTop > 0 && overBottom <= 0) {\n position.top = containerBottom - elemData.height;\n }\n else if (overBottom > 0 && overTop <= 0) {\n position.top = containerTop;\n }\n else {\n position.top = overTop > overBottom ? (containerBottom - elemData.height) : containerTop;\n }\n }\n else if (overTop > 0) {\n position.top += overTop;\n }\n else if (overBottom > 0) {\n position.top -= overBottom;\n }\n }\n return position;\n}\nexport function isCollide(element, viewPortElement, x, y) {\n if (viewPortElement === void 0) { viewPortElement = null; }\n var elemOffset = calculatePosition(element, 'left', 'top');\n if (x) {\n elemOffset.left = x;\n }\n if (y) {\n elemOffset.top = y;\n }\n var data = [];\n targetContainer = viewPortElement;\n parentDocument = element.ownerDocument;\n var elementRect = element.getBoundingClientRect();\n var top = elemOffset.top;\n var left = elemOffset.left;\n var right = elemOffset.left + elementRect.width;\n var bottom = elemOffset.top + elementRect.height;\n var topData = '';\n var leftData = '';\n var yAxis = topCollideCheck(top, bottom);\n var xAxis = leftCollideCheck(left, right);\n if (yAxis.topSide) {\n data.push('top');\n }\n if (xAxis.rightSide) {\n data.push('right');\n }\n if (xAxis.leftSide) {\n data.push('left');\n }\n if (yAxis.bottomSide) {\n data.push('bottom');\n }\n return data;\n}\nexport function flip(element, target, offsetX, offsetY, positionX, positionY, viewPortElement, axis, fixedParent) {\n if (viewPortElement === void 0) { viewPortElement = null; }\n if (axis === void 0) { axis = { X: true, Y: true }; }\n if (!target || !element || !positionX || !positionY || (!axis.X && !axis.Y)) {\n return;\n }\n var tEdge = { TL: null,\n TR: null,\n BL: null,\n BR: null };\n var eEdge = {\n TL: null,\n TR: null,\n BL: null,\n BR: null\n };\n var oldVisibility = element.style.visibility;\n element.style.visibility = 'hidden';\n element.style.display = 'block';\n var elementRect = element.getBoundingClientRect();\n element.style.removeProperty('display');\n element.style.visibility = oldVisibility;\n var pos = {\n posX: positionX, posY: positionY, offsetX: offsetX, offsetY: offsetY, position: { left: 0, top: 0 }\n };\n targetContainer = viewPortElement;\n parentDocument = target.ownerDocument;\n updateElementData(target, tEdge, pos, fixedParent, elementRect);\n setPosition(eEdge, pos, elementRect);\n if (axis.X) {\n leftFlip(target, eEdge, tEdge, pos, elementRect, true);\n }\n if (axis.Y && tEdge.TL.top > -1) {\n topFlip(target, eEdge, tEdge, pos, elementRect, true);\n }\n setPopup(element, pos, elementRect);\n}\nfunction setPopup(element, pos, elementRect) {\n var left = 0;\n var top = 0;\n if (element.offsetParent != null\n && (getComputedStyle(element.offsetParent).position === 'absolute' ||\n getComputedStyle(element.offsetParent).position === 'relative')) {\n var data = calculatePosition(element.offsetParent, 'left', 'top', false, elementRect);\n left = data.left;\n top = data.top;\n }\n element.style.top = (pos.position.top + pos.offsetY - (top)) + 'px';\n element.style.left = (pos.position.left + pos.offsetX - (left)) + 'px';\n}\nfunction updateElementData(target, edge, pos, fixedParent, elementRect) {\n pos.position = calculatePosition(target, pos.posX, pos.posY, fixedParent, elementRect);\n edge.TL = calculatePosition(target, 'left', 'top', fixedParent, elementRect);\n edge.TR = calculatePosition(target, 'right', 'top', fixedParent, elementRect);\n edge.BR = calculatePosition(target, 'left', 'bottom', fixedParent, elementRect);\n edge.BL = calculatePosition(target, 'right', 'bottom', fixedParent, elementRect);\n}\nfunction setPosition(eStatus, pos, elementRect) {\n eStatus.TL = { top: pos.position.top + pos.offsetY, left: pos.position.left + pos.offsetX };\n eStatus.TR = { top: eStatus.TL.top, left: eStatus.TL.left + elementRect.width };\n eStatus.BL = { top: eStatus.TL.top + elementRect.height,\n left: eStatus.TL.left };\n eStatus.BR = { top: eStatus.TL.top + elementRect.height,\n left: eStatus.TL.left + elementRect.width };\n}\nfunction leftCollideCheck(left, right) {\n var leftSide = false;\n var rightSide = false;\n if (((left - getBodyScrollLeft()) < ContainerLeft())) {\n leftSide = true;\n }\n if (right > ContainerRight()) {\n rightSide = true;\n }\n return { leftSide: leftSide, rightSide: rightSide };\n}\nfunction leftFlip(target, edge, tEdge, pos, elementRect, deepCheck) {\n var collideSide = leftCollideCheck(edge.TL.left, edge.TR.left);\n if ((tEdge.TL.left - getBodyScrollLeft()) <= ContainerLeft()) {\n collideSide.leftSide = false;\n }\n if (tEdge.TR.left >= ContainerRight()) {\n collideSide.rightSide = false;\n }\n if ((collideSide.leftSide && !collideSide.rightSide) || (!collideSide.leftSide && collideSide.rightSide)) {\n if (pos.posX === 'right') {\n pos.posX = 'left';\n }\n else {\n pos.posX = 'right';\n }\n pos.offsetX = pos.offsetX + elementRect.width;\n pos.offsetX = -1 * pos.offsetX;\n pos.position = calculatePosition(target, pos.posX, pos.posY, false);\n setPosition(edge, pos, elementRect);\n if (deepCheck) {\n leftFlip(target, edge, tEdge, pos, elementRect, false);\n }\n }\n}\nfunction topFlip(target, edge, tEdge, pos, elementRect, deepCheck) {\n var collideSide = topCollideCheck(edge.TL.top, edge.BL.top);\n if ((tEdge.TL.top - getBodyScrollTop()) <= ContainerTop()) {\n collideSide.topSide = false;\n }\n if (tEdge.BL.top >= ContainerBottom() && target.getBoundingClientRect().bottom < window.innerHeight) {\n collideSide.bottomSide = false;\n }\n if ((collideSide.topSide && !collideSide.bottomSide) || (!collideSide.topSide && collideSide.bottomSide)) {\n if (pos.posY === 'top') {\n pos.posY = 'bottom';\n }\n else {\n pos.posY = 'top';\n }\n pos.offsetY = pos.offsetY + elementRect.height;\n pos.offsetY = -1 * pos.offsetY;\n pos.position = calculatePosition(target, pos.posX, pos.posY, false, elementRect);\n setPosition(edge, pos, elementRect);\n if (deepCheck) {\n topFlip(target, edge, tEdge, pos, elementRect, false);\n }\n }\n}\nfunction topCollideCheck(top, bottom) {\n var topSide = false;\n var bottomSide = false;\n if ((top - getBodyScrollTop()) < ContainerTop()) {\n topSide = true;\n }\n if (bottom > ContainerBottom()) {\n bottomSide = true;\n }\n return { topSide: topSide, bottomSide: bottomSide };\n}\nfunction getTargetContainerWidth() {\n return targetContainer.getBoundingClientRect().width;\n}\nfunction getTargetContainerHeight() {\n return targetContainer.getBoundingClientRect().height;\n}\nfunction getTargetContainerLeft() {\n return targetContainer.getBoundingClientRect().left;\n}\nfunction getTargetContainerTop() {\n return targetContainer.getBoundingClientRect().top;\n}\nfunction ContainerTop() {\n if (targetContainer) {\n return getTargetContainerTop();\n }\n return 0;\n}\nfunction ContainerLeft() {\n if (targetContainer) {\n return getTargetContainerLeft();\n }\n return 0;\n}\nfunction ContainerRight() {\n if (targetContainer) {\n return (getBodyScrollLeft() + getTargetContainerLeft() + getTargetContainerWidth());\n }\n return (getBodyScrollLeft() + getViewPortWidth());\n}\nfunction ContainerBottom() {\n if (targetContainer) {\n return (getBodyScrollTop() + getTargetContainerTop() + getTargetContainerHeight());\n }\n return (getBodyScrollTop() + getViewPortHeight());\n}\nfunction getBodyScrollTop() {\n // if(targetContainer)\n // return targetContainer.scrollTop;\n return parentDocument.documentElement.scrollTop || parentDocument.body.scrollTop;\n}\nfunction getBodyScrollLeft() {\n // if(targetContainer)\n // return targetContainer.scrollLeft;\n return parentDocument.documentElement.scrollLeft || parentDocument.body.scrollLeft;\n}\nfunction getViewPortHeight() {\n return window.innerHeight;\n}\nfunction getViewPortWidth() {\n var windowWidth = window.innerWidth;\n var offsetWidth = (isNullOrUndefined(document.documentElement)) ? 0 : document.documentElement.offsetWidth;\n return windowWidth - (windowWidth - offsetWidth);\n}\n","/**\n * Position library\n */\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nvar elementRect;\nvar popupRect;\nvar element;\nvar parentDocument;\nvar fixedParent = false;\nexport function calculateRelativeBasedPosition(anchor, element) {\n var fixedElement = false;\n var anchorPos = { left: 0, top: 0 };\n var tempAnchor = anchor;\n if (!anchor || !element) {\n return anchorPos;\n }\n if (isNullOrUndefined(element.offsetParent) && element.style.position === 'fixed') {\n fixedElement = true;\n }\n while ((element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor) {\n anchorPos.left += anchor.offsetLeft;\n anchorPos.top += anchor.offsetTop;\n anchor = anchor.offsetParent;\n }\n anchor = tempAnchor;\n while ((element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor) {\n anchorPos.left -= anchor.scrollLeft;\n anchorPos.top -= anchor.scrollTop;\n anchor = anchor.parentElement;\n }\n return anchorPos;\n}\nexport function calculatePosition(currentElement, positionX, positionY, parentElement, targetValues) {\n (positionY + positionX === 'topright') ? popupRect = undefined : popupRect = targetValues;\n popupRect = targetValues;\n fixedParent = parentElement ? true : false;\n if (!currentElement) {\n return { left: 0, top: 0 };\n }\n if (!positionX) {\n positionX = 'left';\n }\n if (!positionY) {\n positionY = 'top';\n }\n parentDocument = currentElement.ownerDocument;\n element = currentElement;\n var pos = { left: 0, top: 0 };\n return updatePosition(positionX.toLowerCase(), positionY.toLowerCase(), pos);\n}\nfunction setPosx(value, pos) {\n pos.left = value;\n}\nfunction setPosy(value, pos) {\n pos.top = value;\n}\nfunction updatePosition(posX, posY, pos) {\n elementRect = element.getBoundingClientRect();\n switch (posY + posX) {\n case 'topcenter':\n setPosx(getElementHCenter(), pos);\n setPosy(getElementTop(), pos);\n break;\n case 'topright':\n setPosx(getElementRight(), pos);\n setPosy(getElementTop(), pos);\n break;\n case 'centercenter':\n setPosx(getElementHCenter(), pos);\n setPosy(getElementVCenter(), pos);\n break;\n case 'centerright':\n setPosx(getElementRight(), pos);\n setPosy(getElementVCenter(), pos);\n break;\n case 'centerleft':\n setPosx(getElementLeft(), pos);\n setPosy(getElementVCenter(), pos);\n break;\n case 'bottomcenter':\n setPosx(getElementHCenter(), pos);\n setPosy(getElementBottom(), pos);\n break;\n case 'bottomright':\n setPosx(getElementRight(), pos);\n setPosy(getElementBottom(), pos);\n break;\n case 'bottomleft':\n setPosx(getElementLeft(), pos);\n setPosy(getElementBottom(), pos);\n break;\n default:\n case 'topleft':\n setPosx(getElementLeft(), pos);\n setPosy(getElementTop(), pos);\n break;\n }\n return pos;\n}\nfunction getBodyScrollTop() {\n return parentDocument.documentElement.scrollTop || parentDocument.body.scrollTop;\n}\nfunction getBodyScrollLeft() {\n return parentDocument.documentElement.scrollLeft || parentDocument.body.scrollLeft;\n}\nfunction getElementBottom() {\n return fixedParent ? elementRect.bottom : elementRect.bottom + getBodyScrollTop();\n}\nfunction getElementVCenter() {\n return getElementTop() + (elementRect.height / 2);\n}\nfunction getElementTop() {\n return fixedParent ? elementRect.top : elementRect.top + getBodyScrollTop();\n}\nfunction getElementLeft() {\n return elementRect.left + getBodyScrollLeft();\n}\nfunction getElementRight() {\n return elementRect.right + getBodyScrollLeft() - (popupRect ? popupRect.width : 0);\n}\nfunction getElementHCenter() {\n return getElementLeft() + (elementRect.width / 2);\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Worksheets class\n * @private\n */\nvar Worksheets = /** @class */ (function (_super) {\n __extends(Worksheets, _super);\n function Worksheets() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Worksheets;\n}(Array));\nexport { Worksheets };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Worksheet class\n * @private\n */\nvar Worksheet = /** @class */ (function () {\n function Worksheet() {\n this.isSummaryRowBelow = true;\n this.showGridLines = true;\n this.enableRtl = false;\n }\n return Worksheet;\n}());\nexport { Worksheet };\n/**\n * Hyperlink class\n * @private\n */\nvar HyperLink = /** @class */ (function () {\n function HyperLink() {\n }\n return HyperLink;\n}());\nexport { HyperLink };\n/**\n * Grouping class\n * @private\n */\nvar Grouping = /** @class */ (function () {\n function Grouping() {\n }\n return Grouping;\n}());\nexport { Grouping };\n/**\n * FreezePane class\n * @private\n */\nvar FreezePane = /** @class */ (function () {\n function FreezePane() {\n }\n return FreezePane;\n}());\nexport { FreezePane };\n/**\n * MergeCell\n * @private\n */\nvar MergeCell = /** @class */ (function () {\n function MergeCell() {\n }\n return MergeCell;\n}());\nexport { MergeCell };\n/**\n * MergeCells class\n * @private\n */\nvar MergeCells = /** @class */ (function (_super) {\n __extends(MergeCells, _super);\n function MergeCells() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.add = function (mergeCell) {\n var inserted = false;\n var count = 0;\n for (var _i = 0, _a = _this; _i < _a.length; _i++) {\n var mCell = _a[_i];\n if (MergeCells.isIntersecting(mCell, mergeCell)) {\n var intersectingCell = new MergeCell();\n intersectingCell.x = Math.min(mCell.x, mergeCell.x);\n intersectingCell.y = Math.min(mCell.Y, mergeCell.y);\n intersectingCell.width = Math.max(mCell.Width + mCell.X, mergeCell.width + mergeCell.x);\n intersectingCell.height = Math.max(mCell.Height + mCell.Y, mergeCell.height + mergeCell.y);\n intersectingCell.ref = (_this[count].ref.split(':')[0]) + ':' + (mergeCell.ref.split(':')[1]);\n _this[count] = intersectingCell;\n mergeCell = intersectingCell;\n inserted = true;\n }\n count++;\n }\n if (!inserted) {\n _this.push(mergeCell);\n }\n return mergeCell;\n };\n return _this;\n }\n MergeCells.isIntersecting = function (base, compare) {\n return (base.x <= compare.x + compare.width)\n && (compare.x <= base.x + base.width)\n && (base.y <= compare.y + compare.height)\n && (compare.y <= base.y + base.height);\n };\n return MergeCells;\n}(Array));\nexport { MergeCells };\n","/**\n * CellStyle class\n * @private\n */\nvar CellStyle = /** @class */ (function () {\n function CellStyle() {\n this.numFmtId = 0;\n this.backColor = 'none';\n this.fontName = 'Calibri';\n this.fontSize = 10.5;\n this.fontColor = '#000000';\n this.italic = false;\n this.bold = false;\n this.underline = false;\n this.wrapText = false;\n this.hAlign = 'general';\n this.vAlign = 'bottom';\n this.indent = 0;\n this.rotation = 0;\n this.numberFormat = 'GENERAL';\n this.type = 'datetime';\n this.borders = new Borders();\n this.isGlobalStyle = false;\n }\n return CellStyle;\n}());\nexport { CellStyle };\n/**\n * Font Class\n * @private\n */\nvar Font = /** @class */ (function () {\n function Font() {\n this.sz = 10.5;\n this.name = 'Calibri';\n this.u = false;\n this.b = false;\n this.i = false;\n this.color = 'FF000000';\n }\n return Font;\n}());\nexport { Font };\n/**\n * CellXfs class\n * @private\n */\nvar CellXfs = /** @class */ (function () {\n function CellXfs() {\n }\n return CellXfs;\n}());\nexport { CellXfs };\n/**\n * Alignment class\n * @private\n */\nvar Alignment = /** @class */ (function () {\n function Alignment() {\n }\n return Alignment;\n}());\nexport { Alignment };\n/**\n * CellStyleXfs class\n * @private\n */\nvar CellStyleXfs = /** @class */ (function () {\n function CellStyleXfs() {\n }\n return CellStyleXfs;\n}());\nexport { CellStyleXfs };\n/**\n * CellStyles class\n * @private\n */\nvar CellStyles = /** @class */ (function () {\n function CellStyles() {\n this.name = 'Normal';\n this.xfId = 0;\n }\n return CellStyles;\n}());\nexport { CellStyles };\n/**\n * NumFmt class\n * @private\n */\nvar NumFmt = /** @class */ (function () {\n function NumFmt(id, code) {\n this.numFmtId = id;\n this.formatCode = code;\n }\n return NumFmt;\n}());\nexport { NumFmt };\n/**\n * Border class\n * @private\n */\nvar Border = /** @class */ (function () {\n function Border(mLine, mColor) {\n this.lineStyle = mLine;\n this.color = mColor;\n }\n return Border;\n}());\nexport { Border };\n/**\n * Borders class\n * @private\n */\nvar Borders = /** @class */ (function () {\n function Borders() {\n this.left = new Border('none', '#FFFFFF');\n this.right = new Border('none', '#FFFFFF');\n this.top = new Border('none', '#FFFFFF');\n this.bottom = new Border('none', '#FFFFFF');\n this.all = new Border('none', '#FFFFFF');\n }\n return Borders;\n}());\nexport { Borders };\n","/**\n * Column class\n * @private\n */\nvar Column = /** @class */ (function () {\n function Column() {\n }\n return Column;\n}());\nexport { Column };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Row class\n * @private\n */\nvar Row = /** @class */ (function () {\n function Row() {\n }\n return Row;\n}());\nexport { Row };\n/**\n * Rows class\n * @private\n */\nvar Rows = /** @class */ (function (_super) {\n __extends(Rows, _super);\n function Rows() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.add = function (row) {\n var inserted = false;\n var count = 0;\n for (var _i = 0, _a = _this; _i < _a.length; _i++) {\n var r = _a[_i];\n if (r.index === row.index) {\n _this[count] = row;\n inserted = true;\n }\n count++;\n }\n if (!inserted) {\n _this.push(row);\n }\n };\n return _this;\n }\n return Rows;\n}(Array));\nexport { Rows };\n","/**\n * Image class\n * @private\n */\nvar Image = /** @class */ (function () {\n function Image() {\n }\n return Image;\n}());\nexport { Image };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Worksheet class\n * @private\n */\nvar Cell = /** @class */ (function () {\n function Cell() {\n }\n return Cell;\n}());\nexport { Cell };\n/**\n * Cells class\n * @private\n */\nvar Cells = /** @class */ (function (_super) {\n __extends(Cells, _super);\n function Cells() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.add = function (cell) {\n var inserted = false;\n var count = 0;\n for (var _i = 0, _a = _this; _i < _a.length; _i++) {\n var c = _a[_i];\n if (c.index === cell.index) {\n _this[count] = cell;\n inserted = true;\n }\n count++;\n }\n if (!inserted) {\n _this.push(cell);\n }\n };\n return _this;\n }\n return Cells;\n}(Array));\nexport { Cells };\n","import { CompressedStreamWriter } from './compression-writer';\nimport { Save } from '@syncfusion/ej2-file-utils';\nvar CRC32TABLE = [];\n/**\n * class provide compression library\n * ```typescript\n * let archive = new ZipArchive();\n * archive.compressionLevel = 'Normal';\n * let archiveItem = new ZipArchiveItem(archive, 'directoryName\\fileName.txt');\n * archive.addItem(archiveItem);\n * archive.save(fileName.zip);\n * ```\n */\nvar ZipArchive = /** @class */ (function () {\n /**\n * constructor for creating ZipArchive instance\n */\n function ZipArchive() {\n if (CRC32TABLE.length === 0) {\n ZipArchive.initCrc32Table();\n }\n this.files = [];\n this.level = 'Normal';\n Save.isMicrosoftBrowser = !(!navigator.msSaveBlob);\n }\n Object.defineProperty(ZipArchive.prototype, \"compressionLevel\", {\n /**\n * gets compression level\n */\n get: function () {\n return this.level;\n },\n /**\n * sets compression level\n */\n set: function (level) {\n this.level = level;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ZipArchive.prototype, \"length\", {\n /**\n * gets items count\n */\n get: function () {\n if (this.files === undefined) {\n return 0;\n }\n return this.files.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * add new item to archive\n * @param {ZipArchiveItem} item - item to be added\n * @returns {void}\n */\n ZipArchive.prototype.addItem = function (item) {\n if (item === null || item === undefined) {\n throw new Error('ArgumentException: item cannot be null or undefined');\n }\n for (var i = 0; i < this.files.length; i++) {\n var file = this.files[i];\n if (file instanceof ZipArchiveItem) {\n if (file.name === item.name) {\n throw new Error('item with same name already exist');\n }\n }\n }\n this.files.push(item);\n };\n /**\n * add new directory to archive\n * @param directoryName directoryName to be created\n * @returns {void}\n */\n ZipArchive.prototype.addDirectory = function (directoryName) {\n if (directoryName === null || directoryName === undefined) {\n throw new Error('ArgumentException: string cannot be null or undefined');\n }\n if (directoryName.length === 0) {\n throw new Error('ArgumentException: string cannot be empty');\n }\n if (directoryName.slice(-1) !== '/') {\n directoryName += '/';\n }\n if (this.files.indexOf(directoryName) !== -1) {\n throw new Error('item with same name already exist');\n }\n this.files.push(directoryName);\n };\n /**\n * gets item at specified index\n * @param {number} index - item index\n * @returns {ZipArchiveItem}\n */\n ZipArchive.prototype.getItem = function (index) {\n if (index >= 0 && index < this.files.length) {\n return this.files[index];\n }\n return undefined;\n };\n /**\n * determines whether an element is in the collection\n * @param {string | ZipArchiveItem} item - item to search\n * @returns {boolean}\n */\n ZipArchive.prototype.contains = function (item) {\n return this.files.indexOf(item) !== -1 ? true : false;\n };\n /**\n * save archive with specified file name\n * @param {string} fileName save archive with specified file name\n * @returns {Promise}\n */\n ZipArchive.prototype.save = function (fileName) {\n if (fileName === null || fileName === undefined || fileName.length === 0) {\n throw new Error('ArgumentException: fileName cannot be null or undefined');\n }\n if (this.files.length === 0) {\n throw new Error('InvalidOperation');\n }\n var zipArchive = this;\n var promise;\n return promise = new Promise(function (resolve, reject) {\n zipArchive.saveInternal(fileName, false).then(function () {\n resolve(zipArchive);\n });\n });\n };\n /**\n * Save archive as blob\n * @return {Promise}\n */\n ZipArchive.prototype.saveAsBlob = function () {\n var zipArchive = this;\n var promise;\n return promise = new Promise(function (resolve, reject) {\n zipArchive.saveInternal('', true).then(function (blob) {\n resolve(blob);\n });\n });\n };\n ZipArchive.prototype.saveInternal = function (fileName, skipFileSave) {\n var _this = this;\n var zipArchive = this;\n var promise;\n return promise = new Promise(function (resolve, reject) {\n var zipData = [];\n var dirLength = 0;\n for (var i = 0; i < zipArchive.files.length; i++) {\n var compressedObject = _this.getCompressedData(_this.files[i]);\n compressedObject.then(function (data) {\n dirLength = zipArchive.constructZippedObject(zipData, data, dirLength, data.isDirectory);\n if (zipData.length === zipArchive.files.length) {\n var blob = zipArchive.writeZippedContent(fileName, zipData, dirLength, skipFileSave);\n resolve(blob);\n }\n });\n }\n });\n };\n /**\n * release allocated un-managed resource\n * @returns {void}\n */\n ZipArchive.prototype.destroy = function () {\n if (this.files !== undefined && this.files.length > 0) {\n for (var i = 0; i < this.files.length; i++) {\n var file = this.files[i];\n if (file instanceof ZipArchiveItem) {\n file.destroy();\n }\n file = undefined;\n }\n this.files = [];\n }\n this.files = undefined;\n this.level = undefined;\n };\n ZipArchive.prototype.getCompressedData = function (item) {\n var zipArchive = this;\n var promise = new Promise(function (resolve, reject) {\n if (item instanceof ZipArchiveItem) {\n var reader_1 = new FileReader();\n reader_1.onload = function () {\n var input = new Uint8Array(reader_1.result);\n var data = {\n fileName: item.name, crc32Value: 0, compressedData: [],\n compressedSize: undefined, uncompressedDataSize: input.length, compressionType: undefined,\n isDirectory: false\n };\n if (zipArchive.level === 'Normal') {\n zipArchive.compressData(input, data, CRC32TABLE);\n var length_1 = 0;\n for (var i = 0; i < data.compressedData.length; i++) {\n length_1 += data.compressedData[i].length;\n }\n data.compressedSize = length_1;\n data.compressionType = '\\x08\\x00'; //Deflated = 8\n }\n else {\n data.compressedSize = input.length;\n data.crc32Value = zipArchive.calculateCrc32Value(0, input, CRC32TABLE);\n data.compressionType = '\\x00\\x00'; // Stored = 0\n data.compressedData.push(input);\n }\n resolve(data);\n };\n reader_1.readAsArrayBuffer(item.data);\n }\n else {\n var data = {\n fileName: item, crc32Value: 0, compressedData: '', compressedSize: 0, uncompressedDataSize: 0,\n compressionType: '\\x00\\x00', isDirectory: true\n };\n resolve(data);\n }\n });\n return promise;\n };\n ZipArchive.prototype.compressData = function (input, data, crc32Table) {\n var compressor = new CompressedStreamWriter(true);\n var currentIndex = 0;\n var nextIndex = 0;\n do {\n if (currentIndex >= input.length) {\n compressor.close();\n break;\n }\n nextIndex = Math.min(input.length, currentIndex + 16384);\n var subArray = input.subarray(currentIndex, nextIndex);\n data.crc32Value = this.calculateCrc32Value(data.crc32Value, subArray, crc32Table);\n compressor.write(subArray, 0, nextIndex - currentIndex);\n currentIndex = nextIndex;\n } while (currentIndex <= input.length);\n data.compressedData = compressor.compressedData;\n compressor.destroy();\n };\n ZipArchive.prototype.constructZippedObject = function (zipParts, data, dirLength, isDirectory) {\n var extFileAttr = 0;\n var date = new Date();\n if (isDirectory) {\n extFileAttr = extFileAttr | 0x00010; // directory flag\n }\n extFileAttr = extFileAttr | (0 & 0x3F);\n var header = this.writeHeader(data, date);\n var localHeader = 'PK\\x03\\x04' + header + data.fileName;\n var centralDir = this.writeCentralDirectory(data, header, dirLength, extFileAttr);\n zipParts.push({ localHeader: localHeader, centralDir: centralDir, compressedData: data });\n return dirLength + localHeader.length + data.compressedSize;\n };\n ZipArchive.prototype.writeHeader = function (data, date) {\n var zipHeader = '';\n zipHeader += '\\x0A\\x00' + '\\x00\\x00'; // version needed to extract & general purpose bit flag\n zipHeader += data.compressionType; // compression method Deflate=8,Stored=0\n zipHeader += this.getBytes(this.getModifiedTime(date), 2); // last modified Time\n zipHeader += this.getBytes(this.getModifiedDate(date), 2); // last modified date\n zipHeader += this.getBytes(data.crc32Value, 4); // crc-32 value\n zipHeader += this.getBytes(data.compressedSize, 4); // compressed file size\n zipHeader += this.getBytes(data.uncompressedDataSize, 4); // uncompressed file size\n zipHeader += this.getBytes(data.fileName.length, 2); // file name length\n zipHeader += this.getBytes(0, 2); // extra field length\n return zipHeader;\n };\n ZipArchive.prototype.writeZippedContent = function (fileName, zipData, localDirLen, skipFileSave) {\n var cenDirLen = 0;\n var buffer = [];\n for (var i = 0; i < zipData.length; i++) {\n var item = zipData[i];\n cenDirLen += item.centralDir.length;\n buffer.push(this.getArrayBuffer(item.localHeader));\n while (item.compressedData.compressedData.length) {\n buffer.push(item.compressedData.compressedData.shift().buffer);\n }\n }\n for (var i = 0; i < zipData.length; i++) {\n buffer.push(this.getArrayBuffer(zipData[i].centralDir));\n }\n buffer.push(this.getArrayBuffer(this.writeFooter(zipData, cenDirLen, localDirLen)));\n var blob = new Blob(buffer, { type: 'application/zip' });\n if (!skipFileSave) {\n Save.save(fileName, blob);\n }\n return blob;\n };\n ZipArchive.prototype.writeCentralDirectory = function (data, localHeader, offset, externalFileAttribute) {\n var directoryHeader = 'PK\\x01\\x02' +\n this.getBytes(0x0014, 2) + localHeader + // inherit from file header\n this.getBytes(0, 2) + // comment length\n '\\x00\\x00' + '\\x00\\x00' + // internal file attributes \n this.getBytes(externalFileAttribute, 4) + // external file attributes\n this.getBytes(offset, 4) + // local fileHeader relative offset\n data.fileName;\n return directoryHeader;\n };\n ZipArchive.prototype.writeFooter = function (zipData, centralLength, localLength) {\n var dirEnd = 'PK\\x05\\x06' + '\\x00\\x00' + '\\x00\\x00' +\n this.getBytes(zipData.length, 2) + this.getBytes(zipData.length, 2) +\n this.getBytes(centralLength, 4) + this.getBytes(localLength, 4) +\n this.getBytes(0, 2);\n return dirEnd;\n };\n ZipArchive.prototype.getArrayBuffer = function (input) {\n var a = new Uint8Array(input.length);\n for (var j = 0; j < input.length; ++j) {\n a[j] = input.charCodeAt(j) & 0xFF;\n }\n return a.buffer;\n };\n ZipArchive.prototype.getBytes = function (value, offset) {\n var bytes = '';\n for (var i = 0; i < offset; i++) {\n bytes += String.fromCharCode(value & 0xff);\n value = value >>> 8;\n }\n return bytes;\n };\n ZipArchive.prototype.getModifiedTime = function (date) {\n var modTime = date.getHours();\n modTime = modTime << 6;\n modTime = modTime | date.getMinutes();\n modTime = modTime << 5;\n return modTime = modTime | date.getSeconds() / 2;\n };\n ZipArchive.prototype.getModifiedDate = function (date) {\n var modiDate = date.getFullYear() - 1980;\n modiDate = modiDate << 4;\n modiDate = modiDate | (date.getMonth() + 1);\n modiDate = modiDate << 5;\n return modiDate = modiDate | date.getDate();\n };\n ZipArchive.prototype.calculateCrc32Value = function (crc32Value, input, crc32Table) {\n crc32Value ^= -1;\n for (var i = 0; i < input.length; i++) {\n crc32Value = (crc32Value >>> 8) ^ crc32Table[(crc32Value ^ input[i]) & 0xFF];\n }\n return (crc32Value ^ (-1));\n };\n /**\n * construct cyclic redundancy code table\n * @private\n */\n ZipArchive.initCrc32Table = function () {\n var i;\n for (var j = 0; j < 256; j++) {\n i = j;\n for (var k = 0; k < 8; k++) {\n i = ((i & 1) ? (0xEDB88320 ^ (i >>> 1)) : (i >>> 1));\n }\n CRC32TABLE[j] = i;\n }\n };\n return ZipArchive;\n}());\nexport { ZipArchive };\n/**\n * Class represent unique ZipArchive item\n * ```typescript\n * let archiveItem = new ZipArchiveItem(archive, 'directoryName\\fileName.txt');\n * ```\n */\nvar ZipArchiveItem = /** @class */ (function () {\n /**\n * constructor for creating {ZipArchiveItem} instance\n * @param {Blob|ArrayBuffer} data file data\n * @param {itemName} itemName absolute file path\n */\n function ZipArchiveItem(data, itemName) {\n if (data === null || data === undefined) {\n throw new Error('ArgumentException: data cannot be null or undefined');\n }\n if (itemName === null || itemName === undefined) {\n throw new Error('ArgumentException: string cannot be null or undefined');\n }\n if (itemName.length === 0) {\n throw new Error('string cannot be empty');\n }\n this.data = data;\n this.name = itemName;\n }\n Object.defineProperty(ZipArchiveItem.prototype, \"name\", {\n /**\n * Get the name of archive item\n * @returns string\n */\n get: function () {\n return this.fileName;\n },\n /**\n * Set the name of archive item\n * @param {string} value\n */\n set: function (value) {\n this.fileName = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * release allocated un-managed resource\n * @returns {void}\n */\n ZipArchiveItem.prototype.destroy = function () {\n this.fileName = undefined;\n this.data = undefined;\n };\n return ZipArchiveItem;\n}());\nexport { ZipArchiveItem };\n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { Internationalization } from '@syncfusion/ej2-base';\n// import { IValueFormatter } from '../base/interface';\n/**\n * ValueFormatter class to globalize the value.\n * @private\n */\nvar ValueFormatter = /** @class */ (function () {\n function ValueFormatter(cultureName) {\n this.intl = new Internationalization();\n // if (!isNullOrUndefined(cultureName)) {\n // this.intl.culture = cultureName;\n // }\n }\n ValueFormatter.prototype.getFormatFunction = function (format, isServerRendered) {\n if (format.type) {\n if (isServerRendered) {\n format.isServerRendered = true;\n }\n return this.intl.getDateFormat(format);\n }\n else {\n return this.intl.getNumberFormat(format);\n }\n };\n // public getParserFunction(format: NumberFormatOptions | DateFormatOptions): Function {\n // if ((format).type) {\n // return this.intl.getDateParser(format);\n // } else {\n // return this.intl.getNumberParser(format);\n // }\n // }\n // public fromView(value: string, format: Function, type?: string): string | number | Date {\n // if (type === 'date' || type === 'datetime' || type === 'number') {\n // return format(value);\n // } else {\n // return value;\n // }\n // }\n ValueFormatter.prototype.toView = function (value, format) {\n var result = value;\n if (!isNullOrUndefined(format) && !isNullOrUndefined(value)) {\n result = format(value);\n }\n return result;\n };\n // public setCulture(cultureName: string): void {\n // if (!isNullOrUndefined(cultureName)) {\n // setCulture(cultureName);\n // }\n // }\n /* tslint:disable:no-any */\n ValueFormatter.prototype.displayText = function (value, format, isServerRendered) {\n return this.toView(value, this.getFormatFunction(format, isServerRendered));\n };\n return ValueFormatter;\n}());\nexport { ValueFormatter };\n","import { ValueFormatter } from './value-formatter';\n/**\n * CsvHelper class\n * @private\n */\nvar CsvHelper = /** @class */ (function () {\n /* tslint:disable:no-any */\n function CsvHelper(json, separator) {\n this.csvStr = '';\n if (separator === null || separator === undefined) {\n this.separator = ',';\n }\n else {\n this.separator = separator;\n }\n this.formatter = new ValueFormatter();\n this.isMicrosoftBrowser = !(!navigator.msSaveBlob);\n if (json.isServerRendered !== null && json.isServerRendered !== undefined) {\n this.isServerRendered = json.isServerRendered;\n }\n if (json.styles !== null && json.styles !== undefined) {\n this.globalStyles = new Map();\n for (var i = 0; i < json.styles.length; i++) {\n if (json.styles[i].name !== undefined && json.styles[i].numberFormat !== undefined) {\n this.globalStyles.set(json.styles[i].name, json.styles[i].numberFormat);\n }\n }\n }\n // Parses Worksheets data to DOM. \n if (json.worksheets !== null && json.worksheets !== undefined) {\n this.parseWorksheet(json.worksheets[0]);\n }\n //this.csvStr = 'a1,a2,a3\\nb1,b2,b3';\n }\n CsvHelper.prototype.parseWorksheet = function (json) {\n //Rows\n if (json.rows !== null && json.rows !== undefined) {\n this.parseRows(json.rows);\n }\n };\n /* tslint:disable:no-any */\n CsvHelper.prototype.parseRows = function (rows) {\n var count = 1;\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n //Row index\n if (row.index !== null && row.index !== undefined) {\n while (count < row.index) {\n this.csvStr += '\\n';\n count++;\n }\n this.parseRow(row);\n }\n else {\n throw Error('Row index is missing.');\n }\n }\n };\n /* tslint:disable:no-any */\n CsvHelper.prototype.parseRow = function (row) {\n if (row.cells !== null && row.cells !== undefined) {\n var count = 1;\n for (var _i = 0, _a = row.cells; _i < _a.length; _i++) {\n var cell = _a[_i];\n //cell index\n if (cell.index !== null && cell.index !== undefined) {\n while (count < cell.index) {\n this.csvStr += this.separator;\n count++;\n }\n this.parseCell(cell);\n }\n else {\n throw Error('Cell index is missing.');\n }\n }\n }\n };\n /* tslint:disable:no-any */\n CsvHelper.prototype.parseCell = function (cell) {\n var csv = this.csvStr;\n if (cell.value !== undefined) {\n if (cell.value instanceof Date) {\n if (cell.style !== undefined && cell.style.numberFormat !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n try {\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', skeleton: cell.style.numberFormat }, this.isServerRendered));\n }\n catch (error) {\n /* tslint:disable-next-line:max-line-length */\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', format: cell.style.numberFormat }, this.isServerRendered));\n }\n }\n else if (cell.style !== undefined && cell.style.name !== undefined && this.globalStyles.has(cell.style.name)) {\n /* tslint:disable-next-line:max-line-length */\n try {\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', skeleton: this.globalStyles.get(cell.style.name) }, this.isServerRendered));\n }\n catch (error) {\n /* tslint:disable-next-line:max-line-length */\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', format: this.globalStyles.get(cell.style.name) }, this.isServerRendered));\n }\n }\n else {\n csv += cell.value;\n }\n }\n else if (typeof (cell.value) === 'boolean') {\n csv += cell.value ? 'TRUE' : 'FALSE';\n }\n else if (typeof (cell.value) === 'number') {\n if (cell.style !== undefined && cell.style.numberFormat !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { format: cell.style.numberFormat }, this.isServerRendered));\n }\n else if (cell.style !== undefined && cell.style.name !== undefined && this.globalStyles.has(cell.style.name)) {\n /* tslint:disable-next-line:max-line-length */\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { format: this.globalStyles.get(cell.style.name) }, this.isServerRendered));\n }\n else {\n csv += cell.value;\n }\n }\n else {\n csv += this.parseCellValue(cell.value);\n }\n }\n this.csvStr = csv;\n };\n CsvHelper.prototype.parseCellValue = function (value) {\n var val = '';\n var length = value.length;\n for (var start = 0; start < length; start++) {\n if (value[start] === '\\\"') {\n val += value[start].replace('\\\"', '\\\"\\\"');\n }\n else {\n val += value[start];\n }\n }\n value = val;\n if (value.indexOf(this.separator) !== -1 || value.indexOf('\\n') !== -1) {\n return value = '\\\"' + value + '\\\"';\n }\n else {\n return value;\n }\n };\n /**\n * Saves the file with specified name and sends the file to client browser\n * @param {string} fileName- file name to save.\n * @param {Blob} buffer- the content to write in file\n */\n CsvHelper.prototype.save = function (fileName) {\n this.buffer = new Blob(['\\ufeff' + this.csvStr], { type: 'text/csv;charset=UTF-8' });\n if (this.isMicrosoftBrowser) {\n navigator.msSaveBlob(this.buffer, fileName);\n }\n else {\n var dataUrl_1 = window.URL.createObjectURL(this.buffer);\n var dwlLink = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');\n dwlLink.download = fileName;\n dwlLink.href = dataUrl_1;\n var event_1 = document.createEvent('MouseEvent');\n event_1.initEvent('click', true, true);\n dwlLink.dispatchEvent(event_1);\n setTimeout(function () {\n window.URL.revokeObjectURL(dataUrl_1);\n });\n }\n };\n CsvHelper.prototype.saveAsBlob = function () {\n return new Blob(['\\ufeff' + this.csvStr], { type: 'text/csv;charset=UTF-8' });\n };\n return CsvHelper;\n}());\nexport { CsvHelper };\n","/**\n * BlobHelper class\n * @private\n */\nvar BlobHelper = /** @class */ (function () {\n function BlobHelper() {\n /* tslint:disable:no-any */\n this.parts = [];\n }\n /* tslint:disable:no-any */\n BlobHelper.prototype.append = function (part) {\n this.parts.push(part);\n this.blob = undefined; // Invalidate the blob\n };\n BlobHelper.prototype.getBlob = function () {\n return new Blob(this.parts, { type: 'text/plain' });\n };\n return BlobHelper;\n}());\nexport { BlobHelper };\n","/**\n * AutoFilters class\n * @private\n */\nvar AutoFilters = /** @class */ (function () {\n function AutoFilters() {\n }\n return AutoFilters;\n}());\nexport { AutoFilters };\n","import { Worksheets } from './worksheets';\nimport { Worksheet, FreezePane, MergeCell, MergeCells, HyperLink, Grouping } from './worksheet';\nimport { CellStyle, Font, Borders, CellXfs, Alignment, NumFmt, CellStyleXfs, CellStyles } from './cell-style';\nimport { Column } from './column';\nimport { Row, Rows } from './row';\nimport { Image } from './image';\nimport { Cell, Cells } from './cell';\nimport { ZipArchive, ZipArchiveItem } from '@syncfusion/ej2-compression';\nimport { CsvHelper } from './csv-helper';\nimport { Internationalization, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { BlobHelper } from './blob-helper';\nimport { AutoFilters } from './auto-filters';\n/**\n * Workbook class\n */\nvar Workbook = /** @class */ (function () {\n /* tslint:disable:no-any */\n function Workbook(json, saveType, culture, currencyString, separator) {\n this.sharedStringCount = 0;\n this.unitsProportions = [\n 96 / 75.0,\n 96 / 300.0,\n 96,\n 96 / 25.4,\n 96 / 2.54,\n 1,\n 96 / 72.0,\n 96 / 72.0 / 12700,\n ];\n /* tslint:disable:no-any */\n this.hyperlinkStyle = { fontColor: '#0000FF', underline: true };\n if (culture !== undefined) {\n this.culture = culture;\n }\n else {\n this.culture = 'en-US';\n }\n if (currencyString !== undefined) {\n this.currency = currencyString;\n }\n else {\n this.currency = 'USD';\n }\n this.intl = new Internationalization(this.culture);\n this.mSaveType = saveType;\n if (saveType === 'xlsx') {\n this.mArchive = new ZipArchive();\n this.sharedString = [];\n this.mFonts = [];\n this.mBorders = [];\n this.mStyles = [];\n this.printTitles = new Map();\n this.cellStyles = new Map();\n this.mNumFmt = new Map();\n this.mFills = new Map();\n this.mStyles.push(new CellStyle());\n this.mFonts.push(new Font());\n /* tslint:disable */\n this.cellStyles.set('Normal', new CellStyles());\n /* tslint:enable */\n this.mCellXfs = [];\n this.mCellStyleXfs = [];\n this.drawingCount = 0;\n this.imageCount = 0;\n if (json.styles !== null && json.styles !== undefined) {\n /* tslint:disable-next-line:no-any */\n this.globalStyles = new Map();\n for (var i = 0; i < json.styles.length; i++) {\n if (json.styles[i].name !== undefined) {\n if (!this.cellStyles.has(json.styles[i].name)) {\n var cellStyle = new CellStyle();\n cellStyle.isGlobalStyle = true;\n this.parserCellStyle(json.styles[i], cellStyle, 'none');\n var cellStylesIn = new CellStyles();\n cellStylesIn.name = cellStyle.name;\n cellStylesIn.xfId = (cellStyle.index - 1);\n this.cellStyles.set(cellStylesIn.name, cellStylesIn);\n /* tslint:disable-next-line:no-any */\n var tFormat = {};\n if (json.styles[i].numberFormat !== undefined) {\n tFormat.format = json.styles[i].numberFormat;\n }\n if (json.styles[i].type !== undefined) {\n tFormat.type = json.styles[i].type;\n }\n else {\n tFormat.type = 'datetime';\n }\n if (tFormat.format !== undefined) {\n this.globalStyles.set(json.styles[i].name, tFormat);\n }\n }\n else {\n throw Error('Style name ' + json.styles[i].name + ' is already existed');\n }\n }\n }\n }\n // Parses Worksheets data to DOM. \n if (json.worksheets !== null && json.worksheets !== undefined) {\n this.parserWorksheets(json.worksheets);\n }\n else {\n throw Error('Worksheet is expected.');\n }\n // Parses the BuiltInProperties data to DOM. \n if (json.builtInProperties !== null && json.builtInProperties !== undefined) {\n this.builtInProperties = new BuiltInProperties();\n this.parserBuiltInProperties(json.builtInProperties, this.builtInProperties);\n }\n }\n else {\n this.csvHelper = new CsvHelper(json, separator);\n }\n }\n /* tslint:disable:no-any */\n Workbook.prototype.parserBuiltInProperties = function (jsonBuiltInProperties, builtInProperties) {\n //Author\n if (jsonBuiltInProperties.author !== null && jsonBuiltInProperties.author !== undefined) {\n builtInProperties.author = jsonBuiltInProperties.author;\n }\n //Comments\n if (jsonBuiltInProperties.comments !== null && jsonBuiltInProperties.comments !== undefined) {\n builtInProperties.comments = jsonBuiltInProperties.comments;\n }\n //Category\n if (jsonBuiltInProperties.category !== null && jsonBuiltInProperties.category !== undefined) {\n builtInProperties.category = jsonBuiltInProperties.category;\n }\n //Company\n if (jsonBuiltInProperties.company !== null && jsonBuiltInProperties.company !== undefined) {\n builtInProperties.company = jsonBuiltInProperties.company;\n }\n //Manager\n if (jsonBuiltInProperties.manager !== null && jsonBuiltInProperties.manager !== undefined) {\n builtInProperties.manager = jsonBuiltInProperties.manager;\n }\n //Subject\n if (jsonBuiltInProperties.subject !== null && jsonBuiltInProperties.subject !== undefined) {\n builtInProperties.subject = jsonBuiltInProperties.subject;\n }\n //Title\n if (jsonBuiltInProperties.title !== null && jsonBuiltInProperties.title !== undefined) {\n builtInProperties.title = jsonBuiltInProperties.title;\n }\n //Creation date\n if (jsonBuiltInProperties.createdDate !== null && jsonBuiltInProperties.createdDate !== undefined) {\n builtInProperties.createdDate = jsonBuiltInProperties.createdDate;\n }\n //Modified date\n if (jsonBuiltInProperties.modifiedDate !== null && jsonBuiltInProperties.modifiedDate !== undefined) {\n builtInProperties.modifiedDate = jsonBuiltInProperties.modifiedDate;\n }\n //Tags\n if (jsonBuiltInProperties.tags !== null && jsonBuiltInProperties.tags !== undefined) {\n builtInProperties.tags = jsonBuiltInProperties.tags;\n }\n //Status\n if (jsonBuiltInProperties.status !== null && jsonBuiltInProperties.status !== undefined) {\n builtInProperties.status = jsonBuiltInProperties.status;\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserWorksheets = function (json) {\n this.worksheets = new Worksheets();\n var length = json.length;\n for (var i = 0; i < length; i++) {\n var jsonSheet = json[i];\n var sheet = new Worksheet();\n this.mergeCells = new MergeCells();\n this.mergedCellsStyle = new Map();\n this.mHyperLinks = [];\n //Name\n if (jsonSheet.name !== null && jsonSheet.name !== undefined) {\n sheet.name = jsonSheet.name;\n }\n else {\n sheet.name = 'Sheet' + (i + 1).toString();\n }\n if (jsonSheet.enableRtl !== null && jsonSheet.enableRtl !== undefined) {\n sheet.enableRtl = jsonSheet.enableRtl;\n }\n sheet.index = (i + 1);\n //Columns\n if (jsonSheet.columns !== null && jsonSheet.columns !== undefined) {\n this.parserColumns(jsonSheet.columns, sheet);\n }\n //Rows\n if (jsonSheet.rows !== null && jsonSheet.rows !== undefined) {\n this.parserRows(jsonSheet.rows, sheet);\n }\n //showGridLines\n if (jsonSheet.showGridLines !== null && jsonSheet.showGridLines !== undefined) {\n sheet.showGridLines = jsonSheet.showGridLines;\n }\n //FreezePanes\n if (jsonSheet.freeze !== null && jsonSheet.freeze !== undefined) {\n this.parserFreezePanes(jsonSheet.freeze, sheet);\n }\n //Print Title\n if (jsonSheet.printTitle !== null && jsonSheet.printTitle !== undefined) {\n this.parserPrintTitle(jsonSheet.printTitle, sheet);\n }\n if (jsonSheet.pageSetup !== undefined) {\n if (jsonSheet.pageSetup.isSummaryRowBelow !== undefined) {\n sheet.isSummaryRowBelow = jsonSheet.pageSetup.isSummaryRowBelow;\n }\n }\n if (jsonSheet.images !== undefined) {\n this.parserImages(jsonSheet.images, sheet);\n }\n if (jsonSheet.autoFilters !== null && jsonSheet.autoFilters !== undefined) {\n this.parseFilters(jsonSheet.autoFilters, sheet);\n }\n sheet.index = (i + 1);\n sheet.mergeCells = this.mergeCells;\n sheet.hyperLinks = this.mHyperLinks;\n this.worksheets.push(sheet);\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.mergeOptions = function (fromJson, toJson) {\n /* tslint:disable:no-any */\n var result = {};\n this.applyProperties(fromJson, result);\n this.applyProperties(toJson, result);\n return result;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.applyProperties = function (sourceJson, destJson) {\n var keys = Object.keys(sourceJson);\n for (var index = 0; index < keys.length; index++) {\n if (keys[index] !== 'name') {\n destJson[keys[index]] = sourceJson[keys[index]];\n }\n }\n };\n Workbook.prototype.getCellName = function (row, column) {\n return this.getColumnName(column) + row.toString();\n };\n Workbook.prototype.getColumnName = function (col) {\n col--;\n var strColumnName = '';\n do {\n var iCurrentDigit = col % 26;\n col = col / 26 - 1;\n strColumnName = String.fromCharCode(65 + iCurrentDigit) + strColumnName;\n } while (col >= 0);\n return strColumnName;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserPrintTitle = function (json, sheet) {\n var printTitleName = '';\n var titleRowName;\n if (json.fromRow !== null && json.fromRow !== undefined) {\n var fromRow = json.fromRow;\n var toRow = void 0;\n if (json.toRow !== null && json.toRow !== undefined) {\n toRow = json.toRow;\n }\n else {\n toRow = json.fromRow;\n }\n titleRowName = '$' + fromRow + ':$' + toRow;\n }\n var titleColName;\n if (json.fromColumn !== null && json.fromColumn !== undefined) {\n var fromColumn = json.fromColumn;\n var toColumn = void 0;\n if (json.toColumn !== null && json.toColumn !== undefined) {\n toColumn = json.toColumn;\n }\n else {\n toColumn = json.fromColumn;\n }\n titleColName = '$' + this.getColumnName(fromColumn) + ':$' + this.getColumnName(toColumn);\n }\n if (titleRowName !== undefined) {\n printTitleName += (sheet.name + '!' + titleRowName);\n }\n if (titleColName !== undefined && titleRowName !== undefined) {\n printTitleName += ',' + (sheet.name + '!' + titleColName);\n }\n else if (titleColName !== undefined) {\n printTitleName += (sheet.name + '!' + titleColName);\n }\n if (printTitleName !== '') {\n this.printTitles.set(sheet.index - 1, printTitleName);\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserFreezePanes = function (json, sheet) {\n sheet.freezePanes = new FreezePane();\n if (json.row !== null && json.row !== undefined) {\n sheet.freezePanes.row = json.row;\n }\n else {\n sheet.freezePanes.row = 0;\n }\n if (json.column !== null && json.column !== undefined) {\n sheet.freezePanes.column = json.column;\n }\n else {\n sheet.freezePanes.column = 0;\n }\n sheet.freezePanes.leftCell = this.getCellName(sheet.freezePanes.row + 1, sheet.freezePanes.column + 1);\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserColumns = function (json, sheet) {\n var columnsLength = json.length;\n sheet.columns = [];\n for (var column = 0; column < columnsLength; column++) {\n var col = new Column();\n if (json[column].index !== null && json[column].index !== undefined) {\n col.index = json[column].index;\n }\n else {\n throw Error('Column index is missing.');\n }\n if (json[column].width !== null && json[column].width !== undefined) {\n col.width = json[column].width;\n }\n sheet.columns.push(col);\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserRows = function (json, sheet) {\n var rowsLength = json.length;\n sheet.rows = new Rows();\n var rowId = 0;\n for (var r = 0; r < rowsLength; r++) {\n var row = this.parserRow(json[r], rowId);\n rowId = row.index;\n sheet.rows.add(row);\n }\n this.insertMergedCellsStyle(sheet);\n };\n Workbook.prototype.insertMergedCellsStyle = function (sheet) {\n var _this = this;\n if (this.mergeCells.length > 0) {\n this.mergedCellsStyle.forEach(function (value, key) {\n var row = sheet.rows.filter(function (item) {\n return item.index === value.y;\n })[0];\n if (!isNullOrUndefined(row)) {\n var cell = row.cells.filter(function (item) {\n return item.index === value.x;\n })[0];\n if (!isNullOrUndefined(cell)) {\n cell.styleIndex = value.styleIndex;\n }\n else {\n var cells = row.cells.filter(function (item) {\n return item.index <= value.x;\n });\n var insertIndex = 0;\n if (cells.length > 0) {\n insertIndex = row.cells.indexOf(cells[cells.length - 1]) + 1;\n }\n row.cells.splice(insertIndex, 0, _this.createCell(value, key));\n }\n }\n else {\n var rows = sheet.rows.filter(function (item) {\n return item.index <= value.y;\n });\n var rowToInsert = new Row();\n rowToInsert.index = value.y;\n rowToInsert.cells = new Cells();\n rowToInsert.cells.add(_this.createCell(value, key));\n var insertIndex = 0;\n if (rows.length > 0) {\n insertIndex = sheet.rows.indexOf(rows[rows.length - 1]) + 1;\n }\n sheet.rows.splice(insertIndex, 0, rowToInsert);\n }\n });\n }\n };\n Workbook.prototype.createCell = function (value, key) {\n var cellToInsert = new Cell();\n cellToInsert.refName = key;\n cellToInsert.index = value.x;\n cellToInsert.cellStyle = new CellStyle();\n cellToInsert.styleIndex = value.styleIndex;\n return cellToInsert;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserRow = function (json, rowIndex) {\n var row = new Row();\n //Row Height\n if (json.height !== null && json.height !== undefined) {\n row.height = json.height;\n }\n //Row index\n if (json.index !== null && json.index !== undefined) {\n row.index = json.index;\n }\n else {\n throw Error('Row index is missing.');\n }\n if (json.grouping !== null && json.grouping !== undefined) {\n this.parseGrouping(json.grouping, row);\n }\n this.parseCells(json.cells, row);\n return row;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parseGrouping = function (json, row) {\n row.grouping = new Grouping();\n if (json.outlineLevel !== undefined) {\n row.grouping.outlineLevel = json.outlineLevel;\n }\n if (json.isCollapsed !== undefined) {\n row.grouping.isCollapsed = json.isCollapsed;\n }\n if (json.isHidden !== undefined) {\n row.grouping.isHidden = json.isHidden;\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parseCells = function (json, row) {\n row.cells = new Cells();\n var cellsLength = json !== undefined ? json.length : 0;\n var spanMin = 1;\n var spanMax = 1;\n var curCellIndex = 0;\n for (var cellId = 0; cellId < cellsLength; cellId++) {\n /* tslint:disable:no-any */\n var jsonCell = json[cellId];\n var cell = new Cell();\n //cell index\n if (jsonCell.index !== null && jsonCell.index !== undefined) {\n cell.index = jsonCell.index;\n }\n else {\n throw Error('Cell index is missing.');\n }\n if (cell.index < spanMin) {\n spanMin = cell.index;\n }\n else if (cell.index > spanMax) {\n spanMax = cell.index;\n }\n //Update the Cell name\n cell.refName = this.getCellName(row.index, cell.index);\n //Row span\n if (jsonCell.rowSpan !== null && jsonCell.rowSpan !== undefined) {\n cell.rowSpan = jsonCell.rowSpan - 1;\n }\n else {\n cell.rowSpan = 0;\n }\n //Column span\n if (jsonCell.colSpan !== null && jsonCell.colSpan !== undefined) {\n cell.colSpan = jsonCell.colSpan - 1;\n }\n else {\n cell.colSpan = 0;\n }\n //Hyperlink\n if (jsonCell.hyperlink !== null && jsonCell.hyperlink !== undefined) {\n var hyperLink = new HyperLink();\n if (jsonCell.hyperlink.target !== undefined) {\n hyperLink.target = jsonCell.hyperlink.target;\n if (jsonCell.hyperlink.displayText !== undefined) {\n cell.value = jsonCell.hyperlink.displayText;\n }\n else {\n cell.value = jsonCell.hyperlink.target;\n }\n cell.type = this.getCellValueType(cell.value);\n hyperLink.ref = cell.refName;\n hyperLink.rId = (this.mHyperLinks.length + 1);\n this.mHyperLinks.push(hyperLink);\n cell.cellStyle = new CellStyle();\n /* tslint:disable-next-line:max-line-length */\n this.parserCellStyle((jsonCell.style !== undefined ? this.mergeOptions(jsonCell.style, this.hyperlinkStyle) : this.hyperlinkStyle), cell.cellStyle, 'string');\n cell.styleIndex = cell.cellStyle.index;\n }\n }\n // formulas\n if (jsonCell.formula !== null && jsonCell.formula !== undefined) {\n cell.formula = jsonCell.formula;\n cell.type = 'formula';\n }\n //Cell value\n if (jsonCell.value !== null && jsonCell.value !== undefined) {\n if (cell.formula !== undefined) {\n cell.value = 0;\n }\n else {\n cell.value = jsonCell.value;\n cell.type = this.getCellValueType(cell.value);\n }\n }\n if (jsonCell.style !== null && jsonCell.style !== undefined && cell.styleIndex === undefined) {\n cell.cellStyle = new CellStyle();\n if (cell.value instanceof Date) {\n this.parserCellStyle(jsonCell.style, cell.cellStyle, cell.type, 14);\n }\n else {\n this.parserCellStyle(jsonCell.style, cell.cellStyle, cell.type);\n }\n cell.styleIndex = cell.cellStyle.index;\n }\n else if (cell.value instanceof Date) {\n cell.cellStyle = new CellStyle();\n this.parserCellStyle({}, cell.cellStyle, cell.type, 14);\n cell.styleIndex = cell.cellStyle.index;\n }\n this.parseCellType(cell);\n this.mergeCells = this.processMergeCells(cell, row.index, this.mergeCells);\n row.cells.add(cell);\n curCellIndex = (cell.index + 1);\n }\n row.spans = (spanMin) + ':' + (spanMax);\n };\n Workbook.prototype.GetColors = function () {\n var colors;\n colors = new Map();\n /* tslint:disable */\n colors.set('WHITE', 'FFFFFFFF');\n /* tslint:disable */\n colors.set('SILVER', 'FFC0C0C0');\n /* tslint:disable */\n colors.set('GRAY', 'FF808080');\n /* tslint:disable */\n colors.set('BLACK', 'FF000000');\n /* tslint:disable */\n colors.set('RED', 'FFFF0000');\n /* tslint:disable */\n colors.set('MAROON', 'FF800000');\n /* tslint:disable */\n colors.set('YELLOW', 'FFFFFF00');\n /* tslint:disable */\n colors.set('OLIVE', 'FF808000');\n /* tslint:disable */\n colors.set('LIME', 'FF00FF00');\n /* tslint:disable */\n colors.set('GREEN', 'FF008000');\n /* tslint:disable */\n colors.set('AQUA', 'FF00FFFF');\n /* tslint:disable */\n colors.set('TEAL', 'FF008080');\n /* tslint:disable */\n colors.set('BLUE', 'FF0000FF');\n /* tslint:disable */\n colors.set('NAVY', 'FF000080');\n /* tslint:disable */\n colors.set('FUCHSIA', 'FFFF00FF');\n /* tslint:disable */\n colors.set('PURPLE', 'FF800080');\n return colors;\n };\n Workbook.prototype.processColor = function (colorVal) {\n if (colorVal.indexOf('#') === 0) {\n return colorVal.replace('#', 'FF');\n }\n colorVal = colorVal.toUpperCase();\n this.rgbColors = this.GetColors();\n if (this.rgbColors.has(colorVal)) {\n colorVal = this.rgbColors.get(colorVal);\n }\n else {\n colorVal = 'FF000000';\n }\n return colorVal;\n };\n Workbook.prototype.processCellValue = function (value, cell) {\n var cellValue = value;\n if (value.indexOf(\"\") !== -1 ||\n value.indexOf(\"\") !== -1 || value.indexOf(\"\") !== -1) {\n var processedVal = '';\n var startindex = value.indexOf('<', 0);\n var endIndex = value.indexOf('>', startindex + 1);\n if (startindex >= 0 && endIndex >= 0) {\n if (startindex !== 0) {\n processedVal += '' + value.substring(0, startindex) + '';\n }\n while (startindex >= 0 && endIndex >= 0) {\n endIndex = value.indexOf('>', startindex + 1);\n if (endIndex >= 0) {\n var subString = value.substring(startindex + 1, endIndex);\n startindex = value.indexOf('<', endIndex + 1);\n if (startindex < 0) {\n startindex = cellValue.length;\n }\n var text = cellValue.substring(endIndex + 1, startindex);\n if (text.length !== 0) {\n var subSplit = subString.split(' ');\n if (subSplit.length > 0) {\n processedVal += '';\n }\n if (subSplit.length > 1) {\n for (var _i = 0, subSplit_1 = subSplit; _i < subSplit_1.length; _i++) {\n var element = subSplit_1[_i];\n var start = element.trim().substring(0, 5);\n switch (start) {\n case 'size=':\n processedVal += '';\n break;\n case 'face=':\n processedVal += '';\n break;\n case 'color':\n processedVal += '';\n break;\n case 'href=':\n var hyperLink = new HyperLink();\n hyperLink.target = element.substring(6, element.length - 1).trim();\n hyperLink.ref = cell.refName;\n hyperLink.rId = (this.mHyperLinks.length + 1);\n this.mHyperLinks.push(hyperLink);\n processedVal += '';\n break;\n }\n }\n }\n else if (subSplit.length === 1) {\n var style = subSplit[0].trim();\n switch (style) {\n case 'b':\n processedVal += '';\n break;\n case 'i':\n processedVal += '';\n break;\n case 'u':\n processedVal += '';\n break;\n }\n }\n processedVal += '' + text + '';\n }\n }\n }\n if (processedVal === '') {\n return cellValue;\n }\n return processedVal;\n }\n else {\n return cellValue;\n }\n }\n else {\n return cellValue;\n }\n };\n Workbook.prototype.applyGlobalStyle = function (json, cellStyle) {\n var index = 0;\n if (this.cellStyles.has(json.name)) {\n cellStyle.index = this.mStyles.filter(function (a) { return (a.name === json.name); })[0].index;\n cellStyle.name = json.name;\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserCellStyle = function (json, cellStyle, cellType, defStyleIndex) {\n //name\n if (json.name !== null && json.name !== undefined) {\n if (cellStyle.isGlobalStyle) {\n cellStyle.name = json.name;\n }\n else {\n this.applyGlobalStyle(json, cellStyle);\n return;\n }\n }\n //background color\n if (json.backColor !== null && json.backColor !== undefined) {\n cellStyle.backColor = json.backColor;\n }\n //borders\n //leftBorder\n cellStyle.borders = new Borders();\n //AllBorder\n if (json.borders !== null && json.borders !== undefined) {\n this.parserBorder(json.borders, cellStyle.borders.all);\n }\n //leftborder\n if (json.leftBorder !== null && json.leftBorder !== undefined) {\n this.parserBorder(json.leftBorder, cellStyle.borders.left);\n }\n //rightBorder\n if (json.rightBorder !== null && json.rightBorder !== undefined) {\n this.parserBorder(json.rightBorder, cellStyle.borders.right);\n }\n //topBorder\n if (json.topBorder !== null && json.topBorder !== undefined) {\n this.parserBorder(json.topBorder, cellStyle.borders.top);\n }\n //bottomBorder\n if (json.bottomBorder !== null && json.bottomBorder !== undefined) {\n this.parserBorder(json.bottomBorder, cellStyle.borders.bottom);\n }\n //fontName\n if (json.fontName !== null && json.fontName !== undefined) {\n cellStyle.fontName = json.fontName;\n }\n //fontSize\n if (json.fontSize !== null && json.fontSize !== undefined) {\n cellStyle.fontSize = json.fontSize;\n }\n //fontColor\n if (json.fontColor !== null && json.fontColor !== undefined) {\n cellStyle.fontColor = json.fontColor;\n }\n //italic\n if (json.italic !== null && json.italic !== undefined) {\n cellStyle.italic = json.italic;\n }\n //bold\n if (json.bold !== null && json.bold !== undefined) {\n cellStyle.bold = json.bold;\n }\n //hAlign\n if (json.hAlign !== null && json.hAlign !== undefined) {\n cellStyle.hAlign = json.hAlign.toLowerCase();\n }\n //indent\n if (json.indent !== null && json.indent !== undefined) {\n cellStyle.indent = json.indent;\n if (!(cellStyle.hAlign === 'left' || cellStyle.hAlign === 'right')) {\n cellStyle.hAlign = 'left';\n }\n }\n if (json.rotation !== null && json.rotation !== undefined) {\n cellStyle.rotation = json.rotation;\n }\n //vAlign\n if (json.vAlign !== null && json.vAlign !== undefined) {\n cellStyle.vAlign = json.vAlign.toLowerCase();\n }\n //underline\n if (json.underline !== null && json.underline !== undefined) {\n cellStyle.underline = json.underline;\n }\n //wrapText\n if (json.wrapText !== null && json.wrapText !== undefined) {\n cellStyle.wrapText = json.wrapText;\n }\n //numberFormat\n if (json.numberFormat !== null && json.numberFormat !== undefined) {\n if (json.type !== null && json.type !== undefined) {\n cellStyle.numberFormat = this.getNumberFormat(json.numberFormat, json.type);\n }\n else {\n cellStyle.numberFormat = this.getNumberFormat(json.numberFormat, cellType);\n }\n }\n else if (defStyleIndex !== undefined) {\n cellStyle.numFmtId = 14;\n cellStyle.numberFormat = 'GENERAL';\n }\n else {\n cellStyle.numberFormat = 'GENERAL';\n }\n cellStyle.index = this.processCellStyle(cellStyle);\n };\n Workbook.prototype.switchNumberFormat = function (numberFormat, type) {\n var format = this.getNumberFormat(numberFormat, type);\n if (format !== numberFormat) {\n var numFmt = this.mNumFmt.get(numberFormat);\n if (numFmt !== undefined) {\n numFmt.formatCode = format;\n if (this.mNumFmt.has(format)) {\n for (var _i = 0, _a = this.mCellStyleXfs; _i < _a.length; _i++) {\n var cellStyleXfs = _a[_i];\n if (cellStyleXfs.numFmtId === numFmt.numFmtId) {\n cellStyleXfs.numFmtId = this.mNumFmt.get(format).numFmtId;\n }\n }\n for (var _b = 0, _c = this.mCellXfs; _b < _c.length; _b++) {\n var cellXfs = _c[_b];\n if (cellXfs.numFmtId === numFmt.numFmtId) {\n cellXfs.numFmtId = this.mNumFmt.get(format).numFmtId;\n }\n }\n }\n }\n }\n };\n Workbook.prototype.getNumberFormat = function (numberFormat, type) {\n var returnFormat;\n switch (type) {\n case 'number':\n try {\n returnFormat = this.intl.getNumberPattern({ format: numberFormat, currency: this.currency, useGrouping: true }, true);\n }\n catch (error) {\n returnFormat = numberFormat;\n }\n break;\n case 'datetime':\n try {\n returnFormat = this.intl.getDatePattern({ skeleton: numberFormat, type: 'dateTime' }, true);\n }\n catch (error) {\n try {\n returnFormat = this.intl.getDatePattern({ format: numberFormat, type: 'dateTime' }, true);\n }\n catch (error) {\n returnFormat = numberFormat;\n }\n }\n break;\n case 'date':\n try {\n returnFormat = this.intl.getDatePattern({ skeleton: numberFormat, type: 'date' }, true);\n }\n catch (error) {\n try {\n returnFormat = this.intl.getDatePattern({ format: numberFormat, type: 'date' }, true);\n }\n catch (error) {\n returnFormat = numberFormat;\n }\n }\n break;\n case 'time':\n try {\n returnFormat = this.intl.getDatePattern({ skeleton: numberFormat, type: 'time' }, true);\n }\n catch (error) {\n try {\n returnFormat = this.intl.getDatePattern({ format: numberFormat, type: 'time' }, true);\n }\n catch (error) {\n returnFormat = numberFormat;\n }\n }\n break;\n default:\n returnFormat = numberFormat;\n break;\n }\n return returnFormat;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserBorder = function (json, border) {\n if (json.color !== null && json.color !== undefined) {\n border.color = json.color;\n }\n else {\n border.color = '#000000';\n }\n if (json.lineStyle !== null && json.lineStyle !== undefined) {\n border.lineStyle = json.lineStyle;\n }\n else {\n border.lineStyle = 'thin';\n }\n };\n Workbook.prototype.processCellStyle = function (style) {\n if (style.isGlobalStyle) {\n this.processNumFormatId(style);\n this.mStyles.push(style);\n return this.mStyles.length;\n }\n else {\n var compareResult = this.compareStyle(style);\n if (!compareResult.result) {\n this.processNumFormatId(style);\n this.mStyles.push(style);\n return this.mStyles.length;\n }\n else {\n //Return the index of the already existing style.\n return compareResult.index;\n }\n }\n };\n Workbook.prototype.processNumFormatId = function (style) {\n if (style.numberFormat !== 'GENERAL' && !this.mNumFmt.has(style.numberFormat)) {\n var id = this.mNumFmt.size + 164;\n this.mNumFmt.set(style.numberFormat, new NumFmt(id, style.numberFormat));\n }\n };\n Workbook.prototype.isNewFont = function (toCompareStyle) {\n var result = false;\n var index = 0;\n for (var _i = 0, _a = this.mFonts; _i < _a.length; _i++) {\n var font = _a[_i];\n index++;\n var fontColor = undefined;\n if (toCompareStyle.fontColor !== undefined) {\n fontColor = ('FF' + toCompareStyle.fontColor.replace('#', ''));\n }\n result = font.color === fontColor &&\n font.b === toCompareStyle.bold &&\n font.i === toCompareStyle.italic &&\n font.u === toCompareStyle.underline &&\n font.name === toCompareStyle.fontName &&\n font.sz === toCompareStyle.fontSize;\n if (result) {\n break;\n }\n }\n index = index - 1;\n return { index: index, result: result };\n };\n Workbook.prototype.isNewBorder = function (toCompareStyle) {\n var bStyle = new CellStyle();\n if (this.isAllBorder(toCompareStyle.borders)) {\n return (bStyle.borders.all.color === toCompareStyle.borders.all.color &&\n bStyle.borders.all.lineStyle === toCompareStyle.borders.all.lineStyle);\n }\n else {\n return (bStyle.borders.left.color === toCompareStyle.borders.left.color &&\n bStyle.borders.left.lineStyle === toCompareStyle.borders.left.lineStyle &&\n bStyle.borders.right.color === toCompareStyle.borders.right.color &&\n bStyle.borders.right.lineStyle === toCompareStyle.borders.right.lineStyle &&\n bStyle.borders.top.color === toCompareStyle.borders.top.color &&\n bStyle.borders.top.lineStyle === toCompareStyle.borders.top.lineStyle &&\n bStyle.borders.bottom.color === toCompareStyle.borders.bottom.color &&\n bStyle.borders.bottom.lineStyle === toCompareStyle.borders.bottom.lineStyle);\n }\n };\n Workbook.prototype.isAllBorder = function (toCompareBorder) {\n var allBorderStyle = new CellStyle();\n return allBorderStyle.borders.all.color !== toCompareBorder.all.color &&\n allBorderStyle.borders.all.lineStyle !== toCompareBorder.all.lineStyle;\n };\n Workbook.prototype.compareStyle = function (toCompareStyle) {\n var result = true;\n var index = 0;\n var globalStyleIndex = 0;\n for (var _i = 0, _a = this.mStyles; _i < _a.length; _i++) {\n var baseStyle = _a[_i];\n result = baseStyle.isGlobalStyle ? false : (baseStyle.backColor === toCompareStyle.backColor &&\n baseStyle.bold === toCompareStyle.bold &&\n baseStyle.numFmtId === toCompareStyle.numFmtId &&\n baseStyle.numberFormat === toCompareStyle.numberFormat &&\n baseStyle.type === toCompareStyle.type &&\n baseStyle.fontColor === toCompareStyle.fontColor &&\n baseStyle.fontName === toCompareStyle.fontName &&\n baseStyle.fontSize === toCompareStyle.fontSize &&\n baseStyle.hAlign === toCompareStyle.hAlign &&\n baseStyle.italic === toCompareStyle.italic &&\n baseStyle.underline === toCompareStyle.underline &&\n baseStyle.vAlign === toCompareStyle.vAlign &&\n baseStyle.indent === toCompareStyle.indent &&\n baseStyle.rotation === toCompareStyle.rotation &&\n baseStyle.wrapText === toCompareStyle.wrapText &&\n (baseStyle.borders.all.color === toCompareStyle.borders.all.color &&\n baseStyle.borders.all.lineStyle === toCompareStyle.borders.all.lineStyle) &&\n (baseStyle.borders.left.color === toCompareStyle.borders.left.color &&\n baseStyle.borders.left.lineStyle === toCompareStyle.borders.left.lineStyle &&\n baseStyle.borders.right.color === toCompareStyle.borders.right.color &&\n baseStyle.borders.right.lineStyle === toCompareStyle.borders.right.lineStyle &&\n baseStyle.borders.top.color === toCompareStyle.borders.top.color &&\n baseStyle.borders.top.lineStyle === toCompareStyle.borders.top.lineStyle &&\n baseStyle.borders.bottom.color === toCompareStyle.borders.bottom.color &&\n baseStyle.borders.bottom.lineStyle === toCompareStyle.borders.bottom.lineStyle));\n if (result) {\n index = baseStyle.index;\n break;\n }\n }\n return { index: index, result: result };\n };\n Workbook.prototype.contains = function (array, item) {\n var index = array.indexOf(item);\n return index > -1 && index < array.length;\n };\n Workbook.prototype.getCellValueType = function (value) {\n if (value instanceof Date) {\n return 'datetime';\n }\n else if (typeof (value) === 'boolean') {\n return 'boolean';\n }\n else if (typeof (value) === 'number') {\n return 'number';\n }\n else {\n return 'string';\n }\n };\n Workbook.prototype.parseCellType = function (cell) {\n var type = cell.type;\n var saveType;\n var value = cell.value;\n switch (type) {\n case 'datetime':\n value = this.toOADate(value);\n if (cell.cellStyle !== undefined && cell.cellStyle.name !== undefined) {\n if (this.globalStyles.has(cell.cellStyle.name)) {\n var value_1 = this.globalStyles.get(cell.cellStyle.name);\n this.switchNumberFormat(value_1.format, value_1.type);\n }\n }\n saveType = 'n';\n break;\n //TODO: Update the number format index and style\n case 'boolean':\n value = value ? 1 : 0;\n saveType = 'b';\n break;\n case 'number':\n saveType = 'n';\n if (cell.cellStyle !== undefined && cell.cellStyle.name !== undefined) {\n if (this.globalStyles.has(cell.cellStyle.name)) {\n this.switchNumberFormat(this.globalStyles.get(cell.cellStyle.name).format, 'number');\n }\n }\n break;\n case 'string':\n this.sharedStringCount++;\n saveType = 's';\n var sstvalue = this.processCellValue(value, cell);\n if (!this.contains(this.sharedString, sstvalue)) {\n this.sharedString.push(sstvalue);\n }\n value = this.sharedString.indexOf(sstvalue);\n break;\n default:\n break;\n }\n cell.saveType = saveType;\n cell.value = value;\n };\n Workbook.prototype.parserImages = function (json, sheet) {\n var imagesLength = json.length;\n sheet.images = [];\n var imageId = 0;\n for (var p = 0; p < imagesLength; p++) {\n var image = this.parserImage(json[p]);\n sheet.images.push(image);\n }\n };\n Workbook.prototype.parseFilters = function (json, sheet) {\n sheet.autoFilters = new AutoFilters();\n if (json.row !== null && json.row !== undefined)\n sheet.autoFilters.row = json.row;\n else\n throw new Error('Argument Null Exception: row null or empty');\n if (json.lastRow !== null && json.lastRow !== undefined)\n sheet.autoFilters.lastRow = json.lastRow;\n else\n throw new Error('Argument Null Exception: lastRow cannot be null or empty');\n if (json.column !== null && json.column !== undefined)\n sheet.autoFilters.column = json.column;\n else\n throw new Error('Argument Null Exception: column cannot be null or empty');\n if (json.lastColumn !== null && json.row !== undefined)\n sheet.autoFilters.lastColumn = json.lastColumn;\n else\n throw new Error('Argument Null Exception: lastColumn cannot be null or empty');\n };\n Workbook.prototype.parserImage = function (json) {\n var image = new Image();\n if (json.image !== null && json.image !== undefined) {\n image.image = json.image;\n }\n if (json.row !== null && json.row !== undefined) {\n image.row = json.row;\n }\n if (json.column !== null && json.column !== undefined) {\n image.column = json.column;\n }\n if (json.lastRow !== null && json.lastRow !== undefined) {\n image.lastRow = json.lastRow;\n }\n if (json.lastColumn !== null && json.lastColumn !== undefined) {\n image.lastColumn = json.lastColumn;\n }\n if (json.width !== null && json.width !== undefined) {\n image.width = json.width;\n }\n if (json.height !== null && json.height !== undefined) {\n image.height = json.height;\n }\n if (json.horizontalFlip !== null && json.horizontalFlip !== undefined) {\n image.horizontalFlip = json.horizontalFlip;\n }\n if (json.verticalFlip !== null && json.verticalFlip !== undefined) {\n image.verticalFlip = json.verticalFlip;\n }\n if (json.rotation !== null && json.rotation !== undefined) {\n image.rotation = json.rotation;\n }\n return image;\n };\n Workbook.prototype.saveAsBlob = function (blobSaveType) {\n var _this = this;\n switch (blobSaveType) {\n case 'text/csv':\n return new Promise(function (resolve, reject) {\n var obj = {};\n obj.blobData = _this.csvHelper.saveAsBlob();\n resolve(obj);\n });\n default:\n return new Promise(function (resolve, reject) {\n _this.saveInternal();\n _this.mArchive.saveAsBlob().then(function (blob) {\n var obj = {};\n obj.blobData = new Blob([blob], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\n resolve(obj);\n });\n });\n }\n };\n Workbook.prototype.save = function (fileName, proxyUrl) {\n var _this = this;\n if (fileName === null || fileName === undefined || fileName === '') {\n throw new Error('Argument Null Exception: fileName cannot be null or empty');\n }\n var xlsxMatch = fileName.match('.xlsx$');\n var csvMatch = fileName.match('.csv$');\n if (xlsxMatch !== null && xlsxMatch[0] === ('.' + this.mSaveType)) {\n this.saveInternal();\n this.mArchive.save(fileName).then(function () {\n _this.mArchive.destroy();\n });\n }\n else if (csvMatch !== null && csvMatch[0] === ('.' + this.mSaveType)) {\n this.csvHelper.save(fileName);\n }\n else {\n throw Error('Save type and file extension is different.');\n }\n };\n Workbook.prototype.saveInternal = function () {\n this.saveWorkbook();\n this.saveWorksheets();\n this.saveSharedString();\n this.saveStyles();\n this.saveApp(this.builtInProperties);\n this.saveCore(this.builtInProperties);\n this.saveContentType();\n this.saveTopLevelRelation();\n this.saveWorkbookRelation();\n };\n Workbook.prototype.saveWorkbook = function () {\n /* tslint:disable-next-line:max-line-length */\n var workbookTemp = '';\n var sheets = '';\n var length = this.worksheets.length;\n for (var i = 0; i < length; i++) {\n /* tslint:disable-next-line:max-line-length */\n sheets += '';\n }\n sheets += '';\n workbookTemp += sheets;\n if (this.printTitles.size > 0) {\n var printTitle_1 = '';\n this.printTitles.forEach(function (value, key) {\n printTitle_1 += '' + value + '';\n });\n printTitle_1 += '';\n workbookTemp += printTitle_1;\n }\n this.addToArchive(workbookTemp + '', 'xl/workbook.xml');\n };\n Workbook.prototype.saveWorksheets = function () {\n var length = this.worksheets.length;\n for (var i = 0; i < length; i++) {\n this.saveWorksheet(this.worksheets[i], i);\n }\n };\n Workbook.prototype.saveWorksheet = function (sheet, index) {\n var sheetBlob = new BlobHelper();\n /* tslint:disable-next-line:max-line-length */\n var sheetString = '';\n if (!sheet.isSummaryRowBelow) {\n sheetString += ('' + '' + '' + '');\n }\n else {\n sheetString += ('');\n }\n sheetString += this.saveSheetView(sheet);\n if (sheet.columns !== undefined) {\n var colString = '';\n for (var _i = 0, _a = sheet.columns; _i < _a.length; _i++) {\n var column = _a[_i];\n /* tslint:disable-next-line:max-line-length */\n if (column.width !== undefined) {\n colString += '';\n }\n else {\n colString += '';\n }\n }\n sheetString += (colString + '');\n }\n sheetString += ('');\n sheetBlob.append(sheetString);\n sheetString = '';\n if (sheet.rows !== undefined) {\n for (var _b = 0, _c = sheet.rows; _b < _c.length; _b++) {\n var row = _c[_b];\n var rowString = '');\n for (var _d = 0, _e = row.cells; _d < _e.length; _d++) {\n var cell = _e[_d];\n if (cell !== undefined && (cell.value !== undefined || cell.cellStyle !== undefined)) {\n rowString += ('');\n if (cell.formula !== undefined) {\n rowString += ('' + cell.formula + '');\n }\n if (cell.value !== undefined) {\n rowString += ('' + cell.value + '');\n }\n else {\n rowString += ('');\n }\n }\n }\n rowString += ('');\n sheetBlob.append(rowString);\n }\n }\n sheetString += ('');\n /* tslint:disable-next-line:max-line-length */\n if (sheet.autoFilters !== null && sheet.autoFilters !== undefined)\n sheetString += ('');\n if (sheet.mergeCells.length > 0) {\n sheetString += ('');\n for (var _f = 0, _g = sheet.mergeCells; _f < _g.length; _f++) {\n var mCell = _g[_f];\n sheetString += ('');\n }\n sheetString += ('');\n }\n if (sheet.hyperLinks.length > 0) {\n sheetString += ('');\n for (var _h = 0, _j = sheet.hyperLinks; _h < _j.length; _h++) {\n var hLink = _j[_h];\n sheetString += ('');\n }\n sheetString += ('');\n }\n /* tslint:disable-next-line:max-line-length */\n sheetString += ('');\n if (sheet.images != undefined && sheet.images.length > 0) {\n this.drawingCount++;\n this.saveDrawings(sheet, sheet.index);\n sheetString += '';\n }\n this.addToArchive(this.saveSheetRelations(sheet), ('xl/worksheets/_rels/sheet' + sheet.index + '.xml.rels'));\n sheetBlob.append(sheetString + '');\n this.addToArchive(sheetBlob.getBlob(), 'xl/worksheets' + '/sheet' + (index + 1) + '.xml');\n };\n Workbook.prototype.saveDrawings = function (sheet, index) {\n var drawings = new BlobHelper();\n /* tslint:disable-next-line:max-line-length */\n var sheetDrawingString = '';\n if (sheet.images !== undefined) {\n var imgId = 0;\n for (var _i = 0, _a = sheet.images; _i < _a.length; _i++) {\n var pic = _a[_i];\n if (pic.height !== undefined && pic.width !== undefined) {\n this.updatelastRowOffset(sheet, pic);\n this.updatelastColumnOffSet(sheet, pic);\n }\n else if (pic.lastRow !== undefined && pic.lastColumn !== undefined) {\n pic.lastRowOffset = 0;\n pic.lastColOffset = 0;\n }\n imgId++;\n sheetDrawingString += '';\n sheetDrawingString += '';\n //col\n sheetDrawingString += pic.column - 1;\n sheetDrawingString += '';\n //colOff\n sheetDrawingString += 0;\n sheetDrawingString += '';\n //row\n sheetDrawingString += pic.row - 1;\n sheetDrawingString += '';\n //rowOff\n sheetDrawingString += 0;\n sheetDrawingString += '';\n sheetDrawingString += '';\n //col\n sheetDrawingString += pic.lastColumn;\n sheetDrawingString += '';\n //colOff\n sheetDrawingString += pic.lastColOffset;\n sheetDrawingString += '';\n //row\n sheetDrawingString += pic.lastRow;\n sheetDrawingString += '';\n //rowOff\n sheetDrawingString += pic.lastRowOffset;\n sheetDrawingString += '';\n sheetDrawingString += '';\n sheetDrawingString += '';\n sheetDrawingString += ' ';\n sheetDrawingString += ' ';\n sheetDrawingString += '';\n /* tslint:disable-next-line:max-line-length */\n sheetDrawingString += '';\n sheetDrawingString += '';\n sheetDrawingString += '';\n sheetDrawingString += '= -3600) {\n sheetDrawingString += ' rot=\"' + (pic.rotation * 60000) + '\"';\n }\n if (pic.verticalFlip != undefined && pic.verticalFlip != false) {\n sheetDrawingString += ' flipV=\"1\"';\n }\n if (pic.horizontalFlip != undefined && pic.horizontalFlip != false) {\n sheetDrawingString += ' flipH=\"1\"';\n }\n sheetDrawingString += '/>';\n sheetDrawingString += '';\n sheetDrawingString += '';\n var imageFile = new BlobHelper();\n var imageData = this.convertBase64toImage(pic.image);\n this.imageCount += 1;\n this.addToArchive(imageData, 'xl/media/image' + this.imageCount + '.png');\n }\n drawings.append(sheetDrawingString);\n drawings.append('');\n this.saveDrawingRelations(sheet);\n this.addToArchive(drawings.getBlob(), 'xl/drawings/drawing' + this.drawingCount + '.xml');\n }\n };\n Workbook.prototype.updatelastRowOffset = function (sheet, picture) {\n var iCurHeight = picture.height;\n var iCurRow = picture.row;\n var iCurOffset = 0;\n while (iCurHeight >= 0) {\n var iRowHeight = 0;\n if (sheet.rows !== undefined && sheet.rows[iCurRow - 1] !== undefined)\n iRowHeight = this.convertToPixels(sheet.rows[iCurRow - 1].height === undefined ? 15 : sheet.rows[iCurRow - 1].height);\n else\n iRowHeight = this.convertToPixels(15);\n var iSpaceInCell = iRowHeight - (iCurOffset * iRowHeight / 256);\n if (iSpaceInCell > iCurHeight) {\n picture.lastRow = iCurRow;\n picture.lastRowOffset = iCurOffset + (iCurHeight * 256 / iRowHeight);\n var rowHiddenHeight = 0;\n if (sheet.rows !== undefined && sheet.rows[iCurRow - 1] !== undefined)\n rowHiddenHeight = this.convertToPixels(sheet.rows[iCurRow - 1].height === undefined ? 15 : sheet.rows[iCurRow - 1].height);\n else\n rowHiddenHeight = this.convertToPixels(15);\n picture.lastRowOffset = (rowHiddenHeight * picture.lastRowOffset) / 256;\n picture.lastRowOffset = Math.round(picture.lastRowOffset / this.unitsProportions[7]);\n break;\n }\n else {\n iCurHeight -= iSpaceInCell;\n iCurRow++;\n iCurOffset = 0;\n }\n }\n };\n Workbook.prototype.updatelastColumnOffSet = function (sheet, picture) {\n var iCurWidth = picture.width;\n var iCurCol = picture.column;\n var iCurOffset = 0;\n while (iCurWidth >= 0) {\n var iColWidth = 0;\n if (sheet.columns !== undefined && sheet.columns[iCurCol - 1] !== undefined)\n iColWidth = this.ColumnWidthToPixels(sheet.columns[iCurCol - 1].width === undefined ? 8.43 : sheet.columns[iCurCol - 1].width);\n else\n iColWidth = this.ColumnWidthToPixels(8.43);\n var iSpaceInCell = iColWidth - (iCurOffset * iColWidth / 1024);\n if (iSpaceInCell > iCurWidth) {\n picture.lastColumn = iCurCol;\n picture.lastColOffset = iCurOffset + (iCurWidth * 1024 / iColWidth);\n var colHiddenWidth = 0;\n if (sheet.columns !== undefined && sheet.columns[iCurCol - 1] !== undefined)\n colHiddenWidth = this.ColumnWidthToPixels(sheet.columns[iCurCol - 1].width === undefined ? 8.43 : sheet.columns[iCurCol].width);\n else\n colHiddenWidth = this.ColumnWidthToPixels(8.43);\n picture.lastColOffset = (colHiddenWidth * picture.lastColOffset) / 1024;\n picture.lastColOffset = Math.round(picture.lastColOffset / this.unitsProportions[7]);\n break;\n }\n else {\n iCurWidth -= iSpaceInCell;\n iCurCol++;\n iCurOffset = 0;\n }\n }\n };\n Workbook.prototype.convertToPixels = function (value) {\n return value * this.unitsProportions[6];\n };\n Workbook.prototype.convertBase64toImage = function (img) {\n var byteStr = window.atob(img);\n var buffer = new ArrayBuffer(byteStr.length);\n var data = new Uint8Array(buffer);\n for (var i = 0; i < byteStr.length; i++) {\n data[i] = byteStr.charCodeAt(i);\n }\n var blob = new Blob([data], { type: 'image/png' });\n return blob;\n };\n Workbook.prototype.saveDrawingRelations = function (sheet) {\n /* tslint:disable-next-line:max-line-length */\n var drawingRelation = '';\n var length = sheet.images.length;\n var id = this.imageCount - sheet.images.length;\n for (var i = 1; i <= length; i++) {\n id++;\n /* tslint:disable-next-line:max-line-length */\n drawingRelation += '';\n }\n this.addToArchive((drawingRelation + ''), 'xl/drawings/_rels/drawing' + this.drawingCount + '.xml.rels');\n };\n Workbook.prototype.pixelsToColumnWidth = function (pixels) {\n var dDigitWidth = 7;\n var val = (pixels > dDigitWidth + 5) ?\n this.trunc((pixels - 5) / dDigitWidth * 100 + 0.5) / 100 :\n pixels / (dDigitWidth + 5);\n return (val > 1) ?\n ((val * dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0 :\n (val * (dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0;\n };\n Workbook.prototype.ColumnWidthToPixels = function (val) {\n var dDigitWidth = 7;\n var fileWidth = (val > 1) ?\n ((val * dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0 :\n (val * (dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0;\n return this.trunc(((256 * fileWidth + this.trunc(128 / dDigitWidth)) / 256) * dDigitWidth);\n };\n Workbook.prototype.trunc = function (x) {\n var n = x - x % 1;\n return n === 0 && (x < 0 || (x === 0 && (1 / x !== 1 / 0))) ? -0 : n;\n };\n Workbook.prototype.pixelsToRowHeight = function (pixels) {\n return (pixels * this.unitsProportions[5] / this.unitsProportions[6]);\n };\n Workbook.prototype.saveSheetRelations = function (sheet) {\n /* tslint:disable-next-line:max-line-length */\n var relStr = '';\n for (var _i = 0, _a = sheet.hyperLinks; _i < _a.length; _i++) {\n var hLink = _a[_i];\n /* tslint:disable-next-line:max-line-length */\n relStr += '';\n }\n if (sheet.images != undefined && sheet.images.length > 0) {\n /* tslint:disable-next-line:max-line-length */\n relStr += '';\n }\n relStr += '';\n return relStr;\n };\n Workbook.prototype.saveSheetView = function (sheet) {\n var paneString = ' 0) {\n /* tslint:disable-next-line:max-line-length */\n var sstStart = '';\n var si = '';\n for (var i = 0; i < length; i++) {\n if (this.sharedString[i].indexOf('') !== 0) {\n si += '';\n si += this.processString(this.sharedString[i]);\n si += '';\n }\n else {\n si += '';\n si += this.sharedString[i];\n si += '';\n }\n }\n si += '';\n this.addToArchive(sstStart + si, 'xl/sharedStrings.xml');\n }\n };\n Workbook.prototype.processString = function (value) {\n if (value.indexOf('&') !== -1) {\n value = value.replace(/&/g, '&');\n }\n if (value.indexOf('<') !== -1) {\n value = value.replace(/') !== -1) {\n value = value.replace(/>/g, '>');\n }\n return value;\n };\n Workbook.prototype.saveStyles = function () {\n this.updateCellXfsStyleXfs();\n /* tslint:disable-next-line:max-line-length */\n var styleTemp = '';\n styleTemp += this.saveNumberFormats();\n styleTemp += this.saveFonts();\n styleTemp += this.saveFills();\n styleTemp += this.saveBorders();\n styleTemp += this.saveCellStyleXfs();\n styleTemp += this.saveCellXfs();\n styleTemp += this.saveCellStyles();\n this.addToArchive(styleTemp + '', 'xl/styles.xml');\n };\n Workbook.prototype.updateCellXfsStyleXfs = function () {\n for (var _i = 0, _a = this.mStyles; _i < _a.length; _i++) {\n var style = _a[_i];\n var cellXfs = undefined;\n if (style.isGlobalStyle) {\n cellXfs = new CellStyleXfs();\n cellXfs.xfId = (style.index - 1);\n }\n else {\n cellXfs = new CellXfs();\n cellXfs.xfId = 0;\n }\n //Add font\n var compareFontResult = this.isNewFont(style);\n if (!compareFontResult.result) {\n var font = new Font();\n font.b = style.bold;\n font.i = style.italic;\n font.name = style.fontName;\n font.sz = style.fontSize;\n font.u = style.underline;\n font.color = ('FF' + style.fontColor.replace('#', ''));\n this.mFonts.push(font);\n cellXfs.fontId = this.mFonts.length - 1;\n }\n else {\n cellXfs.fontId = compareFontResult.index;\n }\n //Add fill\n if (style.backColor !== 'none') {\n var backColor = 'FF' + style.backColor.replace('#', '');\n if (this.mFills.has(backColor)) {\n var fillId = this.mFills.get(backColor);\n cellXfs.fillId = fillId;\n }\n else {\n var fillId = this.mFills.size + 2;\n this.mFills.set(backColor, fillId);\n cellXfs.fillId = (fillId);\n }\n }\n else {\n cellXfs.fillId = 0;\n }\n //Add border \n if (!this.isNewBorder(style)) {\n this.mBorders.push(style.borders);\n cellXfs.borderId = this.mBorders.length;\n }\n else {\n cellXfs.borderId = 0;\n }\n //Add Number Format \n if (style.numberFormat !== 'GENERAL') {\n if (this.mNumFmt.has(style.numberFormat)) {\n var numFmt = this.mNumFmt.get(style.numberFormat);\n cellXfs.numFmtId = numFmt.numFmtId;\n }\n else {\n var id = this.mNumFmt.size + 164;\n this.mNumFmt.set(style.numberFormat, new NumFmt(id, style.numberFormat));\n cellXfs.numFmtId = id;\n }\n }\n else {\n if (style.numberFormat === 'GENERAL' && style.numFmtId === 14) {\n cellXfs.numFmtId = 14;\n }\n else {\n cellXfs.numFmtId = 0;\n }\n }\n //Add alignment \n if (!style.isGlobalStyle) {\n cellXfs.applyAlignment = 1;\n }\n cellXfs.alignment = new Alignment();\n cellXfs.alignment.indent = style.indent;\n cellXfs.alignment.horizontal = style.hAlign;\n cellXfs.alignment.vertical = style.vAlign;\n cellXfs.alignment.wrapText = style.wrapText ? 1 : 0;\n cellXfs.alignment.rotation = style.rotation;\n if (style.isGlobalStyle) {\n this.mCellStyleXfs.push(cellXfs);\n this.mCellXfs.push(cellXfs);\n }\n else {\n //Add cellxfs\n this.mCellXfs.push(cellXfs);\n }\n }\n };\n Workbook.prototype.saveNumberFormats = function () {\n if (this.mNumFmt.size >= 1) {\n var numFmtStyle_1 = '';\n this.mNumFmt.forEach(function (value, key) {\n numFmtStyle_1 += '';\n });\n return (numFmtStyle_1 += '');\n }\n else {\n return '';\n }\n };\n Workbook.prototype.saveFonts = function () {\n /* tslint:disable-next-line:max-line-length */\n var fontStyle = '';\n if (this.mFonts.length >= 1) {\n for (var _i = 0, _a = this.mFonts; _i < _a.length; _i++) {\n var font = _a[_i];\n fontStyle += '';\n if (font.b) {\n fontStyle += '';\n }\n if (font.i) {\n fontStyle += '';\n }\n if (font.u) {\n fontStyle += '';\n }\n fontStyle += '';\n fontStyle += '';\n fontStyle += '';\n }\n }\n return fontStyle + '';\n };\n Workbook.prototype.saveFills = function () {\n /* tslint:disable-next-line:max-line-length */\n var fillsStyle = '';\n if (this.mFills.size >= 1) {\n this.mFills.forEach(function (value, key) {\n /* tslint:disable-next-line:max-line-length */\n fillsStyle += '';\n });\n }\n return fillsStyle + '';\n };\n Workbook.prototype.saveBorders = function () {\n /* tslint:disable-next-line:max-line-length */\n var bordersStyle = '';\n if (this.mBorders.length >= 1) {\n for (var _i = 0, _a = this.mBorders; _i < _a.length; _i++) {\n var borders = _a[_i];\n if (this.isAllBorder(borders)) {\n var color = borders.all.color.replace('#', '');\n var lineStyle = borders.all.lineStyle;\n /* tslint:disable-next-line:max-line-length */\n bordersStyle += '';\n }\n else {\n /* tslint:disable-next-line:max-line-length */\n bordersStyle += '';\n }\n }\n }\n return bordersStyle + '';\n };\n Workbook.prototype.saveCellStyles = function () {\n var _this = this;\n var cellStyleString = '';\n this.cellStyles.forEach(function (value, key) {\n cellStyleString += '';\n if (this.mCellStyleXfs.length >= 1) {\n for (var _i = 0, _a = this.mCellStyleXfs; _i < _a.length; _i++) {\n var cellStyleXf = _a[_i];\n /* tslint:disable-next-line:max-line-length */\n cellXfsStyle += '';\n }\n else {\n cellXfsStyle += ' />';\n }\n }\n }\n return cellXfsStyle + '';\n };\n Workbook.prototype.saveCellXfs = function () {\n /* tslint:disable-next-line:max-line-length */\n var cellXfsStyle = '';\n if (this.mCellXfs.length >= 1) {\n for (var _i = 0, _a = this.mCellXfs; _i < _a.length; _i++) {\n var cellXf = _a[_i];\n /* tslint:disable-next-line:max-line-length */\n cellXfsStyle += '';\n }\n }\n return cellXfsStyle + '';\n };\n Workbook.prototype.saveAlignment = function (cellXf) {\n var alignString = '';\n return alignString;\n };\n Workbook.prototype.saveApp = function (builtInProperties) {\n /* tslint:disable-next-line:max-line-length */\n var appString = 'Essential XlsIO';\n if (builtInProperties !== undefined) {\n if (builtInProperties.manager !== undefined) {\n appString += '' + builtInProperties.manager + '';\n }\n if (builtInProperties.company !== undefined) {\n appString += '' + builtInProperties.company + '';\n }\n }\n this.addToArchive((appString + ''), 'docProps/app.xml');\n };\n Workbook.prototype.saveCore = function (builtInProperties) {\n var createdDate = new Date();\n /* tslint:disable-next-line:max-line-length */\n var coreString = '';\n if (this.builtInProperties !== undefined) {\n if (builtInProperties.author !== undefined) {\n coreString += '' + builtInProperties.author + '';\n }\n if (builtInProperties.subject !== undefined) {\n coreString += '' + builtInProperties.subject + '';\n }\n if (builtInProperties.category !== undefined) {\n coreString += '' + builtInProperties.category + '';\n }\n if (builtInProperties.comments !== undefined) {\n coreString += '' + builtInProperties.comments + '';\n }\n if (builtInProperties.title !== undefined) {\n coreString += '' + builtInProperties.title + '';\n }\n if (builtInProperties.tags !== undefined) {\n coreString += '' + builtInProperties.tags + '';\n }\n if (builtInProperties.status !== undefined) {\n coreString += '' + builtInProperties.status + '';\n }\n if (builtInProperties.createdDate !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n coreString += '' + builtInProperties.createdDate.toISOString() + '';\n }\n else {\n coreString += '' + createdDate.toISOString() + '';\n }\n if (builtInProperties.modifiedDate !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n coreString += '' + builtInProperties.modifiedDate.toISOString() + '';\n }\n else {\n coreString += '' + createdDate.toISOString() + '';\n }\n }\n else {\n coreString += '' + createdDate.toISOString() + '';\n coreString += '' + createdDate.toISOString() + '';\n }\n /* tslint:disable-next-line:max-line-length */\n coreString += '';\n this.addToArchive(coreString, 'docProps/core.xml');\n };\n Workbook.prototype.saveTopLevelRelation = function () {\n /* tslint:disable-next-line:max-line-length */\n var topRelation = '';\n this.addToArchive(topRelation, '_rels/.rels');\n };\n Workbook.prototype.saveWorkbookRelation = function () {\n /* tslint:disable-next-line:max-line-length */\n var wbRelation = '';\n var length = this.worksheets.length;\n var count = 0;\n for (var i = 0; i < length; i++, count++) {\n /* tslint:disable-next-line:max-line-length */\n wbRelation += '';\n }\n /* tslint:disable-next-line:max-line-length */\n wbRelation += '';\n if (this.sharedStringCount > 0) {\n /* tslint:disable-next-line:max-line-length */\n wbRelation += '';\n }\n this.addToArchive((wbRelation + ''), 'xl/_rels/workbook.xml.rels');\n };\n Workbook.prototype.saveContentType = function () {\n /* tslint:disable-next-line:max-line-length */\n var contentTypeString = '';\n var sheetsOverride = '';\n var length = this.worksheets.length;\n for (var i = 0; i < length; i++) {\n /* tslint:disable-next-line:max-line-length */\n sheetsOverride += '';\n if (this.worksheets[i].images != undefined && this.worksheets[i].images.length > 0) {\n /* tslint:disable-next-line:max-line-length */\n sheetsOverride += '';\n }\n }\n if (this.imageCount > 0)\n sheetsOverride += '';\n if (this.sharedStringCount > 0) {\n /* tslint:disable-next-line:max-line-length */\n contentTypeString += '';\n }\n this.addToArchive((contentTypeString + sheetsOverride + ''), '[Content_Types].xml');\n };\n Workbook.prototype.addToArchive = function (xmlString, itemName) {\n if (typeof (xmlString) === 'string') {\n var blob = new Blob([xmlString], { type: 'text/plain' });\n var archiveItem = new ZipArchiveItem(blob, itemName);\n this.mArchive.addItem(archiveItem);\n }\n else {\n var archiveItem = new ZipArchiveItem(xmlString, itemName);\n this.mArchive.addItem(archiveItem);\n }\n };\n Workbook.prototype.processMergeCells = function (cell, rowIndex, mergeCells) {\n if (cell.rowSpan !== 0 || cell.colSpan !== 0) {\n var mCell = new MergeCell();\n mCell.x = cell.index;\n mCell.width = cell.colSpan;\n mCell.y = rowIndex;\n mCell.height = cell.rowSpan;\n var startCell = this.getCellName(mCell.y, mCell.x);\n var endCell = this.getCellName(rowIndex + mCell.height, cell.index + mCell.width);\n mCell.ref = startCell + ':' + endCell;\n var mergedCell = mergeCells.add(mCell);\n var start = { x: mCell.x, y: mCell.y };\n var end = {\n x: (cell.index + mCell.width), y: (rowIndex + mCell.height)\n };\n this.updatedMergedCellStyles(start, end, cell);\n }\n return mergeCells;\n };\n Workbook.prototype.updatedMergedCellStyles = function (sCell, eCell, cell) {\n for (var x = sCell.x; x <= eCell.x; x++) {\n for (var y = sCell.y; y <= eCell.y; y++) {\n this.mergedCellsStyle.set(this.getCellName(y, x), { x: x, y: y, styleIndex: cell.styleIndex });\n }\n }\n };\n /**\n * Returns the tick count corresponding to the given year, month, and day.\n * @param year number value of year\n * @param month number value of month\n * @param day number value of day\n */\n Workbook.prototype.dateToTicks = function (year, month, day) {\n var ticksPerDay = 10000 * 1000 * 60 * 60 * 24;\n var daysToMonth365 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\n var daysToMonth366 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\n if (year >= 1 && year <= 9999 && month >= 1 && month <= 12) {\n var days = this.isLeapYear(year) ? daysToMonth366 : daysToMonth365;\n var y = year - 1;\n var n = y * 365 + ((y / 4) | 0) - ((y / 100) | 0) + ((y / 400) | 0) + days[month - 1] + day - 1;\n return n * ticksPerDay;\n }\n throw new Error('Not a valid date');\n };\n /**\n * Return the tick count corresponding to the given hour, minute, second.\n * @param hour number value of hour\n * @param minute number value if minute\n * @param second number value of second\n */\n Workbook.prototype.timeToTicks = function (hour, minute, second) {\n if (hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60) {\n var totalSeconds = hour * 3600 + minute * 60 + second;\n return totalSeconds * 10000 * 1000;\n }\n throw new Error('Not valid time');\n };\n /**\n * Checks if given year is a leap year.\n * @param year Year value.\n */\n Workbook.prototype.isLeapYear = function (year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n };\n /**\n * Converts `DateTime` to the equivalent OLE Automation date.\n */\n Workbook.prototype.toOADate = function (date) {\n var ticks = 0;\n /* tslint:disable-next-line:max-line-length */\n ticks = this.dateToTicks(date.getFullYear(), (date.getMonth() + 1), date.getDate()) + this.timeToTicks(date.getHours(), date.getMinutes(), date.getSeconds());\n if (ticks === 0) {\n return 0.0;\n }\n var ticksPerDay = 10000 * 1000 * 60 * 60 * 24;\n var daysTo1899 = (((365 * 4 + 1) * 25 - 1) * 4 + 1) * 4 + ((365 * 4 + 1) * 25 - 1) * 3 - 367;\n var doubleDateOffset = daysTo1899 * ticksPerDay;\n var oaDateMinAsTicks = (((365 * 4 + 1) * 25 - 1) - 365) * ticksPerDay;\n if (ticks < oaDateMinAsTicks) {\n throw new Error('Arg_OleAutDateInvalid');\n }\n var millisPerDay = 1000 * 60 * 60 * 24;\n return ((ticks - doubleDateOffset) / 10000) / millisPerDay;\n };\n return Workbook;\n}());\nexport { Workbook };\n/**\n * BuiltInProperties Class\n * @private\n */\nvar BuiltInProperties = /** @class */ (function () {\n function BuiltInProperties() {\n }\n return BuiltInProperties;\n}());\nexport { BuiltInProperties };\n","import * as events from '../base/constant';\nimport { Workbook } from '@syncfusion/ej2-excel-export';\nimport { isNullOrUndefined, getEnumValue, compile, getValue, detach, extend, isBlazor } from '@syncfusion/ej2-base';\nimport { Data } from '../actions/data';\nimport { ExportHelper, ExportValueFormatter } from './export-helper';\nimport { SummaryModelGenerator, GroupSummaryModelGenerator, CaptionSummaryModelGenerator } from '../services/summary-model-generator';\nimport { CellType } from '../base/enum';\nimport { Query, DataManager } from '@syncfusion/ej2-data';\nimport { getPrintGridModel, getUid, isExportColumns, updateColumnTypeForExportColumns, prepareColumns, measureColumnDepth } from '../base/util';\n/**\n * @hidden\n * `ExcelExport` module is used to handle the Excel export action.\n */\nvar ExcelExport = /** @class */ (function () {\n /**\n * Constructor for the Grid Excel Export module.\n * @hidden\n */\n function ExcelExport(parent, locator) {\n /* tslint:disable-next-line:no-any */\n this.book = {};\n this.workSheet = [];\n this.rows = [];\n this.columns = [];\n this.styles = [];\n this.rowLength = 1;\n this.expType = 'AppendToSheet';\n this.includeHiddenColumn = false;\n this.isCsvExport = false;\n this.isElementIdChanged = false;\n this.foreignKeyData = {};\n this.gridPool = {};\n this.sheet = {};\n this.parent = parent;\n this.helper = new ExportHelper(parent);\n this.locator = locator;\n this.l10n = this.locator.getService('localization');\n }\n /**\n * For internal use only - Get the module name.\n */\n ExcelExport.prototype.getModuleName = function () {\n return 'ExcelExport';\n };\n ExcelExport.prototype.init = function (gObj) {\n if (gObj.element !== null && gObj.element.id === '') {\n gObj.element.id = new Date().toISOString();\n this.isElementIdChanged = true;\n }\n this.parent = gObj;\n if (this.parent.isDestroyed) {\n return;\n }\n this.isExporting = undefined;\n this.book = {};\n this.workSheet = [];\n this.rows = [];\n this.columns = [];\n this.styles = [];\n this.rowLength = 1;\n this.footer = undefined;\n this.expType = 'AppendToSheet';\n this.includeHiddenColumn = false;\n this.exportValueFormatter = new ExportValueFormatter(gObj.locale);\n gObj.id = getUid('main-grid');\n this.gridPool[gObj.id] = false;\n };\n /**\n * Export Grid to Excel file.\n * @param {exportProperties} exportProperties - Defines the export properties of the Grid.\n * @param {isMultipleExport} isMultipleExport - Defines is multiple Grid's are exported.\n * @param {workbook} workbook - Defined the Workbook if multiple Grid is exported.\n * @param {isCsv} isCsv - true if export to CSV.\n * @return {Promise}\n */\n /* tslint:disable-next-line:max-line-length */\n /* tslint:disable-next-line:no-any */\n ExcelExport.prototype.Map = function (grid, exportProperties, isMultipleExport, workbook, isCsv, isBlob) {\n var gObj = grid;\n var cancel = 'cancel';\n var isBlb = 'isBlob';\n var csv = 'isCsv';\n var workbk = 'workbook';\n var isMultiEx = 'isMultipleExport';\n this.gridPool = {};\n if (grid.childGrid && !(!isNullOrUndefined(exportProperties) && exportProperties.hierarchyExportMode === 'None')) {\n grid.expandedRows = getPrintGridModel(grid).expandedRows;\n }\n var args = {\n requestType: 'beforeExcelExport', gridObject: gObj, cancel: false,\n isMultipleExport: isMultipleExport, workbook: workbook, isCsv: isCsv, isBlob: isBlob\n };\n gObj.trigger(events.beforeExcelExport, args);\n if (args[cancel]) {\n return new Promise(function (resolve, reject) {\n return resolve();\n });\n }\n this.parent.log('exporting_begin', this.getModuleName());\n this.data = new Data(gObj);\n this.isExporting = true;\n this.isBlob = args[isBlb];\n if (args[csv]) {\n this.isCsvExport = args[csv];\n }\n else {\n this.isCsvExport = false;\n }\n if (isExportColumns(exportProperties)) {\n updateColumnTypeForExportColumns(exportProperties, gObj);\n }\n return this.processRecords(gObj, exportProperties, args[isMultiEx], args[workbk]);\n };\n ExcelExport.prototype.exportingSuccess = function (resolve) {\n this.isExporting = false;\n this.parent.trigger(events.excelExportComplete, this.isBlob ? { promise: this.blobPromise } : {});\n this.parent.log('exporting_complete', this.getModuleName());\n resolve(this.book);\n this.sheet.images = [];\n };\n /* tslint:disable-next-line:no-any */\n ExcelExport.prototype.processRecords = function (gObj, exportProperties, isMultipleExport, workbook) {\n var _this = this;\n if (!isNullOrUndefined(exportProperties) && !isNullOrUndefined(exportProperties.dataSource)) {\n if (!(exportProperties.dataSource instanceof DataManager)) {\n exportProperties.dataSource = new DataManager(exportProperties.dataSource);\n }\n var query_1 = exportProperties.query ? exportProperties.query : new Query();\n if (isNullOrUndefined(query_1.isCountRequired) || gObj.aggregates) {\n query_1.isCountRequired = true;\n }\n return new Promise(function (resolve, reject) {\n var dataManager = exportProperties.dataSource.executeQuery(query_1);\n dataManager.then(function (r) {\n _this.init(gObj);\n _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, r).then(function () {\n _this.exportingSuccess(resolve);\n });\n });\n });\n }\n else if (!isNullOrUndefined(exportProperties) && exportProperties.exportType === 'CurrentPage') {\n return new Promise(function (resolve, reject) {\n _this.init(gObj);\n _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, _this.parent.getCurrentViewRecords());\n _this.exportingSuccess(resolve);\n });\n }\n else {\n var allPromise_1 = [];\n allPromise_1.push(this.data.getData({}, ExportHelper.getQuery(gObj, this.data)));\n allPromise_1.push(this.helper.getColumnData(gObj));\n return new Promise(function (resolve, reject) {\n Promise.all(allPromise_1).then(function (e) {\n _this.init(gObj);\n _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, e[0]).then(function () {\n _this.exportingSuccess(resolve);\n });\n }).catch(function (e) {\n reject(_this.book);\n _this.parent.trigger(events.actionFailure, e);\n });\n });\n }\n };\n /* tslint:disable-next-line:max-func-body-length */\n ExcelExport.prototype.processInnerRecords = function (gObj, exportProperties, \n /* tslint:disable-next-line:no-any */\n isMultipleExport, workbook, r) {\n var _this = this;\n this.groupedColLength = gObj.groupSettings.columns.length;\n var blankRows = 5;\n var separator;\n var rows = [];\n var colDepth = measureColumnDepth(gObj.columns);\n var isExportPropertiesPresent = !isNullOrUndefined(exportProperties);\n if (isExportPropertiesPresent && !isNullOrUndefined(exportProperties.multipleExport)) {\n /* tslint:disable-next-line:max-line-length */\n this.expType = (!isNullOrUndefined(exportProperties.multipleExport.type) ? exportProperties.multipleExport.type : 'AppendToSheet');\n if (!isNullOrUndefined(exportProperties.multipleExport.blankRows)) {\n blankRows = exportProperties.multipleExport.blankRows;\n }\n }\n if (isNullOrUndefined(workbook)) {\n this.workSheet = [];\n this.rows = [];\n this.columns = [];\n this.styles = [];\n }\n else if (this.expType === 'NewSheet') {\n this.workSheet = workbook.worksheets;\n this.rows = [];\n this.columns = [];\n this.styles = workbook.styles;\n }\n else {\n this.workSheet = [];\n this.rows = workbook.worksheets[0].rows;\n this.columns = workbook.worksheets[0].columns;\n this.styles = workbook.styles;\n this.rowLength = (this.rows[this.rows.length - 1].index + blankRows);\n this.rowLength++;\n }\n if (isExportPropertiesPresent) {\n if (!isNullOrUndefined(isMultipleExport)) {\n if (!isNullOrUndefined(exportProperties.header) && (isMultipleExport || this.expType === 'NewSheet')) {\n this.processExcelHeader(JSON.parse(JSON.stringify(exportProperties.header)));\n }\n if (!isNullOrUndefined(exportProperties.footer)) {\n if (this.expType === 'AppendToSheet') {\n if (!isMultipleExport) {\n this.footer = JSON.parse(JSON.stringify(exportProperties.footer));\n }\n }\n else {\n this.footer = JSON.parse(JSON.stringify(exportProperties.footer));\n }\n }\n }\n else {\n if (!isNullOrUndefined(exportProperties.header)) {\n this.processExcelHeader(JSON.parse(JSON.stringify(exportProperties.header)));\n }\n if (!isNullOrUndefined(exportProperties.footer)) {\n this.footer = JSON.parse(JSON.stringify(exportProperties.footer));\n }\n }\n }\n this.includeHiddenColumn = (isExportPropertiesPresent ? exportProperties.includeHiddenColumn : false);\n return new Promise(function (resolve, reject) {\n gObj.childGridLevel = 0;\n rows = _this.processGridExport(gObj, exportProperties, r);\n _this.globalResolve = resolve;\n _this.gridPool[gObj.id] = true;\n _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);\n }).then(function () {\n var organisedRows = [];\n _this.organiseRows(rows, rows[0].index, organisedRows);\n _this.rows = _this.rows.concat(organisedRows);\n //footer template add\n if (!isNullOrUndefined(_this.footer)) {\n if ((_this.expType === 'AppendToSheet' && !isMultipleExport) || (_this.expType === 'NewSheet')) {\n _this.processExcelFooter(_this.footer);\n }\n }\n if (_this.columns.length > 0) {\n _this.sheet.columns = _this.columns;\n }\n /* tslint:disable-next-line:no-any */\n _this.sheet.rows = _this.rows;\n _this.sheet.enableRtl = _this.parent.enableRtl;\n if (_this.parent.allowFiltering && gObj.getVisibleColumns().length && isExportPropertiesPresent &&\n exportProperties.enableFilter) {\n var autoFilters = {\n row: colDepth, column: _this.groupedColLength ? _this.groupedColLength + 1 :\n _this.sheet.columns[0].index, lastRow: _this.sheet.rows.length, lastColumn: _this.sheet.columns.length\n };\n _this.sheet.autoFilters = autoFilters;\n }\n _this.workSheet.push(_this.sheet);\n _this.book.worksheets = _this.workSheet;\n _this.book.styles = _this.styles;\n gObj.notify('finalPageSetup', _this.book);\n if (!isMultipleExport) {\n if (_this.isCsvExport) {\n if (isBlazor() && gObj.isServerRendered) {\n _this.book.isServerRendered = gObj.isServerRendered;\n }\n if (isExportPropertiesPresent && !isNullOrUndefined(exportProperties.separator)\n && exportProperties.separator !== ',') {\n separator = exportProperties.separator;\n }\n /* tslint:disable-next-line:max-line-length */\n var book = new Workbook(_this.book, 'csv', gObj.locale, gObj.currencyCode, separator);\n if (!_this.isBlob) {\n if (isExportPropertiesPresent && exportProperties.fileName) {\n book.save(exportProperties.fileName);\n }\n else {\n book.save('Export.csv');\n }\n }\n else {\n _this.blobPromise = book.saveAsBlob('text/csv');\n }\n }\n else {\n var book = new Workbook(_this.book, 'xlsx', gObj.locale, gObj.currencyCode);\n if (!_this.isBlob) {\n if (isExportPropertiesPresent && exportProperties.fileName) {\n book.save(exportProperties.fileName);\n }\n else {\n book.save('Export.xlsx');\n }\n }\n else {\n _this.blobPromise = book.saveAsBlob('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n }\n }\n if (_this.isElementIdChanged) {\n gObj.element.id = '';\n }\n delete gObj.expandedRows;\n }\n return workbook;\n });\n };\n ExcelExport.prototype.organiseRows = function (rows, initialIndex, organisedRows) {\n if (!rows.length) {\n return initialIndex;\n }\n for (var i = 0; i < rows.length; i++) {\n var row = rows[i];\n var childRows = row.childRows;\n if (childRows) {\n row.index = initialIndex++;\n delete row.childRows;\n organisedRows.push(row);\n initialIndex = this.organiseRows(childRows, initialIndex, organisedRows);\n }\n else {\n row.index = initialIndex++;\n organisedRows.push(row);\n }\n }\n return initialIndex;\n };\n ExcelExport.prototype.processGridExport = function (gObj, exportProperties, r) {\n var excelRows = [];\n var isFrozen = this.parent.isFrozenGrid() && !this.parent.getFrozenColumns();\n if (!isNullOrUndefined(exportProperties) && !isNullOrUndefined(exportProperties.theme)) {\n this.theme = exportProperties.theme;\n }\n if (gObj.childGrid && !isNullOrUndefined(exportProperties)) {\n gObj.hierarchyPrintMode = exportProperties.hierarchyExportMode || 'Expanded';\n }\n var helper = new ExportHelper(gObj);\n var gColumns = isExportColumns(exportProperties) ?\n prepareColumns(exportProperties.columns, gObj.enableColumnVirtualization) :\n helper.getGridExportColumns(isFrozen ? gObj.getColumns() : gObj.columns);\n var headerRow = helper.getHeaders(gColumns, this.includeHiddenColumn);\n var groupIndent = gObj.groupSettings.columns.length;\n excelRows = this.processHeaderContent(gObj, headerRow, groupIndent, excelRows);\n /* tslint:disable-next-line:max-line-length */\n if (!isNullOrUndefined(exportProperties) && !isNullOrUndefined(exportProperties.dataSource) && !(exportProperties.dataSource instanceof DataManager)) {\n excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, exportProperties.dataSource, excelRows, helper);\n }\n else if (!isNullOrUndefined(exportProperties) && exportProperties.exportType === 'CurrentPage') {\n excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, gObj.currentViewData, excelRows, helper);\n }\n else {\n excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, undefined, excelRows, helper);\n }\n gObj.notify(events.exportDataBound, { excelRows: excelRows, type: 'excel' });\n return excelRows;\n };\n ExcelExport.prototype.processRecordContent = function (gObj, returnType, headerRow, exportProperties, currentViewRecords, excelRow, helper) {\n var record;\n if (!isNullOrUndefined(currentViewRecords) && currentViewRecords.length) {\n record = currentViewRecords;\n }\n else {\n record = returnType.result;\n }\n if (!isNullOrUndefined(record.level)) {\n this.processGroupedRows(gObj, record, headerRow, record.level, 0, exportProperties, excelRow, helper);\n }\n else {\n this.processRecordRows(gObj, record, headerRow, 0, 0, exportProperties, excelRow, helper);\n }\n if (!isNullOrUndefined(returnType.aggregates)) {\n if (!isNullOrUndefined(currentViewRecords)) {\n this.processAggregates(gObj, returnType.result, excelRow, currentViewRecords);\n }\n else {\n var result = returnType.result.GroupGuid ?\n returnType.result.records : returnType.result;\n this.processAggregates(gObj, result, excelRow);\n }\n }\n return excelRow;\n };\n /* tslint:disable-next-line:no-any */\n ExcelExport.prototype.processGroupedRows = function (gObj, dataSource, headerRow, level, startIndex, excelExportProperties, excelRows, helper) {\n for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {\n var item = dataSource_1[_i];\n var cells = [];\n var index = 1;\n /* tslint:disable-next-line:no-any */\n var cell = {};\n cell.index = index + level;\n var col = gObj.getColumnByField(item.field);\n /* tslint:disable-next-line:no-any */\n var args = {\n value: item.key,\n column: col,\n style: undefined,\n isForeignKey: col.isForeignColumn(),\n };\n var value = gObj.getColumnByField(item.field).headerText +\n ': ' + (!col.enableGroupByFormat ? this.exportValueFormatter.formatCellValue(args) : item.key) + ' - ';\n if (item.count > 1) {\n value += item.count + ' items';\n }\n else {\n value += item.count + ' item';\n }\n var cArgs = { captionText: value, type: this.isCsvExport ? 'CSV' : 'Excel' };\n this.parent.trigger(events.exportGroupCaption, cArgs);\n cell.value = cArgs.captionText;\n cell.style = this.getCaptionThemeStyle(this.theme);\n var captionModelGen = new CaptionSummaryModelGenerator(gObj);\n var groupCaptionSummaryRows = captionModelGen.generateRows(item);\n this.fillAggregates(gObj, groupCaptionSummaryRows, dataSource.level + dataSource.childLevels, excelRows, this.rowLength);\n cells.push(cell);\n if (excelRows[excelRows.length - 1].cells.length > 0) {\n var lIndex = dataSource.level + dataSource.childLevels + groupCaptionSummaryRows[0].cells.length;\n var hIndex = 0;\n for (var _a = 0, _b = excelRows[excelRows.length - 1].cells; _a < _b.length; _a++) {\n var tCell = _b[_a];\n if (tCell.index < lIndex) {\n lIndex = tCell.index;\n }\n if (tCell.index > hIndex) {\n hIndex = tCell.index;\n }\n if (cells[cells.length - 1].index !== tCell.index) {\n cells.push(tCell);\n }\n }\n if ((lIndex - cell.index) > 1) {\n cell.colSpan = lIndex - cell.index;\n }\n while (hIndex < (headerRow.columns.length + level + dataSource.childLevels)) {\n /* tslint:disable-next-line:no-any */\n var sCell = {};\n sCell.index = (hIndex + 1);\n sCell.style = this.getCaptionThemeStyle(this.theme);\n cells.push(sCell);\n hIndex++;\n }\n }\n else {\n var span = 0;\n //Calculation for column span when group caption dont have aggregates\n for (var _c = 0, _d = headerRow.columns; _c < _d.length; _c++) {\n var col_1 = _d[_c];\n if (col_1.visible) {\n span++;\n }\n }\n cell.colSpan = (dataSource.childLevels + span);\n }\n excelRows[excelRows.length - 1].cells = cells;\n this.rowLength++;\n if (this.groupedColLength < 8 && level > 1) {\n var grouping = { outlineLevel: level - 1, isCollapsed: true };\n excelRows[excelRows.length - 1].grouping = grouping;\n }\n if (!isNullOrUndefined(dataSource.childLevels) && dataSource.childLevels > 0) {\n this.processGroupedRows(gObj, item.items, headerRow, item.items.level, startIndex, excelExportProperties, excelRows, helper);\n this.processAggregates(gObj, item, excelRows, undefined, (level) + dataSource.childLevels, true);\n }\n else {\n startIndex = this.processRecordRows(gObj, item.items, headerRow, (level), startIndex, excelExportProperties, excelRows, helper);\n this.processAggregates(gObj, item, excelRows, undefined, (level), true);\n }\n }\n };\n /* tslint:disable-next-line:max-func-body-length */\n ExcelExport.prototype.processRecordRows = function (gObj, record, headerRow, level, startIndex, excelExportProperties, excelRows, helper) {\n var index = 1;\n var cells = [];\n var columns = headerRow.columns;\n var rows = helper.getGridRowModel(columns, record, gObj, startIndex);\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n cells = [];\n startIndex++;\n index = 1;\n var templateRowHeight = void 0;\n for (var c = 0, len = row.cells.length; c < len; c++) {\n var gCell = row.cells[c];\n if (gCell.cellType !== CellType.Data) {\n continue;\n }\n var column = gCell.column;\n var field = column.field;\n var cellValue = !isNullOrUndefined(field) ? column.valueAccessor(field, row.data, column) : '';\n var value = !isNullOrUndefined(cellValue) ? cellValue : '';\n var fkData = void 0;\n if (column.isForeignColumn && column.isForeignColumn()) {\n fkData = helper.getFData(value, column);\n value = getValue(column.foreignKeyValue, fkData);\n }\n if (!isNullOrUndefined(value)) {\n var cell = {};\n var idx = index + level + gObj.childGridLevel;\n /* tslint:disable-next-line:no-any */\n var excelCellArgs = {\n data: row.data, column: column, foreignKeyData: fkData,\n value: value, style: undefined, colSpan: 1, cell: cell\n };\n gObj.trigger(events.excelQueryCellInfo, excelCellArgs);\n if (!isNullOrUndefined(excelCellArgs.image) && !isNullOrUndefined(excelCellArgs.image.base64)) {\n if (isNullOrUndefined(this.sheet.images)) {\n this.sheet.images = [];\n }\n /* tslint:disable-next-line:no-any */\n var excelImage = {\n image: excelCellArgs.image.base64, row: this.rowLength, column: idx,\n lastRow: this.rowLength, lastColumn: idx\n };\n this.sheet.images.push(excelImage);\n templateRowHeight = excelCellArgs.image.height || 50;\n this.columns[idx - 1].width = excelCellArgs.image.width || this.columns[idx - 1].width;\n }\n if (!isNullOrUndefined(excelCellArgs.hyperLink)) {\n excelCellArgs.cell.hyperlink = { target: excelCellArgs.hyperLink.target };\n excelCellArgs.value = excelCellArgs.hyperLink.displayText || excelCellArgs.value;\n }\n cell = excelCellArgs.cell;\n cell.index = idx;\n cell.value = excelCellArgs.value;\n if (excelCellArgs.data === '' && gObj.childGridLevel && index === 1) {\n var style = {};\n style.hAlign = 'left';\n excelCellArgs = { style: style };\n cell.colSpan = gObj.getVisibleColumns().length;\n cell.value = this.l10n.getConstant('EmptyRecord');\n }\n if (excelCellArgs.colSpan > 1) {\n cell.colSpan = excelCellArgs.colSpan;\n }\n if (!isNullOrUndefined(excelCellArgs.style)) {\n var styleIndex = this.getColumnStyle(gObj, index + level);\n cell.style = this.mergeOptions(this.styles[styleIndex], excelCellArgs.style);\n }\n else {\n cell.style = { name: gObj.element.id + 'column' + (index + level) };\n }\n cells.push(cell);\n }\n index++;\n }\n var excelRow = { index: this.rowLength++, cells: cells };\n if (!isNullOrUndefined(templateRowHeight)) {\n /* tslint:disable-next-line:no-any */\n excelRow.height = templateRowHeight;\n }\n if (this.groupedColLength < 8 && level > 0) {\n excelRow.grouping = { outlineLevel: level, isCollapsed: true };\n excelRows.push(excelRow);\n }\n else {\n excelRows.push(excelRow);\n }\n if (!isNullOrUndefined(gObj.childGrid)) {\n gObj.isPrinting = true;\n var exportType = (!isNullOrUndefined(excelExportProperties) && excelExportProperties.exportType) ?\n excelExportProperties.exportType : 'AllPages';\n var returnVal = this.helper.createChildGrid(gObj, row, exportType, this.gridPool);\n var childGridObj = returnVal.childGrid;\n var element = returnVal.element;\n childGridObj.actionFailure =\n helper.failureHandler(this.gridPool, childGridObj, this.globalResolve);\n childGridObj.childGridLevel = gObj.childGridLevel + 1;\n var args = { childGrid: childGridObj, row: row, exportProperties: excelExportProperties };\n this.parent.trigger(events.exportDetailDataBound, args);\n childGridObj.beforeDataBound = this.childGridCell(excelRow, childGridObj, excelExportProperties, row);\n childGridObj.appendTo(element);\n }\n gObj.notify(events.exportRowDataBound, { rowObj: row, type: 'excel', excelRows: excelRows });\n }\n return startIndex;\n };\n ExcelExport.prototype.childGridCell = function (excelRow, childGridObj, excelExportProps, gRow) {\n var _this = this;\n return function (result) {\n childGridObj.beforeDataBound = null;\n result.cancel = true;\n if (result.result.length === 0) {\n result.result = [''];\n }\n excelRow.childRows = _this.processGridExport(childGridObj, excelExportProps, result);\n var intent = _this.parent.groupSettings.columns.length;\n var rows = excelRow.childRows;\n for (var i = 0; i < rows.length; i++) {\n rows[i].grouping = { outlineLevel: intent + childGridObj.childGridLevel,\n isCollapsed: !gRow.isExpand, isHidden: !gRow.isExpand };\n }\n childGridObj.destroy();\n detach(childGridObj.element);\n _this.gridPool[childGridObj.id] = true;\n _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);\n return excelRow;\n };\n };\n // tslint:disable-next-line:max-line-length\n ExcelExport.prototype.processAggregates = function (gObj, rec, excelRows, currentViewRecords, indent, byGroup) {\n var summaryModel = new SummaryModelGenerator(gObj);\n var columns = summaryModel.getColumns();\n columns = columns.filter(function (col) { return isNullOrUndefined(col.commands) && col.type !== 'checkbox'; });\n if (gObj.aggregates.length && this.parent !== gObj) {\n gObj.aggregateModule.prepareSummaryInfo();\n }\n var data = undefined;\n if (!isNullOrUndefined(currentViewRecords)) {\n data = currentViewRecords;\n }\n else {\n data = rec;\n }\n if (indent === undefined) {\n indent = 0;\n }\n if (gObj.groupSettings.columns.length > 0 && byGroup) {\n var groupSummaryModel = new GroupSummaryModelGenerator(gObj);\n var groupSummaryRows = groupSummaryModel.generateRows(data, { level: data.level });\n if (groupSummaryRows.length > 0) {\n excelRows = this.fillAggregates(gObj, groupSummaryRows, indent, excelRows);\n }\n }\n else {\n indent = gObj.groupSettings.columns.length > 0 && !byGroup ? gObj.groupSettings.columns.length : indent;\n var sRows = summaryModel.generateRows(data, rec.aggregates, null, null, columns);\n if (sRows.length > 0 && !byGroup) {\n excelRows = this.fillAggregates(gObj, sRows, indent, excelRows);\n }\n }\n return excelRows;\n };\n // tslint:disable-next-line:max-line-length\n ExcelExport.prototype.fillAggregates = function (gObj, rows, indent, excelRows, customIndex) {\n for (var _i = 0, rows_2 = rows; _i < rows_2.length; _i++) {\n var row = rows_2[_i];\n var cells = [];\n var isEmpty = true;\n var index = 0;\n for (var _a = 0, _b = row.cells; _a < _b.length; _a++) {\n var cell = _b[_a];\n /* tslint:disable-next-line:no-any */\n var eCell = {};\n if (cell.cellType === CellType.DetailFooterIntent) {\n continue;\n }\n if ((cell.visible || this.includeHiddenColumn)) {\n index++;\n if (cell.isDataCell) {\n isEmpty = false;\n var footerTemplate = !isNullOrUndefined(cell.column.footerTemplate);\n var groupFooterTemplate = !isNullOrUndefined(cell.column.groupFooterTemplate);\n var groupCaptionTemplate = !isNullOrUndefined(cell.column.groupCaptionTemplate);\n eCell.index = index + indent + gObj.childGridLevel;\n if (footerTemplate) {\n eCell.value = this.getAggreateValue(CellType.Summary, cell.column.footerTemplate, cell, row);\n }\n else if (groupFooterTemplate) {\n eCell.value = this.getAggreateValue(CellType.GroupSummary, cell.column.groupFooterTemplate, cell, row);\n }\n else if (groupCaptionTemplate) {\n eCell.value = this.getAggreateValue(CellType.CaptionSummary, cell.column.groupCaptionTemplate, cell, row);\n }\n else {\n for (var _c = 0, _d = Object.keys(row.data[cell.column.field]); _c < _d.length; _c++) {\n var key = _d[_c];\n if (key === cell.column.type) {\n if (!isNullOrUndefined(row.data[cell.column.field].Sum)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - sum\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Average)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - average\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Max)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - max\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Min)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - min\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Count)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - count\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].TrueCount)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - truecount\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].FalseCount)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - falsecount\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Custom)) {\n eCell.value = row.data[cell.column.field].Custom;\n }\n }\n }\n }\n eCell.style = this.getCaptionThemeStyle(this.theme); //{ name: gObj.element.id + 'column' + index };\n this.aggregateStyle(cell.column, eCell.style, cell.column.field);\n var gridCellStyle = cell.attributes.style;\n if (gridCellStyle.textAlign) {\n eCell.style.hAlign = gridCellStyle.textAlign.toLowerCase();\n }\n var args = {\n row: row,\n type: footerTemplate ? 'Footer' : groupFooterTemplate ? 'GroupFooter' : 'GroupCaption',\n style: eCell\n };\n this.parent.trigger(events.excelAggregateQueryCellInfo, args);\n cells.push(eCell);\n }\n else {\n if (customIndex === undefined) {\n eCell.index = index + indent + gObj.childGridLevel;\n eCell.style = this.getCaptionThemeStyle(this.theme); //{ name: gObj.element.id + 'column' + index };\n cells.push(eCell);\n }\n }\n }\n }\n if (!isNullOrUndefined(customIndex)) {\n excelRows.push({ index: customIndex, cells: cells });\n }\n else {\n var row_1 = {};\n if (this.groupedColLength < 8 && this.groupedColLength > 0) {\n var dummyOutlineLevel = 'outlineLevel';\n var dummyGrouping = 'grouping';\n var level = excelRows[excelRows.length - 1][dummyGrouping][dummyOutlineLevel];\n var grouping = { outlineLevel: level, isCollapsed: true };\n row_1 = { index: this.rowLength++, cells: cells, grouping: grouping };\n }\n else {\n row_1 = { index: this.rowLength++, cells: cells };\n }\n if (!isEmpty) {\n excelRows.push(row_1);\n }\n }\n }\n return excelRows;\n };\n ExcelExport.prototype.aggregateStyle = function (col, style, field) {\n var column = this.parent.getColumnByField(field);\n if (typeof col.format === 'object') {\n var format = col.format;\n style.numberFormat = !isNullOrUndefined(format.format) ? format.format : format.skeleton;\n if (!isNullOrUndefined(format.type)) {\n style.type = format.type.toLowerCase();\n }\n }\n else {\n style.numberFormat = col.format;\n }\n if (!isNullOrUndefined(column) && isNullOrUndefined(style.type)) {\n style.type = column.type.toLowerCase();\n }\n };\n ExcelExport.prototype.getAggreateValue = function (cellType, template, cell, row) {\n var templateFn = {};\n templateFn[getEnumValue(CellType, cell.cellType)] = compile(template);\n var txt;\n var data = row.data[cell.column.field ? cell.column.field : cell.column.columnName];\n if (this.parent.isReact || this.parent.isVue) {\n txt = (templateFn[getEnumValue(CellType, cell.cellType)](data, this.parent));\n if (this.parent.isReact) {\n this.parent.renderTemplates();\n }\n }\n else {\n txt = (templateFn[getEnumValue(CellType, cell.cellType)](data));\n }\n return txt[0].textContent;\n };\n ExcelExport.prototype.mergeOptions = function (JSON1, JSON2) {\n var result = {};\n var attrname = Object.keys(JSON1);\n for (var index = 0; index < attrname.length; index++) {\n if (attrname[index] !== 'name') {\n result[attrname[index]] = JSON1[attrname[index]];\n }\n }\n attrname = Object.keys(JSON2);\n for (var index = 0; index < attrname.length; index++) {\n if (attrname[index] !== 'name') {\n result[attrname[index]] = JSON2[attrname[index]];\n }\n }\n return result;\n };\n ExcelExport.prototype.getColumnStyle = function (gObj, columnIndex) {\n var index = 0;\n for (var _i = 0, _a = this.styles; _i < _a.length; _i++) {\n var style = _a[_i];\n if (style.name === gObj.element.id + 'column' + columnIndex) {\n return index;\n }\n index++;\n }\n return undefined;\n };\n ExcelExport.prototype.processHeaderContent = function (gObj, headerRow, indent, excelRows) {\n var rowIndex = 1;\n var gridRows = headerRow.rows;\n // Column collection with respect to the records in the grid\n var gridColumns = headerRow.columns;\n var spannedCells = [];\n if (indent > 0) {\n var index = 0;\n while (index !== indent) {\n this.columns.push({ index: index + 1, width: 30 });\n index++;\n }\n }\n for (var row = 0; row < gridRows.length; row++) {\n var currentCellIndex = 1 + indent;\n var cells = [];\n for (var column = 0; column < gridRows[row].cells.length; column++) {\n /* tslint:disable-next-line:no-any */\n var style = {};\n var cell = {};\n var gridCell = gridRows[row].cells[column];\n if (gridCell.cellType === CellType.HeaderIndent || gridCell.cellType === CellType.DetailHeader) {\n continue;\n }\n var result = { contains: true, index: 1 };\n while (result.contains) {\n result = this.getIndex(spannedCells, rowIndex, currentCellIndex);\n currentCellIndex = result.index;\n if (!result.contains) {\n cell.index = result.index + gObj.childGridLevel;\n break;\n }\n }\n if (!isNullOrUndefined(gridCell.rowSpan) && gridCell.rowSpan !== 1) {\n cell.rowSpan = gridCell.rowSpan;\n for (var i = rowIndex; i < gridCell.rowSpan + rowIndex; i++) {\n var spannedCell = { rowIndex: 0, columnIndex: 0 };\n spannedCell.rowIndex = i;\n spannedCell.columnIndex = currentCellIndex;\n spannedCells.push(spannedCell);\n }\n }\n if (!isNullOrUndefined(gridCell.colSpan) && gridCell.colSpan !== 1) {\n cell.colSpan = gridCell.colSpan;\n currentCellIndex = currentCellIndex + cell.colSpan - 1;\n }\n cell.value = gridCell.column.headerText;\n style = this.getHeaderThemeStyle(this.theme);\n if (!isNullOrUndefined(gridCell.column.textAlign)) {\n style.hAlign = gridCell.column.textAlign.toLowerCase();\n }\n if (!isNullOrUndefined(gridCell.column.headerTextAlign)) {\n style.hAlign = gridCell.column.headerTextAlign.toLowerCase();\n }\n var excelHeaderCellArgs = { cell: cell, gridCell: gridCell, style: style };\n gObj.trigger(events.excelHeaderQueryCellInfo, excelHeaderCellArgs);\n cell.style = excelHeaderCellArgs.style;\n cells.push(cell);\n currentCellIndex++;\n }\n excelRows.push({ index: this.rowLength++, cells: cells });\n }\n for (var col = 0; col < gridColumns.length; col++) {\n this.parseStyles(gObj, gridColumns[col], this.getRecordThemeStyle(this.theme), indent + col + 1);\n }\n return excelRows;\n };\n ExcelExport.prototype.getHeaderThemeStyle = function (theme) {\n var style = {};\n style.fontSize = 12;\n style.borders = { color: '#E0E0E0' };\n style.bold = true;\n if (!isNullOrUndefined(theme) && !isNullOrUndefined(theme.header)) {\n style = this.updateThemeStyle(theme.header, style);\n }\n return style;\n };\n ExcelExport.prototype.updateThemeStyle = function (themestyle, style) {\n return extend(style, themestyle);\n };\n ExcelExport.prototype.getCaptionThemeStyle = function (theme) {\n var style = {};\n style.fontSize = 13;\n style.backColor = '#F6F6F6';\n if (!isNullOrUndefined(theme) && !isNullOrUndefined(theme.caption)) {\n style = this.updateThemeStyle(theme.caption, style);\n }\n return style;\n };\n ExcelExport.prototype.getRecordThemeStyle = function (theme) {\n var style = {};\n style.fontSize = 13;\n style.borders = { color: '#E0E0E0' };\n if (!isNullOrUndefined(theme) && !isNullOrUndefined(theme.record)) {\n style = this.updateThemeStyle(theme.record, style);\n }\n return style;\n };\n ExcelExport.prototype.processExcelHeader = function (header) {\n if (!isNullOrUndefined(header.rows) && (this.expType === 'NewSheet' || this.rowLength === 1)) {\n var noRows = void 0;\n if (header.headerRows === undefined) {\n this.rowLength = header.rows.length;\n }\n else {\n this.rowLength = header.headerRows;\n }\n if (this.rowLength < header.rows.length) {\n noRows = this.rowLength;\n }\n else {\n noRows = header.rows.length;\n }\n this.rowLength++;\n for (var row = 0; row < noRows; row++) {\n var json = header.rows[row];\n //Row index\n if (!(json.index !== null && !isNullOrUndefined(json.index))) {\n json.index = (row + 1);\n }\n this.updatedCellIndex(json);\n }\n }\n };\n ExcelExport.prototype.updatedCellIndex = function (json) {\n var cellsLength = json.cells.length;\n for (var cellId = 0; cellId < cellsLength; cellId++) {\n var jsonCell = json.cells[cellId];\n //cell index\n if (!(jsonCell.index !== null && !isNullOrUndefined(jsonCell.index))) {\n jsonCell.index = (cellId + 1);\n }\n }\n this.rows.push(json);\n };\n ExcelExport.prototype.processExcelFooter = function (footer) {\n if (!isNullOrUndefined(footer.rows)) {\n var noRows = void 0;\n if (footer.footerRows === undefined) {\n this.rowLength += footer.rows.length;\n }\n else {\n if (footer.footerRows > footer.rows.length) {\n this.rowLength += (footer.footerRows - footer.rows.length);\n noRows = footer.rows.length;\n }\n else {\n noRows = footer.footerRows;\n }\n }\n for (var row = 0; row < noRows; row++) {\n var json = footer.rows[row];\n //Row index\n if (json.index === null || json.index === undefined) {\n json.index = this.rowLength++;\n }\n else {\n json.index += this.rowLength;\n }\n this.updatedCellIndex(json);\n }\n }\n };\n ExcelExport.prototype.getIndex = function (spannedCells, rowIndex, columnIndex) {\n for (var _i = 0, spannedCells_1 = spannedCells; _i < spannedCells_1.length; _i++) {\n var spannedCell = spannedCells_1[_i];\n if ((spannedCell.rowIndex === rowIndex) && (spannedCell.columnIndex === columnIndex)) {\n columnIndex = columnIndex + 1;\n return { contains: true, index: columnIndex };\n }\n }\n return { contains: false, index: columnIndex };\n };\n ExcelExport.prototype.parseStyles = function (gObj, col, style, index) {\n if (!isNullOrUndefined(col.format)) {\n if (typeof col.format === 'object') {\n var format = col.format;\n style.numberFormat = !isNullOrUndefined(format.format) ? format.format : format.skeleton;\n if (!isNullOrUndefined(format.type)) {\n style.type = format.type.toLowerCase();\n }\n }\n else {\n style.numberFormat = col.format;\n style.type = col.type;\n }\n }\n if (!isNullOrUndefined(col.textAlign)) {\n style.hAlign = col.textAlign.toLowerCase();\n }\n if (Object.keys(style).length > 0) {\n style.name = gObj.element.id + 'column' + index;\n this.styles.push(style);\n }\n if (!isNullOrUndefined(col.width) && col.width !== 'auto') {\n this.columns.push({ index: index + gObj.childGridLevel, width: typeof col.width === 'number' ?\n col.width : this.helper.getConvertedWidth(col.width) });\n }\n };\n /**\n * To destroy the excel export\n * @return {void}\n * @hidden\n */\n ExcelExport.prototype.destroy = function () {\n //destroy for exporting\n };\n return ExcelExport;\n}());\nexport { ExcelExport };\n","import { print as printWindow, createElement, detach, classList, selectAll, extend } from '@syncfusion/ej2-base';\nimport { getPrintGridModel } from '../base/util';\nimport { Grid } from '../base/grid';\nimport * as events from '../base/constant';\nimport { Deferred } from '@syncfusion/ej2-data';\n/**\n * @hidden\n */\nexport function getCloneProperties() {\n return ['aggregates', 'allowGrouping', 'allowFiltering', 'allowMultiSorting', 'allowReordering', 'allowSorting',\n 'allowTextWrap', 'childGrid', 'columns', 'currentViewData', 'dataSource', 'detailTemplate', 'enableAltRow',\n 'enableColumnVirtualization', 'filterSettings', 'gridLines',\n 'groupSettings', 'height', 'locale', 'pageSettings', 'printMode', 'query', 'queryString', 'enableRtl',\n 'rowHeight', 'rowTemplate', 'sortSettings', 'textWrapSettings', 'allowPaging', 'hierarchyPrintMode', 'searchSettings',\n 'queryCellInfo', 'beforeDataBound'];\n}\n/**\n *\n * The `Print` module is used to handle print action.\n */\nvar Print = /** @class */ (function () {\n /**\n * Constructor for the Grid print module\n * @hidden\n */\n function Print(parent, scrollModule) {\n this.isAsyncPrint = false;\n this.defered = new Deferred();\n this.parent = parent;\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.contentReady, this.isContentReady(), this);\n this.parent.addEventListener(events.actionBegin, this.actionBegin.bind(this));\n this.parent.on(events.onEmpty, this.onEmpty.bind(this));\n this.parent.on(events.hierarchyPrint, this.hierarchyPrint, this);\n this.scrollModule = scrollModule;\n }\n Print.prototype.isContentReady = function () {\n var _this = this;\n if (this.isPrintGrid() && (this.parent.hierarchyPrintMode === 'None' || !this.parent.childGrid)) {\n return this.contentReady;\n }\n return function () {\n _this.defered.promise.then(function () {\n _this.contentReady();\n });\n if (_this.isPrintGrid()) {\n _this.hierarchyPrint();\n }\n };\n };\n Print.prototype.hierarchyPrint = function () {\n this.removeColGroup(this.parent);\n var printGridObj = window.printGridObj;\n if (printGridObj && !printGridObj.element.querySelector('[aria-busy=true')) {\n printGridObj.printModule.defered.resolve();\n }\n };\n /**\n * By default, prints all the Grid pages and hides the pager.\n * > You can customize print options using the\n * [`printMode`](grid/#printmode-string/).\n * @return {void}\n */\n Print.prototype.print = function () {\n this.renderPrintGrid();\n this.printWind = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');\n this.printWind.moveTo(0, 0);\n this.printWind.resizeTo(screen.availWidth, screen.availHeight);\n };\n Print.prototype.onEmpty = function () {\n if (this.isPrintGrid()) {\n this.contentReady();\n }\n };\n Print.prototype.actionBegin = function () {\n if (this.isPrintGrid()) {\n this.isAsyncPrint = true;\n }\n };\n Print.prototype.renderPrintGrid = function () {\n var gObj = this.parent;\n var element = createElement('div', {\n id: this.parent.element.id + '_print', className: gObj.element.className + ' e-print-grid'\n });\n document.body.appendChild(element);\n var printGrid = new Grid(getPrintGridModel(gObj, gObj.hierarchyPrintMode));\n if (gObj.isFrozenGrid() && !gObj.getFrozenColumns()) {\n for (var i = 0; i < printGrid.columns.length; i++) {\n printGrid.columns[i] = extend({}, printGrid.columns[i]);\n printGrid.columns[i].freeze = undefined;\n }\n }\n /* tslint:disable-next-line:no-any */\n if (this.parent.isAngular) {\n /* tslint:disable-next-line:no-any */\n printGrid.viewContainerRef = this.parent.viewContainerRef;\n }\n /* tslint:disable:no-empty */\n printGrid.load = function () { };\n printGrid.query = gObj.getQuery().clone();\n window.printGridObj = printGrid;\n printGrid.isPrinting = true;\n var modules = printGrid.getInjectedModules();\n var injectedModues = gObj.getInjectedModules();\n if (!modules || modules.length !== injectedModues.length) {\n printGrid.setInjectedModules(injectedModues);\n }\n gObj.notify(events.printGridInit, { element: element, printgrid: printGrid });\n this.parent.log('exporting_begin', this.getModuleName());\n printGrid.registeredTemplate = this.parent.registeredTemplate;\n printGrid.appendTo(element);\n printGrid.trigger = gObj.trigger;\n };\n Print.prototype.contentReady = function () {\n if (this.isPrintGrid()) {\n var gObj = this.parent;\n if (this.isAsyncPrint) {\n this.printGrid();\n return;\n }\n var args = {\n requestType: 'print',\n element: gObj.element,\n selectedRows: gObj.getContentTable().querySelectorAll('tr[aria-selected=\"true\"]'),\n cancel: false,\n hierarchyPrintMode: gObj.hierarchyPrintMode\n };\n if (!this.isAsyncPrint) {\n gObj.trigger(events.beforePrint, args);\n }\n if (args.cancel) {\n detach(gObj.element);\n return;\n }\n if (!this.isAsyncPrint) {\n this.printGrid();\n }\n }\n };\n Print.prototype.printGrid = function () {\n var gObj = this.parent;\n // Height adjustment on print grid\n if (gObj.height !== 'auto') { // if scroller enabled\n var cssProps = this.scrollModule.getCssProperties();\n var contentDiv = gObj.element.querySelector('.e-content');\n var headerDiv = gObj.element.querySelector('.e-gridheader');\n contentDiv.style.height = 'auto';\n contentDiv.style.overflowY = 'auto';\n headerDiv.style[cssProps.padding] = '';\n headerDiv.firstElementChild.style[cssProps.border] = '';\n }\n // Grid alignment adjustment on grouping\n if (gObj.allowGrouping) {\n if (!gObj.groupSettings.columns.length) {\n gObj.element.querySelector('.e-groupdroparea').style.display = 'none';\n }\n else {\n this.removeColGroup(gObj);\n }\n }\n // hide horizontal scroll\n for (var _i = 0, _a = [].slice.call(gObj.element.querySelectorAll('.e-content')); _i < _a.length; _i++) {\n var element = _a[_i];\n element.style.overflowX = 'hidden';\n }\n // Hide the waiting popup\n var waitingPop = gObj.element.querySelectorAll('.e-spin-show');\n for (var _b = 0, _c = [].slice.call(waitingPop); _b < _c.length; _b++) {\n var element = _c[_b];\n classList(element, ['e-spin-hide'], ['e-spin-show']);\n }\n this.printGridElement(gObj);\n gObj.isPrinting = false;\n delete window.printGridObj;\n var args = {\n element: gObj.element\n };\n gObj.trigger(events.printComplete, args);\n this.parent.log('exporting_complete', this.getModuleName());\n };\n Print.prototype.printGridElement = function (gObj) {\n classList(gObj.element, ['e-print-grid-layout'], ['e-print-grid']);\n if (gObj.isPrinting) {\n detach(gObj.element);\n }\n this.printWind = printWindow(gObj.element, this.printWind);\n };\n Print.prototype.removeColGroup = function (gObj) {\n var depth = gObj.groupSettings.columns.length;\n var element = gObj.element;\n var id = '#' + gObj.element.id;\n if (!depth) {\n return;\n }\n var groupCaption = selectAll(id + \"captioncell.e-groupcaption\", element);\n var colSpan = groupCaption[depth - 1].getAttribute('colspan');\n for (var i = 0; i < groupCaption.length; i++) {\n groupCaption[i].setAttribute('colspan', colSpan);\n }\n var colGroups = selectAll(\"colgroup\" + id + \"colGroup\", element);\n var contentColGroups = selectAll('.e-content colgroup', element);\n this.hideColGroup(colGroups, depth);\n this.hideColGroup(contentColGroups, depth);\n };\n Print.prototype.hideColGroup = function (colGroups, depth) {\n for (var i = 0; i < colGroups.length; i++) {\n for (var j = 0; j < depth; j++) {\n colGroups[i].children[j].style.display = 'none';\n }\n }\n };\n /**\n * To destroy the print\n * @hidden\n */\n Print.prototype.isPrintGrid = function () {\n return this.parent.element.id.indexOf('_print') > 0 && this.parent.isPrinting;\n };\n /**\n * To destroy the print\n * @return {void}\n * @hidden\n */\n Print.prototype.destroy = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.contentReady, this.contentReady.bind(this));\n this.parent.removeEventListener(events.actionBegin, this.actionBegin.bind(this));\n this.parent.off(events.onEmpty, this.onEmpty.bind(this));\n this.parent.off(events.hierarchyPrint, this.hierarchyPrint);\n };\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Print.prototype.getModuleName = function () {\n return 'print';\n };\n Print.printGridProp = getCloneProperties().concat([events.beforePrint, events.printComplete, events.load]);\n return Print;\n}());\nexport { Print };\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./QuickBalancing.vue?vue&type=style&index=1&id=0bfa750c&prod&lang=css\"","import { isNullOrUndefined, isBlazor } from '@syncfusion/ej2-base';\nimport { Internationalization, setCulture } from '@syncfusion/ej2-base';\n/**\n * ValueFormatter class to globalize the value.\n * @hidden\n */\nvar ValueFormatter = /** @class */ (function () {\n function ValueFormatter(cultureName) {\n this.intl = new Internationalization();\n if (!isNullOrUndefined(cultureName)) {\n this.intl.culture = cultureName;\n }\n }\n ValueFormatter.prototype.getFormatFunction = function (format) {\n if (format.type) {\n if (isBlazor()) {\n var isServerRendered = 'isServerRendered';\n format[isServerRendered] = true;\n }\n return this.intl.getDateFormat(format);\n }\n else {\n return this.intl.getNumberFormat(format);\n }\n };\n ValueFormatter.prototype.getParserFunction = function (format) {\n if (format.type) {\n if (isBlazor()) {\n var isServerRendered = 'isServerRendered';\n format[isServerRendered] = true;\n }\n return this.intl.getDateParser(format);\n }\n else {\n return this.intl.getNumberParser(format);\n }\n };\n ValueFormatter.prototype.fromView = function (value, format, type) {\n if ((type === 'date' || type === 'datetime' || type === 'number') && (!isNullOrUndefined(format))) {\n return format(value);\n }\n else {\n return value;\n }\n };\n ValueFormatter.prototype.toView = function (value, format) {\n var result = value;\n if (!isNullOrUndefined(format) && !isNullOrUndefined(value)) {\n result = format(value);\n }\n return result;\n };\n ValueFormatter.prototype.setCulture = function (cultureName) {\n if (!isNullOrUndefined(cultureName)) {\n setCulture(cultureName);\n }\n };\n return ValueFormatter;\n}());\nexport { ValueFormatter };\n","var instances = 'ej2_instances';\nvar uid = 0;\nvar isBlazorPlatform = false;\n/**\n * Function to check whether the platform is blazor or not.\n * @return {boolean} result\n * @private\n */\nexport function disableBlazorMode() {\n isBlazorPlatform = false;\n}\n/**\n * Create Instance from constructor function with desired parameters.\n * @param {Function} classFunction - Class function to which need to create instance\n * @param {any[]} params - Parameters need to passed while creating instance\n * @return {any}\n * @private\n */\nexport function createInstance(classFunction, params) {\n var arrayParam = params;\n arrayParam.unshift(undefined);\n return new (Function.prototype.bind.apply(classFunction, arrayParam));\n}\n/**\n * To run a callback function immediately after the browser has completed other operations.\n * @param {Function} handler - callback function to be triggered.\n * @return {Function}\n * @private\n */\nexport function setImmediate(handler) {\n var unbind;\n var num = new Uint16Array(5);\n var intCrypto = window.msCrypto || window.crypto;\n intCrypto.getRandomValues(num);\n var secret = 'ej2' + combineArray(num);\n var messageHandler = function (event) {\n if (event.source === window && typeof event.data === 'string' && event.data.length <= 32 && event.data === secret) {\n handler();\n unbind();\n }\n };\n window.addEventListener('message', messageHandler, false);\n window.postMessage(secret, '*');\n return unbind = function () {\n window.removeEventListener('message', messageHandler);\n handler = messageHandler = secret = undefined;\n };\n}\n/**\n * To get nameSpace value from the desired object.\n * @param {string} nameSpace - String value to the get the inner object\n * @param {any} obj - Object to get the inner object value.\n * @return {any}\n * @private\n */\nexport function getValue(nameSpace, obj) {\n /* tslint:disable no-any */\n var value = obj;\n var splits = nameSpace.replace(/\\[/g, '.').replace(/\\]/g, '').split('.');\n for (var i = 0; i < splits.length && !isUndefined(value); i++) {\n value = value[splits[i]];\n }\n return value;\n}\n/**\n * To set value for the nameSpace in desired object.\n * @param {string} nameSpace - String value to the get the inner object\n * @param {any} value - Value that you need to set.\n * @param {any} obj - Object to get the inner object value.\n * @return {void}\n * @private\n */\nexport function setValue(nameSpace, value, obj) {\n var keys = nameSpace.replace(/\\[/g, '.').replace(/\\]/g, '').split('.');\n var start = obj || {};\n var fromObj = start;\n var i;\n var length = keys.length;\n var key;\n for (i = 0; i < length; i++) {\n key = keys[i];\n if (i + 1 === length) {\n fromObj[key] = value === undefined ? {} : value;\n }\n else if (isNullOrUndefined(fromObj[key])) {\n fromObj[key] = {};\n }\n fromObj = fromObj[key];\n }\n return start;\n}\n/**\n * Delete an item from Object\n * @param {any} obj - Object in which we need to delete an item.\n * @param {string} params - String value to the get the inner object\n * @return {void}\n * @private\n */\nexport function deleteObject(obj, key) {\n delete obj[key];\n}\n/**\n * Check weather the given argument is only object.\n * @param {any} obj - Object which is need to check.\n * @return {boolean}\n * @private\n */\nexport function isObject(obj) {\n var objCon = {};\n return (!isNullOrUndefined(obj) && obj.constructor === objCon.constructor);\n}\n/**\n * To get enum value by giving the string.\n * @param {any} enumObject - Enum object.\n * @param {string} enumValue - Enum value to be searched\n * @return {any}\n * @private\n */\nexport function getEnumValue(enumObject, enumValue) {\n return enumObject[enumValue];\n}\n/**\n * Merge the source object into destination object.\n * @param {any} source - source object which is going to merge with destination object\n * @param {any} destination - object need to be merged\n * @return {void}\n * @private\n */\nexport function merge(source, destination) {\n if (!isNullOrUndefined(destination)) {\n var temrObj = source;\n var tempProp = destination;\n var keys = Object.keys(destination);\n var deepmerge = 'deepMerge';\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (!isNullOrUndefined(temrObj[deepmerge]) && (temrObj[deepmerge].indexOf(key) !== -1) &&\n (isObject(tempProp[key]) || Array.isArray(tempProp[key]))) {\n extend(temrObj[key], temrObj[key], tempProp[key], true);\n }\n else {\n temrObj[key] = tempProp[key];\n }\n }\n }\n}\n/**\n * Extend the two object with newer one.\n * @param {any} copied - Resultant object after merged\n * @param {Object} first - First object need to merge\n * @param {Object} second - Second object need to merge\n * @return {Object}\n * @private\n */\nexport function extend(copied, first, second, deep) {\n var result = copied && typeof copied === 'object' ? copied : {};\n var length = arguments.length;\n if (deep) {\n length = length - 1;\n }\n var _loop_1 = function (i) {\n if (!arguments_1[i]) {\n return \"continue\";\n }\n var obj1 = arguments_1[i];\n Object.keys(obj1).forEach(function (key) {\n var src = result[key];\n var copy = obj1[key];\n var clone;\n var isArrayChanged = Array.isArray(copy) && Array.isArray(src) && (copy.length !== src.length);\n var blazorEventExtend = isBlazor() ? (!(src instanceof Event) && !isArrayChanged) : true;\n if (deep && blazorEventExtend && (isObject(copy) || Array.isArray(copy))) {\n if (isObject(copy)) {\n clone = src ? src : {};\n if (Array.isArray(clone) && clone.hasOwnProperty('isComplexArray')) {\n extend(clone, {}, copy, deep);\n }\n else {\n result[key] = extend(clone, {}, copy, deep);\n }\n }\n else {\n /* istanbul ignore next */\n clone = isBlazor() ? src && Object.keys(copy).length : src ? src : [];\n result[key] = extend([], clone, copy, deep);\n }\n }\n else {\n result[key] = copy;\n }\n });\n };\n var arguments_1 = arguments;\n for (var i = 1; i < length; i++) {\n _loop_1(i);\n }\n return result;\n}\n/**\n * To check whether the object is null or undefined.\n * @param {Object} value - To check the object is null or undefined\n * @return {boolean}\n * @private\n */\nexport function isNullOrUndefined(value) {\n return value === undefined || value === null;\n}\n/**\n * To check whether the object is undefined.\n * @param {Object} value - To check the object is undefined\n * @return {boolean}\n * @private\n */\nexport function isUndefined(value) {\n return ('undefined' === typeof value);\n}\n/**\n * To return the generated unique name\n * @param {string} definedName - To concatenate the unique id to provided name\n * @return {string}\n * @private\n */\nexport function getUniqueID(definedName) {\n return definedName + '_' + uid++;\n}\n/**\n * It limits the rate at which a function can fire. The function will fire only once every provided second instead of as quickly.\n * @param {Function} eventFunction - Specifies the function to run when the event occurs\n * @param {number} delay - A number that specifies the milliseconds for function delay call option\n * @return {Function}\n * @private\n */\nexport function debounce(eventFunction, delay) {\n var out;\n // tslint:disable-next-line\n return function () {\n var _this = this;\n var args = arguments;\n var later = function () {\n out = null;\n return eventFunction.apply(_this, args);\n };\n clearTimeout(out);\n out = setTimeout(later, delay);\n };\n}\n// Added since lint ignored after added '//tslint:disable-next-line' \n/* tslint:disable:no-any */\n/**\n * To convert the object to string for query url\n * @param {Object} data\n * @returns string\n * @private\n */\nexport function queryParams(data) {\n var array = [];\n var keys = Object.keys(data);\n for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {\n var key = keys_2[_i];\n array.push(encodeURIComponent(key) + '=' + encodeURIComponent('' + data[key]));\n }\n return array.join('&');\n}\n/**\n * To check whether the given array contains object.\n * @param {T[]} value- Specifies the T type array to be checked.\n * @private\n */\nexport function isObjectArray(value) {\n var parser = Object.prototype.toString;\n if (parser.call(value) === '[object Array]') {\n if (parser.call(value[0]) === '[object Object]') {\n return true;\n }\n }\n return false;\n}\n/**\n * To check whether the child element is descendant to parent element or parent and child are same element.\n * @param{Element} - Specifies the child element to compare with parent.\n * @param{Element} - Specifies the parent element.\n * @return boolean\n * @private\n */\nexport function compareElementParent(child, parent) {\n var node = child;\n if (node === parent) {\n return true;\n }\n else if (node === document || !node) {\n return false;\n }\n else {\n return compareElementParent(node.parentNode, parent);\n }\n}\n/**\n * To throw custom error message.\n * @param{string} - Specifies the error message to be thrown.\n * @private\n */\nexport function throwError(message) {\n try {\n throw new Error(message);\n }\n catch (e) {\n throw e.message + '\\n' + e.stack;\n }\n}\n/**\n * This function is used to print given element\n * @param{Element} element - Specifies the print content element.\n * @param{Window} printWindow - Specifies the print window.\n * @private\n */\nexport function print(element, printWindow) {\n var div = document.createElement('div');\n var links = [].slice.call(document.getElementsByTagName('head')[0].querySelectorAll('base, link, style'));\n var reference = '';\n if (isNullOrUndefined(printWindow)) {\n printWindow = window.open('', 'print', 'height=452,width=1024,tabbar=no');\n }\n div.appendChild(element.cloneNode(true));\n for (var i = 0, len = links.length; i < len; i++) {\n reference += links[i].outerHTML;\n }\n printWindow.document.write(' ' + reference + '' + div.innerHTML +\n '' + '');\n printWindow.document.close();\n printWindow.focus();\n // tslint:disable-next-line\n var interval = setInterval(function () {\n if (printWindow.ready) {\n printWindow.print();\n printWindow.close();\n clearInterval(interval);\n }\n }, 500);\n return printWindow;\n}\n/**\n * Function to normalize the units applied to the element.\n * @param {number|string} value\n * @return {string} result\n * @private\n */\nexport function formatUnit(value) {\n var result = value + '';\n if (result.match(/auto|%|px|vh|vm|vmax|vmin|em/)) {\n return result;\n }\n return result + 'px';\n}\n/**\n * Function to check whether the platform is blazor or not.\n * @return {boolean} result\n * @private\n */\nexport function enableBlazorMode() {\n isBlazorPlatform = true;\n}\n/**\n * Function to check whether the platform is blazor or not.\n * @return {boolean} result\n * @private\n */\nexport function isBlazor() {\n return isBlazorPlatform;\n}\n/**\n * Function to convert xPath to DOM element in blazor platform\n * @return {HTMLElement} result\n * @param {HTMLElement | object} element\n * @private\n */\nexport function getElement(element) {\n var xPath = 'xPath';\n if (!(element instanceof Node) && isBlazor() && !isNullOrUndefined(element[xPath])) {\n return document.evaluate(element[xPath], document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;\n }\n return element;\n}\n/**\n * Function to fetch the Instances of a HTML element for the given component.\n * @param {string | HTMLElement} element\n * @param {any} component\n * @return {Object} inst\n * @private\n */\n// tslint:disable-next-line\nexport function getInstance(element, component) {\n // tslint:disable-next-line:no-any\n var elem = (typeof (element) === 'string') ? document.querySelector(element) : element;\n if (elem[instances]) {\n for (var _i = 0, _a = elem[instances]; _i < _a.length; _i++) {\n var inst = _a[_i];\n if (inst instanceof component) {\n return inst;\n }\n }\n }\n return null;\n}\n/**\n * Function to add instances for the given element.\n * @param {string | HTMLElement} element\n * @param {Object} instance\n * @return {void}\n * @private\n */\nexport function addInstance(element, instance) {\n // tslint:disable-next-line:no-any\n var elem = (typeof (element) === 'string') ? document.querySelector(element) : element;\n if (elem[instances]) {\n elem[instances].push(instance);\n }\n else {\n elem[instances] = [instance];\n }\n}\n/**\n * Function to generate the unique id.\n * @return {any}\n * @private\n */\n// tslint:disable-next-line:no-any\nexport function uniqueID() {\n // tslint:disable-next-line:no-any\n if ((typeof window) === 'undefined') {\n return;\n }\n // tslint:disable-next-line:no-any\n var num = new Uint16Array(5);\n var intCrypto = window.msCrypto || window.crypto;\n return intCrypto.getRandomValues(num);\n}\nfunction combineArray(num) {\n var ret = '';\n for (var i = 0; i < 5; i++) {\n ret += (i ? ',' : '') + num[i];\n }\n return ret;\n}\n","/**\n * Parser\n */\nvar defaultNumberingSystem = {\n 'latn': {\n '_digits': '0123456789',\n '_type': 'numeric'\n }\n};\nimport { isUndefined, getValue, isBlazor } from '../util';\nvar latnRegex = /^[0-9]*$/;\nvar defaultNumberSymbols = {\n 'decimal': '.',\n 'group': ',',\n 'percentSign': '%',\n 'plusSign': '+',\n 'minusSign': '-',\n 'infinity': '∞',\n 'nan': 'NaN',\n 'exponential': 'E'\n};\nvar latnNumberSystem = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];\n/**\n * Interface for parser base\n * @private\n */\nvar ParserBase = /** @class */ (function () {\n function ParserBase() {\n }\n /**\n * Returns the cldr object for the culture specifies\n * @param {Object} obj - Specifies the object from which culture object to be acquired.\n * @param {string} cName - Specifies the culture name.\n * @returns {Object}\n */\n ParserBase.getMainObject = function (obj, cName) {\n var value = isBlazor() ? cName : 'main.' + cName;\n return getValue(value, obj);\n };\n /**\n * Returns the numbering system object from given cldr data.\n * @param {Object} obj - Specifies the object from which number system is acquired.\n * @returns {Object}\n */\n ParserBase.getNumberingSystem = function (obj) {\n return getValue('supplemental.numberingSystems', obj) || this.numberingSystems;\n };\n /**\n * Returns the reverse of given object keys or keys specified.\n * @param {Object} prop - Specifies the object to be reversed.\n * @param {number[]} keys - Optional parameter specifies the custom keyList for reversal.\n * @returns {Object}\n */\n ParserBase.reverseObject = function (prop, keys) {\n var propKeys = keys || Object.keys(prop);\n var res = {};\n for (var _i = 0, propKeys_1 = propKeys; _i < propKeys_1.length; _i++) {\n var key = propKeys_1[_i];\n /* tslint:disable no-any */\n if (!res.hasOwnProperty(prop[key])) {\n res[prop[key]] = key;\n }\n }\n return res;\n };\n /**\n * Returns the symbol regex by skipping the escape sequence.\n * @param {string[]} props - Specifies the array values to be skipped.\n * @returns {RegExp}\n */\n ParserBase.getSymbolRegex = function (props) {\n var regexStr = props.map(function (str) {\n return str.replace(/([.*+?^=!:${}()|\\[\\]\\/\\\\])/g, '\\\\$1');\n }).join('|');\n return new RegExp(regexStr, 'g');\n };\n ParserBase.getSymbolMatch = function (prop) {\n var matchKeys = Object.keys(defaultNumberSymbols);\n var ret = {};\n for (var _i = 0, matchKeys_1 = matchKeys; _i < matchKeys_1.length; _i++) {\n var key = matchKeys_1[_i];\n ret[prop[key]] = defaultNumberSymbols[key];\n }\n return ret;\n };\n /**\n * Returns regex string for provided value\n * @param {string} val\n * @returns {string}\n */\n ParserBase.constructRegex = function (val) {\n var len = val.length;\n var ret = '';\n for (var i = 0; i < len; i++) {\n if (i !== len - 1) {\n ret += val[i] + '|';\n }\n else {\n ret += val[i];\n }\n }\n return ret;\n };\n /**\n * Returns the replaced value of matching regex and obj mapper.\n * @param {string} value - Specifies the values to be replaced.\n * @param {RegExp} regex - Specifies the regex to search.\n * @param {Object} obj - Specifies the object matcher to be replace value parts.\n * @returns {string}\n */\n ParserBase.convertValueParts = function (value, regex, obj) {\n return value.replace(regex, function (str) {\n return obj[str];\n });\n };\n /**\n * Returns default numbering system object for formatting from cldr data\n * @param {Object} obj\n * @returns {NumericObject}\n */\n ParserBase.getDefaultNumberingSystem = function (obj) {\n var ret = {};\n ret.obj = getValue('numbers', obj);\n ret.nSystem = getValue('defaultNumberingSystem', ret.obj);\n return ret;\n };\n /**\n * Returns the replaced value of matching regex and obj mapper.\n */\n ParserBase.getCurrentNumericOptions = function (curObj, numberSystem, needSymbols, blazorMode) {\n var ret = {};\n var cur = this.getDefaultNumberingSystem(curObj);\n if (!isUndefined(cur.nSystem) || blazorMode) {\n var digits = blazorMode ? getValue('obj.mapperDigits', cur) : getValue(cur.nSystem + '._digits', numberSystem);\n if (!isUndefined(digits)) {\n ret.numericPair = this.reverseObject(digits, latnNumberSystem);\n ret.numberParseRegex = new RegExp(this.constructRegex(digits), 'g');\n ret.numericRegex = '[' + digits[0] + '-' + digits[9] + ']';\n if (needSymbols) {\n ret.numericRegex = digits[0] + '-' + digits[9];\n ret.symbolNumberSystem = getValue(blazorMode ? 'numberSymbols' : 'symbols-numberSystem-' + cur.nSystem, cur.obj);\n ret.symbolMatch = this.getSymbolMatch(ret.symbolNumberSystem);\n ret.numberSystem = cur.nSystem;\n }\n }\n }\n return ret;\n };\n /**\n * Returns number mapper object for the provided cldr data\n * @param {Object} curObj\n * @param {Object} numberSystem\n * @param {boolean} isNumber\n * @returns {NumberMapper}\n */\n ParserBase.getNumberMapper = function (curObj, numberSystem, isNumber) {\n var ret = { mapper: {} };\n var cur = this.getDefaultNumberingSystem(curObj);\n if (!isUndefined(cur.nSystem)) {\n ret.numberSystem = cur.nSystem;\n ret.numberSymbols = getValue('symbols-numberSystem-' + cur.nSystem, cur.obj);\n ret.timeSeparator = getValue('timeSeparator', ret.numberSymbols);\n var digits = getValue(cur.nSystem + '._digits', numberSystem);\n if (!isUndefined(digits)) {\n for (var _i = 0, latnNumberSystem_1 = latnNumberSystem; _i < latnNumberSystem_1.length; _i++) {\n var i = latnNumberSystem_1[_i];\n ret.mapper[i] = digits[i];\n }\n }\n }\n return ret;\n };\n ParserBase.nPair = 'numericPair';\n ParserBase.nRegex = 'numericRegex';\n ParserBase.numberingSystems = defaultNumberingSystem;\n return ParserBase;\n}());\nexport { ParserBase };\n/**\n * @private\n */\nvar blazorCurrencyData = {\n 'DJF': 'Fdj',\n 'ERN': 'Nfk',\n 'ETB': 'Br',\n 'NAD': '$',\n 'ZAR': 'R',\n 'XAF': 'FCFA',\n 'GHS': 'GH₵',\n 'XDR': 'XDR',\n 'AED': 'د.إ.‏',\n 'BHD': 'د.ب.‏',\n 'DZD': 'د.ج.‏',\n 'EGP': 'ج.م.‏',\n 'ILS': '₪',\n 'IQD': 'د.ع.‏',\n 'JOD': 'د.ا.‏',\n 'KMF': 'CF',\n 'KWD': 'د.ك.‏',\n 'LBP': 'ل.ل.‏',\n 'LYD': 'د.ل.‏',\n 'MAD': 'د.م.‏',\n 'MRU': 'أ.م.',\n 'OMR': 'ر.ع.‏',\n 'QAR': 'ر.ق.‏',\n 'SAR': 'ر.س.‏',\n 'SDG': 'ج.س.',\n 'SOS': 'S',\n 'SSP': '£',\n 'SYP': 'ل.س.‏',\n 'TND': 'د.ت.‏',\n 'YER': 'ر.ي.‏',\n 'CLP': '$',\n 'INR': '₹',\n 'TZS': 'TSh',\n 'EUR': '€',\n 'AZN': '₼',\n 'RUB': '₽',\n 'BYN': 'Br',\n 'ZMW': 'K',\n 'BGN': 'лв.',\n 'NGN': '₦',\n 'XOF': 'CFA',\n 'BDT': '৳',\n 'CNY': '¥',\n 'BAM': 'КМ',\n 'UGX': 'USh',\n 'USD': '$',\n 'CZK': 'Kč',\n 'GBP': '£',\n 'DKK': 'kr.',\n 'KES': 'Ksh',\n 'CHF': 'CHF',\n 'MVR': 'ރ.',\n 'BTN': 'Nu.',\n 'XCD': 'EC$',\n 'AUD': '$',\n 'BBD': '$',\n 'BIF': 'FBu',\n 'BMD': '$',\n 'BSD': '$',\n 'BWP': 'P',\n 'BZD': '$',\n 'CAD': '$',\n 'NZD': '$',\n 'FJD': '$',\n 'FKP': '£',\n 'GIP': '£',\n 'GMD': 'D',\n 'GYD': '$',\n 'HKD': '$',\n 'IDR': 'Rp',\n 'JMD': '$',\n 'KYD': '$',\n 'LRD': '$',\n 'MGA': 'Ar',\n 'MOP': 'MOP$',\n 'MUR': 'Rs',\n 'MWK': 'MK',\n 'MYR': 'RM',\n 'PGK': 'K',\n 'PHP': '₱',\n 'PKR': 'Rs',\n 'RWF': 'RF',\n 'SBD': '$',\n 'SCR': 'SR',\n 'SEK': 'kr',\n 'SGD': '$',\n 'SHP': '£',\n 'SLL': 'Le',\n 'ANG': 'NAf.',\n 'SZL': 'E',\n 'TOP': 'T$',\n 'TTD': '$',\n 'VUV': 'VT',\n 'WST': 'WS$',\n 'ARS': '$',\n 'BOB': 'Bs',\n 'BRL': 'R$',\n 'COP': '$',\n 'CRC': '₡',\n 'CUP': '$',\n 'DOP': '$',\n 'GTQ': 'Q',\n 'HNL': 'L',\n 'MXN': '$',\n 'NIO': 'C$',\n 'PAB': 'B/.',\n 'PEN': 'S/',\n 'PYG': '₲',\n 'UYU': '$',\n 'VES': 'Bs.S',\n 'IRR': 'ريال',\n 'GNF': 'FG',\n 'CDF': 'FC',\n 'HTG': 'G',\n 'XPF': 'FCFP',\n 'HRK': 'kn',\n 'HUF': 'Ft',\n 'AMD': '֏',\n 'ISK': 'kr',\n 'JPY': '¥',\n 'GEL': '₾',\n 'CVE': '​',\n 'KZT': '₸',\n 'KHR': '៛',\n 'KPW': '₩',\n 'KRW': '₩',\n 'KGS': 'сом',\n 'AOA': 'Kz',\n 'LAK': '₭',\n 'MZN': 'MTn',\n 'MKD': 'ден',\n 'MNT': '₮',\n 'BND': '$',\n 'MMK': 'K',\n 'NOK': 'kr',\n 'NPR': 'रु',\n 'AWG': 'Afl.',\n 'SRD': '$',\n 'PLN': 'zł',\n 'AFN': '؋',\n 'STN': 'Db',\n 'MDL': 'L',\n 'RON': 'lei',\n 'UAH': '₴',\n 'LKR': 'රු.',\n 'ALL': 'Lekë',\n 'RSD': 'дин.',\n 'TJS': 'смн',\n 'THB': '฿',\n 'TMT': 'm.',\n 'TRY': '₺',\n 'UZS': 'сўм',\n 'VND': '₫',\n 'TWD': 'NT$'\n};\nexport function getBlazorCurrencySymbol(currencyCode) {\n return getValue(currencyCode || '', blazorCurrencyData);\n}\n","/***\n * Hijri parser\n */\nexport var HijriParser;\n(function (HijriParser) {\n /* tslint:disable */\n var dateCorrection = [28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990, 29019, 29049, 29078, 29108, 29137, 29167,\n 29196, 29226, 29255, 29285, 29315, 29345, 29375, 29404, 29434, 29463, 29492, 29522, 29551, 29580, 29610, 29640, 29669, 29699, 29729, 29759,\n 29788, 29818, 29847, 29876, 29906, 29935, 29964, 29994, 30023, 30053, 30082, 30112, 30141, 30171, 30200, 30230, 30259, 30289, 30318, 30348,\n 30378, 30408, 30437, 30467, 30496, 30526, 30555, 30585, 30614, 30644, 30673, 30703, 30732, 30762, 30791, 30821, 30850, 30880, 30909, 30939,\n 30968, 30998, 31027, 31057, 31086, 31116, 31145, 31175, 31204, 31234, 31263, 31293, 31322, 31352, 31381, 31411, 31441, 31471, 31500, 31530,\n 31559, 31589, 31618, 31648, 31676, 31706, 31736, 31766, 31795, 31825, 31854, 31884, 31913, 31943, 31972, 32002, 32031, 32061, 32090, 32120,\n 32150, 32180, 32209, 32239, 32268, 32298, 32327, 32357, 32386, 32416, 32445, 32475, 32504, 32534, 32563, 32593, 32622, 32652, 32681, 32711,\n 32740, 32770, 32799, 32829, 32858, 32888, 32917, 32947, 32976, 33006, 33035, 33065, 33094, 33124, 33153, 33183, 33213, 33243, 33272, 33302,\n 33331, 33361, 33390, 33420, 33450, 33479, 33509, 33539, 33568, 33598, 33627, 33657, 33686, 33716, 33745, 33775, 33804, 33834, 33863, 33893,\n 33922, 33952, 33981, 34011, 34040, 34069, 34099, 34128, 34158, 34187, 34217, 34247, 34277, 34306, 34336, 34365, 34395, 34424, 34454, 34483,\n 34512, 34542, 34571, 34601, 34631, 34660, 34690, 34719, 34749, 34778, 34808, 34837, 34867, 34896, 34926, 34955, 34985, 35015, 35044, 35074,\n 35103, 35133, 35162, 35192, 35222, 35251, 35280, 35310, 35340, 35370, 35399, 35429, 35458, 35488, 35517, 35547, 35576, 35605, 35635, 35665,\n 35694, 35723, 35753, 35782, 35811, 35841, 35871, 35901, 35930, 35960, 35989, 36019, 36048, 36078, 36107, 36136, 36166, 36195, 36225, 36254,\n 36284, 36314, 36343, 36373, 36403, 36433, 36462, 36492, 36521, 36551, 36580, 36610, 36639, 36669, 36698, 36728, 36757, 36786, 36816, 36845,\n 36875, 36904, 36934, 36963, 36993, 37022, 37052, 37081, 37111, 37141, 37170, 37200, 37229, 37259, 37288, 37318, 37347, 37377, 37406, 37436,\n 37465, 37495, 37524, 37554, 37584, 37613, 37643, 37672, 37701, 37731, 37760, 37790, 37819, 37849, 37878, 37908, 37938, 37967, 37997, 38027,\n 38056, 38085, 38115, 38144, 38174, 38203, 38233, 38262, 38292, 38322, 38351, 38381, 38410, 38440, 38469, 38499, 38528, 38558, 38587, 38617,\n 38646, 38676, 38705, 38735, 38764, 38794, 38823, 38853, 38882, 38912, 38941, 38971, 39001, 39030, 39059, 39089, 39118, 39148, 39178, 39208,\n 39237, 39267, 39297, 39326, 39355, 39385, 39414, 39444, 39473, 39503, 39532, 39562, 39592, 39621, 39650, 39680, 39709, 39739, 39768, 39798,\n 39827, 39857, 39886, 39916, 39946, 39975, 40005, 40035, 40064, 40094, 40123, 40153, 40182, 40212, 40241, 40271, 40300, 40330, 40359, 40389,\n 40418, 40448, 40477, 40507, 40536, 40566, 40595, 40625, 40655, 40685, 40714, 40744, 40773, 40803, 40832, 40862, 40892, 40921, 40951, 40980,\n 41009, 41039, 41068, 41098, 41127, 41157, 41186, 41216, 41245, 41275, 41304, 41334, 41364, 41393, 41422, 41452, 41481, 41511, 41540, 41570,\n 41599, 41629, 41658, 41688, 41718, 41748, 41777, 41807, 41836, 41865, 41894, 41924, 41953, 41983, 42012, 42042, 42072, 42102, 42131, 42161,\n 42190, 42220, 42249, 42279, 42308, 42337, 42367, 42397, 42426, 42456, 42485, 42515, 42545, 42574, 42604, 42633, 42662, 42692, 42721, 42751,\n 42780, 42810, 42839, 42869, 42899, 42929, 42958, 42988, 43017, 43046, 43076, 43105, 43135, 43164, 43194, 43223, 43253, 43283, 43312, 43342,\n 43371, 43401, 43430, 43460, 43489, 43519, 43548, 43578, 43607, 43637, 43666, 43696, 43726, 43755, 43785, 43814, 43844, 43873, 43903, 43932,\n 43962, 43991, 44021, 44050, 44080, 44109, 44139, 44169, 44198, 44228, 44258, 44287, 44317, 44346, 44375, 44405, 44434, 44464, 44493, 44523,\n 44553, 44582, 44612, 44641, 44671, 44700, 44730, 44759, 44788, 44818, 44847, 44877, 44906, 44936, 44966, 44996, 45025, 45055, 45084, 45114,\n 45143, 45172, 45202, 45231, 45261, 45290, 45320, 45350, 45380, 45409, 45439, 45468, 45498, 45527, 45556, 45586, 45615, 45644, 45674, 45704,\n 45733, 45763, 45793, 45823, 45852, 45882, 45911, 45940, 45970, 45999, 46028, 46058, 46088, 46117, 46147, 46177, 46206, 46236, 46265, 46295,\n 46324, 46354, 46383, 46413, 46442, 46472, 46501, 46531, 46560, 46590, 46620, 46649, 46679, 46708, 46738, 46767, 46797, 46826, 46856, 46885,\n 46915, 46944, 46974, 47003, 47033, 47063, 47092, 47122, 47151, 47181, 47210, 47240, 47269, 47298, 47328, 47357, 47387, 47417, 47446, 47476,\n 47506, 47535, 47565, 47594, 47624, 47653, 47682, 47712, 47741, 47771, 47800, 47830, 47860, 47890, 47919, 47949, 47978, 48008, 48037, 48066,\n 48096, 48125, 48155, 48184, 48214, 48244, 48273, 48303, 48333, 48362, 48392, 48421, 48450, 48480, 48509, 48538, 48568, 48598, 48627, 48657,\n 48687, 48717, 48746, 48776, 48805, 48834, 48864, 48893, 48922, 48952, 48982, 49011, 49041, 49071, 49100, 49130, 49160, 49189, 49218, 49248,\n 49277, 49306, 49336, 49365, 49395, 49425, 49455, 49484, 49514, 49543, 49573, 49602, 49632, 49661, 49690, 49720, 49749, 49779, 49809, 49838,\n 49868, 49898, 49927, 49957, 49986, 50016, 50045, 50075, 50104, 50133, 50163, 50192, 50222, 50252, 50281, 50311, 50340, 50370, 50400, 50429,\n 50459, 50488, 50518, 50547, 50576, 50606, 50635, 50665, 50694, 50724, 50754, 50784, 50813, 50843, 50872, 50902, 50931, 50960, 50990, 51019,\n 51049, 51078, 51108, 51138, 51167, 51197, 51227, 51256, 51286, 51315, 51345, 51374, 51403, 51433, 51462, 51492, 51522, 51552, 51582, 51611,\n 51641, 51670, 51699, 51729, 51758, 51787, 51816, 51846, 51876, 51906, 51936, 51965, 51995, 52025, 52054, 52083, 52113, 52142, 52171, 52200,\n 52230, 52260, 52290, 52319, 52349, 52379, 52408, 52438, 52467, 52497, 52526, 52555, 52585, 52614, 52644, 52673, 52703, 52733, 52762, 52792,\n 52822, 52851, 52881, 52910, 52939, 52969, 52998, 53028, 53057, 53087, 53116, 53146, 53176, 53205, 53235, 53264, 53294, 53324, 53353, 53383,\n 53412, 53441, 53471, 53500, 53530, 53559, 53589, 53619, 53648, 53678, 53708, 53737, 53767, 53796, 53825, 53855, 53884, 53913, 53943, 53973,\n 54003, 54032, 54062, 54092, 54121, 54151, 54180, 54209, 54239, 54268, 54297, 54327, 54357, 54387, 54416, 54446, 54476, 54505, 54535, 54564,\n 54593, 54623, 54652, 54681, 54711, 54741, 54770, 54800, 54830, 54859, 54889, 54919, 54948, 54977, 55007, 55036, 55066, 55095, 55125, 55154,\n 55184, 55213, 55243, 55273, 55302, 55332, 55361, 55391, 55420, 55450, 55479, 55508, 55538, 55567, 55597, 55627, 55657, 55686, 55716, 55745,\n 55775, 55804, 55834, 55863, 55892, 55922, 55951, 55981, 56011, 56040, 56070, 56100, 56129, 56159, 56188, 56218, 56247, 56276, 56306, 56335,\n 56365, 56394, 56424, 56454, 56483, 56513, 56543, 56572, 56601, 56631, 56660, 56690, 56719, 56749, 56778, 56808, 56837, 56867, 56897, 56926,\n 56956, 56985, 57015, 57044, 57074, 57103, 57133, 57162, 57192, 57221, 57251, 57280, 57310, 57340, 57369, 57399, 57429, 57458, 57487, 57517,\n 57546, 57576, 57605, 57634, 57664, 57694, 57723, 57753, 57783, 57813, 57842, 57871, 57901, 57930, 57959, 57989, 58018, 58048, 58077, 58107,\n 58137, 58167, 58196, 58226, 58255, 58285, 58314, 58343, 58373, 58402, 58432, 58461, 58491, 58521, 58551, 58580, 58610, 58639, 58669, 58698,\n 58727, 58757, 58786, 58816, 58845, 58875, 58905, 58934, 58964, 58994, 59023, 59053, 59082, 59111, 59141, 59170, 59200, 59229, 59259, 59288,\n 59318, 59348, 59377, 59407, 59436, 59466, 59495, 59525, 59554, 59584, 59613, 59643, 59672, 59702, 59731, 59761, 59791, 59820, 59850, 59879,\n 59909, 59939, 59968, 59997, 60027, 60056, 60086, 60115, 60145, 60174, 60204, 60234, 60264, 60293, 60323, 60352, 60381, 60411, 60440, 60469,\n 60499, 60528, 60558, 60588, 60618, 60648, 60677, 60707, 60736, 60765, 60795, 60824, 60853, 60883, 60912, 60942, 60972, 61002, 61031, 61061,\n 61090, 61120, 61149, 61179, 61208, 61237, 61267, 61296, 61326, 61356, 61385, 61415, 61445, 61474, 61504, 61533, 61563, 61592, 61621, 61651,\n 61680, 61710, 61739, 61769, 61799, 61828, 61858, 61888, 61917, 61947, 61976, 62006, 62035, 62064, 62094, 62123, 62153, 62182, 62212, 62242,\n 62271, 62301, 62331, 62360, 62390, 62419, 62448, 62478, 62507, 62537, 62566, 62596, 62625, 62655, 62685, 62715, 62744, 62774, 62803, 62832,\n 62862, 62891, 62921, 62950, 62980, 63009, 63039, 63069, 63099, 63128, 63157, 63187, 63216, 63246, 63275, 63305, 63334, 63363, 63393, 63423,\n 63453, 63482, 63512, 63541, 63571, 63600, 63630, 63659, 63689, 63718, 63747, 63777, 63807, 63836, 63866, 63895, 63925, 63955, 63984, 64014,\n 64043, 64073, 64102, 64131, 64161, 64190, 64220, 64249, 64279, 64309, 64339, 64368, 64398, 64427, 64457, 64486, 64515, 64545, 64574, 64603,\n 64633, 64663, 64692, 64722, 64752, 64782, 64811, 64841, 64870, 64899, 64929, 64958, 64987, 65017, 65047, 65076, 65106, 65136, 65166, 65195,\n 65225, 65254, 65283, 65313, 65342, 65371, 65401, 65431, 65460, 65490, 65520, 65549, 65579, 65608, 65638, 65667, 65697, 65726, 65755, 65785,\n 65815, 65844, 65874, 65903, 65933, 65963, 65992, 66022, 66051, 66081, 66110, 66140, 66169, 66199, 66228, 66258, 66287, 66317, 66346, 66376,\n 66405, 66435, 66465, 66494, 66524, 66553, 66583, 66612, 66641, 66671, 66700, 66730, 66760, 66789, 66819, 66849, 66878, 66908, 66937, 66967,\n 66996, 67025, 67055, 67084, 67114, 67143, 67173, 67203, 67233, 67262, 67292, 67321, 67351, 67380, 67409, 67439, 67468, 67497, 67527, 67557,\n 67587, 67617, 67646, 67676, 67705, 67735, 67764, 67793, 67823, 67852, 67882, 67911, 67941, 67971, 68000, 68030, 68060, 68089, 68119, 68148,\n 68177, 68207, 68236, 68266, 68295, 68325, 68354, 68384, 68414, 68443, 68473, 68502, 68532, 68561, 68591, 68620, 68650, 68679, 68708, 68738,\n 68768, 68797, 68827, 68857, 68886, 68916, 68946, 68975, 69004, 69034, 69063, 69092, 69122, 69152, 69181, 69211, 69240, 69270, 69300, 69330,\n 69359, 69388, 69418, 69447, 69476, 69506, 69535, 69565, 69595, 69624, 69654, 69684, 69713, 69743, 69772, 69802, 69831, 69861, 69890, 69919,\n 69949, 69978, 70008, 70038, 70067, 70097, 70126, 70156, 70186, 70215, 70245, 70274, 70303, 70333, 70362, 70392, 70421, 70451, 70481, 70510,\n 70540, 70570, 70599, 70629, 70658, 70687, 70717, 70746, 70776, 70805, 70835, 70864, 70894, 70924, 70954, 70983, 71013, 71042, 71071, 71101,\n 71130, 71159, 71189, 71218, 71248, 71278, 71308, 71337, 71367, 71397, 71426, 71455, 71485, 71514, 71543, 71573, 71602, 71632, 71662, 71691,\n 71721, 71751, 71781, 71810, 71839, 71869, 71898, 71927, 71957, 71986, 72016, 72046, 72075, 72105, 72135, 72164, 72194, 72223, 72253, 72282,\n 72311, 72341, 72370, 72400, 72429, 72459, 72489, 72518, 72548, 72577, 72607, 72637, 72666, 72695, 72725, 72754, 72784, 72813, 72843, 72872,\n 72902, 72931, 72961, 72991, 73020, 73050, 73080, 73109, 73139, 73168, 73197, 73227, 73256, 73286, 73315, 73345, 73375, 73404, 73434, 73464,\n 73493, 73523, 73552, 73581, 73611, 73640, 73669, 73699, 73729, 73758, 73788, 73818, 73848, 73877, 73907, 73936, 73965, 73995, 74024, 74053,\n 74083, 74113, 74142, 74172, 74202, 74231, 74261, 74291, 74320, 74349, 74379, 74408, 74437, 74467, 74497, 74526, 74556, 74586, 74615, 74645,\n 74675, 74704, 74733, 74763, 74792, 74822, 74851, 74881, 74910, 74940, 74969, 74999, 75029, 75058, 75088, 75117, 75147, 75176, 75206, 75235,\n 75264, 75294, 75323, 75353, 75383, 75412, 75442, 75472, 75501, 75531, 75560, 75590, 75619, 75648, 75678, 75707, 75737, 75766, 75796, 75826,\n 75856, 75885, 75915, 75944, 75974, 76003, 76032, 76062, 76091, 76121, 76150, 76180, 76210, 76239, 76269, 76299, 76328, 76358, 76387, 76416,\n 76446, 76475, 76505, 76534, 76564, 76593, 76623, 76653, 76682, 76712, 76741, 76771, 76801, 76830, 76859, 76889, 76918, 76948, 76977, 77007,\n 77036, 77066, 77096, 77125, 77155, 77185, 77214, 77243, 77273, 77302, 77332, 77361, 77390, 77420, 77450, 77479, 77509, 77539, 77569, 77598,\n 77627, 77657, 77686, 77715, 77745, 77774, 77804, 77833, 77863, 77893, 77923, 77952, 77982, 78011, 78041, 78070, 78099, 78129, 78158, 78188,\n 78217, 78247, 78277, 78307, 78336, 78366, 78395, 78425, 78454, 78483, 78513, 78542, 78572, 78601, 78631, 78661, 78690, 78720, 78750, 78779,\n 78808, 78838, 78867, 78897, 78926, 78956, 78985, 79015, 79044, 79074, 79104, 79133, 79163, 79192, 79222, 79251, 79281, 79310, 79340, 79369,\n 79399, 79428, 79458, 79487, 79517, 79546, 79576, 79606, 79635, 79665, 79695, 79724, 79753, 79783, 79812, 79841, 79871, 79900, 79930, 79960,\n 79990];\n /* tslint:enable */\n function getHijriDate(gDate) {\n var day = gDate.getDate();\n var month = gDate.getMonth();\n var year = gDate.getFullYear();\n var tMonth = month + 1;\n var tYear = year;\n if (tMonth < 3) {\n tYear -= 1;\n tMonth += 12;\n }\n var yPrefix = Math.floor(tYear / 100.);\n var julilanOffset = yPrefix - Math.floor(yPrefix / 4.) - 2;\n var julianNumber = Math.floor(365.25 * (tYear + 4716)) + Math.floor(30.6001 * (tMonth + 1)) + day - julilanOffset - 1524;\n yPrefix = Math.floor((julianNumber - 1867216.25) / 36524.25);\n julilanOffset = yPrefix - Math.floor(yPrefix / 4.) + 1;\n var b = julianNumber + julilanOffset + 1524;\n var c = Math.floor((b - 122.1) / 365.25);\n var d = Math.floor(365.25 * c);\n var tempMonth = Math.floor((b - d) / 30.6001);\n day = (b - d) - Math.floor(30.6001 * tempMonth);\n month = Math.floor((b - d) / 20.6001);\n if (month > 13) {\n c += 1;\n month -= 12;\n }\n month -= 1;\n year = c - 4716;\n var modifiedJulianDate = julianNumber - 2400000;\n // date calculation for year after 2077\n var iyear = 10631. / 30.;\n var z = julianNumber - 1948084;\n var cyc = Math.floor(z / 10631.);\n z = z - 10631 * cyc;\n var j = Math.floor((z - 0.1335) / iyear);\n var iy = 30 * cyc + j;\n z = z - Math.floor(j * iyear + 0.1335);\n var im = Math.floor((z + 28.5001) / 29.5);\n /* istanbul ignore next */\n if (im === 13) {\n im = 12;\n }\n var tempDay = z - Math.floor(29.5001 * im - 29);\n var i = 0;\n for (; i < dateCorrection.length; i++) {\n if (dateCorrection[i] > modifiedJulianDate) {\n break;\n }\n }\n var iln = i + 16260;\n var ii = Math.floor((iln - 1) / 12);\n var hYear = ii + 1;\n var hmonth = iln - 12 * ii;\n var hDate = modifiedJulianDate - dateCorrection[i - 1] + 1;\n if ((hDate + '').length > 2) {\n hDate = tempDay;\n hmonth = im;\n hYear = iy;\n }\n return { year: hYear, month: hmonth, date: hDate };\n }\n HijriParser.getHijriDate = getHijriDate;\n function toGregorian(year, month, day) {\n var iy = year;\n var im = month;\n var id = day;\n var ii = iy - 1;\n var iln = (ii * 12) + 1 + (im - 1);\n var i = iln - 16260;\n var mcjdn = id + dateCorrection[i - 1] - 1;\n var julianDate = mcjdn + 2400000;\n var z = Math.floor(julianDate + 0.5);\n var a = Math.floor((z - 1867216.25) / 36524.25);\n a = z + 1 + a - Math.floor(a / 4);\n var b = a + 1524;\n var c = Math.floor((b - 122.1) / 365.25);\n var d = Math.floor(365.25 * c);\n var e = Math.floor((b - d) / 30.6001);\n var gDay = b - d - Math.floor(e * 30.6001);\n var gMonth = e - (e > 13.5 ? 13 : 1);\n var gYear = c - (gMonth > 2.5 ? 4716 : 4715);\n /* istanbul ignore next */\n if (gYear <= 0) {\n gMonth--;\n } // No year zero\n return new Date(gYear + '/' + (gMonth) + '/' + gDay);\n }\n HijriParser.toGregorian = toGregorian;\n})(HijriParser || (HijriParser = {}));\n","import { ParserBase as parser } from './parser-base';\nimport { IntlBase as base } from './intl-base';\nimport { isUndefined, throwError, getValue, isBlazor } from '../util';\nimport { HijriParser } from '../hijri-parser';\nimport { isNullOrUndefined, extend } from '../util';\nvar abbreviateRegexGlobal = /\\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi;\nvar standalone = 'stand-alone';\nvar weekdayKey = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];\nexport var basicPatterns = ['short', 'medium', 'long', 'full'];\nvar timeSetter = {\n m: 'getMinutes',\n h: 'getHours',\n H: 'getHours',\n s: 'getSeconds',\n d: 'getDate',\n f: 'getMilliseconds'\n};\nexport var datePartMatcher = {\n 'M': 'month',\n 'd': 'day',\n 'E': 'weekday',\n 'c': 'weekday',\n 'y': 'year',\n 'm': 'minute',\n 'h': 'hour',\n 'H': 'hour',\n 's': 'second',\n 'L': 'month',\n 'a': 'designator',\n 'z': 'timeZone',\n 'Z': 'timeZone',\n 'G': 'era',\n 'f': 'milliseconds'\n};\nvar timeSeparator = 'timeSeparator';\n/* tslint:disable no-any */\n/**\n * Date Format is a framework provides support for date formatting.\n * @private\n */\nvar DateFormat = /** @class */ (function () {\n function DateFormat() {\n }\n /**\n * Returns the formatter function for given skeleton.\n * @param {string} - Specifies the culture name to be which formatting.\n * @param {DateFormatOptions} - Specific the format in which date will format.\n * @param {cldr} - Specifies the global cldr data collection.\n * @return Function.\n */\n DateFormat.dateFormat = function (culture, option, cldr) {\n var _this = this;\n var dependable = base.getDependables(cldr, culture, option.calendar);\n var numObject = getValue('parserObject.numbers', dependable);\n var dateObject = dependable.dateObject;\n var formatOptions = { isIslamic: base.islamicRegex.test(option.calendar) };\n if (isBlazor() && option.isServerRendered) {\n option = base.compareBlazorDateFormats(option, culture);\n }\n var resPattern = option.format ||\n base.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor() ? culture : '');\n formatOptions.dateSeperator = isBlazor() ? getValue('dateSeperator', dateObject) : base.getDateSeparator(dependable.dateObject);\n if (isUndefined(resPattern)) {\n throwError('Format options or type given must be invalid');\n }\n else {\n resPattern = base.ConvertDateToWeekFormat(resPattern);\n if (isBlazor()) {\n resPattern = resPattern.replace(/tt/, 'a');\n }\n formatOptions.pattern = resPattern;\n formatOptions.numMapper = isBlazor() ?\n extend({}, numObject) : parser.getNumberMapper(dependable.parserObject, parser.getNumberingSystem(cldr));\n var patternMatch = resPattern.match(abbreviateRegexGlobal) || [];\n for (var _i = 0, patternMatch_1 = patternMatch; _i < patternMatch_1.length; _i++) {\n var str = patternMatch_1[_i];\n var len = str.length;\n var char = str[0];\n if (char === 'K') {\n char = 'h';\n }\n /* tslint:disable no-any */\n var charKey = datePartMatcher[char];\n switch (char) {\n case 'E':\n case 'c':\n if (isBlazor()) {\n formatOptions.weekday = getValue('days.' + base.monthIndex[len], dateObject);\n }\n else {\n formatOptions.weekday = dependable.dateObject[base.days][standalone][base.monthIndex[len]];\n }\n break;\n case 'M':\n case 'L':\n if (isBlazor()) {\n formatOptions.month = getValue('months.' + base.monthIndex[len], dateObject);\n }\n else {\n formatOptions.month = dependable.dateObject[base.month][standalone][base.monthIndex[len]];\n }\n break;\n case 'a':\n formatOptions.designator = isBlazor() ?\n getValue('dayPeriods', dateObject) : getValue('dayPeriods.format.wide', dateObject);\n break;\n case 'G':\n var eText = (len <= 3) ? 'eraAbbr' : (len === 4) ? 'eraNames' : 'eraNarrow';\n formatOptions.era = isBlazor() ? getValue('eras', dateObject) : getValue('eras.' + eText, dependable.dateObject);\n break;\n case 'z':\n formatOptions.timeZone = getValue('dates.timeZoneNames', dependable.parserObject);\n break;\n }\n }\n }\n return function (value) {\n if (isNaN(value.getDate())) {\n return null;\n }\n return _this.intDateFormatter(value, formatOptions);\n };\n };\n /**\n * Returns formatted date string based on options passed.\n * @param {Date} value\n * @param {FormatOptions} options\n */\n // tslint:disable-next-line:max-func-body-length\n DateFormat.intDateFormatter = function (value, options) {\n var pattern = options.pattern;\n var ret = '';\n var matches = pattern.match(base.dateParseRegex);\n var dObject = this.getCurrentDateValue(value, options.isIslamic);\n for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) {\n var match = matches_1[_i];\n var length_1 = match.length;\n var char = match[0];\n if (char === 'K') {\n char = 'h';\n }\n var curval = void 0;\n var curvalstr = '';\n var isNumber = void 0;\n var processNumber = void 0;\n var curstr = '';\n switch (char) {\n case 'M':\n case 'L':\n curval = dObject.month;\n if (length_1 > 2) {\n ret += options.month[curval];\n }\n else {\n isNumber = true;\n }\n break;\n case 'E':\n case 'c':\n ret += options.weekday[weekdayKey[value.getDay()]];\n break;\n case 'H':\n case 'h':\n case 'm':\n case 's':\n case 'd':\n case 'f':\n isNumber = true;\n if (char === 'd') {\n curval = dObject.date;\n }\n else if (char === 'f') {\n isNumber = false;\n processNumber = true;\n curvalstr = value[timeSetter[char]]().toString();\n curvalstr = curvalstr.substring(0, length_1);\n var curlength = curvalstr.length;\n if (length_1 !== curlength) {\n if (length_1 > 3) {\n continue;\n }\n for (var i = 0; i < length_1 - curlength; i++) {\n curvalstr = '0' + curvalstr.toString();\n }\n }\n curstr += curvalstr;\n }\n else {\n curval = value[timeSetter[char]]();\n }\n if (char === 'h') {\n curval = curval % 12 || 12;\n }\n break;\n case 'y':\n processNumber = true;\n curstr += dObject.year;\n if (length_1 === 2) {\n curstr = curstr.substr(curstr.length - 2);\n }\n break;\n case 'a':\n var desig = value.getHours() < 12 ? 'am' : 'pm';\n ret += options.designator[desig];\n break;\n case 'G':\n var dec = value.getFullYear() < 0 ? 0 : 1;\n var retu = options.era[dec];\n if (isNullOrUndefined(retu)) {\n retu = options.era[dec ? 0 : 1];\n }\n ret += retu || '';\n break;\n case '\\'':\n ret += (match === '\\'\\'') ? '\\'' : match.replace(/\\'/g, '');\n break;\n case 'z':\n var timezone = value.getTimezoneOffset();\n var pattern_1 = (length_1 < 4) ? '+H;-H' : options.timeZone.hourFormat;\n pattern_1 = pattern_1.replace(/:/g, options.numMapper.timeSeparator);\n if (timezone === 0) {\n ret += options.timeZone.gmtZeroFormat;\n }\n else {\n processNumber = true;\n curstr = this.getTimeZoneValue(timezone, pattern_1);\n }\n curstr = options.timeZone.gmtFormat.replace(/\\{0\\}/, curstr);\n break;\n case ':':\n ret += options.numMapper.numberSymbols[timeSeparator];\n /* tslint:enable no-any */\n break;\n case '/':\n ret += options.dateSeperator;\n break;\n case 'W':\n isNumber = true;\n curval = base.getWeekOfYear(value);\n break;\n default:\n ret += match;\n }\n if (isNumber) {\n processNumber = true;\n curstr = this.checkTwodigitNumber(curval, length_1);\n }\n if (processNumber) {\n ret += parser.convertValueParts(curstr, base.latnParseRegex, options.numMapper.mapper);\n }\n }\n return ret;\n };\n DateFormat.getCurrentDateValue = function (value, isIslamic) {\n if (isIslamic) {\n return HijriParser.getHijriDate(value);\n }\n return { year: value.getFullYear(), month: value.getMonth() + 1, date: value.getDate() };\n };\n /**\n * Returns two digit numbers for given value and length\n */\n DateFormat.checkTwodigitNumber = function (val, len) {\n var ret = val + '';\n if (len === 2 && ret.length !== 2) {\n return '0' + ret;\n }\n return ret;\n };\n /**\n * Returns the value of the Time Zone.\n * @param {number} tVal\n * @param {string} pattern\n * @private\n */\n DateFormat.getTimeZoneValue = function (tVal, pattern) {\n var _this = this;\n var splt = pattern.split(';');\n var curPattern = splt[tVal > 0 ? 1 : 0];\n var no = Math.abs(tVal);\n return curPattern = curPattern.replace(/HH?|mm/g, function (str) {\n var len = str.length;\n var ishour = str.indexOf('H') !== -1;\n return _this.checkTwodigitNumber(Math.floor(ishour ? (no / 60) : (no % 60)), len);\n });\n };\n return DateFormat;\n}());\nexport { DateFormat };\n","import { isUndefined, throwError, isNullOrUndefined, extend, isBlazor, getValue } from '../util';\nimport { defaultCurrencyCode } from '../internationalization';\nimport { IntlBase as base } from './intl-base';\nimport { ParserBase as parser } from './parser-base';\nvar errorText = {\n 'ms': 'minimumSignificantDigits',\n 'ls': 'maximumSignificantDigits',\n 'mf': 'minimumFractionDigits',\n 'lf': 'maximumFractionDigits',\n};\nvar integerError = 'minimumIntegerDigits';\nvar percentSign = 'percentSign';\nvar minusSign = 'minusSign';\nvar spaceRegex = /\\s/;\nvar mapper = ['infinity', 'nan', 'group', 'decimal', 'exponential'];\nvar infinity = 'infinity';\nvar nan = 'nan';\n/**\n * Module for number formatting.\n * @private\n */\nvar NumberFormat = /** @class */ (function () {\n function NumberFormat() {\n }\n /**\n * Returns the formatter function for given skeleton.\n * @param {string} culture - Specifies the culture name to be which formatting.\n * @param {NumberFormatOptions} option - Specific the format in which number will format.\n * @param {Object} object- Specifies the global cldr data collection.\n * @return Function.\n */\n NumberFormat.numberFormatter = function (culture, option, cldr) {\n var _this = this;\n var fOptions = extend({}, option);\n var cOptions = {};\n var dOptions = {};\n var symbolPattern;\n var dependable = base.getDependables(cldr, culture, '', true);\n var numObject = dependable.numericObject;\n dOptions.numberMapper = isBlazor() ? extend({}, numObject) :\n parser.getNumberMapper(dependable.parserObject, parser.getNumberingSystem(cldr), true);\n dOptions.currencySymbol = isBlazor() ? getValue('currencySymbol', numObject) : base.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode, option.altSymbol);\n /* tslint:disable no-any */\n dOptions.percentSymbol = isBlazor() ? getValue('numberSymbols.percentSign', numObject) :\n dOptions.numberMapper.numberSymbols[percentSign];\n dOptions.minusSymbol = isBlazor() ? getValue('numberSymbols.minusSign', numObject) :\n dOptions.numberMapper.numberSymbols[minusSign];\n var symbols = dOptions.numberMapper.numberSymbols;\n if ((option.format) && !(base.formatRegex.test(option.format))) {\n cOptions = base.customFormat(option.format, dOptions, dependable.numericObject);\n }\n else {\n extend(fOptions, base.getProperNumericSkeleton(option.format || 'N'));\n fOptions.isCurrency = fOptions.type === 'currency';\n fOptions.isPercent = fOptions.type === 'percent';\n if (!isBlazor()) {\n symbolPattern = base.getSymbolPattern(fOptions.type, dOptions.numberMapper.numberSystem, dependable.numericObject, fOptions.isAccount);\n }\n fOptions.groupOne = this.checkValueRange(fOptions.maximumSignificantDigits, fOptions.minimumSignificantDigits, true);\n this.checkValueRange(fOptions.maximumFractionDigits, fOptions.minimumFractionDigits, false, true);\n if (!isUndefined(fOptions.fractionDigits)) {\n fOptions.minimumFractionDigits = fOptions.maximumFractionDigits = fOptions.fractionDigits;\n }\n if (isUndefined(fOptions.useGrouping)) {\n fOptions.useGrouping = true;\n }\n if (fOptions.isCurrency && !isBlazor()) {\n symbolPattern = symbolPattern.replace(/\\u00A4/g, base.defaultCurrency);\n }\n if (!isBlazor()) {\n var split = symbolPattern.split(';');\n cOptions.nData = base.getFormatData(split[1] || '-' + split[0], true, dOptions.currencySymbol);\n cOptions.pData = base.getFormatData(split[0], false, dOptions.currencySymbol);\n if (fOptions.useGrouping) {\n fOptions.groupSeparator = symbols[mapper[2]];\n fOptions.groupData = this.getGroupingDetails(split[0]);\n }\n }\n else {\n cOptions.nData = extend({}, {}, getValue(fOptions.type + 'nData', numObject));\n cOptions.pData = extend({}, {}, getValue(fOptions.type + 'pData', numObject));\n if (fOptions.type === 'currency' && option.currency) {\n base.replaceBlazorCurrency([cOptions.pData, cOptions.nData], dOptions.currencySymbol, option.currency);\n }\n }\n var minFrac = isUndefined(fOptions.minimumFractionDigits);\n if (minFrac) {\n fOptions.minimumFractionDigits = cOptions.nData.minimumFraction;\n }\n if (isUndefined(fOptions.maximumFractionDigits)) {\n var mval = cOptions.nData.maximumFraction;\n fOptions.maximumFractionDigits = isUndefined(mval) && fOptions.isPercent ? 0 : mval;\n }\n var mfrac = fOptions.minimumFractionDigits;\n var lfrac = fOptions.maximumFractionDigits;\n if (!isUndefined(mfrac) && !isUndefined(lfrac)) {\n if (mfrac > lfrac) {\n fOptions.maximumFractionDigits = mfrac;\n }\n }\n }\n extend(cOptions.nData, fOptions);\n extend(cOptions.pData, fOptions);\n return function (value) {\n if (isNaN(value)) {\n return symbols[mapper[1]];\n }\n else if (!isFinite(value)) {\n return symbols[mapper[0]];\n }\n return _this.intNumberFormatter(value, cOptions, dOptions);\n };\n };\n /**\n * Returns grouping details for the pattern provided\n * @param {string} pattern\n * @returns {GroupDetails}\n */\n NumberFormat.getGroupingDetails = function (pattern) {\n var ret = {};\n var match = pattern.match(base.negativeDataRegex);\n if (match && match[4]) {\n var pattern_1 = match[4];\n var p = pattern_1.lastIndexOf(',');\n if (p !== -1) {\n var temp = pattern_1.split('.')[0];\n ret.primary = (temp.length - p) - 1;\n var s = pattern_1.lastIndexOf(',', p - 1);\n if (s !== -1) {\n ret.secondary = p - 1 - s;\n }\n }\n }\n return ret;\n };\n /**\n * Returns if the provided integer range is valid.\n * @param {number} val1\n * @param {number} val2\n * @param {boolean} checkbothExist\n * @param {boolean} isFraction\n * @returns {boolean}\n */\n NumberFormat.checkValueRange = function (val1, val2, checkbothExist, isFraction) {\n var decide = isFraction ? 'f' : 's';\n var dint = 0;\n var str1 = errorText['l' + decide];\n var str2 = errorText['m' + decide];\n if (!isUndefined(val1)) {\n this.checkRange(val1, str1, isFraction);\n dint++;\n }\n if (!isUndefined(val2)) {\n this.checkRange(val2, str2, isFraction);\n dint++;\n }\n if (dint === 2) {\n if (val1 < val2) {\n throwError(str2 + 'specified must be less than the' + str1);\n }\n else {\n return true;\n }\n }\n else if (checkbothExist && dint === 1) {\n throwError('Both' + str2 + 'and' + str2 + 'must be present');\n }\n return false;\n };\n /**\n * Check if the provided fraction range is valid\n * @param {number} val\n * @param {string} text\n * @param {boolean} isFraction\n * @returns {void}\n */\n NumberFormat.checkRange = function (val, text, isFraction) {\n var range = isFraction ? [0, 20] : [1, 21];\n if (val < range[0] || val > range[1]) {\n throwError(text + 'value must be within the range' + range[0] + 'to' + range[1]);\n }\n };\n /**\n * Returns formatted numeric string for provided formatting options\n * @param {number} value\n * @param {base.GenericFormatOptions} fOptions\n * @param {CommonOptions} dOptions\n * @returns {string}\n */\n NumberFormat.intNumberFormatter = function (value, fOptions, dOptions) {\n var curData;\n if (isUndefined(fOptions.nData.type)) {\n return undefined;\n }\n else {\n if (value < 0) {\n value = value * -1;\n curData = fOptions.nData;\n }\n else if (value === 0) {\n curData = fOptions.zeroData || fOptions.pData;\n }\n else {\n curData = fOptions.pData;\n }\n var fValue = '';\n if (curData.isPercent) {\n value = value * 100;\n }\n if (curData.groupOne) {\n fValue = this.processSignificantDigits(value, curData.minimumSignificantDigits, curData.maximumSignificantDigits);\n }\n else {\n fValue = this.processFraction(value, curData.minimumFractionDigits, curData.maximumFractionDigits);\n if (curData.minimumIntegerDigits) {\n fValue = this.processMinimumIntegers(fValue, curData.minimumIntegerDigits);\n }\n }\n if (curData.type === 'scientific') {\n fValue = value.toExponential(curData.maximumFractionDigits);\n fValue = fValue.replace('e', dOptions.numberMapper.numberSymbols[mapper[4]]);\n }\n fValue = fValue.replace('.', dOptions.numberMapper.numberSymbols[mapper[3]]);\n if (curData.useGrouping) {\n fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ',', dOptions.numberMapper.numberSymbols[mapper[3]] || '.', curData.groupData.secondary);\n }\n fValue = parser.convertValueParts(fValue, base.latnParseRegex, dOptions.numberMapper.mapper);\n if (curData.nlead === 'N/A') {\n return curData.nlead;\n }\n else {\n return curData.nlead + fValue + curData.nend;\n }\n }\n };\n /**\n * Returns significant digits processed numeric string\n * @param {number} value\n * @param {number} min\n * @param {number} max\n * @returns {string}\n */\n NumberFormat.processSignificantDigits = function (value, min, max) {\n var temp = value + '';\n var tn;\n var length = temp.length;\n if (length < min) {\n return value.toPrecision(min);\n }\n else {\n temp = value.toPrecision(max);\n tn = +temp;\n return tn + '';\n }\n };\n /**\n * Returns grouped numeric string\n * @param {string} val\n * @param {number} level1\n * @param {string} sep\n * @param {string} decimalSymbol\n * @param {number} level2\n * @returns {string}\n */\n NumberFormat.groupNumbers = function (val, level1, sep, decimalSymbol, level2) {\n var flag = !isNullOrUndefined(level2) && level2 !== 0;\n var split = val.split(decimalSymbol);\n var prefix = split[0];\n var length = prefix.length;\n var str = '';\n while (length > level1) {\n str = prefix.slice(length - level1, length) + (str.length ?\n (sep + str) : '');\n length -= level1;\n if (flag) {\n level1 = level2;\n flag = false;\n }\n }\n split[0] = prefix.slice(0, length) + (str.length ? sep : '') + str;\n return split.join(decimalSymbol);\n };\n /**\n * Returns fraction processed numeric string\n * @param {number} value\n * @param {number} min\n * @param {number} max\n * @returns {string}\n */\n NumberFormat.processFraction = function (value, min, max) {\n var temp = (value + '').split('.')[1];\n var length = temp ? temp.length : 0;\n if (min && length < min) {\n var ret = '';\n if (length === 0) {\n ret = value.toFixed(min);\n }\n else {\n ret += value;\n for (var j = 0; j < min - length; j++) {\n ret += '0';\n }\n return ret;\n }\n return value.toFixed(min);\n }\n else if (!isNullOrUndefined(max) && (length > max || max === 0)) {\n return value.toFixed(max);\n }\n return value + '';\n };\n /**\n * Returns integer processed numeric string\n * @param {string} value\n * @param {number} min\n * @returns {string}\n */\n NumberFormat.processMinimumIntegers = function (value, min) {\n var temp = value.split('.');\n var lead = temp[0];\n var len = lead.length;\n if (len < min) {\n for (var i = 0; i < min - len; i++) {\n lead = '0' + lead;\n }\n temp[0] = lead;\n }\n return temp.join('.');\n };\n return NumberFormat;\n}());\nexport { NumberFormat };\n","import { IntlBase as base } from './intl-base';\nimport { ParserBase as parser } from './parser-base';\nimport { isUndefined, throwError, getValue, isNullOrUndefined, isBlazor } from '../util';\nimport { datePartMatcher } from './date-formatter';\nimport { HijriParser } from '../hijri-parser';\nvar number = 'numbers';\nvar defNoSystem = 'defaultNumberingSystem';\nvar noSystem = 'numberingSystem';\nvar standalone = 'stand-alone';\nvar curWeekDay = 'curWeekDay';\nvar latnRegex = /^[0-9]*$/;\nvar abbreviateRegex = /\\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|ccc/;\nvar timeSetter = {\n minute: 'setMinutes',\n hour: 'setHours',\n second: 'setSeconds',\n day: 'setDate',\n month: 'setMonth',\n milliseconds: 'setMilliseconds'\n};\nvar month = 'months';\n/* tslint:disable no-any */\n/**\n * Date Parser.\n * @private\n */\nvar DateParser = /** @class */ (function () {\n function DateParser() {\n }\n /**\n * Returns the parser function for given skeleton.\n * @param {string} - Specifies the culture name to be which formatting.\n * @param {DateFormatOptions} - Specific the format in which string date will be parsed.\n * @param {cldr} - Specifies the global cldr data collection.\n * @return Function.\n */\n // tslint:disable-next-line:max-func-body-length\n DateParser.dateParser = function (culture, option, cldr) {\n var _this = this;\n var dependable = base.getDependables(cldr, culture, option.calendar);\n // tslint:disable-next-line\n var numOptions = parser.getCurrentNumericOptions(dependable.parserObject, parser.getNumberingSystem(cldr), false, isBlazor());\n var parseOptions = {};\n if (isBlazor() && option.isServerRendered) {\n option = base.compareBlazorDateFormats(option, culture);\n }\n var resPattern = option.format ||\n base.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor() ? culture : '');\n var regexString = '';\n var hourOnly;\n if (isUndefined(resPattern)) {\n throwError('Format options or type given must be invalid');\n }\n else {\n resPattern = base.ConvertDateToWeekFormat(resPattern);\n parseOptions = { isIslamic: base.islamicRegex.test(option.calendar), pattern: resPattern, evalposition: {}, culture: culture };\n var patternMatch = resPattern.match(base.dateParseRegex) || [];\n var length_1 = patternMatch.length;\n var gmtCorrection = 0;\n var zCorrectTemp = 0;\n var isgmtTraversed = false;\n var nRegx = numOptions.numericRegex;\n // tslint:disable-next-line\n var numMapper = isBlazor() ? dependable.parserObject.numbers :\n parser.getNumberMapper(dependable.parserObject, parser.getNumberingSystem(cldr));\n for (var i = 0; i < length_1; i++) {\n var str = patternMatch[i];\n var len = str.length;\n var char = (str[0] === 'K') ? 'h' : str[0];\n var isNumber = void 0;\n var canUpdate = void 0;\n // tslint:disable-next-line\n var charKey = datePartMatcher[char];\n var optional = (len === 2) ? '' : '?';\n if (isgmtTraversed) {\n gmtCorrection = zCorrectTemp;\n isgmtTraversed = false;\n }\n switch (char) {\n case 'E':\n case 'c':\n // tslint:disable\n var weekData = void 0;\n if (isBlazor()) {\n weekData = getValue('days.' + base.monthIndex[len], dependable.dateObject);\n }\n else {\n weekData = dependable.dateObject[base.days][standalone][base.monthIndex[len]];\n }\n var weekObject = parser.reverseObject(weekData);\n // tslint:enable\n regexString += '(' + Object.keys(weekObject).join('|') + ')';\n break;\n case 'M':\n case 'L':\n case 'd':\n case 'm':\n case 's':\n case 'h':\n case 'H':\n case 'f':\n canUpdate = true;\n if ((char === 'M' || char === 'L') && len > 2) {\n var monthData = void 0;\n if (isBlazor()) {\n /* tslint:disable no-any */\n monthData = getValue('months.' + base.monthIndex[len], dependable.dateObject);\n }\n else {\n /* tslint:disable no-any */\n monthData = dependable.dateObject[month][standalone][base.monthIndex[len]];\n }\n // tslint:disable-next-line\n parseOptions[charKey] = parser.reverseObject(monthData);\n /* tslint:disable no-any */\n regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + ')';\n }\n else if (char === 'f') {\n if (len > 3) {\n continue;\n }\n isNumber = true;\n regexString += '(' + nRegx + nRegx + '?' + nRegx + '?' + ')';\n }\n else {\n isNumber = true;\n regexString += '(' + nRegx + nRegx + optional + ')';\n }\n if (char === 'h') {\n parseOptions.hour12 = true;\n }\n break;\n case 'W':\n var opt = len === 1 ? '?' : '';\n regexString += '(' + nRegx + opt + nRegx + ')';\n break;\n case 'y':\n canUpdate = isNumber = true;\n if (len === 2) {\n regexString += '(' + nRegx + nRegx + ')';\n }\n else {\n regexString += '(' + nRegx + '{' + len + ',})';\n }\n break;\n case 'a':\n canUpdate = true;\n var periodValur = isBlazor() ?\n getValue('dayPeriods', dependable.dateObject) :\n getValue('dayPeriods.format.wide', dependable.dateObject);\n parseOptions[charKey] = parser.reverseObject(periodValur);\n regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + ')';\n break;\n case 'G':\n canUpdate = true;\n var eText = (len <= 3) ? 'eraAbbr' : (len === 4) ? 'eraNames' : 'eraNarrow';\n parseOptions[charKey] = parser.reverseObject(isBlazor() ?\n getValue('eras', dependable.dateObject) : getValue('eras.' + eText, dependable.dateObject));\n regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + '?)';\n break;\n case 'z':\n var tval = new Date().getTimezoneOffset();\n canUpdate = (tval !== 0);\n parseOptions[charKey] = getValue('dates.timeZoneNames', dependable.parserObject);\n var tzone = parseOptions[charKey];\n hourOnly = (len < 4);\n var hpattern = hourOnly ? '+H;-H' : tzone.hourFormat;\n hpattern = hpattern.replace(/:/g, numMapper.timeSeparator);\n regexString += '(' + this.parseTimeZoneRegx(hpattern, tzone, nRegx) + ')?';\n isgmtTraversed = true;\n zCorrectTemp = hourOnly ? 6 : 12;\n break;\n case '\\'':\n var iString = str.replace(/\\'/g, '');\n regexString += '(' + iString + ')?';\n break;\n default:\n regexString += '([\\\\D])';\n break;\n }\n if (canUpdate) {\n parseOptions.evalposition[charKey] = { isNumber: isNumber, pos: i + 1 + gmtCorrection, hourOnly: hourOnly };\n }\n if (i === length_1 - 1 && !isNullOrUndefined(regexString)) {\n parseOptions.parserRegex = new RegExp('^' + regexString + '$', 'i');\n }\n }\n }\n return function (value) {\n var parsedDateParts = _this.internalDateParse(value, parseOptions, numOptions);\n if (isNullOrUndefined(parsedDateParts) || !Object.keys(parsedDateParts).length) {\n return null;\n }\n if (parseOptions.isIslamic) {\n var dobj = {};\n var tYear = parsedDateParts.year;\n var tDate = parsedDateParts.day;\n var tMonth = parsedDateParts.month;\n var ystrig = tYear ? (tYear + '') : '';\n var is2DigitYear = (ystrig.length === 2);\n if (!tYear || !tMonth || !tDate || is2DigitYear) {\n dobj = HijriParser.getHijriDate(new Date());\n }\n if (is2DigitYear) {\n tYear = parseInt((dobj.year + '').slice(0, 2) + ystrig, 10);\n }\n // tslint:disable-next-line\n var dateObject = HijriParser.toGregorian(tYear || dobj.year, tMonth || dobj.month, tDate || dobj.date);\n parsedDateParts.year = dateObject.getFullYear();\n parsedDateParts.month = dateObject.getMonth() + 1;\n parsedDateParts.day = dateObject.getDate();\n }\n return _this.getDateObject(parsedDateParts);\n };\n };\n /* tslint:disable */\n /**\n * Returns date object for provided date options\n * @param {DateParts} options\n * @param {Date} value\n * @returns {Date}\n */\n DateParser.getDateObject = function (options, value) {\n var res = value || new Date();\n res.setMilliseconds(0);\n var tKeys = ['hour', 'minute', 'second', 'milliseconds', 'month', 'day'];\n var y = options.year;\n var desig = options.designator;\n var tzone = options.timeZone;\n if (!isUndefined(y)) {\n var len = (y + '').length;\n if (len <= 2) {\n var century = Math.floor(res.getFullYear() / 100) * 100;\n y += century;\n }\n res.setFullYear(y);\n }\n for (var _i = 0, tKeys_1 = tKeys; _i < tKeys_1.length; _i++) {\n var key = tKeys_1[_i];\n var tValue = options[key];\n if (isUndefined(tValue) && key === \"day\") {\n res.setDate(1);\n }\n if (!isUndefined(tValue)) {\n if (key === 'month') {\n tValue -= 1;\n if (tValue < 0 || tValue > 11) {\n return new Date('invalid');\n }\n var pDate = res.getDate();\n res.setDate(1);\n res[timeSetter[key]](tValue);\n var lDate = new Date(res.getFullYear(), tValue + 1, 0).getDate();\n res.setDate(pDate < lDate ? pDate : lDate);\n }\n else {\n if (key === 'day') {\n var lastDay = new Date(res.getFullYear(), res.getMonth() + 1, 0).getDate();\n if ((tValue < 1 || tValue > lastDay)) {\n return null;\n }\n }\n res[timeSetter[key]](tValue);\n }\n }\n }\n if (!isUndefined(desig)) {\n var hour = res.getHours();\n if (desig === 'pm') {\n res.setHours(hour + (hour === 12 ? 0 : 12));\n }\n else if (hour === 12) {\n res.setHours(0);\n }\n }\n if (!isUndefined(tzone)) {\n var tzValue = tzone - res.getTimezoneOffset();\n if (tzValue !== 0) {\n res.setMinutes(res.getMinutes() + tzValue);\n }\n }\n return res;\n };\n /**\n * Returns date parsing options for provided value along with parse and numeric options\n * @param {string} value\n * @param {ParseOptions} parseOptions\n * @param {NumericOptions} num\n * @returns {DateParts}\n */\n DateParser.internalDateParse = function (value, parseOptions, num) {\n var matches = value.match(parseOptions.parserRegex);\n var retOptions = { 'hour': 0, 'minute': 0, 'second': 0 };\n var nRegx = num.numericRegex;\n if (isNullOrUndefined(matches)) {\n return null;\n }\n else {\n var props = Object.keys(parseOptions.evalposition);\n for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {\n var prop = props_1[_i];\n var curObject = parseOptions.evalposition[prop];\n var matchString = matches[curObject.pos];\n if (curObject.isNumber) {\n retOptions[prop] = this.internalNumberParser(matchString, num);\n }\n else {\n if (prop === 'timeZone' && !isUndefined(matchString)) {\n var pos = curObject.pos;\n var val = void 0;\n var tmatch = matches[pos + 1];\n var flag = !isUndefined(tmatch);\n if (curObject.hourOnly) {\n val = this.getZoneValue(flag, tmatch, matches[pos + 4], num) * 60;\n }\n else {\n val = this.getZoneValue(flag, tmatch, matches[pos + 7], num) * 60;\n val += this.getZoneValue(flag, matches[pos + 4], matches[pos + 10], num);\n }\n if (!isNullOrUndefined(val)) {\n retOptions[prop] = val;\n }\n }\n else {\n matchString = ((prop === 'month') && (!parseOptions.isIslamic) && (parseOptions.culture === 'en' || parseOptions.culture === 'en-GB' || parseOptions.culture === 'en-US'))\n ? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;\n retOptions[prop] = parseOptions[prop][matchString];\n }\n }\n }\n if (parseOptions.hour12) {\n retOptions.hour12 = true;\n }\n }\n return retOptions;\n };\n /**\n * Returns parsed number for provided Numeric string and Numeric Options\n * @param {string} value\n * @param {NumericOptions} option\n * @returns {number}\n */\n DateParser.internalNumberParser = function (value, option) {\n value = parser.convertValueParts(value, option.numberParseRegex, option.numericPair);\n if (latnRegex.test(value)) {\n return +value;\n }\n return null;\n };\n /**\n * Returns parsed time zone RegExp for provided hour format and time zone\n * @param {string} hourFormat\n * @param {base.TimeZoneOptions} tZone\n * @param {string} nRegex\n * @returns {string}\n */\n DateParser.parseTimeZoneRegx = function (hourFormat, tZone, nRegex) {\n var pattern = tZone.gmtFormat;\n var ret;\n var result;\n var cRegex = '(' + nRegex + ')' + '(' + nRegex + ')';\n var splitStr;\n ret = hourFormat.replace('+', '\\\\+');\n if (hourFormat.indexOf('HH') !== -1) {\n ret = ret.replace(/HH|mm/g, '(' + cRegex + ')');\n }\n else {\n ret = ret.replace(/H|m/g, '(' + cRegex + '?)');\n }\n splitStr = (ret.split(';').map(function (str) {\n return pattern.replace('{0}', str);\n }));\n ret = splitStr.join('|') + '|' + tZone.gmtZeroFormat;\n return ret;\n };\n /**\n * Returns zone based value.\n * @param {boolean} flag\n * @param {string} val1\n * @param {string} val2\n * @param {NumericOptions} num\n * @returns {number}\n */\n DateParser.getZoneValue = function (flag, val1, val2, num) {\n var ival = flag ? val1 : val2;\n if (!ival) {\n return 0;\n }\n var value = this.internalNumberParser(ival, num);\n if (flag) {\n return -value;\n }\n return value;\n };\n return DateParser;\n}());\nexport { DateParser };\n/* tslint:enable */\n","import { extend, isNullOrUndefined, isBlazor, getValue } from '../util';\nimport { ParserBase as parser } from './parser-base';\nimport { IntlBase as base } from './intl-base';\nvar formatRegex = /(^[ncpa]{1})([0-1]?[0-9]|20)?$/i;\nvar parseRegex = /^([^0-9]*)(([0-9,]*[0-9]+)(\\.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$/;\nvar groupRegex = /,/g;\nvar latnDecimalRegex = /^[0-9]*(\\.[0-9]+)?$/;\nvar keys = ['minusSign', 'infinity'];\n/**\n * Module for Number Parser.\n * @private\n */\nvar NumberParser = /** @class */ (function () {\n function NumberParser() {\n }\n /**\n * Returns the parser function for given skeleton.\n * @param {string} - Specifies the culture name to be which formatting.\n * @param {NumberFormatOptions} - Specific the format in which number will parsed.\n * @param {cldr} - Specifies the global cldr data collection.\n * @return Function.\n */\n NumberParser.numberParser = function (culture, option, cldr) {\n var _this = this;\n var dependable = base.getDependables(cldr, culture, '', true);\n var parseOptions = { custom: true };\n var numOptions;\n if ((base.formatRegex.test(option.format)) || !(option.format)) {\n extend(parseOptions, base.getProperNumericSkeleton(option.format || 'N'));\n parseOptions.custom = false;\n if (!parseOptions.fractionDigits) {\n if (option.maximumFractionDigits) {\n parseOptions.maximumFractionDigits = option.maximumFractionDigits;\n }\n }\n }\n else {\n extend(parseOptions, base.customFormat(option.format, null, null));\n }\n var numbers = getValue('numbers', dependable.parserObject);\n numOptions = parser.getCurrentNumericOptions(dependable.parserObject, parser.getNumberingSystem(cldr), true, isBlazor());\n parseOptions.symbolRegex = parser.getSymbolRegex(Object.keys(numOptions.symbolMatch));\n // tslint:disable-next-line:no-any\n parseOptions.infinity = numOptions.symbolNumberSystem[keys[1]];\n var symbolpattern;\n if (!isBlazor()) {\n symbolpattern = base.getSymbolPattern(parseOptions.type, numOptions.numberSystem, dependable.numericObject, parseOptions.isAccount);\n if (symbolpattern) {\n symbolpattern = symbolpattern.replace(/\\u00A4/g, base.defaultCurrency);\n var split = symbolpattern.split(';');\n parseOptions.nData = base.getFormatData(split[1] || '-' + split[0], true, '');\n parseOptions.pData = base.getFormatData(split[0], true, '');\n }\n }\n else {\n parseOptions.nData = extend({}, {}, getValue(parseOptions.type + 'nData', numbers));\n parseOptions.pData = extend({}, {}, getValue(parseOptions.type + 'pData', numbers));\n if (parseOptions.type === 'currency' && option.currency) {\n base.replaceBlazorCurrency([parseOptions.pData, parseOptions.nData], getValue('currencySymbol', numbers), option.currency);\n }\n }\n return function (value) {\n return _this.getParsedNumber(value, parseOptions, numOptions);\n };\n };\n /**\n * Returns parsed number for the provided formatting options\n * @param {string} value\n * @param {NumericParts} options\n * @param {NumericOptions} numOptions\n * @returns {number}\n */\n NumberParser.getParsedNumber = function (value, options, numOptions) {\n var isNegative;\n var isPercent;\n var tempValue;\n var lead;\n var end;\n var ret;\n if (value.indexOf(options.infinity) !== -1) {\n return Infinity;\n }\n else {\n value = parser.convertValueParts(value, options.symbolRegex, numOptions.symbolMatch);\n value = parser.convertValueParts(value, numOptions.numberParseRegex, numOptions.numericPair);\n if (value.indexOf('.') === 0) {\n value = '0' + value;\n }\n var matches = value.match(parseRegex);\n if (isNullOrUndefined(matches)) {\n return NaN;\n }\n lead = matches[1];\n tempValue = matches[2];\n var exponent = matches[5];\n end = matches[6];\n isNegative = options.custom ? ((lead === options.nData.nlead) && (end === options.nData.nend)) :\n ((lead.indexOf(options.nData.nlead) !== -1) && (end.indexOf(options.nData.nend) !== -1));\n isPercent = isNegative ?\n options.nData.isPercent :\n options.pData.isPercent;\n tempValue = tempValue.replace(groupRegex, '');\n if (exponent) {\n tempValue += exponent;\n }\n ret = +tempValue;\n if (options.type === 'percent' || isPercent) {\n ret = ret / 100;\n }\n if (options.custom || options.fractionDigits) {\n ret = parseFloat(ret.toFixed(options.custom ?\n (isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits) : options.fractionDigits));\n }\n if (options.maximumFractionDigits) {\n ret = this.convertMaxFracDigits(tempValue, options, ret, isNegative);\n }\n if (isNegative) {\n ret *= -1;\n }\n return ret;\n }\n };\n NumberParser.convertMaxFracDigits = function (value, options, ret, isNegative) {\n var decimalSplitValue = value.split('.');\n if (decimalSplitValue[1] && decimalSplitValue[1].length > options.maximumFractionDigits) {\n ret = +(ret.toFixed(options.custom ?\n (isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits) : options.maximumFractionDigits));\n }\n return ret;\n };\n return NumberParser;\n}());\nexport { NumberParser };\n","import { isNullOrUndefined, getValue, extend, isBlazor } from './util';\nvar Observer = /** @class */ (function () {\n function Observer(context) {\n this.ranArray = [];\n this.boundedEvents = {};\n if (isNullOrUndefined(context)) {\n return;\n }\n this.context = context;\n }\n ;\n /**\n * To attach handler for given property in current context.\n * @param {string} property - specifies the name of the event.\n * @param {Function} handler - Specifies the handler function to be called while event notified.\n * @param {Object} context - Specifies the context binded to the handler.\n * @param {string} id - specifies the random generated id.\n * @return {void}\n */\n Observer.prototype.on = function (property, handler, context, id) {\n if (isNullOrUndefined(handler)) {\n return;\n }\n var cntxt = context || this.context;\n if (this.notExist(property)) {\n this.boundedEvents[property] = [{ handler: handler, context: cntxt }];\n return;\n }\n if (!isNullOrUndefined(id)) {\n if (this.ranArray.indexOf(id) === -1) {\n this.ranArray.push(id);\n this.boundedEvents[property].push({ handler: handler, context: cntxt, id: id });\n }\n }\n else if (!this.isHandlerPresent(this.boundedEvents[property], handler)) {\n this.boundedEvents[property].push({ handler: handler, context: cntxt });\n }\n };\n /**\n * To remove handlers from a event attached using on() function.\n * @param {string} eventName - specifies the name of the event.\n * @param {Function} handler - Optional argument specifies the handler function to be called while event notified.\n * @param {string} id - specifies the random generated id.\n * @return {void}\n */\n Observer.prototype.off = function (property, handler, id) {\n if (this.notExist(property)) {\n return;\n }\n var curObject = getValue(property, this.boundedEvents);\n if (handler) {\n for (var i = 0; i < curObject.length; i++) {\n if (id) {\n if (curObject[i].id === id) {\n curObject.splice(i, 1);\n var indexLocation = this.ranArray.indexOf(id);\n if (indexLocation !== -1) {\n this.ranArray.splice(indexLocation, 1);\n }\n break;\n }\n }\n else if (handler === curObject[i].handler) {\n curObject.splice(i, 1);\n break;\n }\n }\n }\n else {\n delete this.boundedEvents[property];\n }\n };\n /**\n * To notify the handlers in the specified event.\n * @param {string} property - Specifies the event to be notify.\n * @param {Object} args - Additional parameters to pass while calling the handler.\n * @param {Function} successHandler - this function will invoke after event successfully triggered\n * @param {Function} errorHandler - this function will invoke after event if it was failure to call.\n * @return {void}\n */\n Observer.prototype.notify = function (property, argument, successHandler, errorHandler) {\n if (this.notExist(property)) {\n if (successHandler) {\n successHandler.call(this, argument);\n }\n return;\n }\n if (argument) {\n argument.name = property;\n }\n var blazor = 'Blazor';\n var curObject = getValue(property, this.boundedEvents).slice(0);\n if (window[blazor]) {\n return this.blazorCallback(curObject, argument, successHandler, errorHandler, 0);\n }\n else {\n for (var _i = 0, curObject_1 = curObject; _i < curObject_1.length; _i++) {\n var cur = curObject_1[_i];\n cur.handler.call(cur.context, argument);\n }\n if (successHandler) {\n successHandler.call(this, argument);\n }\n }\n };\n Observer.prototype.blazorCallback = function (objs, argument, successHandler, errorHandler, index) {\n var _this = this;\n var isTrigger = index === objs.length - 1;\n if (index < objs.length) {\n var obj_1 = objs[index];\n var promise = obj_1.handler.call(obj_1.context, argument);\n if (promise && typeof promise.then === 'function') {\n if (!successHandler) {\n return promise;\n }\n promise.then(function (data) {\n data = typeof data === 'string' && _this.isJson(data) ? JSON.parse(data, _this.dateReviver) : data;\n extend(argument, argument, data, true);\n if (successHandler && isTrigger) {\n successHandler.call(obj_1.context, argument);\n }\n else {\n return _this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);\n }\n }).catch(function (data) {\n if (errorHandler) {\n errorHandler.call(obj_1.context, typeof data === 'string' &&\n _this.isJson(data) ? JSON.parse(data, _this.dateReviver) : data);\n }\n });\n }\n else if (successHandler && isTrigger) {\n successHandler.call(obj_1.context, argument);\n }\n else {\n return this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);\n }\n }\n };\n // tslint:disable-next-line:no-any\n Observer.prototype.dateReviver = function (key, value) {\n var dPattern = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}/;\n if (isBlazor && typeof value === 'string' && value.match(dPattern) !== null) {\n return (new Date(value));\n }\n return (value);\n };\n Observer.prototype.isJson = function (value) {\n try {\n JSON.parse(value);\n }\n catch (e) {\n return false;\n }\n return true;\n };\n /**\n * To destroy handlers in the event\n */\n Observer.prototype.destroy = function () {\n this.boundedEvents = this.context = undefined;\n };\n /**\n * Returns if the property exists.\n */\n Observer.prototype.notExist = function (prop) {\n return this.boundedEvents.hasOwnProperty(prop) === false || this.boundedEvents[prop].length <= 0;\n };\n /**\n * Returns if the handler is present.\n */\n Observer.prototype.isHandlerPresent = function (boundedEvents, handler) {\n for (var _i = 0, boundedEvents_1 = boundedEvents; _i < boundedEvents_1.length; _i++) {\n var cur = boundedEvents_1[_i];\n if (cur.handler === handler) {\n return true;\n }\n }\n return false;\n };\n return Observer;\n}());\nexport { Observer };\n","import { DateFormat } from './intl/date-formatter';\nimport { NumberFormat } from './intl/number-formatter';\nimport { DateParser } from './intl/date-parser';\nimport { NumberParser } from './intl/number-parser';\nimport { IntlBase } from './intl/intl-base';\nimport { extend, getValue, isBlazor } from './util';\nimport { Observer } from './observer';\n/**\n * Specifies the observer used for external change detection.\n */\nexport var onIntlChange = new Observer();\n/**\n * Specifies the default rtl status for EJ2 components.\n */\nexport var rightToLeft = false;\n/**\n * Specifies the CLDR data loaded for internationalization functionalities.\n * @private\n */\nexport var cldrData = {};\n/**\n * Specifies the default culture value to be considered.\n * @private\n */\nexport var defaultCulture = 'en-US';\n/**\n * Specifies default currency code to be considered\n * @private\n */\nexport var defaultCurrencyCode = 'USD';\nvar mapper = ['numericObject', 'dateObject'];\n/**\n * Internationalization class provides support to parse and format the number and date object to the desired format.\n * ```typescript\n * // To set the culture globally\n * setCulture('en-GB');\n *\n * // To set currency code globally\n * setCurrencyCode('EUR');\n *\n * //Load cldr data\n * loadCldr(gregorainData);\n * loadCldr(timeZoneData);\n * loadCldr(numbersData);\n * loadCldr(numberSystemData);\n *\n * // To use formatter in component side\n * let Intl:Internationalization = new Internationalization();\n *\n * // Date formatting\n * let dateFormatter: Function = Intl.getDateFormat({skeleton:'long',type:'dateTime'});\n * dateFormatter(new Date('11/2/2016'));\n * dateFormatter(new Date('25/2/2030'));\n * Intl.formatDate(new Date(),{skeleton:'E'});\n *\n * //Number formatting\n * let numberFormatter: Function = Intl.getNumberFormat({skeleton:'C5'})\n * numberFormatter(24563334);\n * Intl.formatNumber(123123,{skeleton:'p2'});\n *\n * // Date parser\n * let dateParser: Function = Intl.getDateParser({skeleton:'short',type:'time'});\n * dateParser('10:30 PM');\n * Intl.parseDate('10',{skeleton:'H'});\n * ```\n */\nvar Internationalization = /** @class */ (function () {\n function Internationalization(cultureName) {\n if (cultureName) {\n this.culture = cultureName;\n }\n }\n /**\n * Returns the format function for given options.\n * @param {DateFormatOptions} options - Specifies the format options in which the format function will return.\n * @returns {Function}\n */\n Internationalization.prototype.getDateFormat = function (options) {\n return DateFormat.dateFormat(this.getCulture(), options || { type: 'date', skeleton: 'short' }, cldrData);\n };\n /**\n * Returns the format function for given options.\n * @param {NumberFormatOptions} options - Specifies the format options in which the format function will return.\n * @returns {Function}\n */\n Internationalization.prototype.getNumberFormat = function (options) {\n if (options && !options.currency) {\n options.currency = defaultCurrencyCode;\n }\n if (isBlazor() && options && !options.format) {\n options.minimumFractionDigits = 0;\n }\n return NumberFormat.numberFormatter(this.getCulture(), options || {}, cldrData);\n };\n /**\n * Returns the parser function for given options.\n * @param {DateFormatOptions} options - Specifies the format options in which the parser function will return.\n * @returns {Function}\n */\n Internationalization.prototype.getDateParser = function (options) {\n return DateParser.dateParser(this.getCulture(), options || { skeleton: 'short', type: 'date' }, cldrData);\n };\n /**\n * Returns the parser function for given options.\n * @param {NumberFormatOptions} options - Specifies the format options in which the parser function will return.\n * @returns {Function}\n */\n Internationalization.prototype.getNumberParser = function (options) {\n if (isBlazor() && options && !options.format) {\n options.minimumFractionDigits = 0;\n }\n return NumberParser.numberParser(this.getCulture(), options || { format: 'N' }, cldrData);\n };\n /**\n * Returns the formatted string based on format options.\n * @param {Number} value - Specifies the number to format.\n * @param {NumberFormatOptions} option - Specifies the format options in which the number will be formatted.\n * @returns {string}\n */\n Internationalization.prototype.formatNumber = function (value, option) {\n return this.getNumberFormat(option)(value);\n };\n /**\n * Returns the formatted date string based on format options.\n * @param {Number} value - Specifies the number to format.\n * @param {DateFormatOptions} option - Specifies the format options in which the number will be formatted.\n * @returns {string}\n */\n Internationalization.prototype.formatDate = function (value, option) {\n return this.getDateFormat(option)(value);\n };\n /**\n * Returns the date object for given date string and options.\n * @param {string} value - Specifies the string to parse.\n * @param {DateFormatOptions} option - Specifies the parse options in which the date string will be parsed.\n * @returns {Date}\n */\n Internationalization.prototype.parseDate = function (value, option) {\n return this.getDateParser(option)(value);\n };\n /**\n * Returns the number object from the given string value and options.\n * @param {string} value - Specifies the string to parse.\n * @param {NumberFormatOptions} option - Specifies the parse options in which the string number will be parsed.\n * @returns {number}\n */\n Internationalization.prototype.parseNumber = function (value, option) {\n return this.getNumberParser(option)(value);\n };\n /**\n * Returns Native Date Time Pattern\n * @param {DateFormatOptions} option - Specifies the parse options for resultant date time pattern.\n * @param {boolean} isExcelFormat - Specifies format value to be converted to excel pattern.\n * @returns {string}\n * @private\n */\n Internationalization.prototype.getDatePattern = function (option, isExcelFormat) {\n return IntlBase.getActualDateTimeFormat(this.getCulture(), option, cldrData, isExcelFormat);\n };\n /**\n * Returns Native Number Pattern\n * @param {NumberFormatOptions} option - Specifies the parse options for resultant number pattern.\n * @returns {string}\n * @private\n */\n Internationalization.prototype.getNumberPattern = function (option, isExcel) {\n return IntlBase.getActualNumberFormat(this.getCulture(), option, cldrData, isExcel);\n };\n /**\n * Returns the First Day of the Week\n * @returns {number}\n */\n Internationalization.prototype.getFirstDayOfWeek = function () {\n return IntlBase.getWeekData(this.getCulture(), cldrData);\n };\n Internationalization.prototype.getCulture = function () {\n return this.culture || defaultCulture;\n };\n return Internationalization;\n}());\nexport { Internationalization };\n/**\n * Set the default culture to all EJ2 components\n * @param {string} cultureName - Specifies the culture name to be set as default culture.\n */\nexport function setCulture(cultureName) {\n defaultCulture = cultureName;\n onIntlChange.notify('notifyExternalChange', { 'locale': defaultCulture });\n}\n/**\n * Set the default currency code to all EJ2 components\n * @param {string} currencyCode Specifies the culture name to be set as default culture.\n * @returns {void}\n */\nexport function setCurrencyCode(currencyCode) {\n defaultCurrencyCode = currencyCode;\n onIntlChange.notify('notifyExternalChange', { 'currencyCode': defaultCurrencyCode });\n}\n/**\n * Load the CLDR data into context\n * @param {Object[]} obj Specifies the CLDR data's to be used for formatting and parser.\n * @returns {void}\n */\nexport function loadCldr() {\n var data = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n data[_i] = arguments[_i];\n }\n for (var _a = 0, data_1 = data; _a < data_1.length; _a++) {\n var obj = data_1[_a];\n extend(cldrData, obj, {}, true);\n }\n}\n/**\n * To enable or disable RTL functionality for all components globally.\n * @param {boolean} status - Optional argument Specifies the status value to enable or disable rtl option.\n * @returns {void}\n */\nexport function enableRtl(status) {\n if (status === void 0) { status = true; }\n rightToLeft = status;\n onIntlChange.notify('notifyExternalChange', { enableRtl: rightToLeft });\n}\n/**\n * To get the numeric CLDR object for given culture\n * @param {string} locale - Specifies the locale for which numericObject to be returned.\n * @ignore\n * @private\n */\nexport function getNumericObject(locale, type) {\n /* tslint:disable no-any */\n var numObject = IntlBase.getDependables(cldrData, locale, '', true)[mapper[0]];\n var dateObject = IntlBase.getDependables(cldrData, locale, '')[mapper[1]];\n var numSystem = getValue('defaultNumberingSystem', numObject);\n var symbPattern = isBlazor() ? getValue('numberSymbols', numObject) : getValue('symbols-numberSystem-' + numSystem, numObject);\n var pattern = IntlBase.getSymbolPattern(type || 'decimal', numSystem, numObject, false);\n return extend(symbPattern, IntlBase.getFormatData(pattern, true, '', true), { 'dateSeparator': IntlBase.getDateSeparator(dateObject) });\n}\n/**\n * To get the numeric CLDR number base object for given culture\n * @param {string} locale - Specifies the locale for which numericObject to be returned.\n * @param {string} currency - Specifies the currency for which numericObject to be returned.\n * @ignore\n * @private\n */\nexport function getNumberDependable(locale, currency) {\n var numObject = IntlBase.getDependables(cldrData, locale, '', true);\n return IntlBase.getCurrencySymbol(numObject.numericObject, currency);\n}\n/**\n * To get the default date CLDR object.\n * @ignore\n * @private\n */\nexport function getDefaultDateObject(mode) {\n return IntlBase.getDependables(cldrData, '', mode, false)[mapper[1]];\n}\n","import { defaultCurrencyCode } from '../internationalization';\nimport { getValue, isNullOrUndefined, extend, isBlazor } from '../util';\nimport { ParserBase as parser, getBlazorCurrencySymbol } from './parser-base';\nimport { DateFormat } from './date-formatter';\nimport { NumberFormat } from './number-formatter';\nimport { isUndefined } from '../util';\nexport var blazorCultureFormats = {\n 'en-US': {\n 'd': 'M/d/y',\n 'D': 'EEEE, MMMM d, y',\n 'f': 'EEEE, MMMM d, y h:mm a',\n 'F': 'EEEE, MMMM d, y h:mm:s a',\n 'g': 'M/d/y h:mm a',\n 'G': 'M/d/yyyy h:mm:ss tt',\n 'm': 'MMMM d',\n 'M': 'MMMM d',\n 'r': 'ddd, dd MMM yyyy HH\\':\\'mm\\':\\'ss \\'GMT\\'',\n 'R': 'ddd, dd MMM yyyy HH\\':\\'mm\\':\\'ss \\'GMT\\'',\n 's': 'yyyy\\'-\\'MM\\'-\\'dd\\'T\\'HH\\':\\'mm\\':\\'ss',\n 't': 'h:mm tt',\n 'T': 'h:m:s tt',\n 'u': 'yyyy\\'-\\'MM\\'-\\'dd HH\\':\\'mm\\':\\'ss\\'Z\\'',\n 'U': 'dddd, MMMM d, yyyy h:mm:ss tt',\n 'y': 'MMMM yyyy',\n 'Y': 'MMMM yyyy'\n }\n};\n/**\n * Date base common constants and function for date parser and formatter.\n */\nexport var IntlBase;\n(function (IntlBase) {\n // tslint:disable-next-line:max-line-length\n IntlBase.negativeDataRegex = /^(('[^']+'|''|[^*#@0,.E])*)(\\*.)?((([#,]*[0,]*0+)(\\.0*[0-9]*#*)?)|([#,]*@+#*))(E\\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;\n IntlBase.customRegex = /^(('[^']+'|''|[^*#@0,.])*)(\\*.)?((([0#,]*[0,]*[0#]*)(\\.[0#]*)?)|([#,]*@+#*))(E\\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;\n IntlBase.latnParseRegex = /0|1|2|3|4|5|6|7|8|9/g;\n var fractionRegex = /[0-9]/g;\n IntlBase.defaultCurrency = '$';\n var mapper = ['infinity', 'nan', 'group', 'decimal'];\n var patternRegex = /G|M|L|H|c|'| a|yy|y|EEEE|E/g;\n var patternMatch = {\n 'G': '',\n 'M': 'm',\n 'L': 'm',\n 'H': 'h',\n 'c': 'd',\n '\\'': '\"',\n ' a': ' AM/PM',\n 'yy': 'yy',\n 'y': 'yyyy',\n 'EEEE': 'dddd',\n 'E': 'ddd'\n };\n IntlBase.dateConverterMapper = /dddd|ddd/ig;\n var defaultFirstDay = 'sun';\n IntlBase.islamicRegex = /^islamic/;\n var firstDayMapper = {\n 'sun': 0,\n 'mon': 1,\n 'tue': 2,\n 'wed': 3,\n 'thu': 4,\n 'fri': 5,\n 'sat': 6\n };\n IntlBase.formatRegex = /(^[ncpae]{1})([0-1]?[0-9]|20)?$/i;\n IntlBase.currencyFormatRegex = /(^[ca]{1})([0-1]?[0-9]|20)?$/i;\n IntlBase.curWithoutNumberRegex = /(c|a)$/ig;\n var typeMapper = {\n '$': 'isCurrency',\n '%': 'isPercent',\n '-': 'isNegative',\n 0: 'nlead',\n 1: 'nend'\n };\n IntlBase.dateParseRegex = /([a-z])\\1*|'([^']|'')+'|''|./gi;\n IntlBase.basicPatterns = ['short', 'medium', 'long', 'full'];\n /* tslint:disable:quotemark */\n IntlBase.defaultObject = {\n 'dates': {\n 'calendars': {\n 'gregorian': {\n 'months': {\n 'stand-alone': {\n 'abbreviated': {\n '1': 'Jan',\n '2': 'Feb',\n '3': 'Mar',\n '4': 'Apr',\n '5': 'May',\n '6': 'Jun',\n '7': 'Jul',\n '8': 'Aug',\n '9': 'Sep',\n '10': 'Oct',\n '11': 'Nov',\n '12': 'Dec'\n },\n 'narrow': {\n '1': 'J',\n '2': 'F',\n '3': 'M',\n '4': 'A',\n '5': 'M',\n '6': 'J',\n '7': 'J',\n '8': 'A',\n '9': 'S',\n '10': 'O',\n '11': 'N',\n '12': 'D'\n },\n 'wide': {\n '1': 'January',\n '2': 'February',\n '3': 'March',\n '4': 'April',\n '5': 'May',\n '6': 'June',\n '7': 'July',\n '8': 'August',\n '9': 'September',\n '10': 'October',\n '11': 'November',\n '12': 'December'\n }\n }\n },\n \"days\": {\n \"stand-alone\": {\n \"abbreviated\": {\n \"sun\": \"Sun\",\n \"mon\": \"Mon\",\n \"tue\": \"Tue\",\n \"wed\": \"Wed\",\n \"thu\": \"Thu\",\n \"fri\": \"Fri\",\n \"sat\": \"Sat\"\n },\n \"narrow\": {\n \"sun\": \"S\",\n \"mon\": \"M\",\n \"tue\": \"T\",\n \"wed\": \"W\",\n \"thu\": \"T\",\n \"fri\": \"F\",\n \"sat\": \"S\"\n },\n \"short\": {\n \"sun\": \"Su\",\n \"mon\": \"Mo\",\n \"tue\": \"Tu\",\n \"wed\": \"We\",\n \"thu\": \"Th\",\n \"fri\": \"Fr\",\n \"sat\": \"Sa\"\n },\n \"wide\": {\n \"sun\": \"Sunday\",\n \"mon\": \"Monday\",\n \"tue\": \"Tuesday\",\n \"wed\": \"Wednesday\",\n \"thu\": \"Thursday\",\n \"fri\": \"Friday\",\n \"sat\": \"Saturday\"\n }\n }\n },\n \"dayPeriods\": {\n \"format\": {\n \"wide\": {\n \"am\": \"AM\",\n \"pm\": \"PM\"\n }\n }\n },\n 'eras': {\n 'eraNames': {\n '0': 'Before Christ',\n '0-alt-variant': 'Before Common Era',\n '1': 'Anno Domini',\n \"1-alt-variant\": \"Common Era\"\n },\n 'eraAbbr': {\n '0': 'BC',\n '0-alt-variant': 'BCE',\n '1': 'AD',\n '1-alt-variant': 'CE'\n },\n 'eraNarrow': {\n '0': 'B',\n '0-alt-variant': 'BCE',\n '1': 'A',\n '1-alt-variant': 'CE'\n }\n },\n 'dateFormats': {\n 'full': 'EEEE, MMMM d, y',\n 'long': 'MMMM d, y',\n 'medium': 'MMM d, y',\n 'short': 'M/d/yy'\n },\n 'timeFormats': {\n 'full': 'h:mm:ss a zzzz',\n 'long': 'h:mm:ss a z',\n 'medium': 'h:mm:ss a',\n 'short': 'h:mm a'\n },\n 'dateTimeFormats': {\n 'full': \"{1} 'at' {0}\",\n 'long': \"{1} 'at' {0}\",\n 'medium': '{1}, {0}',\n 'short': '{1}, {0}',\n 'availableFormats': {\n 'd': 'd',\n 'E': 'ccc',\n 'Ed': 'd E',\n 'Ehm': 'E h:mm a',\n 'EHm': 'E HH:mm',\n 'Ehms': 'E h:mm:ss a',\n 'EHms': 'E HH:mm:ss',\n 'Gy': 'y G',\n 'GyMMM': 'MMM y G',\n 'GyMMMd': 'MMM d, y G',\n 'GyMMMEd': 'E, MMM d, y G',\n 'h': 'h a',\n 'H': 'HH',\n 'hm': 'h:mm a',\n 'Hm': 'HH:mm',\n 'hms': 'h:mm:ss a',\n 'Hms': 'HH:mm:ss',\n 'hmsv': 'h:mm:ss a v',\n 'Hmsv': 'HH:mm:ss v',\n 'hmv': 'h:mm a v',\n 'Hmv': 'HH:mm v',\n 'M': 'L',\n 'Md': 'M/d',\n 'MEd': 'E, M/d',\n 'MMM': 'LLL',\n 'MMMd': 'MMM d',\n 'MMMEd': 'E, MMM d',\n 'MMMMd': 'MMMM d',\n 'ms': 'mm:ss',\n 'y': 'y',\n 'yM': 'M/y',\n 'yMd': 'M/d/y',\n 'yMEd': 'E, M/d/y',\n 'yMMM': 'MMM y',\n 'yMMMd': 'MMM d, y',\n 'yMMMEd': 'E, MMM d, y',\n 'yMMMM': 'MMMM y',\n },\n }\n },\n \"islamic\": {\n \"months\": {\n \"stand-alone\": {\n \"abbreviated\": {\n \"1\": \"Muh.\",\n \"2\": \"Saf.\",\n \"3\": \"Rab. I\",\n \"4\": \"Rab. II\",\n \"5\": \"Jum. I\",\n \"6\": \"Jum. II\",\n \"7\": \"Raj.\",\n \"8\": \"Sha.\",\n \"9\": \"Ram.\",\n \"10\": \"Shaw.\",\n \"11\": \"Dhuʻl-Q.\",\n \"12\": \"Dhuʻl-H.\"\n },\n \"narrow\": {\n \"1\": \"1\",\n \"2\": \"2\",\n \"3\": \"3\",\n \"4\": \"4\",\n \"5\": \"5\",\n \"6\": \"6\",\n \"7\": \"7\",\n \"8\": \"8\",\n \"9\": \"9\",\n \"10\": \"10\",\n \"11\": \"11\",\n \"12\": \"12\"\n },\n \"wide\": {\n \"1\": \"Muharram\",\n \"2\": \"Safar\",\n \"3\": \"Rabiʻ I\",\n \"4\": \"Rabiʻ II\",\n \"5\": \"Jumada I\",\n \"6\": \"Jumada II\",\n \"7\": \"Rajab\",\n \"8\": \"Shaʻban\",\n \"9\": \"Ramadan\",\n \"10\": \"Shawwal\",\n \"11\": \"Dhuʻl-Qiʻdah\",\n \"12\": \"Dhuʻl-Hijjah\"\n }\n }\n },\n \"days\": {\n \"stand-alone\": {\n \"abbreviated\": {\n \"sun\": \"Sun\",\n \"mon\": \"Mon\",\n \"tue\": \"Tue\",\n \"wed\": \"Wed\",\n \"thu\": \"Thu\",\n \"fri\": \"Fri\",\n \"sat\": \"Sat\"\n },\n \"narrow\": {\n \"sun\": \"S\",\n \"mon\": \"M\",\n \"tue\": \"T\",\n \"wed\": \"W\",\n \"thu\": \"T\",\n \"fri\": \"F\",\n \"sat\": \"S\"\n },\n \"short\": {\n \"sun\": \"Su\",\n \"mon\": \"Mo\",\n \"tue\": \"Tu\",\n \"wed\": \"We\",\n \"thu\": \"Th\",\n \"fri\": \"Fr\",\n \"sat\": \"Sa\"\n },\n \"wide\": {\n \"sun\": \"Sunday\",\n \"mon\": \"Monday\",\n \"tue\": \"Tuesday\",\n \"wed\": \"Wednesday\",\n \"thu\": \"Thursday\",\n \"fri\": \"Friday\",\n \"sat\": \"Saturday\"\n }\n }\n },\n \"dayPeriods\": {\n \"format\": {\n \"wide\": {\n \"am\": \"AM\",\n \"pm\": \"PM\"\n }\n }\n },\n \"eras\": {\n \"eraNames\": {\n \"0\": \"AH\"\n },\n \"eraAbbr\": {\n \"0\": \"AH\"\n },\n \"eraNarrow\": {\n \"0\": \"AH\"\n }\n },\n \"dateFormats\": {\n \"full\": \"EEEE, MMMM d, y G\",\n \"long\": \"MMMM d, y G\",\n \"medium\": \"MMM d, y G\",\n \"short\": \"M/d/y GGGGG\"\n },\n \"timeFormats\": {\n \"full\": \"h:mm:ss a zzzz\",\n \"long\": \"h:mm:ss a z\",\n \"medium\": \"h:mm:ss a\",\n \"short\": \"h:mm a\"\n },\n \"dateTimeFormats\": {\n \"full\": \"{1} 'at' {0}\",\n \"long\": \"{1} 'at' {0}\",\n \"medium\": \"{1}, {0}\",\n \"short\": \"{1}, {0}\",\n \"availableFormats\": {\n \"d\": \"d\",\n \"E\": \"ccc\",\n \"Ed\": \"d E\",\n \"Ehm\": \"E h:mm a\",\n \"EHm\": \"E HH:mm\",\n \"Ehms\": \"E h:mm:ss a\",\n \"EHms\": \"E HH:mm:ss\",\n \"Gy\": \"y G\",\n \"GyMMM\": \"MMM y G\",\n \"GyMMMd\": \"MMM d, y G\",\n \"GyMMMEd\": \"E, MMM d, y G\",\n \"h\": \"h a\",\n \"H\": \"HH\",\n \"hm\": \"h:mm a\",\n \"Hm\": \"HH:mm\",\n \"hms\": \"h:mm:ss a\",\n \"Hms\": \"HH:mm:ss\",\n \"M\": \"L\",\n \"Md\": \"M/d\",\n \"MEd\": \"E, M/d\",\n \"MMM\": \"LLL\",\n \"MMMd\": \"MMM d\",\n \"MMMEd\": \"E, MMM d\",\n \"MMMMd\": \"MMMM d\",\n \"ms\": \"mm:ss\",\n \"y\": \"y G\",\n \"yyyy\": \"y G\",\n \"yyyyM\": \"M/y GGGGG\",\n \"yyyyMd\": \"M/d/y GGGGG\",\n \"yyyyMEd\": \"E, M/d/y GGGGG\",\n \"yyyyMMM\": \"MMM y G\",\n \"yyyyMMMd\": \"MMM d, y G\",\n \"yyyyMMMEd\": \"E, MMM d, y G\",\n \"yyyyMMMM\": \"MMMM y G\",\n \"yyyyQQQ\": \"QQQ y G\",\n \"yyyyQQQQ\": \"QQQQ y G\"\n }\n }\n }\n },\n 'timeZoneNames': {\n \"hourFormat\": \"+HH:mm;-HH:mm\",\n \"gmtFormat\": \"GMT{0}\",\n \"gmtZeroFormat\": \"GMT\",\n }\n },\n 'numbers': {\n 'currencies': {\n 'USD': {\n 'displayName': 'US Dollar',\n 'symbol': '$',\n 'symbol-alt-narrow': '$'\n },\n 'EUR': {\n 'displayName': 'Euro',\n 'symbol': '€',\n 'symbol-alt-narrow': '€'\n },\n 'GBP': {\n 'displayName': 'British Pound',\n 'symbol-alt-narrow': '£'\n },\n },\n 'defaultNumberingSystem': 'latn',\n 'minimumGroupingDigits': '1',\n 'symbols-numberSystem-latn': {\n 'decimal': '.',\n 'group': ',',\n 'list': ';',\n 'percentSign': '%',\n 'plusSign': '+',\n 'minusSign': '-',\n 'exponential': 'E',\n 'superscriptingExponent': '×',\n 'perMille': '‰',\n 'infinity': '∞',\n 'nan': 'NaN',\n 'timeSeparator': ':'\n },\n 'decimalFormats-numberSystem-latn': {\n 'standard': '#,##0.###',\n },\n 'percentFormats-numberSystem-latn': {\n 'standard': '#,##0%'\n },\n 'currencyFormats-numberSystem-latn': {\n 'standard': '¤#,##0.00',\n 'accounting': '¤#,##0.00;(¤#,##0.00)'\n },\n 'scientificFormats-numberSystem-latn': {\n 'standard': '#E0'\n }\n }\n };\n IntlBase.blazorDefaultObject = {\n \"numbers\": {\n \"mapper\": {\n \"0\": \"0\",\n \"1\": \"1\",\n \"2\": \"2\",\n \"3\": \"3\",\n \"4\": \"4\",\n \"5\": \"5\",\n \"6\": \"6\",\n \"7\": \"7\",\n \"8\": \"8\",\n \"9\": \"9\"\n },\n \"mapperDigits\": \"0123456789\",\n \"numberSymbols\": {\n \"decimal\": \".\",\n \"group\": \",\",\n \"plusSign\": \"+\",\n \"minusSign\": \"-\",\n \"percentSign\": \"%\",\n \"nan\": \"NaN\",\n \"timeSeparator\": \":\",\n \"infinity\": \"∞\"\n },\n \"timeSeparator\": \":\",\n \"currencySymbol\": \"$\",\n \"currencypData\": {\n \"nlead\": \"$\",\n \"nend\": \"\",\n \"groupSeparator\": \",\",\n \"groupData\": {\n \"primary\": 3\n },\n \"maximumFraction\": 2,\n \"minimumFraction\": 2\n },\n \"percentpData\": {\n \"nlead\": \"\",\n \"nend\": \"%\",\n \"groupSeparator\": \",\",\n \"groupData\": {\n \"primary\": 3\n },\n \"maximumFraction\": 2,\n \"minimumFraction\": 2\n },\n \"percentnData\": {\n \"nlead\": \"-\",\n \"nend\": \"%\",\n \"groupSeparator\": \",\",\n \"groupData\": {\n \"primary\": 3\n },\n \"maximumFraction\": 2,\n \"minimumFraction\": 2\n },\n \"currencynData\": {\n \"nlead\": \"($\",\n \"nend\": \")\",\n \"groupSeparator\": \",\",\n \"groupData\": {\n \"primary\": 3\n },\n \"maximumFraction\": 2,\n \"minimumFraction\": 2\n },\n \"decimalnData\": {\n \"nlead\": \"-\",\n \"nend\": \"\",\n \"groupData\": {\n \"primary\": 3\n },\n \"maximumFraction\": 2,\n \"minimumFraction\": 2\n },\n \"decimalpData\": {\n \"nlead\": \"\",\n \"nend\": \"\",\n \"groupData\": {\n \"primary\": 3\n },\n \"maximumFraction\": 2,\n \"minimumFraction\": 2\n }\n },\n \"dates\": {\n \"dayPeriods\": {\n \"am\": \"AM\",\n \"pm\": \"PM\"\n },\n \"dateSeperator\": \"/\",\n \"days\": {\n \"abbreviated\": {\n \"sun\": \"Sun\",\n \"mon\": \"Mon\",\n \"tue\": \"Tue\",\n \"wed\": \"Wed\",\n \"thu\": \"Thu\",\n \"fri\": \"Fri\",\n \"sat\": \"Sat\"\n },\n \"short\": {\n \"sun\": \"Su\",\n \"mon\": \"Mo\",\n \"tue\": \"Tu\",\n \"wed\": \"We\",\n \"thu\": \"Th\",\n \"fri\": \"Fr\",\n \"sat\": \"Sa\"\n },\n \"wide\": {\n \"sun\": \"Sunday\",\n \"mon\": \"Monday\",\n \"tue\": \"Tuesday\",\n \"wed\": \"Wednesday\",\n \"thu\": \"Thursday\",\n \"fri\": \"Friday\",\n \"sat\": \"Saturday\"\n }\n },\n \"months\": {\n \"abbreviated\": {\n \"1\": \"Jan\",\n \"2\": \"Feb\",\n \"3\": \"Mar\",\n \"4\": \"Apr\",\n \"5\": \"May\",\n \"6\": \"Jun\",\n \"7\": \"Jul\",\n \"8\": \"Aug\",\n \"9\": \"Sep\",\n \"10\": \"Oct\",\n \"11\": \"Nov\",\n \"12\": \"Dec\"\n },\n \"wide\": {\n \"1\": \"January\",\n \"2\": \"February\",\n \"3\": \"March\",\n \"4\": \"April\",\n \"5\": \"May\",\n \"6\": \"June\",\n \"7\": \"July\",\n \"8\": \"August\",\n \"9\": \"September\",\n \"10\": \"October\",\n \"11\": \"November\",\n \"12\": \"December\"\n }\n },\n \"eras\": {\n \"1\": \"AD\"\n }\n }\n };\n /* tslint:enable:quotemark */\n IntlBase.monthIndex = {\n 3: 'abbreviated',\n 4: 'wide',\n 5: 'narrow',\n 1: 'abbreviated'\n };\n /**\n *\n */\n IntlBase.month = 'months';\n IntlBase.days = 'days';\n /**\n * Default numerber Object\n */\n IntlBase.patternMatcher = {\n C: 'currency',\n P: 'percent',\n N: 'decimal',\n A: 'currency',\n E: 'scientific'\n };\n /**\n * Returns the resultant pattern based on the skeleton, dateObject and the type provided\n * @private\n * @param {string} skeleton\n * @param {Object} dateObject\n * @param {string} type\n * @returns {string}\n */\n function getResultantPattern(skeleton, dateObject, type, isIslamic, blazorCulture) {\n var resPattern;\n var iType = type || 'date';\n if (blazorCulture) {\n resPattern = compareBlazorDateFormats({ skeleton: skeleton }, blazorCulture).format ||\n compareBlazorDateFormats({ skeleton: 'd' }, 'en-US').format;\n }\n else {\n if (IntlBase.basicPatterns.indexOf(skeleton) !== -1) {\n resPattern = getValue(iType + 'Formats.' + skeleton, dateObject);\n if (iType === 'dateTime') {\n var dPattern = getValue('dateFormats.' + skeleton, dateObject);\n var tPattern = getValue('timeFormats.' + skeleton, dateObject);\n resPattern = resPattern.replace('{1}', dPattern).replace('{0}', tPattern);\n }\n }\n else {\n resPattern = getValue('dateTimeFormats.availableFormats.' + skeleton, dateObject);\n }\n if (isUndefined(resPattern) && skeleton === 'yMd') {\n resPattern = 'M/d/y';\n }\n }\n return resPattern;\n }\n IntlBase.getResultantPattern = getResultantPattern;\n /**\n * Returns the dependable object for provided cldr data and culture\n * @private\n * @param {Object} cldr\n * @param {string} culture\n * @param {boolean} isNumber\n * @returns {Dependables}\n */\n function getDependables(cldr, culture, mode, isNumber) {\n var ret = {};\n var calendartype = mode || 'gregorian';\n ret.parserObject = parser.getMainObject(cldr, culture) || (isBlazor() ? IntlBase.blazorDefaultObject : IntlBase.defaultObject);\n if (isNumber) {\n ret.numericObject = getValue('numbers', ret.parserObject);\n }\n else {\n var dateString = isBlazor() ? 'dates' : ('dates.calendars.' + calendartype);\n ret.dateObject = getValue(dateString, ret.parserObject);\n }\n return ret;\n }\n IntlBase.getDependables = getDependables;\n /**\n * Returns the symbol pattern for provided parameters\n * @private\n * @param {string} type\n * @param {string} numSystem\n * @param {Object} obj\n * @param {boolean} isAccount\n * @returns {string}\n */\n function getSymbolPattern(type, numSystem, obj, isAccount) {\n return getValue(type + 'Formats-numberSystem-' +\n numSystem + (isAccount ? '.accounting' : '.standard'), obj) || (isAccount ? getValue(type + 'Formats-numberSystem-' +\n numSystem + '.standard', obj) : '');\n }\n IntlBase.getSymbolPattern = getSymbolPattern;\n function ConvertDateToWeekFormat(format) {\n var convertMapper = format.match(IntlBase.dateConverterMapper);\n if (convertMapper && isBlazor()) {\n var tempString = convertMapper[0].length === 3 ? 'EEE' : 'EEEE';\n return format.replace(IntlBase.dateConverterMapper, tempString);\n }\n return format;\n }\n IntlBase.ConvertDateToWeekFormat = ConvertDateToWeekFormat;\n function compareBlazorDateFormats(formatOptions, culture) {\n var format = formatOptions.format || formatOptions.skeleton;\n var curFormatMapper = getValue((culture || 'en-US') + '.' + format, blazorCultureFormats);\n if (!curFormatMapper) {\n curFormatMapper = getValue('en-US.' + format, blazorCultureFormats);\n }\n if (curFormatMapper) {\n curFormatMapper = ConvertDateToWeekFormat(curFormatMapper);\n formatOptions.format = curFormatMapper.replace(/tt/, 'a');\n }\n return formatOptions;\n }\n IntlBase.compareBlazorDateFormats = compareBlazorDateFormats;\n /**\n * Returns proper numeric skeleton\n * @private\n * @param {string} skeleton\n * @returns {NumericSkeleton}\n */\n function getProperNumericSkeleton(skeleton) {\n var matches = skeleton.match(IntlBase.formatRegex);\n var ret = {};\n var pattern = matches[1].toUpperCase();\n ret.isAccount = (pattern === 'A');\n /* tslint:disable no-any */\n ret.type = IntlBase.patternMatcher[pattern];\n if (skeleton.length > 1) {\n ret.fractionDigits = parseInt(matches[2], 10);\n }\n return ret;\n }\n IntlBase.getProperNumericSkeleton = getProperNumericSkeleton;\n /**\n * Returns format data for number formatting like minimum fraction, maximum fraction, etc..,\n * @private\n * @param {string} pattern\n * @param {boolean} needFraction\n * @param {string} cSymbol\n * @param {boolean} fractionOnly\n * @returns {NegativeData}\n */\n function getFormatData(pattern, needFraction, cSymbol, fractionOnly) {\n var nData = fractionOnly ? {} : { nlead: '', nend: '' };\n var match = pattern.match(IntlBase.customRegex);\n if (match) {\n if (!fractionOnly) {\n nData.nlead = changeCurrencySymbol(match[1], cSymbol);\n nData.nend = changeCurrencySymbol(match[10], cSymbol);\n nData.groupPattern = match[4];\n }\n var fraction = match[7];\n if (fraction && needFraction) {\n var fmatch = fraction.match(fractionRegex);\n if (!isNullOrUndefined(fmatch)) {\n nData.minimumFraction = fmatch.length;\n }\n else {\n nData.minimumFraction = 0;\n }\n nData.maximumFraction = fraction.length - 1;\n }\n }\n return nData;\n }\n IntlBase.getFormatData = getFormatData;\n /**\n * Changes currency symbol\n * @private\n * @param {string} val\n * @param {string} sym\n * @returns {string}\n */\n function changeCurrencySymbol(val, sym) {\n if (val) {\n return val.replace(IntlBase.defaultCurrency, sym);\n }\n return '';\n }\n /**\n * Returns currency symbol based on currency code\n * @private\n * @param {Object} numericObject\n * @param {string} currencyCode\n * @returns {string}\n */\n function getCurrencySymbol(numericObject, currencyCode, altSymbol) {\n var symbol = altSymbol ? ('.' + altSymbol) : '.symbol';\n var getCurrency = getValue('currencies.' + currencyCode + symbol, numericObject) ||\n getValue('currencies.' + currencyCode + '.symbol-alt-narrow', numericObject) || '$';\n return getCurrency;\n }\n IntlBase.getCurrencySymbol = getCurrencySymbol;\n /**\n * Returns formatting options for custom number format\n * @private\n * @param {string} format\n * @param {CommonOptions} dOptions\n * @param {Dependables} obj\n * @returns {GenericFormatOptions}\n */\n function customFormat(format, dOptions, obj) {\n var options = {};\n var formatSplit = format.split(';');\n var data = ['pData', 'nData', 'zeroData'];\n for (var i = 0; i < formatSplit.length; i++) {\n options[data[i]] = customNumberFormat(formatSplit[i], dOptions, obj);\n }\n if (isNullOrUndefined(options.nData)) {\n options.nData = extend({}, options.pData);\n options.nData.nlead = isNullOrUndefined(dOptions) ? '-' + options.nData.nlead : dOptions.minusSymbol + options.nData.nlead;\n }\n return options;\n }\n IntlBase.customFormat = customFormat;\n /**\n * Returns custom formatting options\n * @private\n * @param {string} format\n * @param {CommonOptions} dOptions\n * @param {Object} numObject\n * @returns {NegativeData}\n */\n function customNumberFormat(format, dOptions, numObject) {\n var cOptions = { type: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 0 };\n var pattern = format.match(IntlBase.customRegex);\n if (isNullOrUndefined(pattern) || (pattern[5] === '' && format !== 'N/A')) {\n cOptions.type = undefined;\n return cOptions;\n }\n cOptions.nlead = pattern[1];\n cOptions.nend = pattern[10];\n var integerPart = pattern[6];\n cOptions.useGrouping = integerPart.indexOf(',') !== -1;\n integerPart = integerPart.replace(/,/g, '');\n var fractionPart = pattern[7];\n if (integerPart.indexOf('0') !== -1) {\n cOptions.minimumIntegerDigits = integerPart.length - integerPart.indexOf('0');\n }\n if (!isNullOrUndefined(fractionPart)) {\n cOptions.minimumFractionDigits = fractionPart.lastIndexOf('0');\n cOptions.maximumFractionDigits = fractionPart.lastIndexOf('#');\n if (cOptions.minimumFractionDigits === -1) {\n cOptions.minimumFractionDigits = 0;\n }\n if (cOptions.maximumFractionDigits === -1 || cOptions.maximumFractionDigits < cOptions.minimumFractionDigits) {\n cOptions.maximumFractionDigits = cOptions.minimumFractionDigits;\n }\n }\n if (!isNullOrUndefined(dOptions)) {\n extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '$', dOptions.currencySymbol));\n if (!cOptions.isCurrency) {\n extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '%', dOptions.percentSymbol));\n }\n }\n else {\n extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '%', '%'));\n }\n if (!isNullOrUndefined(numObject)) {\n var symbolPattern = getSymbolPattern(cOptions.type, dOptions.numberMapper.numberSystem, numObject, false);\n if (cOptions.useGrouping) {\n cOptions.groupSeparator = dOptions.numberMapper.numberSymbols[mapper[2]];\n cOptions.groupData = NumberFormat.getGroupingDetails(symbolPattern.split(';')[0]);\n }\n cOptions.nlead = cOptions.nlead.replace(/\\'/g, '');\n cOptions.nend = cOptions.nend.replace(/\\'/g, '');\n }\n return cOptions;\n }\n /**\n * Returns formatting options for currency or percent type\n * @private\n * @param {string[]} parts\n * @param {string} actual\n * @param {string} symbol\n * @returns {NegativeData}\n */\n function isCurrencyPercent(parts, actual, symbol) {\n var options = { nlead: parts[0], nend: parts[1] };\n for (var i = 0; i < 2; i++) {\n var part = parts[i];\n var loc = part.indexOf(actual);\n if ((loc !== -1) && ((loc < part.indexOf('\\'')) || (loc > part.lastIndexOf('\\'')))) {\n options[typeMapper[i]] = part.substr(0, loc) + symbol + part.substr(loc + 1);\n options[typeMapper[actual]] = true;\n options.type = options.isCurrency ? 'currency' : 'percent';\n break;\n }\n }\n return options;\n }\n IntlBase.isCurrencyPercent = isCurrencyPercent;\n /**\n * Returns culture based date separator\n * @private\n * @param {Object} dateObj\n * @returns {string}\n */\n function getDateSeparator(dateObj) {\n var value = (getValue('dateFormats.short', dateObj) || '').match(/[d‏M‏]([^d‏M])[d‏M‏]/i);\n return value ? value[1] : '/';\n }\n IntlBase.getDateSeparator = getDateSeparator;\n /**\n * Returns Native Date Time pattern\n * @private\n * @param {string} culture\n * @param {DateFormatOptions} options\n * @param {Object} cldr\n * @returns {string}\n */\n function getActualDateTimeFormat(culture, options, cldr, isExcelFormat) {\n var dependable = getDependables(cldr, culture, options.calendar);\n if (isBlazor()) {\n options = compareBlazorDateFormats(options, culture);\n }\n var actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);\n if (isExcelFormat) {\n actualPattern = actualPattern.replace(patternRegex, function (pattern) {\n return patternMatch[pattern];\n });\n if (actualPattern.indexOf('z') !== -1) {\n var tLength = actualPattern.match(/z/g).length;\n var timeZonePattern = void 0;\n var options_1 = { 'timeZone': {} };\n options_1.numMapper = parser.getNumberMapper(dependable.parserObject, parser.getNumberingSystem(cldr));\n options_1.timeZone = getValue('dates.timeZoneNames', dependable.parserObject);\n var value = new Date();\n var timezone = value.getTimezoneOffset();\n var pattern = (tLength < 4) ? '+H;-H' : options_1.timeZone.hourFormat;\n pattern = pattern.replace(/:/g, options_1.numMapper.timeSeparator);\n if (timezone === 0) {\n timeZonePattern = options_1.timeZone.gmtZeroFormat;\n }\n else {\n timeZonePattern = DateFormat.getTimeZoneValue(timezone, pattern);\n timeZonePattern = options_1.timeZone.gmtFormat.replace(/\\{0\\}/, timeZonePattern);\n }\n actualPattern = actualPattern.replace(/[z]+/, '\"' + timeZonePattern + '\"');\n }\n actualPattern = actualPattern.replace(/ $/, '');\n }\n return actualPattern;\n }\n IntlBase.getActualDateTimeFormat = getActualDateTimeFormat;\n // tslint:disable-next-line:no-any\n function processSymbol(actual, option) {\n if (actual.indexOf(',') !== -1) {\n // tslint:disable-next-line:no-any\n var split = actual.split(',');\n actual = (split[0] + getValue('numberMapper.numberSymbols.group', option) +\n split[1].replace('.', getValue('numberMapper.numberSymbols.decimal', option)));\n }\n else {\n actual = actual.replace('.', getValue('numberMapper.numberSymbols.decimal', option));\n }\n return actual;\n }\n /**\n * Returns Native Number pattern\n * @private\n * @param {string} culture\n * @param {NumberFormatOptions} options\n * @param {Object} cldr\n * @returns {string}\n */\n function getActualNumberFormat(culture, options, cldr, isExcel) {\n var dependable = getDependables(cldr, culture, '', true);\n var parseOptions = { custom: true };\n var numrericObject = dependable.numericObject;\n var minFrac;\n var curObj = {};\n var curMatch = (options.format || '').match(IntlBase.currencyFormatRegex);\n var type = IntlBase.formatRegex.test(options.format) ? getProperNumericSkeleton(options.format || 'N') : {};\n var dOptions = {};\n if (curMatch) {\n dOptions.numberMapper = isBlazor() ?\n extend({}, dependable.numericObject) :\n parser.getNumberMapper(dependable.parserObject, parser.getNumberingSystem(cldr), true);\n var curCode = isBlazor() ? getValue('currencySymbol', dependable.numericObject) :\n getCurrencySymbol(dependable.numericObject, options.currency || defaultCurrencyCode, options.altSymbol);\n var symbolPattern = getSymbolPattern('currency', dOptions.numberMapper.numberSystem, dependable.numericObject, (/a/i).test(options.format));\n symbolPattern = symbolPattern.replace(/\\u00A4/g, curCode);\n var split = symbolPattern.split(';');\n curObj.hasNegativePattern = isBlazor() ? true : (split.length > 1);\n curObj.nData = isBlazor() ? getValue(type.type + 'nData', numrericObject) :\n getFormatData(split[1] || '-' + split[0], true, curCode);\n curObj.pData = isBlazor() ? getValue(type.type + 'pData', numrericObject) :\n getFormatData(split[0], false, curCode);\n if (!curMatch[2] && !options.minimumFractionDigits && !options.maximumFractionDigits) {\n minFrac = getFormatData(symbolPattern.split(';')[0], true, '', true).minimumFraction;\n }\n }\n var actualPattern;\n if ((IntlBase.formatRegex.test(options.format)) || !(options.format)) {\n extend(parseOptions, getProperNumericSkeleton(options.format || 'N'));\n parseOptions.custom = false;\n actualPattern = '###0';\n if (parseOptions.fractionDigits || options.minimumFractionDigits || options.maximumFractionDigits || minFrac) {\n var defaultMinimum = 0;\n if (parseOptions.fractionDigits) {\n options.minimumFractionDigits = options.maximumFractionDigits = parseOptions.fractionDigits;\n }\n actualPattern = fractionDigitsPattern(actualPattern, minFrac || parseOptions.fractionDigits ||\n options.minimumFractionDigits || defaultMinimum, options.maximumFractionDigits || defaultMinimum);\n }\n if (options.minimumIntegerDigits) {\n actualPattern = minimumIntegerPattern(actualPattern, options.minimumIntegerDigits);\n }\n if (options.useGrouping) {\n actualPattern = groupingPattern(actualPattern);\n }\n if (parseOptions.type === 'currency' || (parseOptions.type && isBlazor())) {\n if (isBlazor() && parseOptions.type !== 'currency') {\n curObj.pData = getValue(parseOptions.type + 'pData', numrericObject);\n curObj.nData = getValue(parseOptions.type + 'nData', numrericObject);\n }\n var cPattern = actualPattern;\n actualPattern = curObj.pData.nlead + cPattern + curObj.pData.nend;\n if (curObj.hasNegativePattern || isBlazor()) {\n actualPattern += ';' + curObj.nData.nlead + cPattern + curObj.nData.nend;\n }\n }\n if (parseOptions.type === 'percent' && !isBlazor()) {\n actualPattern += ' %';\n }\n }\n else {\n actualPattern = options.format.replace(/\\'/g, '\"');\n }\n if (Object.keys(dOptions).length > 0) {\n actualPattern = !isExcel ? processSymbol(actualPattern, dOptions) : actualPattern;\n }\n return actualPattern;\n }\n IntlBase.getActualNumberFormat = getActualNumberFormat;\n function fractionDigitsPattern(pattern, minDigits, maxDigits) {\n pattern += '.';\n for (var a = 0; a < minDigits; a++) {\n pattern += '0';\n }\n if (minDigits < maxDigits) {\n var diff = maxDigits - minDigits;\n for (var b = 0; b < diff; b++) {\n pattern += '#';\n }\n }\n return pattern;\n }\n function minimumIntegerPattern(pattern, digits) {\n var temp = pattern.split('.');\n var integer = '';\n for (var x = 0; x < digits; x++) {\n integer += '0';\n }\n return temp[1] ? (integer + '.' + temp[1]) : integer;\n }\n function groupingPattern(pattern) {\n var temp = pattern.split('.');\n var integer = temp[0];\n var no = 3 - integer.length % 3;\n var hash = (no && no === 1) ? '#' : (no === 2 ? '##' : '');\n integer = hash + integer;\n pattern = '';\n for (var x = integer.length - 1; x > 0; x = x - 3) {\n pattern = ',' + integer[x - 2] + integer[x - 1] + integer[x] + pattern;\n }\n pattern = pattern.slice(1);\n return temp[1] ? (pattern + '.' + temp[1]) : pattern;\n }\n function getWeekData(culture, cldr) {\n var firstDay = defaultFirstDay;\n var mapper = getValue('supplemental.weekData.firstDay', cldr);\n var iCulture = culture;\n if ((/en-/).test(iCulture)) {\n iCulture = iCulture.slice(3);\n }\n iCulture = iCulture.slice(0, 2).toUpperCase() + iCulture.substr(2);\n if (mapper) {\n firstDay = mapper[iCulture] || defaultFirstDay;\n }\n return firstDayMapper[firstDay];\n }\n IntlBase.getWeekData = getWeekData;\n /**\n * @private\n * @param pData\n * @param aCurrency\n * @param rCurrency\n */\n function replaceBlazorCurrency(pData, aCurrency, rCurrency) {\n var iCurrency = getBlazorCurrencySymbol(rCurrency);\n if (aCurrency !== iCurrency) {\n for (var _i = 0, pData_1 = pData; _i < pData_1.length; _i++) {\n var data = pData_1[_i];\n data.nend = data.nend.replace(aCurrency, iCurrency);\n data.nlead = data.nlead.replace(aCurrency, iCurrency);\n }\n }\n }\n IntlBase.replaceBlazorCurrency = replaceBlazorCurrency;\n /**\n * @private\n */\n function getWeekOfYear(date) {\n var newYear = new Date(date.getFullYear(), 0, 1);\n var day = newYear.getDay();\n var weeknum;\n day = (day >= 0 ? day : day + 7);\n var daynum = Math.floor((date.getTime() - newYear.getTime() -\n (date.getTimezoneOffset() - newYear.getTimezoneOffset()) * 60000) / 86400000) + 1;\n if (day < 4) {\n weeknum = Math.floor((daynum + day - 1) / 7) + 1;\n if (weeknum > 52) {\n var nYear = new Date(this.getFullYear() + 1, 0, 1);\n var nday = nYear.getDay();\n nday = nday >= 0 ? nday : nday + 7;\n weeknum = nday < 4 ? 1 : 53;\n }\n }\n else {\n weeknum = Math.floor((daynum + day - 1) / 7);\n }\n return weeknum;\n }\n IntlBase.getWeekOfYear = getWeekOfYear;\n})(IntlBase || (IntlBase = {}));\n","import { isNullOrUndefined, merge } from './util';\nvar headerRegex = /^(.*?):[ \\t]*([^\\r\\n]*)$/gm;\nvar defaultType = 'GET';\n/**\n * Ajax class provides ability to make asynchronous HTTP request to the server\n * ```typescript\n * var ajax = new Ajax(\"index.html\", \"GET\", true);\n * ajax.send().then(\n * function (value) {\n * console.log(value);\n * },\n * function (reason) {\n * console.log(reason);\n * });\n * ```\n */\nvar Ajax = /** @class */ (function () {\n /**\n * Constructor for Ajax class\n * @param {string|Object} options?\n * @param {string} type?\n * @param {boolean} async?\n * @returns defaultType\n */\n function Ajax(options, type, async, contentType) {\n /**\n * A boolean value indicating whether the request should be sent asynchronous or not.\n * @default true\n */\n this.mode = true;\n /**\n * A boolean value indicating whether to ignore the promise reject.\n * @private\n * @default true\n */\n this.emitError = true;\n this.options = {};\n if (typeof options === 'string') {\n this.url = options;\n this.type = type ? type.toUpperCase() : defaultType;\n this.mode = !isNullOrUndefined(async) ? async : true;\n }\n else if (typeof options === 'object') {\n this.options = options;\n merge(this, this.options);\n }\n this.type = this.type ? this.type.toUpperCase() : defaultType;\n this.contentType = (this.contentType !== undefined) ? this.contentType : contentType;\n }\n /**\n * Send the request to server.\n * @param {any} data - To send the user data\n * @return {Promise}\n */\n Ajax.prototype.send = function (data) {\n var _this = this;\n this.data = isNullOrUndefined(data) ? this.data : data;\n var eventArgs = {\n cancel: false,\n httpRequest: null\n };\n var promise = new Promise(function (resolve, reject) {\n _this.httpRequest = new XMLHttpRequest();\n _this.httpRequest.onreadystatechange = function () { _this.stateChange(resolve, reject); };\n if (!isNullOrUndefined(_this.onLoad)) {\n _this.httpRequest.onload = _this.onLoad;\n }\n if (!isNullOrUndefined(_this.onProgress)) {\n _this.httpRequest.onprogress = _this.onProgress;\n }\n /* istanbul ignore next */\n if (!isNullOrUndefined(_this.onAbort)) {\n _this.httpRequest.onabort = _this.onAbort;\n }\n /* istanbul ignore next */\n if (!isNullOrUndefined(_this.onError)) {\n _this.httpRequest.onerror = _this.onError;\n }\n //** Upload Events **/\n /* istanbul ignore next */\n if (!isNullOrUndefined(_this.onUploadProgress)) {\n _this.httpRequest.upload.onprogress = _this.onUploadProgress;\n }\n _this.httpRequest.open(_this.type, _this.url, _this.mode);\n // Set default headers\n if (!isNullOrUndefined(_this.data) && _this.contentType !== null) {\n _this.httpRequest.setRequestHeader('Content-Type', _this.contentType || 'application/json; charset=utf-8');\n }\n if (_this.beforeSend) {\n eventArgs.httpRequest = _this.httpRequest;\n _this.beforeSend(eventArgs);\n }\n if (!eventArgs.cancel) {\n _this.httpRequest.send(!isNullOrUndefined(_this.data) ? _this.data : null);\n }\n });\n return promise;\n };\n Ajax.prototype.successHandler = function (data) {\n if (this.onSuccess) {\n this.onSuccess(data, this);\n }\n return data;\n };\n Ajax.prototype.failureHandler = function (reason) {\n if (this.onFailure) {\n this.onFailure(this.httpRequest);\n }\n return reason;\n };\n Ajax.prototype.stateChange = function (resolve, reject) {\n var data = this.httpRequest.responseText;\n if (this.dataType && this.dataType.toLowerCase() === 'json') {\n if (data === '') {\n data = undefined;\n }\n else {\n try {\n data = JSON.parse(data);\n }\n catch (error) {\n // no exception handle\n }\n }\n }\n if (this.httpRequest.readyState === 4) {\n //success range should be 200 to 299\n if ((this.httpRequest.status >= 200 && this.httpRequest.status <= 299) || this.httpRequest.status === 304) {\n resolve(this.successHandler(data));\n }\n else {\n if (this.emitError) {\n reject(new Error(this.failureHandler(this.httpRequest.statusText)));\n }\n else {\n resolve();\n }\n }\n }\n };\n /**\n * To get the response header from XMLHttpRequest\n * @param {string} key Key to search in the response header\n * @returns {string}\n */\n Ajax.prototype.getResponseHeader = function (key) {\n var responseHeaders;\n var header;\n responseHeaders = {};\n var headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders());\n while (headers) {\n responseHeaders[headers[1].toLowerCase()] = headers[2];\n headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders());\n }\n header = responseHeaders[key.toLowerCase()];\n return isNullOrUndefined(header) ? null : header;\n };\n return Ajax;\n}());\nexport { Ajax };\n","import { isUndefined } from './util';\nvar REGX_MOBILE = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i;\nvar REGX_IE = /msie|trident/i;\nvar REGX_IE11 = /Trident\\/7\\./;\nvar REGX_IOS = /(ipad|iphone|ipod touch)/i;\nvar REGX_IOS7 = /(ipad|iphone|ipod touch);.*os 7_\\d|(ipad|iphone|ipod touch);.*os 8_\\d/i;\nvar REGX_ANDROID = /android/i;\nvar REGX_WINDOWS = /trident|windows phone|edge/i;\nvar REGX_VERSION = /(version)[ \\/]([\\w.]+)/i;\nvar REGX_BROWSER = {\n OPERA: /(opera|opr)(?:.*version|)[ \\/]([\\w.]+)/i,\n EDGE: /(edge)(?:.*version|)[ \\/]([\\w.]+)/i,\n CHROME: /(chrome|crios)[ \\/]([\\w.]+)/i,\n PANTHOMEJS: /(phantomjs)[ \\/]([\\w.]+)/i,\n SAFARI: /(safari)[ \\/]([\\w.]+)/i,\n WEBKIT: /(webkit)[ \\/]([\\w.]+)/i,\n MSIE: /(msie|trident) ([\\w.]+)/i,\n MOZILLA: /(mozilla)(?:.*? rv:([\\w.]+)|)/i\n};\n/* istanbul ignore else */\nif (typeof window !== 'undefined') {\n window.browserDetails = window.browserDetails || {};\n}\n/**\n * Get configuration details for Browser\n * @private\n */\nvar Browser = /** @class */ (function () {\n function Browser() {\n }\n Browser.extractBrowserDetail = function () {\n var browserInfo = { culture: {} };\n var keys = Object.keys(REGX_BROWSER);\n var clientInfo = [];\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n clientInfo = Browser.userAgent.match(REGX_BROWSER[key]);\n if (clientInfo) {\n browserInfo.name = (clientInfo[1].toLowerCase() === 'opr' ? 'opera' : clientInfo[1].toLowerCase());\n browserInfo.name = (clientInfo[1].toLowerCase() === 'crios' ? 'chrome' : browserInfo.name);\n browserInfo.version = clientInfo[2];\n browserInfo.culture.name = browserInfo.culture.language = navigator.language;\n if (!!Browser.userAgent.match(REGX_IE11)) {\n browserInfo.name = 'msie';\n break;\n }\n var version = Browser.userAgent.match(REGX_VERSION);\n if (browserInfo.name === 'safari' && version) {\n browserInfo.version = version[2];\n }\n break;\n }\n }\n return browserInfo;\n };\n /**\n * To get events from the browser\n * @param {string} event - type of event triggered.\n * @returns {Boolean}\n */\n Browser.getEvent = function (event) {\n // tslint:disable-next-line:no-any\n var events = {\n start: {\n isPointer: 'pointerdown', isTouch: 'touchstart', isDevice: 'mousedown'\n },\n move: {\n isPointer: 'pointermove', isTouch: 'touchmove', isDevice: 'mousemove'\n },\n end: {\n isPointer: 'pointerup', isTouch: 'touchend', isDevice: 'mouseup'\n },\n cancel: {\n isPointer: 'pointercancel', isTouch: 'touchcancel', isDevice: 'mouseleave'\n }\n };\n return (Browser.isPointer && !Browser.isWindows ? events[event].isPointer :\n (Browser.isTouch ? events[event].isTouch + (!Browser.isDevice ? ' ' + events[event].isDevice : '')\n : events[event].isDevice));\n };\n /**\n * To get the Touch start event from browser\n * @returns {string}\n */\n Browser.getTouchStartEvent = function () {\n return Browser.getEvent('start');\n };\n /**\n * To get the Touch end event from browser\n * @returns {string}\n */\n Browser.getTouchEndEvent = function () {\n return Browser.getEvent('end');\n };\n /**\n * To get the Touch move event from browser\n * @returns {string}\n */\n Browser.getTouchMoveEvent = function () {\n return Browser.getEvent('move');\n };\n /**\n * To cancel the touch event from browser\n * @returns {string}\n */\n Browser.getTouchCancelEvent = function () {\n return Browser.getEvent('cancel');\n };\n /**\n * To get the value based on provided key and regX\n * @param {string} key\n * @param {RegExp} regX\n * @returns {Object}\n */\n Browser.getValue = function (key, regX) {\n var browserDetails = window.browserDetails;\n if ('undefined' === typeof browserDetails[key]) {\n return browserDetails[key] = regX.test(Browser.userAgent);\n }\n return browserDetails[key];\n };\n Object.defineProperty(Browser, \"userAgent\", {\n get: function () {\n return Browser.uA;\n },\n //Properties \n /**\n * Property specifies the userAgent of the browser. Default userAgent value is based on the browser.\n * Also we can set our own userAgent.\n */\n set: function (uA) {\n Browser.uA = uA;\n window.browserDetails = {};\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"info\", {\n //Read Only Properties\n /**\n * Property is to get the browser information like Name, Version and Language\n * @returns BrowserInfo\n */\n get: function () {\n if (isUndefined(window.browserDetails.info)) {\n return window.browserDetails.info = Browser.extractBrowserDetail();\n }\n return window.browserDetails.info;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isIE\", {\n /**\n * Property is to get whether the userAgent is based IE.\n */\n get: function () {\n return Browser.getValue('isIE', REGX_IE);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isTouch\", {\n /**\n * Property is to get whether the browser has touch support.\n */\n get: function () {\n if (isUndefined(window.browserDetails.isTouch)) {\n return (window.browserDetails.isTouch =\n ('ontouchstart' in window.navigator) ||\n (window &&\n window.navigator &&\n (window.navigator.maxTouchPoints > 0)) || ('ontouchstart' in window));\n }\n return window.browserDetails.isTouch;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isPointer\", {\n /**\n * Property is to get whether the browser has Pointer support.\n */\n get: function () {\n if (isUndefined(window.browserDetails.isPointer)) {\n return window.browserDetails.isPointer = ('pointerEnabled' in window.navigator);\n }\n return window.browserDetails.isPointer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isMSPointer\", {\n /**\n * Property is to get whether the browser has MSPointer support.\n */\n get: function () {\n if (isUndefined(window.browserDetails.isMSPointer)) {\n return window.browserDetails.isMSPointer = ('msPointerEnabled' in window.navigator);\n }\n return window.browserDetails.isMSPointer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isDevice\", {\n /**\n * Property is to get whether the userAgent is device based.\n */\n get: function () {\n return Browser.getValue('isDevice', REGX_MOBILE);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isIos\", {\n /**\n * Property is to get whether the userAgent is IOS.\n */\n get: function () {\n return Browser.getValue('isIos', REGX_IOS);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isIos7\", {\n /**\n * Property is to get whether the userAgent is Ios7.\n */\n get: function () {\n return Browser.getValue('isIos7', REGX_IOS7);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isAndroid\", {\n /**\n * Property is to get whether the userAgent is Android.\n */\n get: function () {\n return Browser.getValue('isAndroid', REGX_ANDROID);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isWebView\", {\n /**\n * Property is to identify whether application ran in web view.\n */\n get: function () {\n if (isUndefined(window.browserDetails.isWebView)) {\n window.browserDetails.isWebView = !(isUndefined(window.cordova) && isUndefined(window.PhoneGap)\n && isUndefined(window.phonegap) && window.forge !== 'object');\n return window.browserDetails.isWebView;\n }\n return window.browserDetails.isWebView;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"isWindows\", {\n /**\n * Property is to get whether the userAgent is Windows.\n */\n get: function () {\n return Browser.getValue('isWindows', REGX_WINDOWS);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"touchStartEvent\", {\n /**\n * Property is to get the touch start event. It returns event name based on browser.\n */\n get: function () {\n if (isUndefined(window.browserDetails.touchStartEvent)) {\n return window.browserDetails.touchStartEvent = Browser.getTouchStartEvent();\n }\n return window.browserDetails.touchStartEvent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"touchMoveEvent\", {\n /**\n * Property is to get the touch move event. It returns event name based on browser.\n */\n get: function () {\n if (isUndefined(window.browserDetails.touchMoveEvent)) {\n return window.browserDetails.touchMoveEvent = Browser.getTouchMoveEvent();\n }\n return window.browserDetails.touchMoveEvent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"touchEndEvent\", {\n /**\n * Property is to get the touch end event. It returns event name based on browser.\n */\n get: function () {\n if (isUndefined(window.browserDetails.touchEndEvent)) {\n return window.browserDetails.touchEndEvent = Browser.getTouchEndEvent();\n }\n return window.browserDetails.touchEndEvent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Browser, \"touchCancelEvent\", {\n /**\n * Property is to cancel the touch end event.\n */\n get: function () {\n if (isUndefined(window.browserDetails.touchCancelEvent)) {\n return window.browserDetails.touchCancelEvent = Browser.getTouchCancelEvent();\n }\n return window.browserDetails.touchCancelEvent;\n },\n enumerable: true,\n configurable: true\n });\n /* istanbul ignore next */\n Browser.uA = typeof navigator !== 'undefined' ? navigator.userAgent : '';\n return Browser;\n}());\nexport { Browser };\n","import { debounce, extend } from './util';\nimport { Browser } from './browser';\n/**\n * EventHandler class provides option to add, remove, clear and trigger events to a HTML DOM element\n * @private\n * ```html\n *
\n * \n * ```\n */\nvar EventHandler = /** @class */ (function () {\n function EventHandler() {\n }\n // to get the event data based on element\n EventHandler.addOrGetEventData = function (element) {\n if (element) {\n if ('__eventList' in element) {\n return element.__eventList.events;\n }\n else {\n element.__eventList = {};\n return element.__eventList.events = [];\n }\n }\n else {\n return [];\n }\n };\n /**\n * Add an event to the specified DOM element.\n * @param {any} element - Target HTML DOM element\n * @param {string} eventName - A string that specifies the name of the event\n * @param {Function} listener - Specifies the function to run when the event occurs\n * @param {Object} bindTo - A object that binds 'this' variable in the event handler\n * @param {number} debounce - Specifies at what interval given event listener should be triggered.\n * @return {Function}\n */\n EventHandler.add = function (element, eventName, listener, bindTo, intDebounce) {\n var eventData = EventHandler.addOrGetEventData(element);\n var debounceListener;\n if (intDebounce) {\n debounceListener = debounce(listener, intDebounce);\n }\n else {\n debounceListener = listener;\n }\n if (bindTo) {\n debounceListener = debounceListener.bind(bindTo);\n }\n var event = eventName.split(' ');\n for (var i = 0; i < event.length; i++) {\n eventData.push({\n name: event[i],\n listener: listener,\n debounce: debounceListener\n });\n if (Browser.isIE) {\n element.addEventListener(event[i], debounceListener);\n }\n else {\n element.addEventListener(event[i], debounceListener, { passive: false });\n }\n }\n return debounceListener;\n };\n /**\n * Remove an event listener that has been attached before.\n * @param {any} element - Specifies the target html element to remove the event\n * @param {string} eventName - A string that specifies the name of the event to remove\n * @param {Function} listener - Specifies the function to remove\n * @return {void}\n */\n EventHandler.remove = function (element, eventName, listener) {\n var eventData = EventHandler.addOrGetEventData(element);\n var event = eventName.split(' ');\n var _loop_1 = function (j) {\n var index = -1;\n var debounceListener;\n if (eventData && eventData.length !== 0) {\n eventData.some(function (x, i) {\n return x.name === event[j] && x.listener === listener ?\n (index = i, debounceListener = x.debounce, true) : false;\n });\n }\n if (index !== -1) {\n eventData.splice(index, 1);\n }\n if (debounceListener) {\n element.removeEventListener(event[j], debounceListener);\n }\n };\n for (var j = 0; j < event.length; j++) {\n _loop_1(j);\n }\n };\n /**\n * Clear all the event listeners that has been previously attached to the element.\n * @param {any} element - Specifies the target html element to clear the events\n * @return {void}\n */\n EventHandler.clearEvents = function (element) {\n var eventData;\n var copyData;\n eventData = EventHandler.addOrGetEventData(element);\n copyData = extend([], copyData, eventData);\n for (var i = 0; i < copyData.length; i++) {\n element.removeEventListener(copyData[i].name, copyData[i].debounce);\n eventData.shift();\n }\n };\n /**\n * Trigger particular event of the element.\n * @param {any} element - Specifies the target html element to trigger the events\n * @param {string} eventName - Specifies the event to trigger for the specified element.\n * Can be a custom event, or any of the standard events.\n * @param {any} eventProp - Additional parameters to pass on to the event properties\n * @return {void}\n */\n EventHandler.trigger = function (element, eventName, eventProp) {\n var eventData = EventHandler.addOrGetEventData(element);\n var fn = null;\n for (var _i = 0, eventData_1 = eventData; _i < eventData_1.length; _i++) {\n var event_1 = eventData_1[_i];\n if (event_1.name === eventName) {\n event_1.debounce.call(this, eventProp);\n }\n }\n };\n return EventHandler;\n}());\nexport { EventHandler };\n","/**\n * Template Engine\n */\nvar LINES = new RegExp('\\\\n|\\\\r|\\\\s\\\\s+', 'g');\nvar QUOTES = new RegExp(/'|\"/g);\nvar IF_STMT = new RegExp('if ?\\\\(');\nvar ELSEIF_STMT = new RegExp('else if ?\\\\(');\nvar ELSE_STMT = new RegExp('else');\nvar FOR_STMT = new RegExp('for ?\\\\(');\nvar IF_OR_FOR = new RegExp('(\\/if|\\/for)');\nvar CALL_FUNCTION = new RegExp('\\\\((.*)\\\\)', '');\nvar NOT_NUMBER = new RegExp('^[0-9]+$', 'g');\nvar WORD = new RegExp('[\\\\w\"\\'.\\\\s+]+', 'g');\nvar DBL_QUOTED_STR = new RegExp('\"(.*?)\"', 'g');\nvar WORDIF = new RegExp('[\\\\w\"\\'@#$.\\\\s+]+', 'g');\nvar exp = new RegExp('\\\\${([^}]*)}', 'g');\n// let cachedTemplate: Object = {};\nvar ARR_OBJ = /^\\..*/gm;\nvar SINGLE_SLASH = /\\\\/gi;\nvar DOUBLE_SLASH = /\\\\\\\\/gi;\nvar WORDFUNC = new RegExp('[\\\\w\"\\'@#$.\\\\s+]+', 'g');\nvar WINDOWFUNC = /\\window\\./gm;\n/**\n * The function to set regular expression for template expression string.\n * @param {RegExp} value - Value expression.\n * @private\n */\nexport function expression(value) {\n if (value) {\n exp = value;\n }\n return exp;\n}\n// /**\n// * To render the template string from the given data.\n// * @param {string} template - String Template.\n// * @param {Object[]|JSON} data - DataSource for the template.\n// * @param {Object} helper? - custom helper object.\n// */\n// export function template(template: string, data: JSON, helper?: Object): string {\n// let hash: string = hashCode(template);\n// let tmpl: Function;\n// if (!cachedTemplate[hash]) {\n// tmpl = cachedTemplate[hash] = compile(template, helper);\n// } else {\n// tmpl = cachedTemplate[hash];\n// }\n// return tmpl(data);\n// }\n/**\n * Compile the template string into template function.\n * @param {string} template - The template string which is going to convert.\n * @param {Object} helper? - Helper functions as an object.\n * @private\n */\nexport function compile(template, helper) {\n var argName = 'data';\n var evalExpResult = evalExp(template, argName, helper);\n var fnCode = \"var str=\\\"\" + evalExpResult + \"\\\"; return str;\";\n // tslint:disable-next-line:no-function-constructor-with-string-args\n var fn = new Function(argName, fnCode);\n return fn.bind(helper);\n}\n// function used to evaluate the function expression\nfunction evalExp(str, nameSpace, helper) {\n var varCOunt = 0;\n /**\n * Variable containing Local Keys\n */\n var localKeys = [];\n var isClass = str.match(/class=\"([^\\\"]+|)\\s{2}/g);\n var singleSpace = '';\n if (isClass) {\n isClass.forEach(function (value) {\n singleSpace = value.replace(/\\s\\s+/g, ' ');\n str = str.replace(value, singleSpace);\n });\n }\n return str.replace(LINES, '').replace(DBL_QUOTED_STR, '\\'$1\\'').replace(exp, function (match, cnt, offset, matchStr) {\n var SPECIAL_CHAR = /\\@|\\#|\\$/gm;\n var matches = cnt.match(CALL_FUNCTION);\n // matches to detect any function calls\n if (matches) {\n var rlStr = matches[1];\n if (ELSEIF_STMT.test(cnt)) {\n //handling else-if condition\n cnt = '\";} ' + cnt.replace(matches[1], rlStr.replace(WORD, function (str) {\n str = str.trim();\n return addNameSpace(str, !(QUOTES.test(str)) && (localKeys.indexOf(str) === -1), nameSpace, localKeys);\n })) + '{ \\n str = str + \"';\n }\n else if (IF_STMT.test(cnt)) {\n //handling if condition\n cnt = '\"; ' + cnt.replace(matches[1], rlStr.replace(WORDIF, function (strs) {\n return HandleSpecialCharArrObj(strs, nameSpace, localKeys, true);\n })) + '{ \\n str = str + \"';\n }\n else if (FOR_STMT.test(cnt)) {\n //handling for condition\n var rlStr_1 = matches[1].split(' of ');\n // replace for each into actual JavaScript\n cnt = '\"; ' + cnt.replace(matches[1], function (mtc) {\n localKeys.push(rlStr_1[0]);\n localKeys.push(rlStr_1[0] + 'Index');\n varCOunt = varCOunt + 1;\n // tslint:disable-next-line\n return 'var i' + varCOunt + '=0; i' + varCOunt + ' < ' + addNameSpace(rlStr_1[1], true, nameSpace, localKeys) + '.length; i' + varCOunt + '++';\n }) + '{ \\n ' + 'var ' + rlStr_1[0] + '= ' + addNameSpace(rlStr_1[1], true, nameSpace, localKeys)\n + '[i' + varCOunt + ']; \\n var ' + rlStr_1[0] + 'Index=i' + varCOunt + '; \\n str = str + \"';\n }\n else {\n //helper function handling\n var fnStr = cnt.split('(');\n var fNameSpace = (helper && helper.hasOwnProperty(fnStr[0]) ? 'this.' : 'global');\n fNameSpace = (/\\./.test(fnStr[0]) ? '' : fNameSpace);\n var ftArray = matches[1].split(',');\n if (matches[1].length !== 0 && !(/data/).test(ftArray[0]) && !(/window./).test(ftArray[0])) {\n matches[1] = (fNameSpace === 'global' ? nameSpace + '.' + matches[1] : matches[1]);\n }\n var splRegexp = /\\@|\\$|\\#/gm;\n var arrObj = /\\]\\./gm;\n if (WINDOWFUNC.test(cnt) && arrObj.test(cnt) || splRegexp.test(cnt)) {\n var splArrRegexp = /\\@|\\$|\\#|\\]\\./gm;\n if (splArrRegexp.test(cnt)) {\n // tslint:disable-next-line\n cnt = '\"+ ' + (fNameSpace === 'global' ? '' : fNameSpace) + cnt.replace(matches[1], rlStr.replace(WORDFUNC, function (strs) {\n return HandleSpecialCharArrObj(strs, nameSpace, localKeys);\n })) + '+ \"';\n }\n }\n else {\n cnt = '\" + ' + (fNameSpace === 'global' ? '' : fNameSpace) +\n cnt.replace(rlStr, addNameSpace(matches[1].replace(/,( |)data.|,/gi, ',' + nameSpace + '.').replace(/,( |)data.window/gi, ',window'), (fNameSpace === 'global' ? false : true), nameSpace, localKeys)) +\n '+\"';\n }\n }\n }\n else if (ELSE_STMT.test(cnt)) {\n // handling else condition\n cnt = '\"; ' + cnt.replace(ELSE_STMT, '} else { \\n str = str + \"');\n }\n else if (!!cnt.match(IF_OR_FOR)) {\n // close condition \n cnt = cnt.replace(IF_OR_FOR, '\"; \\n } \\n str = str + \"');\n }\n else if (SPECIAL_CHAR.test(cnt)) {\n // template string with double slash with special character\n if (cnt.match(SINGLE_SLASH)) {\n cnt = SlashReplace(cnt);\n }\n cnt = '\"+' + NameSpaceForspecialChar(cnt, (localKeys.indexOf(cnt) === -1), nameSpace, localKeys) + '\"]+\"';\n }\n else {\n // template string with double slash\n if (cnt.match(SINGLE_SLASH)) {\n cnt = SlashReplace(cnt);\n cnt = '\"+' + NameSpaceForspecialChar(cnt, (localKeys.indexOf(cnt) === -1), nameSpace, localKeys) + '\"]+\"';\n }\n else {\n // evaluate normal expression\n cnt = '\"+' + addNameSpace(cnt.replace(/\\,/gi, '+' + nameSpace + '.'), (localKeys.indexOf(cnt) === -1), nameSpace, localKeys) + '+\"';\n }\n }\n return cnt;\n });\n}\nfunction addNameSpace(str, addNS, nameSpace, ignoreList, emptyStrCheck) {\n /* istanbul ignore next */\n if (emptyStrCheck && str === '') {\n return str;\n }\n return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1) ? nameSpace + '.' + str : str);\n}\nfunction NameSpaceArrObj(str, addNS, nameSpace, ignoreList) {\n var arrObjReg = /^\\..*/gm;\n return ((addNS && !(NOT_NUMBER.test(str)) &&\n ignoreList.indexOf(str.split('.')[0]) === -1 && !(arrObjReg.test(str))) ? nameSpace + '.' + str : str);\n}\n// // Create hashCode for template string to storeCached function\n// function hashCode(str: string): string {\n// return str.split('').reduce((a: number, b: string) => { a = ((a << 5) - a) + b.charCodeAt(0); return a & a; }, 0).toString();\n// }\nfunction NameSpaceForspecialChar(str, addNS, nameSpace, ignoreList) {\n return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1) ? nameSpace + '[\"' + str : str);\n}\n// tslint:disable-next-line\nfunction SlashReplace(tempStr) {\n // tslint:disable-next-line\n var double = \"\\\\\\\\\";\n if (tempStr.match(DOUBLE_SLASH)) {\n tempStr = tempStr;\n }\n else {\n tempStr = tempStr.replace(SINGLE_SLASH, double);\n }\n return tempStr;\n}\nfunction HandleSpecialCharArrObj(str, nameSpaceNew, keys, emptyStrCheck) {\n str = str.trim();\n var windowFunc = /\\window\\./gm;\n if (!windowFunc.test(str)) {\n var quotes = /'|\"/gm;\n var splRegexp = /\\@|\\$|\\#/gm;\n if (splRegexp.test(str)) {\n str = NameSpaceForspecialChar(str, (keys.indexOf(str) === -1), nameSpaceNew, keys) + '\"]';\n }\n if (ARR_OBJ.test(str)) {\n return NameSpaceArrObj(str, !(quotes.test(str)) && (keys.indexOf(str) === -1), nameSpaceNew, keys);\n }\n else {\n return addNameSpace(str, !(quotes.test(str)) && (keys.indexOf(str) === -1), nameSpaceNew, keys, emptyStrCheck);\n }\n }\n else {\n return str;\n }\n}\n","/**\n * Template Engine Bridge\n */\nimport { compile as render } from './template';\nimport { createElement } from './dom';\nimport { isNullOrUndefined, isBlazor } from './util';\nvar HAS_ROW = /^[\\n\\r.]+\\\\s]+))?)*)\\s*(\\/?)>/;\nvar endRegex = /^<\\/([-A-Za-z0-9_]+)[^>]*>/;\nvar attributeRegex = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|([^>\\s]+)))?/g;\n/**\n * Namespace for VirtualDOM\n * @private\n */\nexport var VirtualDOM;\n(function (VirtualDOM) {\n //tslint:disable:no-any\n function createElement(tagName, properties) {\n var children = [];\n var extended = extend({}, {}, properties, true);\n if (!isNullOrUndefined(properties)) {\n var keys = Object.keys(properties);\n if (keys.length) {\n if (extended.innerHTML) {\n children = ConvertHTMLToJSon(extended.innerHTML);\n delete extended.innerHTML;\n }\n if (extended.attrs) {\n extend(extended, extended.attrs);\n delete extended.attrs;\n }\n if (extended.styles) {\n var valArr = extended.styles.split(';');\n var vObj = {};\n for (var i = 0, length_1 = valArr.length; i < length_1; i++) {\n var cVal = valArr[i];\n var styleSplit = cVal.split(':');\n vObj[styleSplit[0]] = styleSplit[1];\n }\n delete extended.styles;\n extended.style = vObj;\n }\n }\n }\n return {\n tagName: tagName,\n attributes: extended || {},\n children: children\n };\n }\n VirtualDOM.createElement = createElement;\n function assignParent(childrens, parent) {\n if (parent && childrens) {\n childrens.forEach(function (child) {\n if (isObject(child)) {\n if (child.parent) {\n detach(child);\n }\n child.parent = parent;\n }\n return child;\n });\n }\n }\n VirtualDOM.assignParent = assignParent;\n function append(fromElements, toElement) {\n assignParent(fromElements, toElement);\n if (toElement.children) {\n toElement.children = toElement.children.concat(fromElements);\n }\n else {\n toElement.children = [].concat(fromElements);\n }\n }\n VirtualDOM.append = append;\n function prepend(child, toElement) {\n assignParent(child, toElement);\n if (!toElement.children || !toElement.children.length) {\n toElement.children = [];\n toElement.children.concat(child);\n }\n else {\n for (var i = child.length - 1; i >= 0; i--) {\n toElement.children.unshift(child[i]);\n }\n }\n }\n VirtualDOM.prepend = prepend;\n function detach(element) {\n var parent = element.parent;\n if (parent) {\n var index = parent.children.indexOf(element);\n if (index !== -1) {\n parent.children.splice(index);\n }\n }\n return parent;\n }\n VirtualDOM.detach = detach;\n //tslint:disable-next-line\n function vDomSelector(_a) {\n var ele = _a.ele, selector = _a.selector, selectAll = _a.selectAll, immediateParent = _a.immediateParent;\n var iSelector = selector.split(' ');\n var curColl = ele;\n for (var i = 0, length_2 = iSelector.length; i < length_2; i++) {\n var isDescendant = false;\n var parent_2 = curColl;\n var curSelector = iSelector[i];\n var simpleSelector = false;\n var mapper = [];\n if (simpleRegex.test(curSelector)) {\n simpleSelector = true;\n processSelector(curSelector, mapper);\n }\n else if (curSelector.indexOf('>') === -1) {\n var splitSelector = curSelector.match(multipleSplitRegex);\n for (var _i = 0, splitSelector_1 = splitSelector; _i < splitSelector_1.length; _i++) {\n var curMap = splitSelector_1[_i];\n processSelector(curMap, mapper);\n }\n }\n else if (curSelector.indexOf('>') !== -1) {\n isDescendant = true;\n var dSelector = curSelector.split('>');\n //tslint:disable-next-line\n var dParent = ele;\n var descendent = void 0;\n var flag = 0;\n for (var _b = 0, dSelector_1 = dSelector; _b < dSelector_1.length; _b++) {\n var sel = dSelector_1[_b];\n if (!dParent) {\n break;\n }\n if (dParent.length) {\n var descendentChild = [];\n for (var _c = 0, dParent_1 = dParent; _c < dParent_1.length; _c++) {\n var child = dParent_1[_c];\n descendentChild = descendentChild.concat(vDomSelector({\n ele: child, selector: sel,\n selectAll: selectAll, immediateParent: !!flag\n }));\n }\n descendent = descendentChild;\n }\n else {\n descendent = vDomSelector({ ele: dParent, selector: sel, selectAll: selectAll, immediateParent: !!flag });\n }\n flag++;\n dParent = descendent;\n }\n if (descendent) {\n curColl = descendent;\n }\n }\n if (!isDescendant) {\n if (parent_2.length) {\n var iCurSelector = [];\n for (var _d = 0, parent_1 = parent_2; _d < parent_1.length; _d++) {\n var curParent = parent_1[_d];\n iCurSelector = iCurSelector.concat(accessElement(curParent, mapper, selectAll, immediateParent));\n }\n curColl = iCurSelector;\n }\n else {\n curColl = accessElement(parent_2, mapper, selectAll, immediateParent);\n }\n }\n }\n if (selectAll) {\n return curColl;\n }\n else {\n return curColl[0] || null;\n }\n }\n VirtualDOM.vDomSelector = vDomSelector;\n function processSelector(selector, mapper) {\n var match = selector.match(idClassSelector);\n var obj = {};\n if (match) {\n var curMapper = selectMapper[match[0]];\n if (curMapper === 'className') {\n var curObj = mapper.filter(function (obj) { return obj.hasOwnProperty('className'); })[0];\n var canPush = false;\n if (!curObj) {\n canPush = true;\n curObj = {};\n }\n var existValue = curObj[curMapper] || '';\n curObj[curMapper] = existValue + classRegexString.replace('{value}', selector.replace('.', ''));\n if (canPush) {\n mapper.push(curObj);\n }\n }\n else {\n obj[curMapper] = selector.replace(match[0], '');\n mapper.push(obj);\n }\n }\n else {\n mapper.push({ tagName: selector });\n }\n }\n //tslint:disable-next-line\n function accessElement(ele, mapper, selectAll, immediateParent) {\n if (ele.children) {\n //tslint:disable-next-line\n var temp_1 = ele.children.filter(function (child) {\n if (typeof (child) !== 'string') {\n var matched = true;\n for (var _i = 0, mapper_1 = mapper; _i < mapper_1.length; _i++) {\n var map = mapper_1[_i];\n var key = Object.keys(map)[0];\n var expected = map[key];\n var actualValue = getValue(assigner[key], child);\n if (key === 'className') {\n if (!(new RegExp('^' + expected + '.*$').test(actualValue))) {\n matched = false;\n break;\n }\n }\n else if (actualValue !== expected) {\n matched = false;\n break;\n }\n }\n return matched;\n }\n else {\n return false;\n }\n });\n if (!immediateParent && (!temp_1.length || selectAll)) {\n ele.children.forEach(function (child) {\n if (isObject(child)) {\n temp_1 = temp_1.concat(accessElement(child, mapper, selectAll));\n }\n });\n }\n return temp_1;\n }\n else {\n return [];\n }\n }\n VirtualDOM.accessElement = accessElement;\n function ConvertHTMLToJSon(htmlString) {\n var results = [];\n var isText;\n var tagArray = [];\n var backup = htmlString;\n var nodeArray = [];\n while (htmlString) {\n isText = true;\n var lastVal = getLastValue(tagArray);\n if (!lastVal || !contains(cspElement, lastVal)) {\n if (htmlString.indexOf(']*>'), function (all, text) {\n text = text.replace(/|/g, '$1$2');\n iterateText(text);\n return '';\n });\n iterateEndTag('', getLastValue(tagArray));\n }\n backup = htmlString;\n }\n function iterateStartTag(start, tagName, rest) {\n tagName = tagName.toLowerCase();\n if (contains(blockElements, tagName)) {\n while (getLastValue(tagArray) && contains(inlineElement, getLastValue(tagArray))) {\n iterateEndTag('', getLastValue(tagArray));\n }\n }\n if (contains(selfClosingElements, tagName) && getLastValue(tagArray)) {\n iterateEndTag('', tagName);\n }\n var isSelfTag = contains(emptyElements, tagName);\n if (!isSelfTag) {\n tagArray.push(tagName);\n }\n var attrs = {};\n //tslint:disable-next-line\n rest.replace(attributeRegex, function (match, name) {\n var names = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n names[_i - 2] = arguments[_i];\n }\n //tslint:disable-next-line\n var val = names[2] ? names[2] :\n names[3] ? names[3] :\n names[4] ? names[4] :\n contains(fillAttrs, name) ? name : '';\n if (name === 'style') {\n var valArr = val.split(';');\n var vObj = {};\n for (var i = 0, length_3 = valArr.length; i < length_3; i++) {\n var cVal = valArr[i];\n var styleSplit = cVal.split(':');\n vObj[styleSplit[0]] = styleSplit[1];\n }\n val = vObj;\n }\n name = nameMapper[name] || name;\n attrs[name] = val;\n //tslint:disable-next-line\n });\n attrs['data-id'] = getRandomId();\n var tagObject = {\n tagName: tagName,\n attributes: attrs\n };\n if (isSelfTag) {\n var parent_3 = (nodeArray[0] || results);\n if (parent_3.children === undefined) {\n parent_3.children = [];\n }\n tagObject.parent = parent_3;\n parent_3.children.push(tagObject);\n }\n else {\n nodeArray.unshift(tagObject);\n }\n }\n function iterateEndTag(start, tagName) {\n var pos;\n if (!tagName) {\n pos = 0;\n }\n else {\n for (pos = tagArray.length - 1; pos >= 0; pos--) {\n if (tagArray[pos] === tagName) {\n break;\n }\n }\n }\n if (pos >= 0) {\n for (var j = nodeArray.length - 1; j >= pos; j--) {\n //tslint:disable-next-line\n var node = nodeArray.shift();\n if (nodeArray.length === 0) {\n results.push(node);\n }\n else {\n var parent_4 = nodeArray[0];\n if (parent_4.children === undefined) {\n parent_4.children = [];\n }\n node.parent = parent_4;\n parent_4.children.push(node);\n }\n }\n tagArray.length = pos;\n }\n }\n function iterateText(text) {\n if (nodeArray.length === 0) {\n results.push(text);\n }\n else {\n var parent_5 = nodeArray[0];\n if (parent_5.children === undefined) {\n parent_5.children = [];\n }\n parent_5.children.push(text);\n }\n }\n return results;\n }\n VirtualDOM.ConvertHTMLToJSon = ConvertHTMLToJSon;\n //tslint:disable-next-line \n function getLastValue(arr) {\n return arr[arr.length - 1];\n }\n function contains(arr, key) {\n return arr.indexOf(key) !== -1;\n }\n //tslint:disable-next-line\n function cloneNode(ele, deep) {\n if (isObject(ele)) {\n if (deep) {\n return extend({}, {}, ele, true);\n }\n else {\n return { tagName: ele.tagName, attributes: ele.attributes };\n }\n }\n else {\n return ele.cloneNode(deep);\n }\n }\n VirtualDOM.cloneNode = cloneNode;\n function setStyleAttribute(element, attrs) {\n if (element.attributes.style) {\n (element.attributes).style = extend({}, attrs);\n }\n else {\n element.attributes.style = extend(element.attributes.style, attrs);\n }\n }\n VirtualDOM.setStyleAttribute = setStyleAttribute;\n //tslint:enable:no-any\n})(VirtualDOM || (VirtualDOM = {}));\n","/**\n * Functions related to dom operations.\n */\nimport { EventHandler } from './event-handler';\nimport { isNullOrUndefined, getValue, setValue, isObject, extend } from './util';\nimport { VirtualDOM } from './virtual-dom';\nvar SVG_REG = /^svg|^path|^g/;\n/**\n * Function to create Html element.\n * @param tagName - Name of the tag, id and class names.\n * @param properties - Object to set properties in the element.\n * @param properties.id - To set the id to the created element.\n * @param properties.className - To add classes to the element.\n * @param properties.innerHTML - To set the innerHTML to element.\n * @param properties.styles - To set the some custom styles to element.\n * @param properties.attrs - To set the attributes to element.\n * @private\n */\nexport function createElement(tagName, properties) {\n //tslint:disable-next-line\n var element = (SVG_REG.test(tagName) ? document.createElementNS('http://www.w3.org/2000/svg', tagName) : document.createElement(tagName));\n if (typeof (properties) === 'undefined') {\n return element;\n }\n element.innerHTML = (properties.innerHTML ? properties.innerHTML : '');\n if (properties.className !== undefined) {\n element.className = properties.className;\n }\n if (properties.id !== undefined) {\n element.id = properties.id;\n }\n if (properties.styles !== undefined) {\n element.setAttribute('style', properties.styles);\n }\n if (properties.attrs !== undefined) {\n attributes(element, properties.attrs);\n }\n return element;\n}\n/**\n * The function used to add the classes to array of elements\n * @param {Element[]|NodeList} elements - An array of elements that need to add a list of classes\n * @param {string|string[]} classes - String or array of string that need to add an individual element as a class\n * @private\n */\nexport function addClass(elements, classes) {\n var classList = getClassList(classes);\n for (var _i = 0, _a = elements; _i < _a.length; _i++) {\n var ele = _a[_i];\n if (ele && classList) {\n for (var _b = 0, classList_1 = classList; _b < classList_1.length; _b++) {\n var className = classList_1[_b];\n if (isObject(ele)) {\n var curClass = getValue('attributes.className', ele);\n if (isNullOrUndefined(curClass)) {\n setValue('attributes.className', className, ele);\n }\n else if (!new RegExp('\\\\b' + className + '\\\\b', 'i').test(curClass)) {\n setValue('attributes.className', curClass + ' ' + className, ele);\n }\n }\n else {\n if (!ele.classList.contains(className)) {\n ele.classList.add(className);\n }\n }\n }\n }\n }\n return elements;\n}\n/**\n * The function used to add the classes to array of elements\n * @param {Element[]|NodeList} elements - An array of elements that need to remove a list of classes\n * @param {string|string[]} classes - String or array of string that need to add an individual element as a class\n * @private\n */\nexport function removeClass(elements, classes) {\n var classList = getClassList(classes);\n for (var _i = 0, _a = elements; _i < _a.length; _i++) {\n var ele = _a[_i];\n if (ele && classList) {\n var flag = isObject(ele);\n var canRemove = flag ? getValue('attributes.className', ele) : ele.className !== '';\n if (canRemove) {\n for (var _b = 0, classList_2 = classList; _b < classList_2.length; _b++) {\n var className = classList_2[_b];\n if (flag) {\n var classes_1 = getValue('attributes.className', ele);\n var classArr = classes_1.split(' ');\n var index = classArr.indexOf(className);\n if (index !== -1) {\n classArr.splice(index, 1);\n }\n setValue('attributes.className', classArr.join(' '), ele);\n }\n else {\n ele.classList.remove(className);\n }\n }\n }\n }\n }\n return elements;\n}\nfunction getClassList(classes) {\n var classList = [];\n if (typeof classes === 'string') {\n classList.push(classes);\n }\n else {\n classList = classes;\n }\n return classList;\n}\n/**\n * The function used to check element is visible or not.\n * @param {Element|Node} element - An element the need to check visibility\n * @private\n */\nexport function isVisible(element) {\n var ele = element;\n return (ele.style.visibility === '' && ele.offsetWidth > 0);\n}\n/**\n * The function used to insert an array of elements into a first of the element.\n * @param {Element[]|NodeList} fromElements - An array of elements that need to prepend.\n * @param {Element} toElement - An element that is going to prepend.\n * @private\n */\nexport function prepend(fromElements, toElement, isEval) {\n //tslint:disable:no-any\n if (isObject(toElement)) {\n VirtualDOM.prepend(fromElements, toElement);\n }\n else {\n var docFrag = document.createDocumentFragment();\n for (var _i = 0, _a = fromElements; _i < _a.length; _i++) {\n var ele = _a[_i];\n docFrag.appendChild(ele);\n }\n toElement.insertBefore(docFrag, toElement.firstElementChild);\n if (isEval) {\n executeScript(toElement);\n }\n }\n return fromElements;\n}\n/**\n * The function used to insert an array of elements into last of the element.\n * @param {Element[]|NodeList} fromElements - An array of elements that need to append.\n * @param {Element} toElement - An element that is going to prepend.\n * @private\n */\nexport function append(fromElements, toElement, isEval) {\n if (isObject(toElement)) {\n VirtualDOM.append(fromElements, toElement);\n }\n else {\n var docFrag = document.createDocumentFragment();\n for (var _i = 0, _a = fromElements; _i < _a.length; _i++) {\n var ele = _a[_i];\n docFrag.appendChild(ele);\n }\n toElement.appendChild(docFrag);\n if (isEval) {\n executeScript(toElement);\n }\n }\n return fromElements;\n}\n/**\n * The function is used to evaluate script from Ajax request\n * @param ele - An element is going to evaluate the script\n */\nfunction executeScript(ele) {\n var eleArray = ele.querySelectorAll('script');\n eleArray.forEach(function (element) {\n var script = document.createElement('script');\n script.text = element.innerHTML;\n document.head.appendChild(script);\n detach(script);\n });\n}\n/**\n * The function used to remove the element from the\n * @param {Element|Node|HTMLElement} element - An element that is going to detach from the Dom\n * @private\n */\nexport function detach(element) {\n if (isObject(element)) {\n return VirtualDOM.detach(element);\n }\n else {\n var parentNode = element.parentNode;\n if (parentNode) {\n return parentNode.removeChild(element);\n }\n }\n}\n//tslint: enable:no-any\n/**\n * The function used to remove the element from Dom also clear the bounded events\n * @param {Element|Node|HTMLElement} element - An element remove from the Dom\n * @private\n */\nexport function remove(element) {\n if (isObject(element)) {\n VirtualDOM.detach(element);\n }\n else {\n var parentNode = element.parentNode;\n EventHandler.clearEvents(element);\n parentNode.removeChild(element);\n }\n}\n/**\n * The function helps to set multiple attributes to an element\n * @param {Element|Node} element - An element that need to set attributes.\n * @param {{[key:string]:string}} attributes - JSON Object that is going to as attributes.\n * @private\n */\nexport function attributes(element, attributes) {\n var keys = Object.keys(attributes);\n var ele = element;\n if (ele) {\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (isObject(ele)) {\n var iKey = key;\n if (key === 'tabindex') {\n iKey = 'tabIndex';\n }\n ele.attributes[iKey] = attributes[key];\n }\n else {\n ele.setAttribute(key, attributes[key]);\n }\n }\n }\n return ele;\n}\n/**\n * The function selects the element from giving context.\n * @param {string} selector - Selector string need fetch element from the\n * @param {Document|Element=document} context - It is an optional type, That specifies a Dom context.\n * @private\n */\n//tslint:disable-next-line\nexport function select(selector, context, needsVDOM) {\n if (context === void 0) { context = document; }\n if (isObject(context) && needsVDOM) {\n //tslint:disable-next-line\n return VirtualDOM.vDomSelector({ ele: context, selector: selector, selectAll: false });\n }\n else {\n selector = querySelectId(selector);\n return context.querySelector(selector);\n }\n}\n/**\n * The function selects an array of element from the given context.\n * @param {string} selector - Selector string need fetch element from the\n * @param {Document|Element=document} context - It is an optional type, That specifies a Dom context.\n * @private\n */\nexport function selectAll(selector, context, needsVDOM) {\n if (context === void 0) { context = document; }\n if (isObject(context) && !needsVDOM) {\n //tslint:disable-next-line\n return VirtualDOM.vDomSelector({ ele: context, selector: selector, selectAll: true });\n }\n else {\n selector = querySelectId(selector);\n var nodeList = context.querySelectorAll(selector);\n return nodeList;\n }\n}\nfunction querySelectId(selector) {\n var charRegex = /(!|\"|\\$|%|&|'|\\(|\\)|\\*|\\/|:|;|<|=|\\?|@|\\]|\\^|`|{|}|\\||\\+|~)/g;\n if (selector.match(/#[0-9]/g) || selector.match(charRegex)) {\n var idList = selector.split(',');\n for (var i = 0; i < idList.length; i++) {\n var list = idList[i].split(' ');\n for (var j = 0; j < list.length; j++) {\n if (list[j].indexOf('#') > -1) {\n if (!list[j].match(/\\[.*\\]/)) {\n var splitId = list[j].split('#');\n if (splitId[1].match(/^\\d/) || splitId[1].match(charRegex)) {\n var setId = list[j].split('.');\n setId[0] = setId[0].replace(/#/, '[id=\\'') + '\\']';\n list[j] = setId.join('.');\n }\n }\n }\n }\n idList[i] = list.join(' ');\n }\n return idList.join(',');\n }\n return selector;\n}\n/**\n * Returns single closest parent element based on class selector.\n * @param {Element} element - An element that need to find the closest element.\n * @param {string} selector - A classSelector of closest element.\n * @private\n */\nexport function closest(element, selector) {\n var el = element;\n if (typeof el.closest === 'function') {\n return el.closest(selector);\n }\n while (el && el.nodeType === 1) {\n if (matches(el, selector)) {\n return el;\n }\n el = el.parentNode;\n }\n return null;\n}\n/**\n * Returns all sibling elements of the given element.\n * @param {Element|Node} element - An element that need to get siblings.\n * @private\n */\nexport function siblings(element) {\n var siblings = [];\n var childNodes = Array.prototype.slice.call(element.parentNode.childNodes);\n for (var _i = 0, childNodes_1 = childNodes; _i < childNodes_1.length; _i++) {\n var curNode = childNodes_1[_i];\n if (curNode.nodeType === Node.ELEMENT_NODE && element !== curNode) {\n siblings.push(curNode);\n }\n }\n return siblings;\n}\n/**\n * set the value if not exist. Otherwise set the existing value\n * @param {HTMLElement} element - An element to which we need to set value.\n * @param {string} property - Property need to get or set.\n * @param {string} value - value need to set.\n * @private\n */\nexport function getAttributeOrDefault(element, property, value) {\n var attrVal;\n var isObj = isObject(element);\n if (isObj) {\n attrVal = getValue('attributes.' + property, element);\n }\n else {\n attrVal = element.getAttribute(property);\n }\n if (isNullOrUndefined(attrVal) && value) {\n if (!isObj) {\n element.setAttribute(property, value.toString());\n }\n else {\n element.attributes[property] = value;\n }\n attrVal = value;\n }\n return attrVal;\n}\n/**\n * Set the style attributes to Html element.\n * @param {HTMLElement} element - Element which we want to set attributes\n * @param {any} attrs - Set the given attributes to element\n * @return {void}\n * @private\n */\nexport function setStyleAttribute(element, attrs) {\n if (attrs !== undefined) {\n if (isObject(element)) {\n // tslint:disable-next-line:no-any\n VirtualDOM.setStyleAttribute(element, attrs);\n }\n else {\n Object.keys(attrs).forEach(function (key) {\n // tslint:disable-next-line:no-any\n element.style[key] = attrs[key];\n });\n }\n }\n}\n/**\n * Method for add and remove classes to a dom element.\n * @param {Element} element - Element for add and remove classes\n * @param {string[]} addClasses - List of classes need to be add to the element\n * @param {string[]} removeClasses - List of classes need to be remove from the element\n * @return {void}\n * @private\n */\nexport function classList(element, addClasses, removeClasses) {\n addClass([element], addClasses);\n removeClass([element], removeClasses);\n}\n/**\n * Method to check whether the element matches the given selector.\n * @param {Element} element - Element to compare with the selector.\n * @param {string} selector - String selector which element will satisfy.\n * @return {void}\n * @private\n */\nexport function matches(element, selector) {\n //tslint:disable-next-line\n var matches = element.matches || element.msMatchesSelector || element.webkitMatchesSelector;\n if (matches) {\n return matches.call(element, selector);\n }\n else {\n return [].indexOf.call(document.querySelectorAll(selector), element) !== -1;\n }\n}\nexport function includeInnerHTML(ele, innerHTML) {\n if (isObject(ele)) {\n if (innerHTML === '') {\n ele.children = [];\n }\n else {\n var res = VirtualDOM.ConvertHTMLToJSon(innerHTML);\n if (res.length) {\n VirtualDOM.assignParent(res, ele);\n ele.children = res;\n }\n }\n }\n else {\n ele.innerHTML = innerHTML;\n }\n}\n//tslint:disable-next-line\nexport function containsClass(ele, className) {\n if (isObject(ele)) {\n // tslint:disable-next-line:no-any\n return new RegExp('\\\\b' + className + '\\\\b', 'i').test(ele.attributes.className);\n }\n else {\n return ele.classList.contains(className);\n }\n}\n/**\n * Method to check whether the element matches the given selector.\n * @param {} element - Element to compare with the selector.\n * @param {string} selector - String selector which element will satisfy.\n * @return {Element | VirtualObject}\n * @private\n */\n//tslint:disable:no-any\nexport function cloneNode(element, deep) {\n if (isObject(element)) {\n if (deep) {\n return extend({}, {}, element, true);\n }\n else {\n return { tagName: element.tagName, attributes: element.attributes };\n }\n }\n else {\n return element.cloneNode(deep);\n }\n}\n","import { isUndefined, isNullOrUndefined, merge, setImmediate, setValue, isBlazor, getValue, extend } from './util';\nimport { addClass, removeClass } from './dom';\nimport { Observer } from './observer';\nvar isColEName = new RegExp('\\]');\n/* tslint:enable:no-any */\n/**\n * Base library module is common module for Framework modules like touch,keyboard and etc.,\n * @private\n */\nvar Base = /** @class */ (function () {\n /**\n * Base constructor accept options and element\n */\n function Base(options, element) {\n this.isRendered = false;\n this.isComplexArraySetter = false;\n this.isServerRendered = false;\n this.allowServerDataBinding = true;\n this.isProtectedOnChange = true;\n this.properties = {};\n this.changedProperties = {};\n this.oldProperties = {};\n this.bulkChanges = {};\n this.refreshing = false;\n this.ignoreCollectionWatch = false;\n // tslint:disable-next-line:no-empty\n this.finalUpdate = function () { };\n this.childChangedProperties = {};\n this.modelObserver = new Observer(this);\n if (!isUndefined(element)) {\n if ('string' === typeof (element)) {\n this.element = document.querySelector(element);\n }\n else {\n this.element = element;\n }\n if (!isNullOrUndefined(this.element)) {\n this.isProtectedOnChange = false;\n this.addInstance();\n }\n }\n if (!isUndefined(options)) {\n this.setProperties(options, true);\n }\n this.isDestroyed = false;\n }\n /** Property base section */\n /**\n * Function used to set bunch of property at a time.\n * @private\n * @param {Object} prop - JSON object which holds components properties.\n * @param {boolean} muteOnChange? - Specifies to true when we set properties.\n */\n Base.prototype.setProperties = function (prop, muteOnChange) {\n var prevDetection = this.isProtectedOnChange;\n this.isProtectedOnChange = !!muteOnChange;\n merge(this, prop);\n if (muteOnChange !== true) {\n merge(this.changedProperties, prop);\n this.dataBind();\n }\n else if (isBlazor() && this.isRendered) {\n this.serverDataBind(prop);\n }\n this.finalUpdate();\n this.changedProperties = {};\n this.oldProperties = {};\n this.isProtectedOnChange = prevDetection;\n };\n ;\n /**\n * Calls for child element data bind\n * @param {Object} obj\n * @param {Object} parent\n * @returns {void}\n */\n // tslint:disable-next-line:no-any\n Base.callChildDataBind = function (obj, parent) {\n var keys = Object.keys(obj);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (parent[key] instanceof Array) {\n for (var _a = 0, _b = parent[key]; _a < _b.length; _a++) {\n var obj_1 = _b[_a];\n if (obj_1.dataBind !== undefined) {\n obj_1.dataBind();\n }\n }\n }\n else {\n parent[key].dataBind();\n }\n }\n };\n Base.prototype.clearChanges = function () {\n this.finalUpdate();\n this.changedProperties = {};\n this.oldProperties = {};\n this.childChangedProperties = {};\n };\n /**\n * Bind property changes immediately to components\n */\n Base.prototype.dataBind = function () {\n Base.callChildDataBind(this.childChangedProperties, this);\n if (Object.getOwnPropertyNames(this.changedProperties).length) {\n var prevDetection = this.isProtectedOnChange;\n var newChanges = this.changedProperties;\n var oldChanges = this.oldProperties;\n this.clearChanges();\n this.isProtectedOnChange = true;\n this.onPropertyChanged(newChanges, oldChanges);\n this.isProtectedOnChange = prevDetection;\n }\n };\n ;\n /* tslint:disable:no-any */\n Base.prototype.serverDataBind = function (newChanges) {\n if (!isBlazor()) {\n return;\n }\n newChanges = newChanges ? newChanges : {};\n extend(this.bulkChanges, {}, newChanges, true);\n var sfBlazor = 'sfBlazor';\n if (this.allowServerDataBinding && window[sfBlazor].updateModel) {\n window[sfBlazor].updateModel(this);\n this.bulkChanges = {};\n }\n };\n /* tslint:enable:no-any */\n Base.prototype.saveChanges = function (key, newValue, oldValue) {\n if (isBlazor()) {\n // tslint:disable-next-line:no-any\n var newChanges = {};\n newChanges[key] = newValue;\n this.serverDataBind(newChanges);\n }\n if (this.isProtectedOnChange) {\n return;\n }\n this.oldProperties[key] = oldValue;\n this.changedProperties[key] = newValue;\n this.finalUpdate();\n this.finalUpdate = setImmediate(this.dataBind.bind(this));\n };\n ;\n /** Event Base Section */\n /**\n * Adds the handler to the given event listener.\n * @param {string} eventName - A String that specifies the name of the event\n * @param {Function} listener - Specifies the call to run when the event occurs.\n * @return {void}\n */\n Base.prototype.addEventListener = function (eventName, handler) {\n this.modelObserver.on(eventName, handler);\n };\n /**\n * Removes the handler from the given event listener.\n * @param {string} eventName - A String that specifies the name of the event to remove\n * @param {Function} listener - Specifies the function to remove\n * @return {void}\n */\n Base.prototype.removeEventListener = function (eventName, handler) {\n this.modelObserver.off(eventName, handler);\n };\n /**\n * Triggers the handlers in the specified event.\n * @private\n * @param {string} eventName - Specifies the event to trigger for the specified component properties.\n * Can be a custom event, or any of the standard events.\n * @param {Event} eventProp - Additional parameters to pass on to the event properties\n * @param {Function} successHandler - this function will invoke after event successfully triggered\n * @param {Function} errorHandler - this function will invoke after event if it failured to call.\n * @return {void}\n */\n Base.prototype.trigger = function (eventName, eventProp, successHandler, errorHandler) {\n var _this = this;\n if (this.isDestroyed !== true) {\n var prevDetection = this.isProtectedOnChange;\n this.isProtectedOnChange = false;\n var data = this.modelObserver.notify(eventName, eventProp, successHandler, errorHandler);\n if (isColEName.test(eventName)) {\n var handler = getValue(eventName, this);\n if (handler) {\n var blazor = 'Blazor';\n if (window[blazor]) {\n var promise = handler.call(this, eventProp);\n if (promise && typeof promise.then === 'function') {\n if (!successHandler) {\n data = promise;\n }\n else {\n promise.then(function (data) {\n if (successHandler) {\n data = typeof data === 'string' && _this.modelObserver.isJson(data) ?\n JSON.parse(data) : data;\n successHandler.call(_this, data);\n }\n }).catch(function (data) {\n if (errorHandler) {\n data = typeof data === 'string' && _this.modelObserver.isJson(data) ? JSON.parse(data) : data;\n errorHandler.call(_this, data);\n }\n });\n }\n }\n else if (successHandler) {\n successHandler.call(this, eventProp);\n }\n }\n else {\n handler.call(this, eventProp);\n if (successHandler) {\n successHandler.call(this, eventProp);\n }\n }\n }\n else if (successHandler) {\n successHandler.call(this, eventProp);\n }\n }\n this.isProtectedOnChange = prevDetection;\n return data;\n }\n };\n /**\n * To maintain instance in base class\n */\n Base.prototype.addInstance = function () {\n // Add module class to the root element\n var moduleClass = 'e-' + this.getModuleName().toLowerCase();\n addClass([this.element], ['e-lib', moduleClass]);\n if (!isNullOrUndefined(this.element.ej2_instances)) {\n this.element.ej2_instances.push(this);\n }\n else {\n setValue('ej2_instances', [this], this.element);\n }\n };\n /**\n * To remove the instance from the element\n */\n Base.prototype.destroy = function () {\n var _this = this;\n this.element.ej2_instances =\n this.element.ej2_instances.filter(function (i) { return i !== _this; });\n removeClass([this.element], ['e-' + this.getModuleName()]);\n if (this.element.ej2_instances.length === 0) {\n // Remove module class from the root element\n removeClass([this.element], ['e-lib']);\n }\n this.clearChanges();\n this.modelObserver.destroy();\n this.isDestroyed = true;\n };\n return Base;\n}());\nexport { Base };\n/**\n * Global function to get the component instance from the rendered element.\n * @param elem Specifies the HTMLElement or element id string.\n * @param comp Specifies the component module name or Component.\n */\n// tslint:disable-next-line:no-any\nexport function getComponent(elem, comp) {\n var instance;\n var i;\n var ele = typeof elem === 'string' ? document.getElementById(elem) : elem;\n for (i = 0; i < ele.ej2_instances.length; i++) {\n instance = ele.ej2_instances[i];\n if (typeof comp === 'string') {\n var compName = instance.getModuleName();\n if (comp === compName) {\n return instance;\n }\n }\n else {\n // tslint:disable-next-line:no-any\n if (instance instanceof comp) {\n return instance;\n }\n }\n }\n return undefined;\n}\n/**\n * Function to remove the child instances.\n * @return {void}\n * @private\n */\n// tslint:disable-next-line:no-any\nexport function removeChildInstance(element) {\n // tslint:disable-next-line:no-any\n var childEle = [].slice.call(element.getElementsByClassName('e-control'));\n for (var i = 0; i < childEle.length; i++) {\n var compName = childEle[i].classList[1].split('e-')[1];\n // tslint:disable-next-line:no-any\n var compInstance = getComponent(childEle[i], compName);\n if (!isUndefined(compInstance)) {\n compInstance.destroy();\n }\n }\n}\n","import { createInstance, isUndefined, merge, extend, getValue } from './util';\n/**\n * Returns the Class Object\n * @param {ClassObject} instance - instance of ClassObject\n * @param {string} curKey - key of the current instance\n * @param {Object} defaultValue - default Value\n * @param {Object[]} type\n */\nfunction getObject(instance, curKey, defaultValue, type) {\n if (!instance.properties.hasOwnProperty(curKey) || !(instance.properties[curKey] instanceof type)) {\n instance.properties[curKey] = createInstance(type, [instance, curKey, defaultValue]);\n }\n return instance.properties[curKey];\n}\n/**\n * Returns object array\n * @param {ClassObject} instance\n * @param {string} curKey\n * @param {Object[]} defaultValue\n * @param type\n * @param {boolean} isSetter\n * @returns {Object[]}\n */\nfunction getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactory) {\n var result = [];\n var len = defaultValue ? defaultValue.length : 0;\n for (var i = 0; i < len; i++) {\n var curType = type;\n if (isFactory) {\n curType = type(defaultValue[i], instance);\n }\n if (isSetter) {\n var inst = createInstance(curType, [instance, curKey, {}, true]);\n inst.setProperties(defaultValue[i], true);\n result.push(inst);\n }\n else {\n result.push(createInstance(curType, [instance, curKey, defaultValue[i], false]));\n }\n }\n return result;\n}\n/**\n * Returns the properties of the object\n * @param {Object} defaultValue\n * @param {string} curKey\n */\nfunction propertyGetter(defaultValue, curKey) {\n return function () {\n if (!this.properties.hasOwnProperty(curKey)) {\n this.properties[curKey] = defaultValue;\n }\n return this.properties[curKey];\n };\n}\n/**\n * Set the properties for the object\n * @param {Object} defaultValue\n * @param {string} curKey\n */\nfunction propertySetter(defaultValue, curKey) {\n return function (newValue) {\n if (this.properties[curKey] !== newValue) {\n var oldVal = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;\n this.saveChanges(curKey, newValue, oldVal);\n this.properties[curKey] = newValue;\n }\n };\n}\n/**\n * Returns complex objects\n */\nfunction complexGetter(defaultValue, curKey, type) {\n return function () {\n return getObject(this, curKey, defaultValue, type);\n };\n}\n/**\n * Sets complex objects\n */\nfunction complexSetter(defaultValue, curKey, type) {\n return function (newValue) {\n getObject(this, curKey, defaultValue, type).setProperties(newValue);\n };\n}\nfunction complexFactoryGetter(defaultValue, curKey, type) {\n return function () {\n var curType = type({});\n if (this.properties.hasOwnProperty(curKey)) {\n return this.properties[curKey];\n }\n else {\n return getObject(this, curKey, defaultValue, curType);\n }\n };\n}\nfunction complexFactorySetter(defaultValue, curKey, type) {\n return function (newValue) {\n var curType = type(newValue, this);\n getObject(this, curKey, defaultValue, curType).setProperties(newValue);\n };\n}\nfunction complexArrayGetter(defaultValue, curKey, type) {\n return function () {\n var _this = this;\n if (!this.properties.hasOwnProperty(curKey)) {\n var defCollection = getObjectArray(this, curKey, defaultValue, type, false);\n this.properties[curKey] = defCollection;\n }\n var ignore = ((this.controlParent !== undefined && this.controlParent.ignoreCollectionWatch)\n || this.ignoreCollectionWatch);\n if (!this.properties[curKey].hasOwnProperty('push') && !ignore) {\n ['push', 'pop'].forEach(function (extendFunc) {\n var descriptor = {\n value: complexArrayDefinedCallback(extendFunc, curKey, type, _this.properties[curKey]).bind(_this),\n configurable: true\n };\n Object.defineProperty(_this.properties[curKey], extendFunc, descriptor);\n });\n }\n if (!this.properties[curKey].hasOwnProperty('isComplexArray')) {\n Object.defineProperty(this.properties[curKey], 'isComplexArray', { value: true });\n }\n return this.properties[curKey];\n };\n}\nfunction complexArraySetter(defaultValue, curKey, type) {\n return function (newValue) {\n this.isComplexArraySetter = true;\n var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, false);\n var newValCollection = getObjectArray(this, curKey, newValue, type, true);\n this.isComplexArraySetter = false;\n this.saveChanges(curKey, newValCollection, oldValueCollection);\n this.properties[curKey] = newValCollection;\n };\n}\nfunction complexArrayFactorySetter(defaultValue, curKey, type) {\n return function (newValue) {\n var oldValueCollection = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;\n var newValCollection = getObjectArray(this, curKey, newValue, type, true, true);\n this.saveChanges(curKey, newValCollection, oldValueCollection);\n this.properties[curKey] = newValCollection;\n };\n}\nfunction complexArrayFactoryGetter(defaultValue, curKey, type) {\n return function () {\n var curType = type({});\n if (!this.properties.hasOwnProperty(curKey)) {\n var defCollection = getObjectArray(this, curKey, defaultValue, curType, false);\n this.properties[curKey] = defCollection;\n }\n return this.properties[curKey];\n };\n}\nfunction complexArrayDefinedCallback(dFunc, curKey, type, prop) {\n /* tslint:disable no-function-expression */\n return function () {\n var newValue = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newValue[_i] = arguments[_i];\n }\n var keyString = this.propName ? this.getParentKey() + '.' + curKey + '-' : curKey + '-';\n switch (dFunc) {\n case 'push':\n for (var i = 0; i < newValue.length; i++) {\n Array.prototype[dFunc].apply(prop, [newValue[i]]);\n var model_1 = getArrayModel(keyString + (prop.length - 1), newValue[i], !this.controlParent, dFunc);\n this.serverDataBind(model_1, newValue[i], false, dFunc);\n }\n break;\n case 'pop':\n Array.prototype[dFunc].apply(prop);\n var model = getArrayModel(keyString + prop.length, null, !this.controlParent, dFunc);\n this.serverDataBind(model, { ejsAction: 'pop' }, false, dFunc);\n break;\n }\n return prop;\n };\n /* tslint:enable no-function-expression */\n}\nfunction getArrayModel(keyString, value, isControlParent, arrayFunction) {\n var modelObject = keyString;\n if (isControlParent) {\n modelObject = {};\n modelObject[keyString] = value;\n if (value && typeof value === 'object') {\n var action = 'ejsAction';\n modelObject[keyString][action] = arrayFunction;\n }\n }\n return modelObject;\n}\n/**\n * Method used to create property. General syntax below.\n * @param {T} defaultValue? - Specifies the default value of property.\n * ```\n * @Property('TypeScript')\n * propertyName: Type;\n * ```\n * @private\n */\nexport function Property(defaultValue) {\n return function (target, key) {\n var propertyDescriptor = {\n set: propertySetter(defaultValue, key),\n get: propertyGetter(defaultValue, key),\n enumerable: true,\n configurable: true\n };\n //new property creation\n Object.defineProperty(target, key, propertyDescriptor);\n addPropertyCollection(target, key, 'prop', defaultValue);\n };\n}\n/**\n * Method used to create complex property. General syntax below.\n * @param {T} defaultValue - Specifies the default value of property.\n * @param {Function} type - Specifies the class type of complex object.\n * ```\n * @Complex({},Type)\n * propertyName: Type;\n * ```\n * @private\n */\nexport function Complex(defaultValue, type) {\n return function (target, key) {\n var propertyDescriptor = {\n set: complexSetter(defaultValue, key, type),\n get: complexGetter(defaultValue, key, type),\n enumerable: true,\n configurable: true\n };\n //new property creation\n Object.defineProperty(target, key, propertyDescriptor);\n addPropertyCollection(target, key, 'complexProp', defaultValue, type);\n };\n}\n/**\n * Method used to create complex Factory property. General syntax below.\n * @param {Function} defaultType - Specifies the default value of property.\n * @param {Function} type - Specifies the class factory type of complex object.\n * ```\n * @ComplexFactory(defaultType, factoryFunction)\n * propertyName: Type1 | Type2;\n * ```\n * @private\n */\nexport function ComplexFactory(type) {\n return function (target, key) {\n var propertyDescriptor = {\n set: complexFactorySetter({}, key, type),\n get: complexFactoryGetter({}, key, type),\n enumerable: true,\n configurable: true\n };\n //new property creation\n Object.defineProperty(target, key, propertyDescriptor);\n addPropertyCollection(target, key, 'complexProp', {}, type);\n };\n}\n/**\n * Method used to create complex array property. General syntax below.\n * @param {T[]} defaultValue - Specifies the default value of property.\n * @param {Function} type - Specifies the class type of complex object.\n * ```\n * @Collection([], Type);\n * propertyName: Type;\n * ```\n * @private\n */\nexport function Collection(defaultValue, type) {\n return function (target, key) {\n var propertyDescriptor = {\n set: complexArraySetter(defaultValue, key, type),\n get: complexArrayGetter(defaultValue, key, type),\n enumerable: true,\n configurable: true\n };\n //new property creation\n Object.defineProperty(target, key, propertyDescriptor);\n addPropertyCollection(target, key, 'colProp', defaultValue, type);\n };\n}\n/**\n * Method used to create complex factory array property. General syntax below.\n * @param {T[]} defaultType - Specifies the default type of property.\n * @param {Function} type - Specifies the class type of complex object.\n * ```\n * @Collection([], Type);\n * propertyName: Type;\n * ```\n * @private\n */\nexport function CollectionFactory(type) {\n return function (target, key) {\n var propertyDescriptor = {\n set: complexArrayFactorySetter([], key, type),\n get: complexArrayFactoryGetter([], key, type),\n enumerable: true,\n configurable: true\n };\n //new property creation\n Object.defineProperty(target, key, propertyDescriptor);\n addPropertyCollection(target, key, 'colProp', {}, type);\n };\n}\n/**\n * Method used to create event property. General syntax below.\n * @param {Function} defaultValue? - Specifies the default value of property.\n * @param {boolean} isComplex? - Specifies the whether it is complex object.\n * ```\n * @Event(()=>{return true;})\n * ```\n * @private\n */\nexport function Event() {\n return function (target, key) {\n var eventDescriptor = {\n set: function (newValue) {\n var oldValue = this.properties[key];\n if (oldValue !== newValue) {\n var finalContext = getParentContext(this, key);\n if (isUndefined(oldValue) === false) {\n finalContext.context.removeEventListener(finalContext.prefix, oldValue);\n }\n finalContext.context.addEventListener(finalContext.prefix, newValue);\n this.properties[key] = newValue;\n }\n },\n get: propertyGetter(undefined, key),\n enumerable: true,\n configurable: true\n };\n Object.defineProperty(target, key, eventDescriptor);\n addPropertyCollection(target, key, 'event');\n };\n}\n/**\n * NotifyPropertyChanges is triggers the call back when the property has been changed.\n *\n * ```\n * @NotifyPropertyChanges\n * class DemoClass implements INotifyPropertyChanged {\n *\n * @Property()\n * property1: string;\n *\n * dataBind: () => void;\n *\n * constructor() { }\n *\n * onPropertyChanged(newProp: any, oldProp: any) {\n * // Called when property changed\n * }\n * }\n * ```\n * @private\n */\nexport function NotifyPropertyChanges(classConstructor) {\n /** Need to code */\n}\n/**\n * Method used to create the builderObject for the target component.\n * @private\n */\nfunction addPropertyCollection(target, key, propertyType, defaultValue, type) {\n if (isUndefined(target.propList)) {\n target.propList = {\n props: [],\n complexProps: [],\n colProps: [],\n events: [],\n propNames: [],\n complexPropNames: [],\n colPropNames: [],\n eventNames: []\n };\n }\n /* tslint:disable no-any */\n target.propList[propertyType + 's'].push({\n propertyName: key,\n defaultValue: defaultValue,\n type: type\n });\n target.propList[propertyType + 'Names'].push(key);\n /* tslint:enable no-any */\n}\n/**\n * Returns an object containing the builder properties\n * @param {Function} component\n * @private\n */\nfunction getBuilderProperties(component) {\n if (isUndefined(component.prototype.builderObject)) {\n component.prototype.builderObject = {\n properties: {}, propCollections: [], add: function () {\n this.isPropertyArray = true;\n this.propCollections.push(extend({}, this.properties, {}));\n }\n };\n var rex = /complex/;\n for (var _i = 0, _a = Object.keys(component.prototype.propList); _i < _a.length; _i++) {\n var key = _a[_i];\n var _loop_1 = function (prop) {\n if (rex.test(key)) {\n component.prototype.builderObject[prop.propertyName] = function (value) {\n var childType = {};\n merge(childType, getBuilderProperties(prop.type));\n value(childType);\n var tempValue;\n if (!childType.isPropertyArray) {\n tempValue = extend({}, childType.properties, {});\n }\n else {\n tempValue = childType.propCollections;\n }\n this.properties[prop.propertyName] = tempValue;\n childType.properties = {};\n childType.propCollections = [];\n childType.isPropertyArray = false;\n return this;\n };\n }\n else {\n component.prototype.builderObject[prop.propertyName] = function (value) {\n this.properties[prop.propertyName] = value;\n return this;\n };\n }\n };\n for (var _b = 0, _c = component.prototype.propList[key]; _b < _c.length; _b++) {\n var prop = _c[_b];\n _loop_1(prop);\n }\n }\n }\n return component.prototype.builderObject;\n}\n/**\n * Method used to create builder for the components\n * @param {any} component -specifies the target component for which builder to be created.\n * @private\n */\nexport function CreateBuilder(component) {\n var builderFunction = function (element) {\n this.element = element;\n return this;\n };\n var instanceFunction = function (element) {\n if (!builderFunction.prototype.hasOwnProperty('create')) {\n builderFunction.prototype = getBuilderProperties(component);\n builderFunction.prototype.create = function () {\n var temp = extend({}, {}, this.properties);\n this.properties = {};\n return new component(temp, this.element);\n };\n }\n return new builderFunction(element);\n };\n return instanceFunction;\n}\n/**\n * Returns parent options for the object\n * @param {Object} context\n * @param {string} prefix\n * @private\n */\nfunction getParentContext(context, prefix) {\n if (context.hasOwnProperty('parentObj') === false) {\n return { context: context, prefix: prefix };\n }\n else {\n var curText = getValue('propName', context);\n if (curText) {\n prefix = curText + '-' + prefix;\n }\n return getParentContext(getValue('parentObj', context), prefix);\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { createElement, selectAll, closest } from './dom';\nimport { Base } from './base';\nimport { Browser } from './browser';\nimport { EventHandler } from './event-handler';\nimport { Property, NotifyPropertyChanges, Event } from './notify-property-change';\n/**\n * The Animation framework provide options to animate the html DOM elements\n * ```typescript\n * let animeObject = new Animation({\n * name: 'SlideLeftIn',\n * duration: 1000\n * });\n * animeObject.animate('#anime1');\n * animeObject.animate('#anime2', { duration: 500 });\n * ```\n */\nvar Animation = /** @class */ (function (_super) {\n __extends(Animation, _super);\n function Animation(options) {\n var _this = _super.call(this, options, undefined) || this;\n /**\n * @private\n */\n _this.easing = {\n ease: 'cubic-bezier(0.250, 0.100, 0.250, 1.000)',\n linear: 'cubic-bezier(0.250, 0.250, 0.750, 0.750)',\n easeIn: 'cubic-bezier(0.420, 0.000, 1.000, 1.000)',\n easeOut: 'cubic-bezier(0.000, 0.000, 0.580, 1.000)',\n easeInOut: 'cubic-bezier(0.420, 0.000, 0.580, 1.000)',\n elasticInOut: 'cubic-bezier(0.5,-0.58,0.38,1.81)',\n elasticIn: 'cubic-bezier(0.17,0.67,0.59,1.81)',\n elasticOut: 'cubic-bezier(0.7,-0.75,0.99,1.01)'\n };\n return _this;\n }\n Animation_1 = Animation;\n /**\n * Applies animation to the current element.\n * @param {string | HTMLElement} element - Element which needs to be animated.\n * @param {AnimationModel} options - Overriding default animation settings.\n * @return {void}\n */\n Animation.prototype.animate = function (element, options) {\n options = !options ? {} : options;\n var model = this.getModel(options);\n if (typeof element === 'string') {\n var elements = Array.prototype.slice.call(selectAll(element, document));\n for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {\n var element_1 = elements_1[_i];\n model.element = element_1;\n Animation_1.delayAnimation(model);\n }\n }\n else {\n model.element = element;\n Animation_1.delayAnimation(model);\n }\n };\n /**\n * Stop the animation effect on animated element.\n * @param {HTMLElement} element - Element which needs to be stop the animation.\n * @param {AnimationOptions} model - Handling the animation model at stop function.\n * @return {void}\n */\n Animation.stop = function (element, model) {\n element.style.animation = '';\n element.removeAttribute('e-animate');\n var animationId = element.getAttribute('e-animation-id');\n if (animationId) {\n var frameId = parseInt(animationId, 10);\n cancelAnimationFrame(frameId);\n element.removeAttribute('e-animation-id');\n }\n if (model && model.end) {\n model.end.call(this, model);\n }\n };\n /**\n * Set delay to animation element\n * @param {AnimationModel} model\n * @returns {void}\n */\n Animation.delayAnimation = function (model) {\n if (model.delay) {\n setTimeout(function () { Animation_1.applyAnimation(model); }, model.delay);\n }\n else {\n Animation_1.applyAnimation(model);\n }\n };\n /**\n * Triggers animation\n * @param {AnimationModel} model\n * @returns {void}\n */\n Animation.applyAnimation = function (model) {\n var _this = this;\n model.timeStamp = 0;\n var step = 0;\n var timerId = 0;\n var startTime = 0;\n var prevTimeStamp = 0;\n var duration = model.duration;\n model.element.setAttribute('e-animate', 'true');\n var startAnimation = function (timeStamp) {\n try {\n if (timeStamp) {\n // let step: number = model.timeStamp = timeStamp - startTime;\n /** phantomjs workaround for timestamp fix */\n prevTimeStamp = prevTimeStamp === 0 ? timeStamp : prevTimeStamp;\n model.timeStamp = (timeStamp + model.timeStamp) - prevTimeStamp;\n prevTimeStamp = timeStamp;\n /** phantomjs workaround end */\n // trigger animation begin event\n if (!step && model.begin) {\n model.begin.call(_this, model);\n }\n step = step + 1;\n var avg = model.timeStamp / step;\n if (model.timeStamp < duration && model.timeStamp + avg < duration && model.element.getAttribute('e-animate')) {\n // apply animation effect to the current element \n model.element.style.animation = model.name + ' ' + model.duration + 'ms ' + model.timingFunction;\n if (model.progress) {\n model.progress.call(_this, model);\n }\n // repeat requestAnimationFrame \n requestAnimationFrame(startAnimation);\n }\n else {\n // clear requestAnimationFrame\n cancelAnimationFrame(timerId);\n model.element.removeAttribute('e-animation-id');\n model.element.removeAttribute('e-animate');\n model.element.style.animation = '';\n if (model.end) {\n model.end.call(_this, model);\n }\n }\n }\n else {\n startTime = performance.now();\n // set initial requestAnimationFrame\n timerId = requestAnimationFrame(startAnimation);\n model.element.setAttribute('e-animation-id', timerId.toString());\n }\n }\n catch (e) {\n cancelAnimationFrame(timerId);\n model.element.removeAttribute('e-animation-id');\n if (model.fail) {\n model.fail.call(_this, e);\n }\n }\n };\n startAnimation();\n };\n /**\n * Returns Animation Model\n * @param {AnimationModel} options\n * @returns {AnimationModel}\n */\n Animation.prototype.getModel = function (options) {\n return {\n name: options.name || this.name,\n delay: options.delay || this.delay,\n duration: (options.duration !== undefined ? options.duration : this.duration),\n begin: options.begin || this.begin,\n end: options.end || this.end,\n fail: options.fail || this.fail,\n progress: options.progress || this.progress,\n timingFunction: this.easing[options.timingFunction] ? this.easing[options.timingFunction] :\n (options.timingFunction || this.easing[this.timingFunction])\n };\n };\n /**\n * @private\n */\n Animation.prototype.onPropertyChanged = function (newProp, oldProp) {\n // no code needed\n };\n /**\n * Returns module name as animation\n * @private\n */\n Animation.prototype.getModuleName = function () {\n return 'animation';\n };\n /**\n * @private\n */\n Animation.prototype.destroy = function () {\n //Override base destroy;\n };\n var Animation_1;\n __decorate([\n Property('FadeIn')\n ], Animation.prototype, \"name\", void 0);\n __decorate([\n Property(400)\n ], Animation.prototype, \"duration\", void 0);\n __decorate([\n Property('ease')\n ], Animation.prototype, \"timingFunction\", void 0);\n __decorate([\n Property(0)\n ], Animation.prototype, \"delay\", void 0);\n __decorate([\n Event()\n ], Animation.prototype, \"progress\", void 0);\n __decorate([\n Event()\n ], Animation.prototype, \"begin\", void 0);\n __decorate([\n Event()\n ], Animation.prototype, \"end\", void 0);\n __decorate([\n Event()\n ], Animation.prototype, \"fail\", void 0);\n Animation = Animation_1 = __decorate([\n NotifyPropertyChanges\n ], Animation);\n return Animation;\n}(Base));\nexport { Animation };\n/**\n * Ripple provides material theme's wave effect when an element is clicked\n * ```html\n *
\n * \n * ```\n * @private\n * @param HTMLElement element - Target element\n * @param RippleOptions rippleOptions - Ripple options .\n */\nexport function rippleEffect(element, rippleOptions, done) {\n var rippleModel = getRippleModel(rippleOptions);\n if (rippleModel.rippleFlag === false || (rippleModel.rippleFlag === undefined && !isRippleEnabled)) {\n return Function;\n }\n element.setAttribute('data-ripple', 'true');\n EventHandler.add(element, 'mousedown', rippleHandler, { parent: element, rippleOptions: rippleModel });\n EventHandler.add(element, 'mouseup', rippleUpHandler, { parent: element, rippleOptions: rippleModel, done: done });\n EventHandler.add(element, 'mouseleave', rippleLeaveHandler, { parent: element, rippleOptions: rippleModel });\n if (Browser.isPointer) {\n EventHandler.add(element, 'transitionend', rippleLeaveHandler, { parent: element, rippleOptions: rippleModel });\n }\n return (function () {\n element.removeAttribute('data-ripple');\n EventHandler.remove(element, 'mousedown', rippleHandler);\n EventHandler.remove(element, 'mouseup', rippleUpHandler);\n EventHandler.remove(element, 'mouseleave', rippleLeaveHandler);\n EventHandler.remove(element, 'transitionend', rippleLeaveHandler);\n });\n}\nfunction getRippleModel(rippleOptions) {\n var rippleModel = {\n selector: rippleOptions && rippleOptions.selector ? rippleOptions.selector : null,\n ignore: rippleOptions && rippleOptions.ignore ? rippleOptions.ignore : null,\n rippleFlag: rippleOptions && rippleOptions.rippleFlag,\n isCenterRipple: rippleOptions && rippleOptions.isCenterRipple,\n duration: rippleOptions && rippleOptions.duration ? rippleOptions.duration : 350\n };\n return rippleModel;\n}\n/**\n * Handler for ripple event\n * @param {MouseEvent} e\n * @returns {void}\n * @private\n */\nfunction rippleHandler(e) {\n var target = (e.target);\n var selector = this.rippleOptions.selector;\n var element = selector ? closest(target, selector) : target;\n if (!element || (this.rippleOptions && closest(target, this.rippleOptions.ignore))) {\n return;\n }\n var offset = element.getBoundingClientRect();\n var offsetX = e.pageX - document.body.scrollLeft;\n var offsetY = e.pageY - ((!document.body.scrollTop && document.documentElement) ?\n document.documentElement.scrollTop : document.body.scrollTop);\n var pageX = Math.max(Math.abs(offsetX - offset.left), Math.abs(offsetX - offset.right));\n var pageY = Math.max(Math.abs(offsetY - offset.top), Math.abs(offsetY - offset.bottom));\n var radius = Math.sqrt(pageX * pageX + pageY * pageY);\n var diameter = radius * 2 + 'px';\n var x = offsetX - offset.left - radius;\n var y = offsetY - offset.top - radius;\n if (this.rippleOptions && this.rippleOptions.isCenterRipple) {\n x = 0;\n y = 0;\n diameter = '100%';\n }\n element.classList.add('e-ripple');\n var duration = this.rippleOptions.duration.toString();\n var styles = 'width: ' + diameter + ';height: ' + diameter + ';left: ' + x + 'px;top: ' + y + 'px;' +\n 'transition-duration: ' + duration + 'ms;';\n var rippleElement = createElement('div', { className: 'e-ripple-element', styles: styles });\n element.appendChild(rippleElement);\n window.getComputedStyle(rippleElement).getPropertyValue('opacity');\n rippleElement.style.transform = 'scale(1)';\n if (element !== this.parent) {\n EventHandler.add(element, 'mouseleave', rippleLeaveHandler, { parent: this.parent, rippleOptions: this.rippleOptions });\n }\n}\n/**\n * Handler for ripple element mouse up event\n * @param {MouseEvent} e\n * @returns {void}\n * @private\n */\nfunction rippleUpHandler(e) {\n removeRipple(e, this);\n}\n/**\n * Handler for ripple element mouse move event\n * @param {MouseEvent} e\n * @returns {void}\n * @private\n */\nfunction rippleLeaveHandler(e) {\n removeRipple(e, this);\n}\n/**\n * Handler for removing ripple element\n * @param {MouseEvent} e\n * @param {rippleArgs} eventArgs\n * @returns {void}\n * @private\n */\nfunction removeRipple(e, eventArgs) {\n var duration = eventArgs.rippleOptions.duration;\n var target = (e.target);\n var selector = eventArgs.rippleOptions.selector;\n var element = selector ? closest(target, selector) : target;\n if (!element || (element && element.className.indexOf('e-ripple') === -1)) {\n return;\n }\n var rippleElements = selectAll('.e-ripple-element', element);\n var rippleElement = rippleElements[rippleElements.length - 1];\n if (rippleElement) {\n rippleElement.style.opacity = '0.5';\n }\n if (eventArgs.parent !== element) {\n EventHandler.remove(element, 'mouseleave', rippleLeaveHandler);\n }\n /* tslint:disable:align */\n setTimeout(function () {\n if (rippleElement && rippleElement.parentNode) {\n rippleElement.parentNode.removeChild(rippleElement);\n }\n if (!element.getElementsByClassName('e-ripple-element').length) {\n element.classList.remove('e-ripple');\n }\n if (eventArgs.done) {\n eventArgs.done(e);\n }\n }, duration);\n}\nexport var isRippleEnabled = false;\n/**\n * Animation Module provides support to enable ripple effect functionality to Essential JS 2 components.\n * @param {boolean} isRipple Specifies the boolean value to enable or disable ripple effect.\n * @returns {boolean}\n */\nexport function enableRipple(isRipple) {\n isRippleEnabled = isRipple;\n return isRippleEnabled;\n}\n","/**\n * Module loading operations\n */\nimport { createInstance, setValue, getValue, deleteObject } from './util';\nvar MODULE_SUFFIX = 'Module';\nvar ModuleLoader = /** @class */ (function () {\n function ModuleLoader(parent) {\n this.loadedModules = [];\n this.parent = parent;\n }\n ;\n /**\n * Inject required modules in component library\n * @return {void}\n * @param {ModuleDeclaration[]} requiredModules - Array of modules to be required\n * @param {Function[]} moduleList - Array of modules to be injected from sample side\n */\n ModuleLoader.prototype.inject = function (requiredModules, moduleList) {\n var reqLength = requiredModules.length;\n if (reqLength === 0) {\n this.clean();\n return;\n }\n if (this.loadedModules.length) {\n this.clearUnusedModule(requiredModules);\n }\n for (var i = 0; i < reqLength; i++) {\n var modl = requiredModules[i];\n for (var _i = 0, moduleList_1 = moduleList; _i < moduleList_1.length; _i++) {\n var module = moduleList_1[_i];\n var modName = modl.member;\n if (module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {\n var moduleObject = createInstance(module, modl.args);\n var memberName = this.getMemberName(modName);\n if (modl.isProperty) {\n setValue(memberName, module, this.parent);\n }\n else {\n setValue(memberName, moduleObject, this.parent);\n }\n var loadedModule = modl;\n loadedModule.member = memberName;\n this.loadedModules.push(loadedModule);\n }\n }\n }\n };\n /**\n * To remove the created object while destroying the control\n * @return {void}\n */\n ModuleLoader.prototype.clean = function () {\n for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {\n var modules = _a[_i];\n if (!modules.isProperty) {\n getValue(modules.member, this.parent).destroy();\n }\n }\n this.loadedModules = [];\n };\n /**\n * Removes all unused modules\n * @param {ModuleDeclaration[]} moduleList\n * @returns {void}\n */\n ModuleLoader.prototype.clearUnusedModule = function (moduleList) {\n var _this = this;\n var usedModules = moduleList.map(function (arg) { return _this.getMemberName(arg.member); });\n var removableModule = this.loadedModules.filter(function (module) {\n return usedModules.indexOf(module.member) === -1;\n });\n for (var _i = 0, removableModule_1 = removableModule; _i < removableModule_1.length; _i++) {\n var mod = removableModule_1[_i];\n if (!mod.isProperty) {\n getValue(mod.member, this.parent).destroy();\n }\n this.loadedModules.splice(this.loadedModules.indexOf(mod), 1);\n deleteObject(this.parent, mod.member);\n }\n };\n /**\n * To get the name of the member.\n * @param {string} name\n * @returns {string}\n */\n ModuleLoader.prototype.getMemberName = function (name) {\n return name[0].toLowerCase() + name.substring(1) + MODULE_SUFFIX;\n };\n /**\n * Returns boolean based on whether the module specified is loaded or not\n * @param {string} modName\n * @returns {boolean}\n */\n ModuleLoader.prototype.isModuleLoaded = function (modName) {\n for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {\n var mod = _a[_i];\n if (mod.member === this.getMemberName(modName)) {\n return true;\n }\n }\n return false;\n };\n return ModuleLoader;\n}());\nexport { ModuleLoader };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { isUndefined, getValue, isNullOrUndefined, setValue, uniqueID, isBlazor } from './util';\nimport { ModuleLoader } from './module-loader';\nimport { Base } from './base';\nimport { Observer } from './observer';\nimport { ChildProperty } from './child-property';\nimport { Property, NotifyPropertyChanges } from './notify-property-change';\nimport { onIntlChange, rightToLeft, defaultCulture } from './internationalization';\nimport { createElement, addClass, removeClass, select } from './dom';\nimport { VirtualDOM } from './virtual-dom';\nimport { getRandomId } from './template-engine';\nvar componentCount = 0;\nvar lastPageID;\nvar lastHistoryLen = 0;\nexport var versionBasedStatePersistence = false;\n/**\n * To enable or disable version based statePersistence functionality for all components globally.\n * @param {boolean} status - Optional argument Specifies the status value to enable or disable versionBasedStatePersistence option.\n * @returns {void}\n */\n/* istanbul ignore next */\nexport function enableVersionBasedPersistence(status) {\n versionBasedStatePersistence = status;\n}\n/**\n * Base class for all Essential JavaScript components\n */\nvar Component = /** @class */ (function (_super) {\n __extends(Component, _super);\n /**\n * Initialize the constructor for component base\n */\n function Component(options, selector) {\n var _this = _super.call(this, options, selector) || this;\n _this.randomId = uniqueID();\n /**\n * string template option for Blazor template rendering\n * @private\n */\n _this.isStringTemplate = false;\n _this.needsID = false;\n _this.isReactHybrid = false;\n if (isNullOrUndefined(_this.enableRtl)) {\n _this.setProperties({ 'enableRtl': rightToLeft }, true);\n }\n if (isNullOrUndefined(_this.locale)) {\n _this.setProperties({ 'locale': defaultCulture }, true);\n }\n _this.moduleLoader = new ModuleLoader(_this);\n _this.localObserver = new Observer(_this);\n // tslint:disable-next-line:no-function-constructor-with-string-args\n onIntlChange.on('notifyExternalChange', _this.detectFunction, _this, _this.randomId);\n if (!isUndefined(selector)) {\n _this.appendTo();\n }\n return _this;\n }\n Component.prototype.requiredModules = function () {\n return [];\n };\n ;\n /**\n * Destroys the sub modules while destroying the widget\n */\n Component.prototype.destroy = function () {\n if (this.isDestroyed) {\n return;\n }\n if (this.enablePersistence) {\n this.setPersistData();\n }\n this.localObserver.destroy();\n if (this.refreshing) {\n return;\n }\n removeClass([this.element], ['e-control']);\n this.trigger('destroyed', { cancel: false });\n _super.prototype.destroy.call(this);\n this.moduleLoader.clean();\n onIntlChange.off('notifyExternalChange', this.detectFunction, this.randomId);\n };\n /**\n * Applies all the pending property changes and render the component again.\n */\n Component.prototype.refresh = function () {\n this.refreshing = true;\n this.moduleLoader.clean();\n this.destroy();\n this.clearChanges();\n this.localObserver = new Observer(this);\n this.preRender();\n this.injectModules();\n this.render();\n this.refreshing = false;\n };\n /* istanbul ignore next */\n Component.prototype.accessMount = function () {\n if (this.mount && !this.isReactHybrid) {\n this.mount();\n }\n };\n /**\n * Returns the route element of the component\n */\n /* istanbul ignore next */\n Component.prototype.getRootElement = function () {\n if (this.isReactHybrid) {\n return this.actualElement;\n }\n else {\n return this.element;\n }\n };\n /**\n * Returns the persistence data for component\n */\n /* istanbul ignore next */\n //tslint:disable:no-any\n Component.prototype.getLocalData = function () {\n var eleId = this.getModuleName() + this.element.id;\n if (versionBasedStatePersistence) {\n return window.localStorage.getItem(eleId + this.ej2StatePersistenceVersion);\n }\n else {\n return window.localStorage.getItem(eleId);\n }\n };\n /**\n * Appends the control within the given HTML element\n * @param {string | HTMLElement} selector - Target element where control needs to be appended\n */\n Component.prototype.appendTo = function (selector) {\n if (!isNullOrUndefined(selector) && typeof (selector) === 'string') {\n this.element = select(selector, document);\n }\n else if (!isNullOrUndefined(selector)) {\n this.element = selector;\n }\n if (!isNullOrUndefined(this.element)) {\n var moduleClass = 'e-' + this.getModuleName().toLowerCase();\n addClass([this.element], ['e-control', moduleClass]);\n this.isProtectedOnChange = false;\n if (this.needsID && !this.element.id) {\n this.element.id = this.getUniqueID(this.getModuleName());\n }\n if (this.enablePersistence) {\n this.mergePersistData();\n window.addEventListener('unload', this.setPersistData.bind(this));\n }\n var inst = getValue('ej2_instances', this.element);\n if (!inst || inst.indexOf(this) === -1) {\n _super.prototype.addInstance.call(this);\n }\n this.preRender();\n this.injectModules();\n this.render();\n if (!this.mount) {\n this.trigger('created');\n }\n else {\n this.accessMount();\n }\n }\n };\n /**\n * It is used to process the post rendering functionalities to a component.\n */\n Component.prototype.renderComplete = function (wrapperElement) {\n if (isBlazor()) {\n var sfBlazor = 'sfBlazor';\n // tslint:disable-next-line:no-any\n window[sfBlazor].renderComplete(this.element, wrapperElement);\n }\n this.isRendered = true;\n };\n /**\n * When invoked, applies the pending property changes immediately to the component.\n */\n Component.prototype.dataBind = function () {\n this.injectModules();\n _super.prototype.dataBind.call(this);\n };\n ;\n /**\n * Attach one or more event handler to the current component context.\n * It is used for internal handling event internally within the component only.\n * @param {BoundOptions[]| string} event - It is optional type either to Set the collection of event list or the eventName.\n * @param {Function} handler - optional parameter Specifies the handler to run when the event occurs\n * @param {Object} context - optional parameter Specifies the context to be bind in the handler.\n * @return {void}\n * @private\n */\n Component.prototype.on = function (event, handler, context) {\n if (typeof event === 'string') {\n this.localObserver.on(event, handler, context);\n }\n else {\n for (var _i = 0, event_1 = event; _i < event_1.length; _i++) {\n var arg = event_1[_i];\n this.localObserver.on(arg.event, arg.handler, arg.context);\n }\n }\n };\n /**\n * To remove one or more event handler that has been attached with the on() method.\n * @param {BoundOptions[]| string} event - It is optional type either to Set the collection of event list or the eventName.\n * @param {Function} handler - optional parameter Specifies the function to run when the event occurs\n * @return {void}\n * @private\n */\n Component.prototype.off = function (event, handler) {\n if (typeof event === 'string') {\n this.localObserver.off(event, handler);\n }\n else {\n for (var _i = 0, event_2 = event; _i < event_2.length; _i++) {\n var arg = event_2[_i];\n this.localObserver.off(arg.event, arg.handler);\n }\n }\n };\n /**\n * To notify the handlers in the specified event.\n * @param {string} property - Specifies the event to be notify.\n * @param {Object} argument - Additional parameters to pass while calling the handler.\n * @return {void}\n * @private\n */\n Component.prototype.notify = function (property, argument) {\n if (this.isDestroyed !== true) {\n this.localObserver.notify(property, argument);\n }\n };\n /**\n * Get injected modules\n * @private\n */\n Component.prototype.getInjectedModules = function () {\n return this.injectedModules;\n };\n ;\n /**\n * Dynamically injects the required modules to the component.\n */\n Component.Inject = function () {\n var moduleList = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n moduleList[_i] = arguments[_i];\n }\n if (!this.prototype.injectedModules) {\n this.prototype.injectedModules = [];\n }\n for (var i = 0; i < moduleList.length; i++) {\n if (this.prototype.injectedModules.indexOf(moduleList[i]) === -1) {\n this.prototype.injectedModules.push(moduleList[i]);\n }\n }\n };\n /**\n * This is a instance method to create an element.\n * @private\n */\n /* istanbul ignore next */\n //tslint:disable:no-any\n Component.prototype.createElement = function (tagName, prop, isVDOM) {\n if (isVDOM && this.isReactHybrid) {\n if (prop) {\n prop = {};\n }\n prop['data-id'] = getRandomId();\n return VirtualDOM.createElement(tagName, prop);\n }\n else {\n return createElement(tagName, prop);\n }\n };\n /**\n *\n * @param handler - handler to be triggered after state Updated.\n * @param argument - Arguments to be passed to caller.\n * @private\n */\n /* istanbul ignore next */\n //tslint:disable:no-any\n Component.prototype.triggerStateChange = function (handler, argument) {\n if (this.isReactHybrid) {\n //tslint:disable:no-any\n this.setState();\n this.currentContext = { calls: handler, args: argument };\n }\n };\n // tslint: enable: no-any\n Component.prototype.injectModules = function () {\n if (this.injectedModules && this.injectedModules.length) {\n this.moduleLoader.inject(this.requiredModules(), this.injectedModules);\n }\n };\n Component.prototype.detectFunction = function (args) {\n var prop = Object.keys(args);\n if (prop.length) {\n this[prop[0]] = args[prop[0]];\n }\n };\n Component.prototype.mergePersistData = function () {\n var data;\n if (versionBasedStatePersistence) {\n data = window.localStorage.getItem(this.getModuleName() + this.element.id + this.ej2StatePersistenceVersion);\n }\n else {\n data = window.localStorage.getItem(this.getModuleName() + this.element.id);\n }\n if (!(isNullOrUndefined(data) || (data === ''))) {\n this.setProperties(JSON.parse(data), true);\n }\n };\n Component.prototype.setPersistData = function () {\n if (!this.isDestroyed) {\n if (versionBasedStatePersistence) {\n window.localStorage.setItem(this.getModuleName() + this.element.id + this.ej2StatePersistenceVersion, this.getPersistData());\n }\n else {\n window.localStorage.setItem(this.getModuleName() + this.element.id, this.getPersistData());\n }\n }\n };\n //tslint:disable-next-line\n Component.prototype.renderReactTemplates = function () {\n //No Code\n };\n //tslint:disable-next-line\n Component.prototype.clearTemplate = function (templateName, index) {\n //No Code\n };\n Component.prototype.getUniqueID = function (definedName) {\n if (this.isHistoryChanged()) {\n componentCount = 0;\n }\n lastPageID = this.pageID(location.href);\n lastHistoryLen = history.length;\n return definedName + '_' + lastPageID + '_' + componentCount++;\n };\n Component.prototype.pageID = function (url) {\n var hash = 0;\n if (url.length === 0) {\n return hash;\n }\n for (var i = 0; i < url.length; i++) {\n var char = url.charCodeAt(i);\n hash = ((hash << 5) - hash) + char;\n hash = hash & hash; // Convert to 32bit integer\n }\n return Math.abs(hash);\n };\n Component.prototype.isHistoryChanged = function () {\n return lastPageID !== this.pageID(location.href) || lastHistoryLen !== history.length;\n };\n Component.prototype.addOnPersist = function (options) {\n var _this = this;\n var persistObj = {};\n for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {\n var key = options_1[_i];\n var objValue = void 0;\n objValue = getValue(key, this);\n if (!isUndefined(objValue)) {\n setValue(key, this.getActualProperties(objValue), persistObj);\n }\n }\n return JSON.stringify(persistObj, function (key, value) {\n return _this.getActualProperties(value);\n });\n };\n Component.prototype.getActualProperties = function (obj) {\n if (obj instanceof ChildProperty) {\n return getValue('properties', obj);\n }\n else {\n return obj;\n }\n };\n Component.prototype.ignoreOnPersist = function (options) {\n return JSON.stringify(this.iterateJsonProperties(this.properties, options));\n };\n Component.prototype.iterateJsonProperties = function (obj, ignoreList) {\n var newObj = {};\n var _loop_1 = function (key) {\n if (ignoreList.indexOf(key) === -1) {\n // tslint:disable-next-line:no-any\n var value = obj[key];\n if (typeof value === 'object' && !(value instanceof Array)) {\n var newList = ignoreList.filter(function (str) {\n return new RegExp(key + '.').test(str);\n }).map(function (str) {\n return str.replace(key + '.', '');\n });\n newObj[key] = this_1.iterateJsonProperties(this_1.getActualProperties(value), newList);\n }\n else {\n newObj[key] = value;\n }\n }\n };\n var this_1 = this;\n for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {\n var key = _a[_i];\n _loop_1(key);\n }\n return newObj;\n };\n __decorate([\n Property(false)\n ], Component.prototype, \"enablePersistence\", void 0);\n __decorate([\n Property()\n ], Component.prototype, \"enableRtl\", void 0);\n __decorate([\n Property()\n ], Component.prototype, \"locale\", void 0);\n Component = __decorate([\n NotifyPropertyChanges\n ], Component);\n return Component;\n}(Base));\nexport { Component };\n//Function handling for page navigation detection \n/* istanbul ignore next */\n(function () {\n if (typeof window !== 'undefined') {\n window.addEventListener('popstate', \n /* istanbul ignore next */\n function () {\n componentCount = 0;\n });\n }\n})();\n","import { getValue, setValue, merge, isBlazor } from './util';\nimport { Base } from './base';\n/**\n * To detect the changes for inner properties.\n * @private\n */\nvar ChildProperty = /** @class */ (function () {\n function ChildProperty(parent, propName, defaultValue, isArray) {\n this.isComplexArraySetter = false;\n this.properties = {};\n this.changedProperties = {};\n this.childChangedProperties = {};\n this.oldProperties = {};\n // tslint:disable-next-line:no-empty\n this.finalUpdate = function () { };\n this.callChildDataBind = getValue('callChildDataBind', Base);\n this.parentObj = parent;\n this.controlParent = this.parentObj.controlParent || this.parentObj;\n this.propName = propName;\n this.isParentArray = isArray;\n this.setProperties(defaultValue, true);\n }\n /**\n * Updates the property changes\n * @param {boolean} val\n * @param {string} propName\n * @returns {void}\n */\n ChildProperty.prototype.updateChange = function (val, propName) {\n if (val === true) {\n this.parentObj.childChangedProperties[propName] = val;\n }\n else {\n delete this.parentObj.childChangedProperties[propName];\n }\n if (this.parentObj.updateChange) {\n this.parentObj.updateChange(val, this.parentObj.propName);\n }\n };\n /**\n * Updates time out duration\n */\n ChildProperty.prototype.updateTimeOut = function () {\n if (this.parentObj.updateTimeOut) {\n this.parentObj.finalUpdate();\n this.parentObj.updateTimeOut();\n }\n else {\n var changeTime_1 = setTimeout(this.parentObj.dataBind.bind(this.parentObj));\n var clearUpdate = function () {\n clearTimeout(changeTime_1);\n };\n this.finalUpdate = clearUpdate;\n }\n };\n /**\n * Clears changed properties\n */\n ChildProperty.prototype.clearChanges = function () {\n this.finalUpdate();\n this.updateChange(false, this.propName);\n this.oldProperties = {};\n this.changedProperties = {};\n };\n /**\n * Set property changes\n * @param {Object} prop\n * @param {boolean} muteOnChange\n * {void}\n */\n ChildProperty.prototype.setProperties = function (prop, muteOnChange) {\n if (muteOnChange === true) {\n merge(this, prop);\n this.updateChange(false, this.propName);\n this.clearChanges();\n }\n else {\n merge(this, prop);\n }\n };\n /**\n * Binds data\n */\n ChildProperty.prototype.dataBind = function () {\n this.callChildDataBind(this.childChangedProperties, this);\n if (this.isParentArray) {\n var curIndex = this.parentObj[this.propName].indexOf(this);\n if (Object.keys(this.changedProperties).length) {\n setValue(this.propName + '.' + curIndex, this.changedProperties, this.parentObj.changedProperties);\n setValue(this.propName + '.' + curIndex, this.oldProperties, this.parentObj.oldProperties);\n }\n }\n else {\n this.parentObj.changedProperties[this.propName] = this.changedProperties;\n this.parentObj.oldProperties[this.propName] = this.oldProperties;\n }\n this.clearChanges();\n };\n /**\n * Saves changes to newer values\n * @param {string} key\n * @param {Object} newValue\n * @param {Object} oldValue\n * @returns {void}\n */\n ChildProperty.prototype.saveChanges = function (key, newValue, oldValue, restrictServerDataBind) {\n if (this.controlParent.isProtectedOnChange) {\n return;\n }\n if (!restrictServerDataBind) {\n this.serverDataBind(key, newValue, true);\n }\n this.oldProperties[key] = oldValue;\n this.changedProperties[key] = newValue;\n this.updateChange(true, this.propName);\n this.finalUpdate();\n this.updateTimeOut();\n };\n ChildProperty.prototype.serverDataBind = function (key, value, isSaveChanges, action) {\n if (isBlazor() && !this.parentObj.isComplexArraySetter) {\n // tslint:disable-next-line:no-any\n var parent_1;\n var newChanges = {};\n var parentKey = isSaveChanges ? this.getParentKey(true) + '.' + key : key;\n /* istanbul ignore else */\n if (parentKey.indexOf('.') !== -1) {\n var complexKeys = parentKey.split('.');\n parent_1 = newChanges;\n for (var i = 0; i < complexKeys.length; i++) {\n var isFinal = i === complexKeys.length - 1;\n parent_1[complexKeys[i]] = isFinal ? value : {};\n parent_1 = isFinal ? parent_1 : parent_1[complexKeys[i]];\n }\n }\n else {\n newChanges[parentKey] = {};\n parent_1 = newChanges[parentKey];\n newChanges[parentKey][key] = value;\n }\n /* istanbul ignore next */\n if (this.isParentArray) {\n var actionProperty = 'ejsAction';\n parent_1[actionProperty] = action ? action : 'none';\n }\n this.controlParent.serverDataBind(newChanges);\n }\n };\n ChildProperty.prototype.getParentKey = function (isSaveChanges) {\n // tslint:disable-next-line:no-any\n var index = '';\n var propName = this.propName;\n /* istanbul ignore next */\n if (this.isParentArray) {\n index = this.parentObj[this.propName].indexOf(this);\n var valueLength = this.parentObj[this.propName].length;\n valueLength = isSaveChanges ? valueLength : (valueLength > 0 ? valueLength - 1 : 0);\n index = index !== -1 ? '-' + index : '-' + valueLength;\n propName = propName + index;\n }\n if (this.controlParent !== this.parentObj) {\n propName = this.parentObj.getParentKey() + '.' + this.propName + index;\n }\n return propName;\n };\n return ChildProperty;\n}());\nexport { ChildProperty };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Base } from './base';\nimport { Browser } from './browser';\nimport { isVisible } from './dom';\nimport { Property, Complex, NotifyPropertyChanges, Event } from './notify-property-change';\nimport { EventHandler } from './event-handler';\nimport { ChildProperty } from './child-property';\nimport { select, closest, setStyleAttribute, addClass, createElement } from './dom';\nimport { extend, isUndefined, isNullOrUndefined, compareElementParent, isBlazor } from './util';\nvar defaultPosition = { left: 0, top: 0, bottom: 0, right: 0 };\nvar positionProp = ['offsetLeft', 'offsetTop'];\nvar axisMapper = ['x', 'y'];\nvar axisValueMapper = ['left', 'top'];\nvar isDraggedObject = { isDragged: false };\n/**\n * Specifies the position coordinates\n */\nvar Position = /** @class */ (function (_super) {\n __extends(Position, _super);\n function Position() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(0)\n ], Position.prototype, \"left\", void 0);\n __decorate([\n Property(0)\n ], Position.prototype, \"top\", void 0);\n return Position;\n}(ChildProperty));\nexport { Position };\n/**\n * Draggable Module provides support to enable draggable functionality in Dom Elements.\n * ```html\n *
Draggable
\n * \n * ```\n */\nvar Draggable = /** @class */ (function (_super) {\n __extends(Draggable, _super);\n function Draggable(element, options) {\n var _this = _super.call(this, options, element) || this;\n _this.dragLimit = Draggable_1.getDefaultPosition();\n _this.borderWidth = Draggable_1.getDefaultPosition();\n _this.padding = Draggable_1.getDefaultPosition();\n _this.diffX = 0;\n _this.prevLeft = 0;\n _this.prevTop = 0;\n _this.dragProcessStarted = false;\n /* tslint:disable no-any */\n _this.tapHoldTimer = 0;\n _this.externalInitialize = false;\n _this.diffY = 0;\n _this.parentScrollX = 0;\n _this.parentScrollY = 0;\n _this.droppables = {};\n _this.bind();\n return _this;\n }\n Draggable_1 = Draggable;\n Draggable.prototype.bind = function () {\n this.toggleEvents();\n if (Browser.isIE) {\n addClass([this.element], 'e-block-touch');\n }\n this.droppables[this.scope] = {};\n };\n Draggable.getDefaultPosition = function () {\n return extend({}, defaultPosition);\n };\n Draggable.prototype.toggleEvents = function (isUnWire) {\n var ele;\n if (!isUndefined(this.handle)) {\n ele = select(this.handle, this.element);\n }\n var handler = (this.enableTapHold && Browser.isDevice && Browser.isTouch) ? this.mobileInitialize : this.initialize;\n if (isUnWire) {\n EventHandler.remove(ele || this.element, Browser.touchStartEvent, handler);\n }\n else {\n EventHandler.add(ele || this.element, Browser.touchStartEvent, handler, this);\n }\n };\n /* istanbul ignore next */\n Draggable.prototype.mobileInitialize = function (evt) {\n var _this = this;\n var target = evt.currentTarget;\n this.tapHoldTimer = setTimeout(function () {\n _this.externalInitialize = true;\n _this.removeTapholdTimer();\n _this.initialize(evt, target);\n }, this.tapHoldThreshold);\n EventHandler.add(document, Browser.touchMoveEvent, this.removeTapholdTimer, this);\n EventHandler.add(document, Browser.touchEndEvent, this.removeTapholdTimer, this);\n };\n /* istanbul ignore next */\n Draggable.prototype.removeTapholdTimer = function () {\n clearTimeout(this.tapHoldTimer);\n EventHandler.remove(document, Browser.touchMoveEvent, this.removeTapholdTimer);\n EventHandler.remove(document, Browser.touchEndEvent, this.removeTapholdTimer);\n };\n /* istanbul ignore next */\n Draggable.prototype.getScrollableParent = function (element, axis) {\n var scroll = { 'vertical': 'scrollHeight', 'horizontal': 'scrollWidth' };\n var client = { 'vertical': 'clientHeight', 'horizontal': 'clientWidth' };\n if (isNullOrUndefined(element)) {\n return null;\n }\n if (element[scroll[axis]] > element[client[axis]]) {\n if (axis === 'vertical' ? element.scrollTop > 0 : element.scrollLeft > 0) {\n if (axis === 'vertical') {\n this.parentScrollY = this.parentScrollY +\n (this.parentScrollY === 0 ? element.scrollTop : element.scrollTop - this.parentScrollY);\n this.tempScrollHeight = element.scrollHeight;\n }\n else {\n this.parentScrollX = this.parentScrollX +\n (this.parentScrollX === 0 ? element.scrollLeft : element.scrollLeft - this.parentScrollX);\n this.tempScrollWidth = element.scrollWidth;\n }\n if (!isNullOrUndefined(element)) {\n return this.getScrollableParent(element.parentNode, axis);\n }\n else {\n return element;\n }\n }\n else {\n return this.getScrollableParent(element.parentNode, axis);\n }\n }\n else {\n return this.getScrollableParent(element.parentNode, axis);\n }\n };\n Draggable.prototype.getScrollableValues = function () {\n this.parentScrollX = 0;\n this.parentScrollY = 0;\n var isModalDialog = this.element.classList.contains('e-dialog') && this.element.classList.contains('e-dlg-modal');\n var verticalScrollParent = this.getScrollableParent(this.element.parentNode, 'vertical');\n var horizontalScrollParent = this.getScrollableParent(this.element.parentNode, 'horizontal');\n };\n Draggable.prototype.initialize = function (evt, curTarget) {\n this.currentStateTarget = evt.target;\n if (this.isDragStarted()) {\n return;\n }\n else {\n this.isDragStarted(true);\n this.externalInitialize = false;\n }\n this.target = (evt.currentTarget || curTarget);\n this.dragProcessStarted = false;\n if (this.abort) {\n /* tslint:disable no-any */\n var abortSelectors = this.abort;\n if (typeof abortSelectors === 'string') {\n abortSelectors = [abortSelectors];\n }\n for (var i = 0; i < abortSelectors.length; i++) {\n if (!isNullOrUndefined(closest(evt.target, abortSelectors[i]))) {\n /* istanbul ignore next */\n if (this.isDragStarted()) {\n this.isDragStarted(true);\n }\n return;\n }\n }\n }\n if (this.preventDefault && !isUndefined(evt.changedTouches) && evt.type !== 'touchstart') {\n evt.preventDefault();\n }\n this.element.setAttribute('aria-grabbed', 'true');\n var intCoord = this.getCoordinates(evt);\n this.initialPosition = { x: intCoord.pageX, y: intCoord.pageY };\n if (!this.clone) {\n var pos = this.element.getBoundingClientRect();\n this.getScrollableValues();\n if (evt.clientX === evt.pageX) {\n this.parentScrollX = 0;\n }\n if (evt.clientY === evt.pageY) {\n this.parentScrollY = 0;\n }\n this.relativeXPosition = intCoord.pageX - (pos.left + this.parentScrollX);\n this.relativeYPosition = intCoord.pageY - (pos.top + this.parentScrollY);\n }\n if (this.externalInitialize) {\n this.intDragStart(evt);\n }\n else {\n EventHandler.add(document, Browser.touchMoveEvent, this.intDragStart, this);\n EventHandler.add(document, Browser.touchEndEvent, this.intDestroy, this);\n }\n this.toggleEvents(true);\n if (evt.type !== 'touchstart' && this.isPreventSelect) {\n document.body.classList.add('e-prevent-select');\n }\n this.externalInitialize = false;\n EventHandler.trigger(document.documentElement, Browser.touchStartEvent, evt);\n };\n Draggable.prototype.intDragStart = function (evt) {\n this.removeTapholdTimer();\n var isChangeTouch = !isUndefined(evt.changedTouches);\n if (isChangeTouch && (evt.changedTouches.length !== 1)) {\n return;\n }\n if (isChangeTouch) {\n evt.preventDefault();\n }\n var intCordinate = this.getCoordinates(evt);\n var pos;\n var styleProp = getComputedStyle(this.element);\n this.margin = {\n left: parseInt(styleProp.marginLeft, 10),\n top: parseInt(styleProp.marginTop, 10),\n right: parseInt(styleProp.marginRight, 10),\n bottom: parseInt(styleProp.marginBottom, 10),\n };\n var element = this.element;\n if (this.clone && this.dragTarget) {\n var intClosest = closest(evt.target, this.dragTarget);\n if (!isNullOrUndefined(intClosest)) {\n element = intClosest;\n }\n }\n /* istanbul ignore next */\n if (this.isReplaceDragEle) {\n element = this.currentStateCheck(evt.target, element);\n }\n this.offset = this.calculateParentPosition(element);\n this.position = this.getMousePosition(evt, this.isDragScroll);\n var x = this.initialPosition.x - intCordinate.pageX;\n var y = this.initialPosition.y - intCordinate.pageY;\n var distance = Math.sqrt((x * x) + (y * y));\n if ((distance >= this.distance || this.externalInitialize)) {\n var ele = this.getHelperElement(evt);\n if (!ele || isNullOrUndefined(ele)) {\n return;\n }\n var dragTargetElement = this.helperElement = ele;\n this.parentClientRect = this.calculateParentPosition(dragTargetElement.offsetParent);\n if (this.dragStart) {\n var curTarget = this.getProperTargetElement(evt);\n var args = {\n event: evt,\n element: element,\n target: curTarget,\n bindEvents: isBlazor() ? this.bindDragEvents.bind(this) : null,\n dragElement: dragTargetElement\n };\n this.trigger('dragStart', args);\n }\n if (this.dragArea) {\n this.setDragArea();\n }\n else {\n this.dragLimit = { left: 0, right: 0, bottom: 0, top: 0 };\n this.borderWidth = { top: 0, left: 0 };\n }\n pos = { left: this.position.left - this.parentClientRect.left, top: this.position.top - this.parentClientRect.top };\n if (this.clone && !this.enableTailMode) {\n this.diffX = this.position.left - this.offset.left;\n this.diffY = this.position.top - this.offset.top;\n }\n this.getScrollableValues();\n // when drag element has margin-top\n var styles = getComputedStyle(element);\n var marginTop = parseFloat(styles.marginTop);\n /* istanbul ignore next */\n if (this.clone && marginTop !== 0) {\n pos.top += marginTop;\n }\n var posValue = this.getProcessedPositionValue({\n top: (pos.top - this.diffY) + 'px',\n left: (pos.left - this.diffX) + 'px'\n });\n this.dragElePosition = { top: pos.top, left: pos.left };\n setStyleAttribute(dragTargetElement, this.getDragPosition({ position: 'absolute', left: posValue.left, top: posValue.top }));\n EventHandler.remove(document, Browser.touchMoveEvent, this.intDragStart);\n EventHandler.remove(document, Browser.touchEndEvent, this.intDestroy);\n if (!isBlazor()) {\n this.bindDragEvents(dragTargetElement);\n }\n }\n };\n Draggable.prototype.bindDragEvents = function (dragTargetElement) {\n if (isVisible(dragTargetElement)) {\n EventHandler.add(document, Browser.touchMoveEvent, this.intDrag, this);\n EventHandler.add(document, Browser.touchEndEvent, this.intDragStop, this);\n this.setGlobalDroppables(false, this.element, dragTargetElement);\n }\n else {\n this.toggleEvents();\n document.body.classList.remove('e-prevent-select');\n }\n };\n Draggable.prototype.elementInViewport = function (el) {\n this.top = el.offsetTop;\n this.left = el.offsetLeft;\n this.width = el.offsetWidth;\n this.height = el.offsetHeight;\n while (el.offsetParent) {\n el = el.offsetParent;\n this.top += el.offsetTop;\n this.left += el.offsetLeft;\n }\n return (this.top >= window.pageYOffset &&\n this.left >= window.pageXOffset &&\n (this.top + this.height) <= (window.pageYOffset + window.innerHeight) &&\n (this.left + this.width) <= (window.pageXOffset + window.innerWidth));\n };\n Draggable.prototype.getProcessedPositionValue = function (value) {\n if (this.queryPositionInfo) {\n return this.queryPositionInfo(value);\n }\n return value;\n };\n Draggable.prototype.calculateParentPosition = function (ele) {\n if (isNullOrUndefined(ele)) {\n return { left: 0, top: 0 };\n }\n var rect = ele.getBoundingClientRect();\n var style = getComputedStyle(ele);\n return {\n left: (rect.left + window.pageXOffset) - parseInt(style.marginLeft, 10),\n top: (rect.top + window.pageYOffset) - parseInt(style.marginTop, 10)\n };\n };\n // tslint:disable-next-line:max-func-body-length\n Draggable.prototype.intDrag = function (evt) {\n if (!isUndefined(evt.changedTouches) && (evt.changedTouches.length !== 1)) {\n return;\n }\n var left;\n var top;\n this.position = this.getMousePosition(evt, this.isDragScroll);\n var docHeight = this.getDocumentWidthHeight('Height');\n if (docHeight < this.position.top) {\n this.position.top = docHeight;\n }\n var docWidth = this.getDocumentWidthHeight('Width');\n if (docWidth < this.position.left) {\n this.position.left = docWidth;\n }\n if (this.drag) {\n var curTarget = this.getProperTargetElement(evt);\n this.trigger('drag', { event: evt, element: this.element, target: curTarget });\n }\n var eleObj = this.checkTargetElement(evt);\n if (eleObj.target && eleObj.instance) {\n /* tslint:disable no-any */\n var flag = true;\n if (this.hoverObject) {\n if (this.hoverObject.instance !== eleObj.instance) {\n this.triggerOutFunction(evt, eleObj);\n }\n else {\n flag = false;\n }\n }\n if (flag) {\n eleObj.instance.dragData[this.scope] = this.droppables[this.scope];\n eleObj.instance.intOver(evt, eleObj.target);\n this.hoverObject = eleObj;\n }\n }\n else if (this.hoverObject) {\n this.triggerOutFunction(evt, eleObj);\n }\n var helperElement = this.droppables[this.scope].helper;\n this.parentClientRect = this.calculateParentPosition(this.helperElement.offsetParent);\n var tLeft = this.parentClientRect.left;\n var tTop = this.parentClientRect.top;\n var intCoord = this.getCoordinates(evt);\n var pagex = intCoord.pageX;\n var pagey = intCoord.pageY;\n var dLeft = this.position.left - this.diffX;\n var dTop = this.position.top - this.diffY;\n var styles = getComputedStyle(helperElement);\n var marginTop = parseFloat(styles.marginTop);\n if (this.dragArea) {\n if (this.pageX !== pagex || this.skipDistanceCheck) {\n var helperWidth = helperElement.offsetWidth + (parseFloat(styles.marginLeft)\n + parseFloat(styles.marginRight));\n if (this.dragLimit.left > dLeft && dLeft > 0) {\n left = this.dragLimit.left;\n }\n else if (this.dragLimit.right + window.pageXOffset < dLeft + helperWidth && dLeft > 0) {\n left = dLeft - (dLeft - this.dragLimit.right) + window.pageXOffset - helperWidth;\n }\n else {\n left = dLeft < 0 ? this.dragLimit.left : dLeft;\n }\n }\n if (this.pageY !== pagey || this.skipDistanceCheck) {\n var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop)\n + parseFloat(styles.marginBottom));\n if (this.dragLimit.top > dTop && dTop > 0) {\n top = this.dragLimit.top;\n }\n else if (this.dragLimit.bottom + window.pageYOffset < dTop + helperHeight && dTop > 0) {\n top = dTop - (dTop - this.dragLimit.bottom) + window.pageYOffset - helperHeight;\n }\n else {\n top = dTop < 0 ? this.dragLimit.top : dTop;\n }\n }\n }\n else {\n left = dLeft;\n top = dTop;\n }\n var iTop = tTop + this.borderWidth.top;\n var iLeft = tLeft + this.borderWidth.left;\n if (this.dragProcessStarted) {\n if (isNullOrUndefined(top)) {\n top = this.prevTop;\n }\n if (isNullOrUndefined(left)) {\n left = this.prevLeft;\n }\n }\n var draEleTop;\n var draEleLeft;\n if (this.dragArea) {\n this.dragLimit.top = this.clone ? this.dragLimit.top : 0;\n draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);\n draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);\n // when drag-element has margin-top\n /* istanbul ignore next */\n if (marginTop > 0) {\n if (this.clone) {\n draEleTop += this.element.offsetTop;\n if (dTop < 0) {\n if ((this.element.offsetTop + dTop) >= 0) {\n draEleTop = this.element.offsetTop + dTop;\n }\n else {\n draEleTop -= this.element.offsetTop;\n }\n }\n draEleTop = (this.dragLimit.bottom < draEleTop) ? this.dragLimit.bottom : draEleTop;\n }\n if ((top - iTop) < 0) {\n if (dTop + marginTop + (helperElement.offsetHeight - iTop) >= 0) {\n var tempDraEleTop = this.dragLimit.top + dTop - iTop;\n if ((tempDraEleTop + marginTop + iTop) < 0) {\n draEleTop -= marginTop + iTop;\n }\n else {\n draEleTop = tempDraEleTop;\n }\n }\n else {\n draEleTop -= marginTop + iTop;\n }\n }\n }\n }\n else {\n draEleTop = top - iTop;\n draEleLeft = left - iLeft;\n }\n var dragValue = this.getProcessedPositionValue({ top: draEleTop + 'px', left: draEleLeft + 'px' });\n setStyleAttribute(helperElement, this.getDragPosition(dragValue));\n if (!this.elementInViewport(helperElement) && this.enableAutoScroll) {\n this.helperElement.scrollIntoView();\n }\n this.dragProcessStarted = true;\n this.prevLeft = left;\n this.prevTop = top;\n this.position.left = left;\n this.position.top = top;\n this.pageX = pagex;\n this.pageY = pagey;\n };\n Draggable.prototype.triggerOutFunction = function (evt, eleObj) {\n this.hoverObject.instance.intOut(evt, eleObj.target);\n this.hoverObject.instance.dragData[this.scope] = null;\n this.hoverObject = null;\n };\n Draggable.prototype.getDragPosition = function (dragValue) {\n var temp = extend({}, dragValue);\n if (this.axis) {\n if (this.axis === 'x') {\n delete temp.top;\n }\n else if (this.axis === 'y') {\n delete temp.left;\n }\n }\n return temp;\n };\n Draggable.prototype.getDocumentWidthHeight = function (str) {\n var docBody = document.body;\n var docEle = document.documentElement;\n var returnValue = Math.max(docBody['scroll' + str], docEle['scroll' + str], docBody['offset' + str], docEle['offset' + str], docEle['client' + str]);\n return returnValue;\n };\n Draggable.prototype.intDragStop = function (evt) {\n this.dragProcessStarted = false;\n if (!isUndefined(evt.changedTouches) && (evt.changedTouches.length !== 1)) {\n return;\n }\n var type = ['touchend', 'pointerup', 'mouseup'];\n if (type.indexOf(evt.type) !== -1) {\n if (this.dragStop) {\n var curTarget = this.getProperTargetElement(evt);\n this.trigger('dragStop', { event: evt, element: this.element, target: curTarget, helper: this.helperElement });\n }\n this.intDestroy(evt);\n }\n else {\n this.element.setAttribute('aria-grabbed', 'false');\n }\n var eleObj = this.checkTargetElement(evt);\n if (eleObj.target && eleObj.instance) {\n eleObj.instance.dragStopCalled = true;\n eleObj.instance.dragData[this.scope] = this.droppables[this.scope];\n eleObj.instance.intDrop(evt, eleObj.target);\n }\n this.setGlobalDroppables(true);\n document.body.classList.remove('e-prevent-select');\n };\n /**\n * @private\n */\n Draggable.prototype.intDestroy = function (evt) {\n this.dragProcessStarted = false;\n this.toggleEvents();\n document.body.classList.remove('e-prevent-select');\n this.element.setAttribute('aria-grabbed', 'false');\n EventHandler.remove(document, Browser.touchMoveEvent, this.intDragStart);\n EventHandler.remove(document, Browser.touchEndEvent, this.intDragStop);\n EventHandler.remove(document, Browser.touchEndEvent, this.intDestroy);\n EventHandler.remove(document, Browser.touchMoveEvent, this.intDrag);\n if (this.isDragStarted()) {\n this.isDragStarted(true);\n }\n };\n // triggers when property changed\n Draggable.prototype.onPropertyChanged = function (newProp, oldProp) {\n //No Code to handle\n };\n Draggable.prototype.getModuleName = function () {\n return 'draggable';\n };\n Draggable.prototype.isDragStarted = function (change) {\n if (change) {\n isDraggedObject.isDragged = !isDraggedObject.isDragged;\n }\n return isDraggedObject.isDragged;\n };\n Draggable.prototype.setDragArea = function () {\n var eleWidthBound;\n var eleHeightBound;\n var top = 0;\n var left = 0;\n var ele;\n var type = typeof this.dragArea;\n if (type === 'string') {\n ele = select(this.dragArea);\n }\n else {\n ele = this.dragArea;\n }\n if (ele) {\n var elementArea = ele.getBoundingClientRect();\n eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;\n eleHeightBound = ele.scrollHeight ? ele.scrollHeight : elementArea.bottom - elementArea.top;\n var keys = ['Top', 'Left', 'Bottom', 'Right'];\n var styles = getComputedStyle(ele);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var tborder = styles['border' + key + 'Width'];\n var tpadding = styles['padding' + key];\n var lowerKey = key.toLowerCase();\n this.borderWidth[lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);\n this.padding[lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);\n }\n top = elementArea.top;\n left = elementArea.left;\n this.dragLimit.left = left + this.borderWidth.left + this.padding.left;\n this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;\n this.dragLimit.right = left + eleWidthBound - (this.borderWidth.right + this.padding.right);\n this.dragLimit.bottom = top + eleHeightBound - (this.borderWidth.bottom + this.padding.bottom);\n }\n };\n Draggable.prototype.getProperTargetElement = function (evt) {\n var intCoord = this.getCoordinates(evt);\n var ele;\n var prevStyle = this.helperElement.style.pointerEvents || '';\n if (compareElementParent(evt.target, this.helperElement) || evt.type.indexOf('touch') !== -1) {\n this.helperElement.style.pointerEvents = 'none';\n ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);\n this.helperElement.style.pointerEvents = prevStyle;\n }\n else {\n ele = evt.target;\n }\n return ele;\n };\n /* istanbul ignore next */\n Draggable.prototype.currentStateCheck = function (ele, oldEle) {\n var elem;\n if (!isNullOrUndefined(this.currentStateTarget) && this.currentStateTarget !== ele) {\n elem = this.currentStateTarget;\n }\n else {\n elem = !isNullOrUndefined(oldEle) ? oldEle : ele;\n }\n return elem;\n };\n Draggable.prototype.getMousePosition = function (evt, isdragscroll) {\n /* tslint:disable no-any */\n var dragEle = evt.srcElement !== undefined ? evt.srcElement : evt.target;\n var intCoord = this.getCoordinates(evt);\n var pageX;\n var pageY;\n var isOffsetParent = isNullOrUndefined(dragEle.offsetParent);\n /* istanbul ignore next */\n if (isdragscroll) {\n pageX = this.clone ? intCoord.pageX :\n (intCoord.pageX + (isOffsetParent ? 0 : dragEle.offsetParent.scrollLeft)) - this.relativeXPosition;\n pageY = this.clone ? intCoord.pageY :\n (intCoord.pageY + (isOffsetParent ? 0 : dragEle.offsetParent.scrollTop)) - this.relativeYPosition;\n }\n else {\n pageX = this.clone ? intCoord.pageX : (intCoord.pageX + window.pageXOffset) - this.relativeXPosition;\n pageY = this.clone ? intCoord.pageY : (intCoord.pageY + window.pageYOffset) - this.relativeYPosition;\n }\n if (!this.clone) {\n this.getScrollableValues();\n pageY -= this.tempScrollHeight ? this.parentScrollY : 0;\n pageX -= this.tempScrollWidth ? this.parentScrollY : 0;\n }\n return {\n left: pageX - (this.margin.left + this.cursorAt.left),\n top: pageY - (this.margin.top + this.cursorAt.top)\n };\n };\n Draggable.prototype.getCoordinates = function (evt) {\n if (evt.type.indexOf('touch') > -1) {\n return evt.changedTouches[0];\n }\n return evt;\n };\n Draggable.prototype.getHelperElement = function (evt) {\n var element;\n if (this.clone) {\n if (this.helper) {\n element = this.helper({ sender: evt, element: this.target });\n }\n else {\n element = createElement('div', { className: 'e-drag-helper e-block-touch', innerHTML: 'Draggable' });\n document.body.appendChild(element);\n }\n }\n else {\n element = this.element;\n }\n return element;\n };\n Draggable.prototype.setGlobalDroppables = function (reset, drag, helper) {\n this.droppables[this.scope] = reset ? null : {\n draggable: drag,\n helper: helper,\n draggedElement: this.element\n };\n };\n Draggable.prototype.checkTargetElement = function (evt) {\n var target = this.getProperTargetElement(evt);\n var dropIns = this.getDropInstance(target);\n if (!dropIns && target && !isNullOrUndefined(target.parentNode)) {\n var parent_1 = closest(target.parentNode, '.e-droppable') || target.parentElement;\n if (parent_1) {\n dropIns = this.getDropInstance(parent_1);\n }\n }\n return { target: target, instance: dropIns };\n };\n Draggable.prototype.getDropInstance = function (ele) {\n var name = 'getModuleName';\n var drop;\n var eleInst = ele && ele.ej2_instances;\n if (eleInst) {\n for (var _i = 0, eleInst_1 = eleInst; _i < eleInst_1.length; _i++) {\n var inst = eleInst_1[_i];\n if (inst[name]() === 'droppable') {\n drop = inst;\n break;\n }\n }\n }\n return drop;\n };\n Draggable.prototype.destroy = function () {\n this.toggleEvents(true);\n _super.prototype.destroy.call(this);\n };\n var Draggable_1;\n __decorate([\n Complex({}, Position)\n ], Draggable.prototype, \"cursorAt\", void 0);\n __decorate([\n Property(true)\n ], Draggable.prototype, \"clone\", void 0);\n __decorate([\n Property()\n ], Draggable.prototype, \"dragArea\", void 0);\n __decorate([\n Property()\n ], Draggable.prototype, \"isDragScroll\", void 0);\n __decorate([\n Property()\n ], Draggable.prototype, \"isReplaceDragEle\", void 0);\n __decorate([\n Property(true)\n ], Draggable.prototype, \"isPreventSelect\", void 0);\n __decorate([\n Event()\n ], Draggable.prototype, \"drag\", void 0);\n __decorate([\n Event()\n ], Draggable.prototype, \"dragStart\", void 0);\n __decorate([\n Event()\n ], Draggable.prototype, \"dragStop\", void 0);\n __decorate([\n Property(1)\n ], Draggable.prototype, \"distance\", void 0);\n __decorate([\n Property()\n ], Draggable.prototype, \"handle\", void 0);\n __decorate([\n Property()\n ], Draggable.prototype, \"abort\", void 0);\n __decorate([\n Property()\n ], Draggable.prototype, \"helper\", void 0);\n __decorate([\n Property('default')\n ], Draggable.prototype, \"scope\", void 0);\n __decorate([\n Property('')\n ], Draggable.prototype, \"dragTarget\", void 0);\n __decorate([\n Property()\n ], Draggable.prototype, \"axis\", void 0);\n __decorate([\n Property()\n ], Draggable.prototype, \"queryPositionInfo\", void 0);\n __decorate([\n Property(false)\n ], Draggable.prototype, \"enableTailMode\", void 0);\n __decorate([\n Property(false)\n ], Draggable.prototype, \"skipDistanceCheck\", void 0);\n __decorate([\n Property(true)\n ], Draggable.prototype, \"preventDefault\", void 0);\n __decorate([\n Property(false)\n ], Draggable.prototype, \"enableAutoScroll\", void 0);\n __decorate([\n Property(false)\n ], Draggable.prototype, \"enableTapHold\", void 0);\n __decorate([\n Property(750)\n ], Draggable.prototype, \"tapHoldThreshold\", void 0);\n Draggable = Draggable_1 = __decorate([\n NotifyPropertyChanges\n ], Draggable);\n return Draggable;\n}(Base));\nexport { Draggable };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Base } from './base';\nimport { Browser } from './browser';\nimport { isVisible, matches } from './dom';\nimport { Property, NotifyPropertyChanges, Event } from './notify-property-change';\nimport { EventHandler } from './event-handler';\nimport { compareElementParent } from './util';\n/**\n * Droppable Module provides support to enable droppable functionality in Dom Elements.\n * ```html\n *
Droppable
\n * \n * ```\n */\nvar Droppable = /** @class */ (function (_super) {\n __extends(Droppable, _super);\n function Droppable(element, options) {\n var _this = _super.call(this, options, element) || this;\n _this.mouseOver = false;\n _this.dragData = {};\n _this.dragStopCalled = false;\n _this.bind();\n return _this;\n }\n Droppable.prototype.bind = function () {\n this.wireEvents();\n };\n Droppable.prototype.wireEvents = function () {\n EventHandler.add(this.element, Browser.touchEndEvent, this.intDrop, this);\n };\n // triggers when property changed\n Droppable.prototype.onPropertyChanged = function (newProp, oldProp) {\n //No Code to handle\n };\n Droppable.prototype.getModuleName = function () {\n return 'droppable';\n };\n Droppable.prototype.intOver = function (event, element) {\n if (!this.mouseOver) {\n var drag = this.dragData[this.scope];\n this.trigger('over', { event: event, target: element, dragData: drag });\n this.mouseOver = true;\n }\n };\n Droppable.prototype.intOut = function (event, element) {\n if (this.mouseOver) {\n this.trigger('out', { evt: event, target: element });\n this.mouseOver = false;\n }\n };\n Droppable.prototype.intDrop = function (evt, element) {\n if (!this.dragStopCalled) {\n return;\n }\n else {\n this.dragStopCalled = false;\n }\n var accept = true;\n var drag = this.dragData[this.scope];\n var isDrag = drag ? (drag.helper && isVisible(drag.helper)) : false;\n var area;\n if (isDrag) {\n area = this.isDropArea(evt, drag.helper, element);\n if (this.accept) {\n accept = matches(drag.helper, this.accept);\n }\n }\n if (isDrag && this.drop && area.canDrop && accept) {\n this.trigger('drop', { event: evt, target: area.target, droppedElement: drag.helper, dragData: drag });\n }\n this.mouseOver = false;\n };\n Droppable.prototype.isDropArea = function (evt, helper, element) {\n var area = { canDrop: true, target: element || evt.target };\n var isTouch = evt.type === 'touchend';\n if (isTouch || area.target === helper) {\n helper.style.display = 'none';\n var coord = isTouch ? (evt.changedTouches[0]) : evt;\n var ele = document.elementFromPoint(coord.clientX, coord.clientY);\n area.canDrop = false;\n area.canDrop = compareElementParent(ele, this.element);\n if (area.canDrop) {\n area.target = ele;\n }\n helper.style.display = '';\n }\n return area;\n };\n Droppable.prototype.destroy = function () {\n EventHandler.remove(this.element, Browser.touchEndEvent, this.intDrop);\n _super.prototype.destroy.call(this);\n };\n __decorate([\n Property()\n ], Droppable.prototype, \"accept\", void 0);\n __decorate([\n Property('default')\n ], Droppable.prototype, \"scope\", void 0);\n __decorate([\n Event()\n ], Droppable.prototype, \"drop\", void 0);\n __decorate([\n Event()\n ], Droppable.prototype, \"over\", void 0);\n __decorate([\n Event()\n ], Droppable.prototype, \"out\", void 0);\n Droppable = __decorate([\n NotifyPropertyChanges\n ], Droppable);\n return Droppable;\n}(Base));\nexport { Droppable };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Property, NotifyPropertyChanges, Event } from './notify-property-change';\nimport { Base } from './base';\nvar keyCode = {\n 'backspace': 8,\n 'tab': 9,\n 'enter': 13,\n 'shift': 16,\n 'control': 17,\n 'alt': 18,\n 'pause': 19,\n 'capslock': 20,\n 'space': 32,\n 'escape': 27,\n 'pageup': 33,\n 'pagedown': 34,\n 'end': 35,\n 'home': 36,\n 'leftarrow': 37,\n 'uparrow': 38,\n 'rightarrow': 39,\n 'downarrow': 40,\n 'insert': 45,\n 'delete': 46,\n 'f1': 112,\n 'f2': 113,\n 'f3': 114,\n 'f4': 115,\n 'f5': 116,\n 'f6': 117,\n 'f7': 118,\n 'f8': 119,\n 'f9': 120,\n 'f10': 121,\n 'f11': 122,\n 'f12': 123,\n 'semicolon': 186,\n 'plus': 187,\n 'comma': 188,\n 'minus': 189,\n 'dot': 190,\n 'forwardslash': 191,\n 'graveaccent': 192,\n 'openbracket': 219,\n 'backslash': 220,\n 'closebracket': 221,\n 'singlequote': 222\n};\n/**\n * KeyboardEvents class enables you to bind key action desired key combinations for ex., Ctrl+A, Delete, Alt+Space etc.\n * ```html\n *
;\n * \n * ```\n */\nvar KeyboardEvents = /** @class */ (function (_super) {\n __extends(KeyboardEvents, _super);\n /**\n * Initializes the KeyboardEvents\n * @param {HTMLElement} element\n * @param {KeyboardEventsModel} options\n */\n function KeyboardEvents(element, options) {\n var _this = _super.call(this, options, element) || this;\n /**\n * To handle a key press event returns null\n */\n _this.keyPressHandler = function (e) {\n var isAltKey = e.altKey;\n var isCtrlKey = e.ctrlKey;\n var isShiftKey = e.shiftKey;\n var curkeyCode = e.which;\n var keys = Object.keys(_this.keyConfigs);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n var configCollection = _this.keyConfigs[key].split(',');\n for (var _a = 0, configCollection_1 = configCollection; _a < configCollection_1.length; _a++) {\n var rconfig = configCollection_1[_a];\n var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());\n if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey &&\n isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {\n e.action = key;\n if (_this.keyAction) {\n _this.keyAction(e);\n }\n }\n }\n }\n };\n _this.bind();\n return _this;\n }\n KeyboardEvents_1 = KeyboardEvents;\n /**\n * Unwire bound events and destroy the instance.\n * @return {void}\n */\n KeyboardEvents.prototype.destroy = function () {\n this.unwireEvents();\n _super.prototype.destroy.call(this);\n };\n /**\n * Function can be used to specify certain action if a property is changed\n * @param newProp\n * @param oldProp\n * @returns {void}\n * @private\n */\n KeyboardEvents.prototype.onPropertyChanged = function (newProp, oldProp) {\n // No code are needed\n };\n ;\n KeyboardEvents.prototype.bind = function () {\n this.wireEvents();\n };\n /**\n * To get the module name, returns 'keyboard'.\n * @private\n */\n KeyboardEvents.prototype.getModuleName = function () {\n return 'keyboard';\n };\n /**\n * Wiring event handlers to events\n */\n KeyboardEvents.prototype.wireEvents = function () {\n this.element.addEventListener(this.eventName, this.keyPressHandler);\n };\n /**\n * Unwiring event handlers to events\n */\n KeyboardEvents.prototype.unwireEvents = function () {\n this.element.removeEventListener(this.eventName, this.keyPressHandler);\n };\n /**\n * To get the key configuration data\n * @param {string} config - configuration data\n * returns {KeyData}\n */\n KeyboardEvents.getKeyConfigData = function (config) {\n if (config in this.configCache) {\n return this.configCache[config];\n }\n var keys = config.toLowerCase().split('+');\n var keyData = {\n altKey: (keys.indexOf('alt') !== -1 ? true : false),\n ctrlKey: (keys.indexOf('ctrl') !== -1 ? true : false),\n shiftKey: (keys.indexOf('shift') !== -1 ? true : false),\n keyCode: null\n };\n if (keys[keys.length - 1].length > 1 && !!Number(keys[keys.length - 1])) {\n keyData.keyCode = Number(keys[keys.length - 1]);\n }\n else {\n keyData.keyCode = KeyboardEvents_1.getKeyCode(keys[keys.length - 1]);\n }\n KeyboardEvents_1.configCache[config] = keyData;\n return keyData;\n };\n // Return the keycode value as string \n KeyboardEvents.getKeyCode = function (keyVal) {\n return keyCode[keyVal] || keyVal.toUpperCase().charCodeAt(0);\n };\n var KeyboardEvents_1;\n KeyboardEvents.configCache = {};\n __decorate([\n Property({})\n ], KeyboardEvents.prototype, \"keyConfigs\", void 0);\n __decorate([\n Property('keyup')\n ], KeyboardEvents.prototype, \"eventName\", void 0);\n __decorate([\n Event()\n ], KeyboardEvents.prototype, \"keyAction\", void 0);\n KeyboardEvents = KeyboardEvents_1 = __decorate([\n NotifyPropertyChanges\n ], KeyboardEvents);\n return KeyboardEvents;\n}(Base));\nexport { KeyboardEvents };\n","import { extend, isNullOrUndefined } from './util';\nimport { defaultCulture } from './internationalization';\n/**\n * L10n modules provides localized text for different culture.\n * ```typescript\n * import {setCulture} from '@syncfusion/ts-base-library';\n * //load global locale object common for all components.\n * L10n.load({\n * 'fr-BE': {\n * 'button': {\n * 'check': 'vérifié'\n * }\n * }\n * });\n * //set globale default locale culture.\n * setCulture('fr-BE');\n * let instance: L10n = new L10n('button', {\n * check: 'checked'\n * });\n * //Get locale text for current property.\n * instance.getConstant('check');\n * //Change locale culture in a component.\n * instance.setLocale('en-US');\n * ```\n */\nvar L10n = /** @class */ (function () {\n /**\n * Constructor\n */\n function L10n(controlName, localeStrings, locale) {\n this.controlName = controlName;\n this.localeStrings = localeStrings;\n this.setLocale(locale || defaultCulture);\n }\n /**\n * Sets the locale text\n * @param {string} locale\n * @returns {void}\n */\n L10n.prototype.setLocale = function (locale) {\n var intLocale = this.intGetControlConstant(L10n.locale, locale);\n this.currentLocale = intLocale || this.localeStrings;\n };\n /**\n * Sets the global locale for all components.\n * @param {Object} localeObject - specifies the localeObject to be set as global locale.\n */\n L10n.load = function (localeObject) {\n this.locale = extend(this.locale, localeObject, {}, true);\n };\n /**\n * Returns current locale text for the property based on the culture name and control name.\n * @param {string} propertyName - specifies the property for which localize text to be returned.\n * @return string\n */\n L10n.prototype.getConstant = function (prop) {\n // Removed conditional operator because this method does not return correct value when passing 0 as value in localization\n if (!isNullOrUndefined(this.currentLocale[prop])) {\n return this.currentLocale[prop];\n }\n else {\n return this.localeStrings[prop] || '';\n }\n };\n /**\n * Returns the control constant object for current object and the locale specified.\n * @param {Object} curObject\n * @param {string} locale\n * @returns {Object}\n */\n L10n.prototype.intGetControlConstant = function (curObject, locale) {\n if ((curObject)[locale]) {\n return (curObject)[locale][this.controlName];\n }\n return null;\n };\n L10n.locale = {};\n return L10n;\n}());\nexport { L10n };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { extend } from './util';\nimport { Property, Complex, NotifyPropertyChanges, Event } from './notify-property-change';\nimport { Browser } from './browser';\nimport { Base } from './base';\nimport { ChildProperty } from './child-property';\nimport { EventHandler } from './event-handler';\n/**\n * SwipeSettings is a framework module that provides support to handle swipe event like swipe up, swipe right, etc..,\n */\nvar SwipeSettings = /** @class */ (function (_super) {\n __extends(SwipeSettings, _super);\n function SwipeSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(50)\n ], SwipeSettings.prototype, \"swipeThresholdDistance\", void 0);\n return SwipeSettings;\n}(ChildProperty));\nexport { SwipeSettings };\nvar swipeRegex = /(Up|Down)/;\n/**\n * Touch class provides support to handle the touch event like tap, double tap, tap hold, etc..,\n * ```typescript\n * let node: HTMLElement;\n * let touchObj: Touch = new Touch({\n * element: node,\n * tap: function (e) {\n * // tap handler function code\n * }\n * tapHold: function (e) {\n * // tap hold handler function code\n * }\n * scroll: function (e) {\n * // scroll handler function code\n * }\n * swipe: function (e) {\n * // swipe handler function code\n * }\n * });\n * ```\n */\nvar Touch = /** @class */ (function (_super) {\n __extends(Touch, _super);\n /* End-Properties */\n function Touch(element, options) {\n var _this = _super.call(this, options, element) || this;\n _this.touchAction = true;\n _this.tapCount = 0;\n _this.startEvent = function (evt) {\n if (_this.touchAction === true) {\n var point = _this.updateChangeTouches(evt);\n if (evt.changedTouches !== undefined) {\n _this.touchAction = false;\n }\n _this.isTouchMoved = false;\n _this.movedDirection = '';\n _this.startPoint = _this.lastMovedPoint = { clientX: point.clientX, clientY: point.clientY };\n _this.startEventData = point;\n _this.hScrollLocked = _this.vScrollLocked = false;\n _this.tStampStart = Date.now();\n _this.timeOutTapHold = setTimeout(function () { _this.tapHoldEvent(evt); }, _this.tapHoldThreshold);\n EventHandler.add(_this.element, Browser.touchMoveEvent, _this.moveEvent, _this);\n EventHandler.add(_this.element, Browser.touchEndEvent, _this.endEvent, _this);\n EventHandler.add(_this.element, Browser.touchCancelEvent, _this.cancelEvent, _this);\n }\n };\n _this.moveEvent = function (evt) {\n var point = _this.updateChangeTouches(evt);\n _this.movedPoint = point;\n _this.isTouchMoved = !(point.clientX === _this.startPoint.clientX && point.clientY === _this.startPoint.clientY);\n var eScrollArgs = {};\n if (_this.isTouchMoved) {\n clearTimeout(_this.timeOutTapHold);\n _this.calcScrollPoints(evt);\n var scrollArg = {\n startEvents: _this.startEventData,\n originalEvent: evt, startX: _this.startPoint.clientX,\n startY: _this.startPoint.clientY, distanceX: _this.distanceX,\n distanceY: _this.distanceY, scrollDirection: _this.scrollDirection,\n velocity: _this.getVelocity(point)\n };\n eScrollArgs = extend(eScrollArgs, {}, scrollArg);\n _this.trigger('scroll', eScrollArgs);\n _this.lastMovedPoint = { clientX: point.clientX, clientY: point.clientY };\n }\n };\n _this.cancelEvent = function (evt) {\n clearTimeout(_this.timeOutTapHold);\n clearTimeout(_this.timeOutTap);\n _this.tapCount = 0;\n _this.swipeFn(evt);\n EventHandler.remove(_this.element, Browser.touchCancelEvent, _this.cancelEvent);\n };\n _this.endEvent = function (evt) {\n _this.swipeFn(evt);\n if (!_this.isTouchMoved) {\n if (typeof _this.tap === 'function') {\n _this.trigger('tap', { originalEvent: evt, tapCount: ++_this.tapCount });\n _this.timeOutTap = setTimeout(function () {\n _this.tapCount = 0;\n }, _this.tapThreshold);\n }\n }\n _this.modeclear();\n };\n _this.swipeFn = function (evt) {\n clearTimeout(_this.timeOutTapHold);\n clearTimeout(_this.timeOutTap);\n var point = _this.updateChangeTouches(evt);\n var diffX = point.clientX - _this.startPoint.clientX;\n var diffY = point.clientY - _this.startPoint.clientY;\n diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);\n diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);\n _this.isTouchMoved = diffX > 1 || diffY > 1;\n // tslint:disable-next-line:no-any\n var isFirefox = (/Mozilla|Firefox/).test(Browser.userAgent);\n if (isFirefox && point.clientX === 0 && point.clientY === 0 && evt.type === 'mouseup') {\n _this.isTouchMoved = false;\n }\n _this.endPoint = point;\n _this.calcPoints(evt);\n var swipeArgs = {\n originalEvent: evt,\n startEvents: _this.startEventData,\n startX: _this.startPoint.clientX,\n startY: _this.startPoint.clientY,\n distanceX: _this.distanceX, distanceY: _this.distanceY, swipeDirection: _this.movedDirection,\n velocity: _this.getVelocity(point)\n };\n if (_this.isTouchMoved) {\n var eSwipeArgs = void 0;\n var tDistance = _this.swipeSettings.swipeThresholdDistance;\n eSwipeArgs = extend(eSwipeArgs, _this.defaultArgs, swipeArgs);\n var canTrigger = false;\n var ele = _this.element;\n var scrollBool = _this.isScrollable(ele);\n var moved = swipeRegex.test(_this.movedDirection);\n if ((tDistance < _this.distanceX && !moved) || (tDistance < _this.distanceY && moved)) {\n if (!scrollBool) {\n canTrigger = true;\n }\n else {\n canTrigger = _this.checkSwipe(ele, moved);\n }\n }\n if (canTrigger) {\n _this.trigger('swipe', eSwipeArgs);\n }\n }\n _this.modeclear();\n };\n _this.modeclear = function () {\n _this.modeClear = setTimeout(function () {\n _this.touchAction = true;\n }, (typeof _this.tap !== 'function' ? 0 : 20));\n _this.lastTapTime = new Date().getTime();\n EventHandler.remove(_this.element, Browser.touchMoveEvent, _this.moveEvent);\n EventHandler.remove(_this.element, Browser.touchEndEvent, _this.endEvent);\n EventHandler.remove(_this.element, Browser.touchCancelEvent, _this.cancelEvent);\n };\n _this.bind();\n return _this;\n }\n // triggers when property changed \n /**\n * @private\n * @param newProp\n * @param oldProp\n */\n Touch.prototype.onPropertyChanged = function (newProp, oldProp) {\n //No Code to handle\n };\n Touch.prototype.bind = function () {\n this.wireEvents();\n if (Browser.isIE) {\n this.element.classList.add('e-block-touch');\n }\n };\n /**\n * To destroy the touch instance.\n * @return {void}\n */\n Touch.prototype.destroy = function () {\n this.unwireEvents();\n _super.prototype.destroy.call(this);\n };\n // Need to changes the event binding once we updated the event handler.\n Touch.prototype.wireEvents = function () {\n EventHandler.add(this.element, Browser.touchStartEvent, this.startEvent, this);\n };\n Touch.prototype.unwireEvents = function () {\n EventHandler.remove(this.element, Browser.touchStartEvent, this.startEvent);\n };\n /**\n * Returns module name as touch\n * @returns {string}\n * @private\n */\n Touch.prototype.getModuleName = function () {\n return 'touch';\n };\n /**\n * Returns if the HTML element is Scrollable.\n * @param {HTMLElement} element - HTML Element to check if Scrollable.\n * @returns {boolean}\n */\n Touch.prototype.isScrollable = function (element) {\n var eleStyle = getComputedStyle(element);\n var style = eleStyle.overflow + eleStyle.overflowX + eleStyle.overflowY;\n if ((/(auto|scroll)/).test(style)) {\n return true;\n }\n return false;\n };\n Touch.prototype.tapHoldEvent = function (evt) {\n this.tapCount = 0;\n this.touchAction = true;\n var eTapArgs;\n EventHandler.remove(this.element, Browser.touchMoveEvent, this.moveEvent);\n EventHandler.remove(this.element, Browser.touchEndEvent, this.endEvent);\n eTapArgs = { originalEvent: evt };\n this.trigger('tapHold', eTapArgs);\n EventHandler.remove(this.element, Browser.touchCancelEvent, this.cancelEvent);\n };\n Touch.prototype.calcPoints = function (evt) {\n var point = this.updateChangeTouches(evt);\n this.defaultArgs = { originalEvent: evt };\n this.distanceX = Math.abs((Math.abs(point.clientX) - Math.abs(this.startPoint.clientX)));\n this.distanceY = Math.abs((Math.abs(point.clientY) - Math.abs(this.startPoint.clientY)));\n if (this.distanceX > this.distanceY) {\n this.movedDirection = (point.clientX > this.startPoint.clientX) ? 'Right' : 'Left';\n }\n else {\n this.movedDirection = (point.clientY < this.startPoint.clientY) ? 'Up' : 'Down';\n }\n };\n Touch.prototype.calcScrollPoints = function (evt) {\n var point = this.updateChangeTouches(evt);\n this.defaultArgs = { originalEvent: evt };\n this.distanceX = Math.abs((Math.abs(point.clientX) - Math.abs(this.lastMovedPoint.clientX)));\n this.distanceY = Math.abs((Math.abs(point.clientY) - Math.abs(this.lastMovedPoint.clientY)));\n if ((this.distanceX > this.distanceY || this.hScrollLocked === true) && this.vScrollLocked === false) {\n this.scrollDirection = (point.clientX > this.lastMovedPoint.clientX) ? 'Right' : 'Left';\n this.hScrollLocked = true;\n }\n else {\n this.scrollDirection = (point.clientY < this.lastMovedPoint.clientY) ? 'Up' : 'Down';\n this.vScrollLocked = true;\n }\n };\n Touch.prototype.getVelocity = function (pnt) {\n var newX = pnt.clientX;\n var newY = pnt.clientY;\n var newT = Date.now();\n var xDist = newX - this.startPoint.clientX;\n var yDist = newY - this.startPoint.clientX;\n var interval = newT - this.tStampStart;\n return Math.sqrt(xDist * xDist + yDist * yDist) / interval;\n };\n // tslint:disable-next-line:no-any\n Touch.prototype.checkSwipe = function (ele, flag) {\n var keys = ['scroll', 'offset'];\n var temp = flag ? ['Height', 'Top'] : ['Width', 'Left'];\n if ((ele[keys[0] + temp[0]] <= ele[keys[1] + temp[0]])) {\n return true;\n }\n return (ele[keys[0] + temp[1]] === 0) ||\n (ele[keys[1] + temp[0]] + ele[keys[0] + temp[1]] >= ele[keys[0] + temp[0]]);\n };\n Touch.prototype.updateChangeTouches = function (evt) {\n // tslint:disable-next-line:max-line-length\n var point = evt.changedTouches && evt.changedTouches.length !== 0 ? evt.changedTouches[0] : evt;\n return point;\n };\n __decorate([\n Event()\n ], Touch.prototype, \"tap\", void 0);\n __decorate([\n Event()\n ], Touch.prototype, \"tapHold\", void 0);\n __decorate([\n Event()\n ], Touch.prototype, \"swipe\", void 0);\n __decorate([\n Event()\n ], Touch.prototype, \"scroll\", void 0);\n __decorate([\n Property(350)\n ], Touch.prototype, \"tapThreshold\", void 0);\n __decorate([\n Property(750)\n ], Touch.prototype, \"tapHoldThreshold\", void 0);\n __decorate([\n Complex({}, SwipeSettings)\n ], Touch.prototype, \"swipeSettings\", void 0);\n Touch = __decorate([\n NotifyPropertyChanges\n ], Touch);\n return Touch;\n}(Base));\nexport { Touch };\n","/**\n * SanitizeHtmlHelper for sanitize the value.\n */\nimport { detach } from './dom';\nvar removeTags = [\n 'script',\n 'style',\n 'iframe[src]',\n 'link[href*=\"javascript:\"]',\n 'object[type=\"text/x-scriptlet\"]',\n 'object[data^=\"data:text/html;base64\"]',\n 'img[src^=\"data:text/html;base64\"]',\n '[src^=\"javascript:\"]',\n '[dynsrc^=\"javascript:\"]',\n '[lowsrc^=\"javascript:\"]',\n '[type^=\"application/x-shockwave-flash\"]'\n];\nvar removeAttrs = [\n { attribute: 'href', selector: '[href*=\"javascript:\"]' },\n { attribute: 'background', selector: '[background^=\"javascript:\"]' },\n { attribute: 'style', selector: '[style*=\"javascript:\"]' },\n { attribute: 'style', selector: '[style*=\"expression(\"]' },\n { attribute: 'href', selector: 'a[href^=\"data:text/html;base64\"]' }\n];\nvar jsEvents = ['onchange',\n 'onclick',\n 'onmouseover',\n 'onmouseout',\n 'onkeydown',\n 'onload',\n 'onerror',\n 'onblur',\n 'onfocus',\n 'onbeforeload',\n 'onbeforeunload',\n 'onkeyup',\n 'onsubmit',\n 'onafterprint',\n 'onbeforeonload',\n 'onbeforeprint',\n 'onblur',\n 'oncanplay',\n 'oncanplaythrough',\n 'onchange',\n 'onclick',\n 'oncontextmenu',\n 'ondblclick',\n 'ondrag',\n 'ondragend',\n 'ondragenter',\n 'ondragleave',\n 'ondragover',\n 'ondragstart',\n 'ondrop',\n 'ondurationchange',\n 'onemptied',\n 'onended',\n 'onerror',\n 'onerror',\n 'onfocus',\n 'onformchange',\n 'onforminput',\n 'onhaschange',\n 'oninput',\n 'oninvalid',\n 'onkeydown',\n 'onkeypress',\n 'onkeyup',\n 'onload',\n 'onloadeddata',\n 'onloadedmetadata',\n 'onloadstart',\n 'onmessage',\n 'onmousedown',\n 'onmousemove',\n 'onmouseout',\n 'onmouseover',\n 'onmouseup',\n 'onmousewheel',\n 'onoffline',\n 'onoine',\n 'ononline',\n 'onpagehide',\n 'onpageshow',\n 'onpause',\n 'onplay',\n 'onplaying',\n 'onpopstate',\n 'onprogress',\n 'onratechange',\n 'onreadystatechange',\n 'onredo',\n 'onresize',\n 'onscroll',\n 'onseeked',\n 'onseeking',\n 'onselect',\n 'onstalled',\n 'onstorage',\n 'onsubmit',\n 'onsuspend',\n 'ontimeupdate',\n 'onundo',\n 'onunload',\n 'onvolumechange',\n 'onwaiting',\n 'onmouseenter',\n 'onmouseleave',\n 'onmousewheel',\n 'onstart',\n 'onpropertychange'\n];\nvar SanitizeHtmlHelper = /** @class */ (function () {\n function SanitizeHtmlHelper() {\n }\n SanitizeHtmlHelper.beforeSanitize = function () {\n return {\n selectors: {\n tags: removeTags,\n attributes: removeAttrs\n }\n };\n };\n ;\n SanitizeHtmlHelper.sanitize = function (value) {\n var item = this.beforeSanitize();\n var output = this.serializeValue(item, value);\n return output;\n };\n SanitizeHtmlHelper.serializeValue = function (item, value) {\n this.removeAttrs = item.selectors.attributes;\n this.removeTags = item.selectors.tags;\n this.wrapElement = document.createElement('div');\n this.wrapElement.innerHTML = value;\n this.removeXssTags();\n this.removeJsEvents();\n this.removeXssAttrs();\n var tempEleValue = this.wrapElement.innerHTML;\n this.removeElement();\n return tempEleValue;\n };\n SanitizeHtmlHelper.removeElement = function () {\n // Removes an element's attibute to avoid html tag validation\n var nodes = this.wrapElement.children;\n for (var j = 0; j < nodes.length; j++) {\n var attribute = nodes[j].attributes;\n for (var i = 0; i < attribute.length; i++) {\n this.wrapElement.children[j].removeAttribute(attribute[i].localName);\n }\n }\n };\n SanitizeHtmlHelper.removeXssTags = function () {\n var elements = this.wrapElement.querySelectorAll(this.removeTags.join(','));\n if (elements.length > 0) {\n elements.forEach(function (element) {\n detach(element);\n });\n }\n else {\n return;\n }\n };\n SanitizeHtmlHelper.removeJsEvents = function () {\n var elements = this.wrapElement.querySelectorAll('[' + jsEvents.join('],[') + ']');\n if (elements.length > 0) {\n elements.forEach(function (element) {\n jsEvents.forEach(function (attr) {\n if (element.hasAttribute(attr)) {\n element.removeAttribute(attr);\n }\n });\n });\n }\n else {\n return;\n }\n };\n SanitizeHtmlHelper.removeXssAttrs = function () {\n var _this = this;\n this.removeAttrs.forEach(function (item, index) {\n var elements = _this.wrapElement.querySelectorAll(item.selector);\n if (elements.length > 0) {\n elements.forEach(function (element) {\n element.removeAttribute(item.attribute);\n });\n }\n });\n };\n return SanitizeHtmlHelper;\n}());\nexport { SanitizeHtmlHelper };\n","/**\n * index\n */\nexport * from './src/index';\n","import { isNullOrUndefined, extend, addClass } from '@syncfusion/ej2-base';\nimport { attributes as addAttributes } from '@syncfusion/ej2-base';\nimport { rowDataBound, queryCellInfo } from '../base/constant';\nimport { setStyleAndAttributes, getObject, extendObjWithFn } from '../base/util';\nimport { CellType } from '../base/enum';\nimport { CellMergeRender } from './cell-merge-renderer';\n/**\n * RowRenderer class which responsible for building row content.\n * @hidden\n */\nvar RowRenderer = /** @class */ (function () {\n function RowRenderer(serviceLocator, cellType, parent) {\n this.isSpan = false;\n this.cellType = cellType;\n this.serviceLocator = serviceLocator;\n this.parent = parent;\n this.element = this.parent.createElement('tr', { attrs: { role: 'row' } });\n }\n /**\n * Function to render the row content based on Column[] and data.\n * @param {Column[]} columns\n * @param {Object} data?\n * @param {{[x:string]:Object}} attributes?\n * @param {string} rowTemplate?\n */\n RowRenderer.prototype.render = function (row, columns, attributes, rowTemplate, cloneNode) {\n return this.refreshRow(row, columns, attributes, rowTemplate, cloneNode);\n };\n /**\n * Function to refresh the row content based on Column[] and data.\n * @param {Column[]} columns\n * @param {Object} data?\n * @param {{[x:string]:Object}} attributes?\n * @param {string} rowTemplate?\n */\n RowRenderer.prototype.refresh = function (row, columns, isChanged, attributes, rowTemplate) {\n if (isChanged) {\n row.data = extendObjWithFn({}, row.changes);\n this.refreshMergeCells(row);\n }\n var node = this.parent.element.querySelector('[data-uid=' + row.uid + ']');\n var tr = this.refreshRow(row, columns, attributes, rowTemplate, null, isChanged);\n var cells = [].slice.call(tr.cells);\n node.innerHTML = '';\n for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {\n var cell = cells_1[_i];\n node.appendChild(cell);\n }\n };\n // tslint:disable-next-line:max-func-body-length\n RowRenderer.prototype.refreshRow = function (row, columns, attributes, rowTemplate, cloneNode, isEdit) {\n var tr = !isNullOrUndefined(cloneNode) ? cloneNode : this.element.cloneNode();\n var rowArgs = { data: row.data };\n var cellArgs = { data: row.data };\n var attrCopy = extend({}, attributes, {});\n var chekBoxEnable = this.parent.getColumns().filter(function (col) { return col.type === 'checkbox' && col.field; })[0];\n var value = false;\n if (chekBoxEnable) {\n value = getObject(chekBoxEnable.field, rowArgs.data);\n }\n if (row.isDataRow) {\n row.isSelected = this.parent.getSelectedRowIndexes().indexOf(row.index) > -1 || value;\n }\n if (row.isDataRow && this.parent.isCheckBoxSelection\n && this.parent.checkAllRows === 'Check' && this.parent.enableVirtualization) {\n row.isSelected = true;\n if (this.parent.getSelectedRowIndexes().indexOf(row.index) === -1) {\n this.parent.getSelectedRowIndexes().push(row.index);\n }\n }\n this.buildAttributeFromRow(tr, row);\n addAttributes(tr, attrCopy);\n setStyleAndAttributes(tr, row.attributes);\n var cellRendererFact = this.serviceLocator.getService('cellRendererFactory');\n var _loop_1 = function (i, len) {\n var cell = row.cells[i];\n cell.isSelected = row.isSelected;\n cell.isColumnSelected = cell.column.isSelected;\n var cellRenderer = cellRendererFact.getCellRenderer(row.cells[i].cellType || CellType.Data);\n var attrs = { 'index': !isNullOrUndefined(row.index) ? row.index.toString() : '' };\n if (row.isExpand && row.cells[i].cellType === CellType.DetailExpand) {\n attrs['class'] = this_1.parent.isPrinting ? 'e-detailrowcollapse' : 'e-detailrowexpand';\n }\n var td = cellRenderer.render(row.cells[i], row.data, attrs, row.isExpand, isEdit);\n if (row.cells[i].cellType !== CellType.Filter) {\n if (row.cells[i].cellType === CellType.Data || row.cells[i].cellType === CellType.CommandColumn) {\n this_1.parent.trigger(queryCellInfo, extend(cellArgs, {\n cell: td, column: cell.column, colSpan: 1,\n rowSpan: 1, foreignKeyData: row.cells[i].foreignKeyData,\n requestType: this_1.parent.requestTypeAction\n }));\n var isRowSpanned = false;\n if (row.index > 0 && this_1.isSpan) {\n var prevRowCells = this_1.parent.groupSettings.columns.length > 0 &&\n !this_1.parent.getRowsObject()[row.index - 1].isDataRow ?\n this_1.parent.getRowsObject()[row.index].cells : this_1.parent.getRowsObject()[row.index - 1].cells;\n var uid_1 = 'uid';\n var prevRowCell = prevRowCells.filter(function (cell) {\n return cell.column.uid === row.cells[i].column[uid_1];\n })[0];\n isRowSpanned = prevRowCell.isRowSpanned ? prevRowCell.isRowSpanned : prevRowCell.rowSpanRange > 1;\n }\n if (cellArgs.colSpan > 1 || row.cells[i].cellSpan > 1 || cellArgs.rowSpan > 1 || isRowSpanned) {\n this_1.isSpan = true;\n var cellMerge = new CellMergeRender(this_1.serviceLocator, this_1.parent);\n td = cellMerge.render(cellArgs, row, i, td);\n }\n }\n if (!row.cells[i].isSpanned) {\n tr.appendChild(td);\n }\n }\n };\n var this_1 = this;\n for (var i = 0, len = row.cells.length; i < len; i++) {\n _loop_1(i, len);\n }\n var args = { row: tr, rowHeight: this.parent.rowHeight };\n if (row.isDataRow) {\n this.parent.trigger(rowDataBound, extend(rowArgs, args));\n if (this.parent.childGrid || this.parent.isRowDragable() || this.parent.detailTemplate) {\n var td = tr.querySelectorAll('.e-rowcell:not(.e-hide)')[0];\n if (td) {\n td.classList.add('e-detailrowvisible');\n }\n }\n }\n if (this.parent.enableVirtualization) {\n rowArgs.rowHeight = this.parent.rowHeight;\n }\n if (rowArgs.rowHeight) {\n tr.style.height = rowArgs.rowHeight + 'px';\n }\n else if (this.parent.rowHeight && (tr.querySelector('.e-headercell') || tr.querySelector('.e-groupcaption'))) {\n tr.style.height = this.parent.rowHeight + 'px';\n }\n if (row.cssClass) {\n tr.classList.add(row.cssClass);\n }\n if (row.lazyLoadCssClass) {\n tr.classList.add(row.lazyLoadCssClass);\n }\n var vFTable = this.parent.enableColumnVirtualization && this.parent.frozenColumns !== 0;\n if (!vFTable && this.parent.element.scrollHeight > this.parent.height && this.parent.aggregates.length) {\n for (var i = 0; i < this.parent.aggregates.length; i++) {\n var property = 'properties';\n var column = 'columns';\n if (this.parent.aggregates[i][property][column][0].footerTemplate) {\n var summarycell = tr.querySelectorAll('.e-summarycell');\n if (summarycell.length) {\n var lastSummaryCell = (summarycell[summarycell.length - 1]);\n addClass([lastSummaryCell], ['e-lastsummarycell']);\n var firstSummaryCell = (summarycell[0]);\n addClass([firstSummaryCell], ['e-firstsummarycell']);\n }\n }\n }\n }\n return tr;\n };\n RowRenderer.prototype.refreshMergeCells = function (row) {\n for (var _i = 0, _a = row.cells; _i < _a.length; _i++) {\n var cell = _a[_i];\n cell.isSpanned = false;\n }\n return row;\n };\n /**\n * Function to check and add alternative row css class.\n * @param {Element} tr\n * @param {{[x:string]:Object}} attr\n */\n RowRenderer.prototype.buildAttributeFromRow = function (tr, row) {\n var attr = {};\n var prop = { 'rowindex': 'aria-rowindex', 'dataUID': 'data-uid', 'ariaSelected': 'aria-selected' };\n var classes = [];\n if (row.isDataRow) {\n classes.push('e-row');\n }\n if (row.isAltRow) {\n classes.push('e-altrow');\n }\n if (!isNullOrUndefined(row.index)) {\n attr[prop.rowindex] = row.index;\n }\n if (row.rowSpan) {\n attr.rowSpan = row.rowSpan;\n }\n if (row.uid) {\n attr[prop.dataUID] = row.uid;\n }\n if (row.isSelected) {\n attr[prop.ariaSelected] = true;\n }\n if (row.visible === false) {\n classes.push('e-hide');\n }\n attr.class = classes;\n setStyleAndAttributes(tr, attr);\n };\n return RowRenderer;\n}());\nexport { RowRenderer };\n","import { isNullOrUndefined, getValue, setValue, isBlazor } from '@syncfusion/ej2-base';\nimport { Row } from '../models/row';\nimport { CellType } from '../base/enum';\nimport { Cell } from '../models/cell';\nimport { getUid } from '../base/util';\nimport { getForeignData } from '../../grid/base/util';\nimport * as events from '../base/constant';\n/**\n * RowModelGenerator is used to generate grid data rows.\n * @hidden\n */\nvar RowModelGenerator = /** @class */ (function () {\n /**\n * Constructor for header renderer module\n */\n function RowModelGenerator(parent) {\n this.parent = parent;\n }\n RowModelGenerator.prototype.generateRows = function (data, args) {\n var rows = [];\n var startIndex = this.parent.enableVirtualization && args ? args.startIndex : 0;\n startIndex = this.parent.enableInfiniteScrolling && args ? this.getInfiniteIndex(args) : startIndex;\n for (var i = 0, len = Object.keys(data).length; i < len; i++, startIndex++) {\n rows[i] = this.generateRow(data[i], startIndex);\n }\n return rows;\n };\n RowModelGenerator.prototype.ensureColumns = function () {\n //TODO: generate dummy column for group, detail here;\n var cols = [];\n if (this.parent.detailTemplate || this.parent.childGrid) {\n var args = {};\n this.parent.notify(events.detailIndentCellInfo, args);\n cols.push(this.generateCell(args, null, CellType.DetailExpand));\n }\n if (this.parent.isRowDragable()) {\n cols.push(this.generateCell({}, null, CellType.RowDragIcon));\n }\n return cols;\n };\n RowModelGenerator.prototype.generateRow = function (data, index, cssClass, indent, pid, tIndex, parentUid) {\n var options = {};\n options.foreignKeyData = {};\n var isServerRendered = 'isServerRendered';\n options.uid = isBlazor() && this.parent[isServerRendered] ? this.parent.getRowUid('grid-row') : getUid('grid-row');\n options.data = data;\n options.index = index;\n options.indent = indent;\n options.tIndex = tIndex;\n options.isDataRow = true;\n options.parentGid = pid;\n options.parentUid = parentUid;\n if (this.parent.isPrinting) {\n if (this.parent.hierarchyPrintMode === 'All') {\n options.isExpand = true;\n }\n else if (this.parent.hierarchyPrintMode === 'Expanded' && this.parent.expandedRows && this.parent.expandedRows[index]) {\n options.isExpand = this.parent.expandedRows[index].isExpand;\n }\n }\n options.cssClass = cssClass;\n options.isAltRow = this.parent.enableAltRow ? index % 2 !== 0 : false;\n options.isAltRow = this.parent.enableAltRow ? index % 2 !== 0 : false;\n if (isBlazor() && this.parent.isServerRendered && this.parent.enableVirtualization && this.parent.selectionModule.checkBoxState) {\n options.isSelected = this.parent.selectionModule.checkBoxState;\n if (options.isSelected && this.parent.selectionModule.selectedRowIndexes.indexOf(index) === -1) {\n this.parent.selectionModule.selectedRowIndexes.push(index);\n }\n }\n else {\n options.isSelected = this.parent.getSelectedRowIndexes().indexOf(index) > -1;\n }\n this.refreshForeignKeyRow(options);\n var cells = this.ensureColumns();\n var row = isBlazor() ? new Row(options) :\n new Row(options, this.parent);\n row.cells = this.parent.getFrozenMode() === 'Right' ? this.generateCells(options).concat(cells)\n : cells.concat(this.generateCells(options));\n return row;\n };\n RowModelGenerator.prototype.refreshForeignKeyRow = function (options) {\n var foreignKeyColumns = this.parent.getForeignKeyColumns();\n for (var i = 0; i < foreignKeyColumns.length; i++) {\n setValue(foreignKeyColumns[i].field, getForeignData(foreignKeyColumns[i], options.data), options.foreignKeyData);\n }\n };\n RowModelGenerator.prototype.generateCells = function (options) {\n var dummies = this.parent.getColumns();\n var tmp = [];\n for (var i = 0; i < dummies.length; i++) {\n tmp.push(this.generateCell(dummies[i], options.uid, isNullOrUndefined(dummies[i].commands) ? undefined : CellType.CommandColumn, null, i, options.foreignKeyData));\n }\n return tmp;\n };\n RowModelGenerator.prototype.generateCell = function (column, rowId, cellType, colSpan, oIndex, foreignKeyData) {\n var opt = {\n 'visible': column.visible,\n 'isDataCell': !isNullOrUndefined(column.field || column.template),\n 'isTemplate': !isNullOrUndefined(column.template),\n 'rowID': rowId,\n 'column': column,\n 'cellType': !isNullOrUndefined(cellType) ? cellType : CellType.Data,\n 'colSpan': colSpan,\n 'commands': column.commands,\n 'isForeignKey': column.isForeignColumn && column.isForeignColumn(),\n 'foreignKeyData': column.isForeignColumn && column.isForeignColumn() && getValue(column.field, foreignKeyData)\n };\n if (opt.isDataCell || opt.column.type === 'checkbox' || opt.commands) {\n opt.index = oIndex;\n }\n return new Cell(opt);\n };\n RowModelGenerator.prototype.refreshRows = function (input) {\n for (var i = 0; i < input.length; i++) {\n this.refreshForeignKeyRow(input[i]);\n input[i].cells = this.generateCells(input[i]);\n }\n return input;\n };\n RowModelGenerator.prototype.getInfiniteIndex = function (args) {\n return args.requestType === 'infiniteScroll' || args.requestType === 'delete' || args.action === 'add'\n ? args.startIndex : 0;\n };\n return RowModelGenerator;\n}());\nexport { RowModelGenerator };\n","/**\n * Defines types of Cell\n * @hidden\n */\nexport var CellType;\n(function (CellType) {\n /** Defines CellType as Data */\n CellType[CellType[\"Data\"] = 0] = \"Data\";\n /** Defines CellType as Header */\n CellType[CellType[\"Header\"] = 1] = \"Header\";\n /** Defines CellType as Summary */\n CellType[CellType[\"Summary\"] = 2] = \"Summary\";\n /** Defines CellType as GroupSummary */\n CellType[CellType[\"GroupSummary\"] = 3] = \"GroupSummary\";\n /** Defines CellType as CaptionSummary */\n CellType[CellType[\"CaptionSummary\"] = 4] = \"CaptionSummary\";\n /** Defines CellType as Filter */\n CellType[CellType[\"Filter\"] = 5] = \"Filter\";\n /** Defines CellType as Indent */\n CellType[CellType[\"Indent\"] = 6] = \"Indent\";\n /** Defines CellType as GroupCaption */\n CellType[CellType[\"GroupCaption\"] = 7] = \"GroupCaption\";\n /** Defines CellType as GroupCaptionEmpty */\n CellType[CellType[\"GroupCaptionEmpty\"] = 8] = \"GroupCaptionEmpty\";\n /** Defines CellType as Expand */\n CellType[CellType[\"Expand\"] = 9] = \"Expand\";\n /** Defines CellType as HeaderIndent */\n CellType[CellType[\"HeaderIndent\"] = 10] = \"HeaderIndent\";\n /** Defines CellType as StackedHeader */\n CellType[CellType[\"StackedHeader\"] = 11] = \"StackedHeader\";\n /** Defines CellType as DetailHeader */\n CellType[CellType[\"DetailHeader\"] = 12] = \"DetailHeader\";\n /** Defines CellType as DetailExpand */\n CellType[CellType[\"DetailExpand\"] = 13] = \"DetailExpand\";\n /** Defines CellType as CommandColumn */\n CellType[CellType[\"CommandColumn\"] = 14] = \"CommandColumn\";\n /** Defines CellType as DetailFooterIntent */\n CellType[CellType[\"DetailFooterIntent\"] = 15] = \"DetailFooterIntent\";\n /** Defines CellType as RowDrag */\n CellType[CellType[\"RowDragIcon\"] = 16] = \"RowDragIcon\";\n /** Defines CellType as RowDragHeader */\n CellType[CellType[\"RowDragHIcon\"] = 17] = \"RowDragHIcon\";\n})(CellType || (CellType = {}));\n/**\n * Defines types of Render\n * @hidden\n */\nexport var RenderType;\n(function (RenderType) {\n /** Defines RenderType as Header */\n RenderType[RenderType[\"Header\"] = 0] = \"Header\";\n /** Defines RenderType as Content */\n RenderType[RenderType[\"Content\"] = 1] = \"Content\";\n /** Defines RenderType as Summary */\n RenderType[RenderType[\"Summary\"] = 2] = \"Summary\";\n})(RenderType || (RenderType = {}));\n/**\n * Defines Predefined toolbar items.\n * @hidden\n */\nexport var ToolbarItem;\n(function (ToolbarItem) {\n ToolbarItem[ToolbarItem[\"Add\"] = 0] = \"Add\";\n ToolbarItem[ToolbarItem[\"Edit\"] = 1] = \"Edit\";\n ToolbarItem[ToolbarItem[\"Update\"] = 2] = \"Update\";\n ToolbarItem[ToolbarItem[\"Delete\"] = 3] = \"Delete\";\n ToolbarItem[ToolbarItem[\"Cancel\"] = 4] = \"Cancel\";\n ToolbarItem[ToolbarItem[\"Print\"] = 5] = \"Print\";\n ToolbarItem[ToolbarItem[\"Search\"] = 6] = \"Search\";\n ToolbarItem[ToolbarItem[\"ColumnChooser\"] = 7] = \"ColumnChooser\";\n ToolbarItem[ToolbarItem[\"PdfExport\"] = 8] = \"PdfExport\";\n ToolbarItem[ToolbarItem[\"ExcelExport\"] = 9] = \"ExcelExport\";\n ToolbarItem[ToolbarItem[\"CsvExport\"] = 10] = \"CsvExport\";\n ToolbarItem[ToolbarItem[\"WordExport\"] = 11] = \"WordExport\";\n})(ToolbarItem || (ToolbarItem = {}));\n/**\n * Defines types of responsive dialogs\n * @hidden\n */\nexport var ResponsiveDialogAction;\n(function (ResponsiveDialogAction) {\n /** Defines dialog type as Edit */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isEdit\"] = 0] = \"isEdit\";\n /** Defines dialog type as Add */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isAdd\"] = 1] = \"isAdd\";\n /** Defines dialog type as Sort */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isSort\"] = 2] = \"isSort\";\n /** Defines dialog type as Filter */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isFilter\"] = 3] = \"isFilter\";\n})(ResponsiveDialogAction || (ResponsiveDialogAction = {}));\n/**\n * Defines responsive toolbar actions\n * @hidden\n */\nexport var ResponsiveToolbarAction;\n(function (ResponsiveToolbarAction) {\n /** Defines initial responsive toolbar buttons */\n ResponsiveToolbarAction[ResponsiveToolbarAction[\"isInitial\"] = 0] = \"isInitial\";\n /** Defines responsive toolbar search */\n ResponsiveToolbarAction[ResponsiveToolbarAction[\"isSearch\"] = 1] = \"isSearch\";\n})(ResponsiveToolbarAction || (ResponsiveToolbarAction = {}));\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"vx-row\"},[_c('div',{staticClass:\"vx-col w-full mb-base\"},[_c('vx-card',{staticClass:\"pb-3\",attrs:{\"title\":\"FAMS Quick Balancing View\",\"refresh-content-action\":\"\",\"collapse-action\":\"\"},on:{\"refresh\":_vm.closeCardAnimationDemo}},[_c('div',{staticClass:\"vx-row\"},[_c('div',{staticClass:\"vx-col md:w-1/2 w-full mt-2\"},[_c('label',[_vm._v(\"From date\")]),_c('datepicker',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],staticClass:\"w-full\",attrs:{\"id\":\"FromDate\",\"placeholder\":\"From Date\",\"format\":\"yyyy-MM-dd\",\"name\":\"From Date\"},model:{value:(_vm.formData.fromDate),callback:function ($$v) {_vm.$set(_vm.formData, \"fromDate\", $$v)},expression:\"formData.fromDate\"}}),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.errors.has('From Date')),expression:\"errors.has('From Date')\"}],staticClass:\"text-danger text-sm\"},[_vm._v(_vm._s(_vm.errors.first('From Date')))])],1),_c('div',{staticClass:\"vx-col md:w-1/2 w-full mt-2\"},[_c('label',[_vm._v(\"To date\")]),_c('datepicker',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],staticClass:\"w-full\",attrs:{\"id\":\"ToDate\",\"placeholder\":\"To Date\",\"format\":\"yyyy-MM-dd\",\"name\":\"To Date\"},model:{value:(_vm.formData.toDate),callback:function ($$v) {_vm.$set(_vm.formData, \"toDate\", $$v)},expression:\"formData.toDate\"}}),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.errors.has('To Date')),expression:\"errors.has('To Date')\"}],staticClass:\"text-danger text-sm\"},[_vm._v(_vm._s(_vm.errors.first('To Date')))])],1)]),_c('br'),_c('div',{staticClass:\"vx-col w-full mb-base\"},[_c('v-select',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],ref:\"report\",staticClass:\"w-full\",attrs:{\"placeholder\":\"Search / Select report\",\"options\":_vm.reportDropdown,\"name\":\"Report\"},on:{\"search:blur\":_vm.populateData},model:{value:(_vm.report),callback:function ($$v) {_vm.report=$$v},expression:\"report\"}}),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.errors.has('Report')),expression:\"errors.has('Report')\"}],staticClass:\"text-danger text-sm\"},[_vm._v(_vm._s(_vm.errors.first('Report')))])],1),_c('div',{staticClass:\"vx-col w-full mb-base\"},[_c('v-select',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isTankHidden),expression:\"isTankHidden\"},{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],ref:\"Tank\",staticClass:\"w-full\",attrs:{\"placeholder\":\"Search / Select Tank\",\"options\":_vm.DropdownData,\"name\":\"tank\"},model:{value:(_vm.tank),callback:function ($$v) {_vm.tank=$$v},expression:\"tank\"}}),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.errors.has('Tank')),expression:\"errors.has('Tank')\"}],staticClass:\"text-danger text-sm\"},[_vm._v(_vm._s(_vm.errors.first('Tank')))])],1),_c('div',{staticClass:\"vx-col w-full mb-base\"},[_c('vs-button',{ref:\"submit\",staticClass:\"rounded-lg w-full vs-con-loading__container\",attrs:{\"id\":\"addInfo\"},on:{\"click\":_vm.loadFamsInformation}},[_vm._v(\"Submit\")])],1)]),_c('div',{attrs:{\"id\":\"QBGrid\"}},[_c('div',{ref:\"grid\",attrs:{\"id\":\"BalancingGrid\"}})])],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./QuickBalancing.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./QuickBalancing.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./QuickBalancing.vue?vue&type=template&id=0bfa750c\"\nimport script from \"./QuickBalancing.vue?vue&type=script&lang=js\"\nexport * from \"./QuickBalancing.vue?vue&type=script&lang=js\"\nimport style0 from \"./QuickBalancing.vue?vue&type=style&index=0&id=0bfa750c&prod&lang=scss\"\nimport style1 from \"./QuickBalancing.vue?vue&type=style&index=1&id=0bfa750c&prod&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import { detach, getUniqueID, rippleEffect, setValue, attributes } from '@syncfusion/ej2-base';\nimport { getValue, addClass, deleteObject } from '@syncfusion/ej2-base';\n/**\n * Initialize wrapper element for angular.\n * @private\n */\nexport function wrapperInitialize(createElement, tag, type, element, WRAPPER, role) {\n var input = element;\n if (element.tagName === tag) {\n var ejInstance = getValue('ej2_instances', element);\n input = createElement('input', { attrs: { 'type': type } });\n var props = ['change', 'cssClass', 'label', 'labelPosition', 'id'];\n for (var index = 0, len = element.attributes.length; index < len; index++) {\n if (props.indexOf(element.attributes[index].nodeName) === -1) {\n input.setAttribute(element.attributes[index].nodeName, element.attributes[index].nodeValue);\n }\n }\n attributes(element, { 'class': WRAPPER, 'role': role, 'aria-checked': 'false' });\n element.appendChild(input);\n setValue('ej2_instances', ejInstance, input);\n deleteObject(element, 'ej2_instances');\n }\n return input;\n}\nexport function getTextNode(element) {\n var node;\n var childnode = element.childNodes;\n for (var i = 0; i < childnode.length; i++) {\n node = childnode[i];\n if (node.nodeType === 3) {\n return node;\n }\n }\n return null;\n}\n/**\n * Destroy the button components.\n * @private\n */\nexport function destroy(ejInst, wrapper, tagName) {\n if (tagName === 'INPUT') {\n wrapper.parentNode.insertBefore(ejInst.element, wrapper);\n detach(wrapper);\n ejInst.element.checked = false;\n ['name', 'value', 'disabled'].forEach(function (key) {\n ejInst.element.removeAttribute(key);\n });\n }\n else {\n ['role', 'aria-checked', 'class'].forEach(function (key) {\n wrapper.removeAttribute(key);\n });\n wrapper.innerHTML = '';\n }\n}\nexport function preRender(proxy, control, wrapper, element, moduleName) {\n element = wrapperInitialize(proxy.createElement, control, 'checkbox', element, wrapper, moduleName);\n proxy.element = element;\n if (proxy.element.getAttribute('type') !== 'checkbox') {\n proxy.element.setAttribute('type', 'checkbox');\n }\n if (!proxy.element.id) {\n proxy.element.id = getUniqueID('e-' + moduleName);\n }\n}\n/**\n * Creates CheckBox component UI with theming and ripple support.\n * @private\n */\nexport function createCheckBox(createElement, enableRipple, options) {\n if (enableRipple === void 0) { enableRipple = false; }\n if (options === void 0) { options = {}; }\n var wrapper = createElement('div', { className: 'e-checkbox-wrapper e-css' });\n if (options.cssClass) {\n addClass([wrapper], options.cssClass.split(' '));\n }\n if (options.enableRtl) {\n wrapper.classList.add('e-rtl');\n }\n if (enableRipple) {\n var rippleSpan = createElement('span', { className: 'e-ripple-container' });\n rippleEffect(rippleSpan, { isCenterRipple: true, duration: 400 });\n wrapper.appendChild(rippleSpan);\n }\n var frameSpan = createElement('span', { className: 'e-frame e-icons' });\n if (options.checked) {\n frameSpan.classList.add('e-check');\n }\n wrapper.appendChild(frameSpan);\n if (options.label) {\n var labelSpan = createElement('span', { className: 'e-label', innerHTML: options.label });\n wrapper.appendChild(labelSpan);\n }\n return wrapper;\n}\nexport function rippleMouseHandler(e, rippleSpan) {\n if (rippleSpan) {\n var event_1 = document.createEvent('MouseEvents');\n event_1.initEvent(e.type, false, true);\n rippleSpan.dispatchEvent(event_1);\n }\n}\n/**\n * Append hidden input to given element\n * @private\n */\nexport function setHiddenInput(proxy, wrap) {\n if (proxy.element.getAttribute('ejs-for')) {\n wrap.appendChild(proxy.createElement('input', {\n attrs: { 'name': proxy.name || proxy.element.name, 'value': 'false', 'type': 'hidden' }\n }));\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, Property, ChildProperty, Event, append, compile, isBlazor } from '@syncfusion/ej2-base';\nimport { EventHandler, Touch, Browser, Animation as PopupAnimation } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, getUniqueID, formatUnit } from '@syncfusion/ej2-base';\nimport { attributes, closest, removeClass, addClass, remove, updateBlazorTemplate, resetBlazorTemplate } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, Complex, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { Popup } from '../popup/popup';\nimport { calculatePosition } from '../common/position';\nimport { isCollide, fit } from '../common/collision';\nvar TOUCHEND_HIDE_DELAY = 1500;\nvar TAPHOLD_THRESHOLD = 500;\nvar SHOW_POINTER_TIP_GAP = 0;\nvar HIDE_POINTER_TIP_GAP = 8;\nvar MOUSE_TRAIL_GAP = 2;\nvar POINTER_ADJUST = 2;\nvar ROOT = 'e-tooltip';\nvar RTL = 'e-rtl';\nvar DEVICE = 'e-bigger';\nvar ICON = 'e-icons';\nvar CLOSE = 'e-tooltip-close';\nvar TOOLTIP_WRAP = 'e-tooltip-wrap';\nvar CONTENT = 'e-tip-content';\nvar ARROW_TIP = 'e-arrow-tip';\nvar ARROW_TIP_OUTER = 'e-arrow-tip-outer';\nvar ARROW_TIP_INNER = 'e-arrow-tip-inner';\nvar TIP_BOTTOM = 'e-tip-bottom';\nvar TIP_TOP = 'e-tip-top';\nvar TIP_LEFT = 'e-tip-left';\nvar TIP_RIGHT = 'e-tip-right';\nvar POPUP_ROOT = 'e-popup';\nvar POPUP_OPEN = 'e-popup-open';\nvar POPUP_CLOSE = 'e-popup-close';\nvar POPUP_LIB = 'e-lib';\nvar HIDE_POPUP = 'e-hidden';\nvar Animation = /** @class */ (function (_super) {\n __extends(Animation, _super);\n function Animation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property({ effect: 'FadeIn', duration: 150, delay: 0 })\n ], Animation.prototype, \"open\", void 0);\n __decorate([\n Property({ effect: 'FadeOut', duration: 150, delay: 0 })\n ], Animation.prototype, \"close\", void 0);\n return Animation;\n}(ChildProperty));\nexport { Animation };\n/**\n * Represents the Tooltip component that displays a piece of information about the target element on mouse hover.\n * ```html\n *
Show Tooltip
\n * ```\n * ```typescript\n * \n * ```\n */\nvar Tooltip = /** @class */ (function (_super) {\n __extends(Tooltip, _super);\n /**\n * Constructor for creating the Tooltip Component\n */\n function Tooltip(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isBlazorTooltip = false;\n _this.contentTargetValue = null;\n _this.contentEvent = null;\n _this.contentAnimation = null;\n return _this;\n }\n Tooltip.prototype.initialize = function () {\n this.formatPosition();\n if (!(this.isServerRender())) {\n addClass([this.element], ROOT);\n }\n };\n Tooltip.prototype.isServerRender = function () {\n return isBlazor() && this.isServerRendered;\n };\n Tooltip.prototype.formatPosition = function () {\n var _a, _b;\n if (this.position.indexOf('Top') === 0 || this.position.indexOf('Bottom') === 0) {\n _a = this.position.split(/(?=[A-Z])/), this.tooltipPositionY = _a[0], this.tooltipPositionX = _a[1];\n }\n else {\n _b = this.position.split(/(?=[A-Z])/), this.tooltipPositionX = _b[0], this.tooltipPositionY = _b[1];\n }\n };\n Tooltip.prototype.renderArrow = function () {\n this.setTipClass(this.position);\n if (!(this.isServerRender())) {\n var tip = this.createElement('div', { className: ARROW_TIP + ' ' + this.tipClass });\n tip.appendChild(this.createElement('div', { className: ARROW_TIP_OUTER + ' ' + this.tipClass }));\n tip.appendChild(this.createElement('div', { className: ARROW_TIP_INNER + ' ' + this.tipClass }));\n this.tooltipEle.appendChild(tip);\n }\n else {\n var tip = this.tooltipEle.querySelector('.' + ARROW_TIP);\n addClass([tip.querySelector('.' + ARROW_TIP_OUTER)], this.tipClass);\n addClass([tip.querySelector('.' + ARROW_TIP_INNER)], this.tipClass);\n this.tooltipEle.appendChild(tip);\n }\n };\n Tooltip.prototype.setTipClass = function (position) {\n if (position.indexOf('Right') === 0) {\n this.tipClass = TIP_LEFT;\n }\n else if (position.indexOf('Bottom') === 0) {\n this.tipClass = TIP_TOP;\n }\n else if (position.indexOf('Left') === 0) {\n this.tipClass = TIP_RIGHT;\n }\n else {\n this.tipClass = TIP_BOTTOM;\n }\n };\n Tooltip.prototype.renderPopup = function (target) {\n var elePos = this.mouseTrail ? { top: 0, left: 0 } : this.getTooltipPosition(target);\n this.tooltipEle.classList.remove(POPUP_LIB);\n this.popupObj = new Popup(this.tooltipEle, {\n height: this.height,\n width: this.width,\n position: { X: elePos.left, Y: elePos.top },\n enableRtl: this.enableRtl,\n open: this.openPopupHandler.bind(this),\n close: this.closePopupHandler.bind(this)\n });\n };\n Tooltip.prototype.getTooltipPosition = function (target) {\n this.tooltipEle.style.display = 'block';\n var pos = calculatePosition(target, this.tooltipPositionX, this.tooltipPositionY);\n var offsetPos = this.calculateTooltipOffset(this.position);\n var elePos = this.collisionFlipFit(target, pos.left + offsetPos.left, pos.top + offsetPos.top);\n this.tooltipEle.style.display = '';\n return elePos;\n };\n Tooltip.prototype.reposition = function (target) {\n var elePos = this.getTooltipPosition(target);\n this.popupObj.position = { X: elePos.left, Y: elePos.top };\n this.popupObj.dataBind();\n };\n Tooltip.prototype.openPopupHandler = function () {\n if (!this.mouseTrail && this.needTemplateReposition()) {\n this.reposition(this.findTarget());\n }\n this.trigger('afterOpen', this.tooltipEventArgs);\n };\n Tooltip.prototype.closePopupHandler = function () {\n resetBlazorTemplate(this.element.id + 'content', 'Content');\n this.clearTemplate(['content']);\n this.clear();\n this.trigger('afterClose', this.tooltipEventArgs);\n };\n Tooltip.prototype.calculateTooltipOffset = function (position) {\n var pos = { top: 0, left: 0 };\n var tooltipEleWidth = this.tooltipEle.offsetWidth;\n var tooltipEleHeight = this.tooltipEle.offsetHeight;\n var arrowEle = this.tooltipEle.querySelector('.' + ARROW_TIP);\n var tipWidth = arrowEle ? arrowEle.offsetWidth : 0;\n var tipHeight = arrowEle ? arrowEle.offsetHeight : 0;\n var tipAdjust = (this.showTipPointer ? SHOW_POINTER_TIP_GAP : HIDE_POINTER_TIP_GAP);\n var tipHeightAdjust = (tipHeight / 2) + POINTER_ADJUST + (this.tooltipEle.offsetHeight - this.tooltipEle.clientHeight);\n var tipWidthAdjust = (tipWidth / 2) + POINTER_ADJUST + (this.tooltipEle.offsetWidth - this.tooltipEle.clientWidth);\n if (this.mouseTrail) {\n tipAdjust += MOUSE_TRAIL_GAP;\n }\n switch (position) {\n case 'RightTop':\n pos.left += tipWidth + tipAdjust;\n pos.top -= tooltipEleHeight - tipHeightAdjust;\n break;\n case 'RightCenter':\n pos.left += tipWidth + tipAdjust;\n pos.top -= (tooltipEleHeight / 2);\n break;\n case 'RightBottom':\n pos.left += tipWidth + tipAdjust;\n pos.top -= (tipHeightAdjust);\n break;\n case 'BottomRight':\n pos.top += (tipHeight + tipAdjust);\n pos.left -= (tipWidthAdjust);\n break;\n case 'BottomCenter':\n pos.top += (tipHeight + tipAdjust);\n pos.left -= (tooltipEleWidth / 2);\n break;\n case 'BottomLeft':\n pos.top += (tipHeight + tipAdjust);\n pos.left -= (tooltipEleWidth - tipWidthAdjust);\n break;\n case 'LeftBottom':\n pos.left -= (tipWidth + tooltipEleWidth + tipAdjust);\n pos.top -= (tipHeightAdjust);\n break;\n case 'LeftCenter':\n pos.left -= (tipWidth + tooltipEleWidth + tipAdjust);\n pos.top -= (tooltipEleHeight / 2);\n break;\n case 'LeftTop':\n pos.left -= (tipWidth + tooltipEleWidth + tipAdjust);\n pos.top -= (tooltipEleHeight - tipHeightAdjust);\n break;\n case 'TopLeft':\n pos.top -= (tooltipEleHeight + tipHeight + tipAdjust);\n pos.left -= (tooltipEleWidth - tipWidthAdjust);\n break;\n case 'TopRight':\n pos.top -= (tooltipEleHeight + tipHeight + tipAdjust);\n pos.left -= (tipWidthAdjust);\n break;\n default:\n pos.top -= (tooltipEleHeight + tipHeight + tipAdjust);\n pos.left -= (tooltipEleWidth / 2);\n break;\n }\n pos.left += this.offsetX;\n pos.top += this.offsetY;\n return pos;\n };\n Tooltip.prototype.updateTipPosition = function (position) {\n var selEle = this.tooltipEle.querySelectorAll('.' + ARROW_TIP + ',.' + ARROW_TIP_OUTER + ',.' + ARROW_TIP_INNER);\n var removeList = [TIP_BOTTOM, TIP_TOP, TIP_LEFT, TIP_RIGHT];\n removeClass(selEle, removeList);\n this.setTipClass(position);\n addClass(selEle, this.tipClass);\n };\n Tooltip.prototype.adjustArrow = function (target, position, tooltipPositionX, tooltipPositionY) {\n if (this.showTipPointer === false) {\n return;\n }\n this.updateTipPosition(position);\n var leftValue;\n var topValue;\n this.tooltipEle.style.display = 'block';\n var tooltipWidth = this.tooltipEle.clientWidth;\n var tooltipHeight = this.tooltipEle.clientHeight;\n var arrowEle = this.tooltipEle.querySelector('.' + ARROW_TIP);\n var arrowInnerELe = this.tooltipEle.querySelector('.' + ARROW_TIP_INNER);\n var tipWidth = arrowEle.offsetWidth;\n var tipHeight = arrowEle.offsetHeight;\n this.tooltipEle.style.display = '';\n if (this.tipClass === TIP_BOTTOM || this.tipClass === TIP_TOP) {\n if (this.tipClass === TIP_BOTTOM) {\n topValue = '99.9%';\n // Arrow icon aligned -2px height from ArrowOuterTip div\n arrowInnerELe.style.top = '-' + (tipHeight - 2) + 'px';\n }\n else {\n topValue = -(tipHeight - 1) + 'px';\n // Arrow icon aligned -6px height from ArrowOuterTip div\n arrowInnerELe.style.top = '-' + (tipHeight - 6) + 'px';\n }\n if (target) {\n var tipPosExclude = tooltipPositionX !== 'Center' || (tooltipWidth > target.offsetWidth) || this.mouseTrail;\n if ((tipPosExclude && tooltipPositionX === 'Left') || (!tipPosExclude && this.tipPointerPosition === 'End')) {\n leftValue = (tooltipWidth - tipWidth - POINTER_ADJUST) + 'px';\n }\n else if ((tipPosExclude && tooltipPositionX === 'Right') || (!tipPosExclude && this.tipPointerPosition === 'Start')) {\n leftValue = POINTER_ADJUST + 'px';\n }\n else {\n leftValue = ((tooltipWidth / 2) - (tipWidth / 2)) + 'px';\n }\n }\n }\n else {\n if (this.tipClass === TIP_RIGHT) {\n leftValue = '99.9%';\n // Arrow icon aligned -2px left from ArrowOuterTip div\n arrowInnerELe.style.left = '-' + (tipWidth - 2) + 'px';\n }\n else {\n leftValue = -(tipWidth - 1) + 'px';\n // Arrow icon aligned -2px from ArrowOuterTip width\n arrowInnerELe.style.left = (-(tipWidth) + (tipWidth - 2)) + 'px';\n }\n var tipPosExclude = tooltipPositionY !== 'Center' || (tooltipHeight > target.offsetHeight) || this.mouseTrail;\n if ((tipPosExclude && tooltipPositionY === 'Top') || (!tipPosExclude && this.tipPointerPosition === 'End')) {\n topValue = (tooltipHeight - tipHeight - POINTER_ADJUST) + 'px';\n }\n else if ((tipPosExclude && tooltipPositionY === 'Bottom') || (!tipPosExclude && this.tipPointerPosition === 'Start')) {\n topValue = POINTER_ADJUST + 'px';\n }\n else {\n topValue = ((tooltipHeight / 2) - (tipHeight / 2)) + 'px';\n }\n }\n arrowEle.style.top = topValue;\n arrowEle.style.left = leftValue;\n };\n Tooltip.prototype.renderContent = function (target) {\n var tooltipContent = this.tooltipEle.querySelector('.' + CONTENT);\n if (this.cssClass) {\n addClass([this.tooltipEle], this.cssClass.split(' '));\n }\n if (target && !isNullOrUndefined(target.getAttribute('title'))) {\n target.setAttribute('data-content', target.getAttribute('title'));\n target.removeAttribute('title');\n }\n if (!isNullOrUndefined(this.content)) {\n if (this.isBlazorTooltip || !(this.isServerRender())) {\n tooltipContent.innerHTML = '';\n if (this.content instanceof HTMLElement) {\n tooltipContent.appendChild(this.content);\n }\n else if (typeof this.content === 'string' && this.content.indexOf('
Blazor') < 0) {\n if (this.enableHtmlSanitizer) {\n this.setProperties({ content: SanitizeHtmlHelper.sanitize(this.content) }, true);\n }\n tooltipContent[this.enableHtmlParse ? 'innerHTML' : 'textContent'] = this.content;\n }\n else {\n var templateFunction = compile(this.content);\n var tempArr = templateFunction({}, this, 'content', this.element.id + 'content', undefined, undefined, tooltipContent);\n if (tempArr) {\n append(tempArr, tooltipContent);\n }\n this.renderReactTemplates();\n if (typeof this.content === 'string' && this.content.indexOf('
Blazor') >= 0) {\n this.isBlazorTemplate = true;\n updateBlazorTemplate(this.element.id + 'content', 'Content', this);\n }\n }\n }\n }\n else {\n if (target && !isNullOrUndefined(target.getAttribute('data-content'))) {\n tooltipContent.innerHTML = target.getAttribute('data-content');\n }\n }\n };\n Tooltip.prototype.renderCloseIcon = function () {\n if (!this.isSticky) {\n return;\n }\n var tipClose = this.createElement('div', { className: ICON + ' ' + CLOSE });\n this.tooltipEle.appendChild(tipClose);\n EventHandler.add(tipClose, Browser.touchStartEvent, this.onStickyClose, this);\n };\n Tooltip.prototype.addDescribedBy = function (target, id) {\n var describedby = (target.getAttribute('aria-describedby') || '').split(/\\s+/);\n if (describedby.indexOf(id) < 0) {\n describedby.push(id);\n }\n attributes(target, { 'aria-describedby': describedby.join(' ').trim(), 'data-tooltip-id': id });\n };\n Tooltip.prototype.removeDescribedBy = function (target) {\n var id = target.getAttribute('data-tooltip-id');\n var describedby = (target.getAttribute('aria-describedby') || '').split(/\\s+/);\n var index = describedby.indexOf(id);\n if (index !== -1) {\n describedby.splice(index, 1);\n }\n target.removeAttribute('data-tooltip-id');\n var orgdescribedby = describedby.join(' ').trim();\n if (orgdescribedby) {\n target.setAttribute('aria-describedby', orgdescribedby);\n }\n else {\n target.removeAttribute('aria-describedby');\n }\n };\n Tooltip.prototype.tapHoldHandler = function (evt) {\n clearTimeout(this.autoCloseTimer);\n this.targetHover(evt.originalEvent);\n };\n Tooltip.prototype.touchEndHandler = function (e) {\n var _this = this;\n if (this.isSticky) {\n return;\n }\n var close = function () {\n _this.close();\n };\n this.autoCloseTimer = setTimeout(close, TOUCHEND_HIDE_DELAY);\n };\n Tooltip.prototype.targetClick = function (e) {\n var target;\n if (this.target) {\n target = closest(e.target, this.target);\n }\n else {\n target = this.element;\n }\n if (isNullOrUndefined(target)) {\n return;\n }\n if (target.getAttribute('data-tooltip-id') === null) {\n this.targetHover(e);\n }\n else if (!this.isSticky) {\n this.hideTooltip(this.animation.close, e, target);\n }\n };\n Tooltip.prototype.targetHover = function (e) {\n var target;\n if (this.target) {\n target = closest(e.target, this.target);\n }\n else {\n target = this.element;\n }\n if (isNullOrUndefined(target) || (target.getAttribute('data-tooltip-id') !== null && this.closeDelay === 0)) {\n return;\n }\n var targetList = [].slice.call(document.querySelectorAll('[data-tooltip-id= ' + this.ctrlId + '_content]'));\n for (var _i = 0, targetList_1 = targetList; _i < targetList_1.length; _i++) {\n var target_1 = targetList_1[_i];\n this.restoreElement(target_1);\n }\n this.showTooltip(target, this.animation.open, e);\n };\n Tooltip.prototype.showTooltip = function (target, showAnimation, e) {\n var _this = this;\n clearTimeout(this.showTimer);\n clearTimeout(this.hideTimer);\n this.tooltipEventArgs = {\n type: e ? e.type : null, cancel: false, target: target, event: e ? e : null,\n element: this.tooltipEle, isInteracted: !isNullOrUndefined(e)\n };\n var observeCallback = function (beforeRenderArgs) {\n _this.beforeRenderCallback(beforeRenderArgs, target, e, showAnimation);\n };\n this.trigger('beforeRender', this.tooltipEventArgs, observeCallback.bind(this));\n };\n Tooltip.prototype.beforeRenderCallback = function (beforeRenderArgs, target, e, showAnimation) {\n var isBlazorTooltipRendered = false;\n if (beforeRenderArgs.cancel) {\n this.isHidden = true;\n this.clear();\n }\n else {\n this.isHidden = false;\n if (isNullOrUndefined(this.tooltipEle)) {\n if (this.isServerRender()) {\n this.contentTargetValue = target;\n this.contentEvent = e;\n this.contentAnimation = showAnimation;\n var args = { 'enableTooltip': 'true' };\n // tslint:disable\n this.interopAdaptor.invokeMethodAsync('OnTooltipServerCall', args);\n // tslint:enable\n isBlazorTooltipRendered = true;\n }\n else {\n this.ctrlId = this.element.getAttribute('id') ?\n getUniqueID(this.element.getAttribute('id')) : getUniqueID('tooltip');\n this.tooltipEle = this.createElement('div', {\n className: TOOLTIP_WRAP + ' ' + POPUP_ROOT + ' ' + POPUP_LIB, attrs: {\n role: 'tooltip', 'aria-hidden': 'false', 'id': this.ctrlId + '_content'\n }, styles: 'width:' +\n formatUnit(this.width) + ';height:' + formatUnit(this.height) + ';position:absolute;'\n });\n this.beforeRenderBlazor(target, this);\n }\n if (!isBlazorTooltipRendered) {\n this.afterRenderBlazor(target, e, showAnimation, this);\n }\n }\n else {\n if (this.isServerRender()) {\n addClass([this.tooltipEle], POPUP_OPEN);\n document.body.appendChild(this.tooltipEle);\n this.renderCloseIcon();\n this.renderPopup(target);\n }\n if (target) {\n this.adjustArrow(target, this.position, this.tooltipPositionX, this.tooltipPositionY);\n this.addDescribedBy(target, this.ctrlId + '_content');\n this.renderContent(target);\n PopupAnimation.stop(this.tooltipEle);\n this.reposition(target);\n this.afterRenderBlazor(target, e, showAnimation, this);\n }\n }\n }\n };\n ;\n Tooltip.prototype.contentUpdated = function (args) {\n if (isNullOrUndefined(this.tooltipEle)) {\n if (this.isServerRender()) {\n this.ctrlId = this.element.id;\n this.tooltipEle = document.querySelector('#' + this.ctrlId + '_content');\n if (this.tooltipEle) {\n this.tooltipEle.setAttribute('style', 'width:' + formatUnit(this.width) +\n ';height:' + formatUnit(this.height) + ';position:absolute;');\n this.beforeRenderBlazor(this.contentTargetValue, this);\n this.afterRenderBlazor(this.contentTargetValue, this.contentEvent, this.contentAnimation, this);\n this.contentTargetValue = this.contentEvent = this.contentAnimation = null;\n }\n }\n }\n };\n ;\n Tooltip.prototype.beforeRenderBlazor = function (target, ctrlObj) {\n if (target) {\n if (Browser.isDevice) {\n addClass([ctrlObj.tooltipEle], DEVICE);\n }\n if (ctrlObj.width !== 'auto') {\n ctrlObj.tooltipEle.style.maxWidth = formatUnit(ctrlObj.width);\n }\n if (!(this.isServerRender())) {\n ctrlObj.tooltipEle.appendChild(ctrlObj.createElement('div', { className: CONTENT }));\n }\n document.body.appendChild(ctrlObj.tooltipEle);\n removeClass([ctrlObj.tooltipEle], HIDE_POPUP);\n ctrlObj.addDescribedBy(target, ctrlObj.ctrlId + '_content');\n ctrlObj.renderContent(target);\n addClass([ctrlObj.tooltipEle], POPUP_OPEN);\n if (ctrlObj.showTipPointer) {\n ctrlObj.renderArrow();\n }\n ctrlObj.renderCloseIcon();\n ctrlObj.renderPopup(target);\n ctrlObj.adjustArrow(target, ctrlObj.position, ctrlObj.tooltipPositionX, ctrlObj.tooltipPositionY);\n PopupAnimation.stop(ctrlObj.tooltipEle);\n ctrlObj.reposition(target);\n }\n };\n Tooltip.prototype.afterRenderBlazor = function (target, e, showAnimation, ctrlObj) {\n if (target) {\n removeClass([ctrlObj.tooltipEle], POPUP_OPEN);\n addClass([ctrlObj.tooltipEle], POPUP_CLOSE);\n ctrlObj.tooltipEventArgs = {\n type: e ? e.type : null, cancel: false, target: target, event: e ? e : null,\n element: ctrlObj.tooltipEle, isInteracted: !isNullOrUndefined(e)\n };\n if (ctrlObj.needTemplateReposition() && !ctrlObj.mouseTrail) {\n ctrlObj.tooltipEle.style.display = 'none';\n }\n var observeCallback = function (observedArgs) {\n ctrlObj.beforeOpenCallback(observedArgs, target, showAnimation, e);\n };\n ctrlObj.trigger('beforeOpen', ctrlObj.tooltipEventArgs, observeCallback.bind(ctrlObj));\n }\n };\n Tooltip.prototype.beforeOpenCallback = function (observedArgs, target, showAnimation, e) {\n var _this = this;\n if (observedArgs.cancel) {\n this.isHidden = true;\n this.clear();\n this.restoreElement(target);\n }\n else {\n var openAnimation_1 = {\n name: showAnimation.effect,\n duration: showAnimation.duration,\n delay: showAnimation.delay,\n timingFunction: 'easeOut'\n };\n if (showAnimation.effect === 'None') {\n openAnimation_1 = undefined;\n }\n if (this.openDelay > 0) {\n var show = function () {\n if (_this.mouseTrail) {\n EventHandler.add(target, 'mousemove touchstart mouseenter', _this.onMouseMove, _this);\n }\n if (_this.popupObj) {\n _this.popupObj.show(openAnimation_1, target);\n }\n };\n this.showTimer = setTimeout(show, this.openDelay);\n }\n else {\n if (this.popupObj) {\n this.popupObj.show(openAnimation_1, target);\n }\n }\n }\n if (e) {\n this.wireMouseEvents(e, target);\n }\n };\n Tooltip.prototype.needTemplateReposition = function () {\n // tslint:disable-next-line:no-any\n var tooltip = this;\n return !isNullOrUndefined(tooltip.viewContainerRef)\n && typeof tooltip.viewContainerRef !== 'string'\n || (this.isServerRender()) && this.isBlazorTemplate;\n };\n Tooltip.prototype.checkCollision = function (target, x, y) {\n var elePos = {\n left: x, top: y, position: this.position,\n horizontal: this.tooltipPositionX, vertical: this.tooltipPositionY\n };\n var affectedPos = isCollide(this.tooltipEle, this.checkCollideTarget(), x, y);\n if (affectedPos.length > 0) {\n elePos.horizontal = affectedPos.indexOf('left') >= 0 ? 'Right' : affectedPos.indexOf('right') >= 0 ? 'Left' :\n this.tooltipPositionX;\n elePos.vertical = affectedPos.indexOf('top') >= 0 ? 'Bottom' : affectedPos.indexOf('bottom') >= 0 ? 'Top' :\n this.tooltipPositionY;\n }\n return elePos;\n };\n Tooltip.prototype.collisionFlipFit = function (target, x, y) {\n var elePos = this.checkCollision(target, x, y);\n var newpos = elePos.position;\n if (this.tooltipPositionY !== elePos.vertical) {\n newpos = ((this.position.indexOf('Bottom') === 0 || this.position.indexOf('Top') === 0) ?\n elePos.vertical + this.tooltipPositionX : this.tooltipPositionX + elePos.vertical);\n }\n if (this.tooltipPositionX !== elePos.horizontal) {\n if (newpos.indexOf('Left') === 0) {\n elePos.vertical = (newpos === 'LeftTop' || newpos === 'LeftCenter') ? 'Top' : 'Bottom';\n newpos = (elePos.vertical + 'Left');\n }\n if (newpos.indexOf('Right') === 0) {\n elePos.vertical = (newpos === 'RightTop' || newpos === 'RightCenter') ? 'Top' : 'Bottom';\n newpos = (elePos.vertical + 'Right');\n }\n elePos.horizontal = this.tooltipPositionX;\n }\n this.tooltipEventArgs = {\n type: null, cancel: false, target: target, event: null,\n element: this.tooltipEle, collidedPosition: newpos\n };\n this.trigger('beforeCollision', this.tooltipEventArgs);\n if (elePos.position !== newpos) {\n var pos = calculatePosition(target, elePos.horizontal, elePos.vertical);\n this.adjustArrow(target, newpos, elePos.horizontal, elePos.vertical);\n var offsetPos = this.calculateTooltipOffset(newpos);\n offsetPos.top -= (('TopBottom'.indexOf(this.position.split(/(?=[A-Z])/)[0]) !== -1) &&\n ('TopBottom'.indexOf(newpos.split(/(?=[A-Z])/)[0]) !== -1)) ? (2 * this.offsetY) : 0;\n offsetPos.left -= (('RightLeft'.indexOf(this.position.split(/(?=[A-Z])/)[0]) !== -1) &&\n ('RightLeft'.indexOf(newpos.split(/(?=[A-Z])/)[0]) !== -1)) ? (2 * this.offsetX) : 0;\n elePos.position = newpos;\n elePos.left = pos.left + offsetPos.left;\n elePos.top = pos.top + offsetPos.top;\n }\n else {\n this.adjustArrow(target, newpos, elePos.horizontal, elePos.vertical);\n }\n var eleOffset = { left: elePos.left, top: elePos.top };\n var left = fit(this.tooltipEle, this.checkCollideTarget(), { X: true, Y: false }, eleOffset).left;\n this.tooltipEle.style.display = 'block';\n if (this.showTipPointer && (newpos.indexOf('Bottom') === 0 || newpos.indexOf('Top') === 0)) {\n var arrowEle = this.tooltipEle.querySelector('.' + ARROW_TIP);\n var arrowleft = parseInt(arrowEle.style.left, 10) - (left - elePos.left);\n if (arrowleft < 0) {\n arrowleft = 0;\n }\n else if ((arrowleft + arrowEle.offsetWidth) > this.tooltipEle.clientWidth) {\n arrowleft = this.tooltipEle.clientWidth - arrowEle.offsetWidth;\n }\n arrowEle.style.left = arrowleft.toString() + 'px';\n }\n this.tooltipEle.style.display = '';\n eleOffset.left = left;\n return eleOffset;\n };\n Tooltip.prototype.checkCollideTarget = function () {\n return !this.windowCollision && this.target ? this.element : null;\n };\n Tooltip.prototype.hideTooltip = function (hideAnimation, e, targetElement) {\n var _this = this;\n if (this.closeDelay > 0) {\n clearTimeout(this.hideTimer);\n clearTimeout(this.showTimer);\n var hide = function () {\n if (_this.closeDelay && _this.tooltipEle && _this.isTooltipOpen) {\n return;\n }\n _this.tooltipHide(hideAnimation, e, targetElement);\n };\n this.hideTimer = setTimeout(hide, this.closeDelay);\n }\n else {\n this.tooltipHide(hideAnimation, e, targetElement);\n }\n };\n Tooltip.prototype.tooltipHide = function (hideAnimation, e, targetElement) {\n var _this = this;\n var target;\n if (e) {\n target = this.target ? (targetElement || e.target) : this.element;\n }\n else {\n target = document.querySelector('[data-tooltip-id= ' + this.ctrlId + '_content]');\n }\n this.tooltipEventArgs = {\n type: e ? e.type : null, cancel: false, target: target, event: e ? e : null,\n element: this.tooltipEle, isInteracted: !isNullOrUndefined(e)\n };\n // this line commented for close the tooltip popup element even the target element destroyed in a page.\n //if (isNullOrUndefined(target)) { return; }\n this.trigger('beforeClose', this.tooltipEventArgs, function (observedArgs) {\n if (!observedArgs.cancel) {\n if (_this.isServerRender()) {\n _this.blazorHide(hideAnimation, target);\n }\n else {\n _this.popupHide(hideAnimation, target);\n }\n }\n else {\n _this.isHidden = false;\n }\n });\n };\n /* istanbul ignore next */\n Tooltip.prototype.blazorHide = function (hideAnimation, target) {\n var proxy = this;\n var hide = function () {\n proxy.popupHide(hideAnimation, target);\n };\n if (this.popupObj) {\n this.popupHide(hideAnimation, target);\n }\n else {\n setTimeout(hide, 200);\n }\n };\n Tooltip.prototype.popupHide = function (hideAnimation, target) {\n if (target) {\n this.restoreElement(target);\n }\n this.isHidden = true;\n var closeAnimation = {\n name: hideAnimation.effect,\n duration: hideAnimation.duration,\n delay: hideAnimation.delay,\n timingFunction: 'easeIn'\n };\n if (hideAnimation.effect === 'None') {\n closeAnimation = undefined;\n }\n if (this.popupObj) {\n this.popupObj.hide(closeAnimation);\n }\n };\n Tooltip.prototype.restoreElement = function (target) {\n this.unwireMouseEvents(target);\n if (!isNullOrUndefined(target.getAttribute('data-content'))) {\n target.setAttribute('title', target.getAttribute('data-content'));\n target.removeAttribute('data-content');\n }\n this.removeDescribedBy(target);\n };\n Tooltip.prototype.clear = function () {\n if (this.tooltipEle) {\n removeClass([this.tooltipEle], POPUP_CLOSE);\n addClass([this.tooltipEle], POPUP_OPEN);\n }\n if (this.isHidden) {\n if (this.popupObj) {\n this.popupObj.destroy();\n }\n if (this.isServerRender() && this.tooltipEle) {\n this.tooltipEle.style.display = 'none';\n var args = { 'enableTooltip': 'false' };\n // tslint:disable\n this.interopAdaptor.invokeMethodAsync('OnTooltipServerCall', args);\n // tslint:enable\n remove(this.tooltipEle);\n }\n else if (this.tooltipEle) {\n remove(this.tooltipEle);\n }\n this.tooltipEle = null;\n this.popupObj = null;\n }\n };\n Tooltip.prototype.tooltipHover = function (e) {\n if (this.tooltipEle) {\n this.isTooltipOpen = true;\n }\n };\n Tooltip.prototype.tooltipMouseOut = function (e) {\n this.isTooltipOpen = false;\n this.hideTooltip(this.animation.close, e, this.findTarget());\n };\n Tooltip.prototype.onMouseOut = function (e) {\n var enteredElement = e.relatedTarget;\n // don't close the tooltip only if it is tooltip content element\n if (enteredElement && !this.mouseTrail) {\n var checkForTooltipElement = closest(enteredElement, \".\" + TOOLTIP_WRAP + \".\" + POPUP_LIB + \".\" + POPUP_ROOT);\n if (checkForTooltipElement) {\n EventHandler.add(checkForTooltipElement, 'mouseleave', this.tooltipElementMouseOut, this);\n }\n else {\n this.hideTooltip(this.animation.close, e, this.findTarget());\n if (this.closeDelay === 0) {\n this.clear();\n }\n }\n }\n else {\n this.hideTooltip(this.animation.close, e, this.findTarget());\n this.clear();\n }\n };\n Tooltip.prototype.tooltipElementMouseOut = function (e) {\n this.hideTooltip(this.animation.close, e, this.findTarget());\n EventHandler.remove(this.element, 'mouseleave', this.tooltipElementMouseOut);\n this.clear();\n };\n Tooltip.prototype.onStickyClose = function (e) {\n this.close();\n };\n Tooltip.prototype.onMouseMove = function (event) {\n var eventPageX = 0;\n var eventPageY = 0;\n if (event.type.indexOf('touch') > -1) {\n event.preventDefault();\n eventPageX = event.touches[0].pageX;\n eventPageY = event.touches[0].pageY;\n }\n else {\n eventPageX = event.pageX;\n eventPageY = event.pageY;\n }\n PopupAnimation.stop(this.tooltipEle);\n removeClass([this.tooltipEle], POPUP_CLOSE);\n addClass([this.tooltipEle], POPUP_OPEN);\n this.adjustArrow(event.target, this.position, this.tooltipPositionX, this.tooltipPositionY);\n var pos = this.calculateTooltipOffset(this.position);\n var x = eventPageX + pos.left + this.offsetX;\n var y = eventPageY + pos.top + this.offsetY;\n var elePos = this.checkCollision(event.target, x, y);\n if (this.tooltipPositionX !== elePos.horizontal || this.tooltipPositionY !== elePos.vertical) {\n var newpos = (this.position.indexOf('Bottom') === 0 || this.position.indexOf('Top') === 0) ?\n elePos.vertical + elePos.horizontal : elePos.horizontal + elePos.vertical;\n elePos.position = newpos;\n this.adjustArrow(event.target, elePos.position, elePos.horizontal, elePos.vertical);\n var colpos = this.calculateTooltipOffset(elePos.position);\n elePos.left = eventPageX + colpos.left - this.offsetX;\n elePos.top = eventPageY + colpos.top - this.offsetY;\n }\n this.tooltipEle.style.left = elePos.left + 'px';\n this.tooltipEle.style.top = elePos.top + 'px';\n };\n Tooltip.prototype.keyDown = function (event) {\n if (this.tooltipEle && event.keyCode === 27) {\n this.close();\n }\n };\n Tooltip.prototype.touchEnd = function (e) {\n if (this.tooltipEle && closest(e.target, '.' + ROOT) === null && !this.isSticky) {\n this.close();\n }\n };\n Tooltip.prototype.scrollHandler = function (e) {\n if (this.tooltipEle) {\n if (!(closest(e.target, \".\" + TOOLTIP_WRAP + \".\" + POPUP_LIB + \".\" + POPUP_ROOT))) {\n this.close();\n }\n }\n };\n /**\n * Core method that initializes the control rendering.\n * @private\n */\n Tooltip.prototype.render = function () {\n this.initialize();\n this.wireEvents(this.opensOn);\n this.renderComplete();\n };\n /**\n * Initializes the values of private members.\n * @private\n */\n Tooltip.prototype.preRender = function () {\n this.tipClass = TIP_BOTTOM;\n this.tooltipPositionX = 'Center';\n this.tooltipPositionY = 'Top';\n this.isHidden = true;\n };\n /**\n * Binding events to the Tooltip element.\n * @hidden\n */\n Tooltip.prototype.wireEvents = function (trigger) {\n var triggerList = this.getTriggerList(trigger);\n for (var _i = 0, triggerList_1 = triggerList; _i < triggerList_1.length; _i++) {\n var opensOn = triggerList_1[_i];\n if (opensOn === 'Custom') {\n return;\n }\n if (opensOn === 'Focus') {\n this.wireFocusEvents();\n }\n if (opensOn === 'Click') {\n EventHandler.add(this.element, Browser.touchStartEvent, this.targetClick, this);\n }\n if (opensOn === 'Hover') {\n if (Browser.isDevice) {\n this.touchModule = new Touch(this.element, {\n tapHoldThreshold: TAPHOLD_THRESHOLD,\n tapHold: this.tapHoldHandler.bind(this)\n });\n EventHandler.add(this.element, Browser.touchEndEvent, this.touchEndHandler, this);\n }\n else {\n EventHandler.add(this.element, 'mouseover', this.targetHover, this);\n if (this.isServerRender() && !this.isSticky) {\n EventHandler.add(this.element, 'mouseleave', this.onMouseOut, this);\n }\n }\n }\n }\n EventHandler.add(document, 'touchend', this.touchEnd, this);\n EventHandler.add(document, 'scroll wheel', this.scrollHandler, this);\n EventHandler.add(document, 'keydown', this.keyDown, this);\n };\n Tooltip.prototype.getTriggerList = function (trigger) {\n if (trigger === 'Auto') {\n trigger = (Browser.isDevice) ? 'Hover' : 'Hover Focus';\n }\n return trigger.split(' ');\n };\n Tooltip.prototype.wireFocusEvents = function () {\n if (!isNullOrUndefined(this.target)) {\n var targetList = [].slice.call(this.element.querySelectorAll(this.target));\n for (var _i = 0, targetList_2 = targetList; _i < targetList_2.length; _i++) {\n var target = targetList_2[_i];\n EventHandler.add(target, 'focus', this.targetHover, this);\n }\n }\n else {\n EventHandler.add(this.element, 'focus', this.targetHover, this);\n }\n };\n Tooltip.prototype.wireMouseEvents = function (e, target) {\n if (this.tooltipEle) {\n if (!this.isSticky) {\n if (e.type === 'focus') {\n EventHandler.add(target, 'blur', this.onMouseOut, this);\n }\n if (e.type === 'mouseover') {\n if (!this.isServerRender()) {\n EventHandler.add(target, 'mouseleave', this.onMouseOut, this);\n }\n }\n if (this.closeDelay) {\n EventHandler.add(this.tooltipEle, 'mouseenter', this.tooltipHover, this);\n EventHandler.add(this.tooltipEle, 'mouseleave', this.tooltipMouseOut, this);\n }\n }\n if (this.mouseTrail && this.openDelay === 0) {\n EventHandler.add(target, 'mousemove touchstart mouseenter', this.onMouseMove, this);\n }\n }\n };\n /**\n * Unbinding events from the element on widget destroy.\n * @hidden\n */\n Tooltip.prototype.unwireEvents = function (trigger) {\n var triggerList = this.getTriggerList(trigger);\n for (var _i = 0, triggerList_2 = triggerList; _i < triggerList_2.length; _i++) {\n var opensOn = triggerList_2[_i];\n if (opensOn === 'Custom') {\n return;\n }\n if (opensOn === 'Focus') {\n this.unwireFocusEvents();\n }\n if (opensOn === 'Click') {\n EventHandler.remove(this.element, Browser.touchStartEvent, this.targetClick);\n }\n if (opensOn === 'Hover') {\n if (Browser.isDevice) {\n if (this.touchModule) {\n this.touchModule.destroy();\n }\n EventHandler.remove(this.element, Browser.touchEndEvent, this.touchEndHandler);\n }\n else {\n EventHandler.remove(this.element, 'mouseover', this.targetHover);\n if (this.isServerRender() && !this.isSticky) {\n EventHandler.remove(this.element, 'mouseleave', this.onMouseOut);\n }\n }\n }\n }\n EventHandler.remove(document, 'touchend', this.touchEnd);\n EventHandler.remove(document, 'scroll wheel', this.scrollHandler);\n EventHandler.remove(document, 'keydown', this.keyDown);\n };\n Tooltip.prototype.unwireFocusEvents = function () {\n if (!isNullOrUndefined(this.target)) {\n var targetList = [].slice.call(this.element.querySelectorAll(this.target));\n for (var _i = 0, targetList_3 = targetList; _i < targetList_3.length; _i++) {\n var target = targetList_3[_i];\n EventHandler.remove(target, 'focus', this.targetHover);\n }\n }\n else {\n EventHandler.remove(this.element, 'focus', this.targetHover);\n }\n };\n Tooltip.prototype.unwireMouseEvents = function (target) {\n if (!this.isSticky) {\n var triggerList = this.getTriggerList(this.opensOn);\n for (var _i = 0, triggerList_3 = triggerList; _i < triggerList_3.length; _i++) {\n var opensOn = triggerList_3[_i];\n if (opensOn === 'Focus') {\n EventHandler.remove(target, 'blur', this.onMouseOut);\n }\n if (opensOn === 'Hover' && !Browser.isDevice) {\n if (!this.isServerRender()) {\n EventHandler.remove(target, 'mouseleave', this.onMouseOut);\n }\n }\n }\n if (this.closeDelay) {\n EventHandler.remove(target, 'mouseenter', this.tooltipHover);\n EventHandler.remove(target, 'mouseleave', this.tooltipMouseOut);\n }\n }\n if (this.mouseTrail) {\n EventHandler.remove(target, 'mousemove touchstart mouseenter', this.onMouseMove);\n }\n };\n Tooltip.prototype.findTarget = function () {\n var target = document.querySelector('[data-tooltip-id= ' + this.ctrlId + '_content]');\n return target;\n };\n /**\n * Core method to return the component name.\n * @private\n */\n Tooltip.prototype.getModuleName = function () {\n return 'tooltip';\n };\n /**\n * Returns the properties to be maintained in the persisted state.\n * @private\n */\n Tooltip.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n /**\n * Called internally, if any of the property value changed.\n * @private\n */\n Tooltip.prototype.onPropertyChanged = function (newProp, oldProp) {\n var targetElement = this.findTarget();\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'width':\n if (this.tooltipEle && targetElement) {\n this.tooltipEle.style.width = this.tooltipEle.style.maxWidth = formatUnit(newProp.width);\n this.reposition(targetElement);\n }\n break;\n case 'height':\n if (this.tooltipEle && targetElement) {\n this.tooltipEle.style.height = formatUnit(newProp.height);\n this.reposition(targetElement);\n }\n break;\n case 'content':\n if (this.tooltipEle) {\n if (this.isServerRender()) {\n this.isBlazorTooltip = true;\n }\n this.renderContent();\n }\n else if (this.isServerRender()) {\n var args = { 'content': newProp.content };\n // tslint:disable\n this.interopAdaptor.invokeMethodAsync('OnTooltipServerCall', args);\n // tslint:enable\n }\n break;\n case 'opensOn':\n this.unwireEvents(oldProp.opensOn);\n this.wireEvents(newProp.opensOn);\n break;\n case 'position':\n this.formatPosition();\n if (this.tooltipEle && targetElement) {\n var arrowInnerELe = this.tooltipEle.querySelector('.' + ARROW_TIP_INNER);\n arrowInnerELe.style.top = arrowInnerELe.style.left = null;\n this.reposition(targetElement);\n }\n break;\n case 'tipPointerPosition':\n if (this.tooltipEle && targetElement) {\n this.reposition(targetElement);\n }\n break;\n case 'offsetX':\n if (this.tooltipEle) {\n var x = newProp.offsetX - oldProp.offsetX;\n this.tooltipEle.style.left = (parseInt(this.tooltipEle.style.left, 10) + (x)).toString() + 'px';\n }\n break;\n case 'offsetY':\n if (this.tooltipEle) {\n var y = newProp.offsetY - oldProp.offsetY;\n this.tooltipEle.style.top = (parseInt(this.tooltipEle.style.top, 10) + (y)).toString() + 'px';\n }\n break;\n case 'cssClass':\n if (this.tooltipEle) {\n if (oldProp.cssClass) {\n removeClass([this.tooltipEle], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([this.tooltipEle], newProp.cssClass.split(' '));\n }\n }\n break;\n case 'enableRtl':\n if (this.tooltipEle) {\n if (this.enableRtl) {\n addClass([this.tooltipEle], RTL);\n }\n else {\n removeClass([this.tooltipEle], RTL);\n }\n }\n break;\n }\n }\n };\n /**\n * It is used to show the Tooltip on the specified target with specific animation settings.\n * @param element Target element where the Tooltip is to be displayed. (It is an optional parameter)\n * @param animation Sets the specific animation, while showing the Tooltip on the screen. (It is an optional parameter)\n * @return {void}\n */\n Tooltip.prototype.open = function (element, animation) {\n if (isNullOrUndefined(animation)) {\n animation = this.animation.open;\n }\n if (isNullOrUndefined(element)) {\n element = this.element;\n }\n if (element.style.display === 'none') {\n return;\n }\n this.showTooltip(element, animation);\n };\n /**\n * It is used to hide the Tooltip with specific animation effect.\n * @param animation Sets the specific animation when hiding Tooltip from the screen. (It is an optional parameter)\n * @return {void}\n */\n Tooltip.prototype.close = function (animation) {\n if (!animation) {\n animation = this.animation.close;\n }\n this.hideTooltip(animation);\n };\n /**\n * It is used to refresh the Tooltip content and its position.\n * @param target Target element where the Tooltip content or position needs to be refreshed.\n * @return {void}\n */\n Tooltip.prototype.refresh = function (target) {\n if (this.tooltipEle) {\n this.renderContent(target);\n }\n if (this.popupObj && target) {\n this.reposition(target);\n }\n };\n /**\n * It is used to destroy the Tooltip component.\n * @method destroy\n * @return {void}\n * @memberof Tooltip\n */\n Tooltip.prototype.destroy = function () {\n if (!this.isServerRender()) {\n _super.prototype.destroy.call(this);\n if (this.tooltipEle) {\n remove(this.tooltipEle);\n }\n }\n if (this.isServerRender() && this.tooltipEle) {\n var placeholder = document.querySelector('#' + this.ctrlId + '_content_placeholder');\n if (placeholder) {\n placeholder.appendChild(this.tooltipEle);\n }\n }\n if (this.popupObj) {\n this.popupObj.destroy();\n }\n removeClass([this.element], ROOT);\n this.unwireEvents(this.opensOn);\n this.unwireMouseEvents(this.element);\n this.tooltipEle = null;\n this.popupObj = null;\n };\n __decorate([\n Property('auto')\n ], Tooltip.prototype, \"width\", void 0);\n __decorate([\n Property('auto')\n ], Tooltip.prototype, \"height\", void 0);\n __decorate([\n Property()\n ], Tooltip.prototype, \"content\", void 0);\n __decorate([\n Property()\n ], Tooltip.prototype, \"target\", void 0);\n __decorate([\n Property('TopCenter')\n ], Tooltip.prototype, \"position\", void 0);\n __decorate([\n Property(0)\n ], Tooltip.prototype, \"offsetX\", void 0);\n __decorate([\n Property(0)\n ], Tooltip.prototype, \"offsetY\", void 0);\n __decorate([\n Property(true)\n ], Tooltip.prototype, \"showTipPointer\", void 0);\n __decorate([\n Property(true)\n ], Tooltip.prototype, \"enableHtmlParse\", void 0);\n __decorate([\n Property(false)\n ], Tooltip.prototype, \"windowCollision\", void 0);\n __decorate([\n Property('Auto')\n ], Tooltip.prototype, \"tipPointerPosition\", void 0);\n __decorate([\n Property('Auto')\n ], Tooltip.prototype, \"opensOn\", void 0);\n __decorate([\n Property(false)\n ], Tooltip.prototype, \"mouseTrail\", void 0);\n __decorate([\n Property(false)\n ], Tooltip.prototype, \"isSticky\", void 0);\n __decorate([\n Complex({}, Animation)\n ], Tooltip.prototype, \"animation\", void 0);\n __decorate([\n Property(0)\n ], Tooltip.prototype, \"openDelay\", void 0);\n __decorate([\n Property(0)\n ], Tooltip.prototype, \"closeDelay\", void 0);\n __decorate([\n Property()\n ], Tooltip.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], Tooltip.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"beforeRender\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"beforeOpen\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"afterOpen\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"beforeClose\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"afterClose\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"beforeCollision\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"destroyed\", void 0);\n Tooltip = __decorate([\n NotifyPropertyChanges\n ], Tooltip);\n return Tooltip;\n}(Component));\nexport { Tooltip };\n","import { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { setStyleAttribute, closest as getClosest, remove, isBlazor } from '@syncfusion/ej2-base';\nimport { classList } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport { RowRenderer } from './row-renderer';\nimport { Cell } from '../models/cell';\nimport { Row } from '../models/row';\nimport * as events from '../base/constant';\nimport { Draggable, Droppable } from '@syncfusion/ej2-base';\nimport { Button } from '@syncfusion/ej2-buttons';\nimport { parentsUntil, wrap, measureColumnDepth, appendChildren } from '../base/util';\n/**\n * Content module is used to render grid content\n * @hidden\n */\nvar HeaderRender = /** @class */ (function () {\n /**\n * Constructor for header renderer module\n */\n function HeaderRender(parent, serviceLocator) {\n var _this = this;\n this.frzIdx = 0;\n this.notfrzIdx = 0;\n this.isFirstCol = false;\n this.isReplaceDragEle = true;\n this.helper = function (e) {\n var gObj = _this.parent;\n var target = _this.draggable.currentStateTarget;\n var parentEle = parentsUntil(target, 'e-headercell');\n if (!(gObj.allowReordering || gObj.allowGrouping) || (!isNullOrUndefined(parentEle)\n && parentEle.querySelectorAll('.e-checkselectall').length > 0)) {\n return false;\n }\n var visualElement = _this.parent.createElement('div', { className: 'e-cloneproperties e-dragclone e-headerclone' });\n var element = target.classList.contains('e-headercell') ? target : parentEle;\n if (!element || (!gObj.allowReordering && element.classList.contains('e-stackedheadercell'))) {\n return false;\n }\n var height = element.offsetHeight;\n var headercelldiv = element.querySelector('.e-headercelldiv') || element.querySelector('.e-stackedheadercelldiv');\n var col;\n if (headercelldiv) {\n if (element.querySelector('.e-stackedheadercelldiv')) {\n col = gObj.getStackedHeaderColumnByHeaderText(headercelldiv.innerText.trim(), gObj.columns);\n }\n else {\n col = gObj.getColumnByUid(headercelldiv.getAttribute('e-mappinguid'));\n }\n _this.column = col;\n if (_this.column.lockColumn) {\n return false;\n }\n visualElement.setAttribute('e-mappinguid', _this.column.uid);\n }\n if (col && !isNullOrUndefined(col.headerTemplate)) {\n if (!isNullOrUndefined(col.headerTemplate)) {\n var result = void 0;\n var colIndex = gObj.getColumnIndexByField(col.field);\n result = col.getHeaderTemplate()(extend({ 'index': colIndex }, col), gObj, 'headerTemplate');\n appendChildren(visualElement, result);\n }\n else {\n visualElement.innerHTML = col.headerTemplate;\n }\n }\n else {\n visualElement.innerHTML = headercelldiv ?\n col.headerText : element.firstElementChild.innerHTML;\n }\n visualElement.style.width = element.offsetWidth + 'px';\n visualElement.style.height = element.offsetHeight + 'px';\n visualElement.style.lineHeight = (height - 6).toString() + 'px';\n gObj.element.appendChild(visualElement);\n return visualElement;\n };\n this.dragStart = function (e) {\n var gObj = _this.parent;\n gObj.element.querySelector('.e-gridpopup').style.display = 'none';\n gObj.notify(events.columnDragStart, { target: _this.draggable.currentStateTarget, column: _this.column, event: e.event });\n if (isBlazor()) {\n e.bindEvents(e.dragElement);\n }\n };\n this.drag = function (e) {\n var gObj = _this.parent;\n var target = e.target;\n if (target) {\n var closest = getClosest(target, '.e-grid');\n var cloneElement = _this.parent.element.querySelector('.e-cloneproperties');\n if (!closest || closest.getAttribute('id') !== gObj.element.getAttribute('id')) {\n classList(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);\n if (gObj.allowReordering) {\n gObj.element.querySelector('.e-reorderuparrow').style.display = 'none';\n gObj.element.querySelector('.e-reorderdownarrow').style.display = 'none';\n }\n if (!gObj.groupSettings.allowReordering) {\n return;\n }\n }\n gObj.notify(events.columnDrag, { target: e.target, column: _this.column, event: e.event });\n }\n };\n this.dragStop = function (e) {\n var gObj = _this.parent;\n var cancel;\n gObj.element.querySelector('.e-gridpopup').style.display = 'none';\n if ((!parentsUntil(e.target, 'e-headercell') && !parentsUntil(e.target, 'e-groupdroparea')) ||\n (!gObj.allowReordering && parentsUntil(e.target, 'e-headercell')) ||\n (!e.helper.getAttribute('e-mappinguid') && parentsUntil(e.target, 'e-groupdroparea'))) {\n remove(e.helper);\n cancel = true;\n }\n gObj.notify(events.columnDragStop, { target: e.target, event: e.event, column: _this.column, cancel: cancel });\n };\n this.drop = function (e) {\n var gObj = _this.parent;\n var uid = e.droppedElement.getAttribute('e-mappinguid');\n var closest = getClosest(e.target, '.e-grid');\n remove(e.droppedElement);\n if (closest && closest.getAttribute('id') !== gObj.element.getAttribute('id') ||\n !(gObj.allowReordering || gObj.allowGrouping)) {\n return;\n }\n gObj.notify(events.headerDrop, { target: e.target, uid: uid, droppedElement: e.droppedElement });\n };\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.ariaService = this.serviceLocator.getService('ariaService');\n this.widthService = this.serviceLocator.getService('widthService');\n if (this.parent.isDestroyed) {\n return;\n }\n if (!this.parent.enableColumnVirtualization\n && !this.parent.getFrozenLeftColumnsCount() && !this.parent.getFrozenRightColumnsCount()) {\n this.parent.on(events.columnVisibilityChanged, this.setVisible, this);\n }\n this.parent.on(events.columnPositionChanged, this.colPosRefresh, this);\n this.parent.on(events.initialEnd, this.renderCustomToolbar, this);\n if (this.parent.rowRenderingMode === 'Vertical') {\n this.parent.on(events.uiUpdate, this.updateCustomResponsiveToolbar, this);\n }\n }\n /**\n * The function is used to render grid header div\n */\n HeaderRender.prototype.renderPanel = function () {\n var div = this.parent.element.querySelector('.e-gridheader');\n var isRendered = (div != null);\n div = isRendered ? div : this.parent.createElement('div', { className: 'e-gridheader' });\n var innerDiv = isRendered ? div.querySelector('.e-headercontent') :\n this.parent.createElement('div', { className: 'e-headercontent' });\n this.toggleStackClass(div);\n div.appendChild(innerDiv);\n this.setPanel(div);\n if (!isRendered) {\n this.parent.element.appendChild(div);\n }\n };\n /**\n * The function is used to render grid header table\n */\n HeaderRender.prototype.renderTable = function () {\n var headerDiv = this.getPanel();\n headerDiv.appendChild(this.createHeaderTable());\n this.setTable(headerDiv.querySelector('.e-table'));\n if (!this.parent.getFrozenColumns() && !this.parent.getFrozenRightColumnsCount() && !this.parent.getFrozenLeftColumnsCount()) {\n this.initializeHeaderDrag();\n this.initializeHeaderDrop();\n }\n this.parent.notify(events.headerRefreshed, { rows: this.rows, args: { isFrozen: this.parent.isFrozenGrid() } });\n };\n /**\n * Get the header content div element of grid\n * @return {Element}\n */\n HeaderRender.prototype.getPanel = function () {\n return this.headerPanel;\n };\n /**\n * Set the header content div element of grid\n * @param {Element} panel\n */\n HeaderRender.prototype.setPanel = function (panel) {\n this.headerPanel = panel;\n };\n /**\n * Get the header table element of grid\n * @return {Element}\n */\n HeaderRender.prototype.getTable = function () {\n return this.headerTable;\n };\n /**\n * Set the header table element of grid\n * @param {Element} table\n */\n HeaderRender.prototype.setTable = function (table) {\n this.headerTable = table;\n };\n /**\n * Get the header colgroup element\n * @returns {Element}\n */\n HeaderRender.prototype.getColGroup = function () {\n return this.colgroup;\n };\n /**\n * Set the header colgroup element\n * @param {Element} colgroup\n * @returns {Element}\n */\n HeaderRender.prototype.setColGroup = function (colGroup) {\n return this.colgroup = colGroup;\n };\n /**\n * Get the header row element collection.\n * @return {Element[]}\n */\n HeaderRender.prototype.getRows = function () {\n var table = this.getTable();\n return table.tHead.rows;\n };\n /**\n * The function is used to create header table elements\n * @return {Element}\n * @hidden\n */\n HeaderRender.prototype.createHeaderTable = function () {\n var skipDom = isBlazor() && this.parent.frozenRows !== 0;\n var table = this.createTable();\n var innerDiv = this.getPanel().querySelector('.e-headercontent');\n if (!skipDom) {\n innerDiv.appendChild(table);\n }\n return innerDiv;\n };\n /**\n * @hidden\n */\n HeaderRender.prototype.createHeader = function (tableEle, tableName) {\n if (tableEle === void 0) { tableEle = null; }\n var skipDom = isBlazor() && this.parent.frozenRows !== 0;\n var gObj = this.parent;\n var isFrozen = gObj.isFrozenGrid();\n if (!(isBlazor() && !gObj.isJsComponent) && this.getTable() && !isFrozen) {\n remove(this.getTable());\n }\n var columns = gObj.getColumns();\n var innerDiv = this.getPanel().querySelector('.e-headercontent');\n var table = skipDom ? tableEle || innerDiv.querySelector('.e-table') :\n this.parent.createElement('table', { className: 'e-table', attrs: { cellspacing: '0.25px', role: 'grid' } });\n var tblName = tableName ? tableName : gObj.getFrozenLeftCount() ? 'frozen-left' : 'frozen-right';\n var findHeaderRow = this.createHeaderContent(tblName);\n var thead = findHeaderRow.thead;\n var tbody = this.parent.createElement('tbody', { className: this.parent.frozenRows ? '' : 'e-hide' });\n this.caption = this.parent.createElement('caption', { innerHTML: this.parent.element.id + '_header_table', className: 'e-hide' });\n var colGroup = this.parent.createElement('colgroup');\n var rowBody = this.parent.createElement('tr');\n var bodyCell;\n var rows = this.rows = findHeaderRow.rows;\n var rowRenderer = new RowRenderer(this.serviceLocator, CellType.Header, this.parent);\n for (var i = 0, len = rows.length; i < len; i++) {\n for (var j = 0, len_1 = rows[i].cells.length; j < len_1; j++) {\n var cell = rows[i].cells[j];\n bodyCell = this.parent.createElement('td');\n rowBody.appendChild(bodyCell);\n }\n }\n if (gObj.allowFiltering || gObj.allowSorting || gObj.allowGrouping) {\n table.classList.add('e-sortfilter');\n }\n this.updateColGroup(colGroup);\n if (!skipDom) {\n tbody.appendChild(rowBody);\n }\n table.appendChild(this.setColGroup(colGroup));\n table.appendChild(thead);\n if (!skipDom) {\n table.appendChild(tbody);\n }\n table.appendChild(this.caption);\n this.ariaService.setOptions(table, { colcount: gObj.getColumns().length.toString() });\n return table;\n };\n /**\n * @hidden\n */\n HeaderRender.prototype.createTable = function (tableEle) {\n if (tableEle === void 0) { tableEle = null; }\n return this.createHeader(tableEle);\n };\n HeaderRender.prototype.createHeaderContent = function (tableName) {\n var gObj = this.parent;\n var index = 1;\n var frozenMode = gObj.getFrozenMode();\n var columns = gObj.getColumns();\n var thead = this.parent.createElement('thead');\n var colHeader = this.parent.createElement('tr', { className: 'e-columnheader' });\n var rowRenderer = new RowRenderer(this.serviceLocator, CellType.Header, gObj);\n rowRenderer.element = colHeader;\n var rows = [];\n var headerRow;\n this.colDepth = measureColumnDepth(gObj.columns);\n for (var i = 0, len = this.colDepth; i < len; i++) {\n rows[i] = this.generateRow(i);\n rows[i].cells = [];\n }\n if (frozenMode !== 'Right') {\n rows = this.ensureColumns(rows);\n }\n rows = this.getHeaderCells(rows, tableName);\n if (frozenMode === 'Right') {\n index = 0;\n rows = this.ensureColumns(rows);\n }\n var frzCols = this.parent.getFrozenColumns();\n if (this.parent.isRowDragable() && this.parent.isFrozenGrid() && rows[0].cells[index]) {\n var colFreezeMode = rows[0].cells[index].column.getFreezeTableName();\n if (colFreezeMode === 'movable' || (frozenMode === 'Left-Right' && colFreezeMode === 'frozen-right')) {\n if (frozenMode === 'Right') {\n rows[0].cells.pop();\n }\n else {\n rows[0].cells.shift();\n }\n }\n else if (!frzCols && colFreezeMode === 'frozen-left') {\n rows[0].cells[0].column.freeze = colFreezeMode === 'frozen-left' ? 'Left' : 'Right';\n }\n else if (frozenMode === 'Right' && colFreezeMode === 'frozen-right') {\n rows[0].cells[rows[0].cells.length - 1].column.freeze = 'Right';\n }\n }\n for (var i = 0, len = this.colDepth; i < len; i++) {\n headerRow = rowRenderer.render(rows[i], columns);\n if (this.parent.rowHeight && headerRow.querySelector('.e-headercell')) {\n headerRow.style.height = this.parent.rowHeight + 'px';\n }\n thead.appendChild(headerRow);\n }\n var findHeaderRow = {\n thead: thead,\n rows: rows\n };\n return findHeaderRow;\n };\n HeaderRender.prototype.updateColGroup = function (colGroup) {\n var cols = this.parent.getColumns();\n var col;\n var indexes = this.parent.getColumnIndexesInView();\n if (this.parent.enableColumnVirtualization && this.parent.getFrozenColumns()\n && this.parent.contentModule.isXaxis()) {\n cols = extend([], this.parent.getColumns());\n cols.splice(0, this.parent.getFrozenColumns());\n }\n colGroup.id = this.parent.element.id + 'colGroup';\n if (this.parent.allowGrouping) {\n for (var i = 0, len = this.parent.groupSettings.columns.length; i < len; i++) {\n if (this.parent.enableColumnVirtualization && indexes.indexOf(i) === -1) {\n continue;\n }\n col = this.parent.createElement('col', { className: 'e-group-intent' });\n colGroup.appendChild(col);\n }\n }\n if (this.parent.detailTemplate || this.parent.childGrid) {\n col = this.parent.createElement('col', { className: 'e-detail-intent' });\n colGroup.appendChild(col);\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() !== 'Right') {\n col = this.parent.createElement('col', { className: 'e-drag-intent' });\n colGroup.appendChild(col);\n }\n for (var i = 0, len = cols.length; i < len; i++) {\n col = this.parent.createElement('col');\n if (cols[i].visible === false) {\n setStyleAttribute(col, { 'display': 'none' });\n }\n colGroup.appendChild(col);\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() === 'Right') {\n col = this.parent.createElement('col', { className: 'e-drag-intent' });\n colGroup.appendChild(col);\n }\n return colGroup;\n };\n HeaderRender.prototype.ensureColumns = function (rows) {\n //TODO: generate dummy column for group, detail, stacked row here; ensureColumns here\n var gObj = this.parent;\n var indexes = this.parent.getColumnIndexesInView();\n for (var i = 0, len = rows.length; i < len; i++) {\n if (gObj.allowGrouping) {\n for (var c = 0, len_2 = gObj.groupSettings.columns.length; c < len_2; c++) {\n if (this.parent.enableColumnVirtualization && indexes.indexOf(c) === -1) {\n continue;\n }\n rows[i].cells.push(this.generateCell({}, CellType.HeaderIndent));\n }\n }\n if (gObj.detailTemplate || gObj.childGrid) {\n var args = {};\n this.parent.notify(events.detailIndentCellInfo, args);\n rows[i].cells.push(this.generateCell(args, CellType.DetailHeader));\n }\n if (gObj.isRowDragable()) {\n rows[i].cells.push(this.generateCell({}, CellType.RowDragHIcon));\n }\n }\n return rows;\n };\n HeaderRender.prototype.getHeaderCells = function (rows, tableName) {\n var column;\n var thead = this.parent.getHeaderTable() && this.parent.getHeaderTable().querySelector('thead');\n var cols = this.parent.enableColumnVirtualization ?\n this.parent.getColumns(this.parent.enablePersistence) : this.parent.columns;\n this.frzIdx = 0;\n this.notfrzIdx = 0;\n if (this.parent.lockcolPositionCount) {\n for (var i = 0; i < cols.length; i++) {\n this.lockColsRendered = false;\n rows = this.appendCells(cols[i], rows, 0, i === 0, false, i === (cols.length - 1), thead, tableName);\n }\n }\n for (var i = 0, len = cols.length; i < len; i++) {\n this.notfrzIdx = 0;\n this.lockColsRendered = true;\n rows = this.appendCells(cols[i], rows, 0, i === 0, false, i === (len - 1), thead, tableName);\n }\n return rows;\n };\n HeaderRender.prototype.appendCells = function (cols, rows, index, isFirstObj, isFirstCol, isLastCol, isMovable, tableName) {\n var lastCol = isLastCol ? 'e-lastcell' : '';\n var isFrozen = this.parent.isFrozenGrid();\n var isLockColumn = !this.parent.lockcolPositionCount\n || (cols.lockColumn && !this.lockColsRendered) || (!cols.lockColumn && this.lockColsRendered);\n var isFrozenLockColumn = !this.parent.lockcolPositionCount || (cols.lockColumn && !this.lockColsRendered)\n || (!cols.lockColumn && this.lockColsRendered);\n var scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');\n var left;\n if (isFrozen && scrollbar && this.parent.enableColumnVirtualization) {\n left = scrollbar.scrollLeft;\n }\n if (!cols.columns) {\n if (left && left > 0 && this.parent.contentModule.isXaxis()\n && this.parent.inViewIndexes[0] !== 0 && cols.getFreezeTableName() === 'movable') {\n rows[index].cells.push(this.generateCell(cols, CellType.Header, this.colDepth - index, (isFirstObj ? '' : (isFirstCol ? 'e-firstcell' : '')) + lastCol, index, this.parent.getColumnIndexByUid(cols.uid)));\n }\n else {\n if ((!isFrozen && isLockColumn) || (isFrozen && cols.getFreezeTableName() === tableName && isFrozenLockColumn)) {\n rows[index].cells.push(this.generateCell(cols, CellType.Header, this.colDepth - index, (isFirstObj ? '' : (isFirstCol ? 'e-firstcell' : '')) + lastCol, index, this.parent.getColumnIndexByUid(cols.uid)));\n }\n }\n if (this.parent.lockcolPositionCount) {\n if ((this.frzIdx + this.notfrzIdx < this.parent.frozenColumns) &&\n ((cols.lockColumn && !this.lockColsRendered) || (!cols.lockColumn && this.lockColsRendered))) {\n this.frzIdx++;\n }\n else {\n this.notfrzIdx++;\n }\n }\n else {\n this.frzIdx++;\n }\n }\n else {\n this.isFirstCol = false;\n var colSpan = this.getCellCnt(cols, 0);\n if (colSpan) {\n var stackedLockColsCount = this.getStackedLockColsCount(cols, 0);\n var isStackedLockColumn = this.parent.lockcolPositionCount === 0\n || (!this.lockColsRendered && stackedLockColsCount !== 0)\n || (this.lockColsRendered && (colSpan - stackedLockColsCount) !== 0);\n var isFrozenStack = isFrozen && this.ensureStackedFrozen(cols.columns, tableName, false);\n if ((!isFrozen && isStackedLockColumn) || isFrozenStack) {\n rows[index].cells.push(new Cell({\n cellType: CellType.StackedHeader, column: cols,\n colSpan: this.getColSpan(colSpan, stackedLockColsCount, cols.columns, tableName, isFrozen)\n }));\n }\n }\n if (this.parent.lockcolPositionCount && !this.lockColsRendered) {\n for (var i = 0; i < cols.columns.length; i++) {\n rows = this.appendCells(cols.columns[i], rows, index + 1, isFirstObj, i === 0, i === (cols.columns.length - 1) && isLastCol, isMovable, tableName);\n }\n }\n if (this.lockColsRendered) {\n for (var i = 0, len = cols.columns.length; i < len; i++) {\n var isFirstCol_1 = this.isFirstCol = cols.columns[i].visible && !this.isFirstCol && len !== 1;\n var isLaststackedCol = i === (len - 1);\n rows = this.appendCells(cols.columns[i], rows, index + 1, isFirstObj, isFirstCol_1, isLaststackedCol && isLastCol, isMovable, tableName);\n }\n }\n }\n return rows;\n };\n HeaderRender.prototype.ensureStackedFrozen = function (columns, tableName, isTrue) {\n var length = columns.length;\n for (var i = 0; i < length; i++) {\n if (columns[i].columns) {\n isTrue = this.ensureStackedFrozen(columns[i].columns, tableName, isTrue);\n }\n else if (columns[i].getFreezeTableName() === tableName) {\n isTrue = true;\n break;\n }\n }\n return isTrue;\n };\n HeaderRender.prototype.getStackedLockColsCount = function (col, lockColsCount) {\n if (col.columns) {\n for (var i = 0; i < col.columns.length; i++) {\n lockColsCount = this.getStackedLockColsCount(col.columns[i], lockColsCount);\n }\n }\n else if (col.lockColumn) {\n lockColsCount++;\n }\n return lockColsCount;\n };\n HeaderRender.prototype.getColSpan = function (colSpan, stackedLockColsCount, columns, tableName, isFrozen) {\n if (isFrozen) {\n colSpan = this.getFrozenColSpan(columns, tableName, 0);\n }\n else if (this.parent.lockcolPositionCount) {\n colSpan = !this.lockColsRendered ? stackedLockColsCount : colSpan - stackedLockColsCount;\n }\n return colSpan;\n };\n HeaderRender.prototype.getFrozenColSpan = function (columns, tableName, count) {\n var length = columns.length;\n for (var i = 0; i < length; i++) {\n if (columns[i].columns) {\n count = this.getFrozenColSpan(columns[i].columns, tableName, count);\n }\n else if (columns[i].getFreezeTableName() === tableName) {\n count++;\n }\n }\n return count;\n };\n HeaderRender.prototype.generateRow = function (index) {\n return new Row({});\n };\n HeaderRender.prototype.generateCell = function (column, cellType, rowSpan, className, rowIndex, colIndex) {\n var opt = {\n 'visible': column.visible,\n 'isDataCell': false,\n 'isTemplate': !isNullOrUndefined(column.headerTemplate),\n 'rowID': '',\n 'column': column,\n 'cellType': cellType,\n 'rowSpan': rowSpan,\n 'className': className,\n 'index': rowIndex,\n 'colIndex': colIndex\n };\n if (!opt.rowSpan || opt.rowSpan < 2) {\n delete opt.rowSpan;\n }\n return new Cell(opt);\n };\n /**\n * Function to hide header table column based on visible property\n * @param {Column[]} columns?\n */\n HeaderRender.prototype.setVisible = function (columns) {\n var gObj = this.parent;\n var rows = [].slice.call(this.getRows()); //NodeList -> Array \n var displayVal;\n var idx;\n var className;\n var element;\n var frzCols = gObj.getFrozenColumns();\n for (var c = 0, clen = columns.length; c < clen; c++) {\n var column = columns[c];\n idx = gObj.getNormalizedColumnIndex(column.uid);\n displayVal = column.visible ? '' : 'none';\n if (frzCols) {\n var normalizedfrzCols = this.parent.isRowDragable() ? frzCols + 1 : frzCols;\n if (idx < normalizedfrzCols) {\n if (isBlazor() && gObj.isServerRendered) {\n setStyleAttribute(this.getTable().querySelector('colgroup').children[idx], { 'display': displayVal });\n setStyleAttribute(this.getTable().querySelectorAll('th')[idx], { 'display': displayVal });\n }\n else {\n setStyleAttribute(this.getColGroup().children[idx], { 'display': displayVal });\n }\n }\n else {\n var mTblColGrp = gObj.getHeaderContent().querySelector('.e-movableheader').querySelector('colgroup');\n var mTbl = gObj.getHeaderContent().querySelector('.e-movableheader').querySelector('table');\n setStyleAttribute(mTblColGrp.children[idx - normalizedfrzCols], { 'display': displayVal });\n if (isBlazor() && gObj.isServerRendered) {\n setStyleAttribute(mTbl.querySelectorAll('th')[idx - frzCols], { 'display': displayVal });\n }\n }\n }\n else {\n setStyleAttribute(this.getColGroup().children[idx], { 'display': displayVal });\n }\n }\n this.refreshUI();\n };\n HeaderRender.prototype.colPosRefresh = function () {\n if (isBlazor() && this.parent.isServerRendered && this.parent.frozenRows && this.parent.getFrozenColumns()) {\n this.freezeReorder = true;\n }\n this.refreshUI();\n };\n /**\n * Refresh the header of the Grid.\n * @returns {void}\n */\n HeaderRender.prototype.refreshUI = function () {\n var frzCols = this.parent.isFrozenGrid();\n var isVFTable = this.parent.enableColumnVirtualization && frzCols;\n var setFrozenTable = isBlazor() && this.parent.isServerRendered && this.parent.frozenRows !== 0 && frzCols;\n var headerDiv = this.getPanel();\n this.toggleStackClass(headerDiv);\n var table = this.freezeReorder ? this.headerPanel.querySelector('.e-movableheader').querySelector('.e-table')\n : this.getTable();\n var tableName = this.parent.isFrozenGrid() ? this.parent.getFrozenLeftCount() ? 'frozen-left'\n : 'frozen-right' : undefined;\n if (isVFTable) {\n table = this.parent.contentModule.getVirtualFreezeHeader();\n tableName = this.parent.contentModule.isXaxis() ? 'movable' : tableName;\n }\n if (setFrozenTable && !isVFTable) {\n table = this.freezeReorder ? this.headerPanel.querySelector('.e-movableheader').querySelector('.e-table') :\n this.headerPanel.querySelector('.e-frozenheader').querySelector('.e-table');\n }\n if (table) {\n if (isBlazor() && this.parent.isServerRendered) {\n table.removeChild(table.querySelector('colgroup'));\n table.removeChild(table.querySelector('thead'));\n }\n else {\n remove(table);\n table.removeChild(table.firstChild);\n table.removeChild(table.childNodes[0]);\n }\n var colGroup = this.parent.createElement('colgroup');\n var findHeaderRow = this.createHeaderContent(tableName);\n this.rows = findHeaderRow.rows;\n table.insertBefore(findHeaderRow.thead, table.firstChild);\n this.updateColGroup(colGroup);\n table.insertBefore(this.setColGroup(colGroup), table.firstChild);\n if (!isVFTable && !setFrozenTable) {\n this.setTable(table);\n }\n if (!(isBlazor() && this.parent.isServerRendered)) {\n this.appendContent(table);\n }\n this.parent.notify(events.colGroupRefresh, {});\n this.widthService.setWidthToColumns();\n this.parent.updateDefaultCursor();\n if (!frzCols || (this.parent.enableColumnVirtualization && frzCols)) {\n this.initializeHeaderDrag();\n }\n var rows = [].slice.call(headerDiv.querySelectorAll('tr.e-columnheader'));\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n var gCells = [].slice.call(row.querySelectorAll('.e-grouptopleftcell'));\n if (gCells.length) {\n gCells[gCells.length - 1].classList.add('e-lastgrouptopleftcell');\n }\n }\n if (!frzCols) {\n this.parent.notify(events.headerRefreshed, { rows: this.rows, args: { isFrozen: frzCols } });\n }\n if (this.parent.enableColumnVirtualization && parentsUntil(table, 'e-movableheader')) {\n this.parent.notify(events.headerRefreshed, { rows: this.rows, args: { isFrozen: false, isXaxis: true } });\n }\n if (this.parent.allowTextWrap && this.parent.textWrapSettings.wrapMode === 'Header') {\n wrap(rows, true);\n }\n }\n };\n HeaderRender.prototype.toggleStackClass = function (div) {\n var column = this.parent.columns;\n var stackedHdr = column.some(function (column) { return !isNullOrUndefined(column.columns); });\n if (stackedHdr) {\n div.classList.add('e-stackedheader');\n }\n else {\n div.classList.remove('e-stackedheader');\n }\n };\n HeaderRender.prototype.appendContent = function (table) {\n this.getPanel().querySelector('.e-headercontent').appendChild(table);\n };\n HeaderRender.prototype.getCellCnt = function (col, cnt) {\n if (col.columns) {\n for (var i = 0, len = col.columns.length; i < len; i++) {\n cnt = this.getCellCnt(col.columns[i], cnt);\n }\n }\n else {\n if (col.visible) {\n cnt++;\n }\n }\n return cnt;\n };\n HeaderRender.prototype.initializeHeaderDrag = function () {\n var gObj = this.parent;\n if (!(this.parent.allowReordering || (this.parent.allowGrouping && this.parent.groupSettings.showDropArea))) {\n return;\n }\n this.draggable = new Draggable(gObj.getHeaderContent(), {\n dragTarget: '.e-headercell',\n distance: 5,\n helper: this.helper,\n dragStart: this.dragStart,\n drag: this.drag,\n dragStop: this.dragStop,\n abort: '.e-rhandler',\n isReplaceDragEle: this.isReplaceDragEle\n });\n };\n HeaderRender.prototype.initializeHeaderDrop = function () {\n var gObj = this.parent;\n var drop = new Droppable(gObj.getHeaderContent(), {\n accept: '.e-dragclone',\n drop: this.drop\n });\n };\n HeaderRender.prototype.renderCustomToolbar = function () {\n var _this = this;\n var gObj = this.parent;\n if (gObj.rowRenderingMode === 'Vertical' && !gObj.toolbar && (gObj.allowSorting || gObj.allowFiltering)) {\n var div = gObj.createElement('div', { className: 'e-res-toolbar e-toolbar' });\n var toolbarItems = gObj.createElement('div', { className: 'e-toolbar-items' });\n var toolbarLeft = gObj.createElement('div', { className: 'e-toolbar-left' });\n var count = this.parent.allowFiltering && this.parent.allowSorting ? 2 : 1;\n for (var i = 0; i < count; i++) {\n var toolbarItem = gObj.createElement('div', { className: 'e-toolbar-item e-gridresponsiveicons e-icons e-tbtn-align' });\n var cls = count === 1 ? this.parent.allowSorting ? 'sort'\n : 'filter' : i === 1 ? 'sort' : 'filter';\n var button = gObj.createElement('button', { className: 'e-tbar-btn e-control e-btn e-lib e-icon-btn' });\n var span = gObj.createElement('span', { className: 'e-btn-icon e-res' + cls + '-icon e-icons' });\n button.appendChild(span);\n var btnObj = new Button({});\n btnObj.appendTo(button);\n button.onclick = function (e) {\n if (e.target.classList.contains('e-ressort-btn')\n || e.target.classList.contains('e-ressort-icon')) {\n _this.parent.showResponsiveCustomSort();\n }\n else {\n _this.parent.showResponsiveCustomFilter();\n }\n };\n toolbarItem.appendChild(button);\n toolbarLeft.appendChild(toolbarItem);\n }\n toolbarItems.appendChild(toolbarLeft);\n div.appendChild(toolbarItems);\n gObj.element.insertBefore(div, this.parent.element.querySelector('.e-gridheader'));\n }\n };\n HeaderRender.prototype.updateCustomResponsiveToolbar = function (args) {\n var resToolbar = this.parent.element.querySelector('.e-responsive-toolbar');\n if (args.module === 'toolbar') {\n if (resToolbar) {\n remove(resToolbar);\n }\n else {\n this.renderCustomToolbar();\n }\n }\n };\n return HeaderRender;\n}());\nexport { HeaderRender };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined, extend, isBlazor } from '@syncfusion/ej2-base';\nimport { attributes } from '@syncfusion/ej2-base';\nimport { setStyleAndAttributes, appendChildren } from '../base/util';\nimport { CellRenderer } from './cell-renderer';\nimport { AriaService } from '../services/aria-service';\nimport { createCheckBox } from '@syncfusion/ej2-buttons';\nimport { headerCellInfo } from '../base/constant';\n/**\n * HeaderCellRenderer class which responsible for building header cell content.\n * @hidden\n */\nvar HeaderCellRenderer = /** @class */ (function (_super) {\n __extends(HeaderCellRenderer, _super);\n function HeaderCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent\n .createElement('TH', { className: 'e-headercell', attrs: { role: 'columnheader', tabindex: '-1' } });\n _this.ariaService = new AriaService();\n _this.hTxtEle = _this.parent.createElement('span', { className: 'e-headertext' });\n _this.sortEle = _this.parent.createElement('div', { className: 'e-sortfilterdiv e-icons' });\n _this.gui = _this.parent.createElement('div');\n _this.chkAllBox = _this.parent.createElement('input', { className: 'e-checkselectall', attrs: { 'type': 'checkbox' } });\n return _this;\n }\n /**\n * Function to return the wrapper for the TH content.\n * @returns string\n */\n HeaderCellRenderer.prototype.getGui = function () {\n return this.gui.cloneNode();\n };\n /**\n * Function to render the cell content based on Column object.\n * @param {Column} column\n * @param {Object} data\n * @param {Element}\n */\n HeaderCellRenderer.prototype.render = function (cell, data, attributes) {\n var node = this.element.cloneNode();\n var fltrMenuEle = this.parent.createElement('div', { className: 'e-filtermenudiv e-icons e-icon-filter' });\n return this.prepareHeader(cell, node, fltrMenuEle);\n };\n /**\n * Function to refresh the cell content based on Column object.\n * @param {Cell} cell\n * @param {Element} node\n */\n HeaderCellRenderer.prototype.refresh = function (cell, node) {\n this.clean(node);\n var fltrMenuEle = this.parent.createElement('div', { className: 'e-filtermenudiv e-icons e-icon-filter' });\n return this.prepareHeader(cell, node, fltrMenuEle);\n };\n HeaderCellRenderer.prototype.clean = function (node) {\n node.innerHTML = '';\n };\n /* tslint:disable-next-line:max-func-body-length */\n HeaderCellRenderer.prototype.prepareHeader = function (cell, node, fltrMenuEle) {\n var column = cell.column;\n var ariaAttr = {};\n //Prepare innerHtml\n var innerDIV = this.getGui();\n var hValueAccer;\n attributes(innerDIV, {\n 'e-mappinguid': column.uid,\n 'class': 'e-headercelldiv'\n });\n if (!isNullOrUndefined(column.headerValueAccessor)) {\n hValueAccer = this.getValue(column.headerText, column);\n }\n if (column.type !== 'checkbox') {\n var value = column.headerText;\n if (!isNullOrUndefined(hValueAccer)) {\n value = hValueAccer;\n }\n var headerText = this.hTxtEle.cloneNode();\n headerText[column.getDomSetter()] = value;\n innerDIV.appendChild(headerText);\n }\n else {\n column.editType = 'booleanedit';\n var checkAllWrap = createCheckBox(this.parent.createElement, false, { checked: false, label: ' ' });\n checkAllWrap.insertBefore(this.chkAllBox.cloneNode(), checkAllWrap.firstChild);\n innerDIV.appendChild(checkAllWrap);\n innerDIV.classList.add('e-headerchkcelldiv');\n }\n this.buildAttributeFromCell(node, cell);\n this.appendHtml(node, innerDIV);\n node.appendChild(this.sortEle.cloneNode());\n if ((this.parent.allowFiltering && this.parent.filterSettings.type !== 'FilterBar') &&\n (column.allowFiltering && !isNullOrUndefined(column.field)) &&\n !(this.parent.showColumnMenu && column.showColumnMenu)) {\n attributes(fltrMenuEle, {\n 'e-mappinguid': 'e-flmenu-' + column.uid,\n });\n node.classList.add('e-fltr-icon');\n var matchFlColumns = [];\n if (this.parent.filterSettings.columns.length && this.parent.filterSettings.columns.length !== matchFlColumns.length) {\n var foreignColumn = this.parent.getForeignKeyColumns();\n for (var index = 0; index < this.parent.columns.length; index++) {\n for (var count = 0; count < this.parent.filterSettings.columns.length; count++) {\n if (this.parent.filterSettings.columns[count].field === column.field || (foreignColumn.length\n && column.foreignKeyValue === this.parent.filterSettings.columns[count].field)) {\n fltrMenuEle.classList.add('e-filtered');\n matchFlColumns.push(column.field);\n break;\n }\n }\n }\n }\n node.appendChild(fltrMenuEle.cloneNode());\n }\n if (cell.className) {\n node.classList.add(cell.className);\n }\n if (column.customAttributes) {\n setStyleAndAttributes(node, column.customAttributes);\n }\n if (column.allowSorting) {\n ariaAttr.sort = 'none';\n }\n if (column.allowGrouping) {\n ariaAttr.grabbed = false;\n }\n node = this.extendPrepareHeader(column, node);\n var result;\n var gridObj = this.parent;\n var colIndex = gridObj.getColumnIndexByField(column.field);\n if (!isNullOrUndefined(column.headerTemplate)) {\n //need to pass the template id for blazor headertemplate\n var headerTempID = gridObj.element.id + column.uid + 'headerTemplate';\n var str = 'isStringTemplate';\n var col = isBlazor() ? column.toJSON() : column;\n var isReactCompiler = this.parent.isReact && typeof (column.headerTemplate) !== 'string';\n if (isReactCompiler) {\n var copied = { 'index': colIndex };\n node.firstElementChild.innerHTML = '';\n column.getHeaderTemplate()(extend(copied, col), gridObj, 'headerTemplate', headerTempID, this.parent[str], null, node.firstElementChild);\n this.parent.renderTemplates();\n }\n else {\n result = column.getHeaderTemplate()(extend({ 'index': colIndex }, col), gridObj, 'headerTemplate', headerTempID, this.parent[str]);\n node.firstElementChild.innerHTML = '';\n appendChildren(node.firstElementChild, result);\n }\n }\n this.ariaService.setOptions(node, ariaAttr);\n if (!isNullOrUndefined(column.headerTextAlign) || !isNullOrUndefined(column.textAlign)) {\n var alignment = column.headerTextAlign || column.textAlign;\n innerDIV.style.textAlign = alignment;\n if (alignment === 'Right' || alignment === 'Left') {\n node.classList.add(alignment === 'Right' ? 'e-rightalign' : 'e-leftalign');\n }\n else if (alignment === 'Center') {\n node.classList.add('e-centeralign');\n }\n }\n if (column.clipMode === 'Clip' || (!column.clipMode && this.parent.clipMode === 'Clip')) {\n node.classList.add('e-gridclip');\n }\n else if (column.clipMode === 'EllipsisWithTooltip' || (!column.clipMode && this.parent.clipMode === 'EllipsisWithTooltip')) {\n if (column.type !== 'checkbox') {\n node.classList.add('e-ellipsistooltip');\n }\n }\n node.setAttribute('aria-rowspan', (!isNullOrUndefined(cell.rowSpan) ? cell.rowSpan : 1).toString());\n node.setAttribute('aria-colspan', '1');\n this.parent.trigger(headerCellInfo, { cell: cell, node: node });\n return node;\n };\n HeaderCellRenderer.prototype.getValue = function (field, column) {\n return column.headerValueAccessor(field, column);\n };\n HeaderCellRenderer.prototype.extendPrepareHeader = function (column, node) {\n if (this.parent.showColumnMenu && column.showColumnMenu && !isNullOrUndefined(column.field)) {\n var element = (this.parent.createElement('div', { className: 'e-icons e-columnmenu' }));\n var matchFilteredColumns = [];\n if (this.parent.filterSettings.columns.length && this.parent.filterSettings.columns.length !== matchFilteredColumns.length) {\n for (var i = 0; i < this.parent.columns.length; i++) {\n for (var j = 0; j < this.parent.filterSettings.columns.length; j++) {\n if (this.parent.filterSettings.columns[j].field === column.field) {\n element.classList.add('e-filtered');\n matchFilteredColumns.push(column.field);\n break;\n }\n }\n }\n }\n node.classList.add('e-fltr-icon');\n node.appendChild(element);\n }\n if (this.parent.allowResizing) {\n var handler = this.parent.createElement('div');\n handler.className = column.allowResizing ? 'e-rhandler e-rcursor' : 'e-rsuppress';\n node.appendChild(handler);\n }\n return node;\n };\n /**\n * Function to specifies how the result content to be placed in the cell.\n * @param {Element} node\n * @param {string|Element} innerHtml\n * @returns Element\n */\n HeaderCellRenderer.prototype.appendHtml = function (node, innerHtml) {\n node.appendChild(innerHtml);\n return node;\n };\n return HeaderCellRenderer;\n}(CellRenderer));\nexport { HeaderCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { CellRenderer } from './cell-renderer';\nimport { headerCellInfo } from '../base/constant';\nimport { setStyleAndAttributes, appendChildren } from '../base/util';\n/**\n * StackedHeaderCellRenderer class which responsible for building stacked header cell content.\n * @hidden\n */\nvar StackedHeaderCellRenderer = /** @class */ (function (_super) {\n __extends(StackedHeaderCellRenderer, _super);\n function StackedHeaderCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TH', {\n className: 'e-headercell e-stackedheadercell', attrs: {\n role: 'columnheader',\n tabindex: '-1'\n }\n });\n return _this;\n }\n /**\n * Function to render the cell content based on Column object.\n * @param {Column} column\n * @param {Object} data\n * @param {Element}\n */\n StackedHeaderCellRenderer.prototype.render = function (cell, data, attributes) {\n var node = this.element.cloneNode();\n var div = this.parent.createElement('div', {\n className: 'e-stackedheadercelldiv',\n attrs: { 'e-mappinguid': cell.column.uid }\n });\n var column = cell.column;\n node.appendChild(div);\n if (!isNullOrUndefined(column.headerTemplate)) {\n appendChildren(div, column.getHeaderTemplate()(column, this.parent, 'headerTemplate'));\n }\n else {\n this.appendHtml(div, column.headerText, column.getDomSetter());\n }\n if (cell.column.toolTip) {\n node.setAttribute('title', cell.column.toolTip);\n }\n if (column.clipMode === 'Clip' || (!column.clipMode && this.parent.clipMode === 'Clip')) {\n node.classList.add('e-gridclip');\n }\n else if (column.clipMode === 'EllipsisWithTooltip' || (!column.clipMode && this.parent.clipMode === 'EllipsisWithTooltip')) {\n node.classList.add('e-ellipsistooltip');\n }\n if (!isNullOrUndefined(cell.column.textAlign)) {\n div.style.textAlign = cell.column.textAlign;\n }\n if (cell.column.customAttributes) {\n setStyleAndAttributes(node, cell.column.customAttributes);\n }\n node.setAttribute('colspan', cell.colSpan.toString());\n node.setAttribute('aria-colspan', cell.colSpan.toString());\n node.setAttribute('aria-rowspan', '1');\n if (this.parent.allowResizing) {\n var handler = this.parent.createElement('div');\n handler.className = cell.column.allowResizing ? 'e-rhandler e-rcursor' : 'e-rsuppress';\n node.appendChild(handler);\n }\n this.parent.trigger(headerCellInfo, { cell: cell, node: node });\n return node;\n };\n return StackedHeaderCellRenderer;\n}(CellRenderer));\nexport { StackedHeaderCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { setStyleAndAttributes } from '../base/util';\nimport { CellRenderer } from './cell-renderer';\n/**\n * IndentCellRenderer class which responsible for building group indent cell.\n * @hidden\n */\nvar IndentCellRenderer = /** @class */ (function (_super) {\n __extends(IndentCellRenderer, _super);\n function IndentCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TD', { className: 'e-indentcell' });\n return _this;\n }\n /**\n * Function to render the indent cell\n * @param {Cell} cell\n * @param {Object} data\n */\n IndentCellRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n setStyleAndAttributes(node, cell.attributes);\n return node;\n };\n return IndentCellRenderer;\n}(CellRenderer));\nexport { IndentCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined, isBlazor } from '@syncfusion/ej2-base';\nimport { CellRenderer } from './cell-renderer';\nimport { appendChildren, templateCompiler } from '../base/util';\n/**\n * GroupCaptionCellRenderer class which responsible for building group caption cell.\n * @hidden\n */\nvar GroupCaptionCellRenderer = /** @class */ (function (_super) {\n __extends(GroupCaptionCellRenderer, _super);\n function GroupCaptionCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent\n .createElement('TD', { className: 'e-groupcaption',\n attrs: { id: _this.parent.element.id + 'captioncell', role: 'gridcell', tabindex: '-1' } });\n return _this;\n }\n /**\n * Function to render the cell content based on Column object.\n * @param {Cell} cell\n * @param {Object} data\n */\n GroupCaptionCellRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n var gObj = this.parent;\n var result;\n var helper = {};\n var fKeyValue;\n data.headerText = cell.column.headerText;\n if (cell.isForeignKey) {\n fKeyValue = this.format(cell.column, cell.column.valueAccessor('foreignKey', data, cell.column));\n }\n var value = cell.isForeignKey ? fKeyValue : cell.column.enableGroupByFormat ? data.key :\n this.format(cell.column, cell.column.valueAccessor('key', data, cell.column));\n if (!isNullOrUndefined(gObj.groupSettings.captionTemplate)) {\n var isReactCompiler = this.parent.isReact && typeof (gObj.groupSettings.captionTemplate) !== 'string';\n if (isBlazor()) {\n var tempID = gObj.element.id + 'captionTemplate';\n result = templateCompiler(gObj.groupSettings.captionTemplate)(data, null, null, tempID);\n }\n else {\n if (isReactCompiler) {\n var tempID = gObj.element.id + 'captionTemplate';\n templateCompiler(gObj.groupSettings.captionTemplate)(data, this.parent, 'captionTemplate', tempID, null, null, node);\n this.parent.renderTemplates();\n }\n else if (this.parent.isVue) {\n result = templateCompiler(gObj.groupSettings.captionTemplate)(data, this.parent);\n }\n else {\n result = templateCompiler(gObj.groupSettings.captionTemplate)(data);\n }\n }\n if (!isReactCompiler) {\n appendChildren(node, result);\n }\n }\n else {\n if (gObj.groupSettings.enableLazyLoading) {\n node.innerHTML = cell.column.headerText + ': ' + value;\n }\n else {\n node.innerHTML = cell.column.headerText + ': ' + value + ' - ' + data.count + ' ' +\n (data.count < 2 ? this.localizer.getConstant('Item') : this.localizer.getConstant('Items'));\n }\n }\n node.setAttribute('colspan', cell.colSpan.toString());\n node.setAttribute('aria-label', node.innerHTML + ' is groupcaption cell');\n node.setAttribute('title', node.innerHTML);\n return node;\n };\n return GroupCaptionCellRenderer;\n}(CellRenderer));\nexport { GroupCaptionCellRenderer };\n/**\n * GroupCaptionEmptyCellRenderer class which responsible for building group caption empty cell.\n * @hidden\n */\nvar GroupCaptionEmptyCellRenderer = /** @class */ (function (_super) {\n __extends(GroupCaptionEmptyCellRenderer, _super);\n function GroupCaptionEmptyCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TD', { className: 'e-groupcaption' });\n return _this;\n }\n /**\n * Function to render the cell content based on Column object.\n * @param {Cell} cell\n * @param {Object} data\n */\n GroupCaptionEmptyCellRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n node.innerHTML = ' ';\n node.setAttribute('colspan', cell.colSpan.toString());\n return node;\n };\n return GroupCaptionEmptyCellRenderer;\n}(CellRenderer));\nexport { GroupCaptionEmptyCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { IndentCellRenderer } from './indent-cell-renderer';\n/**\n * ExpandCellRenderer class which responsible for building group expand cell.\n * @hidden\n */\nvar ExpandCellRenderer = /** @class */ (function (_super) {\n __extends(ExpandCellRenderer, _super);\n function ExpandCellRenderer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Function to render the expand cell\n * @param {Cell} cell\n * @param {Object} data\n * @param {{ [x: string]: string }} attr\n * @param {boolean} isExpand\n */\n ExpandCellRenderer.prototype.render = function (cell, data, attr, isExpand) {\n var node = this.element.cloneNode();\n node.className = isExpand ? 'e-recordplusexpand' : 'e-recordpluscollapse';\n node.setAttribute('ej-mappingname', data.field);\n node.setAttribute('ej-mappingvalue', data.key);\n node.setAttribute('aria-expanded', isExpand ? 'true' : 'false');\n node.setAttribute('tabindex', '-1');\n node.appendChild(this.parent.createElement('div', {\n className: isExpand ? 'e-icons e-gdiagonaldown e-icon-gdownarrow' : 'e-icons e-gnextforward e-icon-grightarrow'\n }));\n return node;\n };\n return ExpandCellRenderer;\n}(IndentCellRenderer));\nexport { ExpandCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { CellRenderer } from './cell-renderer';\n/**\n * HeaderIndentCellRenderer class which responsible for building header indent cell.\n * @hidden\n */\nvar HeaderIndentCellRenderer = /** @class */ (function (_super) {\n __extends(HeaderIndentCellRenderer, _super);\n function HeaderIndentCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TH', { className: 'e-grouptopleftcell' });\n return _this;\n }\n /**\n * Function to render the indent cell\n * @param {Cell} cell\n * @param {Object} data\n */\n HeaderIndentCellRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n node.appendChild(this.parent.createElement('div', { className: 'e-headercelldiv e-emptycell', innerHTML: '' }));\n return node;\n };\n return HeaderIndentCellRenderer;\n}(CellRenderer));\nexport { HeaderIndentCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { CellRenderer } from './cell-renderer';\n/**\n * DetailHeaderIndentCellRenderer class which responsible for building detail header indent cell.\n * @hidden\n */\nvar DetailHeaderIndentCellRenderer = /** @class */ (function (_super) {\n __extends(DetailHeaderIndentCellRenderer, _super);\n function DetailHeaderIndentCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TH', { className: 'e-detailheadercell' });\n return _this;\n }\n /**\n * Function to render the detail indent cell\n * @param {Cell} cell\n * @param {Object} data\n */\n DetailHeaderIndentCellRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n node.appendChild(this.parent.createElement('div', { className: 'e-emptycell' }));\n return node;\n };\n return DetailHeaderIndentCellRenderer;\n}(CellRenderer));\nexport { DetailHeaderIndentCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { CellRenderer } from './cell-renderer';\n/**\n * ExpandCellRenderer class which responsible for building group expand cell.\n * @hidden\n */\nvar DetailExpandCellRenderer = /** @class */ (function (_super) {\n __extends(DetailExpandCellRenderer, _super);\n function DetailExpandCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TD', {\n className: 'e-detailrowcollapse',\n attrs: { 'aria-expanded': 'false', role: 'gridcell', tabindex: '-1' }\n });\n return _this;\n }\n /**\n * Function to render the detail expand cell\n */\n DetailExpandCellRenderer.prototype.render = function (cell, data, attributes) {\n var node = this.element.cloneNode();\n if (attributes && !isNullOrUndefined(attributes['class'])) {\n node.className = '';\n node.className = attributes['class'];\n node.appendChild(this.parent.createElement('div', { className: 'e-icons e-dtdiagonaldown e-icon-gdownarrow' }));\n }\n else {\n node.appendChild(this.parent.createElement('div', { className: 'e-icons e-dtdiagonalright e-icon-grightarrow' }));\n }\n return node;\n };\n return DetailExpandCellRenderer;\n}(CellRenderer));\nexport { DetailExpandCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { CellRenderer } from './cell-renderer';\n/**\n * ExpandCellRenderer class which responsible for building group expand cell.\n * @hidden\n */\nvar RowDragDropRenderer = /** @class */ (function (_super) {\n __extends(RowDragDropRenderer, _super);\n function RowDragDropRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TD', {\n className: 'e-rowdragdrop',\n attrs: { role: 'gridcell', tabindex: '-1' }\n });\n return _this;\n }\n /**\n * Function to render the detail expand cell\n */\n RowDragDropRenderer.prototype.render = function (cell, data) {\n var nodeElement = this.element.cloneNode();\n nodeElement.appendChild(this.parent.createElement('div', {\n className: 'e-icons e-rowcelldrag e-dtdiagonalright e-icon-rowdragicon'\n }));\n if (cell.isSelected) {\n nodeElement.classList.add('e-selectionbackground');\n nodeElement.classList.add('e-active');\n }\n return nodeElement;\n };\n return RowDragDropRenderer;\n}(CellRenderer));\nexport { RowDragDropRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { createElement } from '@syncfusion/ej2-base';\nimport { CellRenderer } from './cell-renderer';\n/**\n * DetailHeaderIndentCellRenderer class which responsible for building detail header indent cell.\n * @hidden\n */\nvar RowDragDropHeaderRenderer = /** @class */ (function (_super) {\n __extends(RowDragDropHeaderRenderer, _super);\n function RowDragDropHeaderRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TH', { className: 'e-rowdragheader' });\n return _this;\n }\n /**\n * Function to render the detail indent cell\n * @param {Cell} cell\n * @param {Object} data\n */\n RowDragDropHeaderRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n node.appendChild(createElement('div', { className: 'e-emptycell' }));\n return node;\n };\n return RowDragDropHeaderRenderer;\n}(CellRenderer));\nexport { RowDragDropHeaderRenderer };\n","import { remove, resetBlazorTemplate, updateBlazorTemplate, blazorTemplates, isBlazor } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { DataManager, Query, Deferred, Predicate, DataUtil } from '@syncfusion/ej2-data';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { RenderType, CellType } from '../base/enum';\nimport { Data } from '../actions/data';\nimport { Column } from '../models/column';\nimport { Row } from '../models/row';\nimport { Cell } from '../models/cell';\nimport * as events from '../base/constant';\nimport { prepareColumns, setFormatter, isGroupAdaptive, getDatePredicate, getObject } from '../base/util';\nimport { ContentRender } from '../renderer/content-renderer';\nimport { HeaderRender } from '../renderer/header-renderer';\nimport { CellRenderer } from '../renderer/cell-renderer';\nimport { HeaderCellRenderer } from '../renderer/header-cell-renderer';\nimport { StackedHeaderCellRenderer } from '../renderer/stacked-cell-renderer';\nimport { IndentCellRenderer } from '../renderer/indent-cell-renderer';\nimport { GroupCaptionCellRenderer, GroupCaptionEmptyCellRenderer } from '../renderer/caption-cell-renderer';\nimport { ExpandCellRenderer } from '../renderer/expand-cell-renderer';\nimport { HeaderIndentCellRenderer } from '../renderer/header-indent-renderer';\nimport { DetailHeaderIndentCellRenderer } from '../renderer/detail-header-indent-renderer';\nimport { DetailExpandCellRenderer } from '../renderer/detail-expand-cell-renderer';\nimport { RowDragDropRenderer } from './row-drag-drop-renderer';\nimport { RowDragDropHeaderRenderer } from '../renderer/row-drag-header-indent-render';\n/**\n * Content module is used to render grid content\n * @hidden\n */\nvar Render = /** @class */ (function () {\n /**\n * Constructor for render module\n */\n function Render(parent, locator) {\n this.emptyGrid = false;\n this.counter = 0;\n this.parent = parent;\n this.locator = locator;\n this.data = new Data(parent, locator);\n this.l10n = locator.getService('localization');\n this.ariaService = this.locator.getService('ariaService');\n this.renderer = this.locator.getService('rendererFactory');\n this.addEventListener();\n }\n /**\n * To initialize grid header, content and footer rendering\n */\n Render.prototype.render = function () {\n var gObj = this.parent;\n var isServerRendered = 'isServerRendered';\n this.headerRenderer = this.renderer.getRenderer(RenderType.Header);\n this.contentRenderer = this.renderer.getRenderer(RenderType.Content);\n this.headerRenderer.renderPanel();\n this.contentRenderer.renderPanel();\n if (gObj.getColumns().length) {\n this.isLayoutRendered = true;\n this.headerRenderer.renderTable();\n this.contentRenderer.renderTable();\n this.emptyRow(false);\n }\n this.parent.scrollModule.setWidth();\n this.parent.scrollModule.setHeight();\n if (this.parent.height !== 'auto') {\n this.parent.scrollModule.setPadding();\n }\n if (!(isBlazor() && this.parent[isServerRendered])) {\n this.refreshDataManager();\n }\n };\n /**\n * Refresh the entire Grid.\n * @return {void}\n */\n Render.prototype.refresh = function (e) {\n var _this = this;\n if (e === void 0) { e = { requestType: 'refresh' }; }\n var gObj = this.parent;\n var preventUpdate = 'preventUpdate';\n gObj.notify(e.requestType + \"-begin\", e);\n if (isBlazor()) {\n this.resetTemplates();\n }\n if (isBlazor() && gObj.isServerRendered) {\n var bulkChanges = 'bulkChanges';\n if (gObj[bulkChanges].dataSource) {\n delete gObj[bulkChanges].dataSource;\n }\n gObj.notify('blazor-action-begin', e);\n if (e.requestType === 'filtering') {\n var columns = 'columns';\n e[columns] = null;\n }\n if (e.requestType === 'sorting') {\n var target = 'target';\n e[target] = null;\n }\n if (gObj.editSettings.mode === 'Batch' && !gObj.isEdit) {\n gObj.notify('closebatch', {});\n }\n }\n var tempPreventUpdate = this.parent[preventUpdate];\n gObj.trigger(events.actionBegin, e, function (args) {\n if (args === void 0) { args = { requestType: 'refresh' }; }\n if (args.requestType === 'delete' && isBlazor() && !gObj.isJsComponent) {\n var data = 'data';\n if (isNullOrUndefined(gObj.commandDelIndex)) {\n args[data] = gObj.getSelectedRecords();\n }\n else {\n var tempSelectedRecord = args[data];\n args[data] = {};\n args[data][0] = tempSelectedRecord;\n }\n }\n if (args.cancel) {\n gObj.notify(events.cancelBegin, args);\n return;\n }\n if (isBlazor() && gObj.editSettings.mode === 'Normal' && gObj.isEdit && e.requestType !== 'infiniteScroll') {\n gObj.notify('closeinline', {});\n }\n if (args.requestType === 'delete' && gObj.allowPaging) {\n var dataLength = args.data.length;\n var count = gObj.pageSettings.totalRecordsCount - dataLength;\n var currentViewData = gObj.getCurrentViewRecords().length;\n if (!(currentViewData - dataLength) && count && currentViewData !== dataLength) {\n gObj.prevPageMoving = true;\n gObj.setProperties({\n pageSettings: {\n totalRecordsCount: count, currentPage: Math.ceil(count / gObj.pageSettings.pageSize)\n }\n }, true);\n gObj.pagerModule.pagerObj.totalRecordsCount = count;\n }\n }\n if (isBlazor() && _this.parent.isServerRendered) {\n if (tempPreventUpdate) {\n var bulkChanges = 'bulkChanges';\n gObj[bulkChanges] = {};\n return;\n }\n if (e.requestType === 'refresh') {\n _this.parent.notify('updateaction', args);\n }\n if (args.requestType !== 'virtualscroll') {\n _this.parent.showSpinner();\n }\n if (args.requestType === 'delete' || args.requestType === 'save') {\n _this.parent.notify(events.addDeleteAction, args);\n _this.parent.notify('add-delete-success', args);\n }\n else {\n _this.parent.allowServerDataBinding = true;\n _this.parent.serverDataBind();\n _this.parent.allowServerDataBinding = false;\n }\n }\n else if (args.requestType === 'reorder' && _this.parent.dataSource && 'result' in _this.parent.dataSource) {\n _this.contentRenderer.refreshContentRows(args);\n }\n else if ((args.requestType === 'paging' || args.requestType === 'columnstate' || args.requestType === 'reorder')\n && _this.parent.groupSettings.enableLazyLoading && _this.parent.groupSettings.columns.length\n && _this.parent.contentModule.getGroupCache()[_this.parent.pageSettings.currentPage]) {\n _this.contentRenderer.refreshContentRows(args);\n }\n else {\n _this.refreshDataManager(args);\n }\n });\n };\n /**\n * @hidden\n */\n Render.prototype.resetTemplates = function () {\n var gObj = this.parent;\n var gridColumns = gObj.getColumns();\n if (gObj.detailTemplate) {\n var detailTemplateID = gObj.element.id + 'detailTemplate';\n blazorTemplates[detailTemplateID] = [];\n resetBlazorTemplate(detailTemplateID, 'DetailTemplate');\n }\n if (gObj.groupSettings.captionTemplate) {\n resetBlazorTemplate(gObj.element.id + 'captionTemplate', 'CaptionTemplate');\n }\n if (gObj.rowTemplate) {\n resetBlazorTemplate(gObj.element.id + 'rowTemplate', 'RowTemplate');\n }\n if (gObj.toolbarTemplate) {\n resetBlazorTemplate(gObj.element.id + 'toolbarTemplate', 'ToolbarTemplate');\n }\n if (gObj.pageSettings.template) {\n resetBlazorTemplate(gObj.element.id + '_template', 'pageSettings');\n }\n for (var i = 0; i < gridColumns.length; i++) {\n if (gridColumns[i].template) {\n blazorTemplates[gObj.element.id + gridColumns[i].uid] = [];\n resetBlazorTemplate(gObj.element.id + gridColumns[i].uid, 'Template');\n }\n if (gridColumns[i].headerTemplate) {\n resetBlazorTemplate(gObj.element.id + gridColumns[i].uid + 'headerTemplate', 'HeaderTemplate');\n }\n if (gridColumns[i].filterTemplate) {\n resetBlazorTemplate(gObj.element.id + gridColumns[i].uid + 'filterTemplate', 'FilterTemplate');\n }\n }\n var guid = 'guid';\n for (var k = 0; k < gObj.aggregates.length; k++) {\n for (var j = 0; j < gObj.aggregates[k].columns.length; j++) {\n if (gObj.aggregates[k].columns[j].footerTemplate) {\n var tempID = gObj.element.id + gObj.aggregates[k].columns[j][guid] + 'footerTemplate';\n resetBlazorTemplate(tempID, 'FooterTemplate');\n }\n if (gObj.aggregates[k].columns[j].groupFooterTemplate) {\n var tempID = gObj.element.id + gObj.aggregates[k].columns[j][guid] + 'groupFooterTemplate';\n resetBlazorTemplate(tempID, 'GroupFooterTemplate');\n }\n if (gObj.aggregates[k].columns[j].groupCaptionTemplate) {\n var tempID = gObj.element.id + gObj.aggregates[k].columns[j][guid] + 'groupCaptionTemplate';\n resetBlazorTemplate(tempID, 'GroupCaptionTemplate');\n }\n }\n }\n };\n Render.prototype.refreshComplete = function (e) {\n if (isBlazor() && !this.parent.isJsComponent) {\n e.rows = null;\n }\n this.parent.trigger(events.actionComplete, e);\n };\n /**\n * The function is used to refresh the dataManager\n * @return {void}\n */\n Render.prototype.refreshDataManager = function (args) {\n var _this = this;\n if (args === void 0) { args = {}; }\n if (args.requestType !== 'virtualscroll') {\n this.parent.showSpinner();\n }\n this.parent.notify(events.resetInfiniteBlocks, args);\n this.emptyGrid = false;\n var dataManager;\n var isFActon = this.isNeedForeignAction();\n this.ariaService.setBusy(this.parent.getContent().querySelector('.e-content'), true);\n if (isFActon) {\n var deffered = new Deferred();\n dataManager = this.getFData(deffered, args);\n }\n if (!dataManager) {\n dataManager = this.data.getData(args, this.data.generateQuery().requiresCount());\n }\n else {\n dataManager = dataManager.then(function (e) {\n var query = _this.data.generateQuery().requiresCount();\n if (_this.emptyGrid) {\n var def = new Deferred();\n def.resolve({ result: [], count: 0 });\n return def.promise;\n }\n return _this.data.getData(args, query);\n });\n }\n if (this.parent.getForeignKeyColumns().length && (!isFActon || this.parent.searchSettings.key.length)) {\n var deffered_1 = new Deferred();\n dataManager = dataManager.then(function (e) {\n _this.parent.notify(events.getForeignKeyData, { dataManager: dataManager, result: e, promise: deffered_1, action: args });\n return deffered_1.promise;\n });\n }\n if (this.parent.groupSettings.disablePageWiseAggregates && this.parent.groupSettings.columns.length) {\n dataManager = dataManager.then(function (e) { return _this.validateGroupRecords(e); });\n }\n dataManager.then(function (e) { return _this.dataManagerSuccess(e, args); })\n .catch(function (e) { return _this.dataManagerFailure(e, args); });\n };\n Render.prototype.getFData = function (deferred, args) {\n this.parent.notify(events.getForeignKeyData, { isComplex: true, promise: deferred, action: args });\n return deferred.promise;\n };\n Render.prototype.isNeedForeignAction = function () {\n var gObj = this.parent;\n return !!((gObj.allowFiltering && gObj.filterSettings.columns.length) ||\n (gObj.searchSettings.key.length)) && this.foreignKey(this.parent.getForeignKeyColumns());\n };\n Render.prototype.foreignKey = function (columns) {\n var _this = this;\n return columns.some(function (col) {\n var fbool = false;\n fbool = _this.parent.filterSettings.columns.some(function (value) {\n return col.uid === value.uid;\n });\n return !!(fbool || _this.parent.searchSettings.key.length);\n });\n };\n Render.prototype.sendBulkRequest = function (args) {\n var _this = this;\n args.requestType = 'batchsave';\n var promise = this.data.saveChanges(args.changes, this.parent.getPrimaryKeyFieldNames()[0], args.original);\n if (isBlazor() && !this.parent.isJsComponent) {\n promise.then(function (e) {\n _this.parent.notify('editsuccess', args);\n }).catch(function (e) {\n var error = 'error';\n var message = 'message';\n if (!isNullOrUndefined(e[error]) && !isNullOrUndefined(e[error][message])) {\n e[error] = e[error][message];\n }\n _this.parent.trigger(events.actionFailure, e);\n });\n }\n else {\n var query_1 = this.data.generateQuery().requiresCount();\n if (this.data.dataManager.dataSource.offline) {\n this.refreshDataManager({ requestType: 'batchsave' });\n return;\n }\n else {\n promise.then(function (e) {\n _this.data.getData(args, query_1)\n .then(function (e) { return _this.dmSuccess(e, args); })\n .catch(function (e) { return _this.dmFailure(e, args); });\n })\n .catch(function (e) { return _this.dmFailure(e, args); });\n }\n }\n };\n Render.prototype.dmSuccess = function (e, args) {\n this.dataManagerSuccess(e, args);\n };\n Render.prototype.dmFailure = function (e, args) {\n this.dataManagerFailure(e, args);\n };\n /**\n * Render empty row to Grid which is used at the time to represent to no records.\n * @return {void}\n * @hidden\n */\n Render.prototype.renderEmptyRow = function () {\n this.emptyRow(true);\n };\n Render.prototype.emptyRow = function (isTrigger) {\n var gObj = this.parent;\n var tbody = this.contentRenderer.getTable().querySelector('tbody');\n var tr;\n if (!isNullOrUndefined(tbody)) {\n remove(tbody);\n }\n tbody = this.parent.createElement('tbody');\n var spanCount = 0;\n if (gObj.detailTemplate || gObj.childGrid) {\n ++spanCount;\n }\n tr = this.parent.createElement('tr', { className: 'e-emptyrow' });\n tr.appendChild(this.parent.createElement('td', {\n innerHTML: this.l10n.getConstant('EmptyRecord'),\n attrs: { colspan: (gObj.getColumns().length + spanCount).toString() }\n }));\n tbody.appendChild(tr);\n this.contentRenderer.renderEmpty(tbody);\n if (isTrigger) {\n this.parent.trigger(events.dataBound, {});\n this.parent.notify(events.onEmpty, { rows: [new Row({ isDataRow: true, cells: [new Cell({ isDataCell: true, visible: true })] })] });\n }\n };\n Render.prototype.dynamicColumnChange = function () {\n if (this.parent.getCurrentViewRecords().length) {\n this.updateColumnType(this.parent.getCurrentViewRecords()[0]);\n }\n };\n Render.prototype.updateColumnType = function (record) {\n var columns = this.parent.getColumns();\n var value;\n var cFormat = 'customFormat';\n var equalTo = 'equalTo';\n var data = record && record.items ? record.items[0] : record;\n var fmtr = this.locator.getService('valueFormatter');\n for (var i = 0, len = columns.length; i < len; i++) {\n value = getObject(columns[i].field || '', data);\n if (!isNullOrUndefined(columns[i][cFormat])) {\n columns[i].format = columns[i][cFormat];\n }\n if (!isNullOrUndefined(columns[i].validationRules) && !isNullOrUndefined(columns[i].validationRules[equalTo])) {\n columns[i].validationRules[equalTo][0] = this.parent.element.id + columns[i].validationRules[equalTo][0];\n }\n if (columns[i].isForeignColumn() && columns[i].columnData) {\n value = getObject(columns[i].foreignKeyValue || '', columns[i].columnData[0]);\n }\n if (!isNullOrUndefined(value)) {\n this.isColTypeDef = true;\n if (!columns[i].type || (isBlazor() && this.parent.isServerRendered && columns[i].type === 'none')) {\n columns[i].type = value.getDay ? (value.getHours() > 0 || value.getMinutes() > 0 ||\n value.getSeconds() > 0 || value.getMilliseconds() > 0 ? 'datetime' : 'date') : typeof (value);\n }\n }\n else {\n columns[i].type = columns[i].type || (isBlazor() && this.parent.isServerRendered ? 'none' : null);\n }\n var valueFormatter = new ValueFormatter();\n if (columns[i].format && (columns[i].format.skeleton || columns[i].format.format)) {\n columns[i].setFormatter(valueFormatter.getFormatFunction(extend({}, columns[i].format)));\n columns[i].setParser(valueFormatter.getParserFunction(columns[i].format));\n }\n if (typeof (columns[i].format) === 'string') {\n var isServerRendered = 'isServerRendered';\n var isServerDateMap = this.parent[isServerRendered] || this.parent.printModule.isPrintGrid();\n setFormatter(this.locator, columns[i], isServerDateMap);\n }\n else if (!columns[i].format && columns[i].type === 'number') {\n columns[i].setParser(fmtr.getParserFunction({ format: 'n2' }));\n }\n }\n };\n /** @hidden */\n // tslint:disable-next-line:max-func-body-length\n Render.prototype.dataManagerSuccess = function (e, args) {\n var _this = this;\n var gObj = this.parent;\n this.contentRenderer = this.renderer.getRenderer(RenderType.Content);\n this.headerRenderer = this.renderer.getRenderer(RenderType.Header);\n e.actionArgs = args;\n var isInfiniteDelete = this.parent.enableInfiniteScrolling && !this.parent.infiniteScrollSettings.enableCache\n && (args.requestType === 'delete' || (args.requestType === 'save' && this.parent.infiniteScrollModule.requestType === 'add'));\n // tslint:disable-next-line:max-func-body-length\n gObj.trigger(events.beforeDataBound, e, function (dataArgs) {\n if (dataArgs.cancel) {\n return;\n }\n dataArgs.result = isNullOrUndefined(dataArgs.result) ? [] : dataArgs.result;\n var len = Object.keys(dataArgs.result).length;\n if (_this.parent.isDestroyed) {\n return;\n }\n if ((!gObj.getColumns().length && !len) && !(gObj.columns.length && gObj.columns[0] instanceof Column)) {\n gObj.hideSpinner();\n return;\n }\n if (_this.isInfiniteEnd(args) && !len) {\n _this.parent.notify(events.infiniteEditHandler, { e: args, result: e.result, count: e.count, agg: e.aggregates });\n return;\n }\n _this.parent.isEdit = false;\n _this.parent.notify(events.editReset, {});\n _this.parent.notify(events.tooltipDestroy, {});\n _this.contentRenderer.prevCurrentView = _this.parent.currentViewData.slice();\n gObj.currentViewData = dataArgs.result;\n gObj.notify(events.refreshInfiniteCurrentViewData, { args: args, data: dataArgs.result });\n if (isBlazor() && gObj.filterSettings.type === 'FilterBar'\n && (isNullOrUndefined(gObj.currentViewData) ||\n (!isNullOrUndefined(gObj.currentViewData) && !gObj.currentViewData.length))) {\n var gridColumns = gObj.getColumns();\n for (var i = 0; i < gridColumns.length; i++) {\n if (gridColumns[i].filterTemplate) {\n var tempID = gObj.element.id + gridColumns[i].uid + 'filterTemplate';\n resetBlazorTemplate(tempID, 'FilterTemplate');\n var fieldName = gridColumns[i].field;\n var filteredColumns = gObj.filterSettings.columns;\n for (var k = 0; k < filteredColumns.length; k++) {\n if (fieldName === filteredColumns[k].field) {\n blazorTemplates[tempID][0][fieldName] = filteredColumns[k].value;\n }\n }\n updateBlazorTemplate(tempID, 'FilterTemplate', gridColumns[i], false);\n }\n }\n }\n if (!len && dataArgs.count && gObj.allowPaging && args && args.requestType !== 'delete') {\n if (_this.parent.groupSettings.enableLazyLoading\n && (args.requestType === 'grouping' || args.requestType === 'ungrouping')) {\n _this.parent.notify(events.groupComplete, args);\n }\n gObj.prevPageMoving = true;\n gObj.pageSettings.totalRecordsCount = dataArgs.count;\n if (args.requestType !== 'paging') {\n gObj.pageSettings.currentPage = Math.ceil(dataArgs.count / gObj.pageSettings.pageSize);\n }\n gObj.dataBind();\n return;\n }\n if ((!gObj.getColumns().length && len || !_this.isLayoutRendered) && !isGroupAdaptive(gObj)) {\n _this.updatesOnInitialRender(dataArgs);\n }\n if (!_this.isColTypeDef && gObj.getCurrentViewRecords()) {\n if (_this.data.dataManager.dataSource.offline && gObj.dataSource.length) {\n _this.updateColumnType(gObj.dataSource[0]);\n }\n else {\n _this.updateColumnType(gObj.getCurrentViewRecords()[0]);\n }\n }\n if (!_this.parent.isInitialLoad && _this.parent.groupSettings.disablePageWiseAggregates &&\n !_this.parent.groupSettings.columns.length) {\n dataArgs.result = _this.parent.dataSource instanceof Array ? _this.parent.dataSource : _this.parent.currentViewData;\n }\n _this.parent.notify(events.dataReady, extend({ count: dataArgs.count, result: dataArgs.result, aggregates: dataArgs.aggregates }, args));\n if ((gObj.groupSettings.columns.length || (args && args.requestType === 'ungrouping'))\n && (args && args.requestType !== 'filtering')) {\n _this.headerRenderer.refreshUI();\n }\n if (len) {\n if (isGroupAdaptive(gObj)) {\n var content = 'content';\n args.scrollTop = { top: _this.contentRenderer[content].scrollTop };\n }\n if (!isInfiniteDelete) {\n if (_this.parent.enableImmutableMode) {\n _this.contentRenderer.immutableModeRendering(args);\n }\n else {\n _this.contentRenderer.refreshContentRows(args);\n }\n }\n else {\n _this.parent.notify(events.infiniteEditHandler, { e: args, result: e.result, count: e.count, agg: e.aggregates });\n }\n }\n else {\n if (!gObj.getColumns().length) {\n gObj.element.innerHTML = '';\n alert(_this.l10n.getConstant('EmptyDataSourceError')); //ToDO: change this alert as dialog\n return;\n }\n _this.contentRenderer.setRowElements([]);\n _this.contentRenderer.setRowObjects([]);\n _this.ariaService.setBusy(_this.parent.getContent().querySelector('.e-content'), false);\n _this.renderEmptyRow();\n if (args) {\n var action = (args.requestType || '').toLowerCase() + '-complete';\n _this.parent.notify(action, args);\n if (args.requestType === 'batchsave') {\n args.cancel = false;\n args.rows = [];\n args.isFrozen = _this.parent.getFrozenColumns() !== 0 && !args.isFrozen;\n _this.parent.trigger(events.actionComplete, args);\n }\n }\n _this.parent.hideSpinner();\n }\n _this.parent.notify(events.toolbarRefresh, {});\n _this.setRowCount(_this.parent.getCurrentViewRecords().length);\n _this.parent.getDataModule().isQueryInvokedFromData = false;\n });\n };\n /** @hidden */\n Render.prototype.dataManagerFailure = function (e, args) {\n this.ariaService.setOptions(this.parent.getContent().querySelector('.e-content'), { busy: false, invalid: true });\n this.setRowCount(1);\n this.parent.trigger(events.actionFailure, { error: e });\n this.parent.hideSpinner();\n if (args.requestType === 'save' || args.requestType === 'delete'\n || args.name === 'bulk-save') {\n return;\n }\n this.parent.currentViewData = [];\n this.renderEmptyRow();\n this.parent.log('actionfailure', { error: e });\n };\n Render.prototype.setRowCount = function (dataRowCount) {\n var gObj = this.parent;\n this.ariaService.setOptions(this.parent.getHeaderTable(), {\n rowcount: dataRowCount ? dataRowCount.toString() : '1'\n });\n };\n Render.prototype.isInfiniteEnd = function (args) {\n return this.parent.enableInfiniteScrolling && !this.parent.infiniteScrollSettings.enableCache && args.requestType === 'delete';\n };\n Render.prototype.updatesOnInitialRender = function (e) {\n this.isLayoutRendered = true;\n if (this.parent.columns.length < 1) {\n this.buildColumns(e.result[0]);\n }\n prepareColumns(this.parent.columns, null, this.parent);\n this.headerRenderer.renderTable();\n this.contentRenderer.renderTable();\n this.parent.isAutoGen = true;\n this.parent.notify(events.autoCol, {});\n };\n Render.prototype.iterateComplexColumns = function (obj, field, split) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n var childKeys = typeof obj[keys[i]] === 'object' && obj[keys[i]] && !(obj[keys[i]] instanceof Date) ?\n Object.keys(obj[keys[i]]) : [];\n if (childKeys.length) {\n this.iterateComplexColumns(obj[keys[i]], field + (keys[i] + '.'), split);\n }\n else {\n split[this.counter] = field + keys[i];\n this.counter++;\n }\n }\n };\n Render.prototype.buildColumns = function (record) {\n var cols = [];\n var complexCols = {};\n this.iterateComplexColumns(record, '', complexCols);\n var columns = Object.keys(complexCols).filter(function (e) { return complexCols[e] !== 'BlazId'; }).\n map(function (field) { return complexCols[field]; });\n for (var i = 0, len = columns.length; i < len; i++) {\n cols[i] = { 'field': columns[i] };\n if (this.parent.enableColumnVirtualization) {\n cols[i].width = !isNullOrUndefined(cols[i].width) ? cols[i].width : 200;\n }\n }\n this.parent.setProperties({ 'columns': cols }, true);\n };\n Render.prototype.instantiateRenderer = function () {\n this.renderer.addRenderer(RenderType.Header, new HeaderRender(this.parent, this.locator));\n this.renderer.addRenderer(RenderType.Content, new ContentRender(this.parent, this.locator));\n var cellrender = this.locator.getService('cellRendererFactory');\n cellrender.addCellRenderer(CellType.Header, new HeaderCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.Data, new CellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.StackedHeader, new StackedHeaderCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.Indent, new IndentCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.GroupCaption, new GroupCaptionCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.GroupCaptionEmpty, new GroupCaptionEmptyCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.Expand, new ExpandCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.HeaderIndent, new HeaderIndentCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.StackedHeader, new StackedHeaderCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.DetailHeader, new DetailHeaderIndentCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.RowDragHIcon, new RowDragDropHeaderRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.DetailExpand, new DetailExpandCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.DetailFooterIntent, new IndentCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.RowDragIcon, new RowDragDropRenderer(this.parent, this.locator));\n };\n Render.prototype.addEventListener = function () {\n var _this = this;\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.initialLoad, this.instantiateRenderer, this);\n this.parent.on('refreshdataSource', this.dataManagerSuccess, this);\n this.parent.on(events.modelChanged, this.refresh, this);\n this.parent.on(events.refreshComplete, this.refreshComplete, this);\n this.parent.on(events.bulkSave, this.sendBulkRequest, this);\n this.parent.on(events.showEmptyGrid, function () { _this.emptyGrid = true; }, this);\n this.parent.on(events.autoCol, this.dynamicColumnChange, this);\n };\n /** @hidden */\n Render.prototype.validateGroupRecords = function (e) {\n var _this = this;\n var index = e.result.length - 1;\n if (index < 0) {\n return Promise.resolve(e);\n }\n var group0 = e.result[0];\n var groupN = e.result[index];\n var predicate = [];\n var addWhere = function (input) {\n var groups = [group0, groupN];\n for (var i = 0; i < groups.length; i++) {\n predicate.push(new Predicate('field', '==', groups[i].field).and(_this.getPredicate('key', 'equal', groups[i].key)));\n }\n input.where(Predicate.or(predicate));\n };\n var query = new Query();\n addWhere(query);\n var curDm = new DataManager(e.result);\n var curFilter = curDm.executeLocal(query);\n var newQuery = this.data.generateQuery(true);\n var rPredicate = [];\n if (this.data.isRemote() || isBlazor()) {\n var groups = [group0, groupN];\n for (var i = 0; i < groups.length; i++) {\n rPredicate.push(this.getPredicate(groups[i].field, 'equal', groups[i].key));\n }\n newQuery.where(Predicate.or(rPredicate));\n }\n else {\n addWhere(newQuery);\n }\n var deferred = new Deferred();\n this.data.getData({}, newQuery).then(function (r) {\n _this.updateGroupInfo(curFilter, r.result);\n deferred.resolve(e);\n }).catch(function (e) { return deferred.reject(e); });\n return deferred.promise;\n };\n Render.prototype.getPredicate = function (key, operator, value) {\n if (value instanceof Date) {\n return getDatePredicate({ field: key, operator: operator, value: value });\n }\n return new Predicate(key, operator, value);\n };\n Render.prototype.updateGroupInfo = function (current, untouched) {\n var dm = new DataManager(untouched);\n var elements = current;\n for (var i = 0; i < elements.length; i++) {\n var uGroup = dm.executeLocal(new Query()\n .where(new Predicate('field', '==', elements[i].field).and(this.getPredicate('key', 'equal', elements[i].key))))[0];\n elements[i].count = uGroup.count;\n var itemGroup = elements[i].items;\n var uGroupItem = uGroup.items;\n if (itemGroup.GroupGuid) {\n elements[i].items = this.updateGroupInfo(elements[i].items, uGroup.items);\n }\n var rows = this.parent.aggregates;\n for (var j = 0; j < rows.length; j++) {\n var row = rows[j];\n for (var k = 0; k < row.columns.length; k++) {\n var types = row.columns[k].type instanceof Array ? (row.columns[k].type) :\n [(row.columns[k].type)];\n for (var l = 0; l < types.length; l++) {\n var key = row.columns[k].field + ' - ' + types[l].toLowerCase();\n var data = itemGroup.level ? uGroupItem.records : uGroup.items;\n var context = this.parent;\n if (types[l] === 'Custom') {\n var data_1 = itemGroup.level ? uGroupItem : uGroup;\n elements[i].aggregates[key] = row.columns[k].customAggregate ?\n row.columns[k].customAggregate\n .call(context, data_1, row.columns[k]) : '';\n }\n else {\n elements[i].aggregates[key] = DataUtil.aggregates[types[l].toLowerCase()](data, row.columns[k].field);\n }\n }\n }\n }\n }\n return current;\n };\n return Render;\n}());\nexport { Render };\n","import { isNullOrUndefined, getEnumValue } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\n/**\n * CellRendererFactory\n * @hidden\n */\nvar CellRendererFactory = /** @class */ (function () {\n function CellRendererFactory() {\n this.cellRenderMap = {};\n }\n CellRendererFactory.prototype.addCellRenderer = function (name, type) {\n name = typeof name === 'string' ? name : getEnumValue(CellType, name);\n if (isNullOrUndefined(this.cellRenderMap[name])) {\n this.cellRenderMap[name] = type;\n }\n };\n CellRendererFactory.prototype.getCellRenderer = function (name) {\n name = typeof name === 'string' ? name : getEnumValue(CellType, name);\n if (isNullOrUndefined(this.cellRenderMap[name])) {\n throw \"The cellRenderer \" + name + \" is not found\";\n }\n else {\n return this.cellRenderMap[name];\n }\n };\n return CellRendererFactory;\n}());\nexport { CellRendererFactory };\n","import { Dialog } from '@syncfusion/ej2-popups';\nimport { EventHandler, remove } from '@syncfusion/ej2-base';\nimport { parentsUntil, addBiggerDialog } from '../base/util';\nimport * as events from '../base/constant';\nimport { Button } from '@syncfusion/ej2-buttons';\nimport { ResponsiveDialogAction } from '../base/enum';\n/**\n *\n * The `ResponsiveDialogRenderer` module is used to render the responsive dialogs.\n */\nvar ResponsiveDialogRenderer = /** @class */ (function () {\n /**\n * Constructor for Grid Responsive dialog renderer\n * @hidden\n */\n function ResponsiveDialogRenderer(parent, serviceLocator) {\n this.sortedCols = [];\n this.sortPredicate = [];\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.addEventListener();\n }\n ResponsiveDialogRenderer.prototype.addEventListener = function () {\n this.parent.on(events.filterDialogClose, this.closeCustomDialog, this);\n this.parent.on(events.setCustomFilterHeader, this.setCustomFilterHeader, this);\n this.parent.on(events.refreshCustomFilterOkBtn, this.refreshCustomFilterOkBtn, this);\n this.parent.on(events.renderResponsiveCmenu, this.renderResponsiveContextMenu, this);\n this.parent.on(events.filterCmenuSelect, this.renderCustomFilterDiv, this);\n this.parent.on(events.customFilterClose, this.customExFilterClose, this);\n this.parent.on(events.refreshCustomFilterClearBtn, this.refreshCustomFilterClearBtn, this);\n this.onActionCompleteFn = this.editComplate.bind(this);\n this.parent.addEventListener(events.actionComplete, this.onActionCompleteFn);\n };\n ResponsiveDialogRenderer.prototype.customExFilterClose = function () {\n this.isCustomDlgRender = false;\n };\n ResponsiveDialogRenderer.prototype.renderCustomFilterDiv = function () {\n var header = this.customResponsiveDlg.element.querySelector('.e-dlg-header-content');\n var title = header.querySelector('.e-dlg-custom-header');\n var closeBtn = header.querySelector('.e-dlg-closeicon-btn');\n this.isCustomDlgRender = true;\n this.parent.filterModule.filterModule.closeDialog();\n this.saveBtn.element.style.display = '';\n this.refreshCustomFilterOkBtn({ disabled: false });\n this.backBtn.element.style.display = 'none';\n closeBtn.style.display = '';\n title.innerHTML = this.parent.localeObj.getConstant('CustomFilter');\n var content = this.customResponsiveDlg.element.querySelector('.e-dlg-content');\n this.customExcelFilterParent = this.parent.createElement('div', { className: 'e-xl-customfilterdiv e-default-filter' });\n content.appendChild(this.customExcelFilterParent);\n };\n ResponsiveDialogRenderer.prototype.renderResponsiveContextMenu = function (args) {\n if (this.action === ResponsiveDialogAction.isFilter) {\n var content = this.customResponsiveDlg.element.querySelector('.e-dlg-content');\n var header = this.customResponsiveDlg.element.querySelector('.e-dlg-header-content');\n var closeBtn = header.querySelector('.e-dlg-closeicon-btn');\n var text = header.querySelector('.e-dlg-custom-header');\n if (args.isOpen) {\n content.firstChild.style.display = 'none';\n content.appendChild(args.target);\n closeBtn.style.display = 'none';\n this.saveBtn.element.style.display = 'none';\n this.filterClearBtn.element.style.display = 'none';\n text.innerHTML = args.header;\n var backBtn = this.parent.createElement('button');\n var span = this.parent.createElement('span', { className: 'e-btn-icon e-resfilterback e-icons' });\n backBtn.appendChild(span);\n this.backBtn = new Button({\n cssClass: 'e-res-back-btn'\n });\n this.backBtn.appendTo(backBtn);\n text.parentElement.insertBefore(backBtn, text);\n }\n else if (this.backBtn && !this.isCustomDlgRender) {\n content.firstChild.style.display = '';\n remove(this.backBtn.element);\n closeBtn.style.display = '';\n this.saveBtn.element.style.display = '';\n if (this.isFiltered) {\n this.filterClearBtn.element.style.display = '';\n }\n text.innerHTML = this.getHeaderTitle({ action: ResponsiveDialogAction.isFilter });\n }\n }\n };\n ResponsiveDialogRenderer.prototype.refreshCustomFilterClearBtn = function (args) {\n if (this.filterClearBtn) {\n this.isFiltered = args.isFiltered;\n this.filterClearBtn.element.style.display = args.isFiltered ? '' : 'none';\n }\n };\n ResponsiveDialogRenderer.prototype.refreshCustomFilterOkBtn = function (args) {\n if (this.saveBtn) {\n this.saveBtn.disabled = args.disabled;\n }\n };\n ResponsiveDialogRenderer.prototype.renderResponsiveContent = function (col) {\n var _this = this;\n var gObj = this.parent;\n if (col) {\n this.filterParent = this.parent.createElement('div', { className: 'e-mainfilterdiv e-default-filter', id: col.uid + '-main-filter' });\n return this.filterParent;\n }\n else {\n var cols = gObj.getColumns();\n this.customColumnDiv = gObj.createElement('div', { className: 'columndiv', styles: 'width: 100%' });\n var sortBtnParent = gObj.createElement('div', { className: 'e-ressortbutton-parent' });\n var filteredCols = [];\n if (this.action === ResponsiveDialogAction.isFilter) {\n for (var i = 0; i < gObj.filterSettings.columns.length; i++) {\n filteredCols.push(gObj.filterSettings.columns[i].field);\n }\n }\n for (var i = 0; i < cols.length; i++) {\n var cDiv = gObj.createElement('div', { className: 'e-responsivecoldiv' });\n cDiv.setAttribute('data-e-mappingname', cols[i].field);\n cDiv.setAttribute('data-e-mappinguid', cols[i].uid);\n var span = gObj.createElement('span', { innerHTML: cols[i].headerText, className: 'e-res-header-text' });\n cDiv.appendChild(span);\n this.customColumnDiv.appendChild(cDiv);\n if (this.action === ResponsiveDialogAction.isSort) {\n var fields = this.getSortedFieldsAndDirections('field');\n var index = fields.indexOf(cols[i].field);\n var button = gObj.createElement('button', { id: gObj.element.id + cols[i].field + 'sortbutton' });\n var clone = sortBtnParent.cloneNode();\n clone.appendChild(button);\n cDiv.appendChild(clone);\n var btnObj = new Button({\n cssClass: 'e-ressortbutton'\n });\n btnObj.appendTo(button);\n button.innerHTML = index > -1 ? this.parent.sortSettings.columns[index].direction : 'None';\n button.onclick = function (e) {\n _this.sortButtonClickHandler(e.target);\n };\n }\n if (this.action === ResponsiveDialogAction.isFilter && filteredCols.indexOf(cols[i].field) > -1) {\n var divIcon = gObj.createElement('div', { className: 'e-icons e-res-icon e-filtersetdiv' });\n var iconSpan = gObj.createElement('span', { className: 'e-icons e-res-icon e-filterset' });\n iconSpan.setAttribute('colType', cols[i].type);\n divIcon.appendChild(iconSpan);\n cDiv.appendChild(divIcon);\n }\n }\n EventHandler.add(this.customColumnDiv, 'click', this.customFilterColumnClickHandler, this);\n return this.customColumnDiv;\n }\n };\n ResponsiveDialogRenderer.prototype.getSortedFieldsAndDirections = function (name) {\n var fields = [];\n for (var i = 0; i < this.parent.sortSettings.columns.length; i++) {\n fields.push(this.parent.sortSettings.columns[i][name]);\n }\n return fields;\n };\n ResponsiveDialogRenderer.prototype.sortButtonClickHandler = function (target) {\n if (target) {\n var columndiv = parentsUntil(target, 'e-responsivecoldiv');\n var field = columndiv.getAttribute('data-e-mappingname');\n if (!this.parent.allowMultiSorting) {\n this.sortPredicate = [];\n this.sortedCols = [];\n this.isSortApplied = false;\n this.resetSortButtons(target);\n }\n var txt = target.textContent;\n var direction = txt === 'None' ? 'Ascending' : txt === 'Ascending' ? 'Descending' : 'None';\n target.innerHTML = direction;\n this.setSortedCols(field, direction);\n }\n };\n ResponsiveDialogRenderer.prototype.resetSortButtons = function (target) {\n var buttons = [].slice.call(this.customColumnDiv.querySelectorAll('.e-ressortbutton'));\n for (var i = 0; i < buttons.length; i++) {\n if (buttons[i] !== target) {\n buttons[i].innerHTML = 'None';\n }\n }\n };\n ResponsiveDialogRenderer.prototype.setSortedCols = function (field, direction) {\n var fields = this.getCurrentSortedFields();\n var index = fields.indexOf(field);\n if (this.parent.allowMultiSorting && index > -1) {\n this.sortedCols.splice(index, 1);\n this.sortPredicate.splice(index, 1);\n }\n this.isSortApplied = true;\n if (direction !== 'None') {\n this.sortedCols.push(field);\n this.sortPredicate.push({ field: field, direction: direction });\n }\n };\n ResponsiveDialogRenderer.prototype.getCurrentSortedFields = function () {\n var fields = [];\n for (var i = 0; i < this.sortedCols.length; i++) {\n fields.push(this.sortedCols[i]);\n }\n return fields;\n };\n ResponsiveDialogRenderer.prototype.customFilterColumnClickHandler = function (e) {\n if (this.action !== ResponsiveDialogAction.isFilter) {\n return;\n }\n var gObj = this.parent;\n var target = e.target;\n if (gObj.filterSettings.type !== 'FilterBar') {\n if (target.classList.contains('e-responsivecoldiv') || target.parentElement.classList.contains('e-responsivecoldiv')) {\n var field = target.getAttribute('data-e-mappingname');\n if (!field) {\n field = target.parentElement.getAttribute('data-e-mappingname');\n }\n if (field) {\n var col = gObj.getColumnByField(field);\n this.isRowResponsive = true;\n this.showResponsiveDialog(col);\n }\n }\n else if (target.classList.contains('e-filterset') || target.parentElement.classList.contains('e-filtersetdiv')) {\n var colDiv = parentsUntil(target, 'e-responsivecoldiv');\n if (colDiv) {\n var field = colDiv.getAttribute('data-e-mappingname');\n var col = gObj.getColumnByField(field);\n if (col.filter.type === 'Menu' || (!col.filter.type && gObj.filterSettings.type === 'Menu')) {\n this.isDialogClose = true;\n }\n this.parent.filterModule.filterModule.clearCustomFilter(col);\n this.removeCustomDlgFilterEle(target);\n }\n }\n }\n };\n /**\n * To show the responsive custom filter dialog\n * @return {void}\n * @hidden\n */\n ResponsiveDialogRenderer.prototype.showResponsiveDialog = function (col) {\n if (this.parent.rowRenderingMode === 'Vertical' && this.action === ResponsiveDialogAction.isFilter && !this.isRowResponsive) {\n this.renderCustomFilterDialog();\n this.customFilterDlg.show(true);\n this.customFilterDlg.element.style.maxHeight = '100%';\n }\n else {\n this.filteredCol = col;\n this.renderResponsiveDialog(col);\n if (this.parent.enableAdaptiveUI && col) {\n this.parent.filterModule.setFilterModel(col);\n this.parent.filterModule.filterModule.openDialog(this.parent.filterModule.createOptions(col, undefined));\n }\n this.customResponsiveDlg.show(true);\n this.customResponsiveDlg.element.style.maxHeight = '100%';\n this.setTopToChildDialog(this.customResponsiveDlg.element);\n }\n };\n ResponsiveDialogRenderer.prototype.setTopToChildDialog = function (dialogEle) {\n var child = dialogEle.querySelector('.e-dialog');\n if (child) {\n var top_1 = dialogEle.querySelector('.e-dlg-header-content').getBoundingClientRect().height;\n child.style.top = top_1 + 'px';\n }\n };\n ResponsiveDialogRenderer.prototype.renderCustomFilterDialog = function (col) {\n var gObj = this.parent;\n if (this.action === ResponsiveDialogAction.isFilter && gObj.filterSettings.type === 'FilterBar') {\n return;\n }\n var outerDiv = this.parent.createElement('div', {\n id: gObj.element.id + 'customfilter', className: 'e-customfilterdiv e-responsive-dialog'\n });\n this.parent.element.appendChild(outerDiv);\n this.customFilterDlg = this.getDialogOptions(col, true);\n this.customFilterDlg.appendTo(outerDiv);\n };\n ResponsiveDialogRenderer.prototype.getDialogOptions = function (col, isCustomFilter, id) {\n var options = new Dialog({\n isModal: true,\n showCloseIcon: true,\n closeOnEscape: false,\n locale: this.parent.locale,\n target: this.parent.adaptiveDlgTarget ? this.parent.adaptiveDlgTarget : document.body,\n visible: false,\n enableRtl: this.parent.enableRtl,\n content: this.renderResponsiveContent(col),\n open: this.dialogOpen.bind(this),\n created: this.dialogCreated.bind(this),\n close: this.beforeDialogClose.bind(this),\n width: '100%',\n height: '100%',\n animationSettings: { effect: 'None' },\n });\n var isStringTemplate = 'isStringTemplate';\n options[isStringTemplate] = true;\n if (isCustomFilter) {\n options.header = this.renderResponsiveHeader(undefined, true);\n options.cssClass = 'e-customfilter';\n }\n else {\n options.header = this.renderResponsiveHeader();\n options.cssClass = this.parent.rowRenderingMode === 'Vertical' && this.action === ResponsiveDialogAction.isFilter\n ? 'e-res' + id + ' e-row-responsive-filter' : 'e-res' + id;\n }\n return options;\n };\n ResponsiveDialogRenderer.prototype.renderResponsiveDialog = function (col) {\n var gObj = this.parent;\n if (this.action === ResponsiveDialogAction.isFilter && gObj.filterSettings.type === 'FilterBar') {\n return;\n }\n var id = this.action === ResponsiveDialogAction.isFilter ? 'filter' : 'sort';\n var outerDiv = this.parent.createElement('div', {\n id: gObj.element.id + 'responsive' + id, className: 'e-res' + id + 'div e-responsive-dialog'\n });\n this.parent.element.appendChild(outerDiv);\n this.customResponsiveDlg = this.getDialogOptions(col, false, id);\n this.customResponsiveDlg.appendTo(outerDiv);\n };\n ResponsiveDialogRenderer.prototype.dialogCreated = function () {\n addBiggerDialog(this.parent);\n };\n ResponsiveDialogRenderer.prototype.dialogOpen = function () {\n if (this.action === ResponsiveDialogAction.isSort && this.parent.allowMultiSorting) {\n for (var i = 0; i < this.parent.sortSettings.columns.length; i++) {\n this.sortedCols.push(this.parent.sortSettings.columns[i].field);\n var sortField = this.parent.sortSettings.columns[i].field;\n var sortDirection = this.parent.sortSettings.columns[i].direction;\n this.sortPredicate.push({ field: sortField, direction: sortDirection });\n }\n }\n };\n ResponsiveDialogRenderer.prototype.beforeDialogClose = function (args) {\n this.isDialogClose = args.element && !args.element.querySelector('.e-xl-customfilterdiv')\n && args.element.classList.contains('e-resfilterdiv');\n if (this.action === ResponsiveDialogAction.isFilter) {\n if (args.element.classList.contains('e-resfilterdiv')) {\n this.parent.filterModule.filterModule.closeResponsiveDialog(this.isCustomDlgRender);\n }\n else if (args.element.classList.contains('e-customfilterdiv')) {\n this.closeCustomFilter();\n }\n }\n else if (this.action === ResponsiveDialogAction.isSort) {\n this.closeCustomDialog();\n }\n this.parent.off(events.enterKeyHandler, this.keyHandler);\n };\n ResponsiveDialogRenderer.prototype.sortColumn = function () {\n if (!this.isSortApplied) {\n this.closeCustomDialog();\n return;\n }\n if (this.sortPredicate.length) {\n this.parent.setProperties({ sortSettings: { columns: [] } }, true);\n }\n for (var i = 0; i < this.sortPredicate.length; i++) {\n this.parent.sortColumn(this.sortPredicate[i].field, this.sortPredicate[i].direction, this.parent.allowMultiSorting);\n }\n if (!this.sortPredicate.length) {\n this.parent.clearSorting();\n }\n this.closeCustomDialog();\n };\n ResponsiveDialogRenderer.prototype.getHeaderTitle = function (args) {\n var gObj = this.parent;\n var title;\n if (this.action === ResponsiveDialogAction.isEdit) {\n title = gObj.localeObj.getConstant('EditFormTitle') + args.primaryKeyValue[0];\n }\n else if (this.action === ResponsiveDialogAction.isAdd) {\n title = gObj.localeObj.getConstant('AddFormTitle');\n }\n else if (this.action === ResponsiveDialogAction.isFilter) {\n title = gObj.localeObj.getConstant('FilterButton');\n }\n else if (this.action === ResponsiveDialogAction.isSort) {\n title = gObj.localeObj.getConstant('Sort');\n }\n return title;\n };\n ResponsiveDialogRenderer.prototype.getDialogName = function (action) {\n var name;\n if (action === ResponsiveDialogAction.isAdd || action === ResponsiveDialogAction.isEdit) {\n name = 'dialogEdit_wrapper_title';\n }\n else if (action === ResponsiveDialogAction.isFilter) {\n name = 'responsive_filter_dialog_wrapper';\n }\n return name;\n };\n ResponsiveDialogRenderer.prototype.getButtonText = function (action) {\n var text;\n if (action === ResponsiveDialogAction.isAdd || action === ResponsiveDialogAction.isEdit) {\n text = 'Save';\n }\n else if (action === ResponsiveDialogAction.isFilter || this.action === ResponsiveDialogAction.isSort) {\n text = 'OKButton';\n }\n return text;\n };\n /** @hidden */\n ResponsiveDialogRenderer.prototype.renderResponsiveHeader = function (args, isCustomFilter) {\n var _this = this;\n var gObj = this.parent;\n gObj.on(events.enterKeyHandler, this.keyHandler, this);\n var id = gObj.element.id + this.getDialogName(this.action);\n var header = gObj.createElement('div', { className: 'e-res-custom-element' });\n var titleDiv = gObj.createElement('div', { className: 'e-dlg-custom-header', id: id });\n titleDiv.innerHTML = this.getHeaderTitle(args);\n header.appendChild(titleDiv);\n var saveBtn = gObj.createElement('button');\n if (!isCustomFilter) {\n this.saveBtn = new Button({\n cssClass: 'e-primary e-flat e-res-apply-btn',\n });\n saveBtn.innerHTML = gObj.localeObj.getConstant(this.getButtonText(this.action));\n this.saveBtn.appendTo(saveBtn);\n saveBtn.onclick = function (e) {\n _this.dialogHdrBtnClickHandler();\n };\n }\n var isSort = this.action === ResponsiveDialogAction.isSort;\n var isFilter = this.action === ResponsiveDialogAction.isFilter;\n if (isFilter || isSort) {\n var id_1 = isSort ? 'sort' : 'filter';\n var clearBtn = gObj.createElement('button');\n this.filterClearBtn = new Button({\n cssClass: 'e-primary e-flat e-res-' + id_1 + '-clear-btn',\n });\n if (isFilter) {\n var span = gObj.createElement('span', { className: 'e-btn-icon e-icon-filter-clear e-icons' });\n clearBtn.appendChild(span);\n }\n else {\n clearBtn.innerHTML = gObj.localeObj.getConstant('Clear');\n }\n header.appendChild(clearBtn);\n this.filterClearBtn.appendTo(clearBtn);\n clearBtn.onclick = function (e) {\n if ((parentsUntil(e.target, 'e-customfilter'))) {\n _this.parent.filterModule.clearFiltering();\n _this.removeCustomDlgFilterEle();\n }\n else {\n if (isFilter) {\n _this.filterClear();\n }\n else {\n _this.resetSortButtons();\n _this.sortedCols = [];\n _this.sortPredicate = [];\n _this.isSortApplied = true;\n }\n }\n };\n header.appendChild(clearBtn);\n }\n if (!isCustomFilter) {\n header.appendChild(saveBtn);\n }\n return header;\n };\n ResponsiveDialogRenderer.prototype.filterClear = function () {\n this.parent.filterModule.filterModule.clearCustomFilter(this.filteredCol);\n this.parent.filterModule.filterModule.closeResponsiveDialog();\n };\n ResponsiveDialogRenderer.prototype.dialogHdrBtnClickHandler = function () {\n if (this.action === ResponsiveDialogAction.isEdit || this.action === ResponsiveDialogAction.isAdd) {\n this.parent.endEdit();\n }\n else if (this.action === ResponsiveDialogAction.isFilter) {\n this.parent.filterModule.filterModule.applyCustomFilter({ col: this.filteredCol, isCustomFilter: this.isCustomDlgRender });\n }\n else if (this.action === ResponsiveDialogAction.isSort) {\n this.sortColumn();\n }\n };\n ResponsiveDialogRenderer.prototype.closeCustomDialog = function () {\n if (this.isCustomDlgRender) {\n var mainfilterdiv = this.customResponsiveDlg.element.querySelector('.e-mainfilterdiv');\n remove(mainfilterdiv);\n return;\n }\n this.isRowResponsive = false;\n this.isCustomDlgRender = false;\n this.destroyCustomFilterDialog();\n };\n ResponsiveDialogRenderer.prototype.destroyCustomFilterDialog = function () {\n if (!this.customResponsiveDlg) {\n return;\n }\n var elem = document.getElementById(this.customResponsiveDlg.element.id);\n if (this.customResponsiveDlg && !this.customResponsiveDlg.isDestroyed && elem) {\n this.customResponsiveDlg.destroy();\n remove(elem);\n }\n this.closeCustomFilter();\n if (this.action === ResponsiveDialogAction.isSort) {\n this.sortPredicate = [];\n this.sortedCols = [];\n this.isSortApplied = false;\n }\n };\n ResponsiveDialogRenderer.prototype.closeCustomFilter = function () {\n if (!this.isDialogClose && this.customFilterDlg) {\n var customEle = document.getElementById(this.customFilterDlg.element.id);\n if (this.customFilterDlg && !this.customFilterDlg.isDestroyed && customEle) {\n this.customFilterDlg.destroy();\n remove(customEle);\n }\n }\n this.isDialogClose = false;\n };\n ResponsiveDialogRenderer.prototype.removeCustomDlgFilterEle = function (target) {\n if (target) {\n if (target.parentElement.classList.contains('e-filtersetdiv')) {\n remove(target.parentElement);\n }\n else {\n remove(target);\n }\n }\n else {\n var child = this.customColumnDiv.children;\n for (var i = 0; i < child.length; i++) {\n target = child[i].querySelector('.e-filtersetdiv');\n if (target) {\n remove(target);\n i--;\n }\n }\n }\n };\n ResponsiveDialogRenderer.prototype.setCustomFilterHeader = function (args) {\n if (this.parent.rowRenderingMode !== 'Vertical') {\n return;\n }\n var header = this.customResponsiveDlg.element.querySelector('.e-reslabel');\n if (header && header.firstElementChild) {\n header.firstElementChild.innerHTML = args.title;\n }\n };\n ResponsiveDialogRenderer.prototype.keyHandler = function (e) {\n if (e.keyCode === 13 && ((this.action === ResponsiveDialogAction.isFilter\n && e.target.classList.contains('e-searchinput'))\n || (this.action === ResponsiveDialogAction.isEdit || this.action === ResponsiveDialogAction.isAdd))) {\n this.dialogHdrBtnClickHandler();\n }\n };\n ResponsiveDialogRenderer.prototype.editComplate = function (args) {\n if (args.requestType === 'save' || args.requestType === 'cancel') {\n this.parent.off(events.enterKeyHandler, this.keyHandler);\n }\n };\n ResponsiveDialogRenderer.prototype.removeEventListener = function () {\n if (this.customColumnDiv) {\n EventHandler.remove(this.customColumnDiv, 'click', this.customFilterColumnClickHandler);\n }\n this.parent.off(events.filterDialogClose, this.closeCustomDialog);\n this.parent.off(events.setCustomFilterHeader, this.setCustomFilterHeader);\n this.parent.off(events.refreshCustomFilterOkBtn, this.refreshCustomFilterOkBtn);\n this.parent.off(events.renderResponsiveCmenu, this.renderResponsiveContextMenu);\n this.parent.off(events.filterCmenuSelect, this.renderCustomFilterDiv);\n this.parent.off(events.customFilterClose, this.customExFilterClose);\n this.parent.off(events.refreshCustomFilterClearBtn, this.refreshCustomFilterClearBtn);\n this.parent.removeEventListener(events.actionComplete, this.onActionCompleteFn);\n };\n return ResponsiveDialogRenderer;\n}());\nexport { ResponsiveDialogRenderer };\n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { ResponsiveDialogRenderer } from '../renderer/responsive-dialog-renderer';\n/**\n * ServiceLocator\n * @hidden\n */\nvar ServiceLocator = /** @class */ (function () {\n function ServiceLocator() {\n this.services = {};\n }\n ServiceLocator.prototype.register = function (name, type) {\n if (isNullOrUndefined(this.services[name])) {\n this.services[name] = type;\n }\n };\n ServiceLocator.prototype.getService = function (name) {\n if (isNullOrUndefined(this.services[name])) {\n throw \"The service \" + name + \" is not registered\";\n }\n return this.services[name];\n };\n ServiceLocator.prototype.registerAdaptiveService = function (type, isAdaptiveUI, action) {\n if (isAdaptiveUI) {\n type.responsiveDialogRenderer = new ResponsiveDialogRenderer(type.parent, type.serviceLocator);\n type.responsiveDialogRenderer.action = action;\n }\n else {\n if (type.responsiveDialogRenderer) {\n type.responsiveDialogRenderer.removeEventListener();\n type.responsiveDialogRenderer = undefined;\n }\n }\n };\n return ServiceLocator;\n}());\nexport { ServiceLocator };\n","import { isNullOrUndefined, getEnumValue } from '@syncfusion/ej2-base';\nimport { RenderType } from '../base/enum';\n/**\n * RendererFactory\n * @hidden\n */\nvar RendererFactory = /** @class */ (function () {\n function RendererFactory() {\n this.rendererMap = {};\n }\n RendererFactory.prototype.addRenderer = function (name, type) {\n var rName = getEnumValue(RenderType, name);\n if (isNullOrUndefined(this.rendererMap[rName])) {\n this.rendererMap[rName] = type;\n }\n };\n RendererFactory.prototype.getRenderer = function (name) {\n var rName = getEnumValue(RenderType, name);\n if (isNullOrUndefined(this.rendererMap[rName])) {\n throw \"The renderer \" + rName + \" is not found\";\n }\n else {\n return this.rendererMap[rName];\n }\n };\n return RendererFactory;\n}());\nexport { RendererFactory };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Property, ChildProperty } from '@syncfusion/ej2-base';\n/**\n * Configures the paging behavior of the Grid.\n */\nvar PageSettings = /** @class */ (function (_super) {\n __extends(PageSettings, _super);\n function PageSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(12)\n ], PageSettings.prototype, \"pageSize\", void 0);\n __decorate([\n Property(8)\n ], PageSettings.prototype, \"pageCount\", void 0);\n __decorate([\n Property(1)\n ], PageSettings.prototype, \"currentPage\", void 0);\n __decorate([\n Property()\n ], PageSettings.prototype, \"totalRecordsCount\", void 0);\n __decorate([\n Property(false)\n ], PageSettings.prototype, \"enableQueryString\", void 0);\n __decorate([\n Property(false)\n ], PageSettings.prototype, \"pageSizes\", void 0);\n __decorate([\n Property(null)\n ], PageSettings.prototype, \"template\", void 0);\n return PageSettings;\n}(ChildProperty));\nexport { PageSettings };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Property, ChildProperty } from '@syncfusion/ej2-base';\n/**\n * Configures the column chooser behavior of the Grid.\n */\nvar ColumnChooserSettings = /** @class */ (function (_super) {\n __extends(ColumnChooserSettings, _super);\n function ColumnChooserSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('startsWith')\n ], ColumnChooserSettings.prototype, \"operator\", void 0);\n return ColumnChooserSettings;\n}(ChildProperty));\nexport { ColumnChooserSettings };\n","import { isNullOrUndefined, isBlazor } from '@syncfusion/ej2-base';\nimport { iterateArrayOrObject, isGroupAdaptive } from '../base/util';\nimport * as events from '../base/constant';\n/**\n * The `ShowHide` module is used to control column visibility.\n */\nvar ShowHide = /** @class */ (function () {\n /**\n * Constructor for the show hide module.\n * @hidden\n */\n function ShowHide(parent) {\n this.parent = parent;\n }\n /**\n * Shows a column by column name.\n * @param {string|string[]} columnName - Defines a single or collection of column names to show.\n * @param {string} showBy - Defines the column key either as field name or header text.\n * @return {void}\n */\n ShowHide.prototype.show = function (columnName, showBy) {\n var keys = this.getToggleFields(columnName);\n var columns = this.getColumns(keys, showBy);\n this.parent.notify(events.tooltipDestroy, { module: 'edit' });\n for (var i = 0; i < columns.length; i++) {\n columns[i].visible = true;\n }\n this.setVisible(columns);\n };\n /**\n * Hides a column by column name.\n * @param {string|string[]} columnName - Defines a single or collection of column names to hide.\n * @param {string} hideBy - Defines the column key either as field name or header text.\n * @return {void}\n */\n ShowHide.prototype.hide = function (columnName, hideBy) {\n var keys = this.getToggleFields(columnName);\n var columns = this.getColumns(keys, hideBy);\n this.parent.notify(events.tooltipDestroy, { module: 'edit' });\n for (var i = 0; i < columns.length; i++) {\n columns[i].visible = false;\n }\n this.setVisible(columns);\n };\n ShowHide.prototype.getToggleFields = function (key) {\n var finalized = [];\n if (typeof key === 'string') {\n finalized = [key];\n }\n else {\n finalized = key;\n }\n return finalized;\n };\n ShowHide.prototype.getColumns = function (keys, getKeyBy) {\n var _this = this;\n var columns = iterateArrayOrObject(keys, function (key, index) {\n return iterateArrayOrObject(_this.parent.columnModel, function (item, index) {\n if (item[getKeyBy] === key) {\n return item;\n }\n return undefined;\n })[0];\n });\n return columns;\n };\n /**\n * Shows or hides columns by given column collection.\n * @private\n * @param {Column[]} columns - Specifies the columns.\n * @return {void}\n */\n ShowHide.prototype.setVisible = function (columns, changedStateColumns) {\n var _this = this;\n if (changedStateColumns === void 0) { changedStateColumns = []; }\n changedStateColumns = (changedStateColumns.length > 0) ? changedStateColumns :\n isBlazor() ? (JSON.parse(JSON.stringify(columns))) : columns;\n var args = {\n requestType: 'columnstate',\n cancel: false,\n columns: changedStateColumns\n };\n var cancel = 'cancel';\n this.parent.trigger(events.actionBegin, args, function (showHideArgs) {\n var currentViewCols = _this.parent.getColumns();\n columns = isNullOrUndefined(columns) ? currentViewCols : columns;\n if (showHideArgs[cancel]) {\n _this.parent.notify(events.resetColumns, { showHideArgs: showHideArgs });\n if (columns.length > 0) {\n columns[0].visible = true;\n }\n return;\n }\n if (isGroupAdaptive(_this.parent)) {\n _this.parent.contentModule.emptyVcRows();\n }\n if (_this.parent.allowSelection && _this.parent.getSelectedRecords().length &&\n !_this.parent.selectionSettings.persistSelection) {\n _this.parent.clearSelection();\n }\n if (_this.parent.enableColumnVirtualization) {\n var colsInCurrentView = columns.filter(function (col1) { return (currentViewCols.some(function (col2) { return col1.field === col2.field; })); });\n if (colsInCurrentView.length) {\n _this.parent.notify(events.columnVisibilityChanged, columns);\n }\n }\n else {\n _this.parent.notify(events.columnVisibilityChanged, columns);\n }\n var params = {\n requestType: 'columnstate',\n columns: changedStateColumns\n };\n _this.parent.trigger(events.actionComplete, params);\n if (_this.parent.columnQueryMode !== 'All') {\n _this.parent.refresh();\n }\n });\n };\n return ShowHide;\n}());\nexport { ShowHide };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { compile } from '@syncfusion/ej2-base';\nimport { getEnumValue } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport { Property, Collection, ChildProperty } from '@syncfusion/ej2-base';\n/**\n * Configures the Grid's aggregate column.\n */\nvar AggregateColumn = /** @class */ (function (_super) {\n __extends(AggregateColumn, _super);\n function AggregateColumn() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.templateFn = {};\n return _this;\n }\n /**\n * @hidden\n */\n AggregateColumn.prototype.setFormatter = function (value) {\n this.formatFn = value;\n };\n /**\n * @hidden\n */\n AggregateColumn.prototype.getFormatter = function () {\n return this.formatFn;\n };\n /**\n * @hidden\n */\n AggregateColumn.prototype.setTemplate = function (helper) {\n if (helper === void 0) { helper = {}; }\n if (this.footerTemplate !== undefined) {\n this.templateFn[getEnumValue(CellType, CellType.Summary)] = { fn: compile(this.footerTemplate, helper),\n property: 'footerTemplate' };\n }\n if (this.groupFooterTemplate !== undefined) {\n this.templateFn[getEnumValue(CellType, CellType.GroupSummary)] = { fn: compile(this.groupFooterTemplate, helper),\n property: 'groupFooterTemplate' };\n }\n if (this.groupCaptionTemplate !== undefined) {\n this.templateFn[getEnumValue(CellType, CellType.CaptionSummary)] = { fn: compile(this.groupCaptionTemplate, helper),\n property: 'groupCaptionTemplate' };\n }\n };\n /**\n * @hidden\n */\n AggregateColumn.prototype.getTemplate = function (type) {\n return this.templateFn[getEnumValue(CellType, type)];\n };\n /**\n * @hidden\n */\n AggregateColumn.prototype.setPropertiesSilent = function (prop) {\n this.setProperties(prop, true);\n };\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"type\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"field\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"columnName\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"format\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"footerTemplate\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"groupFooterTemplate\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"groupCaptionTemplate\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"customAggregate\", void 0);\n return AggregateColumn;\n}(ChildProperty));\nexport { AggregateColumn };\n/**\n * Configures the aggregate rows.\n */\nvar AggregateRow = /** @class */ (function (_super) {\n __extends(AggregateRow, _super);\n function AggregateRow() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Collection([], AggregateColumn)\n ], AggregateRow.prototype, \"columns\", void 0);\n return AggregateRow;\n}(ChildProperty));\nexport { AggregateRow };\n","import { Browser, remove, EventHandler, isUndefined, closest, classList, isBlazor } from '@syncfusion/ej2-base';\nimport { parentsUntil } from '../base/util';\nimport * as events from '../base/constant';\n/**\n * The `Clipboard` module is used to handle clipboard copy action.\n */\nvar Clipboard = /** @class */ (function () {\n /**\n * Constructor for the Grid clipboard module\n * @hidden\n */\n function Clipboard(parent) {\n this.copyContent = '';\n this.isSelect = false;\n this.parent = parent;\n this.addEventListener();\n }\n /**\n * @hidden\n */\n Clipboard.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.contentReady, this.initialEnd, this);\n this.parent.on(events.keyPressed, this.keyDownHandler, this);\n this.parent.on(events.click, this.clickHandler, this);\n EventHandler.add(this.parent.element, 'keydown', this.pasteHandler, this);\n };\n /**\n * @hidden\n */\n Clipboard.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.keyPressed, this.keyDownHandler);\n this.parent.off(events.contentReady, this.initialEnd);\n this.parent.off(events.click, this.clickHandler);\n EventHandler.remove(this.parent.element, 'keydown', this.pasteHandler);\n };\n Clipboard.prototype.clickHandler = function (e) {\n var target = e.target;\n target = parentsUntil(target, 'e-rowcell');\n };\n Clipboard.prototype.pasteHandler = function (e) {\n var _this = this;\n var grid = this.parent;\n var isMacLike = /(Mac)/i.test(navigator.platform);\n if (e.keyCode === 86 && (e.ctrlKey || (isMacLike && e.metaKey)) && !grid.isEdit) {\n var target = closest(document.activeElement, '.e-rowcell');\n if (!target || !grid.editSettings.allowEditing || grid.editSettings.mode !== 'Batch' ||\n grid.selectionSettings.mode !== 'Cell' || grid.selectionSettings.cellSelectionMode === 'Flow') {\n return;\n }\n this.activeElement = document.activeElement;\n this.clipBoardTextArea.value = '';\n var x_1 = window.scrollX;\n var y_1 = window.scrollY;\n this.clipBoardTextArea.focus();\n setTimeout(function () {\n _this.activeElement.focus();\n window.scrollTo(x_1, y_1);\n _this.paste(_this.clipBoardTextArea.value, _this.parent.getSelectedRowCellIndexes()[0].rowIndex, _this.parent.getSelectedRowCellIndexes()[0].cellIndexes[0]);\n }, 10);\n }\n };\n /**\n * Paste data from clipboard to selected cells.\n * @param {boolean} data - Specifies the date for paste.\n * @param {boolean} rowIndex - Specifies the row index.\n * @param {boolean} colIndex - Specifies the column index.\n */\n Clipboard.prototype.paste = function (data, rowIndex, colIndex) {\n var grid = this.parent;\n var cIdx = colIndex;\n var rIdx = rowIndex;\n var col;\n var value;\n var isAvail;\n if (!grid.editSettings.allowEditing || grid.editSettings.mode !== 'Batch' ||\n grid.selectionSettings.mode !== 'Cell' || grid.selectionSettings.cellSelectionMode === 'Flow') {\n return;\n }\n var rows = data.split('\\n');\n var cols;\n var dataRows = grid.getDataRows();\n var mRows;\n var frRows;\n var isFrozen = this.parent.isFrozenGrid();\n if (isFrozen) {\n mRows = grid.getMovableDataRows();\n if (grid.getFrozenRightColumnsCount()) {\n frRows = grid.getFrozenRightDataRows();\n }\n }\n for (var r = 0; r < rows.length; r++) {\n cols = rows[r].split('\\t');\n cIdx = colIndex;\n if ((r === rows.length - 1 && rows[r] === '') || isUndefined(grid.getRowByIndex(rIdx))) {\n cIdx++;\n break;\n }\n for (var c = 0; c < cols.length; c++) {\n isAvail = grid.getCellFromIndex(rIdx, cIdx);\n if (isFrozen) {\n var fTr = dataRows[rIdx];\n var mTr = mRows[rIdx];\n isAvail = !fTr.querySelector('[aria-colindex=\"' + cIdx + '\"]') ?\n mTr.querySelector('[aria-colindex=\"' + cIdx + '\"]') : true;\n if (frRows && !isAvail) {\n var frTr = frRows[rIdx];\n isAvail = frTr.querySelector('[aria-colindex=\"' + cIdx + '\"]');\n }\n }\n if (!isAvail) {\n cIdx++;\n break;\n }\n col = grid.getColumnByIndex(cIdx);\n value = col.getParser() ? col.getParser()(cols[c]) : cols[c];\n if (col.allowEditing && !col.isPrimaryKey && !col.template) {\n var args = {\n column: col,\n data: value,\n rowIndex: rIdx\n };\n this.parent.trigger(events.beforePaste, args);\n rIdx = args.rowIndex;\n if (!args.cancel) {\n if (grid.editModule) {\n if (col.type === 'number') {\n this.parent.editModule.updateCell(rIdx, col.field, parseFloat(args.data));\n }\n else {\n grid.editModule.updateCell(rIdx, col.field, args.data);\n }\n }\n }\n }\n cIdx++;\n }\n rIdx++;\n }\n grid.selectionModule.selectCellsByRange({ rowIndex: rowIndex, cellIndex: colIndex }, { rowIndex: rIdx - 1, cellIndex: cIdx - 1 });\n var cell = this.parent.getCellFromIndex(rIdx - 1, cIdx - 1);\n if (cell) {\n classList(cell, ['e-focus', 'e-focused'], []);\n }\n };\n Clipboard.prototype.initialEnd = function () {\n this.parent.off(events.contentReady, this.initialEnd);\n this.clipBoardTextArea = this.parent.createElement('textarea', {\n className: 'e-clipboard',\n styles: 'opacity: 0',\n attrs: { tabindex: '-1', 'aria-label': 'clipboard' }\n });\n this.parent.element.appendChild(this.clipBoardTextArea);\n };\n Clipboard.prototype.keyDownHandler = function (e) {\n if (e.action === 'ctrlPlusC') {\n this.copy();\n }\n else if (e.action === 'ctrlShiftPlusH') {\n this.copy(true);\n }\n };\n Clipboard.prototype.setCopyData = function (withHeader) {\n if (window.getSelection().toString() === '') {\n var isFrozen = this.parent.isFrozenGrid();\n this.clipBoardTextArea.value = this.copyContent = '';\n var mRows = void 0;\n var frRows = void 0;\n var rows = this.parent.getRows();\n if (isFrozen) {\n mRows = this.parent.getMovableDataRows();\n if (this.parent.getFrozenMode() === 'Left-Right') {\n frRows = this.parent.getFrozenRightRows();\n }\n }\n if (this.parent.selectionSettings.mode !== 'Cell') {\n var selectedIndexes = this.parent.getSelectedRowIndexes().sort(function (a, b) { return a - b; });\n if (withHeader) {\n var headerTextArray = [];\n for (var i = 0; i < this.parent.getVisibleColumns().length; i++) {\n headerTextArray[i] = this.parent.getVisibleColumns()[i].headerText;\n }\n this.getCopyData(headerTextArray, false, '\\t', withHeader);\n this.copyContent += '\\n';\n }\n for (var i = 0; i < selectedIndexes.length; i++) {\n if (i > 0) {\n this.copyContent += '\\n';\n }\n var cells = [].slice.call(rows[selectedIndexes[i]].\n querySelectorAll('.e-rowcell:not(.e-hide)'));\n if (isFrozen) {\n cells.push.apply(cells, [].slice.call(mRows[selectedIndexes[i]].querySelectorAll('.e-rowcell:not(.e-hide)')));\n if (frRows) {\n cells.push.apply(cells, [].slice.call(frRows[selectedIndexes[i]].querySelectorAll('.e-rowcell:not(.e-hide)')));\n }\n }\n this.getCopyData(cells, false, '\\t', withHeader);\n }\n }\n else {\n var obj = this.checkBoxSelection();\n if (obj.status) {\n if (withHeader) {\n var headers = [];\n for (var i = 0; i < obj.colIndexes.length; i++) {\n headers.push(this.parent.getColumnHeaderByIndex(obj.colIndexes[i]));\n }\n this.getCopyData(headers, false, '\\t', withHeader);\n this.copyContent += '\\n';\n }\n for (var i = 0; i < obj.rowIndexes.length; i++) {\n if (i > 0) {\n this.copyContent += '\\n';\n }\n var cells = [].slice.call(rows[obj.rowIndexes[i]].\n querySelectorAll('.e-cellselectionbackground'));\n if (isFrozen) {\n cells.push.apply(cells, [].slice.call(mRows[obj.rowIndexes[i]]\n .querySelectorAll('.e-cellselectionbackground')));\n if (frRows) {\n cells.push.apply(cells, [].slice.call(frRows[obj.rowIndexes[i]]\n .querySelectorAll('.e-cellselectionbackground')));\n }\n }\n this.getCopyData(cells, false, '\\t', withHeader);\n }\n }\n else {\n this.getCopyData([].slice.call(this.parent.element.querySelectorAll('.e-cellselectionbackground')), true, '\\n', withHeader);\n }\n }\n var args = {\n data: this.copyContent,\n cancel: false,\n };\n this.parent.trigger(events.beforeCopy, args);\n if (args.cancel) {\n return;\n }\n this.clipBoardTextArea.value = this.copyContent = args.data;\n if (!Browser.userAgent.match(/ipad|ipod|iphone/i)) {\n this.clipBoardTextArea.select();\n }\n else {\n this.clipBoardTextArea.setSelectionRange(0, this.clipBoardTextArea.value.length);\n }\n this.isSelect = true;\n }\n };\n Clipboard.prototype.getCopyData = function (cells, isCell, splitKey, withHeader) {\n var isElement = typeof cells[0] !== 'string';\n for (var j = 0; j < cells.length; j++) {\n if (withHeader && isCell) {\n this.copyContent += this.parent.getColumns()[parseInt(cells[j].getAttribute('aria-colindex'), 10)].headerText + '\\n';\n }\n if (isElement) {\n if (!cells[j].classList.contains('e-hide')) {\n if (isBlazor()) {\n if ((!cells[j].classList.contains('e-gridchkbox')) &&\n Object.keys(cells[j].querySelectorAll('.e-check')).length) {\n this.copyContent += true;\n }\n else if ((!cells[j].classList.contains('e-gridchkbox')) &&\n Object.keys(cells[j].querySelectorAll('.e-uncheck')).length) {\n this.copyContent += false;\n }\n else {\n this.copyContent += cells[j].innerText;\n }\n }\n else {\n this.copyContent += cells[j].innerText;\n }\n }\n }\n else {\n this.copyContent += cells[j];\n }\n if (j < cells.length - 1) {\n this.copyContent += splitKey;\n }\n }\n };\n /**\n * Copy selected rows or cells data into clipboard.\n * @param {boolean} withHeader - Specifies whether the column header data need to be copied or not.\n */\n Clipboard.prototype.copy = function (withHeader) {\n if (document.queryCommandSupported('copy')) {\n this.setCopyData(withHeader);\n document.execCommand('copy');\n this.clipBoardTextArea.blur();\n }\n if (this.isSelect) {\n window.getSelection().removeAllRanges();\n this.isSelect = false;\n }\n };\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Clipboard.prototype.getModuleName = function () {\n return 'clipboard';\n };\n /**\n * To destroy the clipboard\n * @return {void}\n * @hidden\n */\n Clipboard.prototype.destroy = function () {\n this.removeEventListener();\n if (this.clipBoardTextArea) {\n remove(this.clipBoardTextArea);\n }\n };\n Clipboard.prototype.checkBoxSelection = function () {\n var gridObj = this.parent;\n var obj = { status: false };\n if (gridObj.selectionSettings.mode === 'Cell') {\n var rowCellIndxes = gridObj.getSelectedRowCellIndexes();\n var str = void 0;\n var isBox = void 0;\n var rowIndexes = [];\n var i = void 0;\n for (i = 0; i < rowCellIndxes.length; i++) {\n if (rowCellIndxes[i].cellIndexes.length) {\n rowIndexes.push(rowCellIndxes[i].rowIndex);\n }\n if (rowCellIndxes[i].cellIndexes.length) {\n if (!str) {\n str = JSON.stringify(rowCellIndxes[i].cellIndexes.sort());\n }\n if (str !== JSON.stringify(rowCellIndxes[i].cellIndexes.sort())) {\n break;\n }\n }\n }\n rowIndexes.sort(function (a, b) { return a - b; });\n if (i === rowCellIndxes.length && rowIndexes[rowIndexes.length - 1] - rowIndexes[0] === rowIndexes.length - 1) {\n obj = { status: true, rowIndexes: rowIndexes, colIndexes: rowCellIndxes[0].cellIndexes };\n }\n }\n return obj;\n };\n return Clipboard;\n}());\nexport { Clipboard };\n","import { Observer, isBlazor, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport * as events from '../base/constant';\nimport { Row } from '../models/row';\nimport { AriaService } from '../services/aria-service';\nimport { Cell } from '../models/cell';\nimport { CellType } from '../base/enum';\nimport { DataUtil } from '@syncfusion/ej2-data';\nexport var gridObserver = new Observer();\n/**\n * BlazorAction is used for performing Blazor related Grid Actions.\n * @hidden\n */\nvar BlazorAction = /** @class */ (function () {\n function BlazorAction(parent) {\n this.aria = new AriaService();\n this.actionArgs = {};\n this.virtualHeight = 0;\n this.parent = parent;\n this.addEventListener();\n }\n BlazorAction.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on('detailclick', this.onDetailRowClick, this);\n this.parent.on('add-delete-success', this.addDeleteSuccess, this);\n this.parent.on('editsuccess', this.editSuccess, this);\n this.parent.on('setvisibility', this.setColumnVisibility, this);\n this.parent.on('offset', this.setServerOffSet, this);\n this.parent.on('updateaction', this.modelChanged, this);\n this.parent.on(events.modelChanged, this.modelChanged, this);\n this.parent.on('group-expand-collapse', this.onGroupClick, this);\n this.parent.on('setcolumnstyles', this.setColVTableWidthAndTranslate, this);\n this.parent.on('refresh-virtual-indices', this.invokeServerDataBind, this);\n this.parent.on('contentcolgroup', this.contentColGroup, this);\n this.parent.on(events.dataSourceModified, this.dataSourceModified, this);\n };\n BlazorAction.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off('detailclick', this.onDetailRowClick);\n this.parent.off('add-delete-success', this.addDeleteSuccess);\n this.parent.off('editsuccess', this.editSuccess);\n this.parent.off('setvisibility', this.setColumnVisibility);\n this.parent.off('offset', this.setServerOffSet);\n this.parent.off('updateaction', this.modelChanged);\n this.parent.off(events.modelChanged, this.modelChanged);\n this.parent.off('group-expand-collapse', this.onGroupClick);\n this.parent.off('setcolumnstyles', this.setColVTableWidthAndTranslate);\n this.parent.off('refresh-virtual-indices', this.invokeServerDataBind);\n this.parent.off('contentcolgroup', this.contentColGroup);\n this.parent.off(events.dataSourceModified, this.dataSourceModified);\n };\n BlazorAction.prototype.getModuleName = function () { return 'blazor'; };\n ;\n BlazorAction.prototype.modelChanged = function (args) {\n this.actionArgs = args;\n this.parent.currentAction = args;\n };\n BlazorAction.prototype.addDeleteSuccess = function (args) {\n var _this = this;\n var editArgs;\n var action = 'action';\n var data = 'data';\n var index = 'index';\n editArgs = {\n requestType: args.requestType,\n data: args[data],\n action: args[action]\n };\n if (!isNullOrUndefined(args[index])) {\n editArgs[index] = args[index];\n }\n args.promise.then(function (e) { return _this.editSuccess(editArgs); }).catch(function (e) {\n if (isBlazor() && _this.parent.isServerRendered) {\n var error = 'error';\n var message = 'message';\n if (!isNullOrUndefined(e[error]) && !isNullOrUndefined(e[error][message])) {\n e[error] = e[error][message];\n }\n }\n _this.parent.trigger(events.actionFailure, ((isBlazor() && e instanceof Array) ? e[0] : e));\n _this.parent.hideSpinner();\n _this.parent.log('actionfailure', { error: e });\n });\n };\n BlazorAction.prototype.editSuccess = function (args) {\n this.parent.renderModule.resetTemplates();\n this.invokeServerDataBind(args);\n };\n BlazorAction.prototype.invokeServerDataBind = function (args) {\n this.actionArgs = args;\n this.parent.currentAction = args;\n this.parent.allowServerDataBinding = true;\n this.parent.serverDataBind();\n this.parent.allowServerDataBinding = false;\n };\n BlazorAction.prototype.onDetailRowClick = function (target) {\n var gObj = this.parent;\n var adaptor = 'interopAdaptor';\n var rIndex = 'rowIndex';\n var invokeMethodAsync = 'invokeMethodAsync';\n var tr = target.parentElement;\n var uid = tr.getAttribute('data-uid');\n var rowObj = gObj.getRowObjectFromUID(uid);\n var args = {\n uid: uid, classList: target.classList[0], index: tr.getAttribute('aria-rowindex'),\n rowIndex: gObj.getRowsObject().indexOf(rowObj), colSpan: this.parent.getVisibleColumns().length\n };\n gObj[adaptor][invokeMethodAsync]('OnDetailClick', args);\n if (target.classList.contains('e-detailrowcollapse')) {\n var rows = gObj.getRowsObject();\n var rowData = rowObj.data;\n var gridRowId = this.parent.getRowUid('grid-row');\n var len = gObj.groupSettings.columns.length;\n var gridRow = new Row({\n isDataRow: true,\n isExpand: true,\n uid: gridRowId,\n isDetailRow: true,\n cells: [new Cell({ cellType: CellType.Indent }), new Cell({ isDataCell: true, visible: true })]\n });\n for (var i = 0; i < len; i++) {\n gridRow.cells.unshift(new Cell({ cellType: CellType.Indent }));\n }\n rows.splice(args[rIndex] + 1, 0, gridRow);\n gObj.trigger(events.detailDataBound, { data: rowData });\n gObj.notify(events.detailDataBound, { rows: gObj.getRowsObject() });\n rowObj.isExpand = true;\n this.aria.setExpand(target, true);\n }\n else {\n gObj.getRowsObject().splice(args[rIndex] + 1, 1);\n gObj.notify(events.detailDataBound, { rows: gObj.getRowsObject() });\n rowObj.isExpand = false;\n this.aria.setExpand(target, false);\n }\n };\n BlazorAction.prototype.setColumnVisibility = function (columns) {\n var visible = {};\n var adaptor = 'interopAdaptor';\n var invokeMethodAsync = 'invokeMethodAsync';\n for (var i = 0; i < columns.length; i++) {\n visible[columns[i].uid] = columns[i].visible;\n }\n this.parent[adaptor][invokeMethodAsync]('setColumnVisibility', { visible: visible });\n };\n BlazorAction.prototype.dataSuccess = function (args) {\n if (this.parent.enableVirtualization && Object.keys(this.actionArgs).length === 0) {\n this.actionArgs.requestType = 'virtualscroll';\n }\n var startIndex = 'startIndex';\n var endIndex = 'endIndex';\n this.actionArgs[startIndex] = args[startIndex];\n this.actionArgs[endIndex] = args[endIndex];\n if (this.parent.enableVirtualization) {\n this.virtualContentModule = this.parent.contentModule;\n if (this.virtualContentModule.activeKey === 'downArrow' || this.virtualContentModule.activeKey === 'upArrow') {\n var row = this.parent.getRowByIndex(this.virtualContentModule.blzRowIndex);\n if (row) {\n this.parent.selectRow(parseInt(row.getAttribute('aria-rowindex'), 10));\n // tslint:disable-next-line:no-any\n row.cells[0].focus({ preventScroll: true });\n }\n }\n this.virtualContentModule.blazorDataLoad = false;\n }\n if (args.foreignColumnsData) {\n var columns = this.parent.getColumns();\n for (var i = 0; i < columns.length; i++) {\n if (args.foreignColumnsData[columns[i].field]) {\n columns[i].columnData = args.foreignColumnsData[columns[i].field];\n }\n }\n }\n if (this.parent.allowGrouping && this.parent.groupSettings.columns) {\n var agg = [];\n var aggRows = this.parent.aggregates;\n for (var i = 0; i < aggRows.length; i++) {\n var aggRow = aggRows[i];\n for (var j = 0; j < aggRow.columns.length; j++) {\n var aggr = {};\n var type = aggRow.columns[j].type.toString();\n aggr = { type: type.toLowerCase(), field: aggRow.columns[j].field };\n agg.push(aggr);\n }\n }\n var data = void 0;\n var aggrds = void 0;\n var groupedCols = this.parent.groupSettings.columns;\n for (var k = 0; k < groupedCols.length; k++) {\n aggrds = data ? data : args.result;\n data = DataUtil.group(aggrds, groupedCols[k], agg, null, null);\n }\n args.result = data ? data : args.result;\n }\n var rowUid = 'rowUid';\n var offsetTime = 'offsetTime';\n var off = 'offset';\n this.parent[rowUid] = args[rowUid];\n args[off] = Math.sign(args[off]) === 1 ? -Math.abs(args[off]) : Math.abs(args[off]);\n this.parent[offsetTime] = args[off];\n if (this.parent[offsetTime] !== new Date().getTimezoneOffset() / 60) {\n if (this.parent.editSettings.mode !== 'Batch') {\n var action = 'action';\n var rowIndex = 'rowIndex';\n var index = 'index';\n if (this.actionArgs[action] === 'edit') {\n this.setClientOffSet(args, this.actionArgs[rowIndex]);\n }\n else if (this.actionArgs[action] === 'add') {\n this.setClientOffSet(args, this.actionArgs[index]);\n }\n }\n else if (this.parent.editSettings.mode === 'Batch') {\n var changes = 'changes';\n var changedRecords = 'changedRecords';\n var addedRecords = 'addedRecords';\n var keyField = this.parent.getPrimaryKeyFieldNames()[0];\n var batchChanges = this.actionArgs[changes] || { changedRecords: [], addedRecords: [] };\n for (var i = 0; i < batchChanges[changedRecords].length; i++) {\n for (var j = 0; j < args.result.length; j++) {\n if (batchChanges[changedRecords][i][keyField] === args.result[j][keyField]) {\n this.setClientOffSet(args, j);\n }\n }\n }\n for (var i = 0; i < batchChanges[addedRecords].length; i++) {\n for (var j = 0; j < args.result.length; j++) {\n if (batchChanges[addedRecords][i][keyField] === args.result[j][keyField]) {\n this.setClientOffSet(args, j);\n }\n }\n }\n }\n }\n this.parent.renderModule.dataManagerSuccess(args, this.actionArgs);\n this.parent.getMediaColumns();\n if (this.parent.enableVirtualization) {\n this.virtualContentModule = this.parent.contentModule;\n this.setColVTableWidthAndTranslate();\n if (this.parent.groupSettings.columns.length) {\n this.virtualContentModule.setVirtualHeight(this.virtualHeight);\n }\n }\n this.actionArgs = this.parent.currentAction = {};\n };\n BlazorAction.prototype.removeDisplayNone = function () {\n var renderedContentRows = this.parent.getContentTable().querySelectorAll('tr');\n for (var i = 0; i < renderedContentRows.length; i++) {\n var renderedContentCells = renderedContentRows[i].querySelectorAll('td');\n for (var j = 0; j < renderedContentCells.length; j++) {\n renderedContentCells[j].style.display = '';\n }\n }\n };\n BlazorAction.prototype.setVirtualTrackHeight = function (args) {\n this.virtualHeight = args.VisibleGroupedRowsCount * this.parent.getRowHeight();\n this.virtualContentModule.setVirtualHeight(this.virtualHeight);\n };\n BlazorAction.prototype.setColVTableWidthAndTranslate = function (args) {\n if (this.parent.enableColumnVirtualization && this.virtualContentModule.prevInfo &&\n (JSON.stringify(this.virtualContentModule.currentInfo.columnIndexes) !==\n JSON.stringify(this.virtualContentModule.prevInfo.columnIndexes)) || ((args && args.refresh))) {\n var translateX = this.virtualContentModule.getColumnOffset(this.virtualContentModule.startColIndex - 1);\n var width = this.virtualContentModule.getColumnOffset(this.virtualContentModule.endColIndex - 1) - translateX + '';\n this.virtualContentModule.header.virtualEle.setWrapperWidth(width);\n this.virtualContentModule.virtualEle.setWrapperWidth(width);\n this.virtualContentModule.header.virtualEle.adjustTable(translateX, 0);\n this.parent.getContentTable().parentElement.style.width = width + 'px';\n }\n if (this.dataSourceChanged) {\n this.virtualContentModule.getPanel().firstElementChild.scrollTop = 0;\n this.virtualContentModule.getPanel().firstElementChild.scrollLeft = 0;\n if (this.virtualContentModule.header.virtualEle) {\n this.virtualContentModule.header.virtualEle.adjustTable(0, 0);\n }\n this.parent.getContentTable().parentElement.style.transform = 'translate(0px,0px)';\n this.virtualContentModule.refreshOffsets();\n this.virtualContentModule.refreshVirtualElement();\n this.dataSourceChanged = false;\n }\n };\n BlazorAction.prototype.dataSourceModified = function () {\n this.dataSourceChanged = true;\n };\n BlazorAction.prototype.setClientOffSet = function (args, index) {\n var timeZone = DataUtil.serverTimezoneOffset;\n DataUtil.serverTimezoneOffset = 0;\n args.result[index] = DataUtil.parse.parseJson(JSON.stringify(args.result[index]));\n DataUtil.serverTimezoneOffset = timeZone;\n };\n BlazorAction.prototype.setServerOffSet = function (args) {\n var serverTimeZone = DataUtil.serverTimezoneOffset;\n var offsetTime = 'offsetTime';\n var data = 'data';\n var timeZone = new Date().getTimezoneOffset() / 60 * 2 + this.parent[offsetTime];\n DataUtil.serverTimezoneOffset = timeZone;\n args[data] = DataUtil.parse.parseJson(JSON.stringify(args[data]));\n DataUtil.serverTimezoneOffset = serverTimeZone;\n };\n BlazorAction.prototype.onGroupClick = function (args) {\n var _this = this;\n var adaptor = 'interopAdaptor';\n var content = 'contentModule';\n var invokeMethodAsync = 'invokeMethodAsync';\n var exactTopIndex = 'exactTopIndex';\n args[exactTopIndex] = Math.round((this.parent.element.querySelector('.e-content').scrollTop) / this.parent.getRowHeight());\n var rowHeight = 'rowHeight';\n args[rowHeight] = this.parent.getRowHeight();\n this.parent[adaptor][invokeMethodAsync]('OnGroupExpandClick', args).then(function () {\n _this.parent[content].rowElements = [].slice.call(_this.parent.getContentTable().querySelectorAll('tr.e-row[data-uid]'));\n });\n };\n BlazorAction.prototype.setPersistData = function (args) {\n var gObj = this.parent;\n gObj.mergePersistGridData(args);\n var bulkChanges = 'bulkChanges';\n if (gObj[bulkChanges].columns) {\n delete gObj[bulkChanges].columns;\n }\n gObj.headerModule.refreshUI();\n gObj.notify('persist-data-changed', {});\n gObj.notify(events.columnVisibilityChanged, gObj.getColumns());\n };\n ;\n BlazorAction.prototype.resetPersistData = function (args) {\n var gObj = this.parent;\n var bulkChanges = 'bulkChanges';\n var parseArgs = JSON.parse(args);\n var persistArgs = { filterSettings: parseArgs.filterSettings,\n groupSettings: parseArgs.groupSettings, pageSettings: parseArgs.pageSettings, sortSettings: parseArgs.sortSettings,\n searchSettings: parseArgs.searchSettings, columns: parseArgs.columns };\n if (!persistArgs.sortSettings.columns) {\n persistArgs.sortSettings.columns = [];\n }\n if (!persistArgs.groupSettings.columns) {\n persistArgs.groupSettings.columns = [];\n }\n if (!persistArgs.pageSettings.currentPage) {\n gObj.pageSettings.currentPage = 1;\n }\n for (var i = 0; i < gObj.columns.length; i++) {\n if (gObj.groupSettings.columns.indexOf(gObj.columns[i].field) > -1) {\n gObj.columns[i].visible = true;\n }\n }\n gObj.mergePersistGridData(persistArgs);\n gObj.notify('persist-data-changed', {});\n if (gObj[bulkChanges].columns) {\n delete gObj[bulkChanges].columns;\n }\n gObj.headerModule.refreshUI();\n for (var i = 0; i < gObj.columns.length; i++) {\n gObj.columns[i].editType = gObj.columns[i].editType.toLowerCase();\n }\n gObj.setProperties({ filterSettings: { columns: [] } }, true);\n };\n BlazorAction.prototype.contentColGroup = function () {\n var gObj = this.parent;\n var contentTable = gObj.getContent().querySelector('.e-table');\n contentTable.insertBefore(contentTable.querySelector(\"#content-\" + gObj.element.id + \"colGroup\"), contentTable.querySelector('tbody'));\n if (gObj.frozenRows) {\n var headerTable = gObj.getHeaderContent().querySelector('.e-table');\n headerTable.insertBefore(headerTable.querySelector(\"#\" + gObj.element.id + \"colGroup\"), headerTable.querySelector('tbody'));\n }\n if (gObj.getFrozenColumns() !== 0) {\n var movableContentTable = gObj.getContent().querySelector('.e-movablecontent').querySelector('.e-table');\n movableContentTable.insertBefore(movableContentTable.querySelector(\"#\" + gObj.element.id + \"colGroup\"), movableContentTable.querySelector('tbody'));\n if (gObj.frozenRows) {\n var movableHeaderTable = gObj.getHeaderContent().querySelector('.e-movableheader').querySelector('.e-table');\n movableHeaderTable.insertBefore(movableHeaderTable.querySelector(\"#\" + gObj.element.id + \"colGroup\"), movableHeaderTable.querySelector('tbody'));\n }\n }\n };\n BlazorAction.prototype.dataFailure = function (args) {\n this.parent.renderModule.dataManagerFailure(args, this.actionArgs);\n this.actionArgs = this.parent.currentAction = {};\n };\n BlazorAction.prototype.destroy = function () {\n this.removeEventListener();\n };\n return BlazorAction;\n}());\nexport { BlazorAction };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, ChildProperty, Browser, closest, extend } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, setValue, getValue, isBlazor, blazorTemplates } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, append, remove, updateBlazorTemplate, classList, setStyleAttribute } from '@syncfusion/ej2-base';\nimport { Property, Collection, Complex, Event, NotifyPropertyChanges, L10n } from '@syncfusion/ej2-base';\nimport { EventHandler, KeyboardEvents } from '@syncfusion/ej2-base';\nimport { DataManager, DataUtil, UrlAdaptor } from '@syncfusion/ej2-data';\nimport { createSpinner, hideSpinner, showSpinner, Tooltip } from '@syncfusion/ej2-popups';\nimport { iterateArrayOrObject, prepareColumns, parentsUntil, wrap, templateCompiler, isGroupAdaptive, refreshForeignData } from './util';\nimport { getRowHeight, setColumnIndex, Global, ispercentageWidth, renderMovable, getNumberFormat } from './util';\nimport { setRowElements, resetRowIndex, compareChanges, getCellByColAndRowIndex, performComplexDataOperation } from './util';\nimport * as events from '../base/constant';\nimport { Render } from '../renderer/render';\nimport { RenderType } from './enum';\nimport { RowRenderer } from '../renderer/row-renderer';\nimport { CellRenderer } from '../renderer/cell-renderer';\nimport { CellRendererFactory } from '../services/cell-render-factory';\nimport { ServiceLocator } from '../services/service-locator';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { RendererFactory } from '../services/renderer-factory';\nimport { ColumnWidthService } from '../services/width-controller';\nimport { AriaService } from '../services/aria-service';\nimport { FocusStrategy } from '../services/focus-strategy';\nimport { PageSettings } from '../models/page-settings';\nimport { ColumnChooserSettings } from '../models/column-chooser-settings';\nimport { Selection } from '../actions/selection';\nimport { Search } from '../actions/search';\nimport { ShowHide } from '../actions/show-hide';\nimport { Scroll } from '../actions/scroll';\nimport { Print } from '../actions/print';\nimport { AggregateRow } from '../models/aggregate';\nimport { Clipboard } from '../actions/clipboard';\nimport { gridObserver } from '../actions/blazor-action';\nimport { RowModelGenerator } from '../services/row-model-generator';\n/**\n * Represents the field name and direction of sort column.\n */\nvar SortDescriptor = /** @class */ (function (_super) {\n __extends(SortDescriptor, _super);\n function SortDescriptor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property()\n ], SortDescriptor.prototype, \"field\", void 0);\n __decorate([\n Property()\n ], SortDescriptor.prototype, \"direction\", void 0);\n __decorate([\n Property(false)\n ], SortDescriptor.prototype, \"isFromGroup\", void 0);\n return SortDescriptor;\n}(ChildProperty));\nexport { SortDescriptor };\n/**\n * Configures the sorting behavior of Grid.\n */\nvar SortSettings = /** @class */ (function (_super) {\n __extends(SortSettings, _super);\n function SortSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Collection([], SortDescriptor)\n ], SortSettings.prototype, \"columns\", void 0);\n __decorate([\n Property(true)\n ], SortSettings.prototype, \"allowUnsort\", void 0);\n return SortSettings;\n}(ChildProperty));\nexport { SortSettings };\n/**\n * Represents the predicate for the filter column.\n */\nvar Predicate = /** @class */ (function (_super) {\n __extends(Predicate, _super);\n function Predicate() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property()\n ], Predicate.prototype, \"field\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"operator\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"value\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"matchCase\", void 0);\n __decorate([\n Property(false)\n ], Predicate.prototype, \"ignoreAccent\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"predicate\", void 0);\n __decorate([\n Property({})\n ], Predicate.prototype, \"actualFilterValue\", void 0);\n __decorate([\n Property({})\n ], Predicate.prototype, \"actualOperator\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"type\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"ejpredicate\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"uid\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"isForeignKey\", void 0);\n return Predicate;\n}(ChildProperty));\nexport { Predicate };\n/**\n * Configures the infinite scroll behavior of Grid.\n */\nvar InfiniteScrollSettings = /** @class */ (function (_super) {\n __extends(InfiniteScrollSettings, _super);\n function InfiniteScrollSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(false)\n ], InfiniteScrollSettings.prototype, \"enableCache\", void 0);\n __decorate([\n Property(3)\n ], InfiniteScrollSettings.prototype, \"maxBlocks\", void 0);\n __decorate([\n Property(3)\n ], InfiniteScrollSettings.prototype, \"initialBlocks\", void 0);\n return InfiniteScrollSettings;\n}(ChildProperty));\nexport { InfiniteScrollSettings };\n/**\n * Configures the filtering behavior of the Grid.\n */\nvar FilterSettings = /** @class */ (function (_super) {\n __extends(FilterSettings, _super);\n function FilterSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Collection([], Predicate)\n ], FilterSettings.prototype, \"columns\", void 0);\n __decorate([\n Property('FilterBar')\n ], FilterSettings.prototype, \"type\", void 0);\n __decorate([\n Property()\n ], FilterSettings.prototype, \"mode\", void 0);\n __decorate([\n Property(true)\n ], FilterSettings.prototype, \"showFilterBarStatus\", void 0);\n __decorate([\n Property(1500)\n ], FilterSettings.prototype, \"immediateModeDelay\", void 0);\n __decorate([\n Property()\n ], FilterSettings.prototype, \"operators\", void 0);\n __decorate([\n Property(false)\n ], FilterSettings.prototype, \"ignoreAccent\", void 0);\n __decorate([\n Property(false)\n ], FilterSettings.prototype, \"enableCaseSensitivity\", void 0);\n __decorate([\n Property(false)\n ], FilterSettings.prototype, \"showFilterBarOperator\", void 0);\n return FilterSettings;\n}(ChildProperty));\nexport { FilterSettings };\n/**\n * Configures the selection behavior of the Grid.\n */\nvar SelectionSettings = /** @class */ (function (_super) {\n __extends(SelectionSettings, _super);\n function SelectionSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Row')\n ], SelectionSettings.prototype, \"mode\", void 0);\n __decorate([\n Property('Flow')\n ], SelectionSettings.prototype, \"cellSelectionMode\", void 0);\n __decorate([\n Property('Single')\n ], SelectionSettings.prototype, \"type\", void 0);\n __decorate([\n Property(false)\n ], SelectionSettings.prototype, \"checkboxOnly\", void 0);\n __decorate([\n Property(false)\n ], SelectionSettings.prototype, \"persistSelection\", void 0);\n __decorate([\n Property('Default')\n ], SelectionSettings.prototype, \"checkboxMode\", void 0);\n __decorate([\n Property(false)\n ], SelectionSettings.prototype, \"enableSimpleMultiRowSelection\", void 0);\n __decorate([\n Property(true)\n ], SelectionSettings.prototype, \"enableToggle\", void 0);\n __decorate([\n Property(false)\n ], SelectionSettings.prototype, \"allowColumnSelection\", void 0);\n return SelectionSettings;\n}(ChildProperty));\nexport { SelectionSettings };\n/**\n * Configures the search behavior of the Grid.\n */\nvar SearchSettings = /** @class */ (function (_super) {\n __extends(SearchSettings, _super);\n function SearchSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property([])\n ], SearchSettings.prototype, \"fields\", void 0);\n __decorate([\n Property('')\n ], SearchSettings.prototype, \"key\", void 0);\n __decorate([\n Property('contains')\n ], SearchSettings.prototype, \"operator\", void 0);\n __decorate([\n Property(true)\n ], SearchSettings.prototype, \"ignoreCase\", void 0);\n __decorate([\n Property(false)\n ], SearchSettings.prototype, \"ignoreAccent\", void 0);\n return SearchSettings;\n}(ChildProperty));\nexport { SearchSettings };\n/**\n * Configures the row drop settings of the Grid.\n */\nvar RowDropSettings = /** @class */ (function (_super) {\n __extends(RowDropSettings, _super);\n function RowDropSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property()\n ], RowDropSettings.prototype, \"targetID\", void 0);\n return RowDropSettings;\n}(ChildProperty));\nexport { RowDropSettings };\n/**\n * Configures the text wrap settings of the Grid.\n */\nvar TextWrapSettings = /** @class */ (function (_super) {\n __extends(TextWrapSettings, _super);\n function TextWrapSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Both')\n ], TextWrapSettings.prototype, \"wrapMode\", void 0);\n return TextWrapSettings;\n}(ChildProperty));\nexport { TextWrapSettings };\n/**\n * Configures the resize behavior of the Grid.\n */\nvar ResizeSettings = /** @class */ (function (_super) {\n __extends(ResizeSettings, _super);\n function ResizeSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Normal')\n ], ResizeSettings.prototype, \"mode\", void 0);\n return ResizeSettings;\n}(ChildProperty));\nexport { ResizeSettings };\n/**\n * Configures the group behavior of the Grid.\n */\nvar GroupSettings = /** @class */ (function (_super) {\n __extends(GroupSettings, _super);\n function GroupSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(true)\n ], GroupSettings.prototype, \"showDropArea\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"allowReordering\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"showToggleButton\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"showGroupedColumn\", void 0);\n __decorate([\n Property(true)\n ], GroupSettings.prototype, \"showUngroupButton\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"disablePageWiseAggregates\", void 0);\n __decorate([\n Property([])\n ], GroupSettings.prototype, \"columns\", void 0);\n __decorate([\n Property()\n ], GroupSettings.prototype, \"captionTemplate\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"enableLazyLoading\", void 0);\n return GroupSettings;\n}(ChildProperty));\nexport { GroupSettings };\n/**\n * Configures the edit behavior of the Grid.\n */\nvar EditSettings = /** @class */ (function (_super) {\n __extends(EditSettings, _super);\n function EditSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"allowAdding\", void 0);\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"allowEditing\", void 0);\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"allowDeleting\", void 0);\n __decorate([\n Property('Normal')\n ], EditSettings.prototype, \"mode\", void 0);\n __decorate([\n Property(true)\n ], EditSettings.prototype, \"allowEditOnDblClick\", void 0);\n __decorate([\n Property(true)\n ], EditSettings.prototype, \"showConfirmDialog\", void 0);\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"showDeleteConfirmDialog\", void 0);\n __decorate([\n Property('')\n ], EditSettings.prototype, \"template\", void 0);\n __decorate([\n Property('')\n ], EditSettings.prototype, \"headerTemplate\", void 0);\n __decorate([\n Property('')\n ], EditSettings.prototype, \"footerTemplate\", void 0);\n __decorate([\n Property('Top')\n ], EditSettings.prototype, \"newRowPosition\", void 0);\n __decorate([\n Property({})\n ], EditSettings.prototype, \"dialog\", void 0);\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"allowNextRowEdit\", void 0);\n return EditSettings;\n}(ChildProperty));\nexport { EditSettings };\n/**\n * Represents the Grid component.\n * ```html\n *
\n * \n * ```\n */\nvar Grid = /** @class */ (function (_super) {\n __extends(Grid, _super);\n /**\n * Constructor for creating the component\n * @hidden\n */\n function Grid(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isPreventScrollEvent = false;\n _this.inViewIndexes = [];\n _this.keyA = false;\n _this.frozenRightCount = 0;\n _this.frozenLeftCount = 0;\n _this.tablesCount = 1;\n _this.movableCount = 0;\n _this.visibleFrozenLeft = 0;\n _this.visibleFrozenRight = 0;\n _this.visibleMovable = 0;\n _this.frozenLeftColumns = [];\n _this.frozenRightColumns = [];\n _this.movableColumns = [];\n _this.media = {};\n _this.isFreezeRefresh = false;\n /** @hidden */\n _this.tableIndex = 0;\n _this.componentRefresh = Component.prototype.refresh;\n /** @hidden */\n _this.isVirtualAdaptive = false;\n /** @hidden */\n _this.vRows = [];\n /** @hidden */\n _this.vcRows = [];\n /** @hidden */\n _this.vGroupOffsets = {};\n /** @hidden */\n _this.rowUid = 0;\n /**\n * Gets the currently visible records of the Grid.\n */\n _this.currentViewData = [];\n /** @hidden */\n _this.lockcolPositionCount = 0;\n /** @hidden */\n _this.prevPageMoving = false;\n /** @hidden */\n _this.pageTemplateChange = false;\n /** @hidden */\n _this.isAutoGen = false;\n _this.mediaBindInstance = {};\n /** @hidden */\n _this.commandDelIndex = undefined;\n /** @hidden */\n _this.asyncTimeOut = 50;\n // enable/disable logger for MVC & Core\n _this.enableLogger = true;\n _this.needsID = true;\n Grid_1.Inject(Selection);\n setValue('mergePersistData', _this.mergePersistGridData, _this);\n return _this;\n }\n Grid_1 = Grid;\n /**\n * Get the properties to be maintained in the persisted state.\n * @return {string}\n */\n Grid.prototype.getPersistData = function () {\n var keyEntity = ['pageSettings', 'sortSettings',\n 'filterSettings', 'groupSettings', 'columns', 'searchSettings', 'selectedRowIndex', 'scrollPosition'];\n var ignoreOnPersist = {\n pageSettings: ['template', 'pageSizes', 'enableQueryString', 'totalRecordsCount', 'pageCount'],\n filterSettings: ['type', 'mode', 'showFilterBarStatus', 'immediateModeDelay', 'ignoreAccent'],\n groupSettings: ['showDropArea', 'showToggleButton', 'showGroupedColumn', 'showUngroupButton',\n 'disablePageWiseAggregates', 'hideCaptionCount'],\n searchSettings: ['fields', 'operator', 'ignoreCase'],\n sortSettings: [], columns: [], selectedRowIndex: [], scrollPosition: []\n };\n var ignoreOnColumn = ['filter', 'edit', 'filterBarTemplate', 'headerTemplate', 'template',\n 'commandTemplate', 'commands', 'dataSource', 'headerText'];\n for (var i = 0; i < keyEntity.length; i++) {\n var currentObject = this[keyEntity[i]];\n for (var _i = 0, _a = ignoreOnPersist[keyEntity[i]]; _i < _a.length; _i++) {\n var val = _a[_i];\n delete currentObject[val];\n }\n }\n this.pageSettings.template = undefined;\n /* tslint:disable-next-line:no-any */\n if (this.isAngular) {\n /* tslint:disable:no-string-literal */\n delete this.groupSettings['properties']['captionTemplate'];\n }\n this.pageTemplateChange = !isNullOrUndefined(this.pagerTemplate);\n return this.addOnPersist(keyEntity);\n };\n /**\n * To provide the array of modules needed for component rendering\n * @return {ModuleDeclaration[]}\n * @hidden\n */\n // tslint:disable-next-line:max-func-body-length\n Grid.prototype.requiredModules = function () {\n this.setFrozenCount();\n var modules = [];\n if (this.isDestroyed) {\n return modules;\n }\n if (this.allowFiltering) {\n modules.push({\n member: 'filter',\n args: [this, this.filterSettings, this.serviceLocator]\n });\n }\n if (this.allowExcelExport) {\n modules.push({\n member: 'ExcelExport',\n args: [this, this.serviceLocator]\n });\n }\n if (this.allowPdfExport) {\n modules.push({\n member: 'PdfExport',\n args: [this]\n });\n }\n if (this.allowSorting) {\n modules.push({\n member: 'sort',\n args: [this, this.sortSettings, this.sortedColumns, this.serviceLocator]\n });\n }\n if (this.allowPaging) {\n modules.push({\n member: 'pager',\n args: [this, this.pageSettings]\n });\n }\n if (this.allowSelection) {\n modules.push({\n member: 'selection',\n args: [this, this.selectionSettings, this.serviceLocator]\n });\n }\n modules.push({\n member: 'resize',\n args: [this]\n });\n if (this.allowReordering) {\n modules.push({\n member: 'reorder',\n args: [this]\n });\n }\n if (this.allowRowDragAndDrop) {\n modules.push({\n member: 'rowDragAndDrop',\n args: [this]\n });\n }\n if (this.allowGrouping) {\n modules.push({\n member: 'group',\n args: [this, this.groupSettings, this.sortedColumns, this.serviceLocator]\n });\n }\n if (this.aggregates.length) {\n modules.push({ member: 'aggregate', args: [this, this.serviceLocator] });\n }\n if (this.isDetail()) {\n modules.push({\n member: 'detailRow',\n args: [this, this.serviceLocator]\n });\n }\n if (this.toolbar || this.toolbarTemplate) {\n modules.push({\n member: 'toolbar',\n args: [this, this.serviceLocator]\n });\n }\n if (this.enableVirtualization || this.enableColumnVirtualization) {\n modules.push({\n member: 'virtualscroll',\n args: [this, this.serviceLocator]\n });\n }\n if (this.getFrozenColumns() || this.frozenRows || this.frozenRightCount || this.frozenLeftCount) {\n modules.push({ member: 'freeze', args: [this, this.serviceLocator] });\n }\n if (this.isCommandColumn(this.columns)) {\n modules.push({\n member: 'commandColumn',\n args: [this, this.serviceLocator]\n });\n }\n if (this.editSettings.allowAdding || this.editSettings.allowDeleting || this.editSettings.allowEditing) {\n modules.push({\n member: 'edit',\n args: [this, this.serviceLocator]\n });\n }\n this.extendRequiredModules(modules);\n return modules;\n };\n Grid.prototype.extendRequiredModules = function (modules) {\n if (this.enableInfiniteScrolling) {\n modules.push({\n member: 'infiniteScroll',\n args: [this, this.serviceLocator]\n });\n }\n if (this.groupSettings.enableLazyLoading) {\n modules.push({\n member: 'lazyLoadGroup',\n args: [this, this.serviceLocator]\n });\n }\n if (this.contextMenuItems) {\n modules.push({\n member: 'contextMenu',\n args: [this, this.serviceLocator]\n });\n }\n if (this.showColumnMenu) {\n modules.push({\n member: 'columnMenu',\n args: [this, this.serviceLocator]\n });\n }\n if (this.showColumnChooser) {\n modules.push({\n member: 'columnChooser',\n args: [this, this.serviceLocator]\n });\n }\n if (this.isForeignKeyEnabled(this.columns)) {\n modules.push({ member: 'foreignKey', args: [this, this.serviceLocator] });\n }\n if (this.enableLogger) {\n modules.push({ member: 'logger', args: [this] });\n }\n if (isBlazor()) {\n modules.push({ member: 'blazor', args: [this] });\n }\n };\n /**\n * For internal use only - Initialize the event handler;\n * @private\n */\n Grid.prototype.preRender = function () {\n this.serviceLocator = new ServiceLocator;\n this.initProperties();\n this.initializeServices();\n };\n Grid.prototype.initProperties = function () {\n /* tslint:disable */\n this.isInitial = true;\n this.sortedColumns = [];\n this.inViewIndexes = [];\n this.mediaCol = [];\n this.isInitialLoad = false;\n this.allowServerDataBinding = false;\n this.ignoreCollectionWatch = true;\n if (isBlazor() && this.enableVirtualization && this.allowGrouping) {\n var isExpanded = 'isExpanded';\n this[isExpanded] = false;\n }\n this.mergeCells = {};\n this.isEdit = false;\n this.checkAllRows = 'None';\n this.isCheckBoxSelection = false;\n this.isPersistSelection = false;\n this.componentRefresh = Component.prototype.refresh;\n this.filterOperators = {\n contains: 'contains', endsWith: 'endswith', equal: 'equal', greaterThan: 'greaterthan', greaterThanOrEqual: 'greaterthanorequal',\n lessThan: 'lessthan', lessThanOrEqual: 'lessthanorequal', notEqual: 'notequal', startsWith: 'startswith'\n };\n this.defaultLocale = {\n EmptyRecord: 'No records to display',\n True: 'true',\n False: 'false',\n InvalidFilterMessage: 'Invalid Filter Data',\n GroupDropArea: 'Drag a column header here to group its column',\n UnGroup: 'Click here to ungroup',\n UnGroupButton: 'Click here to ungroup',\n GroupDisable: 'Grouping is disabled for this column',\n FilterbarTitle: '\\'s filter bar cell',\n EmptyDataSourceError: 'DataSource must not be empty at initial load since columns are generated from dataSource in AutoGenerate Column Grid',\n // Toolbar Items\n Add: 'Add',\n Edit: 'Edit',\n Cancel: 'Cancel',\n Update: 'Update',\n Delete: 'Delete',\n Print: 'Print',\n Pdfexport: 'PDF Export',\n Excelexport: 'Excel Export',\n Wordexport: 'Word Export',\n Csvexport: 'CSV Export',\n Search: 'Search',\n Columnchooser: 'Columns',\n Save: 'Save',\n Item: 'item',\n Items: 'items',\n EditOperationAlert: 'No records selected for edit operation',\n DeleteOperationAlert: 'No records selected for delete operation',\n SaveButton: 'Save',\n OKButton: 'OK',\n CancelButton: 'Cancel',\n EditFormTitle: 'Details of ',\n AddFormTitle: 'Add New Record',\n BatchSaveConfirm: 'Are you sure you want to save changes?',\n BatchSaveLostChanges: 'Unsaved changes will be lost. Are you sure you want to continue?',\n ConfirmDelete: 'Are you sure you want to Delete Record?',\n CancelEdit: 'Are you sure you want to Cancel the changes?',\n ChooseColumns: 'Choose Column',\n SearchColumns: 'search columns',\n Matchs: 'No Matches Found',\n FilterButton: 'Filter',\n ClearButton: 'Clear',\n StartsWith: 'Starts With',\n EndsWith: 'Ends With',\n Contains: 'Contains',\n Equal: 'Equal',\n NotEqual: 'Not Equal',\n LessThan: 'Less Than',\n LessThanOrEqual: 'Less Than Or Equal',\n GreaterThan: 'Greater Than',\n GreaterThanOrEqual: 'Greater Than Or Equal',\n ChooseDate: 'Choose a Date',\n EnterValue: 'Enter the value',\n Copy: 'Copy',\n Group: 'Group by this column',\n Ungroup: 'Ungroup by this column',\n autoFitAll: 'Autofit all columns',\n autoFit: 'Autofit this column',\n AutoFitAll: 'Autofit all columns',\n AutoFit: 'Autofit this column',\n Export: 'Export',\n FirstPage: 'First Page',\n LastPage: 'Last Page',\n PreviousPage: 'Previous Page',\n NextPage: 'Next Page',\n SortAscending: 'Sort Ascending',\n SortDescending: 'Sort Descending',\n EditRecord: 'Edit Record',\n DeleteRecord: 'Delete Record',\n FilterMenu: 'Filter',\n SelectAll: 'Select All',\n Blanks: 'Blanks',\n FilterTrue: 'True',\n FilterFalse: 'False',\n NoResult: 'No Matches Found',\n ClearFilter: 'Clear Filter',\n Clear: 'Clear',\n NumberFilter: 'Number Filters',\n TextFilter: 'Text Filters',\n DateFilter: 'Date Filters',\n DateTimeFilter: 'DateTime Filters',\n MatchCase: 'Match Case',\n Between: 'Between',\n CustomFilter: 'Custom Filter',\n CustomFilterPlaceHolder: 'Enter the value',\n CustomFilterDatePlaceHolder: 'Choose a date',\n AND: 'AND',\n OR: 'OR',\n ShowRowsWhere: 'Show rows where:',\n FilterMenuDialogARIA: 'Filter menu dialog',\n ExcelFilterDialogARIA: 'Excel filter dialog',\n DialogEditARIA: 'Edit dialog',\n ColumnChooserDialogARIA: 'Column chooser dialog',\n ColumnMenuDialogARIA: 'Column menu dialog',\n CustomFilterDialogARIA: 'Customer filter dialog',\n SortAtoZ: 'Sort A to Z',\n SortZtoA: 'Sort Z to A',\n SortByOldest: 'Sort by Oldest',\n SortByNewest: 'Sort by Newest',\n SortSmallestToLargest: 'Sort Smallest to Largest',\n SortLargestToSmallest: 'Sort Largest to Smallest',\n Sort: 'Sort'\n };\n this.keyConfigs = {\n downArrow: 'downarrow',\n upArrow: 'uparrow',\n rightArrow: 'rightarrow',\n leftArrow: 'leftarrow',\n shiftDown: 'shift+downarrow',\n shiftUp: 'shift+uparrow',\n shiftRight: 'shift+rightarrow',\n shiftLeft: 'shift+leftarrow',\n home: 'home',\n end: 'end',\n escape: 'escape',\n ctrlHome: 'ctrl+home',\n ctrlEnd: 'ctrl+end',\n pageUp: 'pageup',\n pageDown: 'pagedown',\n ctrlAltPageUp: 'ctrl+alt+pageup',\n ctrlAltPageDown: 'ctrl+alt+pagedown',\n altPageUp: 'alt+pageup',\n altPageDown: 'alt+pagedown',\n altDownArrow: 'alt+downarrow',\n altUpArrow: 'alt+uparrow',\n ctrlDownArrow: 'ctrl+downarrow',\n ctrlUpArrow: 'ctrl+uparrow',\n ctrlPlusA: 'ctrl+A',\n ctrlPlusP: 'ctrl+P',\n insert: 'insert',\n delete: 'delete',\n f2: 'f2',\n enter: 'enter',\n ctrlEnter: 'ctrl+enter',\n shiftEnter: 'shift+enter',\n tab: 'tab',\n shiftTab: 'shift+tab',\n space: 'space',\n ctrlPlusC: 'ctrl+C',\n ctrlShiftPlusH: 'ctrl+shift+H',\n ctrlSpace: 'ctrl+space',\n ctrlLeftArrow: 'ctrl+leftarrow',\n ctrlRightArrow: 'ctrl+rightarrow'\n };\n /* tslint:enable */\n };\n /**\n * For internal use only - To Initialize the component rendering.\n * @private\n */\n Grid.prototype.render = function () {\n this.log(['module_missing', 'promise_enabled', 'locale_missing', 'check_datasource_columns']);\n this.ariaService.setOptions(this.element, { role: 'grid' });\n if (isBlazor()) {\n this.renderComplete();\n }\n createSpinner({ target: this.element }, this.createElement);\n this.renderModule = new Render(this, this.serviceLocator);\n this.searchModule = new Search(this);\n this.scrollModule = new Scroll(this);\n this.notify(events.initialLoad, {});\n if (this.getDataModule().dataManager.dataSource.offline === true || this.getDataModule().dataManager.dataSource.url === undefined) {\n this.isVirtualAdaptive = true;\n }\n this.trigger(events.load);\n prepareColumns(this.columns, this.enableColumnVirtualization, this);\n if (this.enablePersistence) {\n this.notify(events.columnsPrepared, {});\n }\n if (!(isBlazor() && this.isServerRendered)) {\n this.getMediaColumns();\n setColumnIndex(this.columns);\n }\n this.checkLockColumns(this.columns);\n this.getColumns();\n this.processModel();\n this.gridRender();\n this.wireEvents();\n this.addListener();\n this.updateDefaultCursor();\n this.updateStackedFilter();\n this.showSpinner();\n this.notify(events.initialEnd, {});\n if (isBlazor() && this.isServerRendered) {\n gridObserver.notify(events.componentRendered, { id: this.element.id, grid: this });\n }\n };\n /**\n * By default, grid shows the spinner for all its actions. You can use this method to show spinner at your needed time.\n */\n Grid.prototype.showSpinner = function () {\n showSpinner(this.element);\n };\n /**\n * Manually showed spinner needs to hide by `hideSpinnner`.\n */\n Grid.prototype.hideSpinner = function () {\n hideSpinner(this.element);\n };\n Grid.prototype.updateStackedFilter = function () {\n if (this.allowFiltering && this.filterSettings.type === 'FilterBar' &&\n this.getHeaderContent().querySelectorAll('.e-stackedheadercell').length) {\n this.getHeaderContent().classList.add('e-stackedfilter');\n }\n else {\n this.getHeaderContent().classList.remove('e-stackedfilter');\n }\n };\n Grid.prototype.getMediaColumns = function () {\n if (!this.enableColumnVirtualization) {\n var gcol = this.getColumns();\n this.getShowHideService = this.serviceLocator.getService('showHideService');\n if (!isNullOrUndefined(gcol)) {\n for (var index = 0; index < gcol.length; index++) {\n if (!isNullOrUndefined(gcol[index].hideAtMedia) && (isNullOrUndefined(gcol[index].visible) || gcol[index].visible)) {\n this.pushMediaColumn(gcol[index], index);\n }\n }\n }\n }\n };\n Grid.prototype.pushMediaColumn = function (col, index) {\n this.mediaCol.push(col);\n this.media[col.uid] = window.matchMedia(col.hideAtMedia);\n this.mediaQueryUpdate(index, this.media[col.uid]);\n this.mediaBindInstance[index] = this.mediaQueryUpdate.bind(this, index);\n this.media[col.uid].addListener(this.mediaBindInstance[index]);\n };\n /**\n * @hidden\n */\n Grid.prototype.updateMediaColumns = function (col) {\n if (!this.enableColumnVirtualization) {\n var index = this.getColumnIndexByUid(col.uid);\n for (var i = 0; i < this.mediaCol.length; i++) {\n if (col.uid === this.mediaCol[i].uid) {\n this.mediaCol.splice(i, 1);\n return;\n }\n }\n this.pushMediaColumn(col, index);\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.mediaQueryUpdate = function (columnIndex, e) {\n var col = this.getColumns()[columnIndex];\n if (this.mediaCol.some(function (mediaColumn) { return mediaColumn.uid === col.uid; })) {\n col.visible = e.matches;\n if (this.isInitialLoad) {\n this.invokedFromMedia = true;\n if (col.visible) {\n this.showHider.show(col.headerText, 'headerText');\n }\n else {\n this.showHider.hide(col.headerText, 'headerText');\n }\n }\n }\n };\n Grid.prototype.refreshMediaCol = function () {\n this.isInitialLoad = true;\n var footerContent = this.element.querySelector('.e-gridfooter');\n if (this.aggregates.length && this.element.scrollHeight > this.height && footerContent) {\n addClass([footerContent], ['e-footerpadding']);\n }\n var checkboxColumn = this.getColumns().filter(function (col) { return col.type === 'checkbox'; });\n if (checkboxColumn.length && this.selectionSettings.checkboxMode === 'ResetOnRowClick') {\n this.isCheckBoxSelection = false;\n }\n if (this.rowRenderingMode === 'Vertical') {\n if (this.enableHover) {\n this.setProperties({ enableAdaptiveUI: true, enableHover: false }, true);\n removeClass([this.element], 'e-gridhover');\n }\n }\n };\n Grid.prototype.removeMediaListener = function () {\n for (var i = 0; i < this.mediaCol.length; i++) {\n this.media[this.mediaCol[i].uid].removeListener(this.mediaBindInstance[this.mediaCol[i].index]);\n }\n };\n /**\n * For internal use only - Initialize the event handler\n * @private\n */\n Grid.prototype.eventInitializer = function () {\n //eventInitializer\n };\n /**\n * Destroys the component (detaches/removes all event handlers, attributes, classes, and empties the component element).\n * @method destroy\n * @return {void}\n */\n Grid.prototype.destroy = function () {\n var gridElement = this.element;\n if (!gridElement) {\n return;\n }\n var hasGridChild = gridElement.querySelector('.e-gridheader') &&\n gridElement.querySelector('.e-gridcontent') ? true : false;\n if (hasGridChild) {\n this.unwireEvents();\n }\n this.removeListener();\n this.removeMediaListener();\n this.notify(events.destroy, {});\n this.destroyDependentModules();\n if (hasGridChild) {\n _super.prototype.destroy.call(this);\n }\n this.toolTipObj.destroy();\n var modules = ['renderModule', 'headerModule', 'contentModule', 'valueFormatterService',\n 'serviceLocator', 'ariaService', 'keyboardModule', 'widthService', 'searchModule', 'showHider',\n 'scrollModule', 'printModule', 'clipboardModule', 'focusModule'];\n for (var i = 0; i < modules.length; i++) {\n if (this[modules[i]]) {\n this[modules[i]] = null;\n }\n }\n if (!(isBlazor() && this.isServerRendered)) {\n this.element.innerHTML = '';\n }\n else {\n this.element.style.display = 'none';\n }\n classList(this.element, [], ['e-rtl', 'e-gridhover', 'e-responsive', 'e-default', 'e-device', 'e-grid-min-height']);\n if (this.isAngular && !this.isFreezeRefresh) {\n this.element = null;\n }\n this.isFreezeRefresh = false;\n };\n Grid.prototype.destroyDependentModules = function () {\n var gridElement = this.element;\n if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {\n return;\n }\n this.scrollModule.destroy();\n this.keyboardModule.destroy();\n this.focusModule.destroy();\n };\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Grid.prototype.getModuleName = function () {\n return 'grid';\n };\n Grid.prototype.enableBoxSelection = function () {\n if (this.enableAutoFill) {\n this.selectionSettings.cellSelectionMode = 'BoxWithBorder';\n this.element.classList.add('e-afenabled');\n }\n else {\n this.element.classList.remove('e-afenabled');\n }\n };\n /**\n * Called internally if any of the property value changed.\n * @hidden\n */\n /* tslint:disable-next-line:max-line-length */\n // tslint:disable-next-line:max-func-body-length\n Grid.prototype.onPropertyChanged = function (newProp, oldProp) {\n var requireRefresh = false;\n var requireGridRefresh = false;\n var freezeRefresh = false;\n var checkCursor;\n var args = { requestType: 'refresh' };\n if (this.isDestroyed) {\n return;\n }\n this.log('module_missing');\n if (this.isEllipsisTooltip()) {\n this.toolTipObj.close();\n }\n var properties = Object.keys(newProp);\n if (properties.indexOf('columns') > -1) {\n this.updateColumnObject();\n requireGridRefresh = true;\n }\n for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {\n var prop = properties_1[_i];\n switch (prop) {\n case 'allowPaging':\n this.notify(events.uiUpdate, { module: 'pager', enable: this.allowPaging });\n requireRefresh = true;\n break;\n case 'pageSettings':\n if (this.pageTemplateChange) {\n this.pageTemplateChange = false;\n this.notify(events.inBoundModelChanged, { module: 'pager', properties: newProp.pageSettings });\n break;\n }\n this.notify(events.inBoundModelChanged, { module: 'pager', properties: newProp.pageSettings });\n if (isNullOrUndefined(newProp.pageSettings.currentPage) && isNullOrUndefined(newProp.pageSettings.pageSize)\n && isNullOrUndefined(newProp.pageSettings.totalRecordsCount)\n || !isNullOrUndefined(oldProp.pageSettings) &&\n ((newProp.pageSettings.currentPage !== oldProp.pageSettings.currentPage)\n && !this.enableColumnVirtualization && !this.enableVirtualization\n && this.pageSettings.totalRecordsCount <= this.pageSettings.pageSize)) {\n requireRefresh = true;\n }\n break;\n case 'allowSorting':\n this.notify(events.uiUpdate, { module: 'sort', enable: this.allowSorting });\n requireRefresh = true;\n checkCursor = true;\n break;\n case 'allowFiltering':\n this.updateStackedFilter();\n this.notify(events.uiUpdate, { module: 'filter', enable: this.allowFiltering });\n requireRefresh = true;\n if (this.filterSettings.type !== 'FilterBar') {\n this.refreshHeader();\n }\n break;\n case 'height':\n case 'width':\n this.notify(events.uiUpdate, { module: 'scroll', properties: { width: newProp.width, height: newProp.height } });\n break;\n case 'allowReordering':\n this.headerModule.refreshUI();\n checkCursor = true;\n break;\n case 'allowRowDragAndDrop':\n this.notify(events.uiUpdate, { module: 'rowDragAndDrop', enable: this.allowRowDragAndDrop });\n this.renderModule.refresh();\n this.headerModule.refreshUI();\n break;\n case 'allowSelection':\n this.notify(events.uiUpdate, { module: 'selection', enable: this.allowSelection });\n break;\n case 'enableAutoFill':\n if (this.selectionModule) {\n this.enableBoxSelection();\n this.selectionModule.updateAutoFillPosition();\n }\n break;\n case 'rowTemplate':\n this.rowTemplateFn = templateCompiler(this.rowTemplate);\n requireRefresh = true;\n break;\n case 'detailTemplate':\n this.detailTemplateFn = templateCompiler(this.detailTemplate);\n requireRefresh = true;\n break;\n case 'allowGrouping':\n this.notify(events.uiUpdate, { module: 'group', enable: this.allowGrouping });\n this.headerModule.refreshUI();\n requireRefresh = true;\n checkCursor = true;\n break;\n case 'enableInfiniteScrolling':\n case 'childGrid':\n requireRefresh = true;\n break;\n case 'toolbar':\n this.notify(events.uiUpdate, { module: 'toolbar' });\n break;\n case 'groupSettings':\n this.notify(events.inBoundModelChanged, {\n module: 'group', properties: newProp.groupSettings,\n oldProperties: oldProp.groupSettings\n });\n break;\n case 'aggregates':\n if (!this.aggregates.length && this.allowGrouping && this.groupSettings.columns.length) {\n requireRefresh = true;\n }\n this.notify(events.uiUpdate, { module: 'aggregate', properties: newProp });\n break;\n case 'frozenColumns':\n case 'frozenRows':\n case 'enableVirtualization':\n case 'currencyCode':\n case 'locale':\n this.log('frozen_rows_columns');\n freezeRefresh = true;\n requireGridRefresh = true;\n break;\n case 'query':\n if (!this.getDataModule().isQueryInvokedFromData) {\n requireRefresh = true;\n }\n this.getDataModule().isQueryInvokedFromData = false;\n break;\n default:\n this.extendedPropertyChange(prop, newProp, requireGridRefresh);\n }\n }\n if (checkCursor) {\n this.updateDefaultCursor();\n }\n if (requireGridRefresh) {\n if (freezeRefresh || this.getFrozenColumns() || this.frozenRows) {\n if (!(isBlazor() && this.isServerRendered)) {\n this.freezeRefresh();\n }\n }\n else {\n this.refresh();\n }\n }\n else if (requireRefresh) {\n this.notify(events.modelChanged, args);\n requireRefresh = false;\n this.maintainSelection(newProp.selectedRowIndex);\n }\n };\n /* tslint:disable */\n Grid.prototype.extendedPropertyChange = function (prop, newProp, requireGridRefresh) {\n switch (prop) {\n case 'enableRtl':\n this.updateRTL();\n if (this.allowPaging) {\n this.element.querySelector('.e-gridpager').ej2_instances[0].enableRtl = newProp.enableRtl;\n this.element.querySelector('.e-gridpager').ej2_instances[0].dataBind();\n }\n if (this.height !== 'auto') {\n this.scrollModule.removePadding(!newProp.enableRtl);\n this.scrollModule.setPadding();\n }\n if (this.toolbar && this.toolbarModule) {\n this.toolbarModule.getToolbar().ej2_instances[0].enableRtl = newProp.enableRtl;\n this.toolbarModule.getToolbar().ej2_instances[0].dataBind();\n }\n if (this.contextMenuItems && this.contextMenuModule) {\n this.contextMenuModule.getContextMenu().ej2_instances[0].enableRtl = newProp.enableRtl;\n this.contextMenuModule.getContextMenu().ej2_instances[0].dataBind();\n }\n if (this.showColumnMenu && this.columnMenuModule) {\n this.columnMenuModule.getColumnMenu().ej2_instances[0].enableRtl = newProp.enableRtl;\n this.columnMenuModule.getColumnMenu().ej2_instances[0].dataBind();\n }\n if (this.filterSettings.type === 'FilterBar' && this.filterSettings.showFilterBarOperator) {\n this.refreshHeader();\n }\n this.notify(events.rtlUpdated, {});\n break;\n case 'enableAltRow':\n this.renderModule.refresh();\n break;\n case 'allowResizing':\n this.headerModule.refreshUI();\n this.updateResizeLines();\n break;\n case 'rowHeight':\n if (this.rowHeight) {\n addClass([this.element], 'e-grid-min-height');\n }\n else {\n removeClass([this.element], 'e-grid-min-height');\n }\n this.renderModule.refresh();\n this.headerModule.refreshUI();\n break;\n case 'gridLines':\n this.updateGridLines();\n break;\n case 'showColumnMenu':\n this.headerModule.refreshUI();\n this.notify(events.uiUpdate, { module: 'columnMenu', enable: true });\n break;\n case 'columnMenuItems':\n this.notify(events.uiUpdate, { module: 'columnMenu', enable: this.columnMenuItems });\n break;\n case 'contextMenuItems':\n this.notify(events.uiUpdate, { module: 'contextMenu', enable: this.contextMenuItems });\n break;\n case 'showColumnChooser':\n this.notify(events.uiUpdate, { module: 'columnChooser', enable: this.showColumnChooser });\n break;\n case 'filterSettings':\n this.updateStackedFilter();\n this.notify(events.inBoundModelChanged, { module: 'filter', properties: newProp.filterSettings });\n break;\n case 'searchSettings':\n this.notify(events.inBoundModelChanged, { module: 'search', properties: newProp.searchSettings });\n break;\n case 'sortSettings':\n this.notify(events.inBoundModelChanged, { module: 'sort' });\n break;\n case 'selectionSettings':\n this.notify(events.inBoundModelChanged, { module: 'selection', properties: newProp.selectionSettings });\n break;\n case 'editSettings':\n this.notify(events.inBoundModelChanged, { module: 'edit', properties: newProp.editSettings });\n break;\n case 'allowTextWrap':\n case 'textWrapSettings':\n if (this.allowTextWrap) {\n this.applyTextWrap();\n }\n else {\n this.removeTextWrap();\n }\n this.notify(events.freezeRender, { case: 'textwrap', isModeChg: (prop === 'textWrapSettings') });\n break;\n case 'dataSource':\n var pending_1 = this.getDataModule().getState();\n if (Object.getPrototypeOf(newProp).deepWatch) {\n var pKeyField = this.getPrimaryKeyFieldNames()[0];\n for (var i = 0, props = Object.keys(newProp.dataSource); i < props.length; i++) {\n this.setRowData(getValue(pKeyField, this.dataSource[props[i]]), this.dataSource[props[i]]);\n }\n }\n else if (pending_1.isPending) {\n var gResult = !isNullOrUndefined(this.dataSource) ? this.dataSource.result : [];\n var names = (pending_1.group || []);\n for (var i = 0; i < names.length; i++) {\n gResult = DataUtil.group(gResult, names[i], pending_1.aggregates || []);\n }\n this.dataSource = {\n result: gResult, count: this.dataSource.count,\n aggregates: this.dataSource.aggregates\n };\n this.getDataModule().setState({});\n pending_1.resolver(this.dataSource);\n }\n else {\n this.getDataModule().setState({ isDataChanged: false });\n this.notify(events.dataSourceModified, {});\n if (!requireGridRefresh) {\n this.renderModule.refresh();\n if (this.isCheckBoxSelection) {\n this.notify(events.beforeRefreshOnDataChange, {});\n }\n }\n }\n this.scrollRefresh();\n break;\n case 'enableHover':\n var action = newProp.enableHover ? addClass : removeClass;\n action([this.element], 'e-gridhover');\n break;\n case 'selectedRowIndex':\n if (!this.isSelectedRowIndexUpdating) {\n this.selectRow(newProp.selectedRowIndex);\n }\n this.isSelectedRowIndexUpdating = false;\n break;\n case 'resizeSettings':\n this.widthService.setWidthToTable();\n break;\n case 'enableAdaptiveUI':\n this.notify(events.setFullScreenDialog, {});\n break;\n case 'rowRenderingMode':\n this.enableVerticalRendering();\n this.notify(events.rowModeChange, {});\n this.refresh();\n break;\n }\n };\n Grid.prototype.maintainSelection = function (index) {\n var _this = this;\n if (index !== -1) {\n var fn_1 = function () {\n _this.selectRow(index);\n _this.off(events.contentReady, fn_1);\n };\n this.on(events.contentReady, fn_1, this);\n }\n };\n /**\n * @private\n */\n Grid.prototype.setProperties = function (prop, muteOnChange) {\n _super.prototype.setProperties.call(this, prop, muteOnChange);\n var filterSettings = 'filterSettings';\n if (prop[filterSettings] && this.filterModule && muteOnChange) {\n this.filterModule.refreshFilter();\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.setTablesCount = function () {\n var frozenCols = this.getFrozenColumns();\n var frozenLeft = this.getFrozenLeftColumnsCount();\n var frozenRight = this.getFrozenRightColumnsCount();\n if (frozenCols && !frozenLeft && !frozenRight) {\n this.tablesCount = 2;\n }\n else if (!frozenCols && (frozenLeft || frozenRight)) {\n if ((frozenLeft && !frozenRight) || (frozenRight && !frozenLeft)) {\n this.tablesCount = 2;\n }\n else if (frozenLeft && frozenRight) {\n this.tablesCount = 3;\n }\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.getTablesCount = function () {\n return this.tablesCount;\n };\n /**\n * @hidden\n */\n Grid.prototype.updateDefaultCursor = function () {\n var headerCells = [].slice.call(this.getHeaderContent().querySelectorAll('.e-headercell:not(.e-stackedheadercell)'));\n var stdHdrCell = [].slice.call(this.getHeaderContent().querySelectorAll('.e-stackedheadercell'));\n var cols = this.getColumns();\n if (this.enableColumnVirtualization && this.getFrozenColumns()) {\n var cells = this.contentModule.getHeaderCells();\n headerCells = cells.length ? cells : headerCells;\n }\n for (var i = 0; i < headerCells.length; i++) {\n var cell = headerCells[i];\n if (this.allowGrouping || this.allowReordering || this.allowSorting) {\n if (!cols[i].allowReordering || !cols[i].allowSorting || !cols[i].allowGrouping) {\n cell.classList.add('e-defaultcursor');\n }\n else {\n cell.classList.add('e-mousepointer');\n }\n }\n }\n for (var count = 0; count < stdHdrCell.length; count++) {\n if (this.allowReordering) {\n stdHdrCell[count].classList.add('e-mousepointer');\n }\n }\n };\n Grid.prototype.updateColumnModel = function (columns) {\n for (var i = 0, len = columns.length; i < len; i++) {\n if (columns[i].columns) {\n this.updateColumnModel(columns[i].columns);\n }\n else {\n this.columnModel.push(columns[i]);\n }\n }\n this.updateColumnLevelFrozen();\n this.updateFrozenColumns();\n this.updateLockableColumns();\n };\n Grid.prototype.updateColumnLevelFrozen = function () {\n var cols = this.columnModel;\n var leftCols = [];\n var rightCols = [];\n var movableCols = [];\n if (this.frozenLeftCount || this.frozenRightCount) {\n for (var i = 0, len = cols.length; i < len; i++) {\n /* tslint:disable-next-line:no-any */\n var col = cols[i];\n if (col.freeze === 'Left') {\n col.freezeTable = 'frozen-left';\n leftCols.push(col);\n }\n else if (col.freeze === 'Right') {\n col.freezeTable = 'frozen-right';\n rightCols.push(col);\n }\n else {\n col.freezeTable = 'movable';\n movableCols.push(col);\n }\n }\n this.columnModel = leftCols.concat(movableCols).concat(rightCols);\n }\n };\n Grid.prototype.updateFrozenColumns = function () {\n if (this.frozenLeftCount || this.frozenRightCount) {\n return;\n }\n var cols = this.columnModel;\n var directFrozenCount = this.frozenColumns;\n var totalFrozenCount = this.getFrozenColumns();\n var count = 0;\n for (var i = 0, len = cols.length; i < len; i++) {\n /* tslint:disable-next-line:no-any */\n var col = cols[i];\n if (directFrozenCount) {\n if (i < directFrozenCount) {\n col.freezeTable = 'frozen-left';\n }\n else {\n col.freezeTable = 'movable';\n }\n }\n if (col.isFrozen && i >= directFrozenCount) {\n col.freezeTable = 'frozen-left';\n cols.splice(this.frozenColumns + count, 0, cols.splice(i, 1)[0]);\n count++;\n }\n else if (totalFrozenCount && !directFrozenCount) {\n col.freezeTable = 'movable';\n }\n }\n };\n Grid.prototype.getFrozenLeftCount = function () {\n return this.getFrozenColumns() || this.getFrozenLeftColumnsCount();\n };\n Grid.prototype.isFrozenGrid = function () {\n return this.getFrozenColumns() !== 0 || this.getFrozenLeftColumnsCount() !== 0 || this.getFrozenRightColumnsCount() !== 0;\n };\n Grid.prototype.getFrozenMode = function () {\n return this.frozenName;\n };\n Grid.prototype.updateLockableColumns = function () {\n var cols = this.columnModel;\n var frozenCount = 0;\n var movableCount = 0;\n var frozenColumns = this.getFrozenColumns();\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].lockColumn) {\n if (i < frozenColumns) {\n cols.splice(frozenCount, 0, cols.splice(i, 1)[0]);\n frozenCount++;\n }\n else {\n cols.splice(frozenColumns + movableCount, 0, cols.splice(i, 1)[0]);\n movableCount++;\n }\n }\n }\n };\n Grid.prototype.checkLockColumns = function (cols) {\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].columns) {\n this.checkLockColumns(cols[i].columns);\n }\n else if (cols[i].lockColumn) {\n this.lockcolPositionCount++;\n }\n }\n };\n /**\n * Gets the columns from the Grid.\n * @return {Column[]}\n * @blazorType List\n */\n Grid.prototype.getColumns = function (isRefresh) {\n var _this = this;\n var inview = this.inViewIndexes.map(function (v) { return v - _this.groupSettings.columns.length; }).filter(function (v) { return v > -1; });\n var vLen = inview.length;\n if (!this.enableColumnVirtualization || isNullOrUndefined(this.columnModel) || this.columnModel.length === 0 || isRefresh) {\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n }\n var columns = vLen === 0 ? this.columnModel :\n this.columnModel.slice(inview[0], inview[vLen - 1] + 1);\n if (this.contentModule && this.enableColumnVirtualization && this.isFrozenGrid() && inview.length\n && inview[0] > 0) {\n var frozenCols = this.contentModule.ensureFrozenCols(columns);\n columns = frozenCols;\n }\n return columns;\n };\n /**\n * @private\n */\n Grid.prototype.getStackedHeaderColumnByHeaderText = function (stackedHeader, col) {\n for (var i = 0; i < col.length; i++) {\n var individualColumn = col[i];\n if (individualColumn.field === stackedHeader || individualColumn.headerText === stackedHeader) {\n this.stackedColumn = individualColumn;\n break;\n }\n else if (individualColumn.columns) {\n this.getStackedHeaderColumnByHeaderText(stackedHeader, individualColumn.columns);\n }\n }\n return this.stackedColumn;\n };\n /**\n * @private\n */\n Grid.prototype.getColumnIndexesInView = function () {\n return this.inViewIndexes;\n };\n /**\n * @private\n */\n Grid.prototype.getQuery = function () {\n return this.query;\n };\n /**\n * @private\n */\n Grid.prototype.getLocaleConstants = function () {\n return this.defaultLocale;\n };\n /**\n * @private\n */\n Grid.prototype.setColumnIndexesInView = function (indexes) {\n this.inViewIndexes = indexes;\n };\n /**\n * Gets the visible columns from the Grid.\n * @return {Column[]}\n * @blazorType List\n */\n Grid.prototype.getVisibleColumns = function () {\n var cols = [];\n for (var _i = 0, _a = this.columnModel; _i < _a.length; _i++) {\n var col = _a[_i];\n if (col.visible) {\n cols.push(col);\n }\n }\n return cols;\n };\n /**\n * Gets the header div of the Grid.\n * @return {Element}\n */\n Grid.prototype.getHeaderContent = function () {\n return this.headerModule.getPanel();\n };\n /**\n * Sets the header div of the Grid to replace the old header.\n * @param {Element} element - Specifies the Grid header.\n * @return {void}\n */\n Grid.prototype.setGridHeaderContent = function (element) {\n this.headerModule.setPanel(element);\n };\n /**\n * Gets the content table of the Grid.\n * @return {Element}\n */\n Grid.prototype.getContentTable = function () {\n return this.contentModule.getTable();\n };\n /**\n * Sets the content table of the Grid to replace the old content table.\n * @param {Element} element - Specifies the Grid content table.\n * @return {void}\n */\n Grid.prototype.setGridContentTable = function (element) {\n this.contentModule.setTable(element);\n };\n /**\n * Gets the content div of the Grid.\n * @return {Element}\n */\n Grid.prototype.getContent = function () {\n return this.contentModule.getPanel();\n };\n /**\n * Sets the content div of the Grid to replace the old Grid content.\n * @param {Element} element - Specifies the Grid content.\n * @return {void}\n */\n Grid.prototype.setGridContent = function (element) {\n this.contentModule.setPanel(element);\n };\n /**\n * Gets the header table element of the Grid.\n * @return {Element}\n */\n Grid.prototype.getHeaderTable = function () {\n return this.headerModule.getTable();\n };\n /**\n * Sets the header table of the Grid to replace the old one.\n * @param {Element} element - Specifies the Grid header table.\n * @return {void}\n */\n Grid.prototype.setGridHeaderTable = function (element) {\n this.headerModule.setTable(element);\n };\n /**\n * Gets the footer div of the Grid.\n * @return {Element}\n */\n Grid.prototype.getFooterContent = function () {\n this.footerElement = this.element.getElementsByClassName('e-gridfooter')[0];\n return this.footerElement;\n };\n /**\n * Gets the footer table element of the Grid.\n * @return {Element}\n */\n Grid.prototype.getFooterContentTable = function () {\n this.footerElement = this.element.getElementsByClassName('e-gridfooter')[0];\n return this.footerElement.firstChild.firstChild;\n };\n /**\n * Gets the pager of the Grid.\n * @return {Element}\n */\n Grid.prototype.getPager = function () {\n return this.gridPager; //get element from pager\n };\n /**\n * Sets the pager of the Grid to replace the old pager.\n * @param {Element} element - Specifies the Grid pager.\n * @return {void}\n */\n Grid.prototype.setGridPager = function (element) {\n this.gridPager = element;\n };\n /**\n * Gets a row by index.\n * @param {number} index - Specifies the row index.\n * @return {Element}\n */\n Grid.prototype.getRowByIndex = function (index) {\n return this.contentModule.getRowByIndex(index);\n };\n /**\n * Gets a movable tables row by index.\n * @param {number} index - Specifies the row index.\n * @return {Element}\n */\n Grid.prototype.getMovableRowByIndex = function (index) {\n return this.contentModule.getMovableRowByIndex(index);\n };\n /**\n * Gets a frozen tables row by index.\n * @param {number} index - Specifies the row index.\n * @return {Element}\n */\n Grid.prototype.getFrozenRowByIndex = function (index) {\n return this.getFrozenDataRows()[index];\n };\n /**\n * Gets all the data rows of the Grid.\n * @return {Element[]}\n */\n Grid.prototype.getRows = function () {\n return this.contentModule.getRowElements();\n };\n /**\n * Gets a frozen right tables row element by index.\n * @param {number} index - Specifies the row index.\n * @return {Element}\n */\n Grid.prototype.getFrozenRightRowByIndex = function (index) {\n return this.contentModule.getFrozenRightRowByIndex(index);\n };\n /**\n * Get a row information based on cell\n * @param {Element}\n * @return RowInfo\n */\n Grid.prototype.getRowInfo = function (target) {\n var ele = target;\n var args = { target: target };\n if (!isNullOrUndefined(target) && isNullOrUndefined(parentsUntil(ele, 'e-detailrowcollapse')\n && isNullOrUndefined(parentsUntil(ele, 'e-recordplusexpand')))) {\n var cell = closest(ele, '.e-rowcell');\n if (!cell) {\n var row = closest(ele, '.e-row');\n if (!isNullOrUndefined(row)) {\n var rowObj = this.getRowObjectFromUID(row.getAttribute('data-uid'));\n var rowIndex = parseInt(row.getAttribute('aria-rowindex'), 10);\n args = { row: row, rowData: rowObj.data, rowIndex: rowIndex };\n }\n return args;\n }\n var cellIndex = parseInt(cell.getAttribute('aria-colindex'), 10);\n if (!isNullOrUndefined(cell) && !isNaN(cellIndex)) {\n var row_1 = closest(cell, '.e-row');\n var rowIndex = parseInt(row_1.getAttribute('aria-rowindex'), 10);\n var frzCols = this.getFrozenColumns();\n var tableName = this.columnModel[cellIndex].getFreezeTableName();\n var rows = this.contentModule.getRows();\n var index = cellIndex + this.getIndentCount();\n if (this.isFrozenGrid()) {\n if (tableName === 'frozen-left') {\n rows = this.contentModule.getRows();\n }\n else if (tableName === 'movable') {\n index = cellIndex - frzCols - this.frozenLeftCount;\n rows = this.contentModule.getMovableRows();\n }\n else if (tableName === 'frozen-right') {\n index = cellIndex - (this.frozenLeftCount + this.movableCount);\n rows = this.contentModule.getFrozenRightRows();\n }\n }\n var rowsObject = rows.filter(function (r) { return r.uid === row_1.getAttribute('data-uid'); });\n var rowData = {};\n var column = void 0;\n if (Object.keys(rowsObject).length) {\n rowData = rowsObject[0].data;\n column = rowsObject[0].cells[index].column;\n }\n args = { cell: cell, cellIndex: cellIndex, row: row_1, rowIndex: rowIndex, rowData: rowData, column: column, target: target };\n }\n }\n return args;\n };\n /**\n * Gets the Grid's movable content rows from frozen grid.\n * @return {Element[]}\n */\n Grid.prototype.getMovableRows = function () {\n return this.contentModule.getMovableRowElements();\n };\n /**\n * Gets the Grid's frozen right content rows from frozen grid.\n * @return {Element[]}\n */\n Grid.prototype.getFrozenRightRows = function () {\n return this.contentModule.getFrozenRightRowElements();\n };\n /**\n * Gets all the Grid's data rows.\n * @return {Element[]}\n */\n Grid.prototype.getDataRows = function () {\n return this.getAllDataRows();\n };\n /**\n * @hidden\n */\n Grid.prototype.getAllDataRows = function (includeAdd) {\n if (isNullOrUndefined(this.getContentTable().querySelector('tbody'))) {\n return [];\n }\n var tbody = this.isFrozenGrid() ? this.getFrozenLeftContentTbody() : this.getContentTable().querySelector('tbody');\n var rows = [].slice.call(tbody.children);\n if (this.frozenRows) {\n var hdrTbody = this.isFrozenGrid() ? this.getHeaderContent().querySelector('.e-frozenheader').querySelector('tbody')\n : this.getHeaderTable().querySelector('tbody');\n var freezeRows = [].slice.call(hdrTbody.children);\n rows = this.addMovableRows(freezeRows, rows);\n }\n var dataRows = this.generateDataRows(rows, includeAdd);\n return dataRows;\n };\n /**\n * @hidden\n */\n Grid.prototype.addMovableRows = function (fRows, mrows) {\n for (var i = 0, len = mrows.length; i < len; i++) {\n fRows.push(mrows[i]);\n }\n return fRows;\n };\n Grid.prototype.generateDataRows = function (rows, includAdd) {\n var dRows = [];\n for (var i = 0, len = rows.length; i < len; i++) {\n if (rows[i].classList.contains('e-row') && (!rows[i].classList.contains('e-hiddenrow') || includAdd)) {\n if (this.isCollapseStateEnabled()) {\n dRows[parseInt(rows[i].getAttribute(\"aria-rowindex\"))] = rows[i];\n }\n else {\n dRows.push(rows[i]);\n }\n }\n }\n return dRows;\n };\n /**\n * Gets all the Grid's movable table data rows.\n * @return {Element[]}\n */\n Grid.prototype.getMovableDataRows = function () {\n return this.getAllMovableDataRows();\n };\n /**\n * @hidden\n */\n Grid.prototype.getAllMovableDataRows = function (includeAdd) {\n if (!this.isFrozenGrid()) {\n return [];\n }\n var rows = [].slice.call(this.getContent().querySelector('.e-movablecontent').querySelector('tbody').children);\n if (this.frozenRows) {\n var freezeRows = [].slice.call(this.getHeaderContent().querySelector('.e-movableheader').querySelector('tbody').children);\n rows = this.addMovableRows(freezeRows, rows);\n }\n var dataRows = this.generateDataRows(rows, includeAdd);\n return dataRows;\n };\n /**\n * Gets all the Grid's frozen table data rows.\n * @return {Element[]}\n */\n Grid.prototype.getFrozenDataRows = function () {\n return this.getAllFrozenDataRows();\n };\n /**\n * @hidden\n */\n Grid.prototype.getAllFrozenDataRows = function (includeAdd) {\n var rows = [].slice.call(this.getContent().querySelector('.e-frozencontent').querySelector('tbody').children);\n if (this.frozenRows) {\n var freezeRows = [].slice.call(this.getHeaderContent().querySelector('.e-frozenheader').querySelector('tbody').children);\n rows = this.addMovableRows(freezeRows, rows);\n }\n var dataRows = this.generateDataRows(rows, includeAdd);\n return dataRows;\n };\n /**\n * Gets all the Grid's frozen right table data rows.\n * @return {Element[]}\n */\n Grid.prototype.getFrozenRightDataRows = function () {\n return this.getAllFrozenRightDataRows();\n };\n /**\n * @hidden\n */\n Grid.prototype.getAllFrozenRightDataRows = function (includeAdd) {\n if (this.getFrozenMode() !== 'Right' && this.getFrozenMode() !== 'Left-Right') {\n return [];\n }\n var rows = [].slice.call(this.getContent().querySelector('.e-frozen-right-content').querySelector('tbody').children);\n if (this.frozenRows) {\n var freezeRows = [].slice.call(this.getHeaderContent().querySelector('.e-frozen-right-header').querySelector('tbody').children);\n rows = this.addMovableRows(freezeRows, rows);\n }\n var dataRows = this.generateDataRows(rows, includeAdd);\n return dataRows;\n };\n /**\n * Updates particular cell value based on the given primary key value.\n * > Primary key column must be specified using `columns.isPrimaryKey` property.\n * @param {string| number} key - Specifies the PrimaryKey value of dataSource.\n * @param {string } field - Specifies the field name which you want to update.\n * @param {string | number | boolean | Date} value - To update new value for the particular cell.\n */\n Grid.prototype.setCellValue = function (key, field, value) {\n var cells = 'cells';\n var rowData = 'data';\n var rowIdx = 'index';\n var rowuID = 'uid';\n var fieldIdx;\n var col;\n var tr;\n var mTr;\n var pkName = this.getPrimaryKeyFieldNames()[0];\n var cell = new CellRenderer(this, this.serviceLocator);\n var selectedRow = {};\n var movableSelectedRow = {};\n var rowObjects = this.contentModule.getRows();\n var movableRowObjects = this.contentModule.getMovableRows();\n fieldIdx = this.getColumnIndexByField(field);\n if (this.groupSettings.columns.length) {\n fieldIdx = fieldIdx + this.groupSettings.columns.length;\n }\n if (this.childGrid || this.detailTemplate) {\n fieldIdx++;\n }\n if (this.isRowDragable()) {\n fieldIdx++;\n }\n col = this.getColumnByField(field);\n selectedRow = rowObjects.filter(function (r) {\n return getValue(pkName, r.data) === key;\n })[0];\n movableSelectedRow = movableRowObjects.filter(function (r) {\n return getValue(pkName, r.data) === key;\n })[0];\n tr = !isNullOrUndefined(selectedRow) ? this.element.querySelector('[data-uid=' + selectedRow[rowuID] + ']') : null;\n mTr = !isNullOrUndefined(movableSelectedRow) ? this.element.querySelector('[data-uid=' + movableSelectedRow[rowuID] + ']') : null;\n if (!isNullOrUndefined(tr)) {\n setValue(field, value, selectedRow[rowData]);\n var td = !isNullOrUndefined(tr[cells][fieldIdx]) ?\n tr[cells][fieldIdx] : mTr[cells][fieldIdx - this.frozenColumns];\n if (!isNullOrUndefined(td)) {\n var sRow = selectedRow[cells][fieldIdx];\n var mRow = void 0;\n if (this.frozenColumns) {\n mRow = movableSelectedRow[cells][fieldIdx - this.frozenColumns];\n }\n cell.refreshTD(td, !isNullOrUndefined(sRow) ? sRow : mRow, selectedRow[rowData], { index: selectedRow[rowIdx] });\n if (this.aggregates.length > 0) {\n this.notify(events.refreshFooterRenderer, {});\n if (this.groupSettings.columns.length > 0) {\n this.notify(events.groupAggregates, {});\n }\n }\n /* tslint:disable:no-string-literal */\n if (!isNullOrUndefined(movableSelectedRow) && !isNullOrUndefined(movableSelectedRow['changes'])) {\n movableSelectedRow['changes'][field] = value;\n }\n /* tslint:disable:no-string-literal */\n this.trigger(events.queryCellInfo, {\n cell: td, column: col, data: selectedRow[rowData]\n });\n }\n }\n else {\n return;\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.refreshReactColumnTemplateByUid = function (columnUid) {\n var _this = this;\n if (this.isReact) {\n //tslint:disable-next-line:no-any\n this.clearTemplate(['columnTemplate'], undefined, function () {\n var cells = 'cells';\n var rowIdx = 'index';\n var rowsObj = _this.getRowsObject();\n var indent = _this.getIndentCount();\n var cellIndex = _this.getNormalizedColumnIndex(columnUid);\n for (var j = 0; j < rowsObj.length; j++) {\n if (rowsObj[j].isDataRow && !isNullOrUndefined(rowsObj[j].index)) {\n var cell = rowsObj[j][cells][cellIndex];\n var cellRenderer = new CellRenderer(_this, _this.serviceLocator);\n var td = _this.getCellFromIndex(rowsObj[j].index, cellIndex - indent);\n cellRenderer.refreshTD(td, cell, rowsObj[j].data, { index: rowsObj[j][rowIdx] });\n }\n }\n });\n }\n };\n /**\n * Updates and refresh the particular row values based on the given primary key value.\n * > Primary key column must be specified using `columns.isPrimaryKey` property.\n * @param {string| number} key - Specifies the PrimaryKey value of dataSource.\n * @param {Object} rowData - To update new data for the particular row.\n */\n Grid.prototype.setRowData = function (key, rowData) {\n var rwdata = 'data';\n var rowuID = 'uid';\n var rowObjects = this.contentModule.getRows();\n var selectedRow;\n var pkName = this.getPrimaryKeyFieldNames()[0];\n var rowRenderer = new RowRenderer(this.serviceLocator, null, this);\n if (this.groupSettings.columns.length > 0 && this.aggregates.length > 0) {\n rowObjects = rowObjects.filter(function (row) { return row.isDataRow; });\n }\n selectedRow = rowObjects.filter(function (r) {\n return getValue(pkName, r.data) === key;\n })[0];\n if (!isNullOrUndefined(selectedRow) && this.element.querySelectorAll('[data-uid=' + selectedRow[rowuID] + ']').length) {\n selectedRow.changes = rowData;\n refreshForeignData(selectedRow, this.getForeignKeyColumns(), selectedRow.changes);\n rowRenderer.refresh(selectedRow, this.getColumns(), true);\n if (this.aggregates.length > 0) {\n this.notify(events.refreshFooterRenderer, {});\n if (this.groupSettings.columns.length > 0) {\n this.notify(events.groupAggregates, {});\n }\n }\n }\n else {\n return;\n }\n };\n /**\n * Gets a cell by row and column index.\n * @param {number} rowIndex - Specifies the row index.\n * @param {number} columnIndex - Specifies the column index.\n * @return {Element}\n */\n Grid.prototype.getCellFromIndex = function (rowIndex, columnIndex) {\n var col = this.getColumnByIndex(columnIndex);\n return getCellByColAndRowIndex(this, col, rowIndex, columnIndex);\n };\n /**\n * Gets a movable table cell by row and column index.\n * @param {number} rowIndex - Specifies the row index.\n * @param {number} columnIndex - Specifies the column index.\n * @return {Element}\n */\n Grid.prototype.getMovableCellFromIndex = function (rowIndex, columnIndex) {\n if (this.frozenName === 'Left-Right' && columnIndex >= this.movableCount) {\n return undefined;\n }\n var index = this.getFrozenColumns() || this.getFrozenLeftColumnsCount();\n return this.getMovableDataRows()[rowIndex] &&\n this.getMovableDataRows()[rowIndex].querySelectorAll('.e-rowcell')[columnIndex - index];\n };\n /**\n * Gets a frozen right table cell by row and column index.\n * @param {number} rowIndex - Specifies the row index.\n * @param {number} columnIndex - Specifies the column index.\n * @return {Element}\n */\n Grid.prototype.getFrozenRightCellFromIndex = function (rowIndex, columnIndex) {\n var index = this.getFrozenLeftColumnsCount() + this.getMovableColumnsCount();\n var rows = this.getFrozenRightDataRows();\n return rows[rowIndex] && rows[rowIndex].querySelectorAll('.e-rowcell')[columnIndex - index];\n };\n /**\n * Gets a column header by column index.\n * @param {number} index - Specifies the column index.\n * @return {Element}\n */\n Grid.prototype.getColumnHeaderByIndex = function (index) {\n return this.getHeaderTable().querySelectorAll('.e-headercell')[index];\n };\n /**\n * Gets a movable column header by column index.\n * @param {number} index - Specifies the column index.\n * @return {Element}\n */\n Grid.prototype.getMovableColumnHeaderByIndex = function (index) {\n var left = this.getFrozenColumns() || this.getFrozenLeftColumnsCount();\n return this.getMovableVirtualHeader().querySelectorAll('.e-headercell')[index - left];\n };\n /**\n * Gets a frozen right column header by column index.\n * @param {number} index - Specifies the column index.\n * @return {Element}\n */\n Grid.prototype.getFrozenRightColumnHeaderByIndex = function (index) {\n var left = this.getFrozenLeftColumnsCount() + this.getMovableColumnsCount();\n return this.getFrozenRightHeader().querySelectorAll('.e-headercell')[index - left];\n };\n /**\n * Gets a frozen left column header by column index.\n * @param {number} index - Specifies the column index.\n * @return {Element}\n */\n Grid.prototype.getFrozenLeftColumnHeaderByIndex = function (index) {\n return this.getFrozenVirtualHeader().querySelectorAll('.e-headercell')[index];\n };\n /**\n * @hidden\n */\n Grid.prototype.getRowObjectFromUID = function (uid, isMovable, isFrozenRight) {\n var rows = this.contentModule.getRows();\n var row = this.rowObject(rows, uid);\n if (this.isFrozenGrid()) {\n if (!row || isMovable || isFrozenRight) {\n row = this.rowObject(this.contentModule.getMovableRows(), uid);\n if ((!row && this.getFrozenMode() === 'Left-Right') || isFrozenRight) {\n row = this.rowObject(this.contentModule.getFrozenRightRows(), uid);\n }\n return row;\n }\n }\n if (isNullOrUndefined(row) && this.enableVirtualization && this.groupSettings.columns.length > 0) {\n row = this.rowObject(this.vRows, uid);\n return row;\n }\n return row;\n };\n Grid.prototype.rowObject = function (rows, uid) {\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n if (row.uid === uid) {\n return row;\n }\n }\n return null;\n };\n /**\n * @hidden\n */\n Grid.prototype.getRowsObject = function () {\n return this.contentModule.getRows();\n };\n /**\n * @hidden\n */\n Grid.prototype.getMovableRowsObject = function () {\n var rows = [];\n if (this.isFrozenGrid()) {\n rows = this.contentModule.getMovableRows();\n }\n return rows;\n };\n /**\n * @hidden\n */\n Grid.prototype.getFrozenRightRowsObject = function () {\n var rows = [];\n if (this.getFrozenMode() === 'Right' || this.getFrozenMode() === 'Left-Right') {\n rows = this.contentModule.getFrozenRightRows();\n }\n return rows;\n };\n /**\n * Gets a column header by column name.\n * @param {string} field - Specifies the column name.\n * @return {Element}\n */\n Grid.prototype.getColumnHeaderByField = function (field) {\n var column = this.getColumnByField(field);\n return column ? this.getColumnHeaderByUid(column.uid) : undefined;\n };\n /**\n * Gets a column header by UID.\n * @param {string} field - Specifies the column uid.\n * @return {Element}\n */\n Grid.prototype.getColumnHeaderByUid = function (uid) {\n var element = this.getHeaderContent().querySelector('[e-mappinguid=' + uid + ']');\n return element ? element.parentElement : undefined;\n };\n /**\n * @hidden\n * @blazorType GridColumn\n */\n Grid.prototype.getColumnByIndex = function (index) {\n var column;\n this.getColumns().some(function (col, i) {\n column = col;\n return i === index;\n });\n return column;\n };\n /**\n * Gets a Column by column name.\n * @param {string} field - Specifies the column name.\n * @return {Column}\n * @blazorType GridColumn\n */\n Grid.prototype.getColumnByField = function (field) {\n return iterateArrayOrObject(this.getColumns(), function (item, index) {\n if (item.field === field) {\n return item;\n }\n return undefined;\n })[0];\n };\n /**\n * Gets a column index by column name.\n * @param {string} field - Specifies the column name.\n * @return {number}\n */\n Grid.prototype.getColumnIndexByField = function (field) {\n var cols = this.getColumns();\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].field === field) {\n return i;\n }\n }\n return -1;\n };\n /**\n * Gets a column by UID.\n * @param {string} uid - Specifies the column UID.\n * @return {Column}\n * @blazorType GridColumn\n */\n Grid.prototype.getColumnByUid = function (uid) {\n return iterateArrayOrObject(this.getColumns().concat(this.getStackedColumns(this.columns)), function (item, index) {\n if (item.uid === uid) {\n return item;\n }\n return undefined;\n })[0];\n };\n /**\n * @hidden\n */\n Grid.prototype.getStackedColumns = function (columns, stackedColumn) {\n if (stackedColumn === void 0) { stackedColumn = []; }\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var column = columns_1[_i];\n if (column.columns) {\n stackedColumn.push(column);\n this.getStackedColumns(column.columns, stackedColumn);\n }\n }\n return stackedColumn;\n };\n /**\n * Gets a column index by UID.\n * @param {string} uid - Specifies the column UID.\n * @return {number}\n */\n Grid.prototype.getColumnIndexByUid = function (uid) {\n var index = iterateArrayOrObject(this.getColumns(), function (item, index) {\n if (item.uid === uid) {\n return index;\n }\n return undefined;\n })[0];\n return !isNullOrUndefined(index) ? index : -1;\n };\n /**\n * Gets UID by column name.\n * @param {string} field - Specifies the column name.\n * @return {string}\n */\n Grid.prototype.getUidByColumnField = function (field) {\n return iterateArrayOrObject(this.getColumns(), function (item, index) {\n if (item.field === field) {\n return item.uid;\n }\n return undefined;\n })[0];\n };\n /**\n * Gets TH index by column uid value.\n * @private\n * @param {string} uid - Specifies the column uid.\n * @return {number}\n */\n Grid.prototype.getNormalizedColumnIndex = function (uid) {\n var index = this.getColumnIndexByUid(uid);\n return index + this.getIndentCount();\n };\n /**\n * Gets indent cell count.\n * @private\n * @return {number}\n */\n Grid.prototype.getIndentCount = function () {\n var index = 0;\n if (this.allowGrouping) {\n index += this.groupSettings.columns.length;\n }\n if (this.isDetail()) {\n index++;\n }\n if (this.isRowDragable() && isNullOrUndefined(this.rowDropSettings.targetID)) {\n index++;\n }\n /**\n * TODO: index normalization based on the stacked header, grouping and detailTemplate\n * and frozen should be handled here\n */\n return index;\n };\n /**\n * Gets the collection of column fields.\n * @return {string[]}\n */\n Grid.prototype.getColumnFieldNames = function () {\n var columnNames = [];\n var column;\n for (var i = 0, len = this.getColumns().length; i < len; i++) {\n column = this.getColumns()[i];\n if (column.visible) {\n columnNames.push(column.field);\n }\n }\n return columnNames;\n };\n /**\n * Gets a compiled row template.\n * @return {Function}\n * @private\n */\n Grid.prototype.getRowTemplate = function () {\n return this.rowTemplateFn;\n };\n /**\n * Gets a compiled detail row template.\n * @private\n * @return {Function}\n */\n Grid.prototype.getDetailTemplate = function () {\n return this.detailTemplateFn;\n };\n /**\n * Gets a compiled detail row template.\n * @private\n * @return {Function}\n */\n Grid.prototype.getEditTemplate = function () {\n return this.editTemplateFn;\n };\n /**\n * Gets a compiled dialog edit header template.\n * @private\n * @return {Function}\n */\n Grid.prototype.getEditHeaderTemplate = function () {\n return this.editHeaderTemplateFn;\n };\n /**\n * Gets a compiled dialog edit footer template.\n * @private\n * @return {Function}\n */\n Grid.prototype.getEditFooterTemplate = function () {\n return this.editFooterTemplateFn;\n };\n /**\n * Get the names of the primary key columns of the Grid.\n * @return {string[]}\n */\n Grid.prototype.getPrimaryKeyFieldNames = function () {\n var keys = [];\n for (var k = 0; k < this.columnModel.length; k++) {\n if (this.columnModel[k].isPrimaryKey) {\n keys.push(this.columnModel[k].field);\n }\n }\n return keys;\n };\n /**\n * Refreshes the Grid header and content.\n */\n Grid.prototype.refresh = function () {\n if (!this.isDestroyed) {\n this.headerModule.refreshUI();\n this.updateStackedFilter();\n this.renderModule.refresh();\n }\n };\n /**\n * Refreshes the Grid header.\n */\n Grid.prototype.refreshHeader = function () {\n this.headerModule.refreshUI();\n };\n /**\n * Gets the collection of selected rows.\n * @return {Element[]}\n */\n Grid.prototype.getSelectedRows = function () {\n return this.selectionModule ? this.selectionModule.selectedRecords : [];\n };\n /**\n * Gets the collection of selected row indexes.\n * @return {number[]}\n */\n Grid.prototype.getSelectedRowIndexes = function () {\n return this.selectionModule ? this.selectionModule.selectedRowIndexes : [];\n };\n /**\n * Gets the collection of selected row and cell indexes.\n * @return {number[]}\n */\n Grid.prototype.getSelectedRowCellIndexes = function () {\n return this.selectionModule ? this.selectionModule.selectedRowCellIndexes : [];\n };\n /**\n * Gets the collection of selected records.\n * @return {Object[]}\n * @isGenericType true\n */\n Grid.prototype.getSelectedRecords = function () {\n return this.selectionModule ? this.selectionModule.getSelectedRecords() : [];\n };\n /**\n * Gets the collection of selected columns uid.\n * @return {string[]}\n * @isGenericType true\n */\n Grid.prototype.getSelectedColumnsUid = function () {\n var _this = this;\n var uid = [];\n if (this.selectionModule) {\n this.selectionModule.selectedColumnsIndexes.filter(function (i) { return uid.push(_this.getColumns()[i].uid); });\n }\n return uid;\n };\n /**\n * Gets the data module.\n * @return {Data}\n */\n Grid.prototype.getDataModule = function () {\n return this.renderModule.data;\n };\n /**\n * Shows a column by its column name.\n * @param {string|string[]} keys - Defines a single or collection of column names.\n * @param {string} showBy - Defines the column key either as field name or header text.\n * @return {void}\n */\n Grid.prototype.showColumns = function (keys, showBy) {\n showBy = showBy ? showBy : 'headerText';\n this.showHider.show(keys, showBy);\n };\n /**\n * Hides a column by column name.\n * @param {string|string[]} keys - Defines a single or collection of column names.\n * @param {string} hideBy - Defines the column key either as field name or header text.\n * @return {void}\n */\n Grid.prototype.hideColumns = function (keys, hideBy) {\n hideBy = hideBy ? hideBy : 'headerText';\n this.showHider.hide(keys, hideBy);\n };\n /**\n * @hidden\n */\n Grid.prototype.getFrozenColumns = function () {\n return this.frozenColumns + this.getFrozenCount(this.columns, 0, 0);\n };\n /**\n * @hidden\n */\n Grid.prototype.getFrozenRightColumnsCount = function () {\n return this.frozenRightCount;\n };\n /**\n * @hidden\n */\n Grid.prototype.getFrozenLeftColumnsCount = function () {\n return this.frozenLeftCount;\n };\n /**\n * @hidden\n */\n Grid.prototype.getMovableColumnsCount = function () {\n return this.movableCount;\n };\n /**\n * @hidden\n */\n Grid.prototype.setFrozenCount = function () {\n this.frozenLeftCount = this.frozenRightCount = this.movableCount = 0;\n this.visibleFrozenLeft = this.visibleFrozenRight = this.visibleMovable = 0;\n this.frozenLeftColumns = [];\n this.frozenRightColumns = [];\n this.movableColumns = [];\n this.splitFrozenCount(this.columns);\n if (this.frozenColumns && (this.frozenLeftCount || this.frozenRightCount)) {\n this.setProperties({ frozenColumns: 0 }, true);\n }\n this.setTablesCount();\n if (this.frozenLeftCount && !this.frozenRightCount) {\n this.frozenName = 'Left';\n }\n else if (this.frozenRightCount && !this.frozenLeftCount) {\n this.frozenName = 'Right';\n }\n else if (this.frozenLeftCount && this.frozenRightCount) {\n this.frozenName = 'Left-Right';\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.getVisibleFrozenLeftCount = function () {\n return this.visibleFrozenLeft;\n };\n /**\n * @hidden\n */\n Grid.prototype.getVisibleFrozenRightCount = function () {\n return this.visibleFrozenRight;\n };\n /**\n * @hidden\n */\n Grid.prototype.getVisibleMovableCount = function () {\n return this.visibleMovable;\n };\n /**\n * @hidden\n */\n Grid.prototype.getFrozenRightColumns = function () {\n return this.frozenRightColumns;\n };\n /**\n * @hidden\n */\n Grid.prototype.getFrozenLeftColumns = function () {\n return this.frozenLeftColumns;\n };\n /**\n * @hidden\n */\n Grid.prototype.getMovableColumns = function () {\n return this.movableColumns;\n };\n Grid.prototype.splitFrozenCount = function (columns) {\n for (var i = 0; i < columns.length; i++) {\n if (columns[i].columns) {\n this.splitFrozenCount(columns[i].columns);\n }\n else {\n if (columns[i].freeze === 'Right') {\n if (columns[i].visible !== false) {\n this.visibleFrozenRight++;\n }\n ;\n this.frozenRightColumns.push(columns[i]);\n this.frozenRightCount++;\n }\n else if (columns[i].freeze === 'Left') {\n if (columns[i].visible !== false) {\n this.visibleFrozenLeft++;\n }\n ;\n this.frozenLeftColumns.push(columns[i]);\n this.frozenLeftCount++;\n }\n else {\n if (columns[i].visible !== false) {\n this.visibleMovable++;\n }\n ;\n this.movableColumns.push(columns[i]);\n this.movableCount++;\n }\n }\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.getVisibleFrozenColumns = function () {\n return this.getVisibleFrozenColumnsCount() + this.getVisibleFrozenCount(this.columns, 0);\n };\n /**\n * Get the current Filter operator and field.\n * @return {Object}\n */\n Grid.prototype.getFilterUIInfo = function () {\n return this.filterModule ? this.filterModule.getFilterUIInfo() : {};\n };\n Grid.prototype.getVisibleFrozenColumnsCount = function () {\n var visibleFrozenColumns = 0;\n var columns = this.columnModel;\n for (var i = 0; i < this.frozenColumns; i++) {\n if (columns[i].visible) {\n visibleFrozenColumns++;\n }\n }\n if (this.frozenLeftCount || this.frozenRightCount) {\n for (var i = 0; i < columns.length; i++) {\n if (columns[i].visible && (columns[i].freeze === 'Left' || columns[i].freeze === 'Right')) {\n visibleFrozenColumns++;\n }\n }\n }\n return visibleFrozenColumns;\n };\n Grid.prototype.getVisibleFrozenCount = function (cols, cnt) {\n if (!this.frozenLeftCount && !this.frozenRightCount) {\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[i].columns) {\n cnt = this.getVisibleFrozenCount(cols[i].columns, cnt);\n }\n else {\n if (cols[i].isFrozen && cols[i].visible) {\n cnt++;\n }\n }\n }\n }\n return cnt;\n };\n Grid.prototype.getFrozenCount = function (cols, cnt, index) {\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[i].columns) {\n cnt = this.getFrozenCount(cols[i].columns, cnt, index);\n }\n else {\n if (cols[i].isFrozen && index > this.frozenColumns - 1) {\n cnt++;\n }\n index++;\n }\n }\n return cnt;\n };\n /**\n * Navigates to the specified target page.\n * @param {number} pageNo - Defines the page number to navigate.\n * @return {void}\n */\n Grid.prototype.goToPage = function (pageNo) {\n if (this.pagerModule) {\n this.pagerModule.goToPage(pageNo);\n }\n };\n /**\n * Defines the text of external message.\n * @param {string} message - Defines the message to update.\n * @return {void}\n */\n Grid.prototype.updateExternalMessage = function (message) {\n if (this.pagerModule) {\n this.pagerModule.updateExternalMessage(message);\n }\n };\n /**\n * Sorts a column with the given options.\n * @param {string} columnName - Defines the column name to be sorted.\n * @param {SortDirection} direction - Defines the direction of sorting field.\n * @param {boolean} isMultiSort - Specifies whether the previous sorted columns are to be maintained.\n * @return {void}\n */\n Grid.prototype.sortColumn = function (columnName, direction, isMultiSort) {\n if (this.sortModule) {\n this.sortModule.sortColumn(columnName, direction, isMultiSort);\n }\n };\n /**\n * Clears all the sorted columns of the Grid.\n * @return {void}\n */\n Grid.prototype.clearSorting = function () {\n if (this.sortModule) {\n this.sortModule.clearSorting();\n }\n };\n /**\n * Remove sorted column by field name.\n * @param {string} field - Defines the column field name to remove sort.\n * @return {void}\n * @hidden\n */\n Grid.prototype.removeSortColumn = function (field) {\n if (this.sortModule) {\n this.sortModule.removeSortColumn(field);\n }\n };\n /**\n * Filters grid row by column name with the given options.\n * @param {string} fieldName - Defines the field name of the column.\n * @param {string} filterOperator - Defines the operator to filter records.\n * @param {string | number | Date | boolean} filterValue - Defines the value used to filter records.\n * @param {string} predicate - Defines the relationship between one filter query and another by using AND or OR predicate.\n * @param {boolean} matchCase - If match case is set to true, the grid filters the records with exact match. if false, it filters case\n * insensitive records (uppercase and lowercase letters treated the same).\n * @param {boolean} ignoreAccent - If ignoreAccent set to true,\n * then filter ignores the diacritic characters or accents while filtering.\n * @param {string} actualFilterValue - Defines the actual filter value for the filter column.\n * @param {string} actualOperator - Defines the actual filter operator for the filter column.\n * @return {void}\n */\n Grid.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {\n if (this.filterModule) {\n this.filterModule.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);\n }\n };\n /**\n * Clears all the filtered rows of the Grid.\n * @return {void}\n */\n Grid.prototype.clearFiltering = function (fields) {\n if (this.filterModule) {\n this.filterModule.clearFiltering(fields);\n }\n };\n /**\n * Removes filtered column by field name.\n * @param {string} field - Defines column field name to remove filter.\n * @param {boolean} isClearFilterBar - Specifies whether the filter bar value needs to be cleared.\n * @return {void}\n * @hidden\n */\n Grid.prototype.removeFilteredColsByField = function (field, isClearFilterBar) {\n if (this.filterModule) {\n this.filterModule.removeFilteredColsByField(field, isClearFilterBar);\n }\n };\n /**\n * Selects a row by given index.\n * @param {number} index - Defines the row index.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n * @return {void}\n */\n Grid.prototype.selectRow = function (index, isToggle) {\n if (this.selectionModule) {\n this.selectionModule.selectRow(index, isToggle);\n }\n };\n /**\n * Selects a collection of rows by indexes.\n * @param {number[]} rowIndexes - Specifies the row indexes.\n * @return {void}\n */\n Grid.prototype.selectRows = function (rowIndexes) {\n if (this.selectionModule) {\n this.selectionModule.selectRows(rowIndexes);\n }\n };\n /**\n * Deselects the current selected rows and cells.\n * @return {void}\n */\n Grid.prototype.clearSelection = function () {\n if (this.selectionModule) {\n this.selectionModule.clearSelection();\n }\n };\n /**\n * Selects a cell by the given index.\n * @param {IIndex} cellIndex - Defines the row and column indexes.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n * @return {void}\n */\n Grid.prototype.selectCell = function (cellIndex, isToggle) {\n if (this.selectionModule) {\n this.selectionModule.selectCell(cellIndex, isToggle);\n }\n };\n /**\n * Selects a range of cells from start and end indexes.\n * @param {IIndex} startIndex - Specifies the row and column's start index.\n * @param {IIndex} endIndex - Specifies the row and column's end index.\n * @return {void}\n */\n Grid.prototype.selectCellsByRange = function (startIndex, endIndex) {\n this.selectionModule.selectCellsByRange(startIndex, endIndex);\n };\n /**\n * Searches Grid records using the given key.\n * You can customize the default search option by using the\n * [`searchSettings`](./#searchsettings/).\n * @param {string} searchString - Defines the key.\n * @return {void}\n */\n Grid.prototype.search = function (searchString) {\n if (this.searchModule) {\n this.searchModule.search(searchString);\n }\n };\n /**\n * By default, prints all the pages of the Grid and hides the pager.\n * > You can customize print options using the\n * [`printMode`](./#printmode).\n * @return {void}\n */\n Grid.prototype.print = function () {\n if (this.printModule) {\n this.printModule.print();\n }\n };\n /**\n * Delete a record with Given options. If fieldname and data is not given then grid will delete the selected record.\n * > `editSettings.allowDeleting` should be true.\n * @param {string} fieldname - Defines the primary key field, 'Name of the column'.\n * @param {Object} data - Defines the JSON data of the record to be deleted.\n */\n Grid.prototype.deleteRecord = function (fieldname, data) {\n if (this.editModule) {\n this.editModule.deleteRecord(fieldname, data);\n }\n };\n /**\n * Starts edit the selected row. At least one row must be selected before invoking this method.\n * `editSettings.allowEditing` should be true.\n * {% codeBlock src='grid/startEdit/index.md' %}{% endcodeBlock %}\n * @return {void}\n */\n Grid.prototype.startEdit = function () {\n if (this.editModule) {\n this.editModule.startEdit();\n }\n };\n /**\n * If Grid is in editable state, you can save a record by invoking endEdit.\n */\n Grid.prototype.endEdit = function () {\n if (this.editModule) {\n this.editModule.endEdit();\n }\n };\n /**\n * Cancels edited state.\n */\n Grid.prototype.closeEdit = function () {\n if (this.editModule) {\n this.editModule.closeEdit();\n }\n };\n /**\n * Adds a new record to the Grid. Without passing parameters, it adds empty rows.\n * > `editSettings.allowEditing` should be true.\n * @param {Object} data - Defines the new add record data.\n * @param {number} index - Defines the row index to be added\n */\n Grid.prototype.addRecord = function (data, index) {\n if (this.editModule) {\n this.editModule.addRecord(data, index);\n }\n };\n /**\n * Delete any visible row by TR element.\n * @param {HTMLTableRowElement} tr - Defines the table row element.\n */\n Grid.prototype.deleteRow = function (tr) {\n if (this.editModule) {\n this.editModule.deleteRow(tr);\n }\n };\n /**\n * Changes a particular cell into edited state based on the row index and field name provided in the `batch` mode.\n * @param {number} index - Defines row index to edit a particular cell.\n * @param {string} field - Defines the field name of the column to perform batch edit.\n */\n Grid.prototype.editCell = function (index, field) {\n if (this.editModule) {\n this.editModule.editCell(index, field);\n }\n };\n /**\n * Saves the cell that is currently edited. It does not save the value to the DataSource.\n * {% codeBlock src='grid/saveCell/index.md' %}{% endcodeBlock %}\n */\n Grid.prototype.saveCell = function () {\n if (this.editModule) {\n this.editModule.saveCell();\n }\n };\n /**\n * To update the specified cell by given value without changing into edited state.\n * @param {number} rowIndex Defines the row index.\n * @param {string} field Defines the column field.\n * @param {string | number | boolean | Date} value - Defines the value to be changed.\n */\n Grid.prototype.updateCell = function (rowIndex, field, value) {\n if (this.editModule) {\n this.editModule.updateCell(rowIndex, field, value);\n }\n };\n /**\n * To update the specified row by given values without changing into edited state.\n * @param {number} index Defines the row index.\n * @param {Object} data Defines the data object to be updated.\n * {% codeBlock src='grid/updateRow/index.md' %}{% endcodeBlock %}\n */\n Grid.prototype.updateRow = function (index, data) {\n if (this.editModule) {\n this.editModule.updateRow(index, data);\n }\n };\n /**\n * Gets the added, edited,and deleted data before bulk save to the DataSource in batch mode.\n * @return {Object}\n */\n Grid.prototype.getBatchChanges = function () {\n if (this.editModule) {\n return this.editModule.getBatchChanges();\n }\n return {};\n };\n /**\n * Enables or disables ToolBar items.\n * @param {string[]} items - Defines the collection of itemID of ToolBar items.\n * @param {boolean} isEnable - Defines the items to be enabled or disabled.\n * @return {void}\n */\n Grid.prototype.enableToolbarItems = function (items, isEnable) {\n if (this.toolbarModule) {\n this.toolbarModule.enableItems(items, isEnable);\n }\n };\n /**\n * Copy the selected rows or cells data into clipboard.\n * @param {boolean} withHeader - Specifies whether the column header text needs to be copied along with rows or cells.\n */\n Grid.prototype.copy = function (withHeader) {\n if (this.clipboardModule) {\n this.clipboardModule.copy(withHeader);\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.recalcIndentWidth = function () {\n var _this = this;\n if (!this.getHeaderTable().querySelector('.e-emptycell')) {\n return;\n }\n if ((!this.groupSettings.columns.length && !this.isDetail() && !this.isRowDragable()) ||\n this.getHeaderTable().querySelector('.e-emptycell').getAttribute('indentRefreshed') ||\n !this.getContentTable()) {\n return;\n }\n var indentWidth = this.getHeaderTable().querySelector('.e-emptycell').parentElement.offsetWidth;\n var headerCol = [].slice.call(this.getHeaderTable().querySelector('colgroup').childNodes);\n var contentCol = [].slice.call(this.getContentTable().querySelector('colgroup').childNodes);\n var perPixel = indentWidth / 30;\n var i = this.getFrozenMode() === 'Right' ? this.frozenRightCount : 0;\n var parentOffset = this.element.offsetWidth;\n var applyWidth = function (index, width) {\n if (ispercentageWidth(_this)) {\n var newWidth = (width / parentOffset * 100).toFixed(1) + '%';\n headerCol[index].style.width = newWidth;\n contentCol[index].style.width = newWidth;\n }\n else {\n headerCol[index].style.width = width + 'px';\n contentCol[index].style.width = width + 'px';\n }\n _this.notify(events.columnWidthChanged, { index: index, width: width });\n };\n if (perPixel >= 1) {\n indentWidth = (30 / perPixel);\n }\n if (this.enableColumnVirtualization || this.isAutoGen) {\n indentWidth = 30;\n }\n while (i < this.groupSettings.columns.length) {\n applyWidth(i, indentWidth);\n i++;\n }\n if (this.isDetail()) {\n applyWidth(i, indentWidth);\n i++;\n }\n if (this.isRowDragable()) {\n applyWidth(i, indentWidth);\n }\n this.isAutoGen = false;\n this.getHeaderTable().querySelector('.e-emptycell').setAttribute('indentRefreshed', 'true');\n };\n /**\n * @hidden\n */\n Grid.prototype.resetIndentWidth = function () {\n if (ispercentageWidth(this)) {\n this.getHeaderTable().querySelector('.e-emptycell').removeAttribute('indentRefreshed');\n this.widthService.setWidthToColumns();\n this.recalcIndentWidth();\n }\n if ((this.width === 'auto' || typeof (this.width) === 'string' && this.width.indexOf('%') !== -1)\n && this.getColumns().filter(function (col) { return (!col.width || col.width === 'auto') && col.minWidth; }).length > 0) {\n var tgridWidth = this.widthService.getTableWidth(this.getColumns());\n this.widthService.setMinwidthBycalculation(tgridWidth);\n }\n if (this.isFrozenGrid() && this.widthService) {\n this.widthService.refreshFrozenScrollbar();\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.isRowDragable = function () {\n return this.allowRowDragAndDrop && !this.rowDropSettings.targetID;\n };\n /**\n * Changes the Grid column positions by field names.\n * @param {string} fromFName - Defines the origin field name.\n * @param {string} toFName - Defines the destination field name.\n * @return {void}\n */\n Grid.prototype.reorderColumns = function (fromFName, toFName) {\n if (this.reorderModule) {\n this.reorderModule.reorderColumns(fromFName, toFName);\n }\n };\n /**\n * Changes the Grid column positions by field index. If you invoke reorderColumnByIndex multiple times,\n * then you won't get the same results every time.\n * @param {number} fromIndex - Defines the origin field index.\n * @param {number} toIndex - Defines the destination field index.\n * @return {void}\n */\n Grid.prototype.reorderColumnByIndex = function (fromIndex, toIndex) {\n if (this.reorderModule) {\n this.reorderModule.reorderColumnByIndex(fromIndex, toIndex);\n }\n };\n /**\n * Changes the Grid column positions by field index. If you invoke reorderColumnByTargetIndex multiple times,\n * then you will get the same results every time.\n * @param {string} fieldName - Defines the field name.\n * @param {number} toIndex - Defines the destination field index.\n * @return {void}\n */\n Grid.prototype.reorderColumnByTargetIndex = function (fieldName, toIndex) {\n if (this.reorderModule) {\n this.reorderModule.reorderColumnByTargetIndex(fieldName, toIndex);\n }\n };\n /**\n * Changes the Grid Row position with given indexes.\n * @param {number} fromIndexes - Defines the origin Indexes.\n * @param {number} toIndex - Defines the destination Index.\n * @return {void}\n */\n Grid.prototype.reorderRows = function (fromIndexes, toIndex) {\n if (this.rowDragAndDropModule) {\n this.rowDragAndDropModule.reorderRows(fromIndexes, toIndex);\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.refreshDataSource = function (e, args) {\n this.notify('refreshdataSource', e);\n };\n /**\n * @hidden\n */\n Grid.prototype.disableRowDD = function (enable) {\n var headerTable = this.getHeaderTable();\n var contentTable = this.getContentTable();\n var headerRows = headerTable.querySelectorAll('th.e-rowdragheader, th.e-mastercell');\n var rows = this.getRows();\n var disValue = enable ? 'none' : '';\n setStyleAttribute(headerTable.querySelector('colgroup').childNodes[0], { 'display': disValue });\n setStyleAttribute(contentTable.querySelector('colgroup').childNodes[0], { 'display': disValue });\n for (var i = 0; i < this.getRows().length; i++) {\n var ele = rows[i].firstElementChild;\n enable ? addClass([ele], 'e-hide') : removeClass([ele], ['e-hide']);\n }\n for (var j = 0; j < headerTable.querySelectorAll('th.e-rowdragheader, th.e-mastercell').length; j++) {\n var ele = headerRows[j];\n enable ? addClass([ele], 'e-hide') : removeClass([ele], ['e-hide']);\n }\n };\n /**\n * Changes the column width to automatically fit its content to ensure that the width shows the content without wrapping/hiding.\n * > * This method ignores the hidden columns.\n * > * Uses the `autoFitColumns` method in the `dataBound` event to resize at initial rendering.\n * @param {string |string[]} fieldNames - Defines the column names.\n * @return {void}\n *\n *\n * ```typescript\n *
\n * \n * ```\n *\n */\n Grid.prototype.autoFitColumns = function (fieldNames) {\n if (this.resizeModule) {\n this.resizeModule.autoFitColumns(fieldNames);\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.createColumnchooser = function (x, y, target) {\n if (this.columnChooserModule) {\n this.columnChooserModule.renderColumnChooser(x, y, target);\n }\n };\n Grid.prototype.initializeServices = function () {\n this.serviceLocator.register('widthService', this.widthService = new ColumnWidthService(this));\n this.serviceLocator.register('cellRendererFactory', new CellRendererFactory);\n this.serviceLocator.register('rendererFactory', new RendererFactory);\n this.serviceLocator.register('localization', this.localeObj = new L10n(this.getModuleName(), this.defaultLocale, this.locale));\n this.serviceLocator.register('valueFormatter', this.valueFormatterService = new ValueFormatter(this.locale));\n this.serviceLocator.register('showHideService', this.showHider = new ShowHide(this));\n this.serviceLocator.register('ariaService', this.ariaService = new AriaService());\n this.serviceLocator.register('focus', this.focusModule = new FocusStrategy(this));\n };\n Grid.prototype.processModel = function () {\n var gCols = this.groupSettings.columns;\n var sCols = this.sortSettings.columns;\n var flag;\n var j;\n if (this.allowGrouping) {\n var _loop_1 = function (i, len) {\n j = 0;\n for (var sLen = sCols.length; j < sLen; j++) {\n if (sCols[j].field === gCols[i]) {\n flag = true;\n break;\n }\n }\n if (!flag) {\n sCols.push({ field: gCols[i], direction: 'Ascending', isFromGroup: true });\n }\n else {\n if (this_1.allowSorting) {\n this_1.sortedColumns.push(sCols[j].field);\n }\n else {\n sCols[j].direction = 'Ascending';\n }\n }\n if (!this_1.groupSettings.showGroupedColumn) {\n var column = this_1.enableColumnVirtualization ?\n this_1.columns.filter(function (c) { return c.field === gCols[i]; })[0] : this_1.getColumnByField(gCols[i]);\n if (column) {\n column.visible = false;\n }\n else {\n this_1.log('initial_action', { moduleName: 'group', columnName: gCols[i] });\n }\n }\n };\n var this_1 = this;\n for (var i = 0, len = gCols.length; i < len; i++) {\n _loop_1(i, len);\n }\n }\n if (!gCols.length) {\n for (var i = 0; i < sCols.length; i++) {\n this.sortedColumns.push(sCols[i].field);\n }\n }\n this.rowTemplateFn = templateCompiler(this.rowTemplate);\n this.detailTemplateFn = templateCompiler(this.detailTemplate);\n this.editTemplateFn = templateCompiler(this.editSettings.template);\n this.editHeaderTemplateFn = templateCompiler(this.editSettings.headerTemplate);\n this.editFooterTemplateFn = templateCompiler(this.editSettings.footerTemplate);\n if (!isNullOrUndefined(this.parentDetails)) {\n var value = isNullOrUndefined(this.parentDetails.parentKeyFieldValue) ? 'undefined' :\n this.parentDetails.parentKeyFieldValue;\n this.query.where(this.queryString, 'equal', value, true);\n }\n this.initForeignColumn();\n };\n Grid.prototype.initForeignColumn = function () {\n if (this.isForeignKeyEnabled(this.getColumns())) {\n this.notify(events.initForeignKeyColumn, this.getForeignKeyColumns());\n }\n };\n Grid.prototype.enableVerticalRendering = function () {\n if (this.rowRenderingMode === 'Vertical') {\n this.element.classList.add('e-row-responsive');\n }\n else {\n this.element.classList.remove('e-row-responsive');\n }\n };\n Grid.prototype.gridRender = function () {\n this.updateRTL();\n if (this.rowRenderingMode === 'Vertical') {\n this.element.classList.add('e-row-responsive');\n }\n if (this.enableHover) {\n this.element.classList.add('e-gridhover');\n }\n if (Browser.isDevice) {\n this.element.classList.add('e-device');\n }\n if (this.rowHeight) {\n this.element.classList.add('e-grid-min-height');\n }\n classList(this.element, ['e-responsive', 'e-default'], []);\n var rendererFactory = this.serviceLocator.getService('rendererFactory');\n this.headerModule = rendererFactory.getRenderer(RenderType.Header);\n this.contentModule = rendererFactory.getRenderer(RenderType.Content);\n this.printModule = new Print(this, this.scrollModule);\n this.clipboardModule = new Clipboard(this);\n this.renderModule.render();\n this.eventInitializer();\n this.createGridPopUpElement();\n this.widthService.setWidthToColumns();\n this.updateGridLines();\n this.applyTextWrap();\n this.createTooltip(); //for clip mode ellipsis\n this.enableBoxSelection();\n };\n Grid.prototype.dataReady = function () {\n this.scrollModule.setWidth();\n this.scrollModule.setHeight();\n if (this.height !== 'auto') {\n this.scrollModule.setPadding();\n }\n };\n Grid.prototype.updateRTL = function () {\n if (this.enableRtl) {\n this.element.classList.add('e-rtl');\n }\n else {\n this.element.classList.remove('e-rtl');\n }\n };\n Grid.prototype.createGridPopUpElement = function () {\n var popup = this.createElement('div', { className: 'e-gridpopup', styles: 'display:none;' });\n var content = this.createElement('div', { className: 'e-content', attrs: { tabIndex: '-1' } });\n append([content, this.createElement('div', { className: 'e-uptail e-tail' })], popup);\n content.appendChild(this.createElement('span'));\n append([content, this.createElement('div', { className: 'e-downtail e-tail' })], popup);\n this.element.appendChild(popup);\n };\n Grid.prototype.updateGridLines = function () {\n classList(this.element, [], ['e-verticallines', 'e-horizontallines', 'e-hidelines', 'e-bothlines']);\n switch (this.gridLines) {\n case 'Horizontal':\n this.element.classList.add('e-horizontallines');\n break;\n case 'Vertical':\n this.element.classList.add('e-verticallines');\n break;\n case 'None':\n this.element.classList.add('e-hidelines');\n break;\n case 'Both':\n this.element.classList.add('e-bothlines');\n break;\n }\n this.updateResizeLines();\n };\n Grid.prototype.updateResizeLines = function () {\n if (this.allowResizing &&\n !(this.gridLines === 'Vertical' || this.gridLines === 'Both')) {\n this.element.classList.add('e-resize-lines');\n }\n else {\n this.element.classList.remove('e-resize-lines');\n }\n };\n /**\n * The function is used to apply text wrap\n * @return {void}\n * @hidden\n */\n Grid.prototype.applyTextWrap = function () {\n if (this.allowTextWrap) {\n var headerRows = [].slice.call(this.element.querySelectorAll('.e-columnheader'));\n switch (this.textWrapSettings.wrapMode) {\n case 'Header':\n wrap(this.element, false);\n wrap(this.getContent(), false);\n wrap(headerRows, true);\n break;\n case 'Content':\n wrap(this.getContent(), true);\n wrap(this.element, false);\n wrap(headerRows, false);\n break;\n default:\n wrap(this.element, true);\n wrap(this.getContent(), false);\n wrap(headerRows, false);\n }\n if (this.textWrapSettings.wrapMode !== 'Content') {\n this.notify(events.refreshHandlers, {});\n }\n }\n };\n /**\n * The function is used to remove text wrap\n * @return {void}\n * @hidden\n */\n Grid.prototype.removeTextWrap = function () {\n wrap(this.element, false);\n var headerRows = [].slice.call(this.element.querySelectorAll('.e-columnheader'));\n wrap(headerRows, false);\n wrap(this.getContent(), false);\n if (this.textWrapSettings.wrapMode !== 'Content') {\n this.notify(events.refreshHandlers, {});\n }\n };\n /**\n * The function is used to add Tooltip to the grid cell that has ellipsiswithtooltip clip mode.\n * @return {void}\n * @hidden\n */\n Grid.prototype.createTooltip = function () {\n this.toolTipObj = new Tooltip({ opensOn: 'custom', content: '' }, this.element);\n };\n /** @hidden */\n Grid.prototype.freezeRefresh = function () {\n this.isFreezeRefresh = true;\n if (this.enableVirtualization) {\n this.pageSettings.currentPage = 1;\n }\n this.componentRefresh();\n };\n Grid.prototype.getTooltipStatus = function (element) {\n var width;\n var headerTable = this.getHeaderTable();\n var contentTable = this.getContentTable();\n var headerDivTag = 'e-gridheader';\n var contentDivTag = 'e-gridcontent';\n var htable = this.createTable(headerTable, headerDivTag, 'header');\n var ctable = this.createTable(headerTable, headerDivTag, 'content');\n var td = element;\n var table = element.classList.contains('e-headercell') ? htable : ctable;\n var ele = element.classList.contains('e-headercell') ? 'th' : 'tr';\n table.querySelector(ele).className = element.className;\n table.querySelector(ele).innerHTML = element.innerHTML;\n width = table.querySelector(ele).getBoundingClientRect().width;\n document.body.removeChild(htable);\n document.body.removeChild(ctable);\n if (width > element.getBoundingClientRect().width) {\n return true;\n }\n return false;\n };\n Grid.prototype.mouseMoveHandler = function (e) {\n if (this.isEllipsisTooltip()) {\n var element = parentsUntil(e.target, 'e-ellipsistooltip');\n if (this.prevElement !== element || e.type === 'mouseout') {\n this.toolTipObj.close();\n }\n var tagName = e.target.tagName;\n var elemNames = ['A', 'BUTTON', 'INPUT'];\n if (element && e.type !== 'mouseout' && !(Browser.isDevice && elemNames.indexOf(tagName) !== -1)) {\n if (element.getAttribute('aria-describedby')) {\n return;\n }\n if (this.getTooltipStatus(element)) {\n if (element.getElementsByClassName('e-headertext').length) {\n this.toolTipObj.content = element.getElementsByClassName('e-headertext')[0].innerText;\n }\n else {\n this.toolTipObj.content = element.innerText;\n }\n this.prevElement = element;\n this.toolTipObj.open(element);\n }\n }\n }\n this.hoverFrozenRows(e);\n };\n /** @hidden */\n Grid.prototype.hoverFrozenRows = function (e) {\n if (this.isFrozenGrid()) {\n var row = parentsUntil(e.target, 'e-row');\n if ([].slice.call(this.element.querySelectorAll('.e-frozenhover')).length && e.type === 'mouseout') {\n var rows = [].slice.call(this.element.querySelectorAll('.e-frozenhover'));\n for (var i = 0; i < rows.length; i++) {\n rows[i].classList.remove('e-frozenhover');\n }\n }\n else if (row) {\n var rows = [].slice.call(this.element.querySelectorAll('tr[aria-rowindex=\"' + row.getAttribute('aria-rowindex') + '\"]'));\n rows.splice(rows.indexOf(row), 1);\n for (var i = 0; i < rows.length; i++) {\n if (row.getAttribute('aria-selected') != 'true' && rows[i]) {\n rows[i].classList.add('e-frozenhover');\n }\n else if (rows[i]) {\n rows[i].classList.remove('e-frozenhover');\n }\n }\n }\n }\n };\n Grid.prototype.isEllipsisTooltip = function () {\n var cols = this.getColumns();\n if (this.clipMode === 'EllipsisWithTooltip') {\n return true;\n }\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].clipMode === 'EllipsisWithTooltip') {\n return true;\n }\n }\n return false;\n };\n Grid.prototype.scrollHandler = function () {\n if (this.isEllipsisTooltip()) {\n this.toolTipObj.close();\n }\n };\n /**\n * To create table for ellipsiswithtooltip\n * @hidden\n */\n Grid.prototype.createTable = function (table, tag, type) {\n var myTableDiv = this.createElement('div');\n myTableDiv.className = this.element.className;\n myTableDiv.style.cssText = 'display: inline-block;visibility:hidden;position:absolute';\n var mySubDiv = this.createElement('div');\n mySubDiv.className = tag;\n var myTable = this.createElement('table');\n myTable.className = table.className;\n myTable.style.cssText = 'table-layout: auto;width: auto';\n var ele = (type === 'header') ? 'th' : 'td';\n var myTr = this.createElement('tr');\n var mytd = this.createElement(ele);\n myTr.appendChild(mytd);\n myTable.appendChild(myTr);\n mySubDiv.appendChild(myTable);\n myTableDiv.appendChild(mySubDiv);\n document.body.appendChild(myTableDiv);\n return myTableDiv;\n };\n Grid.prototype.onKeyPressed = function (e) {\n if (e.action === 'tab' || e.action === 'shiftTab') {\n this.toolTipObj.close();\n }\n };\n /**\n * Binding events to the element while component creation.\n * @hidden\n */\n Grid.prototype.wireEvents = function () {\n EventHandler.add(this.element, 'click', this.mouseClickHandler, this);\n EventHandler.add(this.element, 'touchend', this.mouseClickHandler, this);\n EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);\n EventHandler.add(this.element, 'dblclick', this.dblClickHandler, this);\n EventHandler.add(this.element, 'keydown', this.keyPressHandler, this);\n /* tslint:disable-next-line:no-any */\n EventHandler.add(window, 'resize', this.resetIndentWidth, this);\n if (this.allowKeyboard) {\n this.element.tabIndex = this.element.tabIndex === -1 ? 0 : this.element.tabIndex;\n }\n this.keyboardModule = new KeyboardEvents(this.element, {\n keyAction: this.keyActionHandler.bind(this),\n keyConfigs: this.keyConfigs,\n eventName: 'keydown'\n });\n EventHandler.add(this.getContent().firstElementChild, 'scroll', this.scrollHandler, this);\n EventHandler.add(this.element, 'mousemove', this.mouseMoveHandler, this);\n EventHandler.add(this.element, 'mouseout', this.mouseMoveHandler, this);\n EventHandler.add(this.getContent(), 'touchstart', this.tapEvent, this);\n EventHandler.add(document.body, 'keydown', this.keyDownHandler, this);\n };\n /**\n * Unbinding events from the element while component destroy.\n * @hidden\n */\n Grid.prototype.unwireEvents = function () {\n EventHandler.remove(this.element, 'click', this.mouseClickHandler);\n EventHandler.remove(this.element, 'touchend', this.mouseClickHandler);\n EventHandler.remove(this.element, 'focusout', this.focusOutHandler);\n EventHandler.remove(this.element, 'dblclick', this.dblClickHandler);\n EventHandler.remove(this.getContent().firstElementChild, 'scroll', this.scrollHandler);\n EventHandler.remove(this.element, 'mousemove', this.mouseMoveHandler);\n EventHandler.remove(this.element, 'mouseout', this.mouseMoveHandler);\n EventHandler.remove(this.element, 'keydown', this.keyPressHandler);\n EventHandler.remove(this.getContent(), 'touchstart', this.tapEvent);\n EventHandler.remove(document.body, 'keydown', this.keyDownHandler);\n /* tslint:disable-next-line:no-any */\n EventHandler.remove(window, 'resize', this.resetIndentWidth);\n };\n /**\n * @hidden\n */\n Grid.prototype.addListener = function () {\n if (this.isDestroyed) {\n return;\n }\n this.on(events.dataReady, this.dataReady, this);\n this.on(events.contentReady, this.recalcIndentWidth, this);\n this.on(events.headerRefreshed, this.recalcIndentWidth, this);\n this.dataBoundFunction = this.refreshMediaCol.bind(this);\n this.addEventListener(events.dataBound, this.dataBoundFunction);\n this.on(events.keyPressed, this.onKeyPressed, this);\n this.on(events.contentReady, this.blazorTemplate, this);\n };\n /**\n * @hidden\n */\n Grid.prototype.removeListener = function () {\n if (this.isDestroyed) {\n return;\n }\n this.off(events.dataReady, this.dataReady);\n this.off(events.contentReady, this.recalcIndentWidth);\n this.off(events.headerRefreshed, this.recalcIndentWidth);\n this.removeEventListener(events.dataBound, this.dataBoundFunction);\n this.off(events.keyPressed, this.onKeyPressed);\n };\n Grid.prototype.blazorTemplate = function () {\n if (isBlazor()) {\n if (this.pageSettings.template) {\n updateBlazorTemplate(this.element.id + \"_template\", 'Template', this.pageSettings);\n }\n for (var i = 0; i < this.columnModel.length; i++) {\n if (this.columnModel[i].template) {\n updateBlazorTemplate(this.element.id + this.columnModel[i].uid, 'Template', this.columnModel[i], false);\n }\n if (this.columnModel[i].headerTemplate) {\n updateBlazorTemplate(this.element.id + this.columnModel[i].uid + 'headerTemplate', 'HeaderTemplate', this.columnModel[i], false);\n }\n if (this.filterSettings.type == 'FilterBar' && this.columnModel[i].filterTemplate) {\n var fieldName = this.columnModel[i].field;\n var tempID = this.element.id + this.columnModel[i].uid + 'filterTemplate';\n var filteredColumns = this.filterSettings.columns;\n for (var k = 0; k < filteredColumns.length; k++) {\n if (fieldName == filteredColumns[k].field) {\n blazorTemplates[tempID][0][fieldName] = filteredColumns[k].value;\n }\n }\n updateBlazorTemplate(this.element.id + this.columnModel[i].uid + 'filterTemplate', 'FilterTemplate', this.columnModel[i], false);\n }\n if (this.filterSettings.type != 'FilterBar' && this.columnModel[i].filterTemplate) {\n updateBlazorTemplate(this.element.id + this.columnModel[i].uid + 'filterTemplate', 'FilterTemplate', this.columnModel[i]);\n }\n }\n if (this.groupSettings.captionTemplate) {\n updateBlazorTemplate(this.element.id + 'captionTemplate', 'CaptionTemplate', this.groupSettings);\n }\n var guid = 'guid';\n for (var k = 0; k < this.aggregates.length; k++) {\n for (var j = 0; j < this.aggregates[k].columns.length; j++) {\n if (this.aggregates[k].columns[j].footerTemplate) {\n updateBlazorTemplate(this.element.id + this.aggregates[k].columns[j][guid] + 'footerTemplate', 'FooterTemplate', this.aggregates[k].columns[j]);\n }\n if (this.aggregates[k].columns[j].groupFooterTemplate) {\n updateBlazorTemplate(this.element.id + this.aggregates[k].columns[j][guid] + 'groupFooterTemplate', 'GroupFooterTemplate', this.aggregates[k].columns[j]);\n }\n if (this.aggregates[k].columns[j].groupCaptionTemplate) {\n updateBlazorTemplate(this.element.id + this.aggregates[k].columns[j][guid] + 'groupCaptionTemplate', 'GroupCaptionTemplate', this.aggregates[k].columns[j]);\n }\n }\n }\n }\n };\n /**\n * Get current visible data of grid.\n * @return {Object[]}\n * @isGenericType true\n */\n Grid.prototype.getCurrentViewRecords = function () {\n if (isGroupAdaptive(this)) {\n return isNullOrUndefined(this.currentViewData.records) ?\n this.currentViewData : this.currentViewData.records;\n }\n if (this.groupSettings.enableLazyLoading) {\n return this.currentViewData;\n }\n ;\n return (this.allowGrouping && this.groupSettings.columns.length && this.currentViewData.length && this.currentViewData.records) ?\n this.currentViewData.records : this.currentViewData;\n };\n Grid.prototype.mouseClickHandler = function (e) {\n if (this.isChildGrid(e) || (parentsUntil(e.target, 'e-gridpopup') && e.touches) ||\n this.element.querySelectorAll('.e-cloneproperties').length || this.checkEdit(e)) {\n return;\n }\n if (((!this.allowRowDragAndDrop && (parentsUntil(e.target, 'e-gridcontent') ||\n e.target.tagName === 'TD')) || (!(this.allowGrouping || this.allowReordering) &&\n parentsUntil(e.target, 'e-gridheader'))) && e.touches) {\n return;\n }\n if (parentsUntil(e.target, 'e-gridheader') && this.allowRowDragAndDrop &&\n !(parentsUntil(e.target, 'e-filterbarcell'))) {\n e.preventDefault();\n }\n var args = this.getRowInfo(e.target);\n var cancel = 'cancel';\n args[cancel] = false;\n var isDataRow = false;\n var tr = closest(e.target, 'tr');\n if (tr && tr.getAttribute('data-uid')) {\n var rowObj = this.getRowObjectFromUID(tr.getAttribute('data-uid'));\n isDataRow = rowObj ? rowObj.isDataRow : false;\n }\n if (isBlazor()) {\n var clonedColumn = extend({}, args.column);\n args = { rowData: args.rowData, rowIndex: args.rowIndex,\n cellIndex: args.cellIndex, column: clonedColumn };\n }\n if (isDataRow) {\n this.trigger(events.recordClick, args);\n }\n this.notify(events.click, e);\n };\n Grid.prototype.checkEdit = function (e) {\n var tr = parentsUntil(e.target, 'e-row');\n var isEdit = this.editSettings.mode !== 'Batch' &&\n this.isEdit && tr && (tr.classList.contains('e-editedrow') || tr.classList.contains('e-addedrow'));\n return !parentsUntil(e.target, 'e-unboundcelldiv') && (isEdit || (parentsUntil(e.target, 'e-rowcell') &&\n parentsUntil(e.target, 'e-rowcell').classList.contains('e-editedbatchcell')));\n };\n Grid.prototype.dblClickHandler = function (e) {\n var grid = parentsUntil(e.target, 'e-grid');\n if (isNullOrUndefined(grid) || grid.id !== this.element.id || closest(e.target, '.e-unboundcelldiv')) {\n return;\n }\n var dataRow = false;\n var tr = closest(e.target, 'tr');\n if (tr && tr.getAttribute('data-uid')) {\n var rowObj = this.getRowObjectFromUID(tr.getAttribute('data-uid'));\n dataRow = rowObj ? rowObj.isDataRow : false;\n }\n var args = this.getRowInfo(e.target);\n args.target = e.target;\n if (dataRow) {\n this.trigger(events.recordDoubleClick, args);\n }\n this.notify(events.dblclick, e);\n };\n Grid.prototype.focusOutHandler = function (e) {\n if (this.isChildGrid(e)) {\n return;\n }\n if (!parentsUntil(e.target, 'e-grid')) {\n this.element.querySelector('.e-gridpopup').style.display = 'None';\n }\n var filterClear = this.element.querySelector('.e-cancel:not(.e-hide)');\n if (filterClear) {\n filterClear.classList.add('e-hide');\n }\n var relatedTarget = e.relatedTarget;\n var ariaOwns = relatedTarget ? relatedTarget.getAttribute('aria-owns') : null;\n if ((!relatedTarget || (!parentsUntil(relatedTarget, 'e-grid') &&\n (!isNullOrUndefined(ariaOwns) &&\n (ariaOwns)) !== e.target.getAttribute('aria-owns')))\n && !this.keyPress && this.isEdit && !Browser.isDevice) {\n if (this.editSettings.mode === 'Batch') {\n this.editModule.saveCell();\n this.notify(events.editNextValCell, {});\n }\n if (this.editSettings.mode === 'Normal') {\n this.editModule.editFormValidate();\n }\n }\n this.keyPress = false;\n };\n Grid.prototype.isChildGrid = function (e) {\n var gridElement = parentsUntil(e.target, 'e-grid');\n if (gridElement && gridElement.id !== this.element.id) {\n return true;\n }\n return false;\n };\n /**\n * @hidden\n */\n Grid.prototype.mergePersistGridData = function (persistedData) {\n var data = this.getLocalData();\n if (!(isNullOrUndefined(data) || (data === '')) || !isNullOrUndefined(persistedData)) {\n var dataObj = !isNullOrUndefined(persistedData) ? persistedData : JSON.parse(data);\n if (this.enableVirtualization) {\n dataObj.pageSettings.currentPage = 1;\n }\n var keys = Object.keys(dataObj);\n this.isProtectedOnChange = true;\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if ((typeof this[key] === 'object') && !isNullOrUndefined(this[key])) {\n if (Array.isArray(this[key]) && key === 'columns') {\n if (!(isBlazor() && this.isServerRendered)) {\n setColumnIndex(this[key]);\n }\n this.mergeColumns(dataObj[key], this[key]);\n this[key] = dataObj[key];\n }\n else {\n extend(this[key], dataObj[key]);\n }\n }\n else {\n this[key] = dataObj[key];\n }\n }\n this.isProtectedOnChange = false;\n }\n };\n Grid.prototype.mergeColumns = function (storedColumn, columns) {\n var storedColumns = storedColumn;\n var _loop_2 = function (i) {\n var localCol = columns.filter(function (tCol) { return tCol.index === storedColumns[i].index; })[0];\n if (!isNullOrUndefined(localCol)) {\n if (localCol.columns && localCol.columns.length) {\n this_2.mergeColumns(storedColumns[i].columns, localCol.columns);\n storedColumns[i] = extend(localCol, storedColumns[i], {}, true);\n }\n else {\n if (isBlazor()) {\n var guid = 'guid';\n storedColumns[i][guid] = localCol[guid];\n storedColumns[i].uid = localCol.uid;\n }\n storedColumns[i] = extend(localCol, storedColumns[i], {}, true);\n }\n }\n };\n var this_2 = this;\n for (var i = 0; i < storedColumns.length; i++) {\n _loop_2(i);\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.isDetail = function () {\n return !isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.childGrid);\n };\n Grid.prototype.isCommandColumn = function (columns) {\n var _this = this;\n return columns.some(function (col) {\n if (col.columns) {\n return _this.isCommandColumn(col.columns);\n }\n return !!(col.commands || col.commandsTemplate);\n });\n };\n Grid.prototype.isForeignKeyEnabled = function (columns) {\n var _this = this;\n return columns.some(function (col) {\n if (col.columns) {\n return _this.isForeignKeyEnabled(col.columns);\n }\n return !!(col.dataSource && col.foreignKeyValue);\n });\n };\n Grid.prototype.keyPressHandler = function (e) {\n var presskey = extend(e, { cancel: false, });\n this.trigger(\"keyPressed\", presskey);\n if (presskey.cancel === true) {\n e.stopImmediatePropagation();\n }\n };\n Grid.prototype.keyDownHandler = function (e) {\n if (e.altKey) {\n if (e.keyCode === 74) { //alt j\n if (this.keyA) { //alt A J\n this.notify(events.groupCollapse, { target: e.target, collapse: false });\n this.keyA = false;\n }\n else {\n this.focusModule.focusHeader();\n this.focusModule.addOutline();\n }\n }\n if (e.keyCode === 87) { //alt w\n this.focusModule.focusContent();\n this.focusModule.addOutline();\n }\n if (e.keyCode === 65) { //alt A\n this.keyA = true;\n }\n if (e.keyCode === 72 && this.keyA) { //alt A H\n this.notify(events.groupCollapse, { target: e.target, collapse: true });\n this.keyA = false;\n }\n }\n if (e.keyCode === 13) {\n this.notify(events.enterKeyHandler, e);\n }\n };\n Grid.prototype.keyActionHandler = function (e) {\n if (this.isChildGrid(e) ||\n (this.isEdit && e.action !== 'escape' && e.action !== 'enter' && e.action !== 'shiftEnter'\n && e.action !== 'tab' && e.action !== 'shiftTab')) {\n return;\n }\n else {\n this.keyPress = true;\n }\n if (this.allowKeyboard) {\n if (e.action === 'ctrlPlusP') {\n e.preventDefault();\n this.print();\n }\n this.notify(events.keyPressed, e);\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.setInjectedModules = function (modules) {\n this.injectedModules = modules;\n };\n Grid.prototype.updateColumnObject = function () {\n prepareColumns(this.columns, this.enableColumnVirtualization, this);\n if (!(isBlazor() && this.isServerRendered)) {\n setColumnIndex(this.columns);\n }\n this.initForeignColumn();\n this.notify(events.autoCol, {});\n };\n /**\n * Gets the foreign columns from Grid.\n * @return {Column[]}\n * @blazorType List\n */\n Grid.prototype.getForeignKeyColumns = function () {\n return this.getColumns().filter(function (col) {\n return col.isForeignColumn();\n });\n };\n /**\n * @hidden\n */\n Grid.prototype.getRowHeight = function () {\n return this.rowHeight ? this.rowHeight : getRowHeight(this.element);\n };\n /**\n * Refreshes the Grid column changes.\n */\n Grid.prototype.refreshColumns = function () {\n this.setFrozenCount();\n var fCnt = this.getContent().querySelector('.e-frozen-left-content');\n var frCnt = this.getContent().querySelector('.e-frozen-right-content');\n var isColFrozen = !this.frozenRightCount && !this.frozenLeftCount;\n var isFrozen = this.getFrozenColumns() !== 0;\n if (!isFrozen && ((!fCnt && this.frozenLeftCount) || (!frCnt && this.frozenRightCount) || (fCnt && !this.frozenLeftCount)\n || (frCnt && !this.frozenRightCount))) {\n this.tableIndex = 0;\n this.tablesCount = 1;\n if (this.enableColumnVirtualization) {\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n }\n this.freezeRefresh();\n }\n else if (isColFrozen && ((this.getFrozenColumns() === 1 && !fCnt) || (this.getFrozenColumns() === 0 && fCnt))) {\n this.tableIndex = 0;\n this.tablesCount = 1;\n if (this.enableColumnVirtualization) {\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n }\n this.freezeRefresh();\n }\n else {\n this.isPreventScrollEvent = true;\n this.updateColumnObject();\n this.checkLockColumns(this.getColumns());\n this.refresh();\n if (this.isFrozenGrid()) {\n var mTbl = this.contentModule.getMovableContent().querySelector('.e-table');\n remove(mTbl.querySelector('colgroup'));\n var colGroup = ((this.getHeaderContent()\n .querySelector('.e-movableheader').querySelector('colgroup')).cloneNode(true));\n mTbl.insertBefore(colGroup, mTbl.querySelector('tbody'));\n if (this.getFrozenMode() === 'Left-Right') {\n var frTbl = this.contentModule.getFrozenRightContent().querySelector('.e-table');\n remove(frTbl.querySelector('colgroup'));\n var colGrp = ((this.getHeaderContent()\n .querySelector('.e-frozen-right-header').querySelector('colgroup')).cloneNode(true));\n frTbl.insertBefore(colGrp, frTbl.querySelector('tbody'));\n }\n }\n }\n if (this.isFrozenGrid()) {\n var left = this.getContent().querySelector('.e-movablescrollbar').scrollLeft;\n this.headerModule.getMovableHeader().scrollLeft = left;\n this.contentModule.getMovableContent().scrollLeft = left;\n }\n };\n /**\n * Export Grid data to Excel file(.xlsx).\n * @param {ExcelExportProperties} excelExportProperties - Defines the export properties of the Grid.\n * @param {boolean} isMultipleExport - Define to enable multiple export.\n * @param {workbook} workbook - Defines the Workbook if multiple export is enabled.\n * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.\n * @return {Promise}\n * @blazorType void\n */\n Grid.prototype.excelExport = function (excelExportProperties, isMultipleExport, \n /* tslint:disable-next-line:no-any */\n workbook, isBlob) {\n if (isBlazor()) {\n this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, false, isBlob);\n return null;\n }\n return this.excelExportModule ?\n this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, false, isBlob) : null;\n };\n /**\n * Export Grid data to CSV file.\n * @param {ExcelExportProperties} excelExportProperties - Defines the export properties of the Grid.\n * @param {boolean} isMultipleExport - Define to enable multiple export.\n * @param {workbook} workbook - Defines the Workbook if multiple export is enabled.\n * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.\n * @return {Promise}\n * @blazorType void\n */\n Grid.prototype.csvExport = function (excelExportProperties, \n /* tslint:disable-next-line:no-any */\n isMultipleExport, workbook, isBlob) {\n if (isBlazor()) {\n this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, true, isBlob);\n return null;\n }\n return this.excelExportModule ?\n this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, true, isBlob) : null;\n };\n /**\n * Export Grid data to PDF document.\n * @param {pdfExportProperties} PdfExportProperties - Defines the export properties of the Grid.\n * @param {isMultipleExport} isMultipleExport - Define to enable multiple export.\n * @param {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.\n * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.\n * @return {Promise}\n * @blazorType void\n */\n Grid.prototype.pdfExport = function (pdfExportProperties, \n /* tslint:disable-next-line:no-any */\n isMultipleExport, pdfDoc, isBlob) {\n if (isBlazor()) {\n this.pdfExportModule.Map(this, pdfExportProperties, isMultipleExport, pdfDoc, isBlob);\n return null;\n }\n return this.pdfExportModule ? this.pdfExportModule.Map(this, pdfExportProperties, isMultipleExport, pdfDoc, isBlob) : null;\n };\n /**\n * Groups a column by column name.\n * @param {string} columnName - Defines the column name to group.\n * @return {void}\n */\n Grid.prototype.groupColumn = function (columnName) {\n if (this.groupModule) {\n this.groupModule.groupColumn(columnName);\n }\n };\n /**\n * Expands all the grouped rows of the Grid.\n * @return {void}\n */\n Grid.prototype.groupExpandAll = function () {\n if (this.groupModule) {\n this.groupModule.expandAll();\n }\n };\n /**\n * Collapses all the grouped rows of the Grid.\n * @return {void}\n */\n Grid.prototype.groupCollapseAll = function () {\n if (this.groupModule) {\n this.groupModule.collapseAll();\n }\n };\n /**\n * Expands or collapses grouped rows by target element.\n * @param {Element} target - Defines the target element of the grouped row.\n * @return {void}\n */\n // public expandCollapseRows(target: Element): void {\n // if (this.groupModule) {\n // this.groupModule.expandCollapseRows(target);\n // }\n // }\n /**\n * Clears all the grouped columns of the Grid.\n * @return {void}\n */\n Grid.prototype.clearGrouping = function () {\n if (this.groupModule) {\n this.groupModule.clearGrouping();\n }\n };\n /**\n * Ungroups a column by column name.\n * @param {string} columnName - Defines the column name to ungroup.\n * {% codeBlock src='grid/ungroupColumn/index.md' %}{% endcodeBlock %}\n * @return {void}\n */\n Grid.prototype.ungroupColumn = function (columnName) {\n if (this.groupModule) {\n this.groupModule.ungroupColumn(columnName);\n }\n };\n /**\n * Column chooser can be displayed on screen by given position(X and Y axis).\n * @param {number} X - Defines the X axis.\n * @param {number} Y - Defines the Y axis.\n * @return {void}\n */\n Grid.prototype.openColumnChooser = function (x, y) {\n if (this.columnChooserModule) {\n this.columnChooserModule.openColumnChooser(x, y);\n }\n };\n Grid.prototype.scrollRefresh = function () {\n var _this = this;\n var refresh = function () {\n _this.scrollModule.refresh();\n _this.off(events.contentReady, refresh);\n };\n this.on(events.contentReady, refresh, this);\n };\n /**\n * Collapses a detail row with the given target.\n * @param {Element} target - Defines the expanded element to collapse.\n * @return {void}\n */\n // public detailCollapse(target: number | Element): void {\n // if (this.detailRowModule) {\n // this.detailRowModule.collapse(target);\n // }\n // }\n /**\n * Collapses all the detail rows of the Grid.\n * @return {void}\n */\n Grid.prototype.detailCollapseAll = function () {\n if (this.detailRowModule) {\n this.detailRowModule.collapseAll();\n }\n };\n /**\n * Expands a detail row with the given target.\n * @param {Element} target - Defines the collapsed element to expand.\n * @return {void}\n */\n // public detailExpand(target: number | Element): void {\n // if (this.detailRowModule) {\n // this.detailRowModule.expand(target);\n // }\n // }\n /**\n * Expands all the detail rows of the Grid.\n * @return {void}\n */\n Grid.prototype.detailExpandAll = function () {\n if (this.detailRowModule) {\n this.detailRowModule.expandAll();\n }\n };\n /**\n * Deselects the currently selected cells.\n * @return {void}\n */\n Grid.prototype.clearCellSelection = function () {\n if (this.selectionModule) {\n this.selectionModule.clearCellSelection();\n }\n };\n /**\n * Deselects the currently selected rows.\n * @return {void}\n */\n Grid.prototype.clearRowSelection = function () {\n if (this.selectionModule) {\n this.selectionModule.clearRowSelection();\n }\n };\n /**\n * Selects a collection of cells by row and column indexes.\n * @param {ISelectedCell[]} rowCellIndexes - Specifies the row and column indexes.\n * @return {void}\n */\n Grid.prototype.selectCells = function (rowCellIndexes) {\n if (this.selectionModule) {\n this.selectionModule.selectCells(rowCellIndexes);\n }\n };\n /**\n * Selects a range of rows from start and end row indexes.\n * @param {number} startIndex - Specifies the start row index.\n * @param {number} endIndex - Specifies the end row index.\n * @return {void}\n */\n Grid.prototype.selectRowsByRange = function (startIndex, endIndex) {\n if (this.selectionModule) {\n this.selectionModule.selectRowsByRange(startIndex, endIndex);\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.isContextMenuOpen = function () {\n return this.contextMenuModule && this.contextMenuModule.isOpen;\n };\n /**\n * @hidden\n */\n Grid.prototype.ensureModuleInjected = function (module) {\n return this.getInjectedModules().indexOf(module) >= 0;\n };\n /**\n * Destroys the given template reference.\n * @param {string[]} propertyNames - Defines the collection of template name.\n */\n //tslint:disable-next-line:no-any\n Grid.prototype.destroyTemplate = function (propertyNames, index) {\n this.clearTemplate(propertyNames, index);\n };\n /**\n * @hidden\n * @private\n */\n Grid.prototype.log = function (type, args) {\n this.loggerModule ? this.loggerModule.log(type, args) : (function () { return 0; })();\n };\n /**\n * @hidden\n */\n Grid.prototype.applyBiggerTheme = function (element) {\n if (this.element.classList.contains('e-bigger')) {\n element.classList.add('e-bigger');\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.getPreviousRowData = function () {\n var previousRowData = this.getRowsObject()[this.getRows().length - 1].data;\n return previousRowData;\n };\n /**\n * Hides the scrollbar placeholder of Grid content when grid content is not overflown.\n * @return {void}\n */\n Grid.prototype.hideScroll = function () {\n var content = this.getContent().querySelector('.e-content');\n var scrollBar = this.getContent().querySelector('.e-scrollbar');\n if (content.scrollHeight <= content.clientHeight) {\n this.scrollModule.removePadding();\n content.style.overflowY = 'auto';\n }\n if (this.isFrozenGrid() && scrollBar) {\n var mvblScrollBar = this.getContent().querySelector('.e-movablescrollbar');\n var mvblChild = this.getContent().querySelector('.e-movablechild');\n scrollBar.style.display = 'flex';\n if (mvblScrollBar.offsetWidth >= mvblChild.offsetWidth) {\n scrollBar.style.display = 'none';\n this.notify(events.frozenHeight, 0);\n }\n }\n };\n /**\n * Get row index by primary key or row data.\n * @param {string} value - Defines the primary key value.\n * @param {Object} value - Defines the row data.\n */\n Grid.prototype.getRowIndexByPrimaryKey = function (value) {\n var pkName = this.getPrimaryKeyFieldNames()[0];\n value = typeof value === 'object' ? value[pkName] : value;\n for (var i = 0; i < this.getRowsObject().length; i++) {\n var pKvalue = this.getRowsObject()[i].data[pkName];\n if (pkName.split('.').length > 1) {\n pKvalue = performComplexDataOperation(pkName, this.getRowsObject()[i].data);\n }\n if (pKvalue === value) {\n return this.getRowsObject()[i].index;\n }\n }\n return -1;\n };\n ;\n /**\n * @hidden\n */\n // Need to have all columns while filtering with ColumnVirtualization.\n Grid.prototype.grabColumnByFieldFromAllCols = function (field) {\n var column;\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n var gCols = this.columnModel;\n for (var i = 0; i < gCols.length; i++) {\n if (field === gCols[i].field) {\n column = gCols[i];\n }\n }\n return column;\n };\n /**\n * @hidden\n */\n // Need to have all columns while filtering with ColumnVirtualization.\n Grid.prototype.grabColumnByUidFromAllCols = function (uid) {\n var column;\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n var gCols = this.columnModel;\n for (var i = 0; i < gCols.length; i++) {\n if (uid === gCols[i].uid) {\n column = gCols[i];\n }\n }\n return column;\n };\n /**\n * Get all filtered records from the Grid and it returns array of objects for the local dataSource, returns a promise object if the Grid has remote data.\n * @return {Object[] | Promise}\n\n */\n Grid.prototype.getFilteredRecords = function () {\n if (this.allowFiltering && this.filterSettings.columns.length) {\n var query = this.renderModule.data.generateQuery(true);\n if (this.dataSource && this.renderModule.data.isRemote() && this.dataSource instanceof DataManager) {\n return this.renderModule.data.getData(this.dataSource, query);\n }\n else {\n if (this.dataSource instanceof DataManager) {\n return this.dataSource.executeLocal(query);\n }\n else {\n return new DataManager(this.dataSource, query).executeLocal(query);\n }\n }\n }\n return [];\n };\n Grid.prototype.getUserAgent = function () {\n var userAgent = Browser.userAgent.toLowerCase();\n return /iphone|ipod|ipad/.test(userAgent);\n };\n /**\n * @hidden\n */\n // Need to have all columns while filtering with ColumnVirtualization.\n Grid.prototype.tapEvent = function (e) {\n if (this.getUserAgent()) {\n if (!Global.timer) {\n Global.timer = setTimeout(function () {\n Global.timer = null;\n }, 300);\n }\n else {\n clearTimeout(Global.timer);\n Global.timer = null;\n this.dblClickHandler(e);\n this.notify(events.doubleTap, e);\n }\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.getRowUid = function (prefix) {\n return \"\" + prefix + this.rowUid++;\n };\n /**\n * @hidden\n */\n Grid.prototype.getMovableVirtualContent = function () {\n return this.getContent().querySelector('.e-movablecontent');\n };\n /**\n * @hidden\n */\n Grid.prototype.getFrozenVirtualContent = function () {\n return this.getContent().querySelector('.e-frozencontent');\n };\n /**\n * @hidden\n */\n Grid.prototype.getMovableVirtualHeader = function () {\n return this.getHeaderContent().querySelector('.e-movableheader');\n };\n /**\n * @hidden\n */\n Grid.prototype.getFrozenVirtualHeader = function () {\n return this.getHeaderContent().querySelector('.e-frozenheader');\n };\n /**\n * @hidden\n */\n Grid.prototype.getRowElementByUID = function (uid) {\n var rowEle;\n var rows = [];\n if (this.isFrozenGrid()) {\n var fRows = [].slice.call(this.getFrozenVirtualContent().querySelector('tbody').children);\n var mRows = [].slice.call(this.getMovableVirtualContent().querySelector('tbody').children);\n var frozenRigtRows = [];\n if (this.tablesCount === 3) {\n frozenRigtRows = [].slice.call(this.getContent().querySelector('.e-frozen-right-content').querySelector('tbody').children);\n }\n if (this.frozenRows) {\n rows = [].slice.call(this.getFrozenVirtualHeader().querySelector('tbody').children);\n rows = rows.concat([].slice.call(this.getMovableVirtualHeader().querySelector('tbody').children));\n if (this.tablesCount === 3) {\n var frHdr = this.getHeaderContent().querySelector('.e-frozen-right-header');\n rows = rows.concat([].slice.call(frHdr.querySelector('tbody').children)).concat(frozenRigtRows);\n }\n ;\n rows = rows.concat(fRows).concat(mRows);\n }\n else {\n rows = fRows.concat(mRows).concat(frozenRigtRows);\n }\n }\n else {\n var cntRows = [].slice.call(this.getContent().querySelector('tbody').children);\n if (this.frozenRows) {\n rows = [].slice.call(this.getHeaderContent().querySelector('tbody').children);\n rows = rows.concat(cntRows);\n }\n else {\n rows = cntRows;\n }\n }\n for (var _i = 0, rows_2 = rows; _i < rows_2.length; _i++) {\n var row = rows_2[_i];\n if (row.getAttribute('data-uid') === uid) {\n rowEle = row;\n break;\n }\n }\n return rowEle;\n };\n /**\n * Gets the hidden columns from the Grid.\n * @return {Column[]}\n * @blazorType List\n */\n Grid.prototype.getHiddenColumns = function () {\n var cols = [];\n for (var _i = 0, _a = this.columnModel; _i < _a.length; _i++) {\n var col = _a[_i];\n if (col.visible === false) {\n cols.push(col);\n }\n }\n return cols;\n };\n /**\n * calculatePageSizeByParentHeight\n\n */\n Grid.prototype.calculatePageSizeByParentHeight = function (containerHeight) {\n if (this.allowPaging) {\n if ((this.allowTextWrap && this.textWrapSettings.wrapMode == 'Header') || (!this.allowTextWrap)) {\n var pagesize = 0;\n if (containerHeight.indexOf('%') != -1) {\n containerHeight = parseInt(containerHeight) / 100 * this.element.clientHeight;\n }\n var nonContentHeight = this.getNoncontentHeight() + this.getRowHeight();\n if (containerHeight > nonContentHeight) {\n var contentHeight = 0;\n contentHeight = containerHeight - this.getNoncontentHeight();\n pagesize = (contentHeight / this.getRowHeight());\n }\n if (pagesize > 0) {\n return Math.floor(pagesize);\n }\n }\n }\n return 0;\n };\n Grid.prototype.getNoncontentHeight = function () {\n var height = 0;\n if (!isNullOrUndefined(this.getHeaderContent().clientHeight)) {\n height += this.getHeaderContent().clientHeight;\n }\n if (this.toolbar && !isNullOrUndefined(this.element.querySelector('.e-toolbar').clientHeight)) {\n height += this.element.querySelector('.e-toolbar').clientHeight;\n }\n if (this.allowPaging && !isNullOrUndefined(this.element.querySelector('.e-gridpager').clientHeight)) {\n height += this.element.querySelector('.e-gridpager').clientHeight;\n }\n if (this.showColumnChooser && !isNullOrUndefined(this.element.querySelector(\".e-columnheader\").clientHeight)) {\n height += this.element.querySelector(\".e-columnheader\").clientHeight;\n }\n if (this.allowGrouping && this.groupSettings.showDropArea && !isNullOrUndefined(this.element.querySelector('.e-groupdroparea').clientHeight)) {\n height += this.element.querySelector('.e-groupdroparea').clientHeight;\n }\n if (this.aggregates.length > 0 && !isNullOrUndefined(this.element.querySelector('.e-summaryrow').clientHeight)) {\n for (var i = 0; i < this.element.querySelectorAll('.e-summaryrow').length; i++) {\n height += this.element.querySelectorAll('.e-summaryrow')[i].clientHeight;\n }\n }\n return height;\n };\n /**\n *To perform aggregate operation on a column.\n *@param {AggregateColumnModel} summaryCol - Pass Aggregate Column details.\n *@param {Object} summaryData - Pass JSON Array for which its field values to be calculated.\n\n */\n Grid.prototype.getSummaryValues = function (summaryCol, summaryData) {\n return DataUtil.aggregates[summaryCol.type.toLowerCase()](summaryData, summaryCol.field);\n };\n /**\n * Sends a Post request to export Grid to Excel data in server side.\n * @param {string} url - Pass Url for server side excel export action.\n * @return {void}\n */\n Grid.prototype.serverExcelExport = function (url) {\n this.isExcel = true;\n this.exportGrid(url);\n };\n /**\n * Sends a Post request to export Grid to Pdf data in server side.\n * @param {string} url - Pass Url for server side pdf export action.\n * @return {void}\n */\n Grid.prototype.serverPdfExport = function (url) {\n this.isExcel = false;\n this.exportGrid(url);\n };\n /**\n * @hidden\n */\n Grid.prototype.exportGrid = function (url) {\n var _this = this;\n var grid = this;\n var query = grid.getDataModule().generateQuery(true);\n var state = new UrlAdaptor().processQuery(new DataManager({ url: '' }), query);\n var queries = state.data;\n var gridModel = JSON.parse(this.addOnPersist(['allowGrouping', 'allowPaging', 'pageSettings', 'sortSettings', 'allowPdfExport', 'allowExcelExport', 'aggregates',\n 'filterSettings', 'groupSettings', 'columns', 'locale', 'searchSettings']));\n gridModel.filterSettings.columns = JSON.parse(queries).where;\n gridModel.columns.forEach(function (e) {\n var column = grid.getColumnByUid(e.uid);\n if (column) {\n e.headerText = column.headerText;\n if (!isNullOrUndefined(column.template)) {\n e.template = \"true\";\n }\n ;\n if (e.format) {\n e.format = getNumberFormat(_this.getFormat(e.format), e.type, _this.isExcel);\n }\n }\n if (e.columns) {\n _this.setHeaderText(e.columns);\n }\n });\n var form = this.createElement('form', { id: 'ExportForm', styles: 'display:none;' });\n var gridInput = this.createElement('input', { id: 'gridInput', attrs: { name: \"gridModel\" } });\n gridInput.value = JSON.stringify(gridModel);\n form.method = \"POST\";\n form.action = url;\n form.appendChild(gridInput);\n document.body.appendChild(form);\n form.submit();\n form.remove();\n };\n /**\n * @hidden\n */\n Grid.prototype.setHeaderText = function (columns) {\n for (var i = 0; i < columns.length; i++) {\n var column = this.getColumnByUid(columns[i].uid);\n columns[i].headerText = column.headerText;\n if (!isNullOrUndefined(column.template)) {\n columns[i].template = \"true\";\n }\n ;\n if (columns[i].format) {\n columns[i].format = getNumberFormat(this.getFormat(columns[i].format), columns[i].type, this.isExcel);\n }\n if (columns[i].columns) {\n this.setHeaderText(columns[i].columns);\n }\n }\n };\n Grid.prototype.getFormat = function (format) {\n return typeof (format) === 'object' ? !isNullOrUndefined(format.format) ?\n format.format : format.skeleton : format;\n };\n /**\n * @hidden\n */\n Grid.prototype.isCollapseStateEnabled = function () {\n var isExpanded = 'isExpanded';\n return this[isExpanded] === false;\n };\n /**\n * @param {number} key - Defines the primary key value.\n * @param {Object} value - Defines the row data.\n\n */\n Grid.prototype.updateRowValue = function (key, rowData) {\n var args = {\n requestType: 'save', data: rowData,\n };\n this.showSpinner();\n this.notify(events.updateData, args);\n this.refresh();\n };\n /**\n * @hidden\n */\n Grid.prototype.setForeignKeyData = function () {\n this.dataBind();\n var colpending = this.getDataModule().getForeignKeyDataState();\n if (colpending.isPending) {\n this.getDataModule().setForeignKeyDataState({});\n colpending.resolver();\n }\n else {\n this.getDataModule().setForeignKeyDataState({ isDataChanged: false });\n if (this.contentModule || this.headerModule) {\n this.renderModule.render();\n }\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.resetFilterDlgPosition = function (field) {\n var header = this.getColumnHeaderByField(field);\n if (header) {\n var target = header.querySelector('.e-filtermenudiv');\n var filterDlg = this.element.querySelector('.e-filter-popup');\n if (target && filterDlg) {\n var gClient = this.element.getBoundingClientRect();\n var fClient = target.getBoundingClientRect();\n if (filterDlg) {\n filterDlg.style.left = (fClient.right - gClient.left).toString() + 'px';\n }\n }\n }\n };\n /**\n * @hidden\n */\n Grid.prototype.renderTemplates = function () {\n var portals = 'portals';\n this.notify('reactTemplateRender', this[portals]);\n this.renderReactTemplates();\n };\n /**\n * Apply the changes to the Grid without refreshing the rows.\n * @param {BatchChanges} changes - Defines changes to be updated.\n * @return {void}\n */\n Grid.prototype.batchUpdate = function (changes) {\n this.processRowChanges(changes);\n };\n /**\n * Apply the changes to the Grid in one batch after 50ms without refreshing the rows.\n * @param {BatchChanges} changes - Defines changes to be updated.\n * @return {void}\n */\n Grid.prototype.batchAsyncUpdate = function (changes) {\n this.processBulkRowChanges(changes);\n };\n Grid.prototype.processBulkRowChanges = function (changes) {\n var _this = this;\n if (!this.dataToBeUpdated) {\n this.dataToBeUpdated = Object.assign({ addedRecords: [], changedRecords: [], deletedRecords: [] }, changes);\n setTimeout(function () {\n _this.processRowChanges(_this.dataToBeUpdated);\n _this.dataToBeUpdated = null;\n }, this.asyncTimeOut);\n }\n else {\n var loopstring = ['addedRecords', 'changedRecords', 'deletedRecords'];\n var keyField = this.getPrimaryKeyFieldNames()[0];\n for (var i = 0; i < loopstring.length; i++) {\n if (changes[loopstring[i]]) {\n compareChanges(this, changes, loopstring[i], keyField);\n }\n }\n }\n };\n Grid.prototype.processRowChanges = function (changes) {\n var _this = this;\n var keyField = this.getPrimaryKeyFieldNames()[0];\n changes = Object.assign({ addedRecords: [], changedRecords: [], deletedRecords: [] }, changes);\n var promise = this.getDataModule().saveChanges(changes, keyField, {}, this.getDataModule().generateQuery().requiresCount());\n if (this.getDataModule().isRemote()) {\n promise.then(function (e) {\n _this.setNewData();\n });\n }\n else {\n this.setNewData();\n }\n };\n Grid.prototype.setNewData = function () {\n var _this = this;\n var oldValues = JSON.parse(JSON.stringify(this.getCurrentViewRecords()));\n var getData = this.getDataModule().getData({}, this.getDataModule().generateQuery().requiresCount());\n getData.then(function (e) {\n _this.bulkRefresh(e.result, oldValues, e.count);\n });\n };\n Grid.prototype.deleteRowElement = function (row) {\n var tr = this.getRowElementByUID(row.uid);\n var index = parseInt(tr.getAttribute('aria-rowindex'), 10);\n remove(tr);\n if (this.getFrozenColumns()) {\n var mtr = this.getMovableRows()[index];\n remove(mtr);\n }\n };\n Grid.prototype.bulkRefresh = function (result, oldValues, count) {\n var _this = this;\n var rowObj = this.getRowsObject();\n var keyField = this.getPrimaryKeyFieldNames()[0];\n var _loop_3 = function (i) {\n if (!result.filter(function (e) { return e[keyField] === rowObj[i].data[keyField]; }).length) {\n this_3.deleteRowElement(rowObj[i]);\n rowObj.splice(i, 1);\n i--;\n }\n out_i_1 = i;\n };\n var this_3 = this, out_i_1;\n for (var i = 0; i < rowObj.length; i++) {\n _loop_3(i);\n i = out_i_1;\n }\n var _loop_4 = function (i) {\n var isRowExist;\n oldValues.filter(function (e) {\n if (e[keyField] === result[i][keyField]) {\n if (e !== result[i]) {\n _this.setRowData(result[i][keyField], result[i]);\n }\n isRowExist = true;\n }\n });\n if (!isRowExist) {\n this_4.renderRowElement(result[i], i);\n }\n };\n var this_4 = this;\n for (var i = 0; i < result.length; i++) {\n _loop_4(i);\n }\n this.currentViewData = result;\n var rows = [].slice.call(this.getContentTable().querySelectorAll('.e-row'));\n resetRowIndex(this, this.getRowsObject(), rows);\n setRowElements(this);\n if (this.allowPaging) {\n this.notify(events.inBoundModelChanged, { module: 'pager', properties: { totalRecordsCount: count } });\n }\n };\n Grid.prototype.renderRowElement = function (data, index) {\n var row = new RowRenderer(this.serviceLocator, null, this);\n var model = new RowModelGenerator(this);\n var modelData = model.generateRows([data]);\n var tr = row.render(modelData[0], this.getColumns());\n var mTr;\n var mTbody;\n this.addRowObject(modelData[0], index);\n var tbody = this.getContentTable().querySelector('tbody');\n if (tbody.querySelector('.e-emptyrow')) {\n var emptyRow = tbody.querySelector('.e-emptyrow');\n emptyRow.parentNode.removeChild(emptyRow);\n if (this.getFrozenColumns()) {\n var moveTbody = this.getContent().querySelector('.e-movablecontent').querySelector('tbody');\n (moveTbody.firstElementChild).parentNode.removeChild(moveTbody.firstElementChild);\n }\n }\n if (this.getFrozenColumns()) {\n mTr = renderMovable(tr, this.getFrozenColumns(), this);\n if (this.frozenRows && index < this.frozenRows) {\n mTbody = this.getHeaderContent().querySelector('.e-movableheader').querySelector('tbody');\n }\n else {\n mTbody = this.getContent().querySelector('.e-movablecontent').querySelector('tbody');\n }\n mTbody.appendChild(mTr);\n if (this.height === 'auto') {\n this.notify(events.frozenHeight, {});\n }\n }\n if (this.frozenRows && index < this.frozenRows) {\n tbody = this.getHeaderContent().querySelector('tbody');\n }\n else {\n tbody = this.getContent().querySelector('tbody');\n }\n tbody = this.getContent().querySelector('tbody');\n tbody.appendChild(tr);\n };\n Grid.prototype.addRowObject = function (row, index) {\n var frzCols = this.getFrozenColumns();\n if (frzCols) {\n var mRows = this.getMovableRowsObject();\n var mRow = row.clone();\n mRow.cells = mRow.cells.slice(frzCols);\n row.cells = row.cells.slice(0, frzCols);\n mRows.splice(index, 1, mRow);\n }\n this.getRowsObject().splice(index, 1, row);\n };\n /**\n * @hidden\n */\n Grid.prototype.getHeight = function (height) {\n if (!Number.isInteger(height) && height.indexOf('%') != -1) {\n height = parseInt(height) / 100 * this.element.clientHeight;\n }\n else if (!Number.isInteger(height) && this.height !== 'auto') {\n height = parseInt(height);\n }\n else {\n height = this.height;\n }\n return height;\n };\n /** @hidden */\n Grid.prototype.getFrozenRightContent = function () {\n return this.getContent().querySelector('.e-frozen-right-content');\n };\n /** @hidden */\n Grid.prototype.getFrozenRightHeader = function () {\n return this.getHeaderContent().querySelector('.e-frozen-right-header');\n };\n /** @hidden */\n Grid.prototype.getMovableHeaderTbody = function () {\n return this.getMovableVirtualHeader().querySelector('tbody');\n };\n /** @hidden */\n Grid.prototype.getMovableContentTbody = function () {\n return this.getMovableVirtualContent().querySelector('tbody');\n };\n /** @hidden */\n Grid.prototype.getFrozenHeaderTbody = function () {\n return this.getFrozenVirtualHeader().querySelector('tbody');\n };\n /** @hidden */\n Grid.prototype.getFrozenLeftContentTbody = function () {\n return this.getFrozenVirtualContent().querySelector('tbody');\n };\n /** @hidden */\n Grid.prototype.getFrozenRightHeaderTbody = function () {\n return this.getFrozenRightHeader().querySelector('tbody');\n };\n /** @hidden */\n Grid.prototype.getFrozenRightContentTbody = function () {\n var cnt = this.getFrozenRightContent();\n var tbody;\n if (cnt) {\n tbody = this.getFrozenRightContent().querySelector('tbody');\n }\n return tbody;\n };\n /** @hidden */\n Grid.prototype.showResponsiveCustomFilter = function () {\n if (this.filterModule) {\n this.filterModule.showCustomFilter();\n }\n };\n /** @hidden */\n Grid.prototype.showResponsiveCustomSort = function () {\n if (this.sortModule) {\n this.sortModule.showCustomFilter();\n }\n };\n var Grid_1;\n __decorate([\n Property()\n ], Grid.prototype, \"parentDetails\", void 0);\n __decorate([\n Property([])\n ], Grid.prototype, \"columns\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"enableAltRow\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"enableHover\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableAutoFill\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"allowKeyboard\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowTextWrap\", void 0);\n __decorate([\n Complex({}, TextWrapSettings)\n ], Grid.prototype, \"textWrapSettings\", void 0);\n __decorate([\n Complex({}, ResizeSettings)\n ], Grid.prototype, \"resizeSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowPaging\", void 0);\n __decorate([\n Complex({}, PageSettings)\n ], Grid.prototype, \"pageSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableVirtualization\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableColumnVirtualization\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableInfiniteScrolling\", void 0);\n __decorate([\n Complex({}, SearchSettings)\n ], Grid.prototype, \"searchSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowSorting\", void 0);\n __decorate([\n Property('Ellipsis')\n ], Grid.prototype, \"clipMode\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"allowMultiSorting\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowExcelExport\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowPdfExport\", void 0);\n __decorate([\n Complex({}, SortSettings)\n ], Grid.prototype, \"sortSettings\", void 0);\n __decorate([\n Complex({}, InfiniteScrollSettings)\n ], Grid.prototype, \"infiniteScrollSettings\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"allowSelection\", void 0);\n __decorate([\n Property(-1)\n ], Grid.prototype, \"selectedRowIndex\", void 0);\n __decorate([\n Complex({}, SelectionSettings)\n ], Grid.prototype, \"selectionSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowFiltering\", void 0);\n __decorate([\n Property('Horizontal')\n ], Grid.prototype, \"rowRenderingMode\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableAdaptiveUI\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowReordering\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowResizing\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowRowDragAndDrop\", void 0);\n __decorate([\n Complex({}, RowDropSettings)\n ], Grid.prototype, \"rowDropSettings\", void 0);\n __decorate([\n Complex({}, FilterSettings)\n ], Grid.prototype, \"filterSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowGrouping\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableImmutableMode\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"showColumnMenu\", void 0);\n __decorate([\n Complex({}, GroupSettings)\n ], Grid.prototype, \"groupSettings\", void 0);\n __decorate([\n Complex({}, EditSettings)\n ], Grid.prototype, \"editSettings\", void 0);\n __decorate([\n Collection([], AggregateRow)\n ], Grid.prototype, \"aggregates\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"showColumnChooser\", void 0);\n __decorate([\n Complex({}, ColumnChooserSettings)\n ], Grid.prototype, \"columnChooserSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableHeaderFocus\", void 0);\n __decorate([\n Property('auto')\n ], Grid.prototype, \"height\", void 0);\n __decorate([\n Property('auto')\n ], Grid.prototype, \"width\", void 0);\n __decorate([\n Property('Default')\n ], Grid.prototype, \"gridLines\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"rowTemplate\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"detailTemplate\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"childGrid\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"queryString\", void 0);\n __decorate([\n Property('AllPages')\n ], Grid.prototype, \"printMode\", void 0);\n __decorate([\n Property('Expanded')\n ], Grid.prototype, \"hierarchyPrintMode\", void 0);\n __decorate([\n Property([])\n ], Grid.prototype, \"dataSource\", void 0);\n __decorate([\n Property(null)\n ], Grid.prototype, \"rowHeight\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"query\", void 0);\n __decorate([\n Property('USD')\n ], Grid.prototype, \"currencyCode\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"toolbar\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"contextMenuItems\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"columnMenuItems\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"toolbarTemplate\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"pagerTemplate\", void 0);\n __decorate([\n Property(0)\n ], Grid.prototype, \"frozenRows\", void 0);\n __decorate([\n Property(0)\n ], Grid.prototype, \"frozenColumns\", void 0);\n __decorate([\n Property('All')\n ], Grid.prototype, \"columnQueryMode\", void 0);\n __decorate([\n Property({})\n ], Grid.prototype, \"currentAction\", void 0);\n __decorate([\n Property('18.4.49')\n ], Grid.prototype, \"ej2StatePersistenceVersion\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"destroyed\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"load\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"queryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"headerCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"actionBegin\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"actionComplete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"actionFailure\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"dataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"recordDoubleClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"recordClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowSelecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowSelected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDeselecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDeselected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellSelecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellSelected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellDeselecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellDeselected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnSelecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnSelected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDeselecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDeselected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDragStart\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDrag\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDrop\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"printComplete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforePrint\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"pdfQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"pdfHeaderQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"pdfAggregateQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"excelAggregateQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"exportDetailDataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"excelQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"excelHeaderQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeExcelExport\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"excelExportComplete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforePdfExport\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"pdfExportComplete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDragStartHelper\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"detailDataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDragStart\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDrag\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDrop\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"toolbarClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeOpenColumnChooser\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"batchAdd\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"batchDelete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"batchCancel\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeBatchAdd\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeBatchDelete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeBatchSave\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beginEdit\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"commandClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellEdit\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellSave\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellSaved\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"resizeStart\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"resizing\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"resizeStop\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"keyPressed\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeDataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"contextMenuOpen\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"contextMenuClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnMenuOpen\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnMenuClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"checkBoxChange\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeCopy\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforePaste\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeAutoFill\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDataStateChange\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"dataStateChange\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"dataSourceChanged\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"exportGroupCaption\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"lazyLoadGroupExpand\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"lazyLoadGroupCollapse\", void 0);\n Grid = Grid_1 = __decorate([\n NotifyPropertyChanges\n ], Grid);\n return Grid;\n}(Component));\nexport { Grid };\n","import { remove } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, extend, isBlazor, updateBlazorTemplate } from '@syncfusion/ej2-base';\nimport { doesImplementInterface, setStyleAndAttributes, appendChildren, extendObjWithFn } from '../base/util';\nimport { createCheckBox } from '@syncfusion/ej2-buttons';\nimport { foreignKeyData } from '../base/constant';\nimport { CellType } from '../base/enum';\n/**\n * CellRenderer class which responsible for building cell content.\n * @hidden\n */\nvar CellRenderer = /** @class */ (function () {\n function CellRenderer(parent, locator) {\n this.localizer = locator.getService('localization');\n this.formatter = locator.getService('valueFormatter');\n this.parent = parent;\n this.element = this.parent.createElement('TD', { className: 'e-rowcell', attrs: { role: 'gridcell', tabindex: '-1' } });\n this.rowChkBox = this.parent.createElement('input', { className: 'e-checkselect', attrs: { 'type': 'checkbox' } });\n }\n /**\n * Function to return the wrapper for the TD content\n * @returns string\n */\n CellRenderer.prototype.getGui = function () {\n return '';\n };\n /**\n * Function to format the cell value.\n * @param {Column} column\n * @param {Object} value\n * @param {Object} data\n */\n CellRenderer.prototype.format = function (column, value, data) {\n if (!isNullOrUndefined(column.format)) {\n if (column.type === 'number' && isNaN(parseInt(value, 10))) {\n value = null;\n }\n value = this.formatter.toView(value, column.getFormatter());\n }\n return isNullOrUndefined(value) ? '' : value.toString();\n };\n CellRenderer.prototype.evaluate = function (node, cell, data, attributes, fData, isEdit) {\n var _a;\n var result;\n if (cell.column.template) {\n var isReactCompiler = this.parent.isReact && typeof (cell.column.template) !== 'string';\n var literals = ['index'];\n var dummyData = extendObjWithFn({}, data, (_a = {}, _a[foreignKeyData] = fData, _a.column = cell.column, _a));\n var templateID = this.parent.element.id + cell.column.uid;\n var str = 'isStringTemplate';\n var index = 'index';\n if (isBlazor() && isEdit) {\n var rNumber = this.parent.editSettings.mode !== 'Batch' ? parseInt(attributes[index], 10) : null;\n result = cell.column.getColumnTemplate()(extend({ 'index': attributes[literals[0]] }, dummyData), this.parent, 'template', templateID, this.parent[str], rNumber);\n window[templateID] = null;\n if (this.parent.editSettings.mode !== 'Batch') {\n updateBlazorTemplate(templateID, 'Template', cell.column, false);\n }\n }\n else {\n if (isReactCompiler) {\n var copied = { 'index': attributes[literals[0]] };\n cell.column.getColumnTemplate()(extend(copied, dummyData), this.parent, 'columnTemplate', templateID, this.parent[str], null, node);\n this.parent.renderTemplates();\n }\n else {\n result = cell.column.getColumnTemplate()(extend({ 'index': attributes[literals[0]] }, dummyData), this.parent, 'template', templateID, this.parent[str]);\n }\n }\n if (!isReactCompiler) {\n appendChildren(node, result);\n }\n this.parent.notify('template-result', { template: result });\n result = null;\n node.setAttribute('aria-label', node.innerText + ' is template cell' + ' column header ' +\n cell.column.headerText);\n return false;\n }\n return true;\n };\n /**\n * Function to invoke the custom formatter available in the column object.\n * @param {Column} column\n * @param {Object} value\n * @param {Object} data\n */\n CellRenderer.prototype.invokeFormatter = function (column, value, data) {\n if (!isNullOrUndefined(column.formatter)) {\n if (doesImplementInterface(column.formatter, 'getValue')) {\n var formatter = column.formatter;\n value = new formatter().getValue(column, data);\n }\n else if (typeof column.formatter === 'function') {\n value = column.formatter(column, data);\n }\n else {\n value = column.formatter.getValue(column, data);\n }\n }\n return value;\n };\n /**\n * Function to render the cell content based on Column object.\n * @param {Column} column\n * @param {Object} data\n * @param {{[x:string]:Object}} attributes?\n * @param {Element}\n */\n CellRenderer.prototype.render = function (cell, data, attributes, isExpand, isEdit) {\n return this.refreshCell(cell, data, attributes, isEdit);\n };\n /**\n * Function to refresh the cell content based on Column object.\n * @param {Column} column\n * @param {Object} data\n * @param {{[x:string]:Object}} attributes?\n * @param {Element}\n */\n CellRenderer.prototype.refreshTD = function (td, cell, data, attributes) {\n var isEdit = this.parent.editSettings.mode === 'Batch' && td.classList.contains('e-editedbatchcell');\n if (this.parent.isReact) {\n td.innerHTML = '';\n var cellIndex = td.cellIndex;\n var parentRow = td.parentElement;\n remove(td);\n var newTD = this.refreshCell(cell, data, attributes, isEdit);\n this.cloneAttributes(newTD, td);\n parentRow.cells.length !== cellIndex - 1 ? parentRow.insertBefore(newTD, parentRow.cells[cellIndex])\n : parentRow.appendChild(newTD);\n }\n else {\n var node = this.refreshCell(cell, data, attributes, isEdit);\n td.innerHTML = '';\n td.setAttribute('aria-label', node.getAttribute('aria-label'));\n var elements = [].slice.call(node.childNodes);\n for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {\n var elem = elements_1[_i];\n td.appendChild(elem);\n }\n }\n };\n // tslint:disable-next-line:no-any\n CellRenderer.prototype.cloneAttributes = function (target, source) {\n // tslint:disable-next-line:no-any\n var attrs = source.attributes;\n // tslint:disable-next-line:no-any\n var i = attrs.length;\n // tslint:disable-next-line:no-any\n var attr;\n while (i--) {\n attr = attrs[i];\n target.setAttribute(attr.name, attr.value);\n }\n };\n CellRenderer.prototype.refreshCell = function (cell, data, attributes, isEdit) {\n var _a;\n var node = this.element.cloneNode();\n var column = cell.column;\n var fData;\n if (cell.isForeignKey) {\n fData = cell.foreignKeyData[0] || (_a = {}, _a[column.foreignKeyValue] = column.format ? null : '', _a);\n }\n //Prepare innerHtml\n var innerHtml = this.getGui();\n var value = cell.isForeignKey ? this.getValue(column.foreignKeyValue, fData, column) :\n this.getValue(column.field, data, column);\n if ((column.type === 'date' || column.type === 'datetime') && !isNullOrUndefined(value)) {\n value = new Date(value);\n }\n value = this.format(column, value, data);\n innerHtml = value.toString();\n if (column.type === 'boolean' && !column.displayAsCheckBox) {\n var localeStr = (value !== 'true' && value !== 'false') ? null : value === 'true' ? 'True' : 'False';\n innerHtml = localeStr ? this.localizer.getConstant(localeStr) : innerHtml;\n }\n var fromFormatter = this.invokeFormatter(column, value, data);\n innerHtml = !isNullOrUndefined(column.formatter) ? isNullOrUndefined(fromFormatter) ? '' : fromFormatter.toString() : innerHtml;\n node.setAttribute('aria-label', innerHtml + ' column header ' + cell.column.headerText);\n if (this.evaluate(node, cell, data, attributes, fData, isEdit) && column.type !== 'checkbox') {\n this.appendHtml(node, innerHtml, column.getDomSetter ? column.getDomSetter() : 'innerHTML');\n }\n else if (column.type === 'checkbox') {\n node.classList.add('e-gridchkbox');\n node.setAttribute('aria-label', 'checkbox');\n if (this.parent.selectionSettings.persistSelection) {\n value = value === 'true';\n }\n else {\n value = false;\n }\n var checkWrap = createCheckBox(this.parent.createElement, false, { checked: value, label: ' ' });\n checkWrap.insertBefore(this.rowChkBox.cloneNode(), checkWrap.firstChild);\n node.appendChild(checkWrap);\n }\n if (this.parent.checkAllRows === 'Check' && this.parent.enableVirtualization) {\n cell.isSelected = true;\n }\n this.setAttributes(node, cell, attributes);\n if (column.type === 'boolean' && column.displayAsCheckBox) {\n var checked = isNaN(parseInt(value.toString(), 10)) ? value === 'true' : parseInt(value.toString(), 10) > 0;\n var checkWrap = createCheckBox(this.parent.createElement, false, { checked: checked, label: ' ' });\n node.innerHTML = '';\n checkWrap.classList.add('e-checkbox-disabled');\n node.appendChild(checkWrap);\n node.setAttribute('aria-label', checked + ' column header ' + cell.column.headerText);\n }\n return node;\n };\n /**\n * Function to specifies how the result content to be placed in the cell.\n * @param {Element} node\n * @param {string|Element} innerHtml\n * @returns Element\n */\n CellRenderer.prototype.appendHtml = function (node, innerHtml, property) {\n if (property === void 0) { property = 'innerHTML'; }\n node[property] = innerHtml;\n return node;\n };\n /**\n * @hidden\n */\n CellRenderer.prototype.setAttributes = function (node, cell, attributes) {\n var column = cell.column;\n this.buildAttributeFromCell(node, cell, column.type === 'checkbox');\n setStyleAndAttributes(node, attributes);\n setStyleAndAttributes(node, cell.attributes);\n if (column.customAttributes) {\n setStyleAndAttributes(node, column.customAttributes);\n }\n if (this.parent.rowRenderingMode === 'Vertical') {\n setStyleAndAttributes(node, { 'data-cell': column.headerText });\n }\n if (column.textAlign) {\n node.style.textAlign = column.textAlign;\n }\n if (column.clipMode === 'Clip' || (!column.clipMode && this.parent.clipMode === 'Clip')) {\n node.classList.add('e-gridclip');\n }\n else if (column.clipMode === 'EllipsisWithTooltip' || (!column.clipMode && this.parent.clipMode === 'EllipsisWithTooltip')) {\n if (column.type !== 'checkbox') {\n node.classList.add('e-ellipsistooltip');\n }\n }\n };\n CellRenderer.prototype.buildAttributeFromCell = function (node, cell, isCheckBoxType) {\n var attr = {};\n var prop = { 'colindex': 'aria-colindex' };\n var classes = [];\n if (cell.colSpan) {\n attr.colSpan = cell.colSpan;\n }\n if (cell.rowSpan) {\n attr.rowSpan = cell.rowSpan;\n }\n if (cell.isTemplate) {\n classes.push('e-templatecell');\n }\n if (cell.isSelected) {\n classes.push.apply(classes, ['e-selectionbackground', 'e-active']);\n if (isCheckBoxType) {\n node.querySelector('.e-frame').classList.add('e-check');\n }\n }\n if (cell.isColumnSelected) {\n classes.push.apply(classes, ['e-columnselection']);\n }\n if (cell.cellType === CellType.Header) {\n attr[prop.colindex] = cell.colIndex;\n }\n else if (!isNullOrUndefined(cell.index)) {\n attr[prop.colindex] = cell.index;\n }\n if (!cell.visible) {\n classes.push('e-hide');\n }\n attr.class = classes;\n setStyleAndAttributes(node, attr);\n };\n CellRenderer.prototype.getValue = function (field, data, column) {\n return column.valueAccessor(field, data, column);\n };\n return CellRenderer;\n}());\nexport { CellRenderer };\n","import { isNullOrUndefined, isBlazor } from '@syncfusion/ej2-base';\nimport { EventHandler } from '@syncfusion/ej2-base';\nimport { createElement, classList, append } from '@syncfusion/ej2-base';\n/**\n * `NumericContainer` module handles rendering and refreshing numeric container.\n */\nvar NumericContainer = /** @class */ (function () {\n /**\n * Constructor for numericContainer module\n * @hidden\n */\n function NumericContainer(pagerModule) {\n this.pagerModule = pagerModule;\n }\n /**\n * The function is used to render numericContainer\n * @hidden\n */\n NumericContainer.prototype.render = function () {\n this.pagerElement = this.pagerModule.element;\n this.renderNumericContainer();\n this.refreshNumericLinks();\n this.wireEvents();\n };\n /**\n * Refreshes the numeric container of Pager.\n */\n NumericContainer.prototype.refresh = function () {\n this.pagerModule.updateTotalPages();\n if (this.links.length) {\n this.updateLinksHtml();\n }\n this.updateStyles();\n };\n /**\n * The function is used to refresh refreshNumericLinks\n * @hidden\n */\n NumericContainer.prototype.refreshNumericLinks = function () {\n var link;\n var pagerObj = this.pagerModule;\n var div = pagerObj.element.querySelector('.e-numericcontainer');\n var frag = document.createDocumentFragment();\n div.innerHTML = '';\n for (var i = 1; i <= pagerObj.pageCount; i++) {\n link = createElement('a', {\n className: 'e-link e-numericitem e-spacing e-pager-default',\n attrs: { role: 'link', tabindex: '-1', 'aria-label': 'Goto Page ' + i,\n href: 'javascript:void(0);', name: 'Goto page' + i }\n });\n if (pagerObj.currentPage === i) {\n classList(link, ['e-currentitem', 'e-active'], ['e-pager-default']);\n }\n frag.appendChild(link);\n }\n div.appendChild(frag);\n this.links = [].slice.call(div.childNodes);\n };\n /**\n * Binding events to the element while component creation\n * @hidden\n */\n NumericContainer.prototype.wireEvents = function () {\n EventHandler.add(this.pagerElement, 'click', this.clickHandler, this);\n };\n /**\n * Unbinding events from the element while component destroy\n * @hidden\n */\n NumericContainer.prototype.unwireEvents = function () {\n EventHandler.remove(this.pagerModule.element, 'click', this.clickHandler);\n };\n /**\n * To destroy the PagerMessage\n * @method destroy\n * @return {void}\n * @hidden\n */\n NumericContainer.prototype.destroy = function () {\n this.unwireEvents();\n };\n NumericContainer.prototype.renderNumericContainer = function () {\n this.element = createElement('div', {\n className: 'e-pagercontainer', attrs: { 'role': 'navigation' }\n });\n this.renderFirstNPrev(this.element);\n this.renderPrevPagerSet(this.element);\n this.element.appendChild(createElement('div', { className: 'e-numericcontainer' }));\n this.renderNextPagerSet(this.element);\n this.renderNextNLast(this.element);\n this.pagerModule.element.appendChild(this.element);\n };\n NumericContainer.prototype.renderFirstNPrev = function (pagerContainer) {\n this.first = createElement('div', {\n className: 'e-first e-icons e-icon-first',\n attrs: {\n title: isBlazor() ? this.pagerModule.getLocalizedLabel('FirstPageTooltip') :\n this.pagerModule.getLocalizedLabel('firstPageTooltip'),\n 'aria-label': isBlazor() ? this.pagerModule.getLocalizedLabel('FirstPageTooltip') :\n this.pagerModule.getLocalizedLabel('firstPageTooltip'),\n tabindex: '-1'\n }\n });\n this.prev = createElement('div', {\n className: 'e-prev e-icons e-icon-prev',\n attrs: {\n title: isBlazor() ? this.pagerModule.getLocalizedLabel('PreviousPageTooltip') :\n this.pagerModule.getLocalizedLabel('previousPageTooltip'),\n 'aria-label': isBlazor() ? this.pagerModule.getLocalizedLabel('PreviousPageTooltip') :\n this.pagerModule.getLocalizedLabel('previousPageTooltip'),\n tabindex: '-1'\n }\n });\n append([this.first, this.prev], pagerContainer);\n };\n NumericContainer.prototype.renderPrevPagerSet = function (pagerContainer) {\n var prevPager = createElement('div');\n this.PP = createElement('a', {\n className: 'e-link e-pp e-spacing', innerHTML: '...',\n attrs: {\n title: isBlazor() ? this.pagerModule.getLocalizedLabel('PreviousPagerTooltip') :\n this.pagerModule.getLocalizedLabel('previousPagerTooltip'), role: 'link',\n 'aria-label': isBlazor() ? this.pagerModule.getLocalizedLabel('PreviousPagerTooltip') :\n this.pagerModule.getLocalizedLabel('previousPagerTooltip'),\n tabindex: '-1',\n name: isBlazor() ? this.pagerModule.getLocalizedLabel('PreviousPagerTooltip') :\n this.pagerModule.getLocalizedLabel('previousPagerTooltip'),\n href: 'javascript:void(0);'\n }\n });\n prevPager.appendChild(this.PP);\n pagerContainer.appendChild(prevPager);\n };\n NumericContainer.prototype.renderNextPagerSet = function (pagerContainer) {\n var nextPager = createElement('div');\n this.NP = createElement('a', {\n className: 'e-link e-np e-spacing',\n innerHTML: '...', attrs: {\n title: isBlazor() ? this.pagerModule.getLocalizedLabel('NextPagerTooltip') :\n this.pagerModule.getLocalizedLabel('nextPagerTooltip'), role: 'link',\n 'aria-label': isBlazor() ? this.pagerModule.getLocalizedLabel('NextPagerTooltip') :\n this.pagerModule.getLocalizedLabel('nextPagerTooltip'),\n tabindex: '-1',\n name: isBlazor() ? this.pagerModule.getLocalizedLabel('NextPagerTooltip') :\n this.pagerModule.getLocalizedLabel('nextPagerTooltip'),\n href: 'javascript:void(0);'\n }\n });\n nextPager.appendChild(this.NP);\n pagerContainer.appendChild(nextPager);\n };\n NumericContainer.prototype.renderNextNLast = function (pagerContainer) {\n this.next = createElement('div', {\n className: 'e-next e-icons e-icon-next',\n attrs: {\n title: isBlazor() ? this.pagerModule.getLocalizedLabel('NextPageTooltip') :\n this.pagerModule.getLocalizedLabel('nextPageTooltip'),\n 'aria-label': isBlazor() ? this.pagerModule.getLocalizedLabel('NextPageTooltip') :\n this.pagerModule.getLocalizedLabel('nextPageTooltip'),\n tabindex: '-1'\n }\n });\n this.last = createElement('div', {\n className: 'e-last e-icons e-icon-last',\n attrs: {\n title: isBlazor() ? this.pagerModule.getLocalizedLabel('LastPageTooltip') :\n this.pagerModule.getLocalizedLabel('lastPageTooltip'),\n 'aria-label': isBlazor() ? this.pagerModule.getLocalizedLabel('LastPageTooltip') :\n this.pagerModule.getLocalizedLabel('lastPageTooltip'),\n tabindex: '-1'\n }\n });\n append([this.next, this.last], pagerContainer);\n };\n NumericContainer.prototype.clickHandler = function (e) {\n var pagerObj = this.pagerModule;\n var target = e.target;\n pagerObj.previousPageNo = pagerObj.currentPage;\n if (!target.classList.contains('e-disable') && !isNullOrUndefined(target.getAttribute('index'))) {\n pagerObj.currentPage = parseInt(target.getAttribute('index'), 10);\n pagerObj.dataBind();\n }\n return false;\n };\n NumericContainer.prototype.updateLinksHtml = function () {\n var pagerObj = this.pagerModule;\n var currentPageSet;\n var pageNo;\n pagerObj.currentPage = pagerObj.totalPages === 1 ? 1 : pagerObj.currentPage;\n if (pagerObj.currentPage > pagerObj.totalPages && pagerObj.totalPages) {\n pagerObj.currentPage = pagerObj.totalPages;\n }\n currentPageSet = parseInt((pagerObj.currentPage / pagerObj.pageCount).toString(), 10);\n if (pagerObj.currentPage % pagerObj.pageCount === 0 && currentPageSet > 0) {\n currentPageSet = currentPageSet - 1;\n }\n for (var i = 0; i < pagerObj.pageCount; i++) {\n pageNo = (currentPageSet * pagerObj.pageCount) + 1 + i;\n if (pageNo <= pagerObj.totalPages) {\n this.links[i].style.display = '';\n this.links[i].setAttribute('index', pageNo.toString());\n this.links[i].innerHTML = !pagerObj.customText ? pageNo.toString() : pagerObj.customText + pageNo;\n if (pagerObj.currentPage !== pageNo) {\n this.links[i].classList.add('e-pager-default');\n }\n else {\n this.links[i].classList.remove('e-pager-default');\n }\n }\n else {\n this.links[i].innerHTML = !pagerObj.customText ? pageNo.toString() : pagerObj.customText + pageNo;\n this.links[i].style.display = 'none';\n }\n classList(this.links[i], [], ['e-currentitem', 'e-active']);\n }\n this.first.setAttribute('index', '1');\n this.last.setAttribute('index', pagerObj.totalPages.toString());\n this.prev.setAttribute('index', (pagerObj.currentPage - 1).toString());\n this.next.setAttribute('index', (pagerObj.currentPage + 1).toString());\n this.pagerElement.querySelector('.e-mfirst').setAttribute('index', '1');\n this.pagerElement.querySelector('.e-mlast').setAttribute('index', pagerObj.totalPages.toString());\n this.pagerElement.querySelector('.e-mprev').setAttribute('index', (pagerObj.currentPage - 1).toString());\n this.pagerElement.querySelector('.e-mnext').setAttribute('index', (pagerObj.currentPage + 1).toString());\n this.PP.setAttribute('index', (parseInt(this.links[0].getAttribute('index'), 10) - pagerObj.pageCount).toString());\n this.NP.setAttribute('index', (parseInt(this.links[this.links.length - 1].getAttribute('index'), 10) + 1).toString());\n };\n NumericContainer.prototype.updateStyles = function () {\n this.updateFirstNPrevStyles();\n this.updatePrevPagerSetStyles();\n this.updateNextPagerSetStyles();\n this.updateNextNLastStyles();\n if (this.links.length) {\n classList(this.links[(this.pagerModule.currentPage - 1) % this.pagerModule.pageCount], ['e-currentitem', 'e-active'], []);\n }\n };\n NumericContainer.prototype.updateFirstNPrevStyles = function () {\n var firstPage = ['e-firstpage', 'e-pager-default'];\n var firstPageDisabled = ['e-firstpagedisabled', 'e-disable'];\n var prevPage = ['e-prevpage', 'e-pager-default'];\n var prevPageDisabled = ['e-prevpagedisabled', 'e-disable'];\n if (this.pagerModule.totalPages > 0 && this.pagerModule.currentPage > 1) {\n classList(this.prev, prevPage, prevPageDisabled);\n classList(this.first, firstPage, firstPageDisabled);\n classList(this.pagerElement.querySelector('.e-mfirst'), firstPage, firstPageDisabled);\n classList(this.pagerElement.querySelector('.e-mprev'), prevPage, prevPageDisabled);\n }\n else {\n classList(this.prev, prevPageDisabled, prevPage);\n classList(this.first, firstPageDisabled, firstPage);\n classList(this.pagerElement.querySelector('.e-mprev'), prevPageDisabled, prevPage);\n classList(this.pagerElement.querySelector('.e-mfirst'), firstPageDisabled, firstPage);\n }\n };\n NumericContainer.prototype.updatePrevPagerSetStyles = function () {\n if (this.pagerModule.currentPage > this.pagerModule.pageCount) {\n classList(this.PP, ['e-numericitem', 'e-pager-default'], ['e-nextprevitemdisabled', 'e-disable']);\n }\n else {\n classList(this.PP, ['e-nextprevitemdisabled', 'e-disable'], ['e-numericitem', 'e-pager-default']);\n }\n };\n NumericContainer.prototype.updateNextPagerSetStyles = function () {\n var pagerObj = this.pagerModule;\n var firstPage = this.links[0].innerHTML.replace(pagerObj.customText, '');\n if (!firstPage.length || !this.links.length || (parseInt(firstPage, 10) + pagerObj.pageCount > pagerObj.totalPages)) {\n classList(this.NP, ['e-nextprevitemdisabled', 'e-disable'], ['e-numericitem', 'e-pager-default']);\n }\n else {\n classList(this.NP, ['e-numericitem', 'e-pager-default'], ['e-nextprevitemdisabled', 'e-disable']);\n }\n };\n NumericContainer.prototype.updateNextNLastStyles = function () {\n var lastPage = ['e-lastpage', 'e-pager-default'];\n var lastPageDisabled = ['e-lastpagedisabled', 'e-disable'];\n var nextPage = ['e-nextpage', 'e-pager-default'];\n var nextPageDisabled = ['e-nextpagedisabled', 'e-disable'];\n var pagerObj = this.pagerModule;\n if (pagerObj.currentPage === pagerObj.totalPages || pagerObj.totalRecordsCount === 0) {\n classList(this.last, lastPageDisabled, lastPage);\n classList(this.next, nextPageDisabled, nextPage);\n classList(this.pagerElement.querySelector('.e-mlast'), lastPageDisabled, lastPage);\n classList(this.pagerElement.querySelector('.e-mnext'), nextPageDisabled, nextPage);\n }\n else {\n classList(this.last, lastPage, lastPageDisabled);\n classList(this.next, nextPage, nextPageDisabled);\n classList(this.pagerElement.querySelector('.e-mlast'), lastPage, lastPageDisabled);\n classList(this.pagerElement.querySelector('.e-mnext'), nextPage, nextPageDisabled);\n }\n };\n return NumericContainer;\n}());\nexport { NumericContainer };\n","import { createElement, append, isBlazor } from '@syncfusion/ej2-base';\n/**\n * `PagerMessage` module is used to display pager information.\n */\nvar PagerMessage = /** @class */ (function () {\n /**\n * Constructor for externalMessage module\n * @hidden\n */\n function PagerMessage(pagerModule) {\n this.pagerModule = pagerModule;\n }\n /**\n * The function is used to render pager message\n * @hidden\n */\n PagerMessage.prototype.render = function () {\n var div = createElement('div', { className: 'e-parentmsgbar', attrs: { 'aria-label': 'Pager Information' } });\n this.pageNoMsgElem = createElement('span', { className: 'e-pagenomsg', styles: 'textalign:right' });\n this.pageCountMsgElem = createElement('span', { className: 'e-pagecountmsg', styles: 'textalign:right' });\n append([this.pageNoMsgElem, this.pageCountMsgElem], div);\n this.pagerModule.element.appendChild(div);\n this.refresh();\n };\n /**\n * Refreshes the pager information.\n */\n PagerMessage.prototype.refresh = function () {\n var pagerObj = this.pagerModule;\n if (isBlazor()) {\n this.pageNoMsgElem.textContent = this.format(pagerObj.getLocalizedLabel('CurrentPageInfo'), [pagerObj.totalRecordsCount === 0 ? 0 :\n pagerObj.currentPage, pagerObj.totalPages || 0]) + ' ';\n this.pageCountMsgElem.textContent = this.format(pagerObj.getLocalizedLabel('TotalItemsInfo'), [pagerObj.totalRecordsCount || 0]);\n }\n else {\n this.pageNoMsgElem.textContent = this.format(pagerObj.getLocalizedLabel('currentPageInfo'), [pagerObj.totalRecordsCount === 0 ? 0 :\n pagerObj.currentPage, pagerObj.totalPages || 0, pagerObj.totalRecordsCount || 0]) + ' ';\n this.pageCountMsgElem.textContent = this.format(pagerObj.getLocalizedLabel(pagerObj.totalRecordsCount <= 1 ? 'totalItemInfo' : 'totalItemsInfo'), [pagerObj.totalRecordsCount || 0, pagerObj.totalRecordsCount ? (pagerObj.pageSize * (pagerObj.currentPage - 1)) + 1 : 0,\n pagerObj.pageSize * pagerObj.currentPage > pagerObj.totalRecordsCount ? pagerObj.totalRecordsCount :\n pagerObj.pageSize * pagerObj.currentPage]);\n }\n this.pageNoMsgElem.parentElement.setAttribute('aria-label', this.pageNoMsgElem.textContent + this.pageCountMsgElem.textContent);\n };\n /**\n * Hides the Pager information.\n */\n PagerMessage.prototype.hideMessage = function () {\n if (this.pageNoMsgElem) {\n this.pageNoMsgElem.style.display = 'none';\n }\n if (this.pageCountMsgElem) {\n this.pageCountMsgElem.style.display = 'none';\n }\n };\n /**\n * Shows the Pager information.\n */\n PagerMessage.prototype.showMessage = function () {\n if (!this.pageNoMsgElem) {\n this.render();\n }\n this.pageNoMsgElem.style.display = '';\n this.pageCountMsgElem.style.display = '';\n };\n /**\n * To destroy the PagerMessage\n * @method destroy\n * @return {void}\n * @hidden\n */\n PagerMessage.prototype.destroy = function () {\n //destroy\n };\n PagerMessage.prototype.format = function (str, args) {\n var regx;\n for (var i = 0; i < args.length; i++) {\n regx = new RegExp('\\\\{' + (i) + '\\\\}', 'gm');\n str = str.replace(regx, args[i].toString());\n }\n return str;\n };\n return PagerMessage;\n}());\nexport { PagerMessage };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, L10n, Browser, isBlazor } from '@syncfusion/ej2-base';\nimport { createElement, compile as templateCompiler } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { Property, Event, NotifyPropertyChanges } from '@syncfusion/ej2-base';\nimport { NumericContainer } from './numeric-container';\nimport { PagerMessage } from './pager-message';\nimport { appendChildren } from '../grid/base/util';\n/**\n * Represents the `Pager` component.\n * ```html\n *
\n * ```\n * ```typescript\n * \n * ```\n */\nvar Pager = /** @class */ (function (_super) {\n __extends(Pager, _super);\n /**\n * Constructor for creating the component.\n * @hidden\n */\n function Pager(options, element) {\n var _this = _super.call(this, options, element) || this;\n /** @hidden */\n _this.hasParent = false;\n return _this;\n }\n /**\n * To provide the array of modules needed for component rendering\n * @hidden\n */\n Pager.prototype.requiredModules = function () {\n var modules = [];\n if (this.enableExternalMessage) {\n modules.push({\n member: 'externalMessage',\n args: [this]\n });\n }\n if (this.checkpagesizes()) {\n modules.push({\n member: 'pagerdropdown',\n args: [this]\n });\n }\n return modules;\n };\n /**\n * Initialize the event handler\n * @hidden\n */\n Pager.prototype.preRender = function () {\n //preRender\n this.defaultConstants = {\n currentPageInfo: '{0} of {1} pages',\n totalItemsInfo: '({0} items)',\n totalItemInfo: '({0} item)',\n firstPageTooltip: 'Go to first page',\n lastPageTooltip: 'Go to last page',\n nextPageTooltip: 'Go to next page',\n previousPageTooltip: 'Go to previous page',\n nextPagerTooltip: 'Go to next pager',\n previousPagerTooltip: 'Go to previous pager',\n pagerDropDown: 'Items per page',\n pagerAllDropDown: 'Items',\n CurrentPageInfo: '{0} of {1} pages',\n TotalItemsInfo: '({0} items)',\n FirstPageTooltip: 'Go to first page',\n LastPageTooltip: 'Go to last page',\n NextPageTooltip: 'Go to next page',\n PreviousPageTooltip: 'Go to previous page',\n NextPagerTooltip: 'Go to next pager',\n PreviousPagerTooltip: 'Go to previous pager',\n PagerDropDown: 'Items per page',\n PagerAllDropDown: 'Items',\n All: 'All'\n };\n this.containerModule = new NumericContainer(this);\n this.pagerMessageModule = new PagerMessage(this);\n };\n /**\n * To Initialize the component rendering\n */\n Pager.prototype.render = function () {\n if (this.template) {\n if (this.isReactTemplate()) {\n this.on('pager-refresh', this.pagerTemplate, this);\n this.notify('pager-refresh', {});\n }\n else {\n this.pagerTemplate();\n }\n }\n else {\n this.initLocalization();\n this.updateRTL();\n this.totalRecordsCount = this.totalRecordsCount || 0;\n this.renderFirstPrevDivForDevice();\n this.containerModule.render();\n if (this.enablePagerMessage) {\n this.pagerMessageModule.render();\n }\n this.renderNextLastDivForDevice();\n if (this.checkpagesizes() && this.pagerdropdownModule) {\n this.pagerdropdownModule.render();\n }\n this.addAriaLabel();\n if (this.enableExternalMessage && this.externalMessageModule) {\n this.externalMessageModule.render();\n }\n this.refresh();\n this.trigger('created', { 'currentPage': this.currentPage, 'totalRecordsCount': this.totalRecordsCount });\n }\n };\n /**\n * Get the properties to be maintained in the persisted state.\n * @hidden\n */\n Pager.prototype.getPersistData = function () {\n var keyEntity = ['currentPage', 'pageSize'];\n return this.addOnPersist(keyEntity);\n };\n /**\n * To destroy the Pager component.\n * @method destroy\n * @return {void}\n */\n Pager.prototype.destroy = function () {\n if (this.isReactTemplate()) {\n this.off('pager-refresh', this.pagerTemplate);\n if (!this.hasParent) {\n this.destroyTemplate(['template']);\n }\n }\n _super.prototype.destroy.call(this);\n this.containerModule.destroy();\n this.pagerMessageModule.destroy();\n if (!this.isReactTemplate()) {\n this.element.innerHTML = '';\n }\n };\n /**\n * Destroys the given template reference.\n * @param {string[]} propertyNames - Defines the collection of template name.\n */\n //tslint:disable-next-line:no-any\n Pager.prototype.destroyTemplate = function (propertyNames, index) {\n this.clearTemplate(propertyNames, index);\n };\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Pager.prototype.getModuleName = function () {\n return 'pager';\n };\n /**\n * Called internally if any of the property value changed.\n * @hidden\n */\n Pager.prototype.onPropertyChanged = function (newProp, oldProp) {\n if (this.isDestroyed) {\n return;\n }\n if (newProp.pageCount !== oldProp.pageCount) {\n this.containerModule.refreshNumericLinks();\n this.containerModule.refresh();\n }\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'currentPage':\n if (this.checkGoToPage(newProp.currentPage, oldProp.currentPage)) {\n this.currentPageChanged(newProp, oldProp);\n }\n break;\n case 'pageSize':\n case 'totalRecordsCount':\n case 'customText':\n if (this.checkpagesizes() && this.pagerdropdownModule) {\n if (oldProp.pageSize !== newProp.pageSize) {\n this.currentPage = 1;\n }\n this.pagerdropdownModule.setDropDownValue('value', this.pageSize);\n }\n if (newProp.pageSize !== oldProp.pageSize) {\n this.pageSize = newProp.pageSize;\n this.currentPageChanged(newProp, oldProp);\n }\n else {\n this.refresh();\n }\n break;\n case 'pageSizes':\n if (this.checkpagesizes() && this.pagerdropdownModule) {\n this.pagerdropdownModule.destroy();\n this.pagerdropdownModule.render();\n }\n this.refresh();\n break;\n case 'template':\n this.templateFn = this.compile(this.template);\n this.refresh();\n break;\n case 'locale':\n this.initLocalization();\n this.refresh();\n break;\n case 'enableExternalMessage':\n if (this.enableExternalMessage && this.externalMessageModule) {\n this.externalMessageModule.render();\n }\n break;\n case 'externalMessage':\n if (this.externalMessageModule) {\n this.externalMessageModule.refresh();\n }\n break;\n case 'enableRtl':\n this.updateRTL();\n break;\n case 'enablePagerMessage':\n if (this.enablePagerMessage) {\n this.pagerMessageModule.showMessage();\n }\n else {\n this.pagerMessageModule.hideMessage();\n }\n break;\n }\n }\n };\n /**\n * Gets the localized label by locale keyword.\n * @param {string} key\n * @return {string}\n */\n Pager.prototype.getLocalizedLabel = function (key) {\n return this.localeObj.getConstant(key);\n };\n /**\n * Navigate to target page by given number.\n * @param {number} pageNo - Defines page number.\n * @return {void}\n */\n Pager.prototype.goToPage = function (pageNo) {\n if (this.checkGoToPage(pageNo)) {\n this.currentPage = pageNo;\n this.dataBind();\n }\n };\n /**\n * @hidden\n */\n Pager.prototype.setPageSize = function (pageSize) {\n this.pageSize = pageSize;\n this.dataBind();\n };\n Pager.prototype.checkpagesizes = function () {\n if (this.pageSizes === true || this.pageSizes.length) {\n return true;\n }\n return false;\n };\n Pager.prototype.checkGoToPage = function (newPageNo, oldPageNo) {\n if (newPageNo !== this.currentPage) {\n this.previousPageNo = this.currentPage;\n }\n if (!isNullOrUndefined(oldPageNo)) {\n this.previousPageNo = oldPageNo;\n }\n if (this.previousPageNo !== newPageNo && (newPageNo >= 1 && newPageNo <= this.totalPages)) {\n return true;\n }\n return false;\n };\n Pager.prototype.currentPageChanged = function (newProp, oldProp) {\n if (this.enableQueryString) {\n this.updateQueryString(this.currentPage);\n }\n if (newProp.currentPage !== oldProp.currentPage || newProp.pageSize !== oldProp.pageSize) {\n var args = {\n currentPage: this.currentPage,\n newProp: newProp, oldProp: oldProp, cancel: false\n };\n this.trigger('click', args);\n if (!args.cancel) {\n this.refresh();\n }\n }\n };\n Pager.prototype.pagerTemplate = function () {\n if (this.isReactTemplate() && this.hasParent) {\n return;\n }\n var result;\n this.element.classList.add('e-pagertemplate');\n this.compile(this.template);\n var data = {\n currentPage: this.currentPage, pageSize: this.pageSize, pageCount: this.pageCount,\n totalRecordsCount: this.totalRecordsCount, totalPages: this.totalPages\n };\n var tempId = this.element.parentElement.id + '_template';\n if (this.isReactTemplate()) {\n this.getPagerTemplate()(data, this, 'template', tempId, null, null, this.element);\n this.renderReactTemplates();\n }\n else {\n result = isBlazor() ? this.getPagerTemplate()(data, this, 'template', tempId, this.isStringTemplate) :\n this.getPagerTemplate()(data);\n appendChildren(this.element, result);\n }\n };\n /** @hidden */\n Pager.prototype.updateTotalPages = function () {\n this.totalPages = (this.totalRecordsCount % this.pageSize === 0) ? (this.totalRecordsCount / this.pageSize) :\n (parseInt((this.totalRecordsCount / this.pageSize).toString(), 10) + 1);\n };\n /** @hidden */\n Pager.prototype.getPagerTemplate = function () {\n return this.templateFn;\n };\n /** @hidden */\n Pager.prototype.compile = function (template) {\n if (template) {\n var e = void 0;\n try {\n if (document.querySelectorAll(template).length) {\n this.templateFn = templateCompiler(document.querySelector(template).innerHTML.trim());\n }\n }\n catch (e) {\n this.templateFn = templateCompiler(template);\n }\n }\n return undefined;\n };\n /**\n * Refreshes page count, pager information and external message.\n * @return {void}\n */\n Pager.prototype.refresh = function () {\n if (this.template) {\n if (this.isReactTemplate()) {\n this.updateTotalPages();\n this.notify('pager-refresh', {});\n }\n else {\n this.element.innerHTML = '';\n this.updateTotalPages();\n this.pagerTemplate();\n }\n }\n else {\n this.updateRTL();\n this.containerModule.refresh();\n if (this.enablePagerMessage) {\n this.pagerMessageModule.refresh();\n }\n if (this.pagerdropdownModule) {\n this.pagerdropdownModule.refresh();\n }\n if (this.enableExternalMessage && this.externalMessageModule) {\n this.externalMessageModule.refresh();\n }\n }\n };\n Pager.prototype.updateRTL = function () {\n if (this.enableRtl) {\n this.element.classList.add('e-rtl');\n }\n else {\n this.element.classList.remove('e-rtl');\n }\n };\n Pager.prototype.initLocalization = function () {\n this.localeObj = new L10n(this.getModuleName(), this.defaultConstants, this.locale);\n };\n Pager.prototype.updateQueryString = function (value) {\n var updatedUrl = this.getUpdatedURL(window.location.href, 'page', value.toString());\n window.history.pushState({ path: updatedUrl }, '', updatedUrl);\n };\n Pager.prototype.getUpdatedURL = function (uri, key, value) {\n var regx = new RegExp('([?|&])' + key + '=.*?(&|#|$)', 'i');\n if (uri.match(regx)) {\n return uri.replace(regx, '$1' + key + '=' + value + '$2');\n }\n else {\n var hash = '';\n if (uri.indexOf('#') !== -1) {\n hash = uri.replace(/.*#/, '#');\n uri = uri.replace(/#.*/, '');\n }\n return uri + (uri.indexOf('?') !== -1 ? '&' : '?') + key + '=' + value + hash;\n }\n };\n Pager.prototype.renderFirstPrevDivForDevice = function () {\n this.element.appendChild(createElement('div', {\n className: 'e-mfirst e-icons e-icon-first',\n attrs: { title: isBlazor() ? this.getLocalizedLabel('FirstPageTooltip') : this.getLocalizedLabel('firstPageTooltip'),\n tabindex: '-1' }\n }));\n this.element.appendChild(createElement('div', {\n className: 'e-mprev e-icons e-icon-prev',\n attrs: { title: isBlazor() ? this.getLocalizedLabel('PreviousPageTooltip') :\n this.getLocalizedLabel('previousPageTooltip'), tabindex: '-1' }\n }));\n };\n Pager.prototype.renderNextLastDivForDevice = function () {\n this.element.appendChild(createElement('div', {\n className: 'e-mnext e-icons e-icon-next',\n attrs: { title: isBlazor() ? this.getLocalizedLabel('NextPageTooltip') :\n this.getLocalizedLabel('nextPageTooltip'), tabindex: '-1' }\n }));\n this.element.appendChild(createElement('div', {\n className: 'e-mlast e-icons e-icon-last',\n attrs: { title: isBlazor() ? this.getLocalizedLabel('LastPageTooltip') :\n this.getLocalizedLabel('lastPageTooltip'), tabindex: '-1' }\n }));\n };\n Pager.prototype.addAriaLabel = function () {\n var classList = ['.e-mfirst', '.e-mprev', '.e-mnext', '.e-mlast'];\n if (!Browser.isDevice) {\n for (var i = 0; i < classList.length; i++) {\n var element = this.element.querySelector(classList[i]);\n element.setAttribute('aria-label', element.getAttribute('title'));\n }\n }\n };\n Pager.prototype.isReactTemplate = function () {\n return this.isReact && this.template && typeof (this.template) !== 'string';\n };\n __decorate([\n Property(false)\n ], Pager.prototype, \"enableQueryString\", void 0);\n __decorate([\n Property(false)\n ], Pager.prototype, \"enableExternalMessage\", void 0);\n __decorate([\n Property(true)\n ], Pager.prototype, \"enablePagerMessage\", void 0);\n __decorate([\n Property(12)\n ], Pager.prototype, \"pageSize\", void 0);\n __decorate([\n Property(10)\n ], Pager.prototype, \"pageCount\", void 0);\n __decorate([\n Property(1)\n ], Pager.prototype, \"currentPage\", void 0);\n __decorate([\n Property()\n ], Pager.prototype, \"totalRecordsCount\", void 0);\n __decorate([\n Property()\n ], Pager.prototype, \"externalMessage\", void 0);\n __decorate([\n Property(false)\n ], Pager.prototype, \"pageSizes\", void 0);\n __decorate([\n Property()\n ], Pager.prototype, \"template\", void 0);\n __decorate([\n Property('')\n ], Pager.prototype, \"customText\", void 0);\n __decorate([\n Event()\n ], Pager.prototype, \"click\", void 0);\n __decorate([\n Event()\n ], Pager.prototype, \"dropDownChanged\", void 0);\n __decorate([\n Event()\n ], Pager.prototype, \"created\", void 0);\n Pager = __decorate([\n NotifyPropertyChanges\n ], Pager);\n return Pager;\n}(Component));\nexport { Pager };\n","/**\n * IncrementalSearch module file\n */\nvar queryString = '';\nvar prevString = '';\nvar matches = [];\nvar activeClass = 'e-active';\nvar prevElementId = '';\n/**\n * Search and focus the list item based on key code matches with list text content\n * @param { number } keyCode - Specifies the key code which pressed on keyboard events.\n * @param { HTMLElement[]] } items - Specifies an array of HTMLElement, from which matches find has done.\n * @param { number } selectedIndex - Specifies the selected item in list item, so that search will happen\n * after selected item otherwise it will do from initial.\n * @param { boolean } ignoreCase - Specifies the case consideration when search has done.\n */\nexport function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId, isBlazor) {\n queryString += String.fromCharCode(keyCode);\n setTimeout(function () { queryString = ''; }, 1000);\n var index;\n queryString = ignoreCase ? queryString.toLowerCase() : queryString;\n if (prevElementId === elementId && prevString === queryString) {\n for (var i = 0; i < matches.length; i++) {\n if (matches[i].classList.contains(activeClass)) {\n index = i;\n break;\n }\n }\n index = index + 1;\n return matches[index];\n }\n else {\n var listItems = items;\n var strLength = queryString.length;\n var text = void 0;\n var item = void 0;\n selectedIndex = selectedIndex ? selectedIndex + 1 : 0;\n var i = selectedIndex;\n matches = [];\n do {\n if (i === listItems.length) {\n i = -1;\n }\n i === -1 ? index = 0 : index = i;\n item = listItems[index];\n if (isBlazor) {\n text = ignoreCase ? item.textContent.trim().toLowerCase() : item.textContent.trim();\n }\n else {\n text = ignoreCase ? item.innerText.toLowerCase() : item.innerText;\n }\n if (text.substr(0, strLength) === queryString) {\n matches.push(listItems[index]);\n }\n i++;\n } while (i !== selectedIndex);\n prevString = queryString;\n prevElementId = elementId;\n return matches[0];\n }\n}\nexport function Search(inputVal, items, searchType, ignoreCase) {\n var listItems = items;\n ignoreCase = ignoreCase !== undefined && ignoreCase !== null ? ignoreCase : true;\n var itemData = { item: null, index: null };\n if (inputVal && inputVal.length) {\n var strLength = inputVal.length;\n var queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal;\n for (var i = 0, itemsData = listItems; i < itemsData.length; i++) {\n var item = itemsData[i];\n var text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\\s+|\\s+$/g, '');\n if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr)) {\n itemData.item = item;\n itemData.index = i;\n return { item: item, index: i };\n }\n }\n return itemData;\n }\n return itemData;\n}\n","import { extend, merge, isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { attributes, prepend, isVisible, append, addClass } from '@syncfusion/ej2-base';\nimport { compile } from '@syncfusion/ej2-base';\nimport { DataManager, Query } from '@syncfusion/ej2-data';\nexport var cssClass = {\n li: 'e-list-item',\n ul: 'e-list-parent e-ul',\n group: 'e-list-group-item',\n icon: 'e-list-icon',\n text: 'e-list-text',\n check: 'e-list-check',\n checked: 'e-checked',\n selected: 'e-selected',\n expanded: 'e-expanded',\n textContent: 'e-text-content',\n hasChild: 'e-has-child',\n level: 'e-level',\n url: 'e-list-url',\n collapsible: 'e-icon-collapsible',\n disabled: 'e-disabled',\n image: 'e-list-img',\n iconWrapper: 'e-icon-wrapper',\n anchorWrap: 'e-anchor-wrap',\n navigable: 'e-navigable'\n};\n/**\n * Base List Generator\n */\nexport var ListBase;\n(function (ListBase) {\n /**\n * Default mapped fields.\n */\n ListBase.defaultMappedFields = {\n id: 'id',\n text: 'text',\n url: 'url',\n value: 'value',\n isChecked: 'isChecked',\n enabled: 'enabled',\n expanded: 'expanded',\n selected: 'selected',\n iconCss: 'iconCss',\n child: 'child',\n isVisible: 'isVisible',\n hasChildren: 'hasChildren',\n tooltip: 'tooltip',\n htmlAttributes: 'htmlAttributes',\n urlAttributes: 'urlAttributes',\n imageAttributes: 'imageAttributes',\n imageUrl: 'imageUrl',\n groupBy: null\n };\n var defaultAriaAttributes = {\n level: 1,\n listRole: 'presentation',\n itemRole: 'presentation',\n groupItemRole: 'group',\n itemText: 'list-item',\n wrapperRole: 'presentation'\n };\n var defaultListBaseOptions = {\n showCheckBox: false,\n showIcon: false,\n enableHtmlSanitizer: false,\n expandCollapse: false,\n fields: ListBase.defaultMappedFields,\n ariaAttributes: defaultAriaAttributes,\n listClass: '',\n itemClass: '',\n processSubChild: false,\n sortOrder: 'None',\n template: null,\n groupTemplate: null,\n headerTemplate: null,\n expandIconClass: 'e-icon-collapsible',\n moduleName: 'list',\n expandIconPosition: 'Right',\n itemNavigable: false\n };\n /**\n * Function helps to created and return the UL Li element based on your data.\n * @param {{[key:string]:Object}[]|string[]} dataSource - Specifies an array of JSON or String data.\n * @param {ListBaseOptions} options? - Specifies the list options that need to provide.\n */\n function createList(createElement, dataSource, \n // tslint:disable-next-line\n options, isSingleLevel, componentInstance) {\n var curOpt = extend({}, defaultListBaseOptions, options);\n var ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes);\n var type = typeofData(dataSource).typeof;\n if (type === 'string' || type === 'number') {\n return createListFromArray(createElement, dataSource, isSingleLevel, options, componentInstance);\n }\n else {\n // tslint:disable-next-line\n return createListFromJson(createElement, dataSource, options, \n // tslint:disable-next-line\n ariaAttributes.level, isSingleLevel, componentInstance);\n }\n }\n ListBase.createList = createList;\n /**\n * Function helps to created an element list based on string array input .\n * @param {string[]} dataSource - Specifies an array of string data\n */\n function createListFromArray(createElement, dataSource, \n // tslint:disable-next-line\n isSingleLevel, options, componentInstance) {\n var subChild = createListItemFromArray(createElement, dataSource, isSingleLevel, options, componentInstance);\n return generateUL(createElement, subChild, null, options);\n }\n ListBase.createListFromArray = createListFromArray;\n /**\n * Function helps to created an element list based on string array input .\n * @param {string[]} dataSource - Specifies an array of string data\n */\n function createListItemFromArray(createElement, dataSource, \n // tslint:disable-next-line\n isSingleLevel, options, componentInstance) {\n var subChild = [];\n var curOpt = extend({}, defaultListBaseOptions, options);\n cssClass = getModuleClass(curOpt.moduleName);\n var id = generateId(); // generate id for drop-down-list option.\n for (var i = 0; i < dataSource.length; i++) {\n if (isNullOrUndefined(dataSource[i])) {\n continue;\n }\n var li = void 0;\n if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {\n var curData = {\n dataSource: dataSource,\n curData: dataSource[i],\n text: dataSource[i],\n options: curOpt\n };\n curOpt.itemCreating(curData);\n }\n if (isSingleLevel) {\n li = generateSingleLevelLI(createElement, dataSource[i], undefined, null, null, [], null, id, i, options);\n }\n else {\n li = generateLI(createElement, dataSource[i], undefined, null, null, options, componentInstance);\n }\n if (curOpt.itemCreated && typeof curOpt.itemCreated === 'function') {\n var curData = {\n dataSource: dataSource,\n curData: dataSource[i],\n text: dataSource[i],\n item: li,\n options: curOpt\n };\n curOpt.itemCreated(curData);\n }\n subChild.push(li);\n }\n return subChild;\n }\n ListBase.createListItemFromArray = createListItemFromArray;\n /**\n * Function helps to created an element list based on array of JSON input .\n * @param {{[key:string]:Object}[]} dataSource - Specifies an array of JSON data.\n * @param {ListBaseOptions} options? - Specifies the list options that need to provide.\n */\n // tslint:disable-next-line:max-func-body-length\n // tslint:disable-next-line\n function createListItemFromJson(createElement, dataSource, \n // tslint:disable-next-line\n options, level, isSingleLevel, componentInstance) {\n var curOpt = extend({}, defaultListBaseOptions, options);\n cssClass = getModuleClass(curOpt.moduleName);\n var fields = extend({}, ListBase.defaultMappedFields, curOpt.fields);\n var ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes);\n var id;\n var checkboxElement = [];\n if (level) {\n ariaAttributes.level = level;\n }\n var child = [];\n var li;\n var anchorElement;\n if (dataSource && dataSource.length && !isNullOrUndefined(typeofData(dataSource).item) &&\n !typeofData(dataSource).item.hasOwnProperty(fields.id)) {\n id = generateId(); // generate id for drop-down-list option.\n }\n for (var i = 0; i < dataSource.length; i++) {\n var fieldData = getFieldValues(dataSource[i], fields);\n if (isNullOrUndefined(dataSource[i])) {\n continue;\n }\n if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {\n var curData = {\n dataSource: dataSource,\n curData: dataSource[i],\n text: fieldData[fields.text],\n options: curOpt,\n fields: fields\n };\n curOpt.itemCreating(curData);\n }\n var curItem = dataSource[i];\n if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {\n fieldData = getFieldValues(dataSource[i], fields);\n }\n if (fieldData.hasOwnProperty(fields.id) && !isNullOrUndefined(fieldData[fields.id])) {\n id = fieldData[fields.id];\n }\n var innerEle = [];\n if (curOpt.showCheckBox) {\n if (curOpt.itemNavigable && (fieldData[fields.url] || fieldData[fields.urlAttributes])) {\n checkboxElement.push(createElement('input', { className: cssClass.check, attrs: { type: 'checkbox' } }));\n }\n else {\n innerEle.push(createElement('input', { className: cssClass.check, attrs: { type: 'checkbox' } }));\n }\n }\n if (isSingleLevel === true) {\n if (curOpt.showIcon && fieldData.hasOwnProperty(fields.iconCss) && !isNullOrUndefined(fieldData[fields.iconCss])) {\n innerEle.push(createElement('span', { className: cssClass.icon + ' ' + fieldData[fields.iconCss] }));\n }\n li = generateSingleLevelLI(createElement, curItem, fieldData, fields, curOpt.itemClass, innerEle, (curItem.hasOwnProperty('isHeader') &&\n curItem.isHeader) ? true : false, id, i, options);\n anchorElement = li.querySelector('.' + cssClass.anchorWrap);\n if (curOpt.itemNavigable && checkboxElement.length) {\n prepend(checkboxElement, li.firstElementChild);\n }\n }\n else {\n li = generateLI(createElement, curItem, fieldData, fields, curOpt.itemClass, options, componentInstance);\n li.classList.add(cssClass.level + '-' + ariaAttributes.level);\n li.setAttribute('aria-level', ariaAttributes.level.toString());\n anchorElement = li.querySelector('.' + cssClass.anchorWrap);\n if (fieldData.hasOwnProperty(fields.tooltip)) {\n li.setAttribute('title', fieldData[fields.tooltip]);\n }\n if (fieldData.hasOwnProperty(fields.htmlAttributes) && fieldData[fields.htmlAttributes]) {\n setAttribute(li, fieldData[fields.htmlAttributes]);\n }\n if (fieldData.hasOwnProperty(fields.enabled) && fieldData[fields.enabled] === false) {\n li.classList.add(cssClass.disabled);\n }\n if (fieldData.hasOwnProperty(fields.isVisible) && fieldData[fields.isVisible] === false) {\n li.style.display = 'none';\n }\n if (fieldData.hasOwnProperty(fields.imageUrl) && !isNullOrUndefined(fieldData[fields.imageUrl])\n && !curOpt.template) {\n var attr = { src: fieldData[fields.imageUrl] };\n merge(attr, fieldData[fields.imageAttributes]);\n var imageElemnt = createElement('img', { className: cssClass.image, attrs: attr });\n if (anchorElement) {\n anchorElement.insertAdjacentElement('afterbegin', imageElemnt);\n }\n else {\n prepend([imageElemnt], li.firstElementChild);\n }\n }\n if (curOpt.showIcon && fieldData.hasOwnProperty(fields.iconCss) &&\n !isNullOrUndefined(fieldData[fields.iconCss]) && !curOpt.template) {\n var iconElement = void 0;\n iconElement = createElement('div', { className: cssClass.icon + ' ' + fieldData[fields.iconCss] });\n if (anchorElement) {\n anchorElement.insertAdjacentElement('afterbegin', iconElement);\n }\n else {\n prepend([iconElement], li.firstElementChild);\n }\n }\n if (innerEle.length) {\n prepend(innerEle, li.firstElementChild);\n }\n if (curOpt.itemNavigable && checkboxElement.length) {\n prepend(checkboxElement, li.firstElementChild);\n }\n processSubChild(createElement, fieldData, fields, dataSource, curOpt, li, ariaAttributes.level);\n }\n if (anchorElement) {\n addClass([li], [cssClass.navigable]);\n }\n if (curOpt.itemCreated && typeof curOpt.itemCreated === 'function') {\n var curData = {\n dataSource: dataSource,\n curData: dataSource[i],\n text: fieldData[fields.text],\n item: li,\n options: curOpt,\n fields: fields\n };\n curOpt.itemCreated(curData);\n }\n checkboxElement = [];\n child.push(li);\n }\n return child;\n }\n ListBase.createListItemFromJson = createListItemFromJson;\n /**\n * Function helps to created an element list based on array of JSON input .\n * @param {{[key:string]:Object}[]} dataSource - Specifies an array of JSON data.\n * @param {ListBaseOptions} options? - Specifies the list options that need to provide.\n */\n function createListFromJson(createElement, dataSource, \n // tslint:disable-next-line\n options, level, isSingleLevel, componentInstance) {\n var curOpt = extend({}, defaultListBaseOptions, options);\n var li = createListItemFromJson(createElement, dataSource, options, level, isSingleLevel, componentInstance);\n return generateUL(createElement, li, curOpt.listClass, options);\n }\n ListBase.createListFromJson = createListFromJson;\n /**\n * Return the next or previous visible element.\n * @param {Element[]|NodeList} elementArray - An element array to find next or previous element.\n * @param {Element} li - An element to find next or previous after this element.\n * @param {boolean} isPrevious? - Specify when the need get previous element from array.\n */\n function getSiblingLI(elementArray, element, isPrevious) {\n cssClass = getModuleClass(defaultListBaseOptions.moduleName);\n if (!elementArray || !elementArray.length) {\n return void 0;\n }\n var siblingLI;\n var liIndex;\n var liCollections = Array.prototype.slice.call(elementArray);\n if (element) {\n liIndex = indexOf(element, liCollections);\n }\n else {\n liIndex = (isPrevious === true ? liCollections.length : -1);\n }\n siblingLI = liCollections[liIndex + (isPrevious === true ? -1 : 1)];\n while (siblingLI && (!isVisible(siblingLI) || siblingLI.classList.contains(cssClass.disabled))) {\n liIndex = liIndex + (isPrevious === true ? -1 : 1);\n siblingLI = liCollections[liIndex];\n }\n return siblingLI;\n }\n ListBase.getSiblingLI = getSiblingLI;\n /**\n * Return the index of the li element\n * @param {Element} item - An element to find next or previous after this element.\n * @param {Element[]|NodeList} elementArray - An element array to find index of given li.\n */\n function indexOf(item, elementArray) {\n if (!elementArray || !item) {\n return void 0;\n }\n else {\n var liCollections = elementArray;\n liCollections = Array.prototype.slice.call(elementArray);\n return liCollections.indexOf(item);\n }\n }\n ListBase.indexOf = indexOf;\n /**\n * Returns the grouped data from given dataSource.\n * @param {{[key:string]:Object}[]} dataSource - The JSON data which is necessary to process.\n * @param {FieldsMapping} fields - Fields that are mapped from the data source.\n * @param {SortOrder='None'} sortOrder- Specifies final result sort order.\n */\n function groupDataSource(dataSource, fields, sortOrder) {\n if (sortOrder === void 0) { sortOrder = 'None'; }\n var curFields = extend({}, ListBase.defaultMappedFields, fields);\n var cusQuery = new Query().group(curFields.groupBy);\n // need to remove once sorting issues fixed in DataManager\n cusQuery = addSorting(sortOrder, 'key', cusQuery);\n var ds = getDataSource(dataSource, cusQuery);\n dataSource = [];\n for (var j = 0; j < ds.length; j++) {\n var itemObj = ds[j].items;\n var grpItem = {};\n var hdr = 'isHeader';\n grpItem[curFields.text] = ds[j].key;\n grpItem[hdr] = true;\n var newtext = curFields.text;\n if (newtext === 'id') {\n newtext = 'text';\n grpItem[newtext] = ds[j].key;\n }\n grpItem._id = 'group-list-item-' + (ds[j].key ?\n ds[j].key.toString().trim() : 'undefined');\n grpItem.items = itemObj;\n dataSource.push(grpItem);\n for (var k = 0; k < itemObj.length; k++) {\n dataSource.push(itemObj[k]);\n }\n }\n return dataSource;\n }\n ListBase.groupDataSource = groupDataSource;\n /**\n * Returns a sorted query object.\n * @param {SortOrder} sortOrder - Specifies that sort order.\n * @param {string} sortBy - Specifies sortBy fields.\n * @param {Query=new Query()} query - Pass if any existing query.\n */\n function addSorting(sortOrder, sortBy, query) {\n if (query === void 0) { query = new Query(); }\n if (sortOrder === 'Ascending') {\n query.sortBy(sortBy, 'ascending', true);\n }\n else if (sortOrder === 'Descending') {\n query.sortBy(sortBy, 'descending', true);\n }\n else {\n for (var i = 0; i < query.queries.length; i++) {\n if (query.queries[i].fn === 'onSortBy') {\n query.queries.splice(i, 1);\n }\n }\n }\n return query;\n }\n ListBase.addSorting = addSorting;\n /**\n * Return an array of JSON Data that processed based on queries.\n * @param {{[key:string]:Object}[]} dataSource - Specifies local JSON data source.\n * @param {Query} query - Specifies query that need to process.\n */\n function getDataSource(dataSource, query) {\n // tslint:disable-next-line\n return new DataManager(dataSource)\n .executeLocal(query);\n }\n ListBase.getDataSource = getDataSource;\n /**\n * Created JSON data based the UL and LI element\n * @param {HTMLElement|Element} element - UL element that need to convert as a JSON\n * @param {ListBaseOptions} options? - Specifies listbase option for fields.\n */\n function createJsonFromElement(element, options) {\n var curOpt = extend({}, defaultListBaseOptions, options);\n var fields = extend({}, ListBase.defaultMappedFields, curOpt.fields);\n var curEle = element.cloneNode(true);\n var jsonAr = [];\n curEle.classList.add('json-parent');\n var childs = curEle.querySelectorAll('.json-parent>li');\n curEle.classList.remove('json-parent');\n for (var i = 0; i < childs.length; i++) {\n var li = childs[i];\n var anchor = li.querySelector('a');\n var ul = li.querySelector('ul');\n var json = {};\n var childNodes = anchor ? anchor.childNodes : li.childNodes;\n var keys = Object.keys(childNodes);\n for (var i_1 = 0; i_1 < childNodes.length; i_1++) {\n if (!(childNodes[Number(keys[i_1])]).hasChildNodes()) {\n json[fields.text] = childNodes[Number(keys[i_1])].textContent;\n }\n }\n var attributes_1 = getAllAttributes(li);\n if (attributes_1.id) {\n json[fields.id] = attributes_1.id;\n delete attributes_1.id;\n }\n else {\n json[fields.id] = generateId();\n }\n if (Object.keys(attributes_1).length) {\n json[fields.htmlAttributes] = attributes_1;\n }\n if (anchor) {\n attributes_1 = getAllAttributes(anchor);\n if (Object.keys(attributes_1).length) {\n json[fields.urlAttributes] = attributes_1;\n }\n }\n if (ul) {\n json[fields.child] = createJsonFromElement(ul, options);\n }\n jsonAr.push(json);\n }\n return jsonAr;\n }\n ListBase.createJsonFromElement = createJsonFromElement;\n function typeofData(data) {\n var match = { typeof: null, item: null };\n for (var i = 0; i < data.length; i++) {\n if (!isNullOrUndefined(data[i])) {\n return match = { typeof: typeof data[i], item: data[i] };\n }\n }\n return match;\n }\n function setAttribute(element, elementAttributes) {\n var attr = {};\n merge(attr, elementAttributes);\n if (attr.class) {\n addClass([element], attr.class.split(' '));\n delete attr.class;\n }\n attributes(element, attr);\n }\n function getAllAttributes(element) {\n var attributes = {};\n var attr = element.attributes;\n for (var index = 0; index < attr.length; index++) {\n attributes[attr[index].nodeName] = attr[index].nodeValue;\n }\n return attributes;\n }\n /**\n * Created UL element from content template.\n * @param {string} template - that need to convert and generate li element.\n * @param {{[key:string]:Object}[]} dataSource - Specifies local JSON data source.\n * @param {ListBaseOptions} options? - Specifies listbase option for fields.\n */\n function renderContentTemplate(createElement, template, dataSource, \n // tslint:disable-next-line\n fields, options, componentInstance) {\n cssClass = getModuleClass(defaultListBaseOptions.moduleName);\n var ulElement = createElement('ul', { className: cssClass.ul, attrs: { role: 'presentation' } });\n var curOpt = extend({}, defaultListBaseOptions, options);\n var curFields = extend({}, ListBase.defaultMappedFields, fields);\n var compiledString = compile(template);\n var liCollection = [];\n var value;\n var id = generateId(); // generate id for drop-down-list option.\n for (var i = 0; i < dataSource.length; i++) {\n var fieldData = getFieldValues(dataSource[i], curFields);\n var curItem = dataSource[i];\n var isHeader = curItem.isHeader;\n if (typeof dataSource[i] === 'string' || typeof dataSource[i] === 'number') {\n value = curItem;\n }\n else {\n value = fieldData[curFields.value];\n }\n if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {\n var curData = {\n dataSource: dataSource,\n curData: curItem,\n text: value,\n options: curOpt,\n fields: curFields\n };\n curOpt.itemCreating(curData);\n }\n if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {\n fieldData = getFieldValues(dataSource[i], curFields);\n if (typeof dataSource[i] === 'string' || typeof dataSource[i] === 'number') {\n value = curItem;\n }\n else {\n value = fieldData[curFields.value];\n }\n }\n var li = createElement('li', {\n id: id + '-' + i,\n className: isHeader ? cssClass.group : cssClass.li, attrs: { role: 'presentation' }\n });\n if (isHeader) {\n if (typeof dataSource[i] === 'string' || typeof dataSource[i] === 'number') {\n li.innerText = curItem;\n }\n else {\n li.innerText = fieldData[curFields.text];\n }\n }\n else {\n var currentID = isHeader ? curOpt.groupTemplateID : curOpt.templateID;\n if (isHeader) {\n append(compiledString(curItem, componentInstance, 'headerTemplate', currentID, !!curOpt.isStringTemplate), li);\n }\n else {\n append(compiledString(curItem, componentInstance, 'template', currentID, !!curOpt.isStringTemplate), li);\n }\n li.setAttribute('data-value', isNullOrUndefined(value) ? 'null' : value);\n li.setAttribute('role', 'option');\n }\n if (curOpt.itemCreated && typeof curOpt.itemCreated === 'function') {\n var curData = {\n dataSource: dataSource,\n curData: curItem,\n text: value,\n item: li,\n options: curOpt,\n fields: curFields\n };\n curOpt.itemCreated(curData);\n }\n liCollection.push(li);\n }\n append(liCollection, ulElement);\n return ulElement;\n }\n ListBase.renderContentTemplate = renderContentTemplate;\n /**\n * Created header items from group template.\n * @param {string} template - that need to convert and generate li element.\n * @param {{[key:string]:Object}[]} dataSource - Specifies local JSON data source.\n * @param {FieldsMapping} fields - Specifies fields for mapping the dataSource.\n * @param {Element[]} headerItems? - Specifies listbase header items.\n */\n // tslint:disable-next-line\n function renderGroupTemplate(groupTemplate, groupDataSource, fields, \n // tslint:disable-next-line\n headerItems, options, componentInstance) {\n var compiledString = compile(groupTemplate);\n var curFields = extend({}, ListBase.defaultMappedFields, fields);\n var curOpt = extend({}, defaultListBaseOptions, options);\n var category = curFields.groupBy;\n for (var _i = 0, headerItems_1 = headerItems; _i < headerItems_1.length; _i++) {\n var header = headerItems_1[_i];\n var headerData = {};\n headerData[category] = header.textContent;\n header.innerHTML = '';\n append(compiledString(headerData, componentInstance, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate), header);\n }\n return headerItems;\n }\n ListBase.renderGroupTemplate = renderGroupTemplate;\n function generateId() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n ListBase.generateId = generateId;\n function processSubChild(createElement, fieldData, fields, ds, options, element, level) {\n // Get SubList\n var subDS = fieldData[fields.child] || [];\n var hasChildren = fieldData[fields.hasChildren];\n //Create Sub child\n if (subDS.length) {\n hasChildren = true;\n element.classList.add(cssClass.hasChild);\n if (options.processSubChild) {\n var subLi = createListFromJson(createElement, subDS, options, ++level);\n element.appendChild(subLi);\n }\n }\n // Create expand and collapse node\n if (!!options.expandCollapse && hasChildren && !options.template) {\n element.firstElementChild.classList.add(cssClass.iconWrapper);\n var expandElement = options.expandIconPosition === 'Left' ? prepend : append;\n expandElement([createElement('div', { className: 'e-icons ' + options.expandIconClass })], element.querySelector('.' + cssClass.textContent));\n }\n }\n function generateSingleLevelLI(createElement, item, fieldData, fields, className, innerElements, grpLI, id, index, options) {\n var curOpt = extend({}, defaultListBaseOptions, options);\n var ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes);\n var text = item;\n var value = item;\n var dataSource;\n if (typeof item !== 'string' && typeof item !== 'number' && typeof item !== 'boolean') {\n dataSource = item;\n text = (typeof fieldData[fields.text] === 'boolean' || typeof fieldData[fields.text] === 'number') ?\n fieldData[fields.text] : (fieldData[fields.text] || '');\n value = fieldData[fields.value];\n }\n var elementID;\n if (!isNullOrUndefined(dataSource) && !isNullOrUndefined(fieldData[fields.id])\n && fieldData[fields.id] !== '') {\n elementID = id;\n }\n else {\n elementID = id + '-' + index;\n }\n var li = createElement('li', {\n className: (grpLI === true ? cssClass.group : cssClass.li) + ' ' + (isNullOrUndefined(className) ? '' : className),\n id: elementID, attrs: (ariaAttributes.groupItemRole !== '' && ariaAttributes.itemRole !== '' ?\n { role: (grpLI === true ? ariaAttributes.groupItemRole : ariaAttributes.itemRole) } : {})\n });\n if (dataSource && fieldData.hasOwnProperty(fields.enabled) && fieldData[fields.enabled].toString() === 'false') {\n li.classList.add(cssClass.disabled);\n }\n if (grpLI) {\n li.innerText = text;\n }\n else {\n li.setAttribute('data-value', isNullOrUndefined(value) ? 'null' : value);\n li.setAttribute('role', 'option');\n if (dataSource && fieldData.hasOwnProperty(fields.htmlAttributes) && fieldData[fields.htmlAttributes]) {\n setAttribute(li, fieldData[fields.htmlAttributes]);\n }\n if (innerElements.length && !curOpt.itemNavigable) {\n append(innerElements, li);\n }\n if (dataSource && (fieldData[fields.url] || (fieldData[fields.urlAttributes] &&\n fieldData[fields.urlAttributes].href))) {\n li.appendChild(anchorTag(createElement, dataSource, fields, text, innerElements, curOpt.itemNavigable));\n }\n else {\n if (innerElements.length && curOpt.itemNavigable) {\n append(innerElements, li);\n }\n li.appendChild(document.createTextNode(text));\n }\n }\n return li;\n }\n function getModuleClass(moduleName) {\n var moduleClass;\n return moduleClass = {\n li: \"e-\" + moduleName + \"-item\",\n ul: \"e-\" + moduleName + \"-parent e-ul\",\n group: \"e-\" + moduleName + \"-group-item\",\n icon: \"e-\" + moduleName + \"-icon\",\n text: \"e-\" + moduleName + \"-text\",\n check: \"e-\" + moduleName + \"-check\",\n checked: 'e-checked',\n selected: 'e-selected',\n expanded: 'e-expanded',\n textContent: 'e-text-content',\n hasChild: 'e-has-child',\n level: 'e-level',\n url: \"e-\" + moduleName + \"-url\",\n collapsible: 'e-icon-collapsible',\n disabled: 'e-disabled',\n image: \"e-\" + moduleName + \"-img\",\n iconWrapper: 'e-icon-wrapper',\n anchorWrap: 'e-anchor-wrap',\n navigable: 'e-navigable',\n };\n }\n function anchorTag(createElement, dataSource, fields, text, innerElements, isFullNavigation) {\n var fieldData = getFieldValues(dataSource, fields);\n var attr = { href: fieldData[fields.url] };\n if (fieldData.hasOwnProperty(fields.urlAttributes) && fieldData[fields.urlAttributes]) {\n merge(attr, fieldData[fields.urlAttributes]);\n attr.href = fieldData[fields.url] ? fieldData[fields.url] :\n fieldData[fields.urlAttributes].href;\n }\n var anchorTag;\n if (!isFullNavigation) {\n anchorTag = createElement('a', { className: cssClass.text + ' ' + cssClass.url, innerHTML: text });\n }\n else {\n anchorTag = createElement('a', { className: cssClass.text + ' ' + cssClass.url });\n var anchorWrapper = createElement('div', { className: cssClass.anchorWrap });\n if (innerElements && innerElements.length) {\n append(innerElements, anchorWrapper);\n }\n anchorWrapper.appendChild(document.createTextNode(text));\n append([anchorWrapper], anchorTag);\n }\n setAttribute(anchorTag, attr);\n return anchorTag;\n }\n // tslint:disable-next-line\n /* tslint:disable:align */\n function generateLI(createElement, item, fieldData, \n // tslint:disable-next-line\n fields, className, options, componentInstance) {\n var curOpt = extend({}, defaultListBaseOptions, options);\n var ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes);\n var text = item;\n var uID;\n var grpLI;\n var dataSource;\n if (typeof item !== 'string' && typeof item !== 'number') {\n dataSource = item;\n text = fieldData[fields.text] || '';\n // tslint:disable-next-line\n uID = (isNullOrUndefined(fieldData['_id'])) ? fieldData[fields.id] : fieldData['_id'];\n grpLI = (item.hasOwnProperty('isHeader') && item.isHeader)\n ? true : false;\n }\n if (options && options.enableHtmlSanitizer) {\n text = text;\n }\n var li = createElement('li', {\n className: (grpLI === true ? cssClass.group : cssClass.li) + ' ' + (isNullOrUndefined(className) ? '' : className),\n attrs: (ariaAttributes.groupItemRole !== '' && ariaAttributes.itemRole !== '' ?\n { role: (grpLI === true ? ariaAttributes.groupItemRole : ariaAttributes.itemRole) } : {})\n });\n !isNullOrUndefined(uID) ? li.setAttribute('data-uid', uID) : li.setAttribute('data-uid', generateId());\n var blazId = 'BlazId';\n if (options && !!options.removeBlazorID\n && typeof item === 'object'\n && item.hasOwnProperty(blazId)) {\n delete item[blazId];\n }\n if (grpLI && options && options.groupTemplate) {\n var compiledString = compile(options.groupTemplate);\n append(compiledString(item, componentInstance, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate), li);\n }\n else if (!grpLI && options && options.template) {\n var compiledString = compile(options.template);\n append(compiledString(item, componentInstance, 'template', curOpt.templateID, !!curOpt.isStringTemplate), li);\n }\n else {\n var innerDiv = createElement('div', {\n className: cssClass.textContent,\n attrs: (ariaAttributes.wrapperRole !== '' ? { role: ariaAttributes.wrapperRole } : {})\n });\n if (dataSource && (fieldData[fields.url] || (fieldData[fields.urlAttributes] &&\n fieldData[fields.urlAttributes].href))) {\n innerDiv.appendChild(anchorTag(createElement, dataSource, fields, text, null, curOpt.itemNavigable));\n }\n else {\n var element = createElement('span', {\n className: cssClass.text,\n attrs: (ariaAttributes.itemText !== '' ? { role: ariaAttributes.itemText } : {})\n });\n if (options && options.enableHtmlSanitizer) {\n element.innerText = text;\n }\n else {\n element.innerHTML = text;\n }\n innerDiv.appendChild(element);\n }\n li.appendChild(innerDiv);\n }\n return li;\n }\n /**\n * Returns UL element based on the given LI element.\n * @param {HTMLElement[]} liElement - Specifies array of LI element.\n * @param {string} className? - Specifies class name that need to be added in UL element.\n * @param {ListBaseOptions} options? - Specifies ListBase options.\n */\n function generateUL(createElement, liElement, className, options) {\n var curOpt = extend({}, defaultListBaseOptions, options);\n var ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes);\n cssClass = getModuleClass(curOpt.moduleName);\n var ulElement = createElement('ul', {\n className: cssClass.ul + ' ' + (isNullOrUndefined(className) ? '' : className),\n attrs: (ariaAttributes.listRole !== '' ? { role: ariaAttributes.listRole } : {})\n });\n append(liElement, ulElement);\n return ulElement;\n }\n ListBase.generateUL = generateUL;\n /**\n * Returns LI element with additional DIV tag based on the given LI element.\n * @param {liElement} liElement - Specifies LI element.\n * @param {string} className? - Specifies class name that need to be added in created DIV element.\n * @param {ListBaseOptions} options? - Specifies ListBase options.\n */\n function generateIcon(createElement, liElement, className, options) {\n var curOpt = extend({}, defaultListBaseOptions, options);\n cssClass = getModuleClass(curOpt.moduleName);\n var expandElement = curOpt.expandIconPosition === 'Left' ? prepend : append;\n expandElement([createElement('div', {\n className: 'e-icons ' + curOpt.expandIconClass + ' ' +\n (isNullOrUndefined(className) ? '' : className)\n })], liElement.querySelector('.' + cssClass.textContent));\n return liElement;\n }\n ListBase.generateIcon = generateIcon;\n})(ListBase || (ListBase = {}));\n/**\n * Used to get dataSource item from complex data using fields.\n * @param {{[key:string]:Object}|string[]|string} dataSource - Specifies an JSON or String data.\n * @param {FieldsMapping} fields - Fields that are mapped from the dataSource.\n */\nexport function getFieldValues(dataItem, fields) {\n var fieldData = {};\n if (isNullOrUndefined(dataItem) || typeof (dataItem) === 'string' || typeof (dataItem) === 'number'\n || !isNullOrUndefined(dataItem.isHeader)) {\n return dataItem;\n }\n else {\n for (var _i = 0, _a = Object.keys(fields); _i < _a.length; _i++) {\n var field = _a[_i];\n var dataField = fields[field];\n var value = !isNullOrUndefined(dataField) &&\n typeof (dataField) === 'string' ? getValue(dataField, dataItem) : undefined;\n if (!isNullOrUndefined(value)) {\n fieldData[dataField] = value;\n }\n }\n }\n return fieldData;\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, EventHandler, addClass, append, Property, Event, L10n, compile } from '@syncfusion/ej2-base';\nimport { setStyleAttribute, extend, removeClass, prepend, isNullOrUndefined, detach, getValue } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, rippleEffect, ChildProperty, Complex } from '@syncfusion/ej2-base';\nimport { DataManager, Query, DataUtil } from '@syncfusion/ej2-data';\nimport { ListBase } from '@syncfusion/ej2-lists';\nimport { updateBlazorTemplate, resetBlazorTemplate, isBlazor, remove, select, selectAll } from '@syncfusion/ej2-base';\nvar FieldSettings = /** @class */ (function (_super) {\n __extends(FieldSettings, _super);\n function FieldSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property()\n ], FieldSettings.prototype, \"text\", void 0);\n __decorate([\n Property()\n ], FieldSettings.prototype, \"value\", void 0);\n __decorate([\n Property()\n ], FieldSettings.prototype, \"iconCss\", void 0);\n __decorate([\n Property()\n ], FieldSettings.prototype, \"groupBy\", void 0);\n __decorate([\n Property()\n ], FieldSettings.prototype, \"htmlAttributes\", void 0);\n return FieldSettings;\n}(ChildProperty));\nexport { FieldSettings };\nexport var dropDownBaseClasses = {\n root: 'e-dropdownbase',\n rtl: 'e-rtl',\n content: 'e-content',\n selected: 'e-active',\n hover: 'e-hover',\n noData: 'e-nodata',\n fixedHead: 'e-fixed-head',\n focus: 'e-item-focus',\n li: 'e-list-item',\n group: 'e-list-group-item',\n disabled: 'e-disabled',\n grouping: 'e-dd-group'\n};\nvar ITEMTEMPLATE_PROPERTY = 'ItemTemplate';\nvar VALUETEMPLATE_PROPERTY = 'ValueTemplate';\nvar GROUPTEMPLATE_PROPERTY = 'GroupTemplate';\nvar HEADERTEMPLATE_PROPERTY = 'HeaderTemplate';\nvar FOOTERTEMPLATE_PROPERTY = 'FooterTemplate';\nvar NORECORDSTEMPLATE_PROPERTY = 'NoRecordsTemplate';\nvar ACTIONFAILURETEMPLATE_PROPERTY = 'ActionFailureTemplate';\n/**\n * DropDownBase component will generate the list items based on given data and act as base class to drop-down related components\n */\nvar DropDownBase = /** @class */ (function (_super) {\n __extends(DropDownBase, _super);\n /**\n * * Constructor for DropDownBase class\n */\n function DropDownBase(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.preventChange = false;\n _this.isAngular = false;\n _this.isPreventChange = false;\n return _this;\n }\n ;\n DropDownBase.prototype.getPropObject = function (prop, newProp, oldProp) {\n var newProperty = new Object();\n var oldProperty = new Object();\n // tslint:disable-next-line:no-function-constructor-with-string-args\n var propName = function (prop) {\n return prop;\n };\n newProperty[propName(prop)] = newProp[propName(prop)];\n oldProperty[propName(prop)] = oldProp[propName(prop)];\n var data = new Object();\n data.newProperty = newProperty;\n data.oldProperty = oldProperty;\n return data;\n };\n DropDownBase.prototype.getValueByText = function (text, ignoreCase, ignoreAccent) {\n var value = null;\n if (!isNullOrUndefined(this.listData)) {\n if (ignoreCase) {\n value = this.checkValueCase(text, true, ignoreAccent);\n }\n else {\n value = this.checkValueCase(text, false, ignoreAccent);\n }\n }\n return value;\n };\n ;\n DropDownBase.prototype.checkValueCase = function (text, ignoreCase, ignoreAccent, isTextByValue) {\n var _this = this;\n var value = null;\n if (isTextByValue) {\n value = text;\n }\n var dataSource = this.listData;\n var fields = this.fields;\n var type = this.typeOfData(dataSource).typeof;\n if (type === 'string' || type === 'number' || type === 'boolean') {\n for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {\n var item = dataSource_1[_i];\n if (!isNullOrUndefined(item)) {\n if (ignoreAccent) {\n value = this.checkingAccent(String(item), text, ignoreCase);\n }\n else {\n if (ignoreCase) {\n if (this.checkIgnoreCase(String(item), text)) {\n value = this.getItemValue(String(item), text, ignoreCase);\n }\n }\n else {\n if (this.checkNonIgnoreCase(String(item), text)) {\n value = this.getItemValue(String(item), text, ignoreCase, isTextByValue);\n }\n }\n }\n }\n }\n }\n else {\n if (ignoreCase) {\n dataSource.filter(function (item) {\n var itemValue = getValue(fields.value, item);\n if (!isNullOrUndefined(itemValue) && _this.checkIgnoreCase(getValue(fields.text, item).toString(), text)) {\n value = getValue(fields.value, item);\n }\n });\n }\n else {\n if (isTextByValue) {\n dataSource.filter(function (item) {\n var itemValue = getValue(fields.value, item);\n if (!isNullOrUndefined(itemValue) && !isNullOrUndefined(value) && itemValue.toString() === value.toString()) {\n value = getValue(fields.text, item);\n }\n });\n }\n else {\n dataSource.filter(function (item) {\n if (_this.checkNonIgnoreCase(getValue(fields.text, item), text)) {\n value = getValue(fields.value, item);\n }\n });\n }\n }\n }\n return value;\n };\n DropDownBase.prototype.checkingAccent = function (item, text, ignoreCase) {\n var dataItem = DataUtil.ignoreDiacritics(String(item));\n var textItem = DataUtil.ignoreDiacritics(text.toString());\n var value = null;\n if (ignoreCase) {\n if (this.checkIgnoreCase(dataItem, textItem)) {\n value = this.getItemValue(String(item), text, ignoreCase);\n }\n }\n else {\n if (this.checkNonIgnoreCase(String(item), text)) {\n value = this.getItemValue(String(item), text, ignoreCase);\n }\n }\n return value;\n };\n DropDownBase.prototype.checkIgnoreCase = function (item, text) {\n return String(item).toLowerCase() === text.toString().toLowerCase() ? true : false;\n };\n DropDownBase.prototype.checkNonIgnoreCase = function (item, text) {\n return String(item) === text.toString() ? true : false;\n };\n DropDownBase.prototype.getItemValue = function (dataItem, typedText, ignoreCase, isTextByValue) {\n var value = null;\n var dataSource = this.listData;\n var type = this.typeOfData(dataSource).typeof;\n if (isTextByValue) {\n value = dataItem.toString();\n }\n else {\n if (ignoreCase) {\n value = type === 'string' ? String(dataItem) : this.getFormattedValue(String(dataItem));\n }\n else {\n value = type === 'string' ? typedText : this.getFormattedValue(typedText);\n }\n }\n return value;\n };\n DropDownBase.prototype.templateCompiler = function (baseTemplate) {\n var checkTemplate = false;\n if (baseTemplate) {\n var exception = void 0;\n try {\n checkTemplate = (selectAll(baseTemplate, document).length) ? true : false;\n }\n catch (exception) {\n checkTemplate = false;\n }\n }\n return checkTemplate;\n };\n DropDownBase.prototype.l10nUpdate = function (actionFailure) {\n var ele = this.getModuleName() === 'listbox' ? this.ulElement : this.list;\n if (this.noRecordsTemplate !== 'No records found' || this.actionFailureTemplate !== 'Request failed') {\n this.DropDownBaseresetBlazorTemplates(false, false, true, true);\n var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;\n var compiledString = void 0;\n var templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;\n ele.innerHTML = '';\n var tempaltecheck = this.templateCompiler(template);\n if (tempaltecheck) {\n compiledString = compile(select(template, document).innerHTML.trim());\n }\n else {\n compiledString = compile(template);\n }\n var templateName = actionFailure ? 'actionFailureTemplate' : 'noRecordsTemplate';\n // tslint:disable-next-line\n var noDataCompTemp = compiledString({}, this, templateName, templateId, this.isStringTemplate, null, ele);\n if (noDataCompTemp && noDataCompTemp.length > 0) {\n for (var i = 0; i < noDataCompTemp.length; i++) {\n ele.appendChild(noDataCompTemp[i]);\n }\n }\n this.DropDownBaseupdateBlazorTemplates(false, false, !actionFailure, actionFailure, false, false, false, false);\n }\n else {\n var l10nLocale = { noRecordsTemplate: 'No records found', actionFailureTemplate: 'Request failed' };\n var componentLocale = new L10n(this.getLocaleName(), {}, this.locale);\n if (componentLocale.getConstant('actionFailureTemplate') !== '') {\n this.l10n = componentLocale;\n }\n else {\n this.l10n = new L10n(this.getModuleName() === 'listbox' ? 'listbox' : 'dropdowns', l10nLocale, this.locale);\n }\n var content = actionFailure ?\n this.l10n.getConstant('actionFailureTemplate') : this.l10n.getConstant('noRecordsTemplate');\n if (this.getModuleName() === 'listbox') {\n var liElem = this.createElement('li');\n liElem.textContent = content;\n ele.appendChild(liElem);\n liElem.classList.add('e-list-nrt');\n }\n else {\n ele.innerHTML = content;\n }\n }\n };\n DropDownBase.prototype.getLocaleName = function () {\n return 'drop-down-base';\n };\n ;\n DropDownBase.prototype.getTextByValue = function (value) {\n var text;\n text = this.checkValueCase(value, false, false, true);\n return text;\n };\n DropDownBase.prototype.getFormattedValue = function (value) {\n if (this.listData && this.listData.length) {\n var item = this.typeOfData(this.listData);\n if (isBlazor() && isNullOrUndefined(value) || value === 'null') {\n return null;\n }\n if (typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'number'\n || item.typeof === 'number') {\n return parseFloat(value);\n }\n if (typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'boolean'\n || item.typeof === 'boolean') {\n return (value === 'true');\n }\n }\n return value;\n };\n /**\n * Sets RTL to dropdownbase wrapper\n */\n DropDownBase.prototype.setEnableRtl = function () {\n if (this.list) {\n this.enableRtlElements.push(this.list);\n }\n this.enableRtl ? addClass(this.enableRtlElements, dropDownBaseClasses.rtl) :\n removeClass(this.enableRtlElements, dropDownBaseClasses.rtl);\n };\n ;\n /**\n * Initialize the Component.\n */\n DropDownBase.prototype.initialize = function () {\n this.bindEvent = true;\n this.actionFailureTemplateId = \"\" + this.element.id + ACTIONFAILURETEMPLATE_PROPERTY;\n if (this.element.tagName === 'UL') {\n var jsonElement = ListBase.createJsonFromElement(this.element);\n this.setProperties({ fields: { text: 'text', value: 'text' } }, true);\n this.resetList(jsonElement, this.fields);\n }\n else if (this.element.tagName === 'SELECT') {\n var dataSource = this.dataSource instanceof Array ? (this.dataSource.length > 0 ? true : false)\n : !isNullOrUndefined(this.dataSource) ? true : false;\n if (!dataSource) {\n this.renderItemsBySelect();\n }\n }\n else {\n this.setListData(this.dataSource, this.fields, this.query);\n }\n };\n ;\n DropDownBase.prototype.DropDownBaseupdateBlazorTemplates = function (item, group, noRecord, action, value, header, footer, isEmpty) {\n if (!this.isStringTemplate) {\n if (this.itemTemplate && item) {\n updateBlazorTemplate(this.itemTemplateId, ITEMTEMPLATE_PROPERTY, this, isEmpty);\n }\n if (this.groupTemplate && group) {\n updateBlazorTemplate(this.groupTemplateId, GROUPTEMPLATE_PROPERTY, this, isEmpty);\n }\n if (this.noRecordsTemplate && noRecord) {\n updateBlazorTemplate(this.noRecordsTemplateId, NORECORDSTEMPLATE_PROPERTY, this, isEmpty);\n }\n if (this.actionFailureTemplate && action) {\n updateBlazorTemplate(this.actionFailureTemplateId, ACTIONFAILURETEMPLATE_PROPERTY, this, isEmpty);\n }\n if (value) {\n updateBlazorTemplate(this.valueTemplateId, VALUETEMPLATE_PROPERTY, this, isEmpty);\n }\n if (header) {\n updateBlazorTemplate(this.headerTemplateId, HEADERTEMPLATE_PROPERTY, this);\n }\n if (footer) {\n updateBlazorTemplate(this.footerTemplateId, FOOTERTEMPLATE_PROPERTY, this);\n }\n }\n };\n DropDownBase.prototype.DropDownBaseresetBlazorTemplates = function (item, group, noRecord, action, value, header, footer) {\n if (!this.isStringTemplate) {\n if (this.itemTemplate && item) {\n resetBlazorTemplate(this.itemTemplateId, ITEMTEMPLATE_PROPERTY);\n }\n if (this.groupTemplate && group) {\n resetBlazorTemplate(this.groupTemplateId, GROUPTEMPLATE_PROPERTY);\n }\n if (this.noRecordsTemplate && noRecord) {\n resetBlazorTemplate(this.noRecordsTemplateId, NORECORDSTEMPLATE_PROPERTY);\n }\n if (this.actionFailureTemplate && action) {\n resetBlazorTemplate(this.actionFailureTemplateId, ACTIONFAILURETEMPLATE_PROPERTY);\n }\n if (value) {\n resetBlazorTemplate(this.valueTemplateId, VALUETEMPLATE_PROPERTY);\n }\n if (header) {\n resetBlazorTemplate(this.headerTemplateId, HEADERTEMPLATE_PROPERTY);\n }\n if (footer) {\n resetBlazorTemplate(this.footerTemplateId, FOOTERTEMPLATE_PROPERTY);\n }\n }\n };\n /**\n * Get the properties to be maintained in persisted state.\n */\n DropDownBase.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n ;\n /**\n * Sets the enabled state to DropDownBase.\n */\n DropDownBase.prototype.setEnabled = function () {\n this.element.setAttribute('aria-disabled', (this.enabled) ? 'false' : 'true');\n };\n ;\n /**\n * Sets the enabled state to DropDownBase.\n */\n DropDownBase.prototype.updateDataAttribute = function (value) {\n var invalidAttr = ['class', 'style', 'id', 'type'];\n var attr = {};\n for (var a = 0; a < this.element.attributes.length; a++) {\n if (invalidAttr.indexOf(this.element.attributes[a].name) === -1 &&\n !(this.getModuleName() === 'dropdownlist' && this.element.attributes[a].name === 'readonly')) {\n attr[this.element.attributes[a].name] = this.element.getAttribute(this.element.attributes[a].name);\n }\n }\n extend(attr, value, attr);\n this.setProperties({ htmlAttributes: attr }, true);\n };\n DropDownBase.prototype.renderItemsBySelect = function () {\n var element = this.element;\n var fields = { value: 'value', text: 'text' };\n var jsonElement = [];\n var group = element.querySelectorAll('select>optgroup');\n var option = element.querySelectorAll('select>option');\n this.getJSONfromOption(jsonElement, option, fields);\n if (group.length) {\n for (var i = 0; i < group.length; i++) {\n var item = group[i];\n var optionGroup = {};\n optionGroup[fields.text] = item.label;\n optionGroup.isHeader = true;\n var child = item.querySelectorAll('option');\n jsonElement.push(optionGroup);\n this.getJSONfromOption(jsonElement, child, fields);\n }\n var items = element.querySelectorAll('select>option');\n }\n this.updateFields(fields.text, fields.value, this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss);\n this.resetList(jsonElement, fields);\n };\n DropDownBase.prototype.updateFields = function (text, value, groupBy, htmlAttributes, iconCss) {\n var field = {\n 'fields': {\n text: text,\n value: value,\n groupBy: !isNullOrUndefined(groupBy) ? groupBy : this.fields && this.fields.groupBy,\n htmlAttributes: !isNullOrUndefined(htmlAttributes) ? htmlAttributes : this.fields && this.fields.htmlAttributes,\n iconCss: !isNullOrUndefined(iconCss) ? iconCss : this.fields && this.fields.iconCss\n }\n };\n this.setProperties(field, true);\n };\n DropDownBase.prototype.getJSONfromOption = function (items, options, fields) {\n for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {\n var option = options_1[_i];\n var json = {};\n json[fields.text] = option.innerText;\n json[fields.value] = !isNullOrUndefined(option.getAttribute(fields.value)) ?\n option.getAttribute(fields.value) : option.innerText;\n items.push(json);\n }\n };\n /**\n * Execute before render the list items\n * @private\n */\n DropDownBase.prototype.preRender = function () {\n // there is no event handler\n this.scrollTimer = -1;\n this.enableRtlElements = [];\n this.isRequested = false;\n this.isDataFetched = false;\n this.itemTemplateId = \"\" + this.element.id + ITEMTEMPLATE_PROPERTY;\n this.valueTemplateId = \"\" + this.element.id + VALUETEMPLATE_PROPERTY;\n this.groupTemplateId = \"\" + this.element.id + GROUPTEMPLATE_PROPERTY;\n this.headerTemplateId = \"\" + this.element.id + HEADERTEMPLATE_PROPERTY;\n this.footerTemplateId = \"\" + this.element.id + FOOTERTEMPLATE_PROPERTY;\n this.noRecordsTemplateId = \"\" + this.element.id + NORECORDSTEMPLATE_PROPERTY;\n };\n /**\n * Creates the list items of DropDownBase component.\n */\n DropDownBase.prototype.setListData = function (dataSource, fields, query) {\n var _this = this;\n fields = fields ? fields : this.fields;\n var ulElement;\n this.isActive = true;\n var eventArgs = { cancel: false, data: dataSource, query: query };\n this.isPreventChange = this.isAngular && this.preventChange ? true : this.isPreventChange;\n this.trigger('actionBegin', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n _this.showSpinner();\n if (dataSource instanceof DataManager) {\n _this.isRequested = true;\n if (_this.isDataFetched) {\n _this.emptyDataRequest(fields);\n return;\n }\n eventArgs.data.executeQuery(_this.getQuery(eventArgs.query)).then(function (e) {\n _this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;\n _this.trigger('actionComplete', e, function (e) {\n if (!e.cancel) {\n var listItems = e.result;\n if (listItems.length === 0) {\n _this.isDataFetched = true;\n }\n ulElement = _this.renderItems(listItems, fields);\n _this.onActionComplete(ulElement, listItems, e);\n if (_this.groupTemplate) {\n _this.renderGroupTemplate(ulElement);\n }\n _this.isRequested = false;\n _this.bindChildItems(listItems, ulElement, fields, e);\n }\n });\n }).catch(function (e) {\n _this.isRequested = false;\n _this.onActionFailure(e);\n _this.hideSpinner();\n });\n }\n else {\n var dataManager = new DataManager(eventArgs.data);\n var listItems = (_this.getQuery(eventArgs.query)).executeLocal(dataManager);\n var localDataArgs = { cancel: false, result: listItems };\n _this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;\n _this.trigger('actionComplete', localDataArgs, function (localDataArgs) {\n if (!localDataArgs.cancel) {\n ulElement = _this.renderItems(localDataArgs.result, fields);\n _this.onActionComplete(ulElement, localDataArgs.result);\n if (_this.groupTemplate) {\n _this.renderGroupTemplate(ulElement);\n }\n _this.bindChildItems(localDataArgs.result, ulElement, fields);\n }\n });\n }\n }\n });\n };\n DropDownBase.prototype.bindChildItems = function (listItems, ulElement, fields, e) {\n var _this = this;\n if (listItems.length >= 100 && this.getModuleName() === 'autocomplete') {\n setTimeout(function () {\n var childNode = _this.remainingItems(_this.sortedData, fields);\n append(childNode, ulElement);\n _this.DropDownBaseupdateBlazorTemplates(true, false, false, false);\n _this.liCollections = _this.list.querySelectorAll('.' + dropDownBaseClasses.li);\n _this.updateListValues();\n _this.raiseDataBound(listItems, e);\n }, 0);\n }\n else {\n this.raiseDataBound(listItems, e);\n }\n };\n DropDownBase.prototype.updateListValues = function () {\n // Used this method in component side.\n };\n DropDownBase.prototype.findListElement = function (list, findNode, attribute, value) {\n var liElement = null;\n if (list) {\n var listArr = [].slice.call(list.querySelectorAll(findNode));\n for (var index = 0; index < listArr.length; index++) {\n if (listArr[index].getAttribute(attribute) === (value + '')) {\n liElement = listArr[index];\n break;\n }\n }\n }\n return liElement;\n };\n DropDownBase.prototype.raiseDataBound = function (listItems, e) {\n this.hideSpinner();\n var dataBoundEventArgs = {\n items: listItems,\n e: e\n };\n this.trigger('dataBound', dataBoundEventArgs);\n };\n DropDownBase.prototype.remainingItems = function (dataSource, fields) {\n var spliceData = new DataManager(dataSource).executeLocal(new Query().skip(100));\n if (this.itemTemplate) {\n var listElements = this.templateListItem(spliceData, fields);\n return [].slice.call(listElements.childNodes);\n }\n var type = this.typeOfData(spliceData).typeof;\n if (type === 'string' || type === 'number' || type === 'boolean') {\n return ListBase.createListItemFromArray(this.createElement, spliceData, true, this.listOption(spliceData, fields), this);\n }\n return ListBase.createListItemFromJson(this.createElement, spliceData, this.listOption(spliceData, fields), 1, true, this);\n };\n DropDownBase.prototype.emptyDataRequest = function (fields) {\n var listItems = [];\n this.onActionComplete(this.renderItems(listItems, fields), listItems);\n this.isRequested = false;\n this.hideSpinner();\n };\n DropDownBase.prototype.showSpinner = function () {\n // Used this method in component side.\n };\n DropDownBase.prototype.hideSpinner = function () {\n // Used this method in component side.\n };\n DropDownBase.prototype.onActionFailure = function (e) {\n this.liCollections = [];\n this.trigger('actionFailure', e);\n this.l10nUpdate(true);\n addClass([this.list], dropDownBaseClasses.noData);\n };\n DropDownBase.prototype.onActionComplete = function (ulElement, list, e) {\n this.listData = list;\n if (isBlazor() && this.isServerRendered && this.getModuleName() === 'listbox') {\n remove(this.list.querySelector('.e-list-parent'));\n remove(this.list.querySelector('.e-hidden-select'));\n }\n else {\n // tslint:disable-next-line \n if (this.isReact) {\n this.clearTemplate(['itemTemplate', 'groupTemplate', 'actionFailureTemplate', 'noRecordsTemplate']);\n }\n this.list.innerHTML = '';\n }\n this.fixedHeaderElement = isNullOrUndefined(this.fixedHeaderElement) ? this.fixedHeaderElement : null;\n this.list.appendChild(ulElement);\n this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);\n this.ulElement = this.list.querySelector('ul');\n this.postRender(this.list, list, this.bindEvent);\n };\n DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {\n var focusItem = listElement.querySelector('.' + dropDownBaseClasses.li);\n var selectedItem = listElement.querySelector('.' + dropDownBaseClasses.selected);\n if (focusItem && !selectedItem) {\n focusItem.classList.add(dropDownBaseClasses.focus);\n }\n if (list.length <= 0) {\n this.l10nUpdate();\n addClass([listElement], dropDownBaseClasses.noData);\n }\n else {\n listElement.classList.remove(dropDownBaseClasses.noData);\n }\n };\n /**\n * Get the query to do the data operation before list item generation.\n */\n DropDownBase.prototype.getQuery = function (query) {\n return query ? query : this.query ? this.query : new Query();\n };\n /**\n * To render the template content for group header element.\n */\n DropDownBase.prototype.renderGroupTemplate = function (listEle) {\n if (this.fields.groupBy !== null && this.dataSource || this.element.querySelector('.' + dropDownBaseClasses.group)) {\n var dataSource = this.dataSource;\n var option = { groupTemplateID: this.groupTemplateId, isStringTemplate: this.isStringTemplate };\n var headerItems = listEle.querySelectorAll('.' + dropDownBaseClasses.group);\n var groupcheck = this.templateCompiler(this.groupTemplate);\n if (groupcheck) {\n var groupValue = select(this.groupTemplate, document).innerHTML.trim();\n var tempHeaders = ListBase.renderGroupTemplate(groupValue, dataSource, this.fields.properties, headerItems, option, this);\n }\n else {\n var tempHeaders = ListBase.renderGroupTemplate(this.groupTemplate, dataSource, this.fields.properties, headerItems, option, this);\n }\n this.DropDownBaseupdateBlazorTemplates(false, true, false, false, false, false, false, false);\n }\n };\n /**\n * To create the ul li list items\n */\n DropDownBase.prototype.createListItems = function (dataSource, fields) {\n if (dataSource && fields.groupBy || this.element.querySelector('optgroup')) {\n if (fields.groupBy) {\n if (this.sortOrder !== 'None') {\n dataSource = this.getSortedDataSource(dataSource);\n }\n dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);\n }\n addClass([this.list], dropDownBaseClasses.grouping);\n }\n else {\n dataSource = this.getSortedDataSource(dataSource);\n }\n var options = this.listOption(dataSource, fields);\n var spliceData = (dataSource.length > 100) ?\n new DataManager(dataSource).executeLocal(new Query().take(100))\n : dataSource;\n this.sortedData = dataSource;\n return ListBase.createList(this.createElement, (this.getModuleName() === 'autocomplete') ? spliceData : dataSource, options, true, this);\n };\n ;\n DropDownBase.prototype.listOption = function (dataSource, fields) {\n var iconCss = isNullOrUndefined(fields.iconCss) ? false : true;\n var fieldValues = !isNullOrUndefined(fields.properties) ?\n fields.properties : fields;\n var options = (fields.text !== null || fields.value !== null) ? {\n fields: fieldValues,\n showIcon: iconCss, ariaAttributes: { groupItemRole: 'presentation' }\n } : { fields: { value: 'text' } };\n return extend({}, options, fields, true);\n };\n ;\n DropDownBase.prototype.setFloatingHeader = function (e) {\n if (isNullOrUndefined(this.fixedHeaderElement)) {\n this.fixedHeaderElement = this.createElement('div', { className: dropDownBaseClasses.fixedHead });\n if (!this.list.querySelector('li').classList.contains(dropDownBaseClasses.group)) {\n this.fixedHeaderElement.style.display = 'none';\n }\n prepend([this.fixedHeaderElement], this.list);\n this.setFixedHeader();\n }\n if (!isNullOrUndefined(this.fixedHeaderElement) && this.fixedHeaderElement.style.zIndex === '0') {\n this.setFixedHeader();\n }\n this.scrollStop(e);\n };\n DropDownBase.prototype.scrollStop = function (e) {\n var target = e.target;\n var liHeight = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue('height'), 10);\n var topIndex = Math.round(target.scrollTop / liHeight);\n var liCollections = this.list.querySelectorAll('li');\n for (var i = topIndex; i > -1; i--) {\n if (!isNullOrUndefined(liCollections[i]) && liCollections[i].classList.contains(dropDownBaseClasses.group)) {\n var currentLi = liCollections[i];\n this.fixedHeaderElement.innerHTML = currentLi.innerHTML;\n this.fixedHeaderElement.style.top = e.target.scrollTop + 'px';\n this.fixedHeaderElement.style.display = 'block';\n break;\n }\n else {\n this.fixedHeaderElement.style.display = 'none';\n this.fixedHeaderElement.style.top = 'none';\n }\n }\n };\n /**\n * To render the list items\n */\n DropDownBase.prototype.renderItems = function (listData, fields) {\n var ulElement;\n if (this.itemTemplate && listData) {\n var dataSource = listData;\n if (dataSource && fields.groupBy) {\n if (this.sortOrder !== 'None') {\n dataSource = this.getSortedDataSource(dataSource);\n }\n dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);\n }\n else {\n dataSource = this.getSortedDataSource(dataSource);\n }\n this.sortedData = dataSource;\n var spliceData = (dataSource.length > 100) ?\n new DataManager(dataSource).executeLocal(new Query().take(100))\n : dataSource;\n ulElement = this.templateListItem((this.getModuleName() === 'autocomplete') ? spliceData : dataSource, fields);\n var isTempEmpty = (this.getModuleName() === 'listbox') ? true : false;\n this.DropDownBaseupdateBlazorTemplates(true, false, false, false, false, false, false, isTempEmpty);\n }\n else {\n ulElement = this.createListItems(listData, fields);\n }\n return ulElement;\n };\n ;\n DropDownBase.prototype.templateListItem = function (dataSource, fields) {\n this.DropDownBaseresetBlazorTemplates(true, false, false, false);\n var option = this.listOption(dataSource, fields);\n option.templateID = this.itemTemplateId;\n option.isStringTemplate = this.isStringTemplate;\n var itemcheck = this.templateCompiler(this.itemTemplate);\n if (itemcheck) {\n var itemValue = select(this.itemTemplate, document).innerHTML.trim();\n return ListBase.renderContentTemplate(this.createElement, itemValue, dataSource, fields.properties, option, this);\n }\n else {\n return ListBase.renderContentTemplate(this.createElement, this.itemTemplate, dataSource, fields.properties, option, this);\n }\n };\n ;\n DropDownBase.prototype.typeOfData = function (items) {\n var item = { typeof: null, item: null };\n for (var i = 0; (!isNullOrUndefined(items) && i < items.length); i++) {\n if (!isNullOrUndefined(items[i])) {\n var listDataType = typeof (items[i]) === 'string' ||\n typeof (items[i]) === 'number' || typeof (items[i]) === 'boolean';\n var isNullData = listDataType ? isNullOrUndefined(items[i]) :\n isNullOrUndefined(getValue((this.fields.value ? this.fields.value : 'value'), items[i]));\n if (!isNullData) {\n return item = { typeof: typeof items[i], item: items[i] };\n }\n }\n }\n return item;\n };\n DropDownBase.prototype.setFixedHeader = function () {\n this.list.parentElement.style.display = 'block';\n var borderWidth = 0;\n if (this.list && this.list.parentElement) {\n borderWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-width'), 10);\n }\n var liWidth = this.liCollections[0].offsetWidth - borderWidth;\n this.fixedHeaderElement.style.width = liWidth.toString() + 'px';\n setStyleAttribute(this.fixedHeaderElement, { zIndex: 10 });\n var firstLi = this.ulElement.querySelector('.' + dropDownBaseClasses.group);\n this.fixedHeaderElement.innerHTML = firstLi.innerHTML;\n };\n DropDownBase.prototype.getSortedDataSource = function (dataSource) {\n if (dataSource && this.sortOrder !== 'None') {\n var textField = this.fields.text ? this.fields.text : 'text';\n if (this.typeOfData(dataSource).typeof === 'string' || this.typeOfData(dataSource).typeof === 'number'\n || this.typeOfData(dataSource).typeof === 'boolean') {\n textField = '';\n }\n dataSource = ListBase.getDataSource(dataSource, ListBase.addSorting(this.sortOrder, textField));\n }\n return dataSource;\n };\n /**\n * Return the index of item which matched with given value in data source\n */\n DropDownBase.prototype.getIndexByValue = function (value) {\n var index;\n var listItems = this.getItems();\n for (var i = 0; i < listItems.length; i++) {\n if (!isNullOrUndefined(value) && listItems[i].getAttribute('data-value') === value.toString()) {\n index = i;\n break;\n }\n }\n return index;\n };\n ;\n /**\n * To dispatch the event manually\n */\n DropDownBase.prototype.dispatchEvent = function (element, type) {\n var evt = document.createEvent('HTMLEvents');\n evt.initEvent(type, false, true);\n element.dispatchEvent(evt);\n };\n /**\n * To set the current fields\n */\n DropDownBase.prototype.setFields = function () {\n if (this.fields.value && !this.fields.text) {\n this.updateFields(this.fields.value, this.fields.value);\n }\n else if (!this.fields.value && this.fields.text) {\n this.updateFields(this.fields.text, this.fields.text);\n }\n else if (!this.fields.value && !this.fields.text) {\n this.updateFields('text', 'text');\n }\n };\n /**\n * reset the items list.\n */\n DropDownBase.prototype.resetList = function (dataSource, fields, query) {\n if (this.list) {\n if ((this.element.tagName === 'SELECT' && this.element.options.length > 0)\n || (this.element.tagName === 'UL' && this.element.childNodes.length > 0)) {\n var data = dataSource instanceof Array ? (dataSource.length > 0)\n : !isNullOrUndefined(dataSource);\n if (!data && this.selectData && this.selectData.length > 0) {\n dataSource = this.selectData;\n }\n }\n this.setListData(dataSource, fields, query);\n }\n };\n DropDownBase.prototype.updateSelectElementData = function (isFiltering) {\n if (isFiltering && isNullOrUndefined(this.selectData) && this.listData && this.listData.length > 0) {\n this.selectData = this.listData;\n }\n };\n DropDownBase.prototype.updateSelection = function () {\n // This is for after added the item, need to update the selected index values.\n };\n DropDownBase.prototype.renderList = function () {\n // This is for render the list items.\n this.render();\n };\n DropDownBase.prototype.updateDataSource = function (props) {\n this.resetList(this.dataSource);\n };\n DropDownBase.prototype.setUpdateInitial = function (props, newProp) {\n this.isDataFetched = false;\n var updateData = {};\n for (var j = 0; props.length > j; j++) {\n if (newProp[props[j]] && props[j] === 'fields') {\n this.setFields();\n updateData[props[j]] = newProp[props[j]];\n }\n else if (newProp[props[j]]) {\n updateData[props[j]] = newProp[props[j]];\n }\n }\n if (Object.keys(updateData).length > 0) {\n if (Object.keys(updateData).indexOf('dataSource') === -1) {\n updateData.dataSource = this.dataSource;\n }\n this.updateDataSource(updateData);\n }\n };\n /**\n * When property value changes happened, then onPropertyChanged method will execute the respective changes in this component.\n * @private\n */\n DropDownBase.prototype.onPropertyChanged = function (newProp, oldProp) {\n if (this.getModuleName() === 'dropdownbase') {\n this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);\n }\n this.setUpdateInitial(['sortOrder', 'itemTemplate'], newProp);\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'query':\n case 'sortOrder':\n case 'dataSource':\n case 'itemTemplate':\n break;\n case 'enableRtl':\n this.setEnableRtl();\n break;\n case 'enabled':\n this.setEnabled();\n break;\n case 'groupTemplate':\n this.renderGroupTemplate(this.list);\n if (this.ulElement && this.fixedHeaderElement) {\n var firstLi = this.ulElement.querySelector('.' + dropDownBaseClasses.group);\n this.fixedHeaderElement.innerHTML = firstLi.innerHTML;\n }\n break;\n case 'locale':\n if (this.list && (!isNullOrUndefined(this.liCollections) && this.liCollections.length === 0)) {\n this.l10nUpdate();\n }\n break;\n case 'zIndex':\n this.setProperties({ zIndex: newProp.zIndex }, true);\n this.setZIndex();\n break;\n }\n }\n };\n ;\n /**\n * Build and render the component\n * @private\n */\n DropDownBase.prototype.render = function (isEmptyData) {\n this.list = this.createElement('div', { className: dropDownBaseClasses.content, attrs: { 'tabindex': '0' } });\n this.list.classList.add(dropDownBaseClasses.root);\n this.setFields();\n var rippleModel = { duration: 300, selector: '.' + dropDownBaseClasses.li };\n this.rippleFun = rippleEffect(this.list, rippleModel);\n var group = this.element.querySelector('select>optgroup');\n if ((this.fields.groupBy || !isNullOrUndefined(group)) && !this.isGroupChecking) {\n EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);\n }\n if (this.getModuleName() === 'dropdownbase') {\n if (this.element.getAttribute('tabindex')) {\n this.list.setAttribute('tabindex', this.element.getAttribute('tabindex'));\n }\n removeClass([this.element], dropDownBaseClasses.root);\n this.element.style.display = 'none';\n var wrapperElement = this.createElement('div');\n this.element.parentElement.insertBefore(wrapperElement, this.element);\n wrapperElement.appendChild(this.element);\n wrapperElement.appendChild(this.list);\n }\n this.setEnableRtl();\n this.setEnabled();\n if (!isEmptyData) {\n this.initialize();\n }\n };\n ;\n /**\n * Return the module name of this component.\n * @private\n */\n DropDownBase.prototype.getModuleName = function () {\n return 'dropdownbase';\n };\n ;\n /**\n * Gets all the list items bound on this component.\n * @returns Element[].\n */\n DropDownBase.prototype.getItems = function () {\n return this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li);\n };\n ;\n /**\n * Adds a new item to the popup list. By default, new item appends to the list as the last item,\n * but you can insert based on the index parameter.\n * @param { Object[] } items - Specifies an array of JSON data or a JSON data.\n * @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.\n * @return {void}.\n\n */\n DropDownBase.prototype.addItem = function (items, itemIndex) {\n if (!this.list || (this.list.textContent === this.noRecordsTemplate && this.getModuleName() !== 'listbox')) {\n this.renderList();\n }\n if (this.sortOrder !== 'None' && isNullOrUndefined(itemIndex)) {\n var newList = [].slice.call(this.listData);\n newList.push(items);\n newList = this.getSortedDataSource(newList);\n if (this.fields.groupBy) {\n newList = ListBase.groupDataSource(newList, this.fields.properties, this.sortOrder);\n itemIndex = newList.indexOf(items);\n }\n else {\n itemIndex = newList.indexOf(items);\n }\n }\n this.DropDownBaseresetBlazorTemplates(true, false, false, false);\n var itemsCount = this.getItems().length;\n var selectedItemValue = this.list.querySelector('.' + dropDownBaseClasses.selected);\n items = (items instanceof Array ? items : [items]);\n var index;\n index = (isNullOrUndefined(itemIndex) || itemIndex < 0 || itemIndex > itemsCount - 1) ? itemsCount : itemIndex;\n var fields = this.fields;\n if (items && fields.groupBy) {\n items = ListBase.groupDataSource(items, fields.properties);\n }\n var liCollections = [];\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var isHeader = item.isHeader;\n var li = this.createElement('li', { className: isHeader ? dropDownBaseClasses.group : dropDownBaseClasses.li, id: 'option-add-' + i });\n var itemText = item instanceof Object ? getValue(fields.text, item) : item;\n if (isHeader) {\n li.innerText = itemText;\n }\n if (this.itemTemplate && !isHeader) {\n var compiledString = compile(this.itemTemplate);\n // tslint:disable-next-line\n var addItemTemplate = compiledString(item, this, 'itemTemplate', this.itemTemplateId, this.isStringTemplate, null, li);\n if (addItemTemplate) {\n append(addItemTemplate, li);\n }\n this.DropDownBaseupdateBlazorTemplates(true, false, false, false);\n }\n else if (!isHeader) {\n li.appendChild(document.createTextNode(itemText));\n }\n li.setAttribute('data-value', item instanceof Object ? getValue(fields.value, item) : item);\n li.setAttribute('role', 'option');\n this.notify('addItem', { module: 'CheckBoxSelection', item: li });\n liCollections.push(li);\n this.listData.push(item);\n if (this.sortOrder === 'None' && isNullOrUndefined(itemIndex) && index === 0) {\n index = null;\n }\n this.updateActionCompleteData(li, item, index);\n //Listbox event\n this.trigger('beforeItemRender', { element: li, item: item });\n }\n if (itemsCount === 0 && isNullOrUndefined(this.list.querySelector('ul'))) {\n this.list.innerHTML = '';\n this.list.classList.remove(dropDownBaseClasses.noData);\n this.list.appendChild(this.ulElement);\n this.liCollections = liCollections;\n append(liCollections, this.ulElement);\n this.updateAddItemList(this.list, itemsCount);\n }\n else {\n if (this.getModuleName() === 'listbox' && itemsCount === 0) {\n this.ulElement.innerHTML = '';\n }\n var attr = [];\n for (var i = 0; i < items.length; i++) {\n var listGroupItem = this.ulElement.querySelectorAll('.e-list-group-item');\n for (var j = 0; j < listGroupItem.length; j++) {\n attr[j] = listGroupItem[j].innerText;\n }\n if (attr.indexOf(liCollections[i].innerText) > -1 && fields.groupBy) {\n for (var j = 0; j < listGroupItem.length; j++) {\n if (attr[j] === liCollections[i].innerText) {\n if (this.sortOrder === 'None') {\n this.ulElement.insertBefore(liCollections[i + 1], listGroupItem[j + 1]);\n }\n else {\n this.ulElement.insertBefore(liCollections[i + 1], this.ulElement.childNodes[itemIndex]);\n }\n i = i + 1;\n break;\n }\n }\n }\n else {\n if (this.liCollections[index]) {\n this.liCollections[index].parentNode.insertBefore(liCollections[i], this.liCollections[index]);\n }\n else {\n this.ulElement.appendChild(liCollections[i]);\n }\n }\n var tempLi = [].slice.call(this.liCollections);\n tempLi.splice(index, 0, liCollections[i]);\n this.liCollections = tempLi;\n index += 1;\n if (this.getModuleName() === 'multiselect') {\n this.updateDataList();\n }\n }\n }\n if (selectedItemValue || itemIndex === 0) {\n this.updateSelection();\n }\n };\n DropDownBase.prototype.validationAttribute = function (target, hidden) {\n var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');\n hidden.setAttribute('name', name);\n target.removeAttribute('name');\n var attributes = ['required', 'aria-required', 'form'];\n for (var i = 0; i < attributes.length; i++) {\n if (!target.getAttribute(attributes[i])) {\n continue;\n }\n var attr = target.getAttribute(attributes[i]);\n hidden.setAttribute(attributes[i], attr);\n target.removeAttribute(attributes[i]);\n }\n };\n DropDownBase.prototype.setZIndex = function () {\n // this is for component wise\n };\n DropDownBase.prototype.updateActionCompleteData = function (li, item, index) {\n // this is for ComboBox custom value\n };\n DropDownBase.prototype.updateAddItemList = function (list, itemCount) {\n // this is for multiselect add item\n };\n DropDownBase.prototype.updateDataList = function () {\n // this is for multiselect update list items\n };\n /**\n * Gets the data Object that matches the given value.\n * @param { string | number } value - Specifies the value of the list item.\n * @returns Object.\n * @blazorType object\n */\n DropDownBase.prototype.getDataByValue = function (value) {\n if (!isNullOrUndefined(this.listData)) {\n var type = this.typeOfData(this.listData).typeof;\n if (type === 'string' || type === 'number' || type === 'boolean') {\n for (var _i = 0, _a = this.listData; _i < _a.length; _i++) {\n var item = _a[_i];\n if (!isNullOrUndefined(item) && item === value) {\n return item;\n }\n }\n }\n else {\n for (var _b = 0, _c = this.listData; _b < _c.length; _b++) {\n var item = _c[_b];\n if (!isNullOrUndefined(item) && getValue((this.fields.value ? this.fields.value : 'value'), item) === value) {\n return item;\n }\n }\n }\n }\n return null;\n };\n /**\n * Removes the component from the DOM and detaches all its related event handlers. It also removes the attributes and classes.\n * @method destroy\n * @return {void}.\n */\n DropDownBase.prototype.destroy = function () {\n if (document.body.contains(this.list)) {\n EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);\n if (!isNullOrUndefined(this.rippleFun)) {\n this.rippleFun();\n }\n detach(this.list);\n }\n _super.prototype.destroy.call(this);\n };\n ;\n __decorate([\n Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)\n ], DropDownBase.prototype, \"fields\", void 0);\n __decorate([\n Property(false)\n ], DropDownBase.prototype, \"enablePersistence\", void 0);\n __decorate([\n Property(null)\n ], DropDownBase.prototype, \"itemTemplate\", void 0);\n __decorate([\n Property(null)\n ], DropDownBase.prototype, \"groupTemplate\", void 0);\n __decorate([\n Property('No records found')\n ], DropDownBase.prototype, \"noRecordsTemplate\", void 0);\n __decorate([\n Property('Request failed')\n ], DropDownBase.prototype, \"actionFailureTemplate\", void 0);\n __decorate([\n Property('None')\n ], DropDownBase.prototype, \"sortOrder\", void 0);\n __decorate([\n Property(true)\n ], DropDownBase.prototype, \"enabled\", void 0);\n __decorate([\n Property([])\n ], DropDownBase.prototype, \"dataSource\", void 0);\n __decorate([\n Property(null)\n ], DropDownBase.prototype, \"query\", void 0);\n __decorate([\n Property('StartsWith')\n ], DropDownBase.prototype, \"filterType\", void 0);\n __decorate([\n Property(true)\n ], DropDownBase.prototype, \"ignoreCase\", void 0);\n __decorate([\n Property(1000)\n ], DropDownBase.prototype, \"zIndex\", void 0);\n __decorate([\n Property(false)\n ], DropDownBase.prototype, \"ignoreAccent\", void 0);\n __decorate([\n Property()\n ], DropDownBase.prototype, \"locale\", void 0);\n __decorate([\n Event()\n ], DropDownBase.prototype, \"actionBegin\", void 0);\n __decorate([\n Event()\n ], DropDownBase.prototype, \"actionComplete\", void 0);\n __decorate([\n Event()\n ], DropDownBase.prototype, \"actionFailure\", void 0);\n __decorate([\n Event()\n ], DropDownBase.prototype, \"select\", void 0);\n __decorate([\n Event()\n ], DropDownBase.prototype, \"dataBound\", void 0);\n __decorate([\n Event()\n ], DropDownBase.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], DropDownBase.prototype, \"destroyed\", void 0);\n DropDownBase = __decorate([\n NotifyPropertyChanges\n ], DropDownBase);\n return DropDownBase;\n}(Component));\nexport { DropDownBase };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n/// \nimport { EventHandler, Property, Event, compile, KeyboardEvents, append, select } from '@syncfusion/ej2-base';\nimport { attributes, isNullOrUndefined, getUniqueID, formatUnit, isUndefined, getValue } from '@syncfusion/ej2-base';\nimport { Animation, Browser, NotifyPropertyChanges } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, closest, prepend, detach, classList, isBlazor } from '@syncfusion/ej2-base';\nimport { Popup, isCollide, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { incrementalSearch } from '../common/incremental-search';\nimport { DropDownBase, dropDownBaseClasses } from '../drop-down-base/drop-down-base';\n/* tslint:disable */\nimport { DataManager, Query, Predicate } from '@syncfusion/ej2-data';\n// don't use space in classnames \nexport var dropDownListClasses = {\n root: 'e-dropdownlist',\n hover: dropDownBaseClasses.hover,\n selected: dropDownBaseClasses.selected,\n rtl: dropDownBaseClasses.rtl,\n li: dropDownBaseClasses.li,\n disable: dropDownBaseClasses.disabled,\n base: dropDownBaseClasses.root,\n focus: dropDownBaseClasses.focus,\n input: 'e-input-group',\n inputFocus: 'e-input-focus',\n icon: 'e-input-group-icon e-ddl-icon',\n iconAnimation: 'e-icon-anim',\n value: 'e-input-value',\n device: 'e-ddl-device',\n backIcon: 'e-input-group-icon e-back-icon e-icons',\n filterBarClearIcon: 'e-input-group-icon e-clear-icon e-icons',\n filterInput: 'e-input-filter',\n filterParent: 'e-filter-parent',\n mobileFilter: 'e-ddl-device-filter',\n footer: 'e-ddl-footer',\n header: 'e-ddl-header',\n clearIcon: 'e-clear-icon',\n clearIconHide: 'e-clear-icon-hide',\n popupFullScreen: 'e-popup-full-page',\n disableIcon: 'e-ddl-disable-icon',\n hiddenElement: 'e-ddl-hidden'\n};\nvar inputObject = {\n container: null,\n buttons: []\n};\n/**\n * The DropDownList component contains a list of predefined values from which you can\n * choose a single value.\n * ```html\n * \n * ```\n * ```typescript\n * let dropDownListObj:DropDownList = new DropDownList();\n * dropDownListObj.appendTo(\"#list\");\n * ```\n */\nvar DropDownList = /** @class */ (function (_super) {\n __extends(DropDownList, _super);\n /**\n * * Constructor for creating the DropDownList component.\n */\n function DropDownList(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.previousValue = null;\n _this.isListSearched = false;\n _this.preventChange = false;\n _this.isAngular = false;\n return _this;\n }\n ;\n /**\n * Initialize the event handler.\n * @private\n */\n DropDownList.prototype.preRender = function () {\n var checkBlazor = isBlazor() && this.isServerRendered;\n this.isServerBlazor = (checkBlazor) ? true : false;\n if (this.isServerBlazor) {\n this.initializeData();\n }\n else {\n this.element.style.opacity = '0';\n this.initializeData();\n _super.prototype.preRender.call(this);\n }\n this.activeIndex = this.index;\n this.queryString = '';\n };\n DropDownList.prototype.initializeData = function () {\n this.isPopupOpen = false;\n this.isDocumentClick = false;\n this.isInteracted = false;\n this.isFilterFocus = false;\n this.beforePopupOpen = false;\n this.initial = true;\n this.initRemoteRender = false;\n this.isNotSearchList = false;\n this.isTyped = false;\n this.isSelected = false;\n this.preventFocus = false;\n this.preventAutoFill = false;\n this.isValidKey = false;\n this.typedString = '';\n this.isEscapeKey = false;\n this.isPreventBlur = false;\n this.isTabKey = false;\n this.actionCompleteData = { isUpdated: false };\n this.prevSelectPoints = {};\n this.isSelectCustom = false;\n this.isDropDownClick = false;\n this.preventAltUp = false;\n this.isCustomFilter = false;\n this.isSecondClick = false;\n this.keyConfigure = {\n tab: 'tab',\n enter: '13',\n escape: '27',\n end: '35',\n home: '36',\n down: '40',\n up: '38',\n pageUp: '33',\n pageDown: '34',\n open: 'alt+40',\n close: 'shift+tab',\n hide: 'alt+38',\n space: '32'\n };\n };\n DropDownList.prototype.setZIndex = function () {\n if (this.popupObj) {\n this.popupObj.setProperties({ 'zIndex': this.zIndex });\n }\n };\n DropDownList.prototype.renderList = function (isEmptyData) {\n if (!this.isServerBlazor) {\n _super.prototype.render.call(this, isEmptyData);\n this.unWireListEvents();\n this.wireListEvents();\n }\n else {\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('OnServerRenderList', this.beforePopupOpen, false);\n }\n };\n DropDownList.prototype.floatLabelChange = function () {\n if (this.getModuleName() === 'dropdownlist' && this.floatLabelType === 'Auto') {\n var floatElement = this.inputWrapper.container.querySelector('.e-float-text');\n if (this.inputElement.value !== '' || this.isInteracted) {\n classList(floatElement, ['e-label-top'], ['e-label-bottom']);\n }\n else {\n classList(floatElement, ['e-label-bottom'], ['e-label-top']);\n }\n }\n };\n DropDownList.prototype.resetHandler = function (e) {\n e.preventDefault();\n this.clearAll(e);\n };\n DropDownList.prototype.resetFocusElement = function () {\n this.removeHover();\n this.removeSelection();\n this.removeFocus();\n this.list.scrollTop = 0;\n if (this.getModuleName() !== 'autocomplete' && !isNullOrUndefined(this.ulElement)) {\n var li = this.ulElement.querySelector('.' + dropDownListClasses.li);\n if (li) {\n li.classList.add(dropDownListClasses.focus);\n }\n }\n };\n DropDownList.prototype.clearAll = function (e, properties) {\n if (isNullOrUndefined(properties) || (!isNullOrUndefined(properties) &&\n (isNullOrUndefined(properties.dataSource) ||\n (!(properties.dataSource instanceof DataManager) && properties.dataSource.length === 0)))) {\n this.isActive = true;\n this.resetSelection(properties);\n }\n var dataItem = this.getItemData();\n if (this.previousValue === dataItem.value) {\n return;\n }\n this.onChangeEvent(e);\n };\n DropDownList.prototype.resetSelection = function (properties) {\n if (this.list) {\n if ((!isNullOrUndefined(properties) &&\n (isNullOrUndefined(properties.dataSource) ||\n (!(properties.dataSource instanceof DataManager) && properties.dataSource.length === 0)))) {\n this.selectedLI = null;\n this.actionCompleteData.isUpdated = false;\n this.actionCompleteData.ulElement = null;\n this.actionCompleteData.list = null;\n this.resetList(properties.dataSource);\n }\n else {\n if (this.allowFiltering && this.getModuleName() !== 'autocomplete'\n && !isNullOrUndefined(this.actionCompleteData.ulElement) && !isNullOrUndefined(this.actionCompleteData.list)) {\n this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(true), this.actionCompleteData.list);\n }\n this.resetFocusElement();\n }\n }\n if (!this.isServerBlazor) {\n this.hiddenElement.innerHTML = '';\n }\n this.inputElement.value = '';\n this.value = null;\n this.itemData = null;\n this.text = null;\n this.index = null;\n this.activeIndex = null;\n this.item = null;\n this.queryString = '';\n if (this.valueTempElement) {\n detach(this.valueTempElement);\n this.inputElement.style.display = 'block';\n this.valueTempElement = null;\n }\n this.setSelection(null, null);\n this.isSelectCustom = false;\n this.updateIconState();\n this.cloneElements();\n };\n DropDownList.prototype.setHTMLAttributes = function () {\n if (Object.keys(this.htmlAttributes).length) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var htmlAttr = _a[_i];\n if (htmlAttr === 'class') {\n var updatedClassValue = (this.htmlAttributes[htmlAttr].replace(/\\s+/g, ' ')).trim();\n if (updatedClassValue !== '') {\n addClass([this.inputWrapper.container], updatedClassValue.split(' '));\n }\n }\n else if (htmlAttr === 'disabled' && this.htmlAttributes[htmlAttr] === 'disabled') {\n this.enabled = false;\n this.setEnable();\n }\n else if (htmlAttr === 'readonly' && !isNullOrUndefined(this.htmlAttributes[htmlAttr])) {\n this.readonly = true;\n this.dataBind();\n }\n else if (htmlAttr === 'style') {\n this.inputWrapper.container.setAttribute('style', this.htmlAttributes[htmlAttr]);\n }\n else {\n var defaultAttr = ['title', 'id', 'placeholder', 'aria-placeholder',\n 'role', 'autocorrect', 'autocomplete', 'autocapitalize', 'spellcheck', 'minlength', 'maxlength'];\n var validateAttr = ['name', 'required'];\n if (this.getModuleName() === 'autocomplete' || this.getModuleName() === 'combobox') {\n defaultAttr.push('tabindex');\n }\n if (htmlAttr.indexOf('data') === 0 || validateAttr.indexOf(htmlAttr) > -1) {\n this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);\n }\n else if (defaultAttr.indexOf(htmlAttr) > -1) {\n htmlAttr === 'placeholder' ? Input.setPlaceholder(this.htmlAttributes[htmlAttr], this.inputElement) :\n this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);\n }\n else {\n this.inputWrapper.container.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);\n }\n }\n }\n }\n if (this.getModuleName() === 'autocomplete' || this.getModuleName() === 'combobox') {\n this.inputWrapper.container.removeAttribute('tabindex');\n }\n };\n DropDownList.prototype.getAriaAttributes = function () {\n return {\n 'aria-disabled': 'false',\n 'aria-owns': this.element.id + '_options',\n 'role': 'listbox',\n 'aria-haspopup': 'true',\n 'aria-expanded': 'false',\n 'aria-activedescendant': 'null',\n 'aria-live': 'polite',\n 'aria-labelledby': this.hiddenElement.id\n };\n };\n DropDownList.prototype.setEnableRtl = function () {\n Input.setEnableRtl(this.enableRtl, [this.inputElement.parentElement]);\n if (this.popupObj) {\n this.popupObj.enableRtl = this.enableRtl;\n this.popupObj.dataBind();\n }\n };\n DropDownList.prototype.setEnable = function () {\n Input.setEnabled(this.enabled, this.inputElement);\n if (this.enabled) {\n removeClass([this.inputWrapper.container], dropDownListClasses.disable);\n this.inputElement.setAttribute('aria-disabled', 'false');\n this.targetElement().setAttribute('tabindex', this.tabIndex);\n }\n else {\n this.hidePopup();\n addClass([this.inputWrapper.container], dropDownListClasses.disable);\n this.inputElement.setAttribute('aria-disabled', 'true');\n this.targetElement().tabIndex = -1;\n }\n };\n /**\n * Get the properties to be maintained in the persisted state.\n */\n DropDownList.prototype.getPersistData = function () {\n return this.addOnPersist(['value']);\n };\n ;\n DropDownList.prototype.getLocaleName = function () {\n return 'drop-down-list';\n };\n ;\n DropDownList.prototype.preventTabIndex = function (element) {\n if (this.getModuleName() === 'dropdownlist') {\n element.tabIndex = -1;\n }\n };\n DropDownList.prototype.targetElement = function () {\n return this.inputWrapper.container;\n };\n DropDownList.prototype.getNgDirective = function () {\n return 'EJS-DROPDOWNLIST';\n };\n DropDownList.prototype.getElementByText = function (text) {\n return this.getElementByValue(this.getValueByText(text));\n };\n DropDownList.prototype.getElementByValue = function (value) {\n var item;\n var listItems = this.getItems();\n for (var _i = 0, listItems_1 = listItems; _i < listItems_1.length; _i++) {\n var liItem = listItems_1[_i];\n if (this.getFormattedValue(liItem.getAttribute('data-value')) === value) {\n item = liItem;\n break;\n }\n }\n return item;\n };\n ;\n DropDownList.prototype.initValue = function () {\n this.renderList();\n if (this.dataSource instanceof DataManager) {\n this.initRemoteRender = true;\n }\n else {\n this.updateValues();\n }\n };\n DropDownList.prototype.updateValues = function () {\n if (!isNullOrUndefined(this.value)) {\n this.setSelection(this.getElementByValue(this.value), null);\n }\n else if (this.text && isNullOrUndefined(this.value)) {\n var element = this.getElementByText(this.text);\n if (isNullOrUndefined(element)) {\n this.setProperties({ text: null });\n return;\n }\n else {\n this.setSelection(element, null);\n }\n }\n else {\n this.setSelection(this.liCollections[this.activeIndex], null);\n }\n this.setHiddenValue();\n Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);\n };\n DropDownList.prototype.onBlur = function (e) {\n if (!this.enabled) {\n return;\n }\n var target = e.relatedTarget;\n var currentTarget = e.target;\n var isPreventBlur = this.isPreventBlur;\n this.isPreventBlur = false;\n //IE 11 - issue\n if (isPreventBlur && !this.isDocumentClick && this.isPopupOpen && (!isNullOrUndefined(currentTarget) ||\n !this.isFilterLayout() && isNullOrUndefined(target))) {\n if (this.getModuleName() === 'dropdownlist' && this.allowFiltering && this.isPopupOpen) {\n this.filterInput.focus();\n }\n else {\n this.targetElement().focus();\n }\n return;\n }\n if (this.isDocumentClick || (!isNullOrUndefined(this.popupObj)\n && document.body.contains(this.popupObj.element) &&\n this.popupObj.element.classList.contains(dropDownListClasses.mobileFilter))) {\n if (!this.beforePopupOpen) {\n this.isDocumentClick = false;\n }\n return;\n }\n if (((this.getModuleName() === 'dropdownlist' && !this.isFilterFocus && target !== this.inputElement)\n && (document.activeElement !== target || (document.activeElement === target &&\n currentTarget.classList.contains(dropDownListClasses.inputFocus)))) ||\n (isNullOrUndefined(target) && this.getModuleName() === 'dropdownlist' && this.allowFiltering &&\n currentTarget !== this.inputWrapper.container) || this.getModuleName() !== 'dropdownlist' &&\n !this.inputWrapper.container.contains(target) || this.isTabKey) {\n this.isDocumentClick = this.isPopupOpen ? true : false;\n this.focusOutAction(e);\n this.isTabKey = false;\n }\n if (this.isRequested && !this.isPopupOpen && !this.isPreventBlur) {\n this.isActive = false;\n this.beforePopupOpen = false;\n }\n };\n DropDownList.prototype.focusOutAction = function (e) {\n this.isInteracted = false;\n this.focusOut(e);\n this.onFocusOut();\n };\n DropDownList.prototype.onFocusOut = function () {\n if (!this.enabled) {\n return;\n }\n if (this.isSelected) {\n this.isSelectCustom = false;\n this.onChangeEvent(null);\n }\n this.floatLabelChange();\n this.dispatchEvent(this.hiddenElement, 'change');\n if (this.getModuleName() === 'dropdownlist' && this.element.tagName !== 'INPUT') {\n this.dispatchEvent(this.inputElement, 'blur');\n }\n if (this.inputWrapper.clearButton) {\n addClass([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);\n }\n this.trigger('blur');\n };\n DropDownList.prototype.onFocus = function (e) {\n if (!this.isInteracted) {\n this.isInteracted = true;\n var args = { isInteracted: e ? true : false, event: e };\n this.trigger('focus', args);\n }\n this.updateIconState();\n };\n DropDownList.prototype.resetValueHandler = function (e) {\n var formElement = closest(this.inputElement, 'form');\n if (formElement && e.target === formElement) {\n var val = (this.element.tagName === this.getNgDirective()) ? null : this.inputElement.getAttribute('value');\n this.text = val;\n }\n };\n DropDownList.prototype.wireEvent = function () {\n EventHandler.add(this.inputWrapper.container, 'mousedown', this.dropDownClick, this);\n EventHandler.add(this.inputWrapper.container, 'focus', this.focusIn, this);\n EventHandler.add(this.inputWrapper.container, 'keypress', this.onSearch, this);\n this.bindCommonEvent();\n };\n DropDownList.prototype.bindCommonEvent = function () {\n EventHandler.add(this.targetElement(), 'blur', this.onBlur, this);\n var formElement = closest(this.inputElement, 'form');\n if (formElement) {\n EventHandler.add(formElement, 'reset', this.resetValueHandler, this);\n }\n if (!Browser.isDevice) {\n this.keyboardModule = new KeyboardEvents(this.targetElement(), {\n keyAction: this.keyActionHandler.bind(this), keyConfigs: this.keyConfigure, eventName: 'keydown'\n });\n }\n else {\n this.keyboardModule = new KeyboardEvents(this.targetElement(), {\n keyAction: this.mobileKeyActionHandler.bind(this), keyConfigs: this.keyConfigure, eventName: 'keydown'\n });\n }\n this.bindClearEvent();\n };\n DropDownList.prototype.bindClearEvent = function () {\n if (this.showClearButton) {\n EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);\n }\n };\n DropDownList.prototype.unBindCommonEvent = function () {\n if (this.targetElement()) {\n EventHandler.remove(this.targetElement(), 'blur', this.onBlur);\n }\n var formElement = this.inputElement && closest(this.inputElement, 'form');\n if (formElement) {\n EventHandler.remove(formElement, 'reset', this.resetValueHandler);\n }\n if (!Browser.isDevice) {\n this.keyboardModule.destroy();\n }\n if (this.showClearButton) {\n EventHandler.remove(this.inputWrapper.clearButton, 'mousedown', this.resetHandler);\n }\n };\n DropDownList.prototype.updateIconState = function () {\n if (this.showClearButton) {\n if (this.inputElement.value !== '' && !this.readonly) {\n removeClass([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);\n }\n else {\n addClass([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);\n }\n }\n };\n /**\n * Event binding for list\n */\n DropDownList.prototype.wireListEvents = function () {\n EventHandler.add(this.list, 'click', this.onMouseClick, this);\n EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);\n EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);\n };\n ;\n DropDownList.prototype.onSearch = function (e) {\n if (e.charCode !== 32 && e.charCode !== 13) {\n if (this.list === undefined) {\n if (!this.isServerBlazor) {\n this.renderList();\n }\n else {\n this.isServerIncrementalSearch = true;\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('OnServerRenderList', true, false);\n }\n }\n this.searchKeyEvent = e;\n this.onServerIncrementalSearch(e);\n }\n };\n DropDownList.prototype.onServerIncrementalSearch = function (e) {\n if (!this.isRequested && !isNullOrUndefined(this.list) &&\n !isNullOrUndefined(this.list.querySelector('li')) && this.enabled && !this.readonly) {\n this.incrementalSearch(e);\n }\n };\n DropDownList.prototype.onMouseClick = function (e) {\n var target = e.target;\n var classList = target.classList;\n var li = closest(target, '.' + dropDownBaseClasses.li);\n if (!this.isValidLI(li)) {\n return;\n }\n this.setSelection(li, e);\n if (Browser.isDevice && this.isFilterLayout()) {\n history.back();\n }\n else {\n var delay = 100;\n this.closePopup(delay);\n }\n };\n DropDownList.prototype.onMouseOver = function (e) {\n var currentLi = closest(e.target, '.' + dropDownBaseClasses.li);\n this.setHover(currentLi);\n };\n ;\n DropDownList.prototype.setHover = function (li) {\n if (this.enabled && this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover)) {\n this.removeHover();\n addClass([li], dropDownBaseClasses.hover);\n }\n };\n ;\n DropDownList.prototype.onMouseLeave = function (e) {\n this.removeHover();\n };\n ;\n DropDownList.prototype.removeHover = function () {\n if (this.list) {\n var hoveredItem = (this.isServerBlazor && this.popupObj && this.popupObj.element) ?\n this.popupObj.element.querySelectorAll('.' + dropDownBaseClasses.hover) :\n this.list.querySelectorAll('.' + dropDownBaseClasses.hover);\n if (hoveredItem && hoveredItem.length) {\n removeClass(hoveredItem, dropDownBaseClasses.hover);\n }\n }\n };\n ;\n DropDownList.prototype.isValidLI = function (li) {\n return (li && li.hasAttribute('role') && li.getAttribute('role') === 'option');\n };\n ;\n DropDownList.prototype.incrementalSearch = function (e) {\n if (this.liCollections.length > 0) {\n var li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id, this.isServerBlazor);\n if (!isNullOrUndefined(li)) {\n this.setSelection(li, e);\n this.setScrollPosition();\n }\n }\n };\n ;\n /**\n * Hides the spinner loader.\n * @returns void.\n */\n DropDownList.prototype.hideSpinner = function () {\n if (!isNullOrUndefined(this.spinnerElement)) {\n hideSpinner(this.spinnerElement);\n removeClass([this.spinnerElement], dropDownListClasses.disableIcon);\n this.spinnerElement.innerHTML = '';\n this.spinnerElement = null;\n }\n };\n /**\n * Shows the spinner loader.\n * @returns void.\n */\n DropDownList.prototype.showSpinner = function () {\n if (isNullOrUndefined(this.spinnerElement)) {\n this.spinnerElement = Browser.isDevice && !isNullOrUndefined(this.filterInputObj) && this.filterInputObj.buttons[1] ||\n !isNullOrUndefined(this.filterInputObj) && this.filterInputObj.buttons[0] || this.inputWrapper.buttons[0];\n addClass([this.spinnerElement], dropDownListClasses.disableIcon);\n createSpinner({\n target: this.spinnerElement,\n width: Browser.isDevice ? '16px' : '14px'\n }, this.createElement);\n showSpinner(this.spinnerElement);\n }\n };\n DropDownList.prototype.keyActionHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n var preventAction = e.action === 'pageUp' || e.action === 'pageDown';\n var preventHomeEnd = this.getModuleName() !== 'dropdownlist' && (e.action === 'home' || e.action === 'end');\n this.isEscapeKey = e.action === 'escape';\n this.isTabKey = !this.isPopupOpen && e.action === 'tab';\n var isNavAction = e.action === 'down' || e.action === 'up' || e.action === 'home' || e.action === 'end';\n var isNavigation = (e.action === 'down' || e.action === 'up' || e.action === 'pageUp' || e.action === 'pageDown'\n || e.action === 'home' || e.action === 'end');\n if ((this.isEditTextBox() || preventAction || preventHomeEnd) && !this.isPopupOpen) {\n return;\n }\n if (!this.readonly) {\n var isTabAction = e.action === 'tab' || e.action === 'close';\n if (this.list === undefined && !this.isRequested && !isTabAction && e.action !== 'escape') {\n this.searchKeyEvent = e;\n this.renderList();\n }\n if (!(this.isServerBlazor && (e.action === 'open' || e.action === 'space')) && isNullOrUndefined(this.list) ||\n (!isNullOrUndefined(this.liCollections) && isNavigation && this.liCollections.length === 0) || this.isRequested) {\n if (!(this.isServerBlazor && isNavAction)) {\n return;\n }\n }\n if ((isTabAction && this.getModuleName() !== 'autocomplete') && this.isPopupOpen\n || e.action === 'escape') {\n e.preventDefault();\n }\n this.isSelected = e.action === 'escape' ? false : this.isSelected;\n this.isTyped = (isNavigation || e.action === 'escape') ? false : this.isTyped;\n switch (e.action) {\n case 'down':\n case 'up':\n this.updateUpDownAction(e);\n break;\n case 'pageUp':\n this.pageUpSelection(this.activeIndex - this.getPageCount(), e);\n e.preventDefault();\n break;\n case 'pageDown':\n this.pageDownSelection(this.activeIndex + this.getPageCount(), e);\n e.preventDefault();\n break;\n case 'home':\n this.updateHomeEndAction(e);\n break;\n case 'end':\n this.updateHomeEndAction(e);\n break;\n case 'space':\n if (this.getModuleName() === 'dropdownlist') {\n if (!this.beforePopupOpen) {\n this.showPopup();\n }\n }\n break;\n case 'open':\n this.showPopup();\n break;\n case 'hide':\n this.preventAltUp = this.isPopupOpen;\n this.hidePopup(e);\n this.focusDropDown(e);\n break;\n case 'enter':\n this.selectCurrentItem(e);\n break;\n case 'tab':\n this.selectCurrentValueOnTab(e);\n break;\n case 'escape':\n case 'close':\n if (this.isPopupOpen) {\n this.hidePopup(e);\n this.focusDropDown(e);\n }\n break;\n }\n }\n };\n DropDownList.prototype.updateUpDownAction = function (e) {\n if (this.isServerBlazor && isNullOrUndefined(this.list)) {\n this.isServerNavigation = true;\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('OnServerRenderList', true, false);\n }\n else {\n this.isServerNavigation = false;\n var focusEle = this.list.querySelector('.' + dropDownListClasses.focus);\n if (this.isSelectFocusItem(focusEle)) {\n this.setSelection(focusEle, e);\n }\n else {\n var nextItem = void 0;\n var index = e.action === 'down' ? this.activeIndex + 1 : this.activeIndex - 1;\n var startIndex = 0;\n if (this.getModuleName() === 'autocomplete') {\n startIndex = e.action === 'down' && isNullOrUndefined(this.activeIndex) ? 0 : this.liCollections.length - 1;\n index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index;\n }\n nextItem = isNullOrUndefined(this.activeIndex) ? this.liCollections[startIndex] : this.liCollections[index];\n if (!isNullOrUndefined(nextItem)) {\n this.setSelection(nextItem, e);\n }\n }\n e.preventDefault();\n }\n };\n DropDownList.prototype.updateHomeEndAction = function (e) {\n if (this.getModuleName() === 'dropdownlist') {\n if (this.isServerBlazor && isNullOrUndefined(this.list)) {\n this.isServerNavigation = true;\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('OnServerRenderList', true, false);\n }\n else {\n this.isServerNavigation = false;\n var findLi = 0;\n if (e.action === 'home') {\n findLi = 0;\n }\n else {\n findLi = this.getItems().length - 1;\n }\n e.preventDefault();\n if (this.activeIndex === findLi) {\n return;\n }\n this.setSelection(this.liCollections[findLi], e);\n }\n }\n };\n DropDownList.prototype.selectCurrentValueOnTab = function (e) {\n if (this.getModuleName() === 'autocomplete') {\n this.selectCurrentItem(e);\n }\n else {\n if (this.isPopupOpen) {\n this.hidePopup(e);\n this.focusDropDown(e);\n }\n }\n };\n DropDownList.prototype.mobileKeyActionHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n if ((this.isEditTextBox()) && !this.isPopupOpen) {\n return;\n }\n if (!this.readonly) {\n if (this.list === undefined && !this.isRequested) {\n this.searchKeyEvent = e;\n this.renderList();\n }\n if (isNullOrUndefined(this.list) || (!isNullOrUndefined(this.liCollections) &&\n this.liCollections.length === 0) || this.isRequested) {\n return;\n }\n if (e.action === 'enter') {\n this.selectCurrentItem(e);\n }\n }\n };\n DropDownList.prototype.selectCurrentItem = function (e) {\n if (this.isPopupOpen) {\n var li = this.list.querySelector('.' + dropDownListClasses.focus);\n if (li) {\n this.setSelection(li, e);\n this.isTyped = false;\n }\n if (this.isSelected) {\n this.isSelectCustom = false;\n this.onChangeEvent(e);\n }\n this.hidePopup();\n this.focusDropDown(e);\n }\n else {\n this.showPopup();\n }\n };\n DropDownList.prototype.isSelectFocusItem = function (element) {\n return !isNullOrUndefined(element);\n };\n DropDownList.prototype.getPageCount = function () {\n var liHeight = this.list.classList.contains(dropDownBaseClasses.noData) ? null :\n getComputedStyle(this.getItems()[0], null).getPropertyValue('height');\n return Math.round(this.list.getBoundingClientRect().height / parseInt(liHeight, 10));\n };\n DropDownList.prototype.pageUpSelection = function (steps, event) {\n var previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];\n this.setSelection(previousItem, event);\n };\n ;\n DropDownList.prototype.pageDownSelection = function (steps, event) {\n var list = this.getItems();\n var previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];\n this.setSelection(previousItem, event);\n };\n ;\n DropDownList.prototype.unWireEvent = function () {\n EventHandler.remove(this.inputWrapper.container, 'mousedown', this.dropDownClick);\n EventHandler.remove(this.inputWrapper.container, 'keypress', this.onSearch);\n EventHandler.remove(this.inputWrapper.container, 'focus', this.focusIn);\n this.unBindCommonEvent();\n };\n /**\n * Event un binding for list items.\n */\n DropDownList.prototype.unWireListEvents = function () {\n EventHandler.remove(this.list, 'click', this.onMouseClick);\n EventHandler.remove(this.list, 'mouseover', this.onMouseOver);\n EventHandler.remove(this.list, 'mouseout', this.onMouseLeave);\n };\n ;\n DropDownList.prototype.checkSelector = function (id) {\n return '[id=\"' + id.replace(/(:|\\.|\\[|\\]|,|=|@|\\\\|\\/|#)/g, '\\\\$1') + '\"]';\n };\n DropDownList.prototype.onDocumentClick = function (e) {\n var target = e.target;\n if (!(!isNullOrUndefined(this.popupObj) && closest(target, this.checkSelector(this.popupObj.element.id))) &&\n !this.inputWrapper.container.contains(e.target)) {\n if (this.inputWrapper.container.classList.contains(dropDownListClasses.inputFocus) || this.isPopupOpen) {\n this.isDocumentClick = true;\n var isActive = this.isRequested;\n this.isInteracted = false;\n this.hidePopup(e);\n if (!isActive) {\n this.onFocusOut();\n this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);\n }\n }\n }\n else if (target !== this.inputElement && !(this.allowFiltering && target === this.filterInput)\n && !(this.getModuleName() === 'combobox' &&\n !this.allowFiltering && Browser.isDevice && target === this.inputWrapper.buttons[0])) {\n this.isPreventBlur = (Browser.isIE || Browser.info.name === 'edge') && (document.activeElement === this.targetElement() ||\n document.activeElement === this.filterInput);\n e.preventDefault();\n }\n };\n DropDownList.prototype.activeStateChange = function () {\n if (this.isDocumentClick) {\n this.hidePopup();\n this.onFocusOut();\n this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);\n }\n };\n DropDownList.prototype.focusDropDown = function (e) {\n if (!this.initial && this.isFilterLayout()) {\n this.focusIn(e);\n }\n };\n DropDownList.prototype.dropDownClick = function (e) {\n if (e.which === 3 || e.button === 2) {\n return;\n }\n if (this.targetElement().classList.contains(dropDownListClasses.disable) || this.inputWrapper.clearButton === e.target) {\n return;\n }\n var target = e.target;\n if (target !== this.inputElement && !(this.allowFiltering && target === this.filterInput) && this.getModuleName() !== 'combobox') {\n e.preventDefault();\n }\n if (!this.readonly) {\n if (this.isPopupOpen) {\n this.hidePopup();\n if (this.isFilterLayout()) {\n this.focusDropDown(e);\n }\n }\n else {\n this.focusIn(e);\n this.floatLabelChange();\n this.queryString = this.inputElement.value.trim() === '' ? null : this.inputElement.value;\n this.isDropDownClick = true;\n this.showPopup();\n }\n var proxy_1 = this;\n var duration = (isBlazor()) ? 1000 : (this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;\n if (!this.isSecondClick) {\n setTimeout(function () { proxy_1.cloneElements(); proxy_1.isSecondClick = true; }, duration);\n }\n }\n else {\n this.focusIn(e);\n }\n };\n DropDownList.prototype.cloneElements = function () {\n if (this.list) {\n var ulElement = this.list.querySelector('ul');\n if (ulElement) {\n ulElement = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;\n this.actionCompleteData.ulElement = ulElement;\n }\n }\n };\n DropDownList.prototype.updateSelectedItem = function (li, e, preventSelect, isSelection) {\n var _this = this;\n this.removeSelection();\n li.classList.add(dropDownBaseClasses.selected);\n this.removeHover();\n var value = this.getFormattedValue(li.getAttribute('data-value'));\n var selectedData = this.getDataByValue(value);\n if (!this.initial && !preventSelect && !isNullOrUndefined(e)) {\n var items = this.detachChanges(selectedData);\n this.isSelected = true;\n var eventArgs = {\n e: e,\n item: li,\n itemData: items,\n isInteracted: e ? true : false,\n cancel: false\n };\n this.trigger('select', eventArgs, function (eventArgs) {\n if (eventArgs.cancel) {\n li.classList.remove(dropDownBaseClasses.selected);\n }\n else {\n _this.selectEventCallback(li, e, preventSelect, selectedData, value);\n if (_this.isServerBlazor) {\n // tslint:disable-next-line\n _this.interopAdaptor.invokeMethodAsync('OnServerItemData', _this.itemData);\n }\n if (isSelection) {\n _this.setSelectOptions(li, e);\n }\n }\n });\n }\n else {\n this.selectEventCallback(li, e, preventSelect, selectedData, value);\n if (this.isServerBlazor) {\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('OnServerItemData', this.itemData);\n }\n if (isSelection) {\n this.setSelectOptions(li, e);\n }\n }\n };\n DropDownList.prototype.selectEventCallback = function (li, e, preventSelect, selectedData, value) {\n this.previousItemData = (!isNullOrUndefined(this.itemData)) ? this.itemData : null;\n this.item = li;\n this.itemData = selectedData;\n var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);\n if (focusedItem) {\n removeClass([focusedItem], dropDownBaseClasses.focus);\n }\n li.setAttribute('aria-selected', 'true');\n this.activeIndex = this.getIndexByValue(value);\n };\n DropDownList.prototype.activeItem = function (li) {\n if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.selected)) {\n this.removeSelection();\n li.classList.add(dropDownBaseClasses.selected);\n this.removeHover();\n li.setAttribute('aria-selected', 'true');\n }\n };\n DropDownList.prototype.setValue = function (e) {\n var dataItem = this.getItemData();\n if (dataItem.value === null) {\n if (isBlazor() && dataItem.text !== null || dataItem.text !== '') {\n Input.setValue(dataItem.text, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n else {\n Input.setValue(null, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n }\n else {\n Input.setValue(dataItem.text, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n if (this.isServerBlazor) {\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('OnServerValueTemplate', dataItem);\n }\n if (this.valueTemplate && this.itemData !== null && !this.isServerBlazor) {\n this.DropDownBaseresetBlazorTemplates(false, false, false, false, true);\n this.setValueTemplate();\n }\n else if (this.inputElement.previousSibling === this.valueTempElement) {\n detach(this.valueTempElement);\n this.inputElement.style.display = 'block';\n }\n if (this.previousValue === dataItem.value) {\n this.isSelected = false;\n return true;\n }\n else {\n this.isSelected = !this.initial ? true : false;\n this.isSelectCustom = false;\n if (this.getModuleName() === 'dropdownlist') {\n this.updateIconState();\n }\n return false;\n }\n };\n DropDownList.prototype.setSelection = function (li, e) {\n if (this.isValidLI(li) && (!li.classList.contains(dropDownBaseClasses.selected) || (this.isPopupOpen && this.isSelected\n && li.classList.contains(dropDownBaseClasses.selected)))) {\n this.updateSelectedItem(li, e, false, true);\n }\n else {\n this.setSelectOptions(li, e);\n }\n };\n DropDownList.prototype.setSelectOptions = function (li, e) {\n if (this.list) {\n this.removeHover();\n }\n this.previousSelectedLI = (!isNullOrUndefined(this.selectedLI)) ? this.selectedLI : null;\n this.selectedLI = li;\n if (this.setValue(e)) {\n return;\n }\n if (this.isPopupOpen) {\n attributes(this.targetElement(), { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });\n if (this.isFilterLayout() && this.filterInput) {\n attributes(this.filterInput, { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });\n }\n }\n if ((!this.isPopupOpen && !isNullOrUndefined(li)) || (this.isPopupOpen && !isNullOrUndefined(e) &&\n (e.type !== 'keydown' || e.type === 'keydown' && e.action === 'enter'))) {\n this.isSelectCustom = false;\n this.onChangeEvent(e);\n }\n if (this.isPopupOpen && !isNullOrUndefined(this.selectedLI) && this.itemData !== null && (!e || e.type !== 'click')) {\n this.setScrollPosition(e);\n }\n if (Browser.info.name !== 'mozilla') {\n attributes(this.inputElement, { 'aria-label': this.inputElement.value });\n attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id });\n this.targetElement().removeAttribute('aria-live');\n }\n };\n DropDownList.prototype.dropdownCompiler = function (dropdownTemplate) {\n var checkTemplate = false;\n if (dropdownTemplate) {\n var exception = void 0;\n try {\n checkTemplate = (document.querySelectorAll(dropdownTemplate).length) ? true : false;\n }\n catch (exception) {\n checkTemplate = false;\n }\n }\n return checkTemplate;\n };\n DropDownList.prototype.setValueTemplate = function () {\n var compiledString;\n // tslint:disable-next-line\n if (this.isReact) {\n this.clearTemplate(['valueTemplate']);\n }\n if (!this.valueTempElement) {\n this.valueTempElement = this.createElement('span', { className: dropDownListClasses.value });\n this.inputElement.parentElement.insertBefore(this.valueTempElement, this.inputElement);\n this.inputElement.style.display = 'none';\n }\n this.valueTempElement.innerHTML = '';\n var templateData = (isBlazor()) ? JSON.parse(JSON.stringify(this.itemData)) : this.itemData;\n var valuecheck = this.dropdownCompiler(this.valueTemplate);\n if (valuecheck) {\n compiledString = compile(document.querySelector(this.valueTemplate).innerHTML.trim());\n }\n else {\n compiledString = compile(this.valueTemplate);\n }\n // tslint:disable-next-line\n var valueCompTemp = compiledString(templateData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate, null, this.valueTempElement);\n if (valueCompTemp && valueCompTemp.length > 0) {\n for (var i = 0; i < valueCompTemp.length; i++) {\n this.valueTempElement.appendChild(valueCompTemp[i]);\n }\n }\n this.renderReactTemplates();\n this.DropDownBaseupdateBlazorTemplates(false, false, false, false, true, true, true);\n };\n DropDownList.prototype.removeSelection = function () {\n if (this.list) {\n var selectedItems = this.list.querySelectorAll('.' + dropDownBaseClasses.selected);\n if (selectedItems.length) {\n removeClass(selectedItems, dropDownBaseClasses.selected);\n selectedItems[0].removeAttribute('aria-selected');\n }\n }\n };\n ;\n DropDownList.prototype.getItemData = function () {\n var fields = this.fields;\n var dataItem = null;\n dataItem = this.itemData;\n var dataValue;\n var dataText;\n if (!isNullOrUndefined(dataItem)) {\n dataValue = getValue(fields.value, dataItem);\n dataText = getValue(fields.text, dataItem);\n }\n var value = (!isNullOrUndefined(dataItem) &&\n !isUndefined(dataValue) ? dataValue : dataItem);\n var text = (!isNullOrUndefined(dataItem) &&\n !isUndefined(dataValue) ? dataText : dataItem);\n return { value: value, text: text };\n };\n /**\n * To trigger the change event for list.\n */\n DropDownList.prototype.onChangeEvent = function (eve) {\n var dataItem = this.getItemData();\n var index = this.isSelectCustom ? null : this.activeIndex;\n this.setProperties({ 'index': index, 'text': dataItem.text, 'value': dataItem.value }, true);\n this.detachChangeEvent(eve);\n };\n ;\n DropDownList.prototype.detachChanges = function (value) {\n var items;\n if (typeof value === 'string' ||\n typeof value === 'boolean' ||\n typeof value === 'number') {\n items = Object.defineProperties({}, {\n value: {\n value: value,\n enumerable: true\n },\n text: {\n value: value,\n enumerable: true\n }\n });\n }\n else {\n items = value;\n }\n return items;\n };\n DropDownList.prototype.detachChangeEvent = function (eve) {\n this.isSelected = false;\n this.previousValue = this.value;\n this.activeIndex = this.index;\n this.typedString = !isNullOrUndefined(this.text) ? this.text : '';\n if (!this.initial) {\n var items = this.detachChanges(this.itemData);\n var preItems = void 0;\n if (typeof this.previousItemData === 'string' ||\n typeof this.previousItemData === 'boolean' ||\n typeof this.previousItemData === 'number') {\n preItems = Object.defineProperties({}, {\n value: {\n value: this.previousItemData,\n enumerable: true\n },\n text: {\n value: this.previousItemData,\n enumerable: true\n }\n });\n }\n else {\n preItems = this.previousItemData;\n }\n this.setHiddenValue();\n var eventArgs = {\n e: eve,\n item: this.item,\n itemData: items,\n previousItem: this.previousSelectedLI,\n previousItemData: preItems,\n isInteracted: eve ? true : false,\n value: this.value,\n element: this.element\n };\n if (this.isAngular && this.preventChange) {\n this.preventChange = false;\n }\n else {\n this.trigger('change', eventArgs);\n }\n if (this.isServerBlazor && this.enablePersistence) {\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('ServerChange');\n }\n }\n if ((isNullOrUndefined(this.value) || this.value === '') && this.floatLabelType !== 'Always') {\n removeClass([this.inputWrapper.container], 'e-valid-input');\n }\n };\n DropDownList.prototype.setHiddenValue = function () {\n if (!isNullOrUndefined(this.value)) {\n if (this.isServerBlazor && this.hiddenElement.querySelector('option')) {\n var selectedElement = this.hiddenElement.querySelector('option');\n selectedElement.textContent = this.text;\n selectedElement.setAttribute('value', this.value.toString());\n }\n else if (!this.isServerBlazor) {\n this.hiddenElement.innerHTML = '';\n var selectedElement = this.hiddenElement.querySelector('option');\n selectedElement.setAttribute('value', this.value.toString());\n }\n }\n else if (!this.isServerBlazor) {\n this.hiddenElement.innerHTML = '';\n }\n };\n /**\n * Filter bar implementation\n */\n DropDownList.prototype.onFilterUp = function (e) {\n if (!(e.ctrlKey && e.keyCode === 86) && (this.isValidKey || e.keyCode === 40 || e.keyCode === 38)) {\n this.isValidKey = false;\n switch (e.keyCode) {\n case 38: //up arrow \n case 40: //down arrow \n if (this.getModuleName() === 'autocomplete' && !this.isPopupOpen && !this.preventAltUp && !this.isRequested) {\n this.preventAutoFill = true;\n this.searchLists(e);\n }\n else {\n this.preventAutoFill = false;\n }\n this.preventAltUp = false;\n e.preventDefault();\n break;\n case 46: //delete\n case 8: //backspace\n this.typedString = this.filterInput.value;\n if (!this.isPopupOpen && this.typedString !== '' || this.isPopupOpen && this.queryString.length > 0) {\n this.preventAutoFill = true;\n this.searchLists(e);\n }\n else if (this.typedString === '' && this.queryString === '' && this.getModuleName() !== 'autocomplete') {\n this.preventAutoFill = true;\n this.searchLists(e);\n }\n else if (this.typedString === '') {\n if (this.list) {\n this.resetFocusElement();\n }\n this.activeIndex = null;\n if (this.getModuleName() === 'autocomplete') {\n this.hidePopup();\n }\n }\n e.preventDefault();\n break;\n default:\n this.typedString = this.filterInput.value;\n this.preventAutoFill = false;\n this.searchLists(e);\n break;\n }\n }\n else {\n this.isValidKey = false;\n }\n };\n DropDownList.prototype.onFilterDown = function (e) {\n switch (e.keyCode) {\n case 13: //enter\n break;\n case 40: //down arrow\n case 38: //up arrow \n this.queryString = this.filterInput.value;\n e.preventDefault();\n break;\n case 9: //tab \n if (this.isPopupOpen && this.getModuleName() !== 'autocomplete') {\n e.preventDefault();\n }\n break;\n default:\n this.prevSelectPoints = this.getSelectionPoints();\n this.queryString = this.filterInput.value;\n break;\n }\n };\n DropDownList.prototype.removeFillSelection = function () {\n if (this.isInteracted) {\n var selection = this.getSelectionPoints();\n this.inputElement.setSelectionRange(selection.end, selection.end);\n }\n };\n DropDownList.prototype.getQuery = function (query) {\n var filterQuery;\n if (!this.isCustomFilter && this.allowFiltering && this.filterInput) {\n filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();\n var filterType = this.typedString === '' ? 'contains' : this.filterType;\n var dataType = this.typeOfData(this.dataSource).typeof;\n if (!(this.dataSource instanceof DataManager) && dataType === 'string' || dataType === 'number') {\n filterQuery.where('', filterType, this.typedString, this.ignoreCase, this.ignoreAccent);\n }\n else {\n var fields = (this.fields.text) ? this.fields.text : '';\n filterQuery.where(fields, filterType, this.typedString, this.ignoreCase, this.ignoreAccent);\n }\n }\n else {\n filterQuery = query ? query : this.query ? this.query : new Query();\n }\n return filterQuery;\n };\n DropDownList.prototype.getSelectionPoints = function () {\n var input = this.inputElement;\n return { start: Math.abs(input.selectionStart), end: Math.abs(input.selectionEnd) };\n };\n DropDownList.prototype.searchLists = function (e) {\n var _this = this;\n this.isTyped = true;\n this.activeIndex = null;\n this.isListSearched = true;\n if (this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon)) {\n var clearElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);\n clearElement.style.visibility = this.filterInput.value === '' ? 'hidden' : 'visible';\n }\n this.isDataFetched = false;\n if (this.isFiltering()) {\n if (this.isServerBlazor) {\n this.beforePopupOpen = (this.getModuleName() === 'combobox' && this.isFiltering() && !this.beforePopupOpen)\n ? !this.beforePopupOpen : this.beforePopupOpen;\n if (this.filterInput.value === '' && this.getModuleName() !== 'dropdownlist') {\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('OnServerRenderList', this.beforePopupOpen, false);\n }\n else {\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('OnServerFilter', this.filterInput.value);\n }\n }\n else {\n var eventArgs_1 = {\n preventDefaultAction: false,\n text: this.filterInput.value,\n updateData: function (dataSource, query, fields) {\n if (eventArgs_1.cancel) {\n return;\n }\n _this.isCustomFilter = true;\n _this.filteringAction(dataSource, query, fields);\n },\n baseEventArgs: e,\n cancel: false\n };\n this.trigger('filtering', eventArgs_1, function (eventArgs) {\n if (!eventArgs.cancel && !_this.isCustomFilter && !eventArgs.preventDefaultAction) {\n _this.filteringAction(_this.dataSource, null, _this.fields);\n }\n });\n }\n }\n };\n /**\n * To filter the data from given data source by using query\n * @param {Object[] | DataManager } dataSource - Set the data source to filter.\n * @param {Query} query - Specify the query to filter the data.\n * @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.\n * @return {void}.\n\n */\n DropDownList.prototype.filter = function (dataSource, query, fields) {\n this.isCustomFilter = true;\n this.filteringAction(dataSource, query, fields);\n };\n DropDownList.prototype.filteringAction = function (dataSource, query, fields) {\n if (!isNullOrUndefined(this.filterInput)) {\n this.beforePopupOpen = true;\n if (this.filterInput.value.trim() === '' && !this.itemTemplate) {\n this.actionCompleteData.isUpdated = false;\n this.isTyped = false;\n if (!isNullOrUndefined(this.actionCompleteData.ulElement) && !isNullOrUndefined(this.actionCompleteData.list)) {\n this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list);\n }\n this.isTyped = true;\n if (!isNullOrUndefined(this.itemData) && this.getModuleName() === 'dropdownlist') {\n this.focusIndexItem();\n this.setScrollPosition();\n }\n this.isNotSearchList = true;\n }\n else {\n this.isNotSearchList = false;\n query = (this.filterInput.value.trim() === '') ? null : query;\n this.resetList(dataSource, fields, query);\n }\n this.renderReactTemplates();\n }\n };\n DropDownList.prototype.setSearchBox = function (popupElement) {\n if (this.isFiltering()) {\n var parentElement = popupElement.querySelector('.' + dropDownListClasses.filterParent) ?\n popupElement.querySelector('.' + dropDownListClasses.filterParent) : this.createElement('span', {\n className: dropDownListClasses.filterParent\n });\n if (this.isServerBlazor) {\n parentElement.innerHTML = '';\n }\n this.filterInput = this.createElement('input', {\n attrs: { type: 'text' },\n className: dropDownListClasses.filterInput\n });\n this.element.parentNode.insertBefore(this.filterInput, this.element);\n var backIcon = false;\n if (Browser.isDevice) {\n backIcon = true;\n }\n this.filterInputObj = Input.createInput({\n element: this.filterInput,\n buttons: backIcon ?\n [dropDownListClasses.backIcon, dropDownListClasses.filterBarClearIcon] : [dropDownListClasses.filterBarClearIcon],\n properties: { placeholder: this.filterBarPlaceholder }\n }, this.createElement);\n if (!isNullOrUndefined(this.cssClass)) {\n if (this.cssClass.split(' ').indexOf('e-outline') !== -1) {\n addClass([this.filterInputObj.container], 'e-outline');\n }\n else if (this.cssClass.split(' ').indexOf('e-filled') !== -1) {\n addClass([this.filterInputObj.container], 'e-filled');\n }\n }\n append([this.filterInputObj.container], parentElement);\n prepend([parentElement], popupElement);\n attributes(this.filterInput, {\n 'aria-disabled': 'false',\n 'aria-owns': this.element.id + '_options',\n 'role': 'listbox',\n 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null,\n 'autocomplete': 'off',\n 'autocorrect': 'off',\n 'autocapitalize': 'off',\n 'spellcheck': 'false'\n });\n this.clearIconElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);\n if (!Browser.isDevice && this.clearIconElement) {\n EventHandler.add(this.clearIconElement, 'click', this.clearText, this);\n this.clearIconElement.style.visibility = 'hidden';\n }\n if (!Browser.isDevice) {\n this.searchKeyModule = new KeyboardEvents(this.filterInput, {\n keyAction: this.keyActionHandler.bind(this),\n keyConfigs: this.keyConfigure,\n eventName: 'keydown'\n });\n }\n else {\n this.searchKeyModule = new KeyboardEvents(this.filterInput, {\n keyAction: this.mobileKeyActionHandler.bind(this),\n keyConfigs: this.keyConfigure,\n eventName: 'keydown'\n });\n }\n EventHandler.add(this.filterInput, 'input', this.onInput, this);\n EventHandler.add(this.filterInput, 'keyup', this.onFilterUp, this);\n EventHandler.add(this.filterInput, 'keydown', this.onFilterDown, this);\n EventHandler.add(this.filterInput, 'blur', this.onBlur, this);\n EventHandler.add(this.filterInput, 'paste', this.pasteHandler, this);\n return this.filterInputObj;\n }\n else {\n return inputObject;\n }\n };\n ;\n DropDownList.prototype.onInput = function (e) {\n this.isValidKey = true;\n // For filtering works in mobile firefox.\n if (Browser.isDevice && Browser.info.name === 'mozilla') {\n this.typedString = this.filterInput.value;\n this.preventAutoFill = true;\n this.searchLists(e);\n }\n };\n DropDownList.prototype.pasteHandler = function (e) {\n var _this = this;\n setTimeout(function () {\n _this.typedString = _this.filterInput.value;\n _this.searchLists(e);\n });\n };\n DropDownList.prototype.onActionFailure = function (e) {\n _super.prototype.onActionFailure.call(this, e);\n if (this.beforePopupOpen) {\n this.renderPopup();\n }\n };\n DropDownList.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {\n var _this = this;\n if (this.isNotSearchList) {\n this.isNotSearchList = false;\n return;\n }\n if (this.isActive) {\n var selectedItem = this.selectedLI ? this.selectedLI.cloneNode(true) : null;\n _super.prototype.onActionComplete.call(this, ulElement, list, e);\n this.updateSelectElementData(this.allowFiltering);\n if (this.isRequested && !isNullOrUndefined(this.searchKeyEvent) && this.searchKeyEvent.type === 'keydown') {\n this.isRequested = false;\n this.keyActionHandler(this.searchKeyEvent);\n this.searchKeyEvent = null;\n }\n if (this.isRequested && !isNullOrUndefined(this.searchKeyEvent)) {\n this.incrementalSearch(this.searchKeyEvent);\n this.searchKeyEvent = null;\n }\n this.list.scrollTop = 0;\n if (!isNullOrUndefined(ulElement)) {\n attributes(ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });\n }\n if (this.initRemoteRender) {\n this.initial = true;\n this.activeIndex = this.index;\n this.updateValues();\n this.initRemoteRender = false;\n this.initial = false;\n if (this.value && this.dataSource instanceof DataManager) {\n var checkField_1 = isNullOrUndefined(this.fields.value) ? this.fields.text : this.fields.value;\n var checkVal = list.some(function (x) { return x[checkField_1] === _this.value; });\n if (!checkVal) {\n this.dataSource.executeQuery(this.getQuery(this.query).where(new Predicate(checkField_1, 'equal', this.value)))\n .then(function (e) {\n if (e.result.length > 0) {\n _this.addItem(e.result, list.length);\n _this.updateValues();\n }\n });\n }\n }\n }\n if (this.getModuleName() !== 'autocomplete' && this.isFiltering() && !this.isTyped) {\n if (!this.actionCompleteData.isUpdated || ((!this.isCustomFilter\n && !this.isFilterFocus) || (isNullOrUndefined(this.itemData) && this.allowFiltering)\n && ((this.dataSource instanceof DataManager)\n || (!isNullOrUndefined(this.dataSource) && !isNullOrUndefined(this.dataSource.length) &&\n this.dataSource.length !== 0)))) {\n if (this.itemTemplate && this.element.tagName === 'EJS-COMBOBOX' && this.allowFiltering) {\n setTimeout(function () {\n _this.actionCompleteData = { ulElement: ulElement.cloneNode(true), list: list, isUpdated: true };\n }, 0);\n }\n else {\n this.actionCompleteData = { ulElement: ulElement.cloneNode(true), list: list, isUpdated: true };\n }\n }\n this.addNewItem(list, selectedItem);\n if (!isNullOrUndefined(this.itemData)) {\n this.focusIndexItem();\n }\n }\n if (this.beforePopupOpen) {\n this.renderPopup();\n }\n }\n };\n DropDownList.prototype.addNewItem = function (listData, newElement) {\n var _this = this;\n if (!isNullOrUndefined(this.itemData) && !isNullOrUndefined(newElement)) {\n var value_1 = this.getItemData().value;\n var isExist = listData.some(function (data) {\n return (((typeof data === 'string' || typeof data === 'number') && data === value_1) ||\n (getValue(_this.fields.value, data) === value_1));\n });\n if (!isExist) {\n this.addItem(this.itemData);\n }\n }\n };\n DropDownList.prototype.updateActionCompleteData = function (li, item, index) {\n var _this = this;\n if (this.getModuleName() !== 'autocomplete' && this.actionCompleteData.ulElement) {\n if (this.itemTemplate && this.element.tagName === 'EJS-COMBOBOX' && this.allowFiltering) {\n setTimeout(function () {\n _this.actionCompleteDataUpdate(li, item, index);\n }, 0);\n }\n else {\n this.actionCompleteDataUpdate(li, item, index);\n }\n }\n };\n DropDownList.prototype.actionCompleteDataUpdate = function (li, item, index) {\n if (index != null) {\n this.actionCompleteData.ulElement.insertBefore(li.cloneNode(true), this.actionCompleteData.ulElement.childNodes[index]);\n }\n else {\n this.actionCompleteData.ulElement.appendChild(li.cloneNode(true));\n }\n if (this.isFiltering() && this.actionCompleteData.list.indexOf(item) < 0) {\n this.actionCompleteData.list.push(item);\n }\n };\n DropDownList.prototype.focusIndexItem = function () {\n var value = this.getItemData().value;\n this.activeIndex = this.getIndexByValue(value);\n var element = this.findListElement(this.list, 'li', 'data-value', value);\n this.selectedLI = element;\n this.activeItem(element);\n this.removeFocus();\n };\n DropDownList.prototype.updateSelection = function () {\n var selectedItem = this.list.querySelector('.' + dropDownBaseClasses.selected);\n if (selectedItem) {\n this.setProperties({ 'index': this.getIndexByValue(selectedItem.getAttribute('data-value')) });\n this.activeIndex = this.index;\n }\n else {\n this.removeFocus();\n this.list.querySelector('.' + dropDownBaseClasses.li).classList.add(dropDownListClasses.focus);\n }\n };\n DropDownList.prototype.removeFocus = function () {\n var highlightedItem = this.list.querySelectorAll('.' + dropDownListClasses.focus);\n if (highlightedItem && highlightedItem.length) {\n removeClass(highlightedItem, dropDownListClasses.focus);\n }\n };\n ;\n DropDownList.prototype.renderPopup = function () {\n var _this = this;\n if (this.popupObj && document.body.contains(this.popupObj.element)) {\n this.refreshPopup();\n return;\n }\n var args = { cancel: false };\n this.trigger('beforeOpen', args, function (args) {\n if (!args.cancel) {\n var popupEle = (_this.serverPopupEle) ? _this.serverPopupEle : _this.createElement('div', {\n id: _this.element.id + '_popup', className: 'e-ddl e-popup ' + (_this.cssClass != null ? _this.cssClass : '')\n });\n var searchBox = _this.setSearchBox(popupEle);\n _this.listHeight = formatUnit(_this.popupHeight);\n if (_this.headerTemplate && !_this.isServerBlazor) {\n _this.setHeaderTemplate(popupEle);\n }\n append([_this.list], popupEle);\n if (_this.footerTemplate && !_this.isServerBlazor) {\n _this.setFooterTemplate(popupEle);\n }\n if (_this.isServerRendered && popupEle && popupEle.querySelector('.e-ddl-footer')) {\n popupEle.appendChild(popupEle.querySelector('.e-ddl-footer'));\n }\n document.body.appendChild(popupEle);\n _this.updateServerPopup(popupEle);\n popupEle.style.visibility = 'hidden';\n if (_this.popupHeight !== 'auto') {\n _this.searchBoxHeight = 0;\n if (!isNullOrUndefined(searchBox.container)) {\n _this.searchBoxHeight = (searchBox.container.parentElement).getBoundingClientRect().height;\n _this.listHeight = (parseInt(_this.listHeight, 10) - (_this.searchBoxHeight)).toString() + 'px';\n }\n if (_this.headerTemplate || (_this.isServerRendered && popupEle && popupEle.querySelector('.e-ddl-header'))) {\n _this.header = _this.header ? _this.header : popupEle.querySelector('.e-ddl-header');\n var height = Math.round(_this.header.getBoundingClientRect().height);\n _this.listHeight = (parseInt(_this.listHeight, 10) - (height + _this.searchBoxHeight)).toString() + 'px';\n }\n if (_this.footerTemplate || (_this.isServerRendered && popupEle && popupEle.querySelector('.e-ddl-footer'))) {\n _this.footer = _this.footer ? _this.footer : popupEle.querySelector('.e-ddl-footer');\n var height = Math.round(_this.footer.getBoundingClientRect().height);\n _this.listHeight = (parseInt(_this.listHeight, 10) - (height + _this.searchBoxHeight)).toString() + 'px';\n }\n _this.list.style.maxHeight = (parseInt(_this.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property\n popupEle.style.maxHeight = formatUnit(_this.popupHeight);\n }\n else {\n popupEle.style.height = 'auto';\n }\n var offsetValue = 0;\n var left = void 0;\n if (!isNullOrUndefined(_this.selectedLI) && (!isNullOrUndefined(_this.activeIndex) && _this.activeIndex >= 0)) {\n _this.setScrollPosition();\n }\n else {\n _this.list.scrollTop = 0;\n }\n if (Browser.isDevice && (!_this.allowFiltering && (_this.getModuleName() === 'dropdownlist' ||\n (_this.isDropDownClick && _this.getModuleName() === 'combobox')))) {\n offsetValue = _this.getOffsetValue(popupEle);\n var firstItem = _this.isEmptyList() ? _this.list : _this.liCollections[0];\n left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -\n parseInt(getComputedStyle(_this.inputElement).paddingLeft, 10) +\n parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));\n }\n _this.getFocusElement();\n _this.createPopup(popupEle, offsetValue, left);\n _this.checkCollision(popupEle);\n if (Browser.isDevice) {\n _this.popupObj.element.classList.add(dropDownListClasses.device);\n if (_this.getModuleName() === 'dropdownlist' || (_this.getModuleName() === 'combobox'\n && !_this.allowFiltering && _this.isDropDownClick)) {\n _this.popupObj.collision = { X: 'fit', Y: 'fit' };\n }\n if (_this.isFilterLayout()) {\n _this.popupObj.element.classList.add(dropDownListClasses.mobileFilter);\n _this.popupObj.position = { X: 0, Y: 0 };\n _this.popupObj.dataBind();\n attributes(_this.popupObj.element, { style: 'left:0px;right:0px;top:0px;bottom:0px;' });\n addClass([document.body, _this.popupObj.element], dropDownListClasses.popupFullScreen);\n _this.setSearchBoxPosition();\n _this.backIconElement = searchBox.container.querySelector('.e-back-icon');\n _this.clearIconElement = searchBox.container.querySelector('.' + dropDownListClasses.clearIcon);\n EventHandler.add(_this.backIconElement, 'click', _this.clickOnBackIcon, _this);\n EventHandler.add(_this.clearIconElement, 'click', _this.clearText, _this);\n }\n }\n popupEle.style.visibility = 'visible';\n addClass([popupEle], 'e-popup-close');\n var scrollParentElements = _this.popupObj.getScrollableParent(_this.inputWrapper.container);\n for (var _i = 0, scrollParentElements_1 = scrollParentElements; _i < scrollParentElements_1.length; _i++) {\n var element = scrollParentElements_1[_i];\n EventHandler.add(element, 'scroll', _this.scrollHandler, _this);\n }\n if (Browser.isDevice && _this.isFilterLayout()) {\n EventHandler.add(_this.list, 'scroll', _this.listScroll, _this);\n }\n if (!isNullOrUndefined(_this.list)) {\n _this.unWireListEvents();\n _this.wireListEvents();\n }\n attributes(_this.targetElement(), { 'aria-expanded': 'true' });\n var inputParent = _this.isFiltering() ? _this.filterInput.parentElement : _this.inputWrapper.container;\n addClass([inputParent], [dropDownListClasses.inputFocus]);\n var animModel = { name: 'FadeIn', duration: 100 };\n _this.beforePopupOpen = true;\n var popupInstance = (isBlazor() && _this.isServerRendered) ? null : _this.popupObj;\n var eventArgs = { popup: popupInstance, cancel: false, animation: animModel };\n _this.trigger('open', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n _this.serverBlazorUpdateSelection();\n _this.bindServerScrollEvent();\n addClass([_this.inputWrapper.container], [dropDownListClasses.iconAnimation]);\n _this.renderReactTemplates();\n _this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);\n }\n else {\n _this.beforePopupOpen = false;\n _this.destroyPopup();\n }\n });\n }\n else {\n _this.beforePopupOpen = false;\n }\n });\n };\n DropDownList.prototype.checkCollision = function (popupEle) {\n if (!Browser.isDevice || (Browser.isDevice && !(this.getModuleName() === 'dropdownlist' || this.isDropDownClick))) {\n var collision = isCollide(popupEle);\n if (collision.length > 0) {\n popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';\n }\n this.popupObj.resolveCollision();\n }\n };\n DropDownList.prototype.serverBlazorUpdateSelection = function () {\n if (this.isServerBlazor && (this.value !== null || this.index !== null || this.text !== null) ||\n (this.getModuleName() !== 'dropdownlist' && !this.isTyped)) {\n if (this.getModuleName() === 'dropdownlist') {\n this.removeSelection();\n this.removeFocus();\n this.removeHover();\n this.updateValues();\n }\n if (this.getModuleName() === 'combobox' && this.ulElement &&\n this.findListElement(this.ulElement, 'li', 'data-value', this.value) && !this.isTyped) {\n this.updateValues();\n }\n if (this.isServerBlazor && this.getModuleName() !== 'dropdownlist' &&\n (this.text === '' || this.text === null) && this.ulElement) {\n if (!this.ulElement.querySelector('li').classList.contains(dropDownBaseClasses.hover)) {\n addClass([this.ulElement.querySelector('li')], dropDownBaseClasses.hover);\n }\n }\n }\n };\n DropDownList.prototype.bindServerScrollEvent = function () {\n if (this.isServerBlazor && this.list) {\n if ((this.fields.groupBy) && !this.isGroupChecking) {\n EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);\n EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);\n }\n }\n };\n DropDownList.prototype.updateServerPopup = function (popupEle) {\n if (this.isServerBlazor) {\n if (popupEle && popupEle.querySelector('li')) {\n removeClass([popupEle.querySelector('.e-content')], ['e-nodata']);\n }\n this.initial = false;\n popupEle.removeAttribute('style');\n }\n };\n DropDownList.prototype.getOffsetValue = function (popupEle) {\n var popupStyles = getComputedStyle(popupEle);\n var borderTop = parseInt(popupStyles.borderTopWidth, 10);\n var borderBottom = parseInt(popupStyles.borderBottomWidth, 10);\n return this.setPopupPosition(borderTop + borderBottom);\n };\n DropDownList.prototype.createPopup = function (element, offsetValue, left) {\n var _this = this;\n this.popupObj = new Popup(element, {\n width: this.setWidth(), targetType: 'relative',\n relateTo: this.inputWrapper.container, collision: { X: 'flip', Y: 'flip' }, offsetY: offsetValue,\n enableRtl: this.enableRtl, offsetX: left, position: { X: 'left', Y: 'bottom' },\n zIndex: this.zIndex,\n close: function () {\n if (!_this.isDocumentClick) {\n _this.focusDropDown();\n }\n // tslint:disable-next-line\n if (_this.isReact) {\n _this.clearTemplate(['headerTemplate', 'footerTemplate']);\n }\n var isResetItem = (_this.getModuleName() === 'autocomplete') ? true : false;\n _this.DropDownBaseresetBlazorTemplates(isResetItem, isResetItem, true, true, false, true, true);\n _this.isNotSearchList = false;\n _this.isDocumentClick = false;\n _this.destroyPopup();\n var formElement = closest(_this.inputElement, 'form');\n if (_this.isFiltering() && _this.actionCompleteData.list && _this.actionCompleteData.list[0]) {\n _this.isActive = true;\n _this.onActionComplete(_this.actionCompleteData.ulElement, _this.actionCompleteData.list, null, true);\n }\n },\n open: function () {\n EventHandler.add(document, 'mousedown', _this.onDocumentClick, _this);\n _this.isPopupOpen = true;\n var actionList = _this.actionCompleteData && _this.actionCompleteData.ulElement &&\n _this.actionCompleteData.ulElement.querySelector('li');\n var ulElement = _this.list.querySelector('ul li');\n if (_this.isFiltering() && _this.itemTemplate && (_this.element.tagName === _this.getNgDirective()) &&\n (actionList && ulElement && actionList.textContent !== ulElement.textContent) &&\n _this.element.tagName !== 'EJS-COMBOBOX') {\n _this.cloneElements();\n }\n if (_this.isFilterLayout()) {\n removeClass([_this.inputWrapper.container], [dropDownListClasses.inputFocus]);\n _this.isFilterFocus = true;\n _this.filterInput.focus();\n if (_this.inputWrapper.clearButton) {\n addClass([_this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);\n }\n }\n _this.activeStateChange();\n },\n targetExitViewport: function () {\n if (!Browser.isDevice) {\n _this.hidePopup();\n }\n }\n });\n };\n DropDownList.prototype.isEmptyList = function () {\n return !isNullOrUndefined(this.liCollections) && this.liCollections.length === 0;\n };\n DropDownList.prototype.getFocusElement = function () {\n // combo-box used this method\n };\n DropDownList.prototype.isFilterLayout = function () {\n return this.getModuleName() === 'dropdownlist' && this.allowFiltering;\n };\n DropDownList.prototype.scrollHandler = function () {\n if (Browser.isDevice && ((this.getModuleName() === 'dropdownlist' &&\n !this.isFilterLayout()) || (this.getModuleName() === 'combobox' && !this.allowFiltering && this.isDropDownClick))) {\n this.hidePopup();\n }\n };\n DropDownList.prototype.setSearchBoxPosition = function () {\n var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;\n this.popupObj.element.style.maxHeight = '100%';\n this.popupObj.element.style.width = '100%';\n this.list.style.maxHeight = (window.innerHeight - searchBoxHeight) + 'px';\n this.list.style.height = (window.innerHeight - searchBoxHeight) + 'px';\n var clearElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);\n detach(this.filterInput);\n clearElement.parentElement.insertBefore(this.filterInput, clearElement);\n };\n DropDownList.prototype.setPopupPosition = function (border) {\n var offsetValue;\n var popupOffset = border;\n var selectedLI = this.list.querySelector('.' + dropDownListClasses.focus) || this.selectedLI;\n var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];\n var lastItem = this.isEmptyList() ? this.list : this.liCollections[this.getItems().length - 1];\n var liHeight = firstItem.getBoundingClientRect().height;\n var listHeight = this.list.offsetHeight / 2;\n var height = isNullOrUndefined(selectedLI) ? firstItem.offsetTop : selectedLI.offsetTop;\n var lastItemOffsetValue = lastItem.offsetTop;\n if (lastItemOffsetValue - listHeight < height && !isNullOrUndefined(this.liCollections) &&\n this.liCollections.length > 0 && !isNullOrUndefined(selectedLI)) {\n var count = this.list.offsetHeight / liHeight;\n var paddingBottom = parseInt(getComputedStyle(this.list).paddingBottom, 10);\n offsetValue = (count - (this.liCollections.length - this.activeIndex)) * liHeight - popupOffset + paddingBottom;\n this.list.scrollTop = selectedLI.offsetTop;\n }\n else if (height > listHeight) {\n offsetValue = listHeight - liHeight / 2;\n this.list.scrollTop = height - listHeight + liHeight / 2;\n }\n else {\n offsetValue = height;\n }\n var inputHeight = this.inputWrapper.container.offsetHeight;\n offsetValue = offsetValue + liHeight + popupOffset - ((liHeight - inputHeight) / 2);\n return -offsetValue;\n };\n DropDownList.prototype.setWidth = function () {\n var width = formatUnit(this.popupWidth);\n if (width.indexOf('%') > -1) {\n var inputWidth = this.inputWrapper.container.offsetWidth * parseFloat(width) / 100;\n width = inputWidth.toString() + 'px';\n }\n if (Browser.isDevice && (!this.allowFiltering && (this.getModuleName() === 'dropdownlist' ||\n (this.isDropDownClick && this.getModuleName() === 'combobox')))) {\n var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];\n width = (parseInt(width, 10) + (parseInt(getComputedStyle(firstItem).textIndent, 10) -\n parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) +\n parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10)) * 2) + 'px';\n }\n return width;\n };\n DropDownList.prototype.scrollBottom = function (isInitial) {\n if (!isNullOrUndefined(this.selectedLI)) {\n var currentOffset = this.list.offsetHeight;\n var nextBottom = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;\n var nextOffset = this.list.scrollTop + nextBottom - currentOffset;\n nextOffset = isInitial ? nextOffset + parseInt(getComputedStyle(this.list).paddingTop, 10) * 2 : nextOffset;\n var boxRange = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;\n boxRange = this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ?\n boxRange - this.fixedHeaderElement.offsetHeight : boxRange;\n if (this.activeIndex === 0) {\n this.list.scrollTop = 0;\n }\n else if (nextBottom > currentOffset || !(boxRange > 0 && this.list.offsetHeight > boxRange)) {\n this.list.scrollTop = nextOffset;\n }\n }\n };\n DropDownList.prototype.scrollTop = function () {\n if (!isNullOrUndefined(this.selectedLI)) {\n var nextOffset = this.selectedLI.offsetTop - this.list.scrollTop;\n var nextBottom = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;\n nextOffset = this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ?\n nextOffset - this.fixedHeaderElement.offsetHeight : nextOffset;\n var boxRange = (this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop);\n if (this.activeIndex === 0) {\n this.list.scrollTop = 0;\n }\n else if (nextOffset < 0) {\n this.list.scrollTop = this.list.scrollTop + nextOffset;\n }\n else if (!(boxRange > 0 && this.list.offsetHeight > boxRange)) {\n this.list.scrollTop = this.selectedLI.offsetTop - (this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ?\n this.fixedHeaderElement.offsetHeight : 0);\n }\n }\n };\n DropDownList.prototype.isEditTextBox = function () {\n return false;\n };\n DropDownList.prototype.isFiltering = function () {\n return this.allowFiltering;\n };\n DropDownList.prototype.isPopupButton = function () {\n return true;\n };\n DropDownList.prototype.setScrollPosition = function (e) {\n if (!isNullOrUndefined(e)) {\n switch (e.action) {\n case 'pageDown':\n case 'down':\n case 'end':\n this.scrollBottom();\n break;\n default:\n this.scrollTop();\n break;\n }\n }\n else {\n this.scrollBottom(true);\n }\n };\n DropDownList.prototype.clearText = function () {\n this.filterInput.value = this.typedString = '';\n this.searchLists(null);\n };\n DropDownList.prototype.listScroll = function () {\n this.filterInput.blur();\n };\n DropDownList.prototype.setEleWidth = function (width) {\n if (!isNullOrUndefined(width)) {\n if (typeof width === 'number') {\n this.inputWrapper.container.style.width = formatUnit(width);\n }\n else if (typeof width === 'string') {\n this.inputWrapper.container.style.width = (width.match(/px|%|em/)) ? (width) : (formatUnit(width));\n }\n }\n };\n DropDownList.prototype.closePopup = function (delay) {\n var _this = this;\n this.isTyped = false;\n if (!(this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen)) {\n return;\n }\n EventHandler.remove(document, 'mousedown', this.onDocumentClick);\n this.isActive = false;\n this.filterInputObj = null;\n this.isDropDownClick = false;\n this.preventAutoFill = false;\n var scrollableParentElements = this.popupObj.getScrollableParent(this.inputWrapper.container);\n for (var _i = 0, scrollableParentElements_1 = scrollableParentElements; _i < scrollableParentElements_1.length; _i++) {\n var element = scrollableParentElements_1[_i];\n EventHandler.remove(element, 'scroll', this.scrollHandler);\n }\n if (Browser.isDevice && this.isFilterLayout()) {\n removeClass([document.body, this.popupObj.element], dropDownListClasses.popupFullScreen);\n EventHandler.remove(this.list, 'scroll', this.listScroll);\n }\n if (this.isFilterLayout()) {\n if (!Browser.isDevice) {\n this.searchKeyModule.destroy();\n if (this.clearIconElement) {\n EventHandler.remove(this.clearIconElement, 'click', this.clearText);\n }\n }\n if (this.backIconElement) {\n EventHandler.remove(this.backIconElement, 'click', this.clickOnBackIcon);\n EventHandler.remove(this.clearIconElement, 'click', this.clearText);\n }\n EventHandler.remove(this.filterInput, 'input', this.onInput);\n EventHandler.remove(this.filterInput, 'keyup', this.onFilterUp);\n EventHandler.remove(this.filterInput, 'keydown', this.onFilterDown);\n EventHandler.remove(this.filterInput, 'blur', this.onBlur);\n EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);\n this.filterInput = null;\n }\n attributes(this.targetElement(), { 'aria-expanded': 'false', 'aria-activedescendant': null });\n this.inputWrapper.container.classList.remove(dropDownListClasses.iconAnimation);\n if (this.isFiltering()) {\n this.actionCompleteData.isUpdated = false;\n }\n this.beforePopupOpen = false;\n var animModel = {\n name: 'FadeOut',\n duration: 100,\n delay: delay ? delay : 0\n };\n var popupInstance = (isBlazor() && this.isServerRendered) ? null : this.popupObj;\n var eventArgs = { popup: popupInstance, cancel: false, animation: animModel };\n this.trigger('close', eventArgs, function (eventArgs) {\n if (!isNullOrUndefined(_this.popupObj) &&\n !isNullOrUndefined(_this.popupObj.element.querySelector('.e-fixed-head'))) {\n var fixedHeader = _this.popupObj.element.querySelector('.e-fixed-head');\n fixedHeader.parentNode.removeChild(fixedHeader);\n _this.fixedHeaderElement = null;\n }\n if (!eventArgs.cancel) {\n if (_this.getModuleName() === 'autocomplete' && !_this.isServerBlazor) {\n _this.rippleFun();\n }\n if (_this.isPopupOpen) {\n _this.popupObj.hide(new Animation(eventArgs.animation));\n }\n else {\n _this.destroyPopup();\n }\n }\n });\n };\n DropDownList.prototype.destroyPopup = function () {\n var popupHolderEle = select('#' + this.element.id + '_popup_holder', document);\n if (this.isServerBlazor && this.serverPopupEle && popupHolderEle) {\n popupHolderEle.appendChild(this.serverPopupEle);\n // tslint:disable-next-line\n this.interopAdaptor.invokeMethodAsync('OnServerClosePopup');\n }\n this.isPopupOpen = false;\n this.isFilterFocus = false;\n this.popupObj.destroy();\n detach(this.popupObj.element);\n };\n DropDownList.prototype.clickOnBackIcon = function () {\n this.hidePopup();\n this.focusIn();\n };\n /**\n * To Initialize the control rendering\n * @private\n */\n // tslint:disable-next-line\n DropDownList.prototype.render = function () {\n if (this.isServerBlazor) {\n this.inputElement = this.element;\n this.inputWrapper = { container: this.element.parentElement };\n this.hiddenElement = this.inputWrapper.container.querySelector('select');\n this.inputWrapper.buttons = [this.inputWrapper.container.querySelector('.e-input-group-icon.e-ddl-icon')];\n if (this.showClearButton) {\n this.inputWrapper.clearButton = this.inputWrapper.container.querySelector('.e-clear-icon');\n Input.wireClearBtnEvents(this.element, this.inputWrapper.clearButton, this.inputWrapper.container);\n }\n if (this.floatLabelType === 'Auto') {\n Input.wireFloatingEvents(this.element);\n }\n Input.bindInitialEvent({\n element: this.element,\n buttons: null, customTag: null,\n floatLabelType: this.floatLabelType,\n properties: this.properties\n });\n this.setFields();\n this.wireEvent();\n this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';\n if (!this.enabled) {\n this.targetElement().tabIndex = -1;\n }\n if (this.element.hasAttribute('autofocus')) {\n this.focusIn();\n }\n this.initial = false;\n }\n else {\n if (this.element.tagName === 'INPUT') {\n this.inputElement = this.element;\n if (isNullOrUndefined(this.inputElement.getAttribute('role'))) {\n this.inputElement.setAttribute('role', 'textbox');\n }\n if (isNullOrUndefined(this.inputElement.getAttribute('type'))) {\n this.inputElement.setAttribute('type', 'text');\n }\n }\n else {\n this.inputElement = this.createElement('input', { attrs: { role: 'textbox', type: 'text' } });\n if (this.element.tagName !== this.getNgDirective()) {\n this.element.style.display = 'none';\n }\n this.element.parentElement.insertBefore(this.inputElement, this.element);\n this.preventTabIndex(this.inputElement);\n }\n var updatedCssClassValues = this.cssClass;\n if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {\n updatedCssClassValues = (this.cssClass.replace(/\\s+/g, ' ')).trim();\n }\n this.inputWrapper = Input.createInput({\n element: this.inputElement,\n buttons: this.isPopupButton() ? [dropDownListClasses.icon] : null,\n floatLabelType: this.floatLabelType,\n properties: {\n readonly: this.getModuleName() === 'dropdownlist' ? true : this.readonly,\n placeholder: this.placeholder,\n cssClass: updatedCssClassValues,\n enabled: this.enabled,\n enableRtl: this.enableRtl,\n showClearButton: this.showClearButton\n },\n }, this.createElement);\n if (this.element.tagName === this.getNgDirective()) {\n this.element.appendChild(this.inputWrapper.container);\n }\n else {\n this.inputElement.parentElement.insertBefore(this.element, this.inputElement);\n }\n this.hiddenElement = this.createElement('select', {\n attrs: { 'aria-hidden': 'true', 'tabindex': '-1', 'class': dropDownListClasses.hiddenElement }\n });\n prepend([this.hiddenElement], this.inputWrapper.container);\n this.validationAttribute(this.element, this.hiddenElement);\n this.setFields();\n this.inputWrapper.container.style.width = formatUnit(this.width);\n this.inputWrapper.container.classList.add('e-ddl');\n this.wireEvent();\n this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';\n this.element.removeAttribute('tabindex');\n var id = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');\n this.element.id = id;\n this.hiddenElement.id = id + '_hidden';\n this.targetElement().setAttribute('tabindex', this.tabIndex);\n attributes(this.targetElement(), this.getAriaAttributes());\n this.updateDataAttribute(this.htmlAttributes);\n this.setHTMLAttributes();\n if (this.value !== null || this.activeIndex !== null || this.text !== null) {\n this.initValue();\n }\n else if (this.element.tagName === 'SELECT' && this.element.options[0]) {\n var selectElement = this.element;\n this.value = selectElement.options[selectElement.selectedIndex].value;\n this.text = isNullOrUndefined(this.value) ? null : selectElement.options[selectElement.selectedIndex].textContent;\n this.initValue();\n }\n this.preventTabIndex(this.element);\n if (!this.enabled) {\n this.targetElement().tabIndex = -1;\n }\n this.initial = false;\n this.element.style.opacity = '';\n this.inputElement.onselect = function (e) { e.stopImmediatePropagation(); };\n this.inputElement.onchange = function (e) { e.stopImmediatePropagation(); };\n if (this.element.hasAttribute('autofocus')) {\n this.focusIn();\n }\n if (!isNullOrUndefined(this.text)) {\n this.inputElement.setAttribute('value', this.text);\n }\n }\n if (this.element.hasAttribute('data-val')) {\n this.element.setAttribute('data-val', 'false');\n }\n this.renderComplete();\n };\n ;\n DropDownList.prototype.setFooterTemplate = function (popupEle) {\n var compiledString;\n if (this.footer) {\n this.footer.innerHTML = '';\n }\n else {\n this.footer = this.createElement('div');\n addClass([this.footer], dropDownListClasses.footer);\n }\n var footercheck = this.dropdownCompiler(this.footerTemplate);\n if (footercheck) {\n compiledString = compile(select(this.footerTemplate, document).innerHTML.trim());\n }\n else {\n compiledString = compile(this.footerTemplate);\n }\n // tslint:disable-next-line\n var footerCompTemp = compiledString({}, this, 'footerTemplate', this.footerTemplateId, this.isStringTemplate, null, this.footer);\n if (footerCompTemp && footerCompTemp.length > 0) {\n for (var i = 0; i < footerCompTemp.length; i++) {\n this.footer.appendChild(footerCompTemp[i]);\n }\n }\n this.DropDownBaseupdateBlazorTemplates(false, false, false, false, false, false, true);\n append([this.footer], popupEle);\n };\n DropDownList.prototype.setHeaderTemplate = function (popupEle) {\n var compiledString;\n if (this.header) {\n this.header.innerHTML = '';\n }\n else {\n this.header = this.createElement('div');\n addClass([this.header], dropDownListClasses.header);\n }\n var headercheck = this.dropdownCompiler(this.headerTemplate);\n if (headercheck) {\n compiledString = compile(select(this.headerTemplate, document).innerHTML.trim());\n }\n else {\n compiledString = compile(this.headerTemplate);\n }\n // tslint:disable-next-line\n var headerCompTemp = compiledString({}, this, 'headerTemplate', this.headerTemplateId, this.isStringTemplate, null, this.header);\n if (headerCompTemp && headerCompTemp.length) {\n for (var i = 0; i < headerCompTemp.length; i++) {\n this.header.appendChild(headerCompTemp[i]);\n }\n }\n this.DropDownBaseupdateBlazorTemplates(false, false, false, false, false, true, false);\n var contentEle = popupEle.querySelector('div.e-content');\n popupEle.insertBefore(this.header, contentEle);\n };\n DropDownList.prototype.setOldText = function (text) {\n this.text = text;\n };\n DropDownList.prototype.setOldValue = function (value) {\n this.value = value;\n };\n DropDownList.prototype.refreshPopup = function () {\n if (!isNullOrUndefined(this.popupObj) && document.body.contains(this.popupObj.element) &&\n ((this.allowFiltering && !(Browser.isDevice && this.isFilterLayout())) || this.getModuleName() === 'autocomplete')) {\n removeClass([this.popupObj.element], 'e-popup-close');\n this.popupObj.refreshPosition(this.inputWrapper.container);\n this.popupObj.resolveCollision();\n }\n };\n DropDownList.prototype.checkData = function (newProp) {\n if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource)) && this.itemTemplate && this.allowFiltering &&\n !(this.isListSearched && (newProp.dataSource instanceof DataManager))) {\n this.list = null;\n this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };\n }\n this.isListSearched = false;\n var isChangeValue = Object.keys(newProp).indexOf('value') !== -1 && isNullOrUndefined(newProp.value);\n var isChangeText = Object.keys(newProp).indexOf('text') !== -1 && isNullOrUndefined(newProp.text);\n if (this.getModuleName() !== 'autocomplete' && this.allowFiltering && (isChangeValue || isChangeText)) {\n this.itemData = null;\n }\n if (this.allowFiltering && newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))) {\n this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };\n }\n };\n DropDownList.prototype.updateDataSource = function (props) {\n if (this.inputElement.value !== '' || (!isNullOrUndefined(props) && (isNullOrUndefined(props.dataSource)\n || (!(props.dataSource instanceof DataManager) && props.dataSource.length === 0)))) {\n this.clearAll(null, props);\n }\n if (!(!isNullOrUndefined(props) && (isNullOrUndefined(props.dataSource)\n || (!(props.dataSource instanceof DataManager) && props.dataSource.length === 0))) || !(props.dataSource === [])) {\n this.typedString = '';\n this.resetList(this.dataSource);\n }\n if (!this.isCustomFilter && !this.isFilterFocus && document.activeElement !== this.filterInput) {\n this.checkCustomValue();\n }\n };\n DropDownList.prototype.checkCustomValue = function () {\n this.itemData = this.getDataByValue(this.value);\n var dataItem = this.getItemData();\n this.setProperties({ 'value': dataItem.value, 'text': dataItem.text });\n };\n DropDownList.prototype.updateInputFields = function () {\n if (this.getModuleName() === 'dropdownlist') {\n Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n };\n /**\n * Dynamically change the value of properties.\n * @private\n */\n DropDownList.prototype.onPropertyChanged = function (newProp, oldProp) {\n if (this.getModuleName() === 'dropdownlist') {\n if (!this.isServerBlazor) {\n this.checkData(newProp);\n this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);\n }\n }\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'query':\n case 'dataSource': break;\n case 'htmlAttributes':\n this.setHTMLAttributes();\n break;\n case 'width':\n this.setEleWidth(newProp.width);\n break;\n case 'placeholder':\n Input.setPlaceholder(newProp.placeholder, this.inputElement);\n break;\n case 'filterBarPlaceholder':\n if (this.filterInput) {\n Input.setPlaceholder(newProp.filterBarPlaceholder, this.filterInput);\n }\n break;\n case 'readonly':\n if (this.getModuleName() !== 'dropdownlist') {\n Input.setReadonly(newProp.readonly, this.inputElement);\n }\n break;\n case 'cssClass':\n this.setCssClass(newProp.cssClass, oldProp.cssClass);\n break;\n case 'enableRtl':\n this.setEnableRtl();\n break;\n case 'enabled':\n this.setEnable();\n break;\n case 'text':\n if (newProp.text === null) {\n this.clearAll();\n break;\n }\n if (!this.list) {\n if (this.dataSource instanceof DataManager) {\n this.initRemoteRender = true;\n }\n this.renderList();\n }\n if (!this.initRemoteRender) {\n var li = this.getElementByText(newProp.text);\n if (!this.checkValidLi(li)) {\n if (this.liCollections && this.liCollections.length === 100 &&\n this.getModuleName() === 'autocomplete' && this.listData.length > 100) {\n this.setSelectionData(newProp.text, oldProp.text, 'text');\n }\n else if (!this.isServerBlazor) {\n this.setOldText(oldProp.text);\n }\n }\n this.updateInputFields();\n }\n break;\n case 'value':\n if (newProp.value === null) {\n this.clearAll();\n break;\n }\n this.notify('beforeValueChange', { newProp: newProp }); // gird component value type change\n if (!this.list) {\n if (this.dataSource instanceof DataManager) {\n this.initRemoteRender = true;\n }\n this.renderList();\n }\n if (!this.initRemoteRender) {\n var item = this.getElementByValue(newProp.value);\n if (!this.checkValidLi(item)) {\n if (this.liCollections && this.liCollections.length === 100 &&\n this.getModuleName() === 'autocomplete' && this.listData.length > 100) {\n this.setSelectionData(newProp.value, oldProp.value, 'value');\n }\n else if (!this.isServerBlazor) {\n this.setOldValue(oldProp.value);\n }\n }\n this.updateInputFields();\n }\n break;\n case 'index':\n if (newProp.index === null) {\n this.clearAll();\n break;\n }\n if (!this.list) {\n if (this.dataSource instanceof DataManager) {\n this.initRemoteRender = true;\n }\n this.renderList();\n }\n if (!this.initRemoteRender && this.liCollections) {\n var element = this.liCollections[newProp.index];\n if (!this.checkValidLi(element)) {\n if (this.liCollections && this.liCollections.length === 100 &&\n this.getModuleName() === 'autocomplete' && this.listData.length > 100) {\n this.setSelectionData(newProp.index, oldProp.index, 'index');\n }\n else if (!this.isServerBlazor) {\n this.index = oldProp.index;\n }\n }\n this.updateInputFields();\n }\n break;\n case 'footerTemplate':\n if (this.popupObj) {\n this.setFooterTemplate(this.popupObj.element);\n }\n break;\n case 'headerTemplate':\n if (this.popupObj) {\n this.setHeaderTemplate(this.popupObj.element);\n }\n break;\n case 'valueTemplate':\n if (!isNullOrUndefined(this.itemData) && this.valueTemplate != null) {\n this.setValueTemplate();\n }\n break;\n case 'allowFiltering':\n if (this.allowFiltering) {\n this.actionCompleteData = { ulElement: this.ulElement,\n list: this.listData, isUpdated: true };\n this.updateSelectElementData(this.allowFiltering);\n }\n break;\n case 'floatLabelType':\n Input.removeFloating(this.inputWrapper);\n Input.addFloating(this.inputElement, newProp.floatLabelType, this.placeholder, this.createElement);\n break;\n case 'showClearButton':\n Input.setClearButton(newProp.showClearButton, this.inputElement, this.inputWrapper, null, this.createElement);\n this.bindClearEvent();\n break;\n default:\n var ddlProps = void 0;\n ddlProps = this.getPropObject(prop, newProp, oldProp);\n _super.prototype.onPropertyChanged.call(this, ddlProps.newProperty, ddlProps.oldProperty);\n break;\n }\n }\n this.preventChange = this.isAngular && this.preventChange ? !this.preventChange : this.preventChange;\n };\n DropDownList.prototype.checkValidLi = function (element) {\n if (this.isValidLI(element)) {\n this.setSelection(element, null);\n return true;\n }\n return false;\n };\n DropDownList.prototype.setSelectionData = function (newProp, oldProp, prop) {\n var _this = this;\n var li;\n this.updateListValues = function () {\n if (prop === 'text') {\n li = _this.getElementByText(newProp);\n if (!_this.checkValidLi(li)) {\n _this.setOldText(oldProp);\n }\n }\n else if (prop === 'value') {\n li = _this.getElementByValue(newProp);\n if (!_this.checkValidLi(li)) {\n _this.setOldValue(oldProp);\n }\n }\n else if (prop === 'index') {\n li = _this.liCollections[newProp];\n if (!_this.checkValidLi(li)) {\n _this.index = oldProp;\n }\n }\n };\n };\n DropDownList.prototype.setCssClass = function (newClass, oldClass) {\n if (!isNullOrUndefined(oldClass)) {\n oldClass = (oldClass.replace(/\\s+/g, ' ')).trim();\n }\n if (!isNullOrUndefined(newClass)) {\n newClass = (newClass.replace(/\\s+/g, ' ')).trim();\n }\n Input.setCssClass(newClass, [this.inputWrapper.container], oldClass);\n if (this.popupObj) {\n Input.setCssClass(newClass, [this.popupObj.element], oldClass);\n }\n };\n /**\n * Return the module name.\n * @private\n */\n DropDownList.prototype.getModuleName = function () {\n return 'dropdownlist';\n };\n /**\n * Opens the popup that displays the list of items.\n * @returns void.\n */\n DropDownList.prototype.showPopup = function () {\n if (!this.enabled) {\n return;\n }\n if (isBlazor() && this.itemTemplate) {\n this.DropDownBaseupdateBlazorTemplates(true, false, false, false);\n }\n if (this.beforePopupOpen) {\n this.refreshPopup();\n return;\n }\n this.beforePopupOpen = true;\n if (this.isFiltering() && !this.isActive && this.actionCompleteData.list && this.actionCompleteData.list[0]) {\n this.isActive = true;\n this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list, null, true);\n }\n else if (isNullOrUndefined(this.list) || !isUndefined(this.list) && (this.list.classList.contains(dropDownBaseClasses.noData) ||\n this.list.querySelectorAll('.' + dropDownBaseClasses.li).length <= 0)) {\n this.renderList();\n }\n else if (this.isFiltering() && this.isServerBlazor) {\n this.renderList();\n }\n if (!this.isServerBlazor) {\n this.invokeRenderPopup();\n }\n var popupHolderEle = !this.isFiltering() || select('#' + this.element.id + '_popup_holder', document);\n var isDropdownComp = this.getModuleName() === 'dropdownlist' || !this.isFiltering();\n if (this.isServerBlazor && popupHolderEle && !isNullOrUndefined(this.list) && isDropdownComp) {\n this.invokeRenderPopup();\n }\n };\n DropDownList.prototype.invokeRenderPopup = function () {\n if (Browser.isDevice && this.isFilterLayout()) {\n var proxy_2 = this;\n window.onpopstate = function () {\n proxy_2.hidePopup();\n };\n history.pushState({}, '');\n }\n if (!isNullOrUndefined(this.list.children[0]) || this.list.classList.contains(dropDownBaseClasses.noData)) {\n this.renderPopup();\n }\n attributes(this.targetElement(), { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });\n };\n DropDownList.prototype.clientRenderPopup = function (data, popupEle) {\n if (popupEle) {\n this.serverPopupEle = popupEle;\n this.list = popupEle.querySelector('.e-dropdownbase.e-content') ?\n popupEle.querySelector('.e-dropdownbase.e-content') : this.list;\n this.ulElement = this.list.querySelector('ul');\n if (isNullOrUndefined(this.ulElement) && !this.list.classList.contains(dropDownBaseClasses.noData)) {\n addClass([this.list], [dropDownBaseClasses.noData]);\n }\n this.liCollections = this.ulElement ?\n this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li) : [];\n this.listData = data;\n if (this.getModuleName() === 'autocomplete' && this.liCollections.length > 0) {\n this.renderHightSearch();\n }\n this.initRemoteRender = false;\n if (!this.isPopupOpen) {\n this.serverBlazorUpdateSelection();\n }\n this.unWireListEvents();\n this.wireListEvents();\n if (this.isServerIncrementalSearch && this.searchKeyEvent) {\n this.isServerIncrementalSearch = false;\n this.initial = false;\n this.onServerIncrementalSearch(this.searchKeyEvent);\n }\n if (this.isServerNavigation && this.searchKeyEvent) {\n if (this.searchKeyEvent.action === 'down' || this.searchKeyEvent.action === 'up') {\n this.isServerNavigation = false;\n this.updateUpDownAction(this.searchKeyEvent);\n }\n else if (this.searchKeyEvent.action === 'home' || this.searchKeyEvent.action === 'end') {\n this.isServerNavigation = false;\n this.updateHomeEndAction(this.searchKeyEvent);\n }\n }\n if (this.beforePopupOpen) {\n this.invokeRenderPopup();\n }\n if (this.getModuleName() !== 'dropdownlist') {\n this.onActionComplete(this.ulElement, this.listData);\n }\n }\n else if (data != null && this.listData !== data) {\n this.listData = data;\n this.initRemoteRender = false;\n }\n };\n DropDownList.prototype.renderHightSearch = function () {\n // update high light search \n };\n DropDownList.prototype.updateclientItemData = function (data) {\n this.listData = data;\n };\n DropDownList.prototype.initValueItemData = function (selectData) {\n this.itemData = selectData;\n this.previousValue = this.value;\n this.initial = false;\n };\n DropDownList.prototype.serverUpdateListElement = function (data, popupEle) {\n this.listData = data;\n if (this.ulElement) {\n this.liCollections = this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li);\n }\n };\n /**\n * Hides the popup if it is in an open state.\n * @returns void.\n */\n DropDownList.prototype.hidePopup = function (e) {\n var isHeader = (this.headerTemplate) ? true : false;\n var isFooter = (this.headerTemplate) ? true : false;\n this.DropDownBaseresetBlazorTemplates(false, false, false, false, false, isHeader, isFooter);\n if (this.isEscapeKey && this.getModuleName() === 'dropdownlist') {\n Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);\n this.isEscapeKey = false;\n if (!isNullOrUndefined(this.index)) {\n var element = this.findListElement(this.ulElement, 'li', 'data-value', this.value);\n this.selectedLI = this.liCollections[this.index] || element;\n if (this.selectedLI) {\n this.updateSelectedItem(this.selectedLI, null, true);\n if (this.valueTemplate && this.itemData !== null) {\n this.setValueTemplate();\n }\n }\n }\n else {\n this.resetSelection();\n }\n }\n this.closePopup();\n var dataItem = this.getItemData();\n var isSelectVal = this.isServerBlazor ? !isNullOrUndefined(this.value) : !isNullOrUndefined(this.selectedLI);\n if (this.inputElement && this.inputElement.value.trim() === '' && !this.isInteracted && (this.isSelectCustom ||\n isSelectVal && this.inputElement.value !== dataItem.text)) {\n this.isSelectCustom = false;\n this.clearAll(e);\n }\n };\n /**\n * Sets the focus on the component for interaction.\n * @returns void.\n */\n DropDownList.prototype.focusIn = function (e) {\n if (!this.enabled) {\n return;\n }\n if (this.targetElement().classList.contains(dropDownListClasses.disable)) {\n return;\n }\n var isFocused = false;\n if (this.preventFocus && Browser.isDevice) {\n this.inputWrapper.container.tabIndex = 1;\n this.inputWrapper.container.focus();\n this.preventFocus = false;\n isFocused = true;\n }\n if (!isFocused) {\n this.targetElement().focus();\n }\n addClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);\n this.onFocus(e);\n };\n /**\n * Moves the focus from the component if the component is already focused.\n * @returns void.\n */\n DropDownList.prototype.focusOut = function (e) {\n if (!this.enabled) {\n return;\n }\n this.isTyped = true;\n this.hidePopup(e);\n if (this.targetElement()) {\n this.targetElement().blur();\n }\n removeClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);\n };\n /**\n * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.\n * @method destroy\n * @return {void}.\n */\n DropDownList.prototype.destroy = function () {\n this.isActive = false;\n // tslint:disable-next-line\n if (this.isReact) {\n this.clearTemplate();\n }\n if (!this.isServerBlazor || (this.popupObj && document.body.contains(this.popupObj.element))) {\n this.hidePopup();\n }\n this.unWireEvent();\n if (this.list) {\n this.unWireListEvents();\n if (this.isServerBlazor) {\n if ((this.fields.groupBy) && !this.isGroupChecking) {\n EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);\n }\n }\n }\n if (!this.isServerBlazor) {\n if (this.element && !this.element.classList.contains('e-' + this.getModuleName())) {\n return;\n }\n if (this.inputElement) {\n var attrArray = ['readonly', 'aria-disabled', 'aria-placeholder',\n 'placeholder', 'aria-owns', 'aria-labelledby', 'aria-haspopup', 'aria-expanded',\n 'aria-activedescendant', 'autocomplete', 'aria-readonly', 'autocorrect',\n 'autocapitalize', 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-describedby', 'aria-label'];\n for (var i = 0; i < attrArray.length; i++) {\n this.inputElement.removeAttribute(attrArray[i]);\n }\n this.inputElement.setAttribute('tabindex', this.tabIndex);\n this.inputElement.classList.remove('e-input');\n Input.setValue('', this.inputElement, this.floatLabelType, this.showClearButton);\n }\n this.element.style.display = 'block';\n if (this.inputWrapper.container.parentElement.tagName === this.getNgDirective()) {\n detach(this.inputWrapper.container);\n }\n else {\n this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);\n detach(this.inputWrapper.container);\n }\n _super.prototype.destroy.call(this);\n }\n };\n ;\n /**\n * Gets all the list items bound on this component.\n * @returns Element[].\n */\n DropDownList.prototype.getItems = function () {\n if (!this.list) {\n if (this.dataSource instanceof DataManager) {\n this.initRemoteRender = true;\n }\n this.renderList();\n }\n return this.ulElement ? _super.prototype.getItems.call(this) : [];\n };\n /**\n * Gets the data Object that matches the given value.\n * @param { string | number } value - Specifies the value of the list item.\n * @returns Object.\n * @blazorType object\n */\n DropDownList.prototype.getDataByValue = function (value) {\n return _super.prototype.getDataByValue.call(this, value);\n };\n /**\n * Allows you to clear the selected values from the component.\n * @returns void.\n */\n DropDownList.prototype.clear = function () {\n this.value = null;\n };\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"cssClass\", void 0);\n __decorate([\n Property('100%')\n ], DropDownList.prototype, \"width\", void 0);\n __decorate([\n Property('300px')\n ], DropDownList.prototype, \"popupHeight\", void 0);\n __decorate([\n Property('100%')\n ], DropDownList.prototype, \"popupWidth\", void 0);\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"placeholder\", void 0);\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"filterBarPlaceholder\", void 0);\n __decorate([\n Property({})\n ], DropDownList.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"query\", void 0);\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"valueTemplate\", void 0);\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"headerTemplate\", void 0);\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"footerTemplate\", void 0);\n __decorate([\n Property(false)\n ], DropDownList.prototype, \"allowFiltering\", void 0);\n __decorate([\n Property(false)\n ], DropDownList.prototype, \"readonly\", void 0);\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"text\", void 0);\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"value\", void 0);\n __decorate([\n Property(null)\n ], DropDownList.prototype, \"index\", void 0);\n __decorate([\n Property('Never')\n ], DropDownList.prototype, \"floatLabelType\", void 0);\n __decorate([\n Property(false)\n ], DropDownList.prototype, \"showClearButton\", void 0);\n __decorate([\n Event()\n ], DropDownList.prototype, \"filtering\", void 0);\n __decorate([\n Event()\n ], DropDownList.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], DropDownList.prototype, \"beforeOpen\", void 0);\n __decorate([\n Event()\n ], DropDownList.prototype, \"open\", void 0);\n __decorate([\n Event()\n ], DropDownList.prototype, \"close\", void 0);\n __decorate([\n Event()\n ], DropDownList.prototype, \"blur\", void 0);\n __decorate([\n Event()\n ], DropDownList.prototype, \"focus\", void 0);\n DropDownList = __decorate([\n NotifyPropertyChanges\n ], DropDownList);\n return DropDownList;\n}(DropDownBase));\nexport { DropDownList };\n","import { createElement, remove, isBlazor } from '@syncfusion/ej2-base';\nimport { DropDownList } from '@syncfusion/ej2-dropdowns';\n/**\n * `PagerDropDown` module handles selected pageSize from DropDownList.\n */\nvar PagerDropDown = /** @class */ (function () {\n /**\n * Constructor for pager module\n * @hidden\n */\n function PagerDropDown(pagerModule) {\n this.pagerModule = pagerModule;\n }\n /**\n * For internal use only - Get the module name.\n * @private\n * @hidden\n */\n PagerDropDown.prototype.getModuleName = function () {\n return 'pagerdropdown';\n };\n /**\n * The function is used to render pager dropdown\n * @hidden\n */\n PagerDropDown.prototype.render = function () {\n var pagerObj = this.pagerModule;\n this.pagerDropDownDiv = createElement('div', { className: 'e-pagesizes' });\n var dropDownDiv = createElement('div', { className: 'e-pagerdropdown' });\n var defaultTextDiv = createElement('div', { className: 'e-pagerconstant' });\n var input = createElement('input', { attrs: { type: 'text', tabindex: '1' } });\n this.pagerCons = createElement('span', { className: 'e-constant', innerHTML: isBlazor() ?\n this.pagerModule.getLocalizedLabel('PagerDropDown') :\n this.pagerModule.getLocalizedLabel('pagerDropDown') });\n dropDownDiv.appendChild(input);\n defaultTextDiv.appendChild(this.pagerCons);\n this.pagerDropDownDiv.appendChild(dropDownDiv);\n this.pagerDropDownDiv.appendChild(defaultTextDiv);\n this.pagerModule.element.appendChild(this.pagerDropDownDiv);\n var pageSizesModule = this.pagerModule.pageSizes;\n var pageSizesArray = (pageSizesModule.length ? this.convertValue(pageSizesModule) :\n [this.pagerModule.getLocalizedLabel('All'), '5', '10', '12', '20']);\n var defaultValue = this.pagerModule.pageSize;\n this.dropDownListObject = new DropDownList({\n dataSource: pageSizesArray,\n value: defaultValue.toString(),\n change: this.onChange.bind(this),\n cssClass: 'e-alldrop'\n });\n this.dropDownListObject.appendTo(input);\n if (pageSizesModule.length) {\n this.dropDownListObject.element.value = this.pagerModule.pageSize.toString();\n }\n pagerObj.pageSize = defaultValue;\n pagerObj.dataBind();\n pagerObj.trigger('dropDownChanged', { pageSize: defaultValue });\n this.addEventListener();\n };\n /**\n * For internal use only - Get the pagesize.\n * @private\n * @hidden\n */\n PagerDropDown.prototype.onChange = function (e) {\n if (this.dropDownListObject.value === this.pagerModule.getLocalizedLabel('All')) {\n this.pagerModule.pageSize = this.pagerModule.totalRecordsCount;\n this.refresh();\n e.value = this.pagerModule.pageSize;\n if (document.getElementsByClassName('e-popup-open e-alldrop').length) {\n document.getElementsByClassName('e-popup-open e-alldrop')[0].style.display = 'none';\n }\n }\n else {\n this.pagerModule.pageSize = parseInt(this.dropDownListObject.value, 10);\n if (this.pagerCons.innerHTML !== this.pagerModule.getLocalizedLabel('pagerDropDown')) {\n this.refresh();\n }\n }\n this.pagerModule.dataBind();\n this.pagerModule.trigger('dropDownChanged', { pageSize: parseInt(this.dropDownListObject.value, 10) });\n };\n PagerDropDown.prototype.refresh = function () {\n if (this.pagerCons) {\n if (this.pagerModule.pageSize === this.pagerModule.totalRecordsCount) {\n this.pagerCons.innerHTML = isBlazor() ? this.pagerModule.getLocalizedLabel('PagerAllDropDown') :\n this.pagerModule.getLocalizedLabel('pagerAllDropDown');\n }\n else {\n this.pagerCons.innerHTML = isBlazor() ? this.pagerModule.getLocalizedLabel('PagerDropDown') :\n this.pagerModule.getLocalizedLabel('pagerDropDown');\n }\n }\n };\n PagerDropDown.prototype.beforeValueChange = function (prop) {\n if (typeof prop.newProp.value === 'number') {\n var val = prop.newProp.value.toString();\n prop.newProp.value = val;\n }\n };\n PagerDropDown.prototype.convertValue = function (pageSizeValue) {\n var item = pageSizeValue;\n for (var i = 0; i < item.length; i++) {\n item[i] = parseInt(item[i], 10) ? item[i].toString() : (this.pagerModule.getLocalizedLabel(item[i]) !== '')\n ? this.pagerModule.getLocalizedLabel(item[i]) : item[i];\n }\n return item;\n };\n PagerDropDown.prototype.setDropDownValue = function (prop, value) {\n if (this.dropDownListObject) {\n this.dropDownListObject[prop] = value;\n }\n };\n PagerDropDown.prototype.addEventListener = function () {\n this.dropDownListObject.on('beforeValueChange', this.beforeValueChange, this);\n };\n PagerDropDown.prototype.removeEventListener = function () {\n this.dropDownListObject.off('beforeValueChange', this.beforeValueChange);\n };\n /**\n * To destroy the Pagerdropdown\n * @method destroy\n * @return {void}\n * @hidden\n */\n PagerDropDown.prototype.destroy = function (args) {\n if (this.dropDownListObject && !this.dropDownListObject.isDestroyed) {\n this.removeEventListener();\n this.dropDownListObject.destroy();\n remove(this.pagerDropDownDiv);\n }\n };\n return PagerDropDown;\n}());\nexport { PagerDropDown };\n","import { createElement, remove, isNullOrUndefined } from '@syncfusion/ej2-base';\n/**\n * `ExternalMessage` module is used to display user provided message.\n */\nvar ExternalMessage = /** @class */ (function () {\n /**\n * Constructor for externalMessage module\n * @param {Pager} pagerModule?\n * @returns defaultType\n * @hidden\n */\n function ExternalMessage(pagerModule) {\n this.pagerModule = pagerModule;\n }\n /**\n * For internal use only - Get the module name.\n * @private\n */\n ExternalMessage.prototype.getModuleName = function () {\n return 'externalMessage';\n };\n /**\n * The function is used to render pager externalMessage\n * @hidden\n */\n ExternalMessage.prototype.render = function () {\n this.element = createElement('div', { className: 'e-pagerexternalmsg', attrs: { 'aria-label': 'Pager external message' } });\n this.pagerModule.element.appendChild(this.element);\n this.refresh();\n };\n /**\n * Refreshes the external message of Pager.\n */\n ExternalMessage.prototype.refresh = function () {\n if (this.pagerModule.externalMessage && this.pagerModule.externalMessage.toString().length) {\n this.showMessage();\n this.element.innerHTML = this.pagerModule.externalMessage;\n }\n else {\n this.hideMessage();\n }\n };\n /**\n * Hides the external message of Pager.\n */\n ExternalMessage.prototype.hideMessage = function () {\n if (!isNullOrUndefined(this.element)) {\n this.element.style.display = 'none';\n }\n };\n /**\n * Shows the external message of the Pager.\n */\n ExternalMessage.prototype.showMessage = function () {\n this.element.style.display = '';\n };\n /**\n * To destroy the PagerMessage\n * @method destroy\n * @return {void}\n * @hidden\n */\n ExternalMessage.prototype.destroy = function () {\n remove(this.element);\n };\n return ExternalMessage;\n}());\nexport { ExternalMessage };\n","import { extend } from '@syncfusion/ej2-base';\nimport { remove, isNullOrUndefined, isBlazor } from '@syncfusion/ej2-base';\nimport { Pager } from '../../pager/pager';\nimport { PagerDropDown } from '../../pager/pager-dropdown';\nimport { ExternalMessage } from '../../pager/external-message';\nimport { extend as gridExtend, getActualProperties, isActionPrevent } from '../base/util';\nimport * as events from '../base/constant';\n/**\n * The `Page` module is used to render pager and handle paging action.\n */\nvar Page = /** @class */ (function () {\n /**\n * Constructor for the Grid paging module\n * @hidden\n */\n function Page(parent, pageSettings) {\n this.isInitialRender = true;\n Pager.Inject(ExternalMessage, PagerDropDown);\n this.parent = parent;\n this.pageSettings = pageSettings;\n this.addEventListener();\n }\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Page.prototype.getModuleName = function () {\n return 'pager';\n };\n /**\n * The function used to render pager from grid pageSettings\n * @return {void}\n * @hidden\n */\n Page.prototype.render = function () {\n var gObj = this.parent;\n var pagerObj;\n this.pagerDestroy();\n if (!isNullOrUndefined(this.parent.pagerTemplate)) {\n this.pageSettings.template = this.parent.pagerTemplate;\n this.parent.pageTemplateChange = true;\n }\n this.element = this.parent.createElement('div', { className: 'e-gridpager' });\n pagerObj = gridExtend({}, extend({}, getActualProperties(this.pageSettings)), {\n click: this.clickHandler.bind(this),\n dropDownChanged: this.onSelect.bind(this),\n enableRtl: gObj.enableRtl, locale: gObj.locale,\n created: this.addAriaAttr.bind(this)\n }, ['parentObj', 'propName']);\n this.pagerObj = new Pager(pagerObj);\n this.pagerObj.hasParent = true;\n this.pagerObj.on('pager-refresh', this.renderReactPagerTemplate, this);\n this.pagerObj.allowServerDataBinding = false;\n };\n Page.prototype.onSelect = function (e) {\n this.pageSettings.pageSize = e.pageSize;\n if (!this.isInitialLoad) {\n this.pageSettings.currentPage = 1;\n }\n };\n Page.prototype.addAriaAttr = function () {\n if (!(this.pageSettings.template)) {\n var numericContainerNew = this.parent.createElement('div', { className: 'e-numericcontainer' });\n var pagerContainer = this.element.querySelector('.e-pagercontainer');\n var frag = document.createDocumentFragment();\n var numericContainer = this.element.querySelector('.e-numericcontainer');\n var links = numericContainer.querySelectorAll('a');\n for (var i = 0; i < links.length; i++) {\n if (this.parent.getContentTable()) {\n links[i].setAttribute('aria-owns', this.parent.getContentTable().id);\n }\n else {\n links[i].setAttribute('aria-owns', this.parent.element.getAttribute('id') + '_content_table');\n }\n var numericContainerDiv = this.parent.createElement('div');\n numericContainerDiv.appendChild(links[i]);\n frag.appendChild(numericContainerDiv);\n }\n numericContainerNew.appendChild(frag);\n pagerContainer.replaceChild(numericContainerNew, numericContainer);\n var classList = ['.e-mfirst', '.e-mprev', '.e-first', '.e-prev', '.e-next', '.e-last', '.e-mnext', '.e-mlast'];\n for (var j = 0; j < classList.length; j++) {\n var element = this.element.querySelector(classList[j]);\n if (this.parent.getContentTable()) {\n element.setAttribute('aria-owns', this.parent.getContentTable().id);\n }\n }\n }\n };\n Page.prototype.dataReady = function (e) {\n this.updateModel(e);\n };\n /**\n * Refreshes the page count, pager information, and external message.\n * @return {void}\n */\n Page.prototype.refresh = function () {\n this.pagerObj.refresh();\n };\n /**\n * Navigates to the target page according to the given number.\n * @param {number} pageNo - Defines the page number to navigate.\n * @return {void}\n */\n Page.prototype.goToPage = function (pageNo) {\n this.pagerObj.goToPage(pageNo);\n };\n /**\n * @hidden\n */\n Page.prototype.setPageSize = function (pageSize) {\n this.pagerObj.setPageSize(pageSize);\n };\n /**\n * The function used to update pageSettings model\n * @return {void}\n * @hidden\n */\n Page.prototype.updateModel = function (e) {\n this.parent.pageSettings.totalRecordsCount = e.count;\n this.parent.dataBind();\n };\n /**\n * The function used to trigger onActionComplete\n * @return {void}\n * @hidden\n */\n Page.prototype.onActionComplete = function (e) {\n if (isBlazor() && !this.parent.isJsComponent) {\n e.rows = null;\n }\n this.parent.trigger(events.actionComplete, extend(e, {\n currentPage: this.parent.pageSettings.currentPage, requestType: 'paging',\n type: events.actionComplete\n }));\n };\n /**\n * @hidden\n */\n Page.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n var newProp = e.properties;\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n this.pagerObj[prop] = newProp[prop];\n }\n this.pagerObj.dataBind();\n };\n Page.prototype.clickHandler = function (e) {\n var gObj = this.parent;\n if (this.isForceCancel || isActionPrevent(gObj) && !gObj.prevPageMoving) {\n if (!this.isForceCancel) {\n if (!isNullOrUndefined(e.newProp) && !isNullOrUndefined(e.newProp.pageSize)) {\n gObj.notify(events.preventBatch, { instance: this, handler: this.setPageSize, arg1: e.newProp.pageSize });\n this.pagerObj.pageSize = e.oldProp.pageSize;\n gObj.pageSettings.pageSize = e.newProp.pageSize;\n }\n else if (e.currentPage) {\n gObj.notify(events.preventBatch, { instance: this, handler: this.goToPage, arg1: e.currentPage });\n this.pagerObj.currentPage = gObj.pageSettings.currentPage === this.pagerObj.currentPage ?\n this.pagerObj.previousPageNo : gObj.pageSettings.currentPage;\n }\n this.isForceCancel = true;\n this.pagerObj.dataBind();\n }\n else {\n this.isForceCancel = false;\n }\n e.cancel = true;\n return;\n }\n gObj.pageSettings.pageSize = this.pagerObj.pageSize;\n gObj.prevPageMoving = false;\n var prevPage = this.pageSettings.currentPage;\n this.pageSettings.currentPage = e.currentPage;\n var args = {\n cancel: false, requestType: 'paging', previousPage: prevPage,\n currentPage: e.currentPage, type: events.actionBegin\n };\n this.parent.notify(events.modelChanged, args);\n if (args.cancel) {\n e.cancel = true;\n }\n this.parent.requestTypeAction = 'paging';\n };\n Page.prototype.keyPressHandler = function (e) {\n if (e.action in keyActions) {\n e.preventDefault();\n this.element.querySelector(keyActions[e.action]).click();\n }\n };\n /**\n * Defines the text of the external message.\n * @param {string} message - Defines the message to update.\n * @return {void}\n */\n Page.prototype.updateExternalMessage = function (message) {\n if (!this.pagerObj.enableExternalMessage) {\n this.pagerObj.enableExternalMessage = true;\n this.pagerObj.dataBind();\n }\n this.pagerObj.externalMessage = message;\n this.pagerObj.dataBind();\n };\n Page.prototype.appendToElement = function (e) {\n this.isInitialLoad = true;\n this.parent.element.appendChild(this.element);\n this.parent.setGridPager(this.element);\n this.pagerObj.isReact = this.parent.isReact;\n this.pagerObj.appendTo(this.element);\n this.isInitialLoad = false;\n };\n Page.prototype.enableAfterRender = function (e) {\n if (e.module === this.getModuleName() && e.enable) {\n this.render();\n this.appendToElement();\n if (this.isReactTemplate()) {\n this.pagerObj.updateTotalPages();\n this.created();\n }\n }\n };\n /**\n * @hidden\n */\n Page.prototype.addEventListener = function () {\n this.handlers = {\n load: this.render,\n end: this.appendToElement,\n ready: this.dataReady,\n complete: this.onActionComplete,\n updateLayout: this.enableAfterRender,\n inboundChange: this.onPropertyChanged,\n keyPress: this.keyPressHandler,\n created: this.created\n };\n if (this.parent.isDestroyed) {\n return;\n }\n if (this.parent.isReact) {\n this.parent.addEventListener('created', this.handlers.created.bind(this));\n }\n this.parent.on(events.initialLoad, this.handlers.load, this);\n this.parent.on(events.initialEnd, this.handlers.end, this); //For initial rendering\n this.parent.on(events.dataReady, this.handlers.ready, this);\n this.parent.on(events.pageComplete, this.handlers.complete, this);\n this.parent.on(events.uiUpdate, this.handlers.updateLayout, this);\n this.parent.on(events.inBoundModelChanged, this.handlers.inboundChange, this);\n this.parent.on(events.keyPressed, this.handlers.keyPress, this);\n };\n Page.prototype.created = function () {\n if (this.isInitialRender && this.isReactTemplate()) {\n this.isInitialRender = false;\n this.renderReactPagerTemplate();\n }\n };\n Page.prototype.isReactTemplate = function () {\n return this.parent.isReact && this.pagerObj.template && typeof (this.pagerObj.template) !== 'string';\n };\n Page.prototype.renderReactPagerTemplate = function () {\n if (!this.isInitialRender && this.isReactTemplate()) {\n this.parent.destroyTemplate(['pagerTemplate']);\n this.element.classList.add('e-pagertemplate');\n this.pagerObj.compile(this.pagerObj.template);\n var page = this.parent.pageSettings;\n var data = {\n currentPage: page.currentPage, pageSize: page.pageSize, pageCount: page.pageCount,\n totalRecordsCount: page.totalRecordsCount, totalPages: this.pagerObj.totalPages\n };\n var tempId = this.parent.id + '_pagertemplate';\n this.pagerObj.templateFn(data, this.parent, 'pagerTemplate', tempId, null, null, this.pagerObj.element);\n this.parent.renderTemplates();\n }\n };\n /**\n * @hidden\n */\n Page.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n if (this.parent.isReact) {\n this.parent.removeEventListener('created', this.handlers.created);\n }\n this.parent.off('pager-refresh', this.renderReactPagerTemplate);\n this.parent.off(events.initialLoad, this.handlers.load);\n this.parent.off(events.initialEnd, this.handlers.end); //For initial rendering\n this.parent.off(events.dataReady, this.handlers.ready);\n this.parent.off(events.pageComplete, this.handlers.complete);\n this.parent.off(events.uiUpdate, this.handlers.updateLayout);\n this.parent.off(events.inBoundModelChanged, this.handlers.inboundChange);\n this.parent.off(events.keyPressed, this.handlers.keyPress);\n };\n /**\n * To destroy the pager\n * @return {void}\n * @hidden\n */\n Page.prototype.destroy = function () {\n this.removeEventListener();\n if (this.isReactTemplate()) {\n this.parent.destroyTemplate(['pagerTemplate']);\n }\n this.pagerObj.destroy();\n };\n Page.prototype.pagerDestroy = function () {\n if (this.pagerObj && !this.pagerObj.isDestroyed) {\n this.pagerObj.destroy();\n remove(this.element);\n }\n };\n return Page;\n}());\nexport { Page };\n/**\n * @hidden\n */\nvar keyActions = {\n pageUp: '.e-prev',\n pageDown: '.e-next',\n ctrlAltPageDown: '.e-last',\n ctrlAltPageUp: '.e-first',\n altPageUp: '.e-pp',\n altPageDown: '.e-np'\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { Browser, EventHandler, createElement, isBlazor } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, isUndefined, addClass, removeClass } from '@syncfusion/ej2-base';\nimport { remove, closest, select } from '@syncfusion/ej2-base';\nimport { Query } from '@syncfusion/ej2-data';\nimport { setCssInGridPopUp, getPosition, isGroupAdaptive, addRemoveActiveClasses, removeAddCboxClasses } from '../base/util';\nimport { getCellsByTableName, getCellByColAndRowIndex, parentsUntil, gridActionHandler } from '../base/util';\nimport * as events from '../base/constant';\nimport { RenderType } from '../base/enum';\nimport { iterateExtend, setChecked } from '../base/util';\n/**\n * The `Selection` module is used to handle cell and row selection.\n */\nvar Selection = /** @class */ (function () {\n /**\n * Constructor for the Grid selection module\n * @hidden\n */\n function Selection(parent, selectionSettings, locator) {\n //Internal letiables \n /**\n * @hidden\n */\n this.selectedRowIndexes = [];\n /**\n * @hidden\n */\n this.selectedRowCellIndexes = [];\n /**\n * @hidden\n */\n this.selectedRecords = [];\n /**\n * @hidden\n */\n this.preventFocus = false;\n /**\n * @hidden\n */\n this.selectedColumnsIndexes = [];\n this.checkBoxState = false;\n this.isMultiShiftRequest = false;\n this.isMultiCtrlRequest = false;\n this.enableSelectMultiTouch = false;\n this.clearRowCheck = false;\n this.selectRowCheck = false;\n this.selectedRowState = {};\n this.totalRecordsCount = 0;\n this.chkAllCollec = [];\n this.isCheckedOnAdd = false;\n this.persistSelectedData = [];\n this.needColumnSelection = false;\n this.isCancelDeSelect = false;\n this.isPreventCellSelect = false;\n this.disableUI = false;\n this.isPersisted = false;\n this.cmdKeyPressed = false;\n this.cellselected = false;\n this.isMultiSelection = false;\n this.isAddRowsToSelection = false;\n this.initialRowSelection = false;\n this.isPrevRowSelection = false;\n /**\n * @hidden\n */\n this.autoFillRLselection = true;\n this.parent = parent;\n this.selectionSettings = selectionSettings;\n this.factory = locator.getService('rendererFactory');\n this.focus = locator.getService('focus');\n this.addEventListener();\n this.wireEvents();\n }\n Selection.prototype.initializeSelection = function () {\n this.parent.log('selection_key_missing');\n this.render();\n };\n /**\n * The function used to trigger onActionBegin\n * @return {void}\n * @hidden\n */\n Selection.prototype.onActionBegin = function (args, type) {\n this.parent.trigger(type, this.fDataUpdate(args));\n };\n Selection.prototype.fDataUpdate = function (args) {\n if (!this.isMultiSelection && (!isNullOrUndefined(args.cellIndex) || !isNullOrUndefined(args.rowIndex))) {\n var rowObj = this.getRowObj(isNullOrUndefined(args.rowIndex) ? isNullOrUndefined(args.cellIndex) ?\n this.currentIndex : args.cellIndex.rowIndex : args.rowIndex);\n args.foreignKeyData = rowObj.foreignKeyData;\n }\n return args;\n };\n /**\n * The function used to trigger onActionComplete\n * @return {void}\n * @hidden\n */\n Selection.prototype.onActionComplete = function (args, type) {\n this.parent.trigger(type, this.fDataUpdate(args));\n this.isMultiSelection = false;\n };\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Selection.prototype.getModuleName = function () {\n return 'selection';\n };\n /**\n * To destroy the selection\n * @return {void}\n * @hidden\n */\n Selection.prototype.destroy = function () {\n var gridElement = this.parent.element;\n if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {\n return;\n }\n this.hidePopUp();\n this.clearSelection();\n this.removeEventListener();\n this.unWireEvents();\n EventHandler.remove(this.parent.getContent(), 'mousedown', this.mouseDownHandler);\n EventHandler.remove(this.parent.getHeaderContent(), 'mousedown', this.mouseDownHandler);\n };\n Selection.prototype.isEditing = function () {\n return (this.parent.editSettings.mode === 'Normal' || (this.parent.editSettings.mode === 'Batch' && this.parent.editModule &&\n this.parent.editModule.formObj && !this.parent.editModule.formObj.validate())) &&\n this.parent.isEdit && !this.parent.isPersistSelection;\n };\n Selection.prototype.getSelectedMovableRow = function (index) {\n var gObj = this.parent;\n if (gObj.isFrozenGrid() && this.parent.getContent().querySelector('.e-movablecontent')) {\n return gObj.getMovableRowByIndex(index);\n }\n return null;\n };\n Selection.prototype.getSelectedFrozenRightRow = function (index) {\n var gObj = this.parent;\n if (gObj.isFrozenGrid() && gObj.getFrozenMode() === 'Left-Right' && gObj.getFrozenRightContent()) {\n return gObj.getFrozenRightRowByIndex(index);\n }\n return null;\n };\n Selection.prototype.getCurrentBatchRecordChanges = function () {\n var gObj = this.parent;\n var added = 'addedRecords';\n var deleted = 'deletedRecords';\n if (gObj.editSettings.mode === 'Batch' && gObj.editModule) {\n var currentRecords = iterateExtend(this.parent.getCurrentViewRecords());\n currentRecords = gObj.editSettings.newRowPosition === 'Bottom' ?\n currentRecords.concat(this.parent.editModule.getBatchChanges()[added]) :\n this.parent.editModule.getBatchChanges()[added].concat(currentRecords);\n var deletedRecords = this.parent.editModule.getBatchChanges()[deleted];\n var primaryKey = this.parent.getPrimaryKeyFieldNames()[0];\n for (var i = 0; i < (deletedRecords.length); i++) {\n for (var j = 0; j < currentRecords.length; j++) {\n if (deletedRecords[i][primaryKey] === currentRecords[j][primaryKey]) {\n currentRecords.splice(j, 1);\n break;\n }\n }\n }\n return currentRecords;\n }\n else {\n return gObj.getCurrentViewRecords();\n }\n };\n /**\n * Selects a row by the given index.\n * @param {number} index - Defines the row index.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n * @return {void}\n */\n Selection.prototype.selectRow = function (index, isToggle) {\n if (this.selectedRowIndexes.length && this.selectionSettings.enableSimpleMultiRowSelection) {\n this.addRowsToSelection([index]);\n return;\n }\n var gObj = this.parent;\n var selectedRow = gObj.getRowByIndex(index);\n var selectedMovableRow = this.getSelectedMovableRow(index);\n var selectedFrozenRightRow = this.getSelectedFrozenRightRow(index);\n var selectData;\n var isRemoved = false;\n if (gObj.enableVirtualization && index > -1) {\n this.parent.notify(events.selectVirtualRow, { selectedIndex: index });\n var frozenData = gObj.isFrozenGrid() ? gObj.contentModule.getRowObjectByIndex(index)\n : null;\n if (selectedRow && (gObj.getRowObjectFromUID(selectedRow.getAttribute('data-uid')) || frozenData)) {\n selectData = frozenData ? frozenData : gObj.getRowObjectFromUID(selectedRow.getAttribute('data-uid')).data;\n }\n else {\n var prevSelectedData = this.parent.getSelectedRecords();\n if (prevSelectedData.length > 0) {\n this.clearRowSelection();\n }\n return;\n }\n }\n else {\n selectData = this.getCurrentBatchRecordChanges()[index];\n }\n if (!this.isRowType() || !selectedRow || this.isEditing()) {\n // if (this.isEditing()) {\n // gObj.selectedRowIndex = index;\n // }\n return;\n }\n var isRowSelected = selectedRow.hasAttribute('aria-selected');\n this.activeTarget();\n isToggle = !isToggle ? isToggle :\n !this.selectedRowIndexes.length ? false :\n (this.selectedRowIndexes.length === 1 ? (index === this.selectedRowIndexes[0]) : false);\n var args;\n var can = 'cancel';\n if (!isToggle) {\n var isHybrid = 'isHybrid';\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n args = {\n data: selectData, rowIndex: index, isCtrlPressed: this.isMultiCtrlRequest,\n isShiftPressed: this.isMultiShiftRequest, row: selectedRow,\n previousRow: gObj.getRowByIndex(this.prevRowIndex),\n previousRowIndex: this.prevRowIndex, target: this.actualTarget, cancel: false, isInteracted: this.isInteracted,\n isHeaderCheckboxClicked: this.isHeaderCheckboxClicked\n };\n args = this.addMovableArgs(args, selectedMovableRow, selectedFrozenRightRow);\n }\n else {\n args = {\n data: selectData, rowIndex: index, isCtrlPressed: this.isMultiCtrlRequest,\n isShiftPressed: this.isMultiShiftRequest, previousRowIndex: this.prevRowIndex,\n cancel: false, isInteracted: this.isInteracted, isHeaderCheckboxClicked: this.isHeaderCheckboxClicked\n };\n }\n this.parent.trigger(events.rowSelecting, this.fDataUpdate(args), this.rowSelectingCallBack(args, isToggle, index, selectData, isRemoved, isRowSelected, can));\n }\n else {\n this.rowSelectingCallBack(args, isToggle, index, selectData, isRemoved, isRowSelected, can)(args);\n }\n };\n Selection.prototype.rowSelectingCallBack = function (args, isToggle, index, selectData, isRemoved, isRowSelected, can) {\n var _this = this;\n return function (args) {\n if (!isNullOrUndefined(args) && args[can] === true) {\n _this.disableInteracted();\n return;\n }\n _this.index = index;\n _this.toggle = isToggle;\n _this.data = selectData;\n _this.removed = isRemoved;\n if (isRowSelected && _this.selectionSettings.persistSelection && !(_this.selectionSettings.checkboxMode === 'ResetOnRowClick')) {\n _this.clearSelectedRow(index);\n _this.selectRowCallBack();\n }\n else if (!isRowSelected && _this.selectionSettings.persistSelection &&\n _this.selectionSettings.checkboxMode !== 'ResetOnRowClick') {\n _this.selectRowCallBack();\n }\n if (_this.selectionSettings.checkboxMode === 'ResetOnRowClick') {\n _this.clearSelection();\n }\n if (!_this.selectionSettings.persistSelection || _this.selectionSettings.checkboxMode === 'ResetOnRowClick' ||\n (!_this.parent.isCheckBoxSelection && _this.selectionSettings.persistSelection)) {\n _this.selectRowCheck = true;\n _this.clearRow();\n }\n };\n };\n Selection.prototype.selectRowCallBack = function () {\n var gObj = this.parent;\n var args;\n var index = this.index;\n var isToggle = this.toggle;\n var selectData = this.data;\n var isRemoved = this.removed;\n var selectedRow = gObj.getRowByIndex(index);\n var selectedMovableRow = this.getSelectedMovableRow(index);\n var selectedFrozenRightRow = this.getSelectedFrozenRightRow(index);\n if (!isToggle && !isRemoved) {\n if (this.selectedRowIndexes.indexOf(index) <= -1) {\n this.updateRowSelection(selectedRow, index);\n this.selectMovableRow(selectedMovableRow, selectedFrozenRightRow, index);\n }\n this.selectRowIndex(index);\n }\n if (!isToggle) {\n var isHybrid = 'isHybrid';\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n args = {\n data: selectData, rowIndex: index,\n row: selectedRow, previousRow: gObj.getRowByIndex(this.prevRowIndex),\n previousRowIndex: this.prevRowIndex, target: this.actualTarget, isInteracted: this.isInteracted,\n isHeaderCheckBoxClicked: this.isHeaderCheckboxClicked\n };\n args = this.addMovableArgs(args, selectedMovableRow, selectedFrozenRightRow);\n }\n else {\n args = {\n data: selectData, rowIndex: index,\n row: selectedRow, previousRow: gObj.getRowByIndex(this.prevRowIndex),\n previousRowIndex: this.prevRowIndex, isInteracted: this.isInteracted,\n isHeaderCheckBoxClicked: this.isHeaderCheckboxClicked\n };\n }\n this.onActionComplete(args, events.rowSelected);\n }\n if (isBlazor() && this.parent.isServerRendered && this.parent.enableVirtualization) {\n var interopAdaptor = 'interopAdaptor';\n var invokeMethodAsync = 'invokeMethodAsync';\n this.parent[interopAdaptor][invokeMethodAsync]('MaintainSelection', true, 'normal', [index]);\n }\n this.isInteracted = false;\n this.updateRowProps(index);\n };\n Selection.prototype.selectMovableRow = function (selectedMovableRow, selectedFrozenRightRow, index) {\n if (this.parent.isFrozenGrid()) {\n this.updateRowSelection(selectedMovableRow, index);\n if (this.parent.getFrozenMode() === 'Left-Right' && selectedFrozenRightRow) {\n this.updateRowSelection(selectedFrozenRightRow, index);\n }\n }\n };\n Selection.prototype.addMovableArgs = function (targetObj, mRow, frRow) {\n if (this.parent.isFrozenGrid()) {\n var mObj = { mRow: mRow, previousMovRow: this.parent.getMovableRows()[this.prevRowIndex] };\n var frozenRightRow = 'frozenRightRow';\n var previousFrozenRightRow = 'previousFrozenRightRow';\n if (this.parent.getFrozenMode() === 'Left-Right' && frRow) {\n mObj[frozenRightRow] = frRow;\n mObj[previousFrozenRightRow] = this.parent.getFrozenRightDataRows()[this.prevRowIndex];\n }\n targetObj = __assign({}, targetObj, mObj);\n }\n return targetObj;\n };\n /**\n * Selects a range of rows from start and end row indexes.\n * @param {number} startIndex - Specifies the start row index.\n * @param {number} endIndex - Specifies the end row index.\n * @return {void}\n */\n Selection.prototype.selectRowsByRange = function (startIndex, endIndex) {\n this.selectRows(this.getCollectionFromIndexes(startIndex, endIndex));\n this.selectRowIndex(endIndex);\n };\n /**\n * Selects a collection of rows by index.\n * @param {number[]} rowIndexes - Specifies an array of row indexes.\n * @return {void}\n */\n Selection.prototype.selectRows = function (rowIndexes) {\n var _this = this;\n var gObj = this.parent;\n var rowIndex = !this.isSingleSel() ? rowIndexes[0] : rowIndexes[rowIndexes.length - 1];\n this.isMultiSelection = true;\n var selectedRows = [];\n var foreignKeyData = [];\n var selectedMovableRow = this.getSelectedMovableRow(rowIndex);\n var selectedFrozenRightRow = this.getSelectedFrozenRightRow(rowIndex);\n var can = 'cancel';\n var selectedData = [];\n if (!this.isRowType() || this.isEditing()) {\n return;\n }\n for (var i = 0, len = rowIndexes.length; i < len; i++) {\n var currentRow = this.parent.getDataRows()[rowIndexes[i]];\n var rowObj = this.getRowObj(currentRow);\n if (rowObj) {\n selectedData.push(rowObj.data);\n selectedRows.push(currentRow);\n foreignKeyData.push(rowObj.foreignKeyData);\n }\n }\n var isHybrid = 'isHybrid';\n this.activeTarget();\n var args;\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n args = {\n cancel: false,\n rowIndexes: rowIndexes, row: selectedRows, rowIndex: rowIndex, target: this.actualTarget,\n prevRow: gObj.getRows()[this.prevRowIndex], previousRowIndex: this.prevRowIndex,\n isInteracted: this.isInteracted, isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n data: selectedData, isHeaderCheckboxClicked: this.isHeaderCheckboxClicked, foreignKeyData: foreignKeyData\n };\n args = this.addMovableArgs(args, selectedMovableRow, selectedFrozenRightRow);\n }\n else {\n args = {\n cancel: false,\n rowIndexes: rowIndexes, rowIndex: rowIndex, previousRowIndex: this.prevRowIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n data: selectedData, isHeaderCheckboxClicked: this.isHeaderCheckboxClicked, foreignKeyData: foreignKeyData\n };\n }\n this.parent.trigger(events.rowSelecting, this.fDataUpdate(args), function (args) {\n if (!isNullOrUndefined(args) && args[can] === true) {\n _this.disableInteracted();\n return;\n }\n _this.clearRow();\n _this.selectRowIndex(rowIndexes.slice(-1)[0]);\n var selectRowFn = function (index) {\n _this.updateRowSelection(gObj.getRowByIndex(index), index);\n if (gObj.isFrozenGrid()) {\n var rightEle = _this.parent.getFrozenMode() === 'Left-Right' ? gObj.getFrozenRightRowByIndex(index)\n : undefined;\n _this.selectMovableRow(gObj.getMovableRowByIndex(index), rightEle, index);\n }\n _this.updateRowProps(rowIndex);\n };\n if (!_this.isSingleSel()) {\n for (var _i = 0, rowIndexes_1 = rowIndexes; _i < rowIndexes_1.length; _i++) {\n var rowIdx = rowIndexes_1[_i];\n selectRowFn(rowIdx);\n }\n }\n else {\n selectRowFn(rowIndex);\n }\n var isHybrid = 'isHybrid';\n if (!isBlazor() || _this.parent.isJsComponent || _this.parent[isHybrid]) {\n args = {\n rowIndexes: rowIndexes, row: selectedRows, rowIndex: rowIndex, target: _this.actualTarget,\n prevRow: gObj.getRows()[_this.prevRowIndex], previousRowIndex: _this.prevRowIndex,\n data: isBlazor() ? selectedData : _this.getSelectedRecords(), isInteracted: _this.isInteracted,\n isHeaderCheckboxClicked: _this.isHeaderCheckboxClicked, foreignKeyData: foreignKeyData\n };\n args = _this.addMovableArgs(args, selectedMovableRow, selectedFrozenRightRow);\n }\n else {\n args = {\n rowIndexes: rowIndexes, rowIndex: rowIndex, previousRowIndex: _this.prevRowIndex,\n row: selectedRows, prevRow: gObj.getRows()[_this.prevRowIndex],\n data: isBlazor() ? selectedData : _this.getSelectedRecords(), isInteracted: _this.isInteracted,\n isHeaderCheckboxClicked: _this.isHeaderCheckboxClicked, foreignKeyData: foreignKeyData\n };\n }\n if (_this.isRowSelected) {\n _this.onActionComplete(args, events.rowSelected);\n }\n _this.isInteracted = false;\n });\n };\n /**\n * Select rows with existing row selection by passing row indexes.\n * @param {number} startIndex - Specifies the row indexes.\n * @return {void}\n * @hidden\n */\n // tslint:disable-next-line:max-func-body-length\n Selection.prototype.addRowsToSelection = function (rowIndexes) {\n var gObj = this.parent;\n var can = 'cancel';\n var target = this.target;\n this.isMultiSelection = true;\n var indexes = gObj.getSelectedRowIndexes().concat(rowIndexes);\n var selectedRow = !this.isSingleSel() ? gObj.getRowByIndex(rowIndexes[0]) :\n gObj.getRowByIndex(rowIndexes[rowIndexes.length - 1]);\n var selectedMovableRow = !this.isSingleSel() ? this.getSelectedMovableRow(rowIndexes[0]) :\n this.getSelectedMovableRow(rowIndexes[rowIndexes.length - 1]);\n var selectedFrozenRightRow = !this.isSingleSel() ? this.getSelectedFrozenRightRow(rowIndexes[0]) :\n this.getSelectedFrozenRightRow(rowIndexes[rowIndexes.length - 1]);\n if ((!this.isRowType() || this.isEditing()) && !this.selectionSettings.checkboxOnly) {\n return;\n }\n var args;\n var checkboxColumn = this.parent.getColumns().filter(function (col) { return col.type === 'checkbox'; });\n for (var _i = 0, rowIndexes_2 = rowIndexes; _i < rowIndexes_2.length; _i++) {\n var rowIndex = rowIndexes_2[_i];\n var rowObj = this.getRowObj(rowIndex);\n var isUnSelected = this.selectedRowIndexes.indexOf(rowIndex) > -1;\n this.selectRowIndex(rowIndex);\n if (isUnSelected && ((checkboxColumn.length ? true : this.selectionSettings.enableToggle) || this.isMultiCtrlRequest)) {\n this.isAddRowsToSelection = true;\n this.rowDeselect(events.rowDeselecting, [rowIndex], [rowObj.data], [selectedRow], [rowObj.foreignKeyData], target);\n if (this.isCancelDeSelect) {\n return;\n }\n this.selectedRowIndexes.splice(this.selectedRowIndexes.indexOf(rowIndex), 1);\n this.selectedRecords.splice(this.selectedRecords.indexOf(selectedRow), 1);\n selectedRow.removeAttribute('aria-selected');\n this.addRemoveClassesForRow(selectedRow, false, null, 'e-selectionbackground', 'e-active');\n if (selectedMovableRow) {\n this.selectedRecords.splice(this.selectedRecords.indexOf(selectedMovableRow), 1);\n selectedMovableRow.removeAttribute('aria-selected');\n this.addRemoveClassesForRow(selectedMovableRow, false, null, 'e-selectionbackground', 'e-active');\n }\n if (selectedFrozenRightRow) {\n this.selectedRecords.splice(this.selectedRecords.indexOf(selectedFrozenRightRow), 1);\n selectedFrozenRightRow.removeAttribute('aria-selected');\n this.addRemoveClassesForRow(selectedFrozenRightRow, false, null, 'e-selectionbackground', 'e-active');\n }\n this.rowDeselect(events.rowDeselected, [rowIndex], [rowObj.data], [selectedRow], [rowObj.foreignKeyData], target, [selectedMovableRow], undefined, [selectedFrozenRightRow]);\n this.isInteracted = false;\n this.isMultiSelection = false;\n this.isAddRowsToSelection = false;\n }\n else {\n var isHybrid = 'isHybrid';\n this.activeTarget();\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n args = {\n cancel: false,\n data: rowObj.data, rowIndex: rowIndex, row: selectedRow, target: this.actualTarget,\n prevRow: gObj.getRows()[this.prevRowIndex], previousRowIndex: this.prevRowIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n foreignKeyData: rowObj.foreignKeyData, isInteracted: this.isInteracted,\n isHeaderCheckboxClicked: this.isHeaderCheckboxClicked, rowIndexes: indexes\n };\n args = this.addMovableArgs(args, selectedMovableRow, selectedFrozenRightRow);\n }\n else {\n args = {\n cancel: false,\n data: rowObj.data, rowIndex: rowIndex, previousRowIndex: this.prevRowIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n foreignKeyData: rowObj.foreignKeyData, isInteracted: this.isInteracted,\n isHeaderCheckboxClicked: this.isHeaderCheckboxClicked, rowIndexes: indexes\n };\n }\n this.parent.trigger(events.rowSelecting, this.fDataUpdate(args));\n if (!isNullOrUndefined(args) && args[can] === true) {\n this.disableInteracted();\n return;\n }\n if (this.isSingleSel()) {\n this.clearRow();\n }\n this.updateRowSelection(selectedRow, rowIndex);\n this.selectMovableRow(selectedMovableRow, selectedFrozenRightRow, rowIndex);\n }\n if (!isUnSelected) {\n var isHybrid = 'isHybrid';\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n args = {\n data: rowObj.data, rowIndex: rowIndex, row: selectedRow, target: this.actualTarget,\n prevRow: gObj.getRows()[this.prevRowIndex], previousRowIndex: this.prevRowIndex,\n foreignKeyData: rowObj.foreignKeyData, isInteracted: this.isInteracted,\n isHeaderCheckboxClicked: this.isHeaderCheckboxClicked, rowIndexes: indexes\n };\n args = this.addMovableArgs(args, selectedMovableRow, selectedFrozenRightRow);\n }\n else {\n args = {\n data: rowObj.data, rowIndex: rowIndex, previousRowIndex: this.prevRowIndex,\n row: selectedRow, prevRow: gObj.getRows()[this.prevRowIndex],\n foreignKeyData: rowObj.foreignKeyData, isInteracted: this.isInteracted,\n isHeaderCheckboxClicked: this.isHeaderCheckboxClicked, rowIndexes: indexes\n };\n }\n this.onActionComplete(args, events.rowSelected);\n }\n this.isInteracted = false;\n this.updateRowProps(rowIndex);\n if (this.isSingleSel()) {\n break;\n }\n }\n };\n Selection.prototype.getCollectionFromIndexes = function (startIndex, endIndex) {\n var indexes = [];\n var _a = (startIndex <= endIndex) ?\n { i: startIndex, max: endIndex } : { i: endIndex, max: startIndex }, i = _a.i, max = _a.max;\n for (; i <= max; i++) {\n indexes.push(i);\n }\n if (startIndex > endIndex) {\n indexes.reverse();\n }\n return indexes;\n };\n Selection.prototype.clearRow = function () {\n this.clearRowCheck = true;\n this.clearRowSelection();\n };\n Selection.prototype.clearRowCallBack = function () {\n if (this.isCancelDeSelect && this.parent.checkAllRows !== 'Check') {\n return;\n }\n this.selectedRowIndexes = [];\n this.selectedRecords = [];\n this.selectRowIndex(-1);\n if (this.isSingleSel() && this.parent.isPersistSelection) {\n this.selectedRowState = {};\n }\n };\n Selection.prototype.clearSelectedRow = function (index) {\n if (this.toggle) {\n var selectedEle = this.parent.getRowByIndex(index);\n if (!this.disableUI) {\n selectedEle.removeAttribute('aria-selected');\n this.addRemoveClassesForRow(selectedEle, false, true, 'e-selectionbackground', 'e-active');\n }\n this.removed = true;\n this.updatePersistCollection(selectedEle, false);\n this.updateCheckBoxes(selectedEle);\n this.selectedRowIndexes.splice(this.selectedRowIndexes.indexOf(index), 1);\n this.selectedRecords.splice(this.selectedRecords.indexOf(this.parent.getRowByIndex(index)), 1);\n }\n };\n Selection.prototype.updateRowProps = function (startIndex) {\n this.prevRowIndex = startIndex;\n this.isRowSelected = this.selectedRowIndexes.length && true;\n };\n Selection.prototype.updatePersistCollection = function (selectedRow, chkState) {\n var _this = this;\n if ((this.parent.isPersistSelection || this.parent.selectionSettings.persistSelection &&\n this.parent.getPrimaryKeyFieldNames().length > 0) && !isNullOrUndefined(selectedRow)) {\n if (!this.parent.isPersistSelection) {\n this.ensureCheckboxFieldSelection();\n }\n var rowObj = this.getRowObj(selectedRow);\n var pKey_1 = rowObj.data ? rowObj.data[this.primaryKey] : null;\n if (pKey_1 === null) {\n return;\n }\n rowObj.isSelected = chkState;\n if (chkState) {\n this.selectedRowState[pKey_1] = chkState;\n if (!this.persistSelectedData.some(function (data) { return data[_this.primaryKey] === pKey_1; })) {\n this.persistSelectedData.push(rowObj.data);\n }\n }\n else {\n this.updatePersistDelete(pKey_1);\n }\n }\n };\n Selection.prototype.updatePersistDelete = function (pKey) {\n var _this = this;\n delete (this.selectedRowState[pKey]);\n var index;\n var isPresent = this.persistSelectedData.some(function (data, i) {\n index = i;\n return data[_this.primaryKey] === pKey;\n });\n if (isPresent) {\n this.persistSelectedData.splice(index, 1);\n }\n };\n Selection.prototype.updateCheckBoxes = function (row, chkState, rowIndex) {\n if (!isNullOrUndefined(row)) {\n var chkBox = row.querySelector('.e-checkselect');\n if (!isNullOrUndefined(chkBox)) {\n removeAddCboxClasses(chkBox.nextElementSibling, chkState);\n setChecked(chkBox, chkState);\n if (isNullOrUndefined(this.checkedTarget) || (!isNullOrUndefined(this.checkedTarget)\n && !this.checkedTarget.classList.contains('e-checkselectall'))) {\n this.setCheckAllState(rowIndex);\n }\n }\n }\n };\n Selection.prototype.updateRowSelection = function (selectedRow, startIndex) {\n if (!selectedRow) {\n return;\n }\n this.selectedRowIndexes.push(startIndex);\n var len = this.selectedRowIndexes.length;\n if (this.parent.isFrozenGrid() && len > 1) {\n if ((this.selectedRowIndexes[len - 2] === this.selectedRowIndexes[len - 1])) {\n this.selectedRowIndexes.pop();\n }\n }\n this.selectedRecords.push(selectedRow);\n selectedRow.setAttribute('aria-selected', 'true');\n this.updatePersistCollection(selectedRow, true);\n this.updateCheckBoxes(selectedRow, true);\n this.addRemoveClassesForRow(selectedRow, true, null, 'e-selectionbackground', 'e-active');\n if (!this.preventFocus) {\n var target = this.focus.getPrevIndexes().cellIndex ?\n selectedRow.cells[this.focus.getPrevIndexes().cellIndex] :\n selectedRow.querySelector('.e-selectionbackground:not(.e-hide):not(.e-detailrowcollapse):not(.e-detailrowexpand)');\n if (this.parent.contextMenuModule && this.mouseButton === 2) {\n target = this.parent.contextMenuModule.cell;\n }\n if (!target) {\n return;\n }\n this.focus.onClick({ target: target }, true);\n }\n };\n /**\n * Deselects the currently selected rows and cells.\n * @return {void}\n */\n Selection.prototype.clearSelection = function () {\n if (!this.parent.isPersistSelection || (this.parent.isPersistSelection && !this.parent.isEdit) ||\n (!isNullOrUndefined(this.checkedTarget) && this.checkedTarget.classList.contains('e-checkselectall'))) {\n var span = this.parent.element.querySelector('.e-gridpopup').querySelector('span');\n if (span.classList.contains('e-rowselect')) {\n span.classList.remove('e-spanclicked');\n }\n if (this.parent.isPersistSelection) {\n this.persistSelectedData = [];\n this.selectedRowState = {};\n }\n this.clearRowSelection();\n this.clearCellSelection();\n this.clearColumnSelection();\n this.prevRowIndex = undefined;\n this.enableSelectMultiTouch = false;\n this.isInteracted = false;\n }\n };\n /**\n * Deselects the currently selected rows.\n * @return {void}\n */\n // tslint:disable-next-line:max-func-body-length\n Selection.prototype.clearRowSelection = function () {\n var _this = this;\n if (this.isRowSelected) {\n var gObj = this.parent;\n var rows_1 = this.parent.getDataRows();\n var data_1 = [];\n var row_1 = [];\n var mRow_1 = [];\n var fRightRow_1 = [];\n var rowIndex_1 = [];\n var foreignKeyData_1 = [];\n var target_1 = this.target;\n var currentViewData = this.parent.getCurrentViewRecords();\n for (var i = 0, len = this.selectedRowIndexes.length; i < len; i++) {\n var currentRow = this.parent.editSettings.mode === 'Batch' ?\n this.parent.getRows()[this.selectedRowIndexes[i]]\n : this.parent.getDataRows()[this.selectedRowIndexes[i]];\n var rowObj = this.getRowObj(currentRow);\n if (rowObj) {\n data_1.push(rowObj.data);\n row_1.push(currentRow);\n rowIndex_1.push(this.selectedRowIndexes[i]);\n foreignKeyData_1.push(rowObj.foreignKeyData);\n }\n if (gObj.isFrozenGrid()) {\n mRow_1.push(gObj.getMovableRows()[this.selectedRowIndexes[i]]);\n if (gObj.getFrozenMode() === 'Left-Right') {\n fRightRow_1.push(gObj.getFrozenRightRows()[this.selectedRowIndexes[i]]);\n }\n }\n }\n if (this.selectionSettings.persistSelection && this.selectionSettings.checkboxMode !== 'ResetOnRowClick') {\n this.isRowClicked = this.checkSelectAllClicked ? true : false;\n }\n this.rowDeselect(events.rowDeselecting, rowIndex_1, data_1, row_1, foreignKeyData_1, target_1, mRow_1, function () {\n if (_this.isCancelDeSelect && (_this.isRowClicked || _this.checkSelectAllClicked || (_this.isInteracted &&\n !_this.parent.isPersistSelection))) {\n if (_this.parent.isPersistSelection) {\n if (_this.getCheckAllStatus(_this.parent.element.querySelector('.e-checkselectall')) === 'Intermediate') {\n for (var i = 0; i < _this.selectedRecords.length; i++) {\n _this.updatePersistCollection(_this.selectedRecords[i], true);\n }\n }\n else {\n _this.parent.checkAllRows = 'Check';\n _this.updatePersistSelectedData(true);\n }\n }\n if (_this.clearRowCheck) {\n _this.clearRowCallBack();\n _this.clearRowCheck = false;\n if (_this.selectRowCheck) {\n _this.selectRowCallBack();\n _this.selectRowCheck = false;\n }\n }\n return;\n }\n var element = [].slice.call(rows_1.filter(function (record) { return record.hasAttribute('aria-selected'); }));\n for (var j = 0; j < element.length; j++) {\n if (!_this.disableUI || isBlazor()) {\n element[j].removeAttribute('aria-selected');\n _this.addRemoveClassesForRow(element[j], false, true, 'e-selectionbackground', 'e-active');\n }\n // tslint:disable-next-line:align\n if (!_this.isPrevRowSelection) {\n _this.updatePersistCollection(element[j], false);\n }\n _this.updateCheckBoxes(element[j]);\n }\n if (isBlazor() && _this.parent.isServerRendered && _this.parent.enableVirtualization) {\n _this.getRenderer().setSelection(null, false, true);\n }\n for (var i = 0, len = _this.selectedRowIndexes.length; i < len; i++) {\n var movableRow = _this.getSelectedMovableRow(_this.selectedRowIndexes[i]);\n if (movableRow) {\n if (!_this.disableUI || isBlazor()) {\n movableRow.removeAttribute('aria-selected');\n _this.addRemoveClassesForRow(movableRow, false, true, 'e-selectionbackground', 'e-active');\n }\n _this.updateCheckBoxes(movableRow);\n if (!_this.isPrevRowSelection) {\n _this.updatePersistCollection(movableRow, false);\n }\n }\n var frRow = _this.getSelectedFrozenRightRow(_this.selectedRowIndexes[i]);\n if (frRow) {\n if (!_this.disableUI) {\n frRow.removeAttribute('aria-selected');\n _this.addRemoveClassesForRow(frRow, false, true, 'e-selectionbackground', 'e-active');\n }\n _this.updateCheckBoxes(frRow);\n if (!_this.isPrevRowSelection) {\n _this.updatePersistCollection(frRow, false);\n }\n }\n }\n _this.selectedRowIndexes = [];\n _this.selectedRecords = [];\n _this.isRowSelected = false;\n _this.selectRowIndex(-1);\n _this.isPrevRowSelection = false;\n _this.rowDeselect(events.rowDeselected, rowIndex_1, data_1, row_1, foreignKeyData_1, target_1, mRow_1, undefined, fRightRow_1);\n if (_this.clearRowCheck) {\n _this.clearRowCallBack();\n _this.clearRowCheck = false;\n if (_this.selectRowCheck) {\n _this.selectRowCallBack();\n _this.selectRowCheck = false;\n }\n }\n }, fRightRow_1);\n }\n else {\n if (this.clearRowCheck) {\n this.clearRowCallBack();\n this.clearRowCheck = false;\n if (this.selectRowCheck) {\n this.selectRowCallBack();\n this.selectRowCheck = false;\n }\n }\n }\n };\n Selection.prototype.rowDeselect = function (type, rowIndex, data, row, foreignKeyData, target, mRow, rowDeselectCallBack, frozenRightRow) {\n var _this = this;\n if ((this.selectionSettings.persistSelection && (this.isRowClicked || this.checkSelectAllClicked)) ||\n !this.selectionSettings.persistSelection) {\n var cancl_1 = 'cancel';\n var rowDeselectObj = {\n rowIndex: rowIndex[0], data: this.selectionSettings.persistSelection && this.parent.checkAllRows === 'Uncheck'\n && this.selectionSettings.checkboxMode !== 'ResetOnRowClick' ?\n this.persistSelectedData : data, foreignKeyData: foreignKeyData,\n cancel: false, isInteracted: this.isInteracted, isHeaderCheckboxClicked: this.isHeaderCheckboxClicked\n };\n if (type === 'rowDeselected') {\n delete rowDeselectObj.cancel;\n }\n var isHybrid = 'isHybrid';\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n var rowInString = 'row';\n var target_2 = 'target';\n var rowidx = 'rowIndex';\n var rowidxex = 'rowIndexes';\n var data_2 = 'data';\n var foreignKey = 'foreignKeyData';\n rowDeselectObj[rowInString] = row;\n rowDeselectObj[target_2] = this.actualTarget;\n var isHeaderCheckBxClick = this.actualTarget && !isNullOrUndefined(closest(this.actualTarget, 'thead'));\n if (isHeaderCheckBxClick || rowIndex.length > 1) {\n rowDeselectObj[rowidx] = rowIndex[0];\n rowDeselectObj[rowidxex] = rowIndex;\n }\n else if (rowIndex.length === 1) {\n rowDeselectObj[data_2] = rowDeselectObj[data_2][0];\n rowDeselectObj[rowInString] = rowDeselectObj[rowInString][0];\n rowDeselectObj[foreignKey] = rowDeselectObj[foreignKey][0];\n if (this.isAddRowsToSelection) {\n rowDeselectObj[rowidxex] = rowIndex;\n }\n }\n }\n else {\n var rowIndex_2 = 'rowIndex';\n var data_3 = 'data';\n rowDeselectObj[rowIndex_2] = rowDeselectObj[rowIndex_2][rowDeselectObj[rowIndex_2].length - 1];\n rowDeselectObj[data_3] = rowDeselectObj[data_3][rowDeselectObj[data_3].length - 1];\n }\n this.parent.trigger(type, (!isBlazor() || this.parent.isJsComponent) && this.parent.isFrozenGrid() ? __assign({}, rowDeselectObj, { mRow: mRow, frozenRightRow: frozenRightRow }) : rowDeselectObj, function (args) {\n _this.isCancelDeSelect = args[cancl_1];\n if (!_this.isCancelDeSelect || (!_this.isRowClicked && !_this.isInteracted && !_this.checkSelectAllClicked)) {\n _this.updatePersistCollection(row[0], false);\n _this.updateCheckBoxes(row[0], undefined, rowIndex[0]);\n if (mRow) {\n _this.updateCheckBoxes(mRow[0], undefined, rowIndex[0]);\n }\n if (frozenRightRow) {\n _this.updateCheckBoxes(frozenRightRow[0], undefined, rowIndex[0]);\n }\n }\n if (rowDeselectCallBack !== undefined) {\n rowDeselectCallBack();\n }\n });\n }\n else if (this.selectionSettings.persistSelection && !this.isInteracted) {\n if (rowDeselectCallBack !== undefined) {\n rowDeselectCallBack();\n }\n }\n };\n Selection.prototype.getRowObj = function (row) {\n if (row === void 0) { row = this.currentIndex; }\n if (isNullOrUndefined(row)) {\n return {};\n }\n if (typeof row === 'number') {\n row = this.parent.getRowByIndex(row);\n }\n if (row) {\n return this.parent.getRowObjectFromUID(row.getAttribute('data-uid')) || {};\n }\n return {};\n };\n Selection.prototype.getSelectedMovableCell = function (cellIndex) {\n var gObj = this.parent;\n var col = gObj.getColumnByIndex(cellIndex.cellIndex);\n var frzCols = gObj.isFrozenGrid();\n if (frzCols) {\n if (col.getFreezeTableName() === 'movable') {\n return gObj.getMovableCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex));\n }\n return null;\n }\n return null;\n };\n /**\n * Selects a cell by the given index.\n * @param {IIndex} cellIndex - Defines the row and column indexes.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n * @return {void}\n */\n Selection.prototype.selectCell = function (cellIndex, isToggle) {\n if (!this.isCellType()) {\n return;\n }\n var gObj = this.parent;\n var selectedCell = this.getSelectedMovableCell(cellIndex);\n var args;\n if (!selectedCell) {\n selectedCell = gObj.getCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex));\n }\n var selectedTable;\n var cIdx;\n this.currentIndex = cellIndex.rowIndex;\n var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];\n if (!this.isCellType() || !selectedCell || this.isEditing()) {\n return;\n }\n var isCellSelected = selectedCell.classList.contains('e-cellselectionbackground');\n isToggle = !isToggle ? isToggle : (!isUndefined(this.prevCIdxs) &&\n cellIndex.rowIndex === this.prevCIdxs.rowIndex && cellIndex.cellIndex === this.prevCIdxs.cellIndex &&\n isCellSelected);\n if (!isToggle) {\n args = {\n data: selectedData, cellIndex: cellIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n previousRowCell: this.prevECIdxs ?\n this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined,\n cancel: false\n };\n if (!isBlazor() || this.parent.isJsComponent) {\n var currentCell = 'currentCell';\n args[currentCell] = selectedCell;\n var previousRowCellIndex = 'previousRowCellIndex';\n args[previousRowCellIndex] = this.prevECIdxs;\n }\n this.parent.trigger(events.cellSelecting, this.fDataUpdate(args), this.successCallBack(args, isToggle, cellIndex, selectedCell, selectedData));\n this.cellselected = true;\n }\n else {\n this.successCallBack(args, isToggle, cellIndex, selectedCell, selectedData)(args);\n }\n };\n Selection.prototype.successCallBack = function (cellSelectingArgs, isToggle, cellIndex, selectedCell, selectedData) {\n var _this = this;\n return function (cellSelectingArgs) {\n var cncl = 'cancel';\n var currentCell = 'currentCell';\n if (!isNullOrUndefined(cellSelectingArgs) && cellSelectingArgs[cncl] === true) {\n return;\n }\n if (!isToggle) {\n cellSelectingArgs[currentCell] = cellSelectingArgs[currentCell] ? cellSelectingArgs[currentCell] : selectedCell;\n }\n _this.clearCell();\n if (!isToggle) {\n _this.updateCellSelection(selectedCell, cellIndex.rowIndex, cellIndex.cellIndex);\n }\n if (!isToggle) {\n var args = void 0;\n var isHybrid = 'isHybrid';\n if (!isBlazor() || _this.parent.isJsComponent || _this.parent[isHybrid]) {\n args = {\n data: selectedData, cellIndex: cellIndex, currentCell: selectedCell,\n selectedRowCellIndex: _this.selectedRowCellIndexes,\n previousRowCell: _this.prevECIdxs ?\n _this.getCellIndex(_this.prevECIdxs.rowIndex, _this.prevECIdxs.cellIndex) : undefined\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n args[previousRowCellIndex] = _this.prevECIdxs;\n }\n else {\n args = { data: selectedData, cellIndex: cellIndex, selectedRowCellIndex: _this.selectedRowCellIndexes };\n }\n _this.updateCellProps(cellIndex, cellIndex);\n _this.onActionComplete(args, events.cellSelected);\n }\n };\n };\n Selection.prototype.getCellIndex = function (rIdx, cIdx) {\n return (this.parent.getFrozenColumns() ? (cIdx >= this.parent.getFrozenColumns() ? this.parent.getMovableCellFromIndex(rIdx, cIdx)\n : this.parent.getCellFromIndex(rIdx, cIdx)) : this.parent.getCellFromIndex(rIdx, cIdx));\n };\n /**\n * Selects a range of cells from start and end indexes.\n * @param {IIndex} startIndex - Specifies the row and column's start index.\n * @param {IIndex} endIndex - Specifies the row and column's end index.\n * @return {void}\n */\n Selection.prototype.selectCellsByRange = function (startIndex, endIndex) {\n var _this = this;\n if (!this.isCellType()) {\n return;\n }\n var gObj = this.parent;\n var selectedCell = this.getSelectedMovableCell(startIndex);\n var frzCols = gObj.getFrozenColumns();\n if (!selectedCell) {\n selectedCell = gObj.getCellFromIndex(startIndex.rowIndex, startIndex.cellIndex);\n }\n var min;\n var max;\n var stIndex = startIndex;\n var edIndex = endIndex = endIndex ? endIndex : startIndex;\n var cellIndexes;\n this.currentIndex = startIndex.rowIndex;\n var cncl = 'cancel';\n var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];\n if (this.isSingleSel() || !this.isCellType() || this.isEditing()) {\n return;\n }\n var args = {\n data: selectedData, cellIndex: startIndex, currentCell: selectedCell,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined\n };\n if (!isBlazor()) {\n var previousRowCellIndex = 'previousRowCellIndex';\n args[previousRowCellIndex] = this.prevECIdxs;\n }\n this.parent.trigger(events.cellSelecting, this.fDataUpdate(args), function (cellSelectingArgs) {\n if (!isNullOrUndefined(cellSelectingArgs) && cellSelectingArgs[cncl] === true) {\n return;\n }\n _this.clearCell();\n if (startIndex.rowIndex > endIndex.rowIndex) {\n var temp = startIndex;\n startIndex = endIndex;\n endIndex = temp;\n }\n for (var i = startIndex.rowIndex; i <= endIndex.rowIndex; i++) {\n if (_this.selectionSettings.cellSelectionMode.indexOf('Box') < 0) {\n min = i === startIndex.rowIndex ? (startIndex.cellIndex) : 0;\n max = i === endIndex.rowIndex ? (endIndex.cellIndex) : _this.getLastColIndex(i);\n }\n else {\n min = startIndex.cellIndex;\n max = endIndex.cellIndex;\n }\n cellIndexes = [];\n for (var j = min < max ? min : max, len = min > max ? min : max; j <= len; j++) {\n if (frzCols) {\n if (j < frzCols) {\n selectedCell = gObj.getCellFromIndex(i, j);\n }\n else {\n selectedCell = gObj.getMovableCellFromIndex(i, j);\n }\n }\n else {\n selectedCell = gObj.getCellFromIndex(i, j);\n }\n if (!selectedCell) {\n continue;\n }\n cellIndexes.push(j);\n _this.updateCellSelection(selectedCell);\n _this.addAttribute(selectedCell);\n }\n _this.selectedRowCellIndexes.push({ rowIndex: i, cellIndexes: cellIndexes });\n }\n var cellSelectedArgs;\n var isHybrid = 'isHybrid';\n if (!isBlazor() || _this.parent.isJsComponent || _this.parent[isHybrid]) {\n cellSelectedArgs = {\n data: selectedData, cellIndex: edIndex, currentCell: gObj.getCellFromIndex(edIndex.rowIndex, edIndex.cellIndex),\n selectedRowCellIndex: _this.selectedRowCellIndexes,\n previousRowCell: _this.prevECIdxs ? _this.getCellIndex(_this.prevECIdxs.rowIndex, _this.prevECIdxs.cellIndex) : undefined\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n cellSelectedArgs[previousRowCellIndex] = _this.prevECIdxs;\n }\n else {\n cellSelectedArgs = { data: selectedData, cellIndex: edIndex, selectedRowCellIndex: _this.selectedRowCellIndexes };\n }\n if (!_this.isDragged) {\n _this.onActionComplete(cellSelectedArgs, events.cellSelected);\n _this.cellselected = true;\n }\n _this.updateCellProps(stIndex, edIndex);\n });\n };\n /**\n * Selects a collection of cells by row and column indexes.\n * @param {ISelectedCell[]} rowCellIndexes - Specifies the row and column indexes.\n * @return {void}\n */\n Selection.prototype.selectCells = function (rowCellIndexes) {\n if (!this.isCellType()) {\n return;\n }\n var gObj = this.parent;\n var selectedCell = this.getSelectedMovableCell(rowCellIndexes[0]);\n var frzCols = gObj.getFrozenColumns();\n if (!selectedCell) {\n selectedCell = gObj.getCellFromIndex(rowCellIndexes[0].rowIndex, rowCellIndexes[0].cellIndexes[0]);\n }\n this.currentIndex = rowCellIndexes[0].rowIndex;\n var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];\n if (this.isSingleSel() || !this.isCellType() || this.isEditing()) {\n return;\n }\n var cellSelectArgs;\n var isHybrid = 'isHybrid';\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n cellSelectArgs = {\n data: selectedData, cellIndex: rowCellIndexes[0].cellIndexes[0],\n currentCell: selectedCell, isCtrlPressed: this.isMultiCtrlRequest,\n isShiftPressed: this.isMultiShiftRequest,\n previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n cellSelectArgs[previousRowCellIndex] = this.prevECIdxs;\n }\n else {\n cellSelectArgs = {\n data: selectedData, cellIndex: rowCellIndexes[0].cellIndexes[0],\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest\n };\n }\n this.onActionBegin(cellSelectArgs, events.cellSelecting);\n for (var i = 0, len = rowCellIndexes.length; i < len; i++) {\n for (var j = 0, cellLen = rowCellIndexes[i].cellIndexes.length; j < cellLen; j++) {\n if (frzCols) {\n if (rowCellIndexes[i].cellIndexes[j] < frzCols) {\n selectedCell = gObj.getCellFromIndex(rowCellIndexes[i].rowIndex, rowCellIndexes[i].cellIndexes[j]);\n }\n else {\n selectedCell = gObj.getMovableCellFromIndex(rowCellIndexes[i].rowIndex, rowCellIndexes[i].cellIndexes[j]);\n }\n }\n else {\n selectedCell = gObj.getCellFromIndex(rowCellIndexes[i].rowIndex, rowCellIndexes[i].cellIndexes[j]);\n }\n if (!selectedCell) {\n continue;\n }\n this.updateCellSelection(selectedCell);\n this.addAttribute(selectedCell);\n this.addRowCellIndex({ rowIndex: rowCellIndexes[i].rowIndex, cellIndex: rowCellIndexes[i].cellIndexes[j] });\n }\n }\n this.updateCellProps({ rowIndex: rowCellIndexes[0].rowIndex, cellIndex: rowCellIndexes[0].cellIndexes[0] }, { rowIndex: rowCellIndexes[0].rowIndex, cellIndex: rowCellIndexes[0].cellIndexes[0] });\n var cellSelectedArgs;\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n cellSelectedArgs = {\n data: selectedData, cellIndex: rowCellIndexes[0].cellIndexes[0],\n currentCell: selectedCell, selectedRowCellIndex: this.selectedRowCellIndexes,\n previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n cellSelectedArgs[previousRowCellIndex] = this.prevECIdxs;\n }\n else {\n cellSelectedArgs = { data: selectedData, cellIndex: rowCellIndexes[0].cellIndexes[0],\n selectedRowCellIndex: this.selectedRowCellIndexes };\n }\n this.onActionComplete(cellSelectedArgs, events.cellSelected);\n };\n /**\n * Select cells with existing cell selection by passing row and column index.\n * @param {IIndex} startIndex - Defines the collection of row and column index.\n * @return {void}\n * @hidden\n */\n // tslint:disable-next-line:max-func-body-length\n Selection.prototype.addCellsToSelection = function (cellIndexes) {\n if (!this.isCellType()) {\n return;\n }\n var gObj = this.parent;\n var selectedCell;\n var index;\n this.currentIndex = cellIndexes[0].rowIndex;\n var cncl = 'cancel';\n var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];\n var isHybrid = 'isHybrid';\n var left = gObj.getFrozenLeftCount();\n var movable = gObj.getMovableColumnsCount();\n if (this.isSingleSel() || !this.isCellType() || this.isEditing()) {\n return;\n }\n this.hideAutoFill();\n var col = gObj.getColumnByIndex(cellIndexes[0].cellIndex);\n var rowObj;\n gridActionHandler(this.parent, function (tableName, rows) {\n rowObj = rows[cellIndexes[0].rowIndex];\n }, [\n !col.getFreezeTableName() || col.getFreezeTableName() === 'frozen-left' ? gObj.getRowsObject() : [],\n col.getFreezeTableName() === 'movable' ? gObj.getMovableRowsObject() : [],\n col.getFreezeTableName() === 'frozen-right' ? gObj.getFrozenRightRowsObject() : []\n ]);\n var foreignKeyData = [];\n for (var _i = 0, cellIndexes_1 = cellIndexes; _i < cellIndexes_1.length; _i++) {\n var cellIndex = cellIndexes_1[_i];\n for (var i = 0, len = this.selectedRowCellIndexes.length; i < len; i++) {\n if (this.selectedRowCellIndexes[i].rowIndex === cellIndex.rowIndex) {\n index = i;\n break;\n }\n }\n selectedCell = this.getSelectedMovableCell(cellIndex);\n if (!selectedCell) {\n selectedCell = gObj.getCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex));\n }\n var idx = col.getFreezeTableName() === 'movable' ? cellIndex.cellIndex - left\n : col.getFreezeTableName() === 'frozen-right' ? cellIndex.cellIndex - (left + movable) : cellIndex.cellIndex;\n foreignKeyData.push(rowObj.cells[idx].foreignKeyData);\n var args = void 0;\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n args = {\n cancel: false, data: selectedData, cellIndex: cellIndexes[0],\n isShiftPressed: this.isMultiShiftRequest,\n currentCell: selectedCell, isCtrlPressed: this.isMultiCtrlRequest,\n previousRowCell: this.prevECIdxs ?\n gObj.getCellFromIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined,\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n args[previousRowCellIndex] = this.prevECIdxs;\n }\n else {\n args = {\n cancel: false, data: selectedData, cellIndex: cellIndexes[0],\n isShiftPressed: this.isMultiShiftRequest, isCtrlPressed: this.isMultiCtrlRequest\n };\n }\n var isUnSelected = index > -1;\n if (isUnSelected) {\n var selectedCellIdx = this.selectedRowCellIndexes[index].cellIndexes;\n if (selectedCellIdx.indexOf(cellIndex.cellIndex) > -1) {\n this.cellDeselect(events.cellDeselecting, [{ rowIndex: cellIndex.rowIndex, cellIndexes: [cellIndex.cellIndex] }], selectedData, [selectedCell], foreignKeyData);\n selectedCellIdx.splice(selectedCellIdx.indexOf(cellIndex.cellIndex), 1);\n if (selectedCellIdx.length === 0) {\n this.selectedRowCellIndexes.splice(index, 1);\n }\n selectedCell.classList.remove('e-cellselectionbackground');\n selectedCell.removeAttribute('aria-selected');\n this.cellDeselect(events.cellDeselected, [{ rowIndex: cellIndex.rowIndex, cellIndexes: [cellIndex.cellIndex] }], selectedData, [selectedCell], foreignKeyData);\n }\n else {\n isUnSelected = false;\n this.onActionBegin(args, events.cellSelecting);\n this.addRowCellIndex({ rowIndex: cellIndex.rowIndex, cellIndex: cellIndex.cellIndex });\n this.updateCellSelection(selectedCell);\n this.addAttribute(selectedCell);\n }\n }\n else {\n this.onActionBegin(args, events.cellSelecting);\n if (!isNullOrUndefined(args) && args[cncl] === true) {\n return;\n }\n this.updateCellSelection(selectedCell, cellIndex.rowIndex, cellIndex.cellIndex);\n }\n if (!isUnSelected) {\n var cellSelectedArgs = void 0;\n if (!isBlazor() || this.parent.isJsComponent || this.parent[isHybrid]) {\n cellSelectedArgs = {\n data: selectedData, cellIndex: cellIndexes[0], currentCell: selectedCell,\n previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) :\n undefined, selectedRowCellIndex: this.selectedRowCellIndexes\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n cellSelectedArgs[previousRowCellIndex] = this.prevECIdxs;\n }\n else {\n cellSelectedArgs = { data: selectedData, cellIndex: cellIndexes[0], selectedRowCellIndex: this.selectedRowCellIndexes };\n }\n this.onActionComplete(cellSelectedArgs, events.cellSelected);\n this.cellselected = true;\n }\n this.updateCellProps(cellIndex, cellIndex);\n }\n };\n Selection.prototype.getColIndex = function (rowIndex, index) {\n var frzCols = this.parent.isFrozenGrid();\n var col = this.parent.getColumnByIndex(index);\n var cells = getCellsByTableName(this.parent, col, rowIndex);\n if (cells) {\n for (var m = 0; m < cells.length; m++) {\n var colIndex = parseInt(cells[m].getAttribute('aria-colindex'), 10);\n if (colIndex === index) {\n if (frzCols) {\n if (col.getFreezeTableName() === 'movable') {\n m += this.parent.getFrozenLeftCount();\n }\n else if (col.getFreezeTableName() === 'frozen-right') {\n m += (this.parent.getFrozenLeftColumnsCount() + this.parent.getMovableColumnsCount());\n }\n }\n return m;\n }\n }\n }\n return -1;\n };\n Selection.prototype.getLastColIndex = function (rowIndex) {\n var cells = this.parent.getFrozenColumns() ? this.parent.getMovableDataRows()[rowIndex].querySelectorAll('td.e-rowcell')\n : this.parent.getDataRows()[rowIndex].querySelectorAll('td.e-rowcell');\n return parseInt(cells[cells.length - 1].getAttribute('aria-colindex'), 10);\n };\n Selection.prototype.clearCell = function () {\n this.clearCellSelection();\n };\n Selection.prototype.cellDeselect = function (type, cellIndexes, data, cells, foreignKeyData) {\n var cancl = 'cancel';\n if (cells[0] && cells[0].classList.contains('e-gridchkbox')) {\n this.updateCheckBoxes(closest(cells[0], 'tr'));\n }\n var args = {\n cells: cells, data: data, cellIndexes: cellIndexes, foreignKeyData: foreignKeyData, cancel: false\n };\n this.parent.trigger(type, args);\n this.isPreventCellSelect = args[cancl];\n };\n Selection.prototype.updateCellSelection = function (selectedCell, rowIndex, cellIndex) {\n if (!isNullOrUndefined(rowIndex)) {\n this.addRowCellIndex({ rowIndex: rowIndex, cellIndex: cellIndex });\n }\n selectedCell.classList.add('e-cellselectionbackground');\n if (selectedCell.classList.contains('e-gridchkbox')) {\n this.updateCheckBoxes(closest(selectedCell, 'tr'), true);\n }\n this.addAttribute(selectedCell);\n };\n Selection.prototype.addAttribute = function (cell) {\n this.target = cell;\n if (!isNullOrUndefined(cell)) {\n cell.setAttribute('aria-selected', 'true');\n if (!this.preventFocus) {\n this.focus.onClick({ target: cell }, true);\n }\n }\n };\n Selection.prototype.updateCellProps = function (startIndex, endIndex) {\n this.prevCIdxs = startIndex;\n this.prevECIdxs = endIndex;\n this.isCellSelected = this.selectedRowCellIndexes.length && true;\n };\n Selection.prototype.addRowCellIndex = function (rowCellIndex) {\n var isRowAvail;\n var index;\n for (var i = 0, len = this.selectedRowCellIndexes.length; i < len; i++) {\n if (this.selectedRowCellIndexes[i].rowIndex === rowCellIndex.rowIndex) {\n isRowAvail = true;\n index = i;\n break;\n }\n }\n if (isRowAvail) {\n if (this.selectedRowCellIndexes[index].cellIndexes.indexOf(rowCellIndex.cellIndex) < 0) {\n this.selectedRowCellIndexes[index].cellIndexes.push(rowCellIndex.cellIndex);\n }\n }\n else {\n this.selectedRowCellIndexes.push({ rowIndex: rowCellIndex.rowIndex, cellIndexes: [rowCellIndex.cellIndex] });\n }\n };\n /**\n * Deselects the currently selected cells.\n * @return {void}\n */\n Selection.prototype.clearCellSelection = function () {\n if (this.isCellSelected) {\n var gObj = this.parent;\n var selectedCells = this.getSelectedCellsElement();\n var rowCell = this.selectedRowCellIndexes;\n var data = [];\n var cells = [];\n var foreignKeyData = [];\n var currentViewData = this.getCurrentBatchRecordChanges();\n var selectedTable = void 0;\n var frzCols = gObj.isFrozenGrid();\n this.hideAutoFill();\n for (var i = 0, len = rowCell.length; i < len; i++) {\n data.push(currentViewData[rowCell[i].rowIndex]);\n var rowObj = this.getRowObj(rowCell[i].rowIndex);\n for (var j = 0, cLen = rowCell[i].cellIndexes.length; j < cLen; j++) {\n if (frzCols) {\n var col = gObj.getColumnByIndex(rowCell[i].cellIndexes[j]);\n cells.push(getCellByColAndRowIndex(this.parent, col, rowCell[i].rowIndex, rowCell[i].cellIndexes[j]));\n }\n else {\n if (rowObj.cells) {\n foreignKeyData.push(rowObj.cells[rowCell[i].cellIndexes[j]].foreignKeyData);\n }\n cells.push(gObj.getCellFromIndex(rowCell[i].rowIndex, rowCell[i].cellIndexes[j]));\n }\n }\n }\n this.cellDeselect(events.cellDeselecting, rowCell, data, cells, foreignKeyData);\n if (this.isPreventCellSelect === true) {\n return;\n }\n for (var i = 0, len = selectedCells.length; i < len; i++) {\n selectedCells[i].classList.remove('e-cellselectionbackground');\n selectedCells[i].removeAttribute('aria-selected');\n }\n if (this.bdrElement) {\n this.showHideBorders('none');\n }\n this.selectedRowCellIndexes = [];\n this.isCellSelected = false;\n if (!this.isDragged && this.cellselected) {\n this.cellDeselect(events.cellDeselected, rowCell, data, cells, foreignKeyData);\n }\n }\n };\n Selection.prototype.getSelectedCellsElement = function () {\n var gObj = this.parent;\n var rows = gObj.getDataRows();\n var mRows;\n if (gObj.isFrozenGrid()) {\n mRows = gObj.getMovableDataRows();\n rows = gObj.addMovableRows(rows, mRows);\n if (gObj.getFrozenMode() === 'Left-Right') {\n rows = gObj.addMovableRows(rows, gObj.getFrozenRightDataRows());\n }\n }\n var cells = [];\n for (var i = 0, len = rows.length; i < len; i++) {\n cells = cells.concat([].slice.call(rows[i].querySelectorAll('.e-cellselectionbackground')));\n }\n return cells;\n };\n Selection.prototype.mouseMoveHandler = function (e) {\n e.preventDefault();\n var gBRect = this.parent.element.getBoundingClientRect();\n var x1 = this.x;\n var y1 = this.y;\n var position = getPosition(e);\n var x2 = position.x - gBRect.left;\n var y2 = position.y - gBRect.top;\n var tmp;\n var target = closest(e.target, 'tr');\n this.isDragged = true;\n if (!this.isCellDrag) {\n if (!target) {\n target = closest(document.elementFromPoint(this.parent.element.offsetLeft + 2, e.clientY), 'tr');\n }\n if (x1 > x2) {\n tmp = x2;\n x2 = x1;\n x1 = tmp;\n }\n if (y1 > y2) {\n tmp = y2;\n y2 = y1;\n y1 = tmp;\n }\n this.element.style.left = x1 + 'px';\n this.element.style.top = y1 + 'px';\n this.element.style.width = x2 - x1 + 'px';\n this.element.style.height = y2 - y1 + 'px';\n }\n if (target && !e.ctrlKey && !e.shiftKey) {\n var rowIndex = parseInt(target.getAttribute('aria-rowindex'), 10);\n if (!this.isCellDrag) {\n this.hideAutoFill();\n this.selectRowsByRange(this.startDIndex, rowIndex);\n }\n else {\n var td = parentsUntil(e.target, 'e-rowcell');\n if (td) {\n this.startAFCell = this.startCell;\n this.endAFCell = parentsUntil(e.target, 'e-rowcell');\n this.selectLikeExcel(e, rowIndex, parseInt(td.getAttribute('aria-colindex'), 10));\n }\n }\n }\n };\n Selection.prototype.selectLikeExcel = function (e, rowIndex, cellIndex) {\n if (!this.isAutoFillSel) {\n this.clearCellSelection();\n this.selectCellsByRange({ rowIndex: this.startDIndex, cellIndex: this.startDCellIndex }, { rowIndex: rowIndex, cellIndex: cellIndex });\n this.drawBorders();\n }\n else { //Autofill\n this.showAFBorders();\n this.selectLikeAutoFill(e);\n }\n };\n Selection.prototype.drawBorders = function () {\n if (this.selectionSettings.cellSelectionMode === 'BoxWithBorder' && this.selectedRowCellIndexes.length && !this.parent.isEdit) {\n this.parent.element.classList.add('e-enabledboxbdr');\n if (!this.bdrElement) {\n this.createBorders();\n }\n this.positionBorders();\n }\n else {\n this.showHideBorders('none');\n }\n };\n Selection.prototype.isLastCell = function (cell) {\n var cells = [].slice.call(cell.parentElement.querySelectorAll('.e-rowcell:not(.e-hide)'));\n return cells[cells.length - 1] === cell;\n };\n Selection.prototype.isLastRow = function (cell) {\n var rows = [].slice.call(closest(cell, 'tbody').querySelectorAll('.e-row:not(.e-hiddenrow)'));\n return cell.parentElement === rows[rows.length - 1];\n };\n Selection.prototype.isFirstRow = function (cell) {\n var rows = [].slice.call(closest(cell, 'tbody').querySelectorAll('.e-row:not(.e-hiddenrow)'));\n return cell.parentElement === rows[0];\n };\n Selection.prototype.isFirstCell = function (cell) {\n var cells = [].slice.call(cell.parentElement.querySelectorAll('.e-rowcell:not(.e-hide)'));\n return cells[0] === cell;\n };\n Selection.prototype.setBorders = function (parentEle, border, bdrStr) {\n var cells = [].slice.call(parentEle.querySelectorAll('.e-cellselectionbackground')).\n filter(function (ele) { return ele.style.display === ''; });\n if (cells.length) {\n var isFrozen = this.parent.isFrozenGrid();\n var start = cells[0];\n var end = cells[cells.length - 1];\n var stOff = start.getBoundingClientRect();\n var endOff = end.getBoundingClientRect();\n var parentOff = start.offsetParent.getBoundingClientRect();\n var rowHeight = this.isLastRow(end) && (bdrStr === '1' || bdrStr === '2' || bdrStr === '5') ? 2 : 0;\n var topOffSet = this.parent.frozenRows && (bdrStr === '1' || bdrStr === '2') &&\n this.isFirstRow(start) ? 1.5 : 0;\n var leftOffset = isFrozen && (bdrStr === '2' || bdrStr === '4') && this.isFirstCell(start) ? 1 : 0;\n var rightOffset = ((this.parent.getFrozenMode() === 'Right' && (bdrStr === '1' || bdrStr === '3'))\n || (this.parent.getFrozenMode() === 'Left-Right' && (bdrStr === '5' || bdrStr === '6')))\n && this.isFirstCell(start) ? 1 : 0;\n if (this.parent.enableRtl) {\n border.style.right = parentOff.right - stOff.right - leftOffset + 'px';\n border.style.width = stOff.right - endOff.left + leftOffset + 1 + 'px';\n }\n else {\n border.style.left = stOff.left - parentOff.left - leftOffset - rightOffset + 'px';\n border.style.width = endOff.right - stOff.left + leftOffset - rightOffset + 1 + 'px';\n }\n border.style.top = stOff.top - parentOff.top - topOffSet + 'px';\n border.style.height = endOff.top - stOff.top > 0 ?\n (endOff.top - parentOff.top + endOff.height + 1) - (stOff.top - parentOff.top) - rowHeight + topOffSet + 'px' :\n endOff.height + topOffSet - rowHeight + 1 + 'px';\n this.selectDirection += bdrStr;\n }\n else {\n border.style.display = 'none';\n }\n };\n Selection.prototype.positionBorders = function () {\n this.updateStartEndCells();\n if (!this.startCell || !this.bdrElement || !this.selectedRowCellIndexes.length) {\n return;\n }\n this.selectDirection = '';\n this.showHideBorders('');\n this.setBorders(this.parent.getContentTable(), this.bdrElement, '1');\n if (this.parent.isFrozenGrid()) {\n this.setBorders(this.parent.contentModule.getMovableContent(), this.mcBdrElement, '2');\n if (this.parent.getFrozenMode() === 'Left-Right') {\n this.setBorders(this.parent.contentModule.getFrozenRightContent(), this.frcBdrElement, '5');\n }\n }\n if (this.parent.frozenRows) {\n this.setBorders(this.parent.getHeaderTable(), this.fhBdrElement, '3');\n if (this.parent.isFrozenGrid()) {\n this.setBorders(this.parent.headerModule.getMovableHeader(), this.mhBdrElement, '4');\n if (this.parent.getFrozenMode() === 'Left-Right') {\n this.setBorders(this.parent.headerModule.getFrozenRightHeader(), this.frhBdrElement, '6');\n }\n }\n }\n this.applyBorders(this.selectDirection);\n };\n Selection.prototype.applyBothFrozenBorders = function (str) {\n var rtl = this.parent.enableRtl;\n switch (str.length) {\n case 6:\n {\n this.bdrElement.style.borderWidth = rtl ? '0 2px 2px 0' : '0 0 2px 2px';\n this.mcBdrElement.style.borderWidth = '0 0 2px 0';\n this.fhBdrElement.style.borderWidth = rtl ? '2px 2px 0 0' : '2px 0 0 2px';\n this.mhBdrElement.style.borderWidth = '2px 0 0 0';\n this.frcBdrElement.style.borderWidth = rtl ? '0 0 2px 2px' : '0 2px 2px 0';\n this.frhBdrElement.style.borderWidth = rtl ? '2px 0 0 2px' : '2px 2px 0 0';\n }\n break;\n case 4:\n {\n if (str.includes('1') && str.includes('2') && str.includes('3') && str.includes('4')) {\n this.bdrElement.style.borderWidth = rtl ? '0 2px 2px 0' : '0 0 2px 2px';\n this.mcBdrElement.style.borderWidth = rtl ? '0 0 2px 2px' : '0 2px 2px 0';\n this.fhBdrElement.style.borderWidth = rtl ? '2px 2px 0 0' : '2px 0 0 2px';\n this.mhBdrElement.style.borderWidth = rtl ? '2px 0 0 2px' : '2px 2px 0 0';\n }\n if (str.includes('2') && str.includes('4') && str.includes('5') && str.includes('6')) {\n this.mcBdrElement.style.borderWidth = rtl ? '0 2px 2px 0' : '0 0 2px 2px';\n this.mhBdrElement.style.borderWidth = rtl ? '2px 2px 0 0' : '2px 0 0 2px';\n this.frcBdrElement.style.borderWidth = rtl ? '0 0 2px 2px' : '0 2px 2px 0';\n this.frhBdrElement.style.borderWidth = rtl ? '2px 0 0 2px' : '2px 2px 0 0';\n }\n }\n break;\n case 3:\n {\n this.bdrElement.style.borderWidth = rtl ? '2px 2px 2px 0' : '2px 0 2px 2px';\n this.mcBdrElement.style.borderWidth = '2p 0 2px 0';\n this.frcBdrElement.style.borderWidth = rtl ? '2px 0 2px 2px' : '2px 2px 2px 0';\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = rtl ? '2px 2px 2px 0' : '2px 0 2px 2px';\n this.mhBdrElement.style.borderWidth = '2px 0 2px 0';\n this.frcBdrElement.style.borderWidth = rtl ? '2px 0 2px 2px' : '2px 2px 2px 0';\n }\n }\n break;\n case 2:\n {\n if (str.includes('1')) {\n this.mcBdrElement.style.borderWidth = rtl ? '2px 0 2px 2px' : '2px 2px 2px 0';\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = '2px 2px 0 2px';\n }\n }\n if (str.includes('2')) {\n this.bdrElement.style.borderWidth = rtl ? '2px 2px 2px 0' : '2px 0 2px 2px';\n this.frcBdrElement.style.borderWidth = rtl ? '2px 0 2px 2px' : '2px 2px 2px 0';\n if (this.parent.frozenRows) {\n this.mhBdrElement.style.borderWidth = '2px 2px 0 2px';\n }\n }\n if (str.includes('3')) {\n this.mhBdrElement.style.borderWidth = rtl ? '2px 0 2px 2px' : '2px 2px 2px 0';\n this.bdrElement.style.borderWidth = '0 2px 2px 2px';\n }\n if (str.includes('4')) {\n this.fhBdrElement.style.borderWidth = rtl ? '2px 2px 2px 0' : '2px 0 2px 2px';\n this.frhBdrElement.style.borderWidth = rtl ? '2px 0 2px 2px' : '2px 2px 2px 0';\n this.mcBdrElement.style.borderWidth = '0 2px 2px 2px';\n }\n if (str.includes('5')) {\n this.mcBdrElement.style.borderWidth = rtl ? '2px 2px 2px 0' : '2px 0 2px 2px';\n if (this.parent.frozenRows) {\n this.frhBdrElement.style.borderWidth = '2px 2px 0 2px';\n }\n }\n if (str.includes('6')) {\n this.mhBdrElement.style.borderWidth = rtl ? '2px 2px 2px 0' : '2px 0 2px 2px';\n this.frcBdrElement.style.borderWidth = '0 2px 2px 2px';\n }\n }\n break;\n default:\n this.bdrElement.style.borderWidth = '2px';\n this.mcBdrElement.style.borderWidth = '2px';\n this.frcBdrElement.style.borderWidth = '2px';\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = '2px';\n this.mhBdrElement.style.borderWidth = '2px';\n this.frhBdrElement.style.borderWidth = '2px';\n }\n break;\n }\n };\n Selection.prototype.applyBorders = function (str) {\n var rtl = this.parent.enableRtl;\n if (this.parent.getFrozenMode() === 'Left-Right') {\n this.applyBothFrozenBorders(str);\n }\n else {\n switch (str.length) {\n case 4:\n {\n if (this.parent.getFrozenMode() === 'Right') {\n this.bdrElement.style.borderWidth = rtl ? '0 0 2px 2px' : '0 2px 2px 0';\n this.mcBdrElement.style.borderWidth = rtl ? '0 2px 2px 0' : '0 0 2px 2px';\n this.fhBdrElement.style.borderWidth = rtl ? '2px 0 0 2px' : '2px 2px 0 0';\n this.mhBdrElement.style.borderWidth = rtl ? '2px 2px 0 0' : '2px 0 0 2px';\n }\n else {\n this.bdrElement.style.borderWidth = rtl ? '0 2px 2px 0' : '0 0 2px 2px';\n this.mcBdrElement.style.borderWidth = rtl ? '0 0 2px 2px' : '0 2px 2px 0';\n this.fhBdrElement.style.borderWidth = rtl ? '2px 2px 0 0' : '2px 0 0 2px';\n this.mhBdrElement.style.borderWidth = rtl ? '2px 0 0 2px' : '2px 2px 0 0';\n }\n }\n break;\n case 2:\n {\n if (this.parent.getFrozenMode() === 'Right') {\n this.bdrElement.style.borderWidth = str.includes('2') ? rtl ? '2px 0 2px 2px'\n : '2px 2px 2px 0' : '0 2px 2px 2px';\n this.mcBdrElement.style.borderWidth = str.includes('1') ? rtl ? '2px 2px 2px 0'\n : '2px 0 2px 2px' : '0 2px 2px 2px';\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = str.includes('1') ? '2px 2px 0 2px'\n : rtl ? '2px 0 2px 2px' : '2px 2px 2px 0';\n this.mhBdrElement.style.borderWidth = str.includes('2') ? '2px 2px 0 2px'\n : rtl ? '2px 2px 2px 0' : '2px 0 2px 2px';\n }\n }\n else {\n this.bdrElement.style.borderWidth = str.includes('2') ? rtl ? '2px 2px 2px 0'\n : '2px 0 2px 2px' : '0 2px 2px 2px';\n if (this.parent.isFrozenGrid()) {\n this.mcBdrElement.style.borderWidth = str.includes('1') ? rtl ? '2px 0 2px 2px'\n : '2px 2px 2px 0' : '0 2px 2px 2px';\n }\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = str.includes('1') ? '2px 2px 0 2px'\n : rtl ? '2px 2px 2px 0' : '2px 0 2px 2px';\n if (this.parent.isFrozenGrid()) {\n this.mhBdrElement.style.borderWidth = str.includes('2') ? '2px 2px 0 2px'\n : rtl ? '2px 0 2px 2px' : '2px 2px 2px 0';\n }\n }\n }\n }\n break;\n default:\n this.bdrElement.style.borderWidth = '2px';\n if (this.parent.isFrozenGrid()) {\n this.mcBdrElement.style.borderWidth = '2px';\n }\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = '2px';\n if (this.parent.isFrozenGrid()) {\n this.mhBdrElement.style.borderWidth = '2px';\n }\n }\n break;\n }\n }\n };\n Selection.prototype.createBorders = function () {\n if (!this.bdrElement) {\n this.bdrElement = this.parent.getContentTable().parentElement.appendChild(createElement('div', {\n className: 'e-xlsel', id: this.parent.element.id + '_bdr',\n styles: 'width: 2px; border-width: 0;'\n }));\n if (this.parent.isFrozenGrid()) {\n this.mcBdrElement = this.parent.contentModule.getMovableContent().appendChild(createElement('div', {\n className: 'e-xlsel', id: this.parent.element.id + '_mcbdr',\n styles: 'height: 2px; border-width: 0;'\n }));\n if (this.parent.getFrozenMode() === 'Left-Right') {\n this.frcBdrElement = this.parent.contentModule.getFrozenRightContent().appendChild(createElement('div', {\n className: 'e-xlsel', id: this.parent.element.id + '_frcbdr',\n styles: 'height: 2px; border-width: 0;'\n }));\n }\n }\n if (this.parent.frozenRows) {\n this.fhBdrElement = this.parent.getHeaderTable().parentElement.appendChild(createElement('div', { className: 'e-xlsel', id: this.parent.element.id + '_fhbdr', styles: 'height: 2px;' }));\n }\n if (this.parent.frozenRows && this.parent.isFrozenGrid()) {\n this.mhBdrElement = this.parent.headerModule.getMovableHeader().appendChild(createElement('div', { className: 'e-xlsel', id: this.parent.element.id + '_mhbdr', styles: 'height: 2px;' }));\n if (this.parent.getFrozenMode() === 'Left-Right') {\n this.frhBdrElement = this.parent.headerModule.getFrozenRightHeader().appendChild(createElement('div', { className: 'e-xlsel', id: this.parent.element.id + '_frhbdr', styles: 'height: 2px;' }));\n }\n }\n }\n };\n Selection.prototype.showHideBorders = function (display) {\n if (this.bdrElement) {\n this.bdrElement.style.display = display;\n if (this.parent.isFrozenGrid()) {\n this.mcBdrElement.style.display = display;\n if (this.parent.getFrozenMode() === 'Left-Right') {\n this.frcBdrElement.style.display = display;\n }\n }\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.display = display;\n }\n if (this.parent.frozenRows && this.parent.isFrozenGrid()) {\n this.mhBdrElement.style.display = display;\n if (this.parent.getFrozenMode() === 'Left-Right') {\n this.frhBdrElement.style.display = display;\n }\n }\n }\n };\n Selection.prototype.drawAFBorders = function () {\n if (!this.bdrAFBottom) {\n this.createAFBorders();\n }\n this.positionAFBorders();\n };\n Selection.prototype.positionAFBorders = function () {\n if (!this.startCell || !this.bdrAFLeft) {\n return;\n }\n var stOff = this.startAFCell.getBoundingClientRect();\n var endOff = this.endAFCell.getBoundingClientRect();\n var top = endOff.top - stOff.top > 0 ? 1 : 0;\n var firstCellTop = endOff.top - stOff.top >= 0 && (parentsUntil(this.startAFCell, 'e-movablecontent') ||\n parentsUntil(this.startAFCell, 'e-frozencontent')) && this.isFirstRow(this.startAFCell) ? 1.5 : 0;\n var firstCellLeft = (parentsUntil(this.startAFCell, 'e-movablecontent') ||\n parentsUntil(this.startAFCell, 'e-movableheader')) && this.isFirstCell(this.startAFCell) ? 1 : 0;\n var rowHeight = this.isLastRow(this.endAFCell) && (parentsUntil(this.endAFCell, 'e-movablecontent') ||\n parentsUntil(this.endAFCell, 'e-frozencontent')) ? 2 : 0;\n var parentOff = this.startAFCell.offsetParent.getBoundingClientRect();\n var parentRect = this.parent.element.getBoundingClientRect();\n var sTop = this.startAFCell.offsetParent.parentElement.scrollTop;\n var sLeft = this.startAFCell.offsetParent.parentElement.scrollLeft;\n var scrollTop = sTop - this.startAFCell.offsetTop;\n var scrollLeft = sLeft - this.startAFCell.offsetLeft;\n var totalHeight = this.parent.element.clientHeight;\n var totalWidth = this.parent.element.clientWidth;\n scrollTop = scrollTop > 0 ? Math.floor(scrollTop) - 1 : 0;\n scrollLeft = scrollLeft > 0 ? scrollLeft : 0;\n var left = stOff.left - parentRect.left;\n if (!this.parent.enableRtl) {\n this.bdrAFLeft.style.left = left - firstCellLeft + scrollLeft - 1 + 'px';\n this.bdrAFRight.style.left = endOff.left - parentRect.left - 2 + endOff.width + 'px';\n this.bdrAFRight.style.width = totalWidth <= parseInt(this.bdrAFRight.style.left, 10) ? '0px' : '2px';\n this.bdrAFTop.style.left = left + scrollLeft - 0.5 + 'px';\n this.bdrAFTop.style.width = parseInt(this.bdrAFRight.style.left, 10) - parseInt(this.bdrAFLeft.style.left, 10)\n - firstCellLeft + 1 + 'px';\n if (totalWidth <= (parseInt(this.bdrAFTop.style.width, 10) + parseInt(this.bdrAFTop.style.left, 10))) {\n var leftRemove = (parseInt(this.bdrAFTop.style.width, 10) + parseInt(this.bdrAFTop.style.left, 10)) - totalWidth;\n this.bdrAFTop.style.width = parseInt(this.bdrAFTop.style.width, 10) - leftRemove + 'px';\n }\n }\n else {\n var scrolloffSet = (parentsUntil(this.startAFCell, 'e-movablecontent') ||\n parentsUntil(this.startAFCell, 'e-movableheader')) ? stOff.right -\n this.startAFCell.offsetParent.parentElement.getBoundingClientRect().width -\n parentRect.left : 0;\n this.bdrAFLeft.style.right = parentRect.right - endOff.right - 2 + endOff.width + 'px';\n this.bdrAFLeft.style.width = totalWidth <= parseInt(this.bdrAFLeft.style.right, 10) ? '0px' : '2px';\n this.bdrAFRight.style.right = parentRect.right - stOff.right - firstCellLeft + scrolloffSet - 1 + 'px';\n this.bdrAFTop.style.left = endOff.left - parentRect.left - 0.5 + 'px';\n this.bdrAFTop.style.width = parseInt(this.bdrAFLeft.style.right, 10) - parseInt(this.bdrAFRight.style.right, 10)\n - firstCellLeft + 1 + 'px';\n if (parseInt(this.bdrAFTop.style.left, 10) < 0) {\n this.bdrAFTop.style.width = parseInt(this.bdrAFTop.style.width, 10) + parseInt(this.bdrAFTop.style.left, 10) + 'px';\n this.bdrAFTop.style.left = '0px';\n }\n }\n this.bdrAFLeft.style.top = stOff.top - parentRect.top - firstCellTop + scrollTop + 'px';\n this.bdrAFLeft.style.height = endOff.top - stOff.top > 0 ?\n (endOff.top - parentOff.top + endOff.height + 1) - (stOff.top - parentOff.top) + firstCellTop - rowHeight - scrollTop + 'px' :\n endOff.height + firstCellTop - rowHeight - scrollTop + 'px';\n this.bdrAFRight.style.top = this.bdrAFLeft.style.top;\n this.bdrAFRight.style.height = parseInt(this.bdrAFLeft.style.height, 10) + 'px';\n this.bdrAFTop.style.top = this.bdrAFRight.style.top;\n this.bdrAFBottom.style.left = this.bdrAFTop.style.left;\n this.bdrAFBottom.style.top = parseFloat(this.bdrAFLeft.style.top) + parseFloat(this.bdrAFLeft.style.height) - top - 1 + 'px';\n this.bdrAFBottom.style.width = totalHeight <= parseFloat(this.bdrAFBottom.style.top) ? '0px' : this.bdrAFTop.style.width;\n if (totalHeight <= (parseInt(this.bdrAFLeft.style.height, 10) + parseInt(this.bdrAFLeft.style.top, 10))) {\n var topRemove = parseInt(this.bdrAFLeft.style.height, 10) + parseInt(this.bdrAFLeft.style.top, 10) - totalHeight;\n this.bdrAFLeft.style.height = parseInt(this.bdrAFLeft.style.height, 10) - topRemove + 'px';\n this.bdrAFRight.style.height = parseInt(this.bdrAFLeft.style.height, 10) + 'px';\n }\n };\n Selection.prototype.createAFBorders = function () {\n if (!this.bdrAFLeft) {\n this.bdrAFLeft = this.parent.element.appendChild(createElement('div', { className: 'e-xlselaf', id: this.parent.element.id + '_bdrafleft', styles: 'width: 2px;' }));\n this.bdrAFRight = this.parent.element.appendChild(createElement('div', { className: 'e-xlselaf', id: this.parent.element.id + '_bdrafright', styles: 'width: 2px;' }));\n this.bdrAFBottom = this.parent.element.appendChild(createElement('div', { className: 'e-xlselaf', id: this.parent.element.id + '_bdrafbottom', styles: 'height: 2px;' }));\n this.bdrAFTop = this.parent.element.appendChild(createElement('div', { className: 'e-xlselaf', id: this.parent.element.id + '_bdraftop', styles: 'height: 2px;' }));\n }\n };\n Selection.prototype.showAFBorders = function () {\n if (this.bdrAFLeft) {\n this.bdrAFLeft.style.display = '';\n this.bdrAFRight.style.display = '';\n this.bdrAFBottom.style.display = '';\n this.bdrAFTop.style.display = '';\n }\n };\n Selection.prototype.hideAFBorders = function () {\n if (this.bdrAFLeft) {\n this.bdrAFLeft.style.display = 'none';\n this.bdrAFRight.style.display = 'none';\n this.bdrAFBottom.style.display = 'none';\n this.bdrAFTop.style.display = 'none';\n }\n };\n Selection.prototype.updateValue = function (rIdx, cIdx, cell) {\n var args = this.createBeforeAutoFill(rIdx, cIdx, cell);\n if (!args.cancel) {\n var col = this.parent.getColumnByIndex(cIdx);\n if (this.parent.editModule && cell) {\n if (col.type === 'number') {\n this.parent.editModule.updateCell(rIdx, col.field, parseInt(args.value, 10));\n }\n else {\n this.parent.editModule.updateCell(rIdx, col.field, args.value);\n }\n }\n }\n };\n Selection.prototype.createBeforeAutoFill = function (rowIndex, colIndex, cell) {\n var col = this.parent.getColumnByIndex(colIndex);\n var args = {\n column: col,\n value: cell.innerText\n };\n this.parent.trigger(events.beforeAutoFill, args);\n return args;\n };\n Selection.prototype.getAutoFillCells = function (rowIndex, startCellIdx) {\n var cls = '.e-cellselectionbackground';\n var cells = [].slice.call(this.parent.getDataRows()[rowIndex].querySelectorAll(cls));\n if (this.parent.isFrozenGrid()) {\n cells = cells.concat([].slice.call(this.parent.getMovableDataRows()[rowIndex].querySelectorAll(cls)));\n if (this.parent.getFrozenMode() === 'Left-Right') {\n cells = cells.concat([].slice.call(this.parent.getFrozenRightDataRows()[rowIndex].querySelectorAll(cls)));\n }\n }\n return cells;\n };\n /* tslint:disable-next-line:max-func-body-length */\n Selection.prototype.selectLikeAutoFill = function (e, isApply) {\n var startrowIdx = parseInt(parentsUntil(this.startAFCell, 'e-row').getAttribute('aria-rowindex'), 10);\n var startCellIdx = parseInt(this.startAFCell.getAttribute('aria-colindex'), 10);\n var endrowIdx = parseInt(parentsUntil(this.endAFCell, 'e-row').getAttribute('aria-rowindex'), 10);\n var endCellIdx = parseInt(this.endAFCell.getAttribute('aria-colindex'), 10);\n var rowLen = this.selectedRowCellIndexes.length - 1;\n var colLen = this.selectedRowCellIndexes[0].cellIndexes.length - 1;\n var col;\n switch (true) { //direction \n case !isApply && this.endAFCell.classList.contains('e-cellselectionbackground') &&\n !!parentsUntil(e.target, 'e-rowcell'):\n this.startAFCell = this.parent.getCellFromIndex(startrowIdx, startCellIdx);\n this.endAFCell = this.parent.getCellFromIndex(startrowIdx + rowLen, startCellIdx + colLen);\n this.drawAFBorders();\n break;\n case this.autoFillRLselection && startCellIdx + colLen < endCellIdx && //right\n endCellIdx - startCellIdx - colLen + 1 > endrowIdx - startrowIdx - rowLen // right bottom\n && endCellIdx - startCellIdx - colLen + 1 > startrowIdx - endrowIdx: //right top\n this.endAFCell = this.parent.getCellFromIndex(startrowIdx + rowLen, endCellIdx);\n endrowIdx = parseInt(parentsUntil(this.endAFCell, 'e-row').getAttribute('aria-rowindex'), 10);\n endCellIdx = parseInt(this.endAFCell.getAttribute('aria-colindex'), 10);\n if (!isApply) {\n this.drawAFBorders();\n }\n else {\n var cellIdx = parseInt(this.endCell.getAttribute('aria-colindex'), 10);\n for (var i = startrowIdx; i <= endrowIdx; i++) {\n var cells = this.getAutoFillCells(i, startCellIdx);\n var c = 0;\n for (var j = cellIdx + 1; j <= endCellIdx; j++) {\n if (c > colLen) {\n c = 0;\n }\n this.updateValue(i, j, cells[c]);\n c++;\n }\n }\n this.selectCellsByRange({ rowIndex: startrowIdx, cellIndex: this.startCellIndex }, { rowIndex: endrowIdx, cellIndex: endCellIdx });\n }\n break;\n case this.autoFillRLselection && startCellIdx > endCellIdx && // left\n startCellIdx - endCellIdx + 1 > endrowIdx - startrowIdx - rowLen && //left top\n startCellIdx - endCellIdx + 1 > startrowIdx - endrowIdx: // left bottom\n this.startAFCell = this.parent.getCellFromIndex(startrowIdx, endCellIdx);\n this.endAFCell = this.endCell;\n if (!isApply) {\n this.drawAFBorders();\n }\n else {\n for (var i = startrowIdx; i <= startrowIdx + rowLen; i++) {\n var cells = this.getAutoFillCells(i, startCellIdx);\n cells.reverse();\n var c = 0;\n for (var j = this.startCellIndex - 1; j >= endCellIdx; j--) {\n if (c > colLen) {\n c = 0;\n }\n this.updateValue(i, j, cells[c]);\n c++;\n }\n }\n this.selectCellsByRange({ rowIndex: startrowIdx, cellIndex: endCellIdx }, { rowIndex: startrowIdx + rowLen, cellIndex: this.startCellIndex + colLen });\n }\n break;\n case startrowIdx > endrowIdx: //up\n this.startAFCell = this.parent.getCellFromIndex(endrowIdx, startCellIdx);\n this.endAFCell = this.endCell;\n if (!isApply) {\n this.drawAFBorders();\n }\n else {\n var trIdx = parseInt(this.endCell.parentElement.getAttribute('aria-rowindex'), 10);\n var r = trIdx;\n for (var i = startrowIdx - 1; i >= endrowIdx; i--) {\n if (r === this.startIndex - 1) {\n r = trIdx;\n }\n var cells = this.getAutoFillCells(r, startCellIdx);\n var c = 0;\n r--;\n for (var j = this.startCellIndex; j <= this.startCellIndex + colLen; j++) {\n this.updateValue(i, j, cells[c]);\n c++;\n }\n }\n this.selectCellsByRange({ rowIndex: endrowIdx, cellIndex: startCellIdx + colLen }, { rowIndex: startrowIdx + rowLen, cellIndex: startCellIdx });\n }\n break;\n default: //down\n this.endAFCell = this.parent.getCellFromIndex(endrowIdx, startCellIdx + colLen);\n if (!isApply) {\n this.drawAFBorders();\n }\n else {\n var trIdx = parseInt(this.endCell.parentElement.getAttribute('aria-rowindex'), 10);\n var r = this.startIndex;\n for (var i = trIdx + 1; i <= endrowIdx; i++) {\n if (r === trIdx + 1) {\n r = this.startIndex;\n }\n var cells = this.getAutoFillCells(r, startCellIdx);\n r++;\n var c = 0;\n for (var m = this.startCellIndex; m <= this.startCellIndex + colLen; m++) {\n this.updateValue(i, m, cells[c]);\n c++;\n }\n }\n this.selectCellsByRange({ rowIndex: trIdx - rowLen, cellIndex: startCellIdx }, { rowIndex: endrowIdx, cellIndex: startCellIdx + colLen });\n }\n break;\n }\n };\n Selection.prototype.mouseUpHandler = function (e) {\n document.body.classList.remove('e-disableuserselect');\n if (this.element) {\n remove(this.element);\n }\n if (this.isDragged && this.selectedRowCellIndexes.length === 1 && this.selectedRowCellIndexes[0].cellIndexes.length === 1) {\n this.mUPTarget = parentsUntil(e.target, 'e-rowcell');\n }\n else {\n this.mUPTarget = null;\n }\n if (this.isDragged && !this.isAutoFillSel && this.selectionSettings.mode === 'Cell') {\n var target = e.target;\n var rowIndex = parseInt(target.parentElement.getAttribute('aria-rowindex'), 10);\n var cellIndex = parseInt(target.getAttribute('aria-colindex'), 10);\n this.isDragged = false;\n this.clearCellSelection();\n this.selectCellsByRange({ rowIndex: this.startDIndex, cellIndex: this.startDCellIndex }, { rowIndex: rowIndex, cellIndex: cellIndex });\n }\n this.isDragged = false;\n this.updateAutoFillPosition();\n if (this.isAutoFillSel) {\n var lastCell = parentsUntil(e.target, 'e-rowcell');\n this.endAFCell = lastCell ? lastCell : this.endCell === this.endAFCell ? this.startAFCell : this.endAFCell;\n this.startAFCell = this.startCell;\n this.updateStartCellsIndex();\n this.selectLikeAutoFill(e, true);\n this.updateAutoFillPosition();\n this.hideAFBorders();\n this.positionBorders();\n this.isAutoFillSel = false;\n }\n EventHandler.remove(this.parent.getContent(), 'mousemove', this.mouseMoveHandler);\n if (this.parent.frozenRows) {\n EventHandler.remove(this.parent.getHeaderContent(), 'mousemove', this.mouseMoveHandler);\n }\n EventHandler.remove(document, 'mouseup', this.mouseUpHandler);\n };\n Selection.prototype.hideAutoFill = function () {\n if (this.autofill) {\n this.autofill.style.display = 'none';\n }\n };\n /**\n * @hidden\n */\n Selection.prototype.updateAutoFillPosition = function () {\n if (this.parent.enableAutoFill && !this.parent.isEdit &&\n this.selectionSettings.cellSelectionMode.indexOf('Box') > -1 && !this.isRowType() && !this.isSingleSel()\n && this.selectedRowCellIndexes.length) {\n var index = parseInt(this.target.getAttribute('aria-colindex'), 10);\n var rindex = parseInt(this.target.getAttribute('index'), 10);\n var rowIndex = this.selectedRowCellIndexes[this.selectedRowCellIndexes.length - 1].rowIndex;\n var cells = this.getAutoFillCells(rowIndex, index).filter(function (ele) { return ele.style.display === ''; });\n var col = this.parent.getColumnByIndex(index);\n var isFrozenCol = col.getFreezeTableName() === 'movable';\n var isFrozenRow = rindex < this.parent.frozenRows;\n var isFrozenRight = this.parent.getFrozenMode() === 'Left-Right' && col.getFreezeTableName() === 'frozen-right';\n if (!select('#' + this.parent.element.id + '_autofill', parentsUntil(this.target, 'e-table'))) {\n if (select('#' + this.parent.element.id + '_autofill', this.parent.element)) {\n select('#' + this.parent.element.id + '_autofill', this.parent.element).remove();\n }\n this.autofill = createElement('div', { className: 'e-autofill', id: this.parent.element.id + '_autofill' });\n this.autofill.style.display = 'none';\n !isFrozenRow ? !isFrozenCol ? this.parent.getContentTable().parentElement.appendChild(this.autofill) :\n this.parent.contentModule.getMovableContent().appendChild(this.autofill) :\n !isFrozenCol ? this.parent.getHeaderTable().parentElement.appendChild(this.autofill) :\n this.parent.headerModule.getMovableHeader().appendChild(this.autofill);\n if (isFrozenRight) {\n isFrozenRow ? this.parent.getFrozenRightHeader().appendChild(this.autofill)\n : this.parent.getFrozenRightContent().appendChild(this.autofill);\n }\n }\n var cell = cells[cells.length - 1];\n if (cell && cell.offsetParent) {\n var clientRect = cell.getBoundingClientRect();\n var parentOff = cell.offsetParent.getBoundingClientRect();\n var colWidth = this.isLastCell(cell) ? 4 : 0;\n var rowHeight = this.isLastRow(cell) ? 3 : 0;\n if (!this.parent.enableRtl) {\n this.autofill.style.left = clientRect.left - parentOff.left + clientRect.width - 4 - colWidth + 'px';\n }\n else {\n this.autofill.style.right = parentOff.right - clientRect.right + clientRect.width - 4 - colWidth + 'px';\n }\n this.autofill.style.top = clientRect.top - parentOff.top + clientRect.height - 5 - rowHeight + 'px';\n }\n this.autofill.style.display = '';\n }\n else {\n this.hideAutoFill();\n }\n };\n Selection.prototype.mouseDownHandler = function (e) {\n this.mouseButton = e.button;\n var target = e.target;\n var gObj = this.parent;\n var isDrag;\n var gridElement = parentsUntil(target, 'e-grid');\n if (gridElement && gridElement.id !== gObj.element.id || parentsUntil(target, 'e-headercontent') && !this.parent.frozenRows ||\n parentsUntil(target, 'e-editedbatchcell') || parentsUntil(target, 'e-editedrow')) {\n return;\n }\n if (e.shiftKey || e.ctrlKey) {\n e.preventDefault();\n }\n if (parentsUntil(target, 'e-rowcell') && !e.shiftKey && !e.ctrlKey) {\n if (gObj.selectionSettings.cellSelectionMode.indexOf('Box') > -1 && !this.isRowType() && !this.isSingleSel()) {\n this.isCellDrag = true;\n isDrag = true;\n }\n else if (gObj.allowRowDragAndDrop && !gObj.isEdit) {\n if (!this.isRowType() || this.isSingleSel() || closest(target, 'td').classList.contains('e-selectionbackground')) {\n this.isDragged = false;\n return;\n }\n isDrag = true;\n this.element = this.parent.createElement('div', { className: 'e-griddragarea' });\n gObj.getContent().appendChild(this.element);\n }\n if (isDrag) {\n this.enableDrag(e, true);\n }\n }\n this.updateStartEndCells();\n if (target.classList.contains('e-autofill') || target.classList.contains('e-xlsel')) {\n this.isCellDrag = true;\n this.isAutoFillSel = true;\n this.enableDrag(e);\n }\n };\n Selection.prototype.updateStartEndCells = function () {\n var cells = [].slice.call(this.parent.element.querySelectorAll('.e-cellselectionbackground'));\n this.startCell = cells[0];\n this.endCell = cells[cells.length - 1];\n if (this.startCell) {\n this.startIndex = parseInt(this.startCell.parentElement.getAttribute('aria-rowindex'), 10);\n this.startCellIndex = parseInt(parentsUntil(this.startCell, 'e-rowcell').getAttribute('aria-colindex'), 10);\n }\n };\n Selection.prototype.updateStartCellsIndex = function () {\n if (this.startCell) {\n this.startIndex = parseInt(this.startCell.parentElement.getAttribute('aria-rowindex'), 10);\n this.startCellIndex = parseInt(parentsUntil(this.startCell, 'e-rowcell').getAttribute('aria-colindex'), 10);\n }\n };\n Selection.prototype.enableDrag = function (e, isUpdate) {\n var gObj = this.parent;\n if (isUpdate) {\n var tr = closest(e.target, 'tr');\n this.startDIndex = parseInt(tr.getAttribute('aria-rowindex'), 10);\n this.startDCellIndex = parseInt(parentsUntil(e.target, 'e-rowcell').getAttribute('aria-colindex'), 10);\n }\n document.body.classList.add('e-disableuserselect');\n var gBRect = gObj.element.getBoundingClientRect();\n var postion = getPosition(e);\n this.x = postion.x - gBRect.left;\n this.y = postion.y - gBRect.top;\n EventHandler.add(gObj.getContent(), 'mousemove', this.mouseMoveHandler, this);\n if (this.parent.frozenRows) {\n EventHandler.add(gObj.getHeaderContent(), 'mousemove', this.mouseMoveHandler, this);\n }\n EventHandler.add(document, 'mouseup', this.mouseUpHandler, this);\n };\n Selection.prototype.clearSelAfterRefresh = function (e) {\n var isInfiniteScroll = this.parent.enableInfiniteScrolling && e.requestType === 'infiniteScroll';\n if (e.requestType !== 'virtualscroll' && !this.parent.isPersistSelection && !isInfiniteScroll) {\n this.clearSelection();\n }\n };\n /**\n * @hidden\n */\n Selection.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.uiUpdate, this.enableAfterRender, this);\n this.parent.on(events.initialEnd, this.initializeSelection, this);\n this.parent.on(events.rowSelectionComplete, this.onActionComplete, this);\n this.parent.on(events.cellSelectionComplete, this.onActionComplete, this);\n this.parent.on(events.inBoundModelChanged, this.onPropertyChanged, this);\n this.parent.on(events.cellFocused, this.onCellFocused, this);\n this.parent.on(events.beforeFragAppend, this.clearSelAfterRefresh, this);\n this.parent.on(events.columnPositionChanged, this.columnPositionChanged, this);\n this.parent.on(events.contentReady, this.initialEnd, this);\n this.actionBeginFunction = this.actionBegin.bind(this);\n this.actionCompleteFunction = this.actionComplete.bind(this);\n this.parent.addEventListener(events.actionBegin, this.actionBeginFunction);\n this.parent.addEventListener(events.actionComplete, this.actionCompleteFunction);\n this.parent.on(events.rowsRemoved, this.rowsRemoved, this);\n this.parent.on(events.headerRefreshed, this.refreshHeader, this);\n this.addEventListener_checkbox();\n };\n /**\n * @hidden\n */\n Selection.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.uiUpdate, this.enableAfterRender);\n this.parent.off(events.initialEnd, this.initializeSelection);\n this.parent.off(events.rowSelectionComplete, this.onActionComplete);\n this.parent.off(events.cellSelectionComplete, this.onActionComplete);\n this.parent.off(events.inBoundModelChanged, this.onPropertyChanged);\n this.parent.off(events.cellFocused, this.onCellFocused);\n this.parent.off(events.beforeFragAppend, this.clearSelAfterRefresh);\n this.parent.off(events.columnPositionChanged, this.columnPositionChanged);\n this.parent.removeEventListener(events.actionBegin, this.actionBeginFunction);\n this.parent.removeEventListener(events.actionComplete, this.actionCompleteFunction);\n this.parent.off(events.rowsRemoved, this.rowsRemoved);\n this.parent.off(events.headerRefreshed, this.refreshHeader);\n this.removeEventListener_checkbox();\n };\n Selection.prototype.wireEvents = function () {\n this.isMacOS = navigator.userAgent.indexOf('Mac OS') !== -1;\n if (this.isMacOS) {\n EventHandler.add(this.parent.element, 'keydown', this.keyDownHandler, this);\n EventHandler.add(this.parent.element, 'keyup', this.keyUpHandler, this);\n }\n };\n Selection.prototype.unWireEvents = function () {\n if (this.isMacOS) {\n EventHandler.remove(this.parent.element, 'keydown', this.keyDownHandler);\n EventHandler.remove(this.parent.element, 'keyup', this.keyUpHandler);\n }\n };\n Selection.prototype.columnPositionChanged = function () {\n if (!this.parent.isPersistSelection) {\n this.clearSelection();\n }\n };\n Selection.prototype.refreshHeader = function () {\n this.setCheckAllState();\n };\n Selection.prototype.rowsRemoved = function (e) {\n for (var i = 0; i < e.records.length; i++) {\n delete (this.selectedRowState[e.records[i][this.primaryKey]]);\n --this.totalRecordsCount;\n }\n this.setCheckAllState();\n };\n ;\n Selection.prototype.beforeFragAppend = function (e) {\n if (e.requestType !== 'virtualscroll' && !this.parent.isPersistSelection) {\n this.clearSelection();\n }\n };\n ;\n Selection.prototype.getCheckAllBox = function () {\n return this.parent.getHeaderContent().querySelector('.e-checkselectall');\n };\n Selection.prototype.enableAfterRender = function (e) {\n if (e.module === this.getModuleName() && e.enable) {\n this.render();\n this.initPerisistSelection();\n }\n };\n Selection.prototype.render = function (e) {\n EventHandler.add(this.parent.getContent(), 'mousedown', this.mouseDownHandler, this);\n EventHandler.add(this.parent.getHeaderContent(), 'mousedown', this.mouseDownHandler, this);\n };\n Selection.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n var gObj = this.parent;\n if (!isNullOrUndefined(e.properties.type) && this.selectionSettings.type === 'Single') {\n if (this.selectedRowCellIndexes.length > 1) {\n this.clearCellSelection();\n this.prevCIdxs = undefined;\n }\n if (this.selectedRowIndexes.length > 1) {\n this.clearRowSelection();\n this.prevRowIndex = undefined;\n }\n if (this.selectedColumnsIndexes.length > 1) {\n this.clearColumnSelection();\n this.prevColIndex = undefined;\n }\n this.enableSelectMultiTouch = false;\n this.hidePopUp();\n }\n if (!isNullOrUndefined(e.properties.mode) ||\n !isNullOrUndefined(e.properties.cellSelectionMode)) {\n this.clearSelection();\n this.prevRowIndex = undefined;\n this.prevCIdxs = undefined;\n this.prevColIndex = undefined;\n }\n this.isPersisted = true;\n this.checkBoxSelectionChanged();\n this.isPersisted = false;\n this.initPerisistSelection();\n var checkboxColumn = this.parent.getColumns().filter(function (col) { return col.type === 'checkbox'; });\n if (checkboxColumn.length) {\n gObj.isCheckBoxSelection = !(this.selectionSettings.checkboxMode === 'ResetOnRowClick');\n }\n this.drawBorders();\n };\n Selection.prototype.hidePopUp = function () {\n if (this.parent.element.querySelector('.e-gridpopup').querySelectorAll('.e-rowselect').length) {\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n };\n Selection.prototype.initialEnd = function (e) {\n var isFrozen = this.parent.isFrozenGrid();\n var isLeftRightFrozen = this.parent.getFrozenMode() === 'Left-Right';\n if (!isFrozen || (isFrozen && (!isLeftRightFrozen && !e.args.isFrozen)\n || (isLeftRightFrozen && e.args.renderFrozenRightContent))) {\n this.parent.off(events.contentReady, this.initialEnd);\n this.selectRow(this.parent.selectedRowIndex);\n }\n };\n Selection.prototype.checkBoxSelectionChanged = function () {\n this.parent.off(events.contentReady, this.checkBoxSelectionChanged);\n var gobj = this.parent;\n var checkboxColumn = gobj.getColumns().filter(function (col) { return col.type === 'checkbox'; });\n if (checkboxColumn.length > 0) {\n gobj.isCheckBoxSelection = true;\n this.chkField = checkboxColumn[0].field;\n this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;\n if (isNullOrUndefined(this.totalRecordsCount)) {\n this.totalRecordsCount = this.getCurrentBatchRecordChanges().length;\n }\n if (this.isSingleSel()) {\n gobj.selectionSettings.type = 'Multiple';\n gobj.dataBind();\n }\n else {\n this.initPerisistSelection();\n }\n }\n if (!gobj.isCheckBoxSelection && !this.isPersisted) {\n this.chkField = null;\n this.initPerisistSelection();\n }\n };\n Selection.prototype.initPerisistSelection = function () {\n var gobj = this.parent;\n if (this.parent.selectionSettings.persistSelection && this.parent.getPrimaryKeyFieldNames().length > 0) {\n gobj.isPersistSelection = true;\n this.ensureCheckboxFieldSelection();\n }\n else if (this.parent.getPrimaryKeyFieldNames().length > 0) {\n gobj.isPersistSelection = false;\n this.ensureCheckboxFieldSelection();\n }\n else {\n gobj.isPersistSelection = false;\n this.selectedRowState = {};\n }\n };\n Selection.prototype.ensureCheckboxFieldSelection = function () {\n var gobj = this.parent;\n this.primaryKey = this.parent.getPrimaryKeyFieldNames()[0];\n if (!gobj.enableVirtualization && this.chkField\n && ((gobj.isPersistSelection && Object.keys(this.selectedRowState).length === 0) ||\n !gobj.isPersistSelection)) {\n var data = this.parent.getDataModule();\n var query = new Query().where(this.chkField, 'equal', true);\n if (!query.params) {\n query.params = this.parent.query.params;\n }\n var dataManager = data.getData({}, query);\n var proxy_1 = this;\n this.parent.showSpinner();\n dataManager.then(function (e) {\n proxy_1.dataSuccess(e.result);\n proxy_1.refreshPersistSelection();\n proxy_1.parent.hideSpinner();\n });\n }\n };\n Selection.prototype.dataSuccess = function (res) {\n for (var i = 0; i < res.length; i++) {\n if (isNullOrUndefined(this.selectedRowState[res[i][this.primaryKey]]) && res[i][this.chkField]) {\n this.selectedRowState[res[i][this.primaryKey]] = res[i][this.chkField];\n }\n }\n this.persistSelectedData = res;\n };\n Selection.prototype.setRowSelection = function (state) {\n if (!this.parent.getDataModule().isRemote() && !isBlazor()) {\n if (state) {\n if (this.parent.groupSettings.columns.length) {\n for (var _i = 0, _a = this.getData().records; _i < _a.length; _i++) {\n var data = _a[_i];\n this.selectedRowState[data[this.primaryKey]] = true;\n }\n }\n else {\n for (var _b = 0, _c = this.getData(); _b < _c.length; _b++) {\n var data = _c[_b];\n this.selectedRowState[data[this.primaryKey]] = true;\n }\n }\n }\n else {\n this.selectedRowState = {};\n }\n // (this.getData()).forEach(function (data) {\n // this.selectedRowState[data[this.primaryKey]] = true;\n // })\n }\n };\n Selection.prototype.getData = function () {\n return this.parent.getDataModule().dataManager.executeLocal(this.parent.getDataModule().generateQuery(true));\n };\n Selection.prototype.refreshPersistSelection = function () {\n var rows = this.parent.getRows();\n if (this.parent.isCheckBoxSelection && this.parent.isFrozenGrid()) {\n var mtbody = this.parent.getMovableContentTbody();\n if (mtbody.querySelector('.e-checkselect')) {\n rows = this.parent.getMovableRows();\n }\n if (this.parent.getFrozenMode() === 'Left-Right') {\n var frtbody = this.parent.getFrozenRightContentTbody();\n if (frtbody.querySelector('.e-checkselect')) {\n rows = this.parent.getFrozenRightRows();\n }\n }\n }\n this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;\n if (rows !== null && rows.length > 0 && (this.parent.isPersistSelection || this.chkField)) {\n var indexes = [];\n for (var j = 0; j < rows.length; j++) {\n var rowObj = this.getRowObj(rows[j]);\n var pKey = rowObj ? rowObj.data ? rowObj.data[this.primaryKey] : null : null;\n if (pKey === null) {\n return;\n }\n var checkState = void 0;\n var chkBox = rows[j].querySelector('.e-checkselect');\n if (this.selectedRowState[pKey] || (this.parent.checkAllRows === 'Check' &&\n this.totalRecordsCount === Object.keys(this.selectedRowState).length && this.chkAllCollec.indexOf(pKey) < 0)\n || (this.parent.checkAllRows === 'Uncheck' && this.chkAllCollec.indexOf(pKey) > 0)\n || (this.parent.checkAllRows === 'Intermediate' && !isNullOrUndefined(this.chkField) && rowObj.data[this.chkField])) {\n indexes.push(parseInt(rows[j].getAttribute('aria-rowindex'), 10));\n checkState = true;\n }\n else {\n checkState = false;\n if (this.checkedTarget !== chkBox && this.parent.isCheckBoxSelection) {\n removeAddCboxClasses(chkBox.nextElementSibling, checkState);\n }\n }\n this.updatePersistCollection(rows[j], checkState);\n }\n this.isSingleSel() && indexes.length > 0 ? this.selectRow(indexes[0], true) : this.selectRows(indexes);\n }\n if (this.parent.isCheckBoxSelection && this.getCurrentBatchRecordChanges().length > 0) {\n this.setCheckAllState();\n }\n };\n Selection.prototype.actionBegin = function (e) {\n if (e.requestType === 'save' && this.parent.isPersistSelection) {\n var editChkBox = this.parent.element.querySelector('.e-edit-checkselect');\n if (!isNullOrUndefined(editChkBox)) {\n var row = closest(editChkBox, '.e-editedrow');\n if (row) {\n if (this.parent.editSettings.mode === 'Dialog') {\n row = this.parent.element.querySelector('.e-dlgeditrow');\n }\n var rowObj = this.getRowObj(row);\n if (!rowObj) {\n return;\n }\n this.selectedRowState[rowObj.data[this.primaryKey]] = rowObj.isSelected = editChkBox.checked;\n }\n else {\n this.isCheckedOnAdd = editChkBox.checked;\n }\n }\n }\n };\n Selection.prototype.actionComplete = function (e) {\n if (e.requestType === 'save' && this.parent.isPersistSelection) {\n if (e.action === 'add' && this.isCheckedOnAdd) {\n var rowObj = this.parent.getRowObjectFromUID(this.parent.getRows()[e.selectedRow].getAttribute('data-uid'));\n this.selectedRowState[rowObj.data[this.primaryKey]] = rowObj.isSelected = this.isCheckedOnAdd;\n }\n this.refreshPersistSelection();\n }\n if (e.requestType === 'delete' && this.parent.isPersistSelection) {\n var records = [];\n if (!isBlazor()) {\n records = e.data;\n }\n else {\n records = this.getSelectedRecords();\n }\n var data = records.slice();\n for (var i = 0; i < data.length; i++) {\n if (!isNullOrUndefined(data[i][this.primaryKey])) {\n this.updatePersistDelete(data[i][this.primaryKey]);\n }\n }\n this.setCheckAllState();\n this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;\n }\n if (e.requestType === 'paging') {\n this.prevRowIndex = undefined;\n this.prevCIdxs = undefined;\n this.prevECIdxs = undefined;\n }\n };\n Selection.prototype.onDataBound = function () {\n if (!this.parent.enableVirtualization && this.parent.isPersistSelection) {\n if (this.selectedRecords.length) {\n this.isPrevRowSelection = true;\n }\n this.refreshPersistSelection();\n }\n if (this.parent.enableVirtualization) {\n this.setCheckAllState();\n }\n if (this.parent.isCheckBoxSelection && !this.initialRowSelection) {\n var totalRecords = this.parent.getRowsObject();\n var indexes = [];\n for (var i = 0; i < totalRecords.length; i++) {\n if (totalRecords[i].isSelected) {\n indexes.push(i);\n }\n }\n if (indexes.length) {\n this.selectRows(indexes);\n }\n this.initialRowSelection = true;\n }\n };\n Selection.prototype.updatePersistSelectedData = function (checkState) {\n if (this.parent.isPersistSelection) {\n var rows = this.parent.getRows();\n for (var i = 0; i < rows.length; i++) {\n this.updatePersistCollection(rows[i], checkState);\n }\n if (this.parent.checkAllRows === 'Uncheck') {\n this.setRowSelection(false);\n this.persistSelectedData = this.parent.getDataModule().isRemote() ? this.persistSelectedData : [];\n }\n else if (this.parent.checkAllRows === 'Check') {\n this.setRowSelection(true);\n this.persistSelectedData = (!this.parent.getDataModule().isRemote() && !isBlazor()) ?\n this.parent.groupSettings.columns.length ? this.getData().records.slice() :\n this.getData().slice() : this.persistSelectedData;\n }\n }\n };\n Selection.prototype.checkSelectAllAction = function (checkState) {\n var cRenderer = this.getRenderer();\n var editForm = this.parent.element.querySelector('.e-gridform');\n this.checkedTarget = this.getCheckAllBox();\n if (checkState && this.getCurrentBatchRecordChanges().length) {\n this.parent.checkAllRows = 'Check';\n this.updatePersistSelectedData(checkState);\n if (isBlazor() && this.parent.enableVirtualization &&\n !isNullOrUndefined(this.parent.contentModule.currentInfo.endIndex)) {\n this.selectRowsByRange(this.parent.contentModule.currentInfo.startIndex, this.parent.contentModule.currentInfo.endIndex);\n }\n else {\n this.selectRowsByRange(cRenderer.getVirtualRowIndex(0), cRenderer.getVirtualRowIndex(this.getCurrentBatchRecordChanges().length - 1));\n }\n }\n else {\n this.parent.checkAllRows = 'Uncheck';\n this.updatePersistSelectedData(checkState);\n this.clearSelection();\n }\n this.chkAllCollec = [];\n if (!isNullOrUndefined(editForm)) {\n var editChkBox = editForm.querySelector('.e-edit-checkselect');\n if (!isNullOrUndefined(editChkBox)) {\n removeAddCboxClasses(editChkBox.nextElementSibling, checkState);\n }\n }\n };\n Selection.prototype.checkSelectAll = function (checkBox) {\n var _this = this;\n var stateStr = this.getCheckAllStatus(checkBox);\n var state = stateStr === 'Check';\n this.isHeaderCheckboxClicked = true;\n if (stateStr === 'Intermediate') {\n state = this.getCurrentBatchRecordChanges().some(function (data) {\n return data[_this.primaryKey] in _this.selectedRowState;\n });\n }\n if (this.parent.isPersistSelection && this.parent.allowPaging) {\n this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;\n }\n this.checkSelectAllAction(!state);\n if (isBlazor() && this.parent.isServerRendered && this.parent.enableVirtualization) {\n var interopAdaptor = 'interopAdaptor';\n var invokeMethodAsync = 'invokeMethodAsync';\n this.parent[interopAdaptor][invokeMethodAsync]('MaintainSelection', !state, 'checkbox', null);\n this.checkBoxState = !state;\n if (!state) {\n var values = 'values';\n var vgenerator = 'vgenerator';\n var rowCache = this.parent.contentModule[vgenerator].rowCache;\n Object[values](rowCache).forEach(function (x) { return x.isSelected = true; });\n for (var i = 0; i < Object.keys(rowCache).length; i++) {\n if (this.parent.selectionModule.selectedRowIndexes.indexOf(Number(Object.keys(rowCache)[i])) === -1) {\n this.parent.selectionModule.selectedRowIndexes.push(Number(Object.keys(rowCache)[i]));\n }\n }\n }\n }\n this.target = null;\n if (this.getCurrentBatchRecordChanges().length > 0) {\n this.setCheckAllState();\n }\n this.triggerChkChangeEvent(checkBox, !state);\n };\n Selection.prototype.getCheckAllStatus = function (ele) {\n var classes = ele ? ele.nextElementSibling.classList :\n this.getCheckAllBox().nextElementSibling.classList;\n var status;\n if (classes.contains('e-check')) {\n status = 'Check';\n }\n else if (classes.contains('e-uncheck')) {\n status = 'Uncheck';\n }\n else if (classes.contains('e-stop')) {\n status = 'Intermediate';\n }\n else {\n status = 'None';\n }\n return status;\n };\n Selection.prototype.checkSelect = function (checkBox) {\n var target = closest(this.checkedTarget, '.e-rowcell');\n var checkObj = checkBox;\n var gObj = this.parent;\n this.isMultiCtrlRequest = true;\n var rIndex = 0;\n this.isHeaderCheckboxClicked = false;\n if (isGroupAdaptive(gObj)) {\n var uid = target.parentElement.getAttribute('data-uid');\n rIndex = gObj.getRows().map(function (m) { return m.getAttribute('data-uid'); }).indexOf(uid);\n }\n else {\n rIndex = parseInt(target.parentElement.getAttribute('aria-rowindex'), 10);\n }\n if (this.parent.isPersistSelection && this.parent.element.querySelectorAll('.e-addedrow').length > 0 &&\n this.parent.editSettings.newRowPosition === 'Top') {\n ++rIndex;\n }\n this.rowCellSelectionHandler(rIndex, parseInt(target.getAttribute('aria-colindex'), 10));\n this.moveIntoUncheckCollection(closest(target, '.e-row'));\n this.setCheckAllState();\n this.isMultiCtrlRequest = false;\n this.triggerChkChangeEvent(checkBox, checkBox.nextElementSibling.classList.contains('e-check'));\n };\n Selection.prototype.moveIntoUncheckCollection = function (row) {\n if (this.parent.checkAllRows === 'Check' || this.parent.checkAllRows === 'Uncheck') {\n var rowObj = this.getRowObj(row);\n var pKey = rowObj && rowObj.data ? rowObj.data[this.primaryKey] : null;\n if (!pKey) {\n return;\n }\n if (this.chkAllCollec.indexOf(pKey) < 0) {\n this.chkAllCollec.push(pKey);\n }\n else {\n this.chkAllCollec.splice(this.chkAllCollec.indexOf(pKey), 1);\n }\n }\n };\n Selection.prototype.triggerChkChangeEvent = function (checkBox, checkState) {\n this.parent.trigger(events.checkBoxChange, {\n checked: checkState, selectedRowIndexes: this.parent.getSelectedRowIndexes(),\n target: checkBox\n });\n if (!this.parent.isEdit) {\n this.checkedTarget = null;\n }\n };\n Selection.prototype.updateSelectedRowIndex = function (index) {\n if (this.parent.isCheckBoxSelection && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)\n && !this.parent.getDataModule().isRemote()\n && !(isBlazor() && this.parent.isServerRendered)) {\n if (this.parent.checkAllRows === 'Check') {\n this.selectedRowIndexes = [];\n var dataLength = this.getData().length;\n for (var data = 0; data < dataLength; data++) {\n this.selectedRowIndexes.push(data);\n }\n }\n else if (this.parent.checkAllRows === 'Uncheck') {\n this.selectedRowIndexes = [];\n }\n else {\n if (index && this.parent.getRowByIndex(index).getAttribute('aria-selected') === 'false') {\n var selectedVal = this.selectedRowIndexes.indexOf(index);\n this.selectedRowIndexes.splice(selectedVal, 1);\n }\n }\n }\n };\n ;\n Selection.prototype.setCheckAllState = function (index, isInteraction) {\n if (this.parent.isCheckBoxSelection || this.parent.selectionSettings.checkboxMode === 'ResetOnRowClick') {\n var checkToSelectAll = void 0;\n var isServerRenderedVirtualization = isBlazor() && this.parent.isServerRendered && this.parent.enableVirtualization;\n if (isServerRenderedVirtualization) {\n var values = 'values';\n var vgenerator = 'vgenerator';\n checkToSelectAll = !Object[values](this.parent.contentModule[vgenerator].rowCache).\n filter(function (x) { return x.isSelected === undefined || x.isSelected === false; }).length &&\n Object[values](this.parent.contentModule[vgenerator].rowCache).\n filter(function (x) { return x.isSelected; }).length === this.selectedRowIndexes.length;\n }\n var checkedLen = Object.keys(this.selectedRowState).length;\n if (!this.parent.isPersistSelection && !(isServerRenderedVirtualization)) {\n checkedLen = this.selectedRowIndexes.length;\n this.totalRecordsCount = this.getCurrentBatchRecordChanges().length;\n }\n var input = this.getCheckAllBox();\n if (input) {\n var spanEle = input.nextElementSibling;\n removeClass([spanEle], ['e-check', 'e-stop', 'e-uncheck']);\n setChecked(input, false);\n input.indeterminate = false;\n if (checkToSelectAll || checkedLen === this.totalRecordsCount && this.totalRecordsCount\n || ((this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)\n && !this.parent.allowPaging && !this.parent.getDataModule().isRemote()\n && !(isBlazor() && this.parent.isServerRendered)\n && checkedLen === this.getData().length)) {\n addClass([spanEle], ['e-check']);\n setChecked(input, true);\n if (isInteraction) {\n this.getRenderer().setSelection(null, true, true);\n }\n this.parent.checkAllRows = 'Check';\n }\n else if (isServerRenderedVirtualization && !this.selectedRowIndexes.length ||\n checkedLen === 0 && !isServerRenderedVirtualization || this.getCurrentBatchRecordChanges().length === 0) {\n addClass([spanEle], ['e-uncheck']);\n if (isInteraction) {\n this.getRenderer().setSelection(null, false, true);\n }\n this.parent.checkAllRows = 'Uncheck';\n if (checkedLen === 0 && this.getCurrentBatchRecordChanges().length === 0) {\n addClass([spanEle.parentElement], ['e-checkbox-disabled']);\n }\n else {\n removeClass([spanEle.parentElement], ['e-checkbox-disabled']);\n }\n }\n else {\n addClass([spanEle], ['e-stop']);\n this.parent.checkAllRows = 'Intermediate';\n input.indeterminate = true;\n }\n if ((this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)\n && !this.parent.allowPaging && !this.parent.getDataModule().isRemote()) {\n this.updateSelectedRowIndex(index);\n }\n }\n }\n };\n Selection.prototype.keyDownHandler = function (e) {\n // Below are keyCode for command key in MAC OS. Safari/Chrome(91-Left command, 93-Right Command), Opera(17), FireFox(224)\n if ((((Browser.info.name === 'chrome') || (Browser.info.name === 'safari')) && (e.keyCode === 91 || e.keyCode === 93)) ||\n (Browser.info.name === 'opera' && e.keyCode === 17) || (Browser.info.name === 'mozilla' && e.keyCode === 224)) {\n this.cmdKeyPressed = true;\n }\n };\n Selection.prototype.keyUpHandler = function (e) {\n if ((((Browser.info.name === 'chrome') || (Browser.info.name === 'safari')) && (e.keyCode === 91 || e.keyCode === 93)) ||\n (Browser.info.name === 'opera' && e.keyCode === 17) || (Browser.info.name === 'mozilla' && e.keyCode === 224)) {\n this.cmdKeyPressed = false;\n }\n };\n Selection.prototype.clickHandler = function (e) {\n var target = e.target;\n this.actualTarget = target;\n if (parentsUntil(target, 'e-row') || parentsUntil(target, 'e-headerchkcelldiv') ||\n (this.selectionSettings.allowColumnSelection && target.classList.contains('e-headercell'))) {\n this.isInteracted = true;\n }\n this.isMultiCtrlRequest = e.ctrlKey || this.enableSelectMultiTouch ||\n (this.isMacOS && this.cmdKeyPressed);\n this.isMultiShiftRequest = e.shiftKey;\n this.popUpClickHandler(e);\n var chkSelect = false;\n this.preventFocus = true;\n var checkBox;\n var checkWrap = parentsUntil(target, 'e-checkbox-wrapper');\n this.checkSelectAllClicked = checkWrap && checkWrap.querySelectorAll('.e-checkselectall') ||\n (this.selectionSettings.persistSelection && parentsUntil(target, 'e-row')) ? true : false;\n if (checkWrap && checkWrap.querySelectorAll('.e-checkselect,.e-checkselectall').length > 0) {\n checkBox = checkWrap.querySelector('input[type=\"checkbox\"]');\n chkSelect = true;\n }\n this.drawBorders();\n this.updateAutoFillPosition();\n target = parentsUntil(target, 'e-rowcell');\n if ((target && target.parentElement.classList.contains('e-row') && !this.parent.selectionSettings.checkboxOnly) || chkSelect) {\n if (this.parent.isCheckBoxSelection) {\n this.isMultiCtrlRequest = true;\n }\n this.target = target;\n if (!isNullOrUndefined(checkBox)) {\n this.checkedTarget = checkBox;\n if (checkBox.classList.contains('e-checkselectall')) {\n this.checkSelectAll(checkBox);\n }\n else {\n this.checkSelect(checkBox);\n }\n }\n else {\n var gObj = this.parent;\n var rIndex = 0;\n if (isGroupAdaptive(gObj)) {\n var uid = target.parentElement.getAttribute('data-uid');\n rIndex = gObj.getRows().map(function (m) { return m.getAttribute('data-uid'); }).indexOf(uid);\n }\n else {\n rIndex = parseInt(target.parentElement.getAttribute('aria-rowindex'), 10);\n }\n if (this.parent.isPersistSelection && this.parent.element.querySelectorAll('.e-addedrow').length > 0) {\n ++rIndex;\n }\n if (!this.mUPTarget || !this.mUPTarget.isEqualNode(target)) {\n this.rowCellSelectionHandler(rIndex, parseInt(target.getAttribute('aria-colindex'), 10));\n }\n this.parent.hoverFrozenRows(e);\n if (this.parent.isCheckBoxSelection) {\n this.moveIntoUncheckCollection(closest(target, '.e-row'));\n this.setCheckAllState();\n }\n }\n if (!this.parent.isCheckBoxSelection && Browser.isDevice && !this.isSingleSel()) {\n this.showPopup(e);\n }\n }\n else if (e.target.classList.contains('e-headercell') &&\n !e.target.classList.contains('e-stackedheadercell')) {\n var uid = e.target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid');\n this.headerSelectionHandler(this.parent.getColumnIndexByUid(uid));\n }\n this.isMultiCtrlRequest = false;\n this.isMultiShiftRequest = false;\n if (isNullOrUndefined(closest(e.target, '.e-unboundcell'))) {\n this.preventFocus = false;\n }\n };\n Selection.prototype.popUpClickHandler = function (e) {\n var target = e.target;\n if (closest(target, '.e-headercell') || e.target.classList.contains('e-rowcell') ||\n closest(target, '.e-gridpopup')) {\n if (target.classList.contains('e-rowselect')) {\n if (!target.classList.contains('e-spanclicked')) {\n target.classList.add('e-spanclicked');\n this.enableSelectMultiTouch = true;\n }\n else {\n target.classList.remove('e-spanclicked');\n this.enableSelectMultiTouch = false;\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n }\n }\n else {\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n };\n Selection.prototype.showPopup = function (e) {\n if (!this.selectionSettings.enableSimpleMultiRowSelection) {\n setCssInGridPopUp(this.parent.element.querySelector('.e-gridpopup'), e, 'e-rowselect e-icons e-icon-rowselect' +\n (!this.isSingleSel() && (this.selectedRecords.length > (this.parent.getFrozenColumns() ? 2 : 1)\n || this.selectedRowCellIndexes.length > 1) ? ' e-spanclicked' : ''));\n }\n };\n Selection.prototype.rowCellSelectionHandler = function (rowIndex, cellIndex) {\n var gObj = this.parent;\n if ((!this.isMultiCtrlRequest && !this.isMultiShiftRequest) || this.isSingleSel()) {\n if (!this.isDragged) {\n this.selectRow(rowIndex, this.selectionSettings.enableToggle);\n }\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, this.selectionSettings.enableToggle);\n if (this.selectedRowCellIndexes.length) {\n this.updateAutoFillPosition();\n }\n this.drawBorders();\n }\n else if (this.isMultiShiftRequest) {\n if (this.parent.isCheckBoxSelection || (!this.parent.isCheckBoxSelection &&\n !closest(this.target, '.e-rowcell').classList.contains('e-gridchkbox'))) {\n this.selectRowsByRange(isUndefined(this.prevRowIndex) ? rowIndex : this.prevRowIndex, rowIndex);\n }\n else {\n this.addRowsToSelection([rowIndex]);\n }\n this.selectCellsByRange(isUndefined(this.prevCIdxs) ? { rowIndex: rowIndex, cellIndex: cellIndex } : this.prevCIdxs, { rowIndex: rowIndex, cellIndex: cellIndex });\n this.updateAutoFillPosition();\n this.drawBorders();\n }\n else {\n this.addRowsToSelection([rowIndex]);\n if (isBlazor() && this.parent.enableVirtualization && this.parent.isServerRendered) {\n var rowIndexes = this.parent.getSelectedRowIndexes();\n var interopAdaptor = 'interopAdaptor';\n var invokeMethodAsync = 'invokeMethodAsync';\n this.parent[interopAdaptor][invokeMethodAsync]('MaintainSelection', true, 'normal', rowIndexes);\n }\n this.addCellsToSelection([{ rowIndex: rowIndex, cellIndex: cellIndex }]);\n this.showHideBorders('none');\n }\n this.isDragged = false;\n };\n /* tslint:disable-next-line:max-func-body-length */\n Selection.prototype.onCellFocused = function (e) {\n if (this.parent.frozenRows && e.container.isHeader && e.byKey) {\n if (e.keyArgs.action === 'upArrow') {\n if (this.parent.allowFiltering) {\n e.isJump = e.element.tagName === 'INPUT' ? true : false;\n }\n else {\n e.isJump = e.element.tagName === 'TH' ? true : false;\n }\n }\n else {\n if (e.keyArgs.action === 'downArrow') {\n var rIdx = Number(e.element.parentElement.getAttribute('aria-rowindex'));\n e.isJump = rIdx === 0 ? true : false;\n }\n else {\n if (e.keyArgs.action === 'ctrlHome') {\n e.isJump = true;\n }\n }\n }\n }\n var clear = this.parent.isFrozenGrid() ? (((e.container.isHeader && e.element.tagName !== 'TD' && e.isJump &&\n !this.selectionSettings.allowColumnSelection) ||\n ((e.container.isContent || e.element.tagName === 'TD') && !(e.container.isSelectable || e.element.tagName === 'TD')))\n && !(e.byKey && e.keyArgs.action === 'space')) : ((e.container.isHeader && e.isJump) ||\n (e.container.isContent && !e.container.isSelectable)) && !(e.byKey && e.keyArgs.action === 'space')\n && !(e.element.classList.contains('e-detailrowexpand') || e.element.classList.contains('e-detailrowcollapse'));\n var headerAction = (e.container.isHeader && e.element.tagName !== 'TD' && !closest(e.element, '.e-rowcell'))\n && !(e.byKey && e.keyArgs.action === 'space');\n if (!e.byKey || clear) {\n if (clear && !this.parent.isCheckBoxSelection) {\n this.clearSelection();\n }\n return;\n }\n var _a = e.container.isContent ? e.container.indexes : e.indexes, rowIndex = _a[0], cellIndex = _a[1];\n var prev = this.focus.getPrevIndexes();\n if (this.parent.frozenRows) {\n if (e.container.isHeader && (e.element.tagName === 'TD' || closest(e.element, '.e-rowcell'))) {\n var thLen = this.parent.getHeaderTable().querySelector('thead').childElementCount;\n rowIndex -= thLen;\n prev.rowIndex = !isNullOrUndefined(prev.rowIndex) ? prev.rowIndex - thLen : null;\n }\n else {\n rowIndex += this.parent.frozenRows;\n prev.rowIndex = prev.rowIndex === 0 || !isNullOrUndefined(prev.rowIndex) ? prev.rowIndex + this.parent.frozenRows : null;\n }\n }\n if (this.parent.isFrozenGrid()) {\n var cIdx = Number(e.element.getAttribute('aria-colindex'));\n var selectedIndexes = this.parent.getSelectedRowCellIndexes();\n if (selectedIndexes.length && prev.cellIndex === 0) {\n prev.cellIndex = selectedIndexes[selectedIndexes.length - 1].cellIndexes[0];\n }\n prev.cellIndex = !isNullOrUndefined(prev.cellIndex) ? (prev.cellIndex === cellIndex ? cIdx : cIdx - 1) : null;\n cellIndex = cIdx;\n }\n if ((headerAction || (['ctrlPlusA', 'escape'].indexOf(e.keyArgs.action) === -1 &&\n e.keyArgs.action !== 'space' && rowIndex === prev.rowIndex && cellIndex === prev.cellIndex)) &&\n !this.selectionSettings.allowColumnSelection) {\n return;\n }\n this.preventFocus = true;\n var columnIndex = this.getKeyColIndex(e);\n if (this.needColumnSelection) {\n cellIndex = columnIndex;\n }\n switch (e.keyArgs.action) {\n case 'downArrow':\n case 'upArrow':\n case 'enter':\n case 'shiftEnter':\n this.target = e.element;\n this.applyDownUpKey(rowIndex, cellIndex);\n break;\n case 'rightArrow':\n case 'leftArrow':\n this.applyRightLeftKey(rowIndex, cellIndex);\n break;\n case 'shiftDown':\n case 'shiftUp':\n this.shiftDownKey(rowIndex, cellIndex);\n break;\n case 'shiftLeft':\n case 'shiftRight':\n this.applyShiftLeftRightKey(rowIndex, cellIndex);\n break;\n case 'home':\n case 'end':\n cellIndex = e.keyArgs.action === 'end' ? this.getLastColIndex(rowIndex) : 0;\n this.applyHomeEndKey(rowIndex, cellIndex);\n break;\n case 'ctrlHome':\n case 'ctrlEnd':\n this.applyCtrlHomeEndKey(rowIndex, cellIndex);\n break;\n case 'escape':\n this.clearSelection();\n break;\n case 'ctrlPlusA':\n this.ctrlPlusA();\n break;\n case 'space':\n this.applySpaceSelection(e.element);\n break;\n case 'tab':\n if (this.parent.editSettings.allowNextRowEdit) {\n this.selectRow(rowIndex);\n }\n break;\n }\n this.needColumnSelection = false;\n this.preventFocus = false;\n this.positionBorders();\n this.updateAutoFillPosition();\n };\n Selection.prototype.getKeyColIndex = function (e) {\n var uid;\n var index = null;\n var stackedHeader = e.element.querySelector('.e-stackedheadercelldiv');\n if (this.selectionSettings.allowColumnSelection && parentsUntil(e.element, 'e-columnheader')) {\n this.needColumnSelection = e.container.isHeader ? true : false;\n if (stackedHeader) {\n if (e.keyArgs.action === 'rightArrow' || e.keyArgs.action === 'leftArrow') {\n return index;\n }\n uid = stackedHeader.getAttribute('e-mappinguid');\n var innerColumn = this.getstackedColumns(this.parent.getColumnByUid(uid).columns);\n var lastIndex = this.parent.getColumnIndexByUid(innerColumn[innerColumn.length - 1].uid);\n var firstIndex = this.parent.getColumnIndexByUid(innerColumn[0].uid);\n index = this.prevColIndex >= lastIndex ? firstIndex : lastIndex;\n }\n else {\n index = this.parent.getColumnIndexByUid(e.element\n .querySelector('.e-headercelldiv').getAttribute('e-mappinguid'));\n }\n }\n return index;\n };\n /**\n * Apply ctrl + A key selection\n * @return {void}\n * @hidden\n */\n Selection.prototype.ctrlPlusA = function () {\n if (this.isRowType() && !this.isSingleSel()) {\n this.selectRowsByRange(0, this.getCurrentBatchRecordChanges().length - 1);\n }\n if (this.isCellType() && !this.isSingleSel()) {\n this.selectCellsByRange({ rowIndex: 0, cellIndex: 0 }, { rowIndex: this.parent.getRows().length - 1, cellIndex: this.parent.getColumns().length - 1 });\n }\n };\n Selection.prototype.applySpaceSelection = function (target) {\n if (target.classList.contains('e-checkselectall')) {\n this.checkedTarget = target;\n this.checkSelectAll(this.checkedTarget);\n }\n else {\n if (target.classList.contains('e-checkselect')) {\n this.checkedTarget = target;\n this.checkSelect(this.checkedTarget);\n }\n }\n };\n Selection.prototype.applyDownUpKey = function (rowIndex, cellIndex) {\n var gObj = this.parent;\n if (this.parent.isCheckBoxSelection && this.parent.checkAllRows === 'Check' && !this.selectionSettings.persistSelection) {\n this.checkSelectAllAction(false);\n this.checkedTarget = null;\n }\n if (this.isRowType()) {\n if (this.parent.frozenRows) {\n this.selectRow(rowIndex, true);\n this.applyUpDown(gObj.selectedRowIndex);\n }\n else {\n this.selectRow(rowIndex, true);\n this.applyUpDown(gObj.selectedRowIndex);\n }\n }\n if (this.isCellType()) {\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);\n }\n if (this.selectionSettings.allowColumnSelection && this.needColumnSelection) {\n this.selectColumn(cellIndex);\n }\n };\n Selection.prototype.applyUpDown = function (rowIndex) {\n if (rowIndex < 0) {\n return;\n }\n if (!this.target) {\n this.target = this.parent.getRows()[0].children[this.parent.groupSettings.columns.length || 0];\n }\n var cIndex = parseInt(this.target.getAttribute('aria-colindex'), 10);\n var frzCols = this.parent.getFrozenColumns();\n if (frzCols) {\n if (cIndex >= frzCols) {\n this.target =\n this.contentRenderer.getMovableRowByIndex(rowIndex).querySelectorAll('.e-rowcell')[cIndex - frzCols];\n }\n else {\n this.target = this.contentRenderer.getRowByIndex(rowIndex).querySelectorAll('.e-rowcell')[cIndex];\n }\n }\n else {\n this.target = this.contentRenderer.getRowByIndex(rowIndex).querySelectorAll('.e-rowcell')[cIndex];\n }\n this.addAttribute(this.target);\n };\n Selection.prototype.applyRightLeftKey = function (rowIndex, cellIndex) {\n var gObj = this.parent;\n if (this.selectionSettings.allowColumnSelection && this.needColumnSelection) {\n this.selectColumn(cellIndex);\n }\n else if (this.isCellType()) {\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);\n this.addAttribute(this.target);\n }\n };\n Selection.prototype.applyHomeEndKey = function (rowIndex, cellIndex) {\n if (this.isCellType()) {\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);\n }\n else {\n this.addAttribute(this.parent.getCellFromIndex(rowIndex, cellIndex));\n }\n };\n /**\n * Apply shift+down key selection\n * @return {void}\n * @hidden\n */\n Selection.prototype.shiftDownKey = function (rowIndex, cellIndex) {\n var gObj = this.parent;\n this.isMultiShiftRequest = true;\n if (this.isRowType() && !this.isSingleSel()) {\n if (!isUndefined(this.prevRowIndex)) {\n this.selectRowsByRange(this.prevRowIndex, rowIndex);\n this.applyUpDown(rowIndex);\n }\n else {\n this.selectRow(0, true);\n }\n }\n if (this.isCellType() && !this.isSingleSel()) {\n this.selectCellsByRange(this.prevCIdxs || { rowIndex: 0, cellIndex: 0 }, { rowIndex: rowIndex, cellIndex: cellIndex });\n }\n this.isMultiShiftRequest = false;\n };\n Selection.prototype.applyShiftLeftRightKey = function (rowIndex, cellIndex) {\n var gObj = this.parent;\n this.isMultiShiftRequest = true;\n if (this.selectionSettings.allowColumnSelection && this.needColumnSelection) {\n this.selectColumnsByRange(this.prevColIndex, cellIndex);\n }\n else {\n this.selectCellsByRange(this.prevCIdxs, { rowIndex: rowIndex, cellIndex: cellIndex });\n }\n this.isMultiShiftRequest = false;\n };\n Selection.prototype.getstackedColumns = function (column) {\n var innerColumnIndexes = [];\n for (var i = 0, len = column.length; i < len; i++) {\n if (column[i].columns) {\n this.getstackedColumns(column[i].columns);\n }\n else {\n innerColumnIndexes.push(column[i]);\n }\n }\n return innerColumnIndexes;\n };\n Selection.prototype.applyCtrlHomeEndKey = function (rowIndex, cellIndex) {\n if (this.isRowType()) {\n this.selectRow(rowIndex, true);\n this.addAttribute(this.parent.getCellFromIndex(rowIndex, cellIndex));\n }\n if (this.isCellType()) {\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);\n }\n };\n Selection.prototype.addRemoveClassesForRow = function (row, isAdd, clearAll) {\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n if (row) {\n var cells = [].slice.call(row.querySelectorAll('.e-rowcell'));\n var detailIndentCell = row.querySelector('.e-detailrowcollapse') || row.querySelector('.e-detailrowexpand');\n var dragdropIndentCell = row.querySelector('.e-rowdragdrop');\n if (detailIndentCell) {\n cells.push(detailIndentCell);\n }\n if (dragdropIndentCell) {\n cells.push(dragdropIndentCell);\n }\n addRemoveActiveClasses.apply(void 0, [cells, isAdd].concat(args));\n }\n this.getRenderer().setSelection(row ? row.getAttribute('data-uid') : null, isAdd, clearAll);\n };\n Selection.prototype.isRowType = function () {\n return this.selectionSettings.mode === 'Row' || this.selectionSettings.mode === 'Both';\n };\n Selection.prototype.isCellType = function () {\n return this.selectionSettings.mode === 'Cell' || this.selectionSettings.mode === 'Both';\n };\n Selection.prototype.isSingleSel = function () {\n return this.selectionSettings.type === 'Single';\n };\n Selection.prototype.getRenderer = function () {\n if (isNullOrUndefined(this.contentRenderer)) {\n this.contentRenderer = this.factory.getRenderer(RenderType.Content);\n }\n return this.contentRenderer;\n };\n /**\n * Gets the collection of selected records.\n * @return {Object[]}\n */\n Selection.prototype.getSelectedRecords = function () {\n var selectedData = [];\n if (!this.selectionSettings.persistSelection) {\n selectedData = this.parent.getRowsObject().filter(function (row) { return row.isSelected; })\n .map(function (m) { return m.data; });\n }\n else {\n selectedData = this.persistSelectedData;\n }\n return selectedData;\n };\n /**\n * Select the column by passing start column index\n * @param {number} startIndex\n */\n Selection.prototype.selectColumn = function (index) {\n var gObj = this.parent;\n if (isNullOrUndefined(gObj.getColumns()[index])) {\n return;\n }\n var column = gObj.getColumnByIndex(index);\n var selectedCol = gObj.getColumnHeaderByUid(column.uid);\n var isColSelected = selectedCol.classList.contains('e-columnselection');\n if ((!gObj.selectionSettings.allowColumnSelection)) {\n return;\n }\n var isMultiColumns = this.selectedColumnsIndexes.length > 1 &&\n this.selectedColumnsIndexes.indexOf(index) > -1;\n this.clearColDependency();\n if (!isColSelected || !this.selectionSettings.enableToggle || isMultiColumns) {\n var args = {\n columnIndex: index, headerCell: selectedCol,\n column: column,\n cancel: false, target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest\n };\n this.onActionBegin(args, events.columnSelecting);\n if (args.cancel) {\n this.disableInteracted();\n return;\n }\n if (!(gObj.selectionSettings.enableToggle && index === this.prevColIndex && isColSelected) || isMultiColumns) {\n this.updateColSelection(selectedCol, index);\n }\n var selectedArgs = {\n columnIndex: index, headerCell: selectedCol,\n column: column,\n target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex\n };\n this.onActionComplete(selectedArgs, events.columnSelected);\n }\n this.updateColProps(index);\n };\n /**\n * Select the columns by passing start and end column index\n * @param {number} startIndex\n * @param {number} endIndex\n */\n Selection.prototype.selectColumnsByRange = function (startIndex, endIndex) {\n var gObj = this.parent;\n if (isNullOrUndefined(gObj.getColumns()[startIndex])) {\n return;\n }\n var indexes = [];\n if (gObj.selectionSettings.type === 'Single' || isNullOrUndefined(endIndex)) {\n indexes[0] = startIndex;\n }\n else {\n var min = startIndex < endIndex;\n for (var i = startIndex; min ? i <= endIndex : i >= endIndex; min ? i++ : i--) {\n indexes.push(i);\n }\n }\n this.selectColumns(indexes);\n };\n /**\n * Select the columns by passing column indexes\n * @param {number[]} columnIndexes\n */\n Selection.prototype.selectColumns = function (columnIndexes) {\n var gObj = this.parent;\n var selectedCol = this.getselectedCols();\n if (gObj.selectionSettings.type === 'Single') {\n columnIndexes = [columnIndexes[0]];\n }\n if (!gObj.selectionSettings.allowColumnSelection) {\n return;\n }\n this.clearColDependency();\n var selectingArgs = {\n columnIndex: columnIndexes[0], headerCell: selectedCol,\n columnIndexes: columnIndexes,\n column: gObj.getColumnByIndex(columnIndexes[0]),\n cancel: false, target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest\n };\n this.onActionBegin(selectingArgs, events.columnSelecting);\n if (selectingArgs.cancel) {\n this.disableInteracted();\n return;\n }\n for (var i = 0, len = columnIndexes.length; i < len; i++) {\n this.updateColSelection(gObj.getColumnHeaderByUid(gObj.getColumnByIndex(columnIndexes[i]).uid), columnIndexes[i]);\n }\n selectedCol = this.getselectedCols();\n var selectedArgs = {\n columnIndex: columnIndexes[0], headerCell: selectedCol,\n columnIndexes: columnIndexes,\n column: gObj.getColumnByIndex(columnIndexes[0]),\n target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex\n };\n this.onActionComplete(selectedArgs, events.columnSelected);\n this.updateColProps(columnIndexes[0]);\n };\n /**\n * Select the column with existing column by passing column index\n * @param {number} startIndex\n */\n Selection.prototype.selectColumnWithExisting = function (startIndex) {\n var gObj = this.parent;\n if (isNullOrUndefined(gObj.getColumns()[startIndex])) {\n return;\n }\n var frzCols = gObj.getFrozenColumns();\n var isFreeze = frzCols && startIndex >= frzCols;\n var newCol = gObj.getColumnHeaderByUid(gObj.getColumnByIndex(startIndex).uid);\n var selectedCol = this.getselectedCols();\n if (gObj.selectionSettings.type === 'Single') {\n this.clearColDependency();\n }\n if (!gObj.selectionSettings.allowColumnSelection) {\n return;\n }\n var rows = !isFreeze ? gObj.getDataRows() : gObj.getMovableRows();\n if (this.selectedColumnsIndexes.indexOf(startIndex) > -1) {\n this.clearColumnSelection(startIndex);\n }\n else {\n var selectingArgs = {\n columnIndex: startIndex, headerCell: selectedCol,\n columnIndexes: this.selectedColumnsIndexes,\n column: gObj.getColumnByIndex(startIndex),\n cancel: false, target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest\n };\n this.onActionBegin(selectingArgs, events.columnSelecting);\n if (selectingArgs.cancel) {\n this.disableInteracted();\n return;\n }\n this.updateColSelection(newCol, startIndex);\n selectedCol = this.getselectedCols();\n var selectedArgs = {\n columnIndex: startIndex, headerCell: selectedCol,\n column: gObj.getColumnByIndex(startIndex),\n columnIndexes: this.selectedColumnsIndexes,\n target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex\n };\n this.onActionComplete(selectedArgs, events.columnSelected);\n }\n this.updateColProps(startIndex);\n };\n /**\n * Clear the column selection\n */\n Selection.prototype.clearColumnSelection = function (clearIndex) {\n if (this.isColumnSelected) {\n var gObj = this.parent;\n if (!isNullOrUndefined(clearIndex) && this.selectedColumnsIndexes.indexOf(clearIndex) === -1) {\n return;\n }\n var index = !isNullOrUndefined(clearIndex) ? clearIndex :\n this.selectedColumnsIndexes[this.selectedColumnsIndexes.length - 1];\n var col = gObj.getColumnByIndex(index);\n var selectedCol = void 0;\n var column = gObj.getColumnByIndex(index);\n if (col.getFreezeTableName() === 'frozen-right') {\n selectedCol = gObj.getFrozenRightColumnHeaderByIndex(index);\n }\n else if (col.getFreezeTableName() === 'movable') {\n selectedCol = gObj.getMovableColumnHeaderByIndex(index);\n }\n else {\n selectedCol = gObj.getColumnHeaderByUid(column.uid);\n }\n var deselectedArgs = {\n columnIndex: index, headerCell: selectedCol,\n columnIndexes: this.selectedColumnsIndexes,\n column: column,\n cancel: false, target: this.actualTarget,\n isInteracted: this.isInteracted\n };\n var isCanceled = this.columnDeselect(deselectedArgs, events.columnDeselecting);\n if (isCanceled) {\n this.disableInteracted();\n return;\n }\n var selectedHeader = !isNullOrUndefined(clearIndex) ? [selectedCol] :\n [].slice.call(gObj.getHeaderContent().querySelectorAll('.e-columnselection'));\n var selectedCells = this.getSelectedColumnCells(clearIndex);\n for (var i = 0, len = selectedHeader.length; i < len; i++) {\n addRemoveActiveClasses([selectedHeader[i]], false, 'e-columnselection');\n }\n for (var i = 0, len = selectedCells.length; i < len; i++) {\n addRemoveActiveClasses([selectedCells[i]], false, 'e-columnselection');\n }\n if (!isNullOrUndefined(clearIndex)) {\n this.selectedColumnsIndexes.splice(this.selectedColumnsIndexes.indexOf(clearIndex), 1);\n this.parent.getColumns()[clearIndex].isSelected = false;\n }\n else {\n this.columnDeselect(deselectedArgs, events.columnDeselected);\n this.selectedColumnsIndexes = [];\n this.isColumnSelected = false;\n this.parent.getColumns().filter(function (col) { return col.isSelected = false; });\n }\n }\n };\n Selection.prototype.getselectedCols = function () {\n var gObj = this.parent;\n var selectedCol;\n if (this.selectedColumnsIndexes.length > 1) {\n selectedCol = [];\n for (var i = 0; i < this.selectedColumnsIndexes.length; i++) {\n (selectedCol).push(gObj.getColumnHeaderByUid(gObj.getColumnByIndex(this.selectedColumnsIndexes[i]).uid));\n }\n }\n else {\n selectedCol = gObj.getColumnHeaderByUid(gObj.getColumnByIndex(this.selectedColumnsIndexes[0]).uid);\n }\n return selectedCol;\n };\n Selection.prototype.getSelectedColumnCells = function (clearIndex) {\n var gObj = this.parent;\n var isRowTemplate = !isNullOrUndefined(this.parent.rowTemplate);\n var rows = isRowTemplate ? gObj.getRows() : gObj.getDataRows();\n var movableRows;\n var frRows;\n if (gObj.isFrozenGrid() && gObj.getContent().querySelector('.e-movablecontent')) {\n movableRows = isRowTemplate ? gObj.getMovableRows() : gObj.getMovableDataRows();\n rows = gObj.addMovableRows(rows, movableRows);\n if (gObj.getFrozenMode() === 'Left-Right') {\n frRows = isRowTemplate ? gObj.getFrozenRightRows() : gObj.getFrozenRightDataRows();\n rows = gObj.addMovableRows(rows, frRows);\n }\n }\n var seletedcells = [];\n var selectionString = !isNullOrUndefined(clearIndex) ? '[aria-colindex=\"' + clearIndex + '\"]' : '.e-columnselection';\n for (var i = 0, len = rows.length; i < len; i++) {\n seletedcells = seletedcells.concat([].slice.call(rows[i].querySelectorAll(selectionString)));\n }\n return seletedcells;\n };\n Selection.prototype.columnDeselect = function (args, event) {\n if (event === 'columnDeselected') {\n delete args.cancel;\n }\n this.onActionComplete(args, event);\n return args.cancel;\n };\n Selection.prototype.updateColProps = function (startIndex) {\n this.prevColIndex = startIndex;\n this.isColumnSelected = this.selectedColumnsIndexes.length && true;\n };\n Selection.prototype.clearColDependency = function () {\n this.clearColumnSelection();\n this.selectedColumnsIndexes = [];\n };\n Selection.prototype.updateColSelection = function (selectedCol, startIndex) {\n if (isNullOrUndefined(this.parent.getColumns()[startIndex])) {\n return;\n }\n var left = this.parent.getFrozenLeftCount();\n var movable = this.parent.getMovableColumnsCount();\n var col = this.parent.getColumnByIndex(startIndex);\n var isRowTemplate = !isNullOrUndefined(this.parent.rowTemplate);\n var rows;\n this.selectedColumnsIndexes.push(startIndex);\n this.parent.getColumns()[startIndex].isSelected = true;\n if (col.getFreezeTableName() === 'frozen-right') {\n startIndex = startIndex - (left + movable);\n rows = isRowTemplate ? this.parent.getFrozenRightRows() : this.parent.getFrozenRightDataRows();\n }\n else if (col.getFreezeTableName() === 'movable') {\n startIndex = startIndex - left;\n rows = isRowTemplate ? this.parent.getMovableRows() : this.parent.getMovableDataRows();\n }\n else {\n startIndex = startIndex + this.parent.getIndentCount();\n rows = isRowTemplate ? this.parent.getRows() : this.parent.getDataRows();\n }\n addRemoveActiveClasses([selectedCol], true, 'e-columnselection');\n for (var j = 0, len = rows.length; j < len; j++) {\n if (rows[j].classList.contains('e-row')) {\n if ((rows[j].classList.contains('e-editedrow') || rows[j].classList.contains('e-addedrow')) &&\n this.parent.editSettings.mode === 'Normal' && !isNullOrUndefined(rows[j].querySelector('tr').childNodes[startIndex])) {\n addRemoveActiveClasses([rows[j].querySelector('tr').childNodes[startIndex]], true, 'e-columnselection');\n }\n else if (!isNullOrUndefined(rows[j].childNodes[startIndex])) {\n addRemoveActiveClasses([rows[j].childNodes[startIndex]], true, 'e-columnselection');\n }\n }\n }\n };\n Selection.prototype.headerSelectionHandler = function (colIndex) {\n if ((!this.isMultiCtrlRequest && !this.isMultiShiftRequest) || this.isSingleSel()) {\n this.selectColumn(colIndex);\n }\n else if (this.isMultiShiftRequest) {\n this.selectColumnsByRange(isUndefined(this.prevColIndex) ? colIndex : this.prevColIndex, colIndex);\n }\n else {\n this.selectColumnWithExisting(colIndex);\n }\n };\n Selection.prototype.addEventListener_checkbox = function () {\n var _this = this;\n this.parent.on(events.dataReady, this.dataReady, this);\n this.onDataBoundFunction = this.onDataBound.bind(this);\n this.parent.addEventListener(events.dataBound, this.onDataBoundFunction);\n this.parent.on(events.contentReady, this.checkBoxSelectionChanged, this);\n this.parent.on(events.beforeRefreshOnDataChange, this.initPerisistSelection, this);\n this.parent.on(events.onEmpty, this.setCheckAllForEmptyGrid, this);\n this.actionCompleteFunc = this.actionCompleteHandler.bind(this);\n this.parent.addEventListener(events.actionComplete, this.actionCompleteFunc);\n this.parent.on(events.click, this.clickHandler, this);\n this.resizeEndFn = function () {\n _this.updateAutoFillPosition();\n _this.drawBorders();\n };\n this.resizeEndFn.bind(this);\n this.parent.addEventListener(events.resizeStop, this.resizeEndFn);\n };\n Selection.prototype.removeEventListener_checkbox = function () {\n this.parent.off(events.dataReady, this.dataReady);\n this.parent.removeEventListener(events.dataBound, this.onDataBoundFunction);\n this.parent.removeEventListener(events.actionComplete, this.actionCompleteFunc);\n this.parent.off(events.onEmpty, this.setCheckAllForEmptyGrid);\n this.parent.off(events.click, this.clickHandler);\n this.parent.off(events.beforeRefreshOnDataChange, this.initPerisistSelection);\n };\n Selection.prototype.setCheckAllForEmptyGrid = function () {\n var checkAllBox = this.getCheckAllBox();\n if (checkAllBox) {\n this.parent.isCheckBoxSelection = true;\n var spanEle = checkAllBox.nextElementSibling;\n removeClass([spanEle], ['e-check', 'e-stop', 'e-uncheck']);\n }\n };\n Selection.prototype.dataReady = function (e) {\n this.isHeaderCheckboxClicked = false;\n var isInfinitecroll = this.parent.enableInfiniteScrolling && e.requestType === 'infiniteScroll';\n if (e.requestType !== 'virtualscroll' && !this.parent.isPersistSelection && !isInfinitecroll) {\n this.disableUI = !this.parent.enableImmutableMode;\n this.clearSelection();\n this.setCheckAllState();\n this.disableUI = false;\n }\n };\n Selection.prototype.actionCompleteHandler = function (e) {\n if (e.requestType === 'save' && this.parent.isPersistSelection) {\n this.refreshPersistSelection();\n }\n };\n Selection.prototype.selectRowIndex = function (index) {\n this.parent.isSelectedRowIndexUpdating = true;\n this.parent.selectedRowIndex = index;\n };\n Selection.prototype.disableInteracted = function () {\n this.isInteracted = false;\n };\n Selection.prototype.activeTarget = function () {\n this.actualTarget = this.isInteracted ? this.actualTarget : null;\n };\n return Selection;\n}());\nexport { Selection };\n","import { extend, isNullOrUndefined, isBlazor } from '@syncfusion/ej2-base';\nimport * as events from '../base/constant';\nimport { isActionPrevent } from '../base/util';\n/**\n * The `Search` module is used to handle search action.\n */\nvar Search = /** @class */ (function () {\n /**\n * Constructor for Grid search module.\n * @hidden\n */\n function Search(parent) {\n this.parent = parent;\n this.addEventListener();\n }\n /**\n * Searches Grid records by given key.\n *\n * > You can customize the default search action by using [`searchSettings`](grid/#searchsettings/).\n * @param {string} searchString - Defines the key.\n * @return {void}\n */\n Search.prototype.search = function (searchString) {\n var gObj = this.parent;\n searchString = isNullOrUndefined(searchString) ? '' : searchString;\n if (isActionPrevent(gObj)) {\n gObj.notify(events.preventBatch, { instance: this, handler: this.search, arg1: searchString });\n return;\n }\n if (searchString !== gObj.searchSettings.key) {\n gObj.searchSettings.key = searchString.toString();\n gObj.dataBind();\n }\n else if (this.refreshSearch) {\n gObj.refresh();\n }\n };\n /**\n * @hidden\n */\n Search.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.inBoundModelChanged, this.onPropertyChanged, this);\n this.parent.on(events.searchComplete, this.onSearchComplete, this);\n this.parent.on(events.destroy, this.destroy, this);\n this.actionCompleteFunc = this.onActionComplete.bind(this);\n this.parent.addEventListener(events.actionComplete, this.actionCompleteFunc);\n this.parent.on(events.cancelBegin, this.cancelBeginEvent, this);\n };\n /**\n * @hidden\n */\n Search.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.inBoundModelChanged, this.onPropertyChanged);\n this.parent.off(events.searchComplete, this.onSearchComplete);\n this.parent.off(events.destroy, this.destroy);\n this.parent.removeEventListener(events.actionComplete, this.actionCompleteFunc);\n this.parent.off(events.cancelBegin, this.cancelBeginEvent);\n };\n /**\n * To destroy the print\n * @return {void}\n * @hidden\n */\n Search.prototype.destroy = function () {\n this.removeEventListener();\n };\n /**\n * @hidden\n */\n Search.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n if (!isNullOrUndefined(e.properties.key)) {\n this.parent.notify(events.modelChanged, {\n requestType: 'searching', type: events.actionBegin, searchString: this.parent.searchSettings.key\n });\n }\n else {\n this.parent.notify(events.modelChanged, {\n requestType: 'searching', type: events.actionBegin\n });\n }\n };\n /**\n * The function used to trigger onActionComplete\n * @return {void}\n * @hidden\n */\n Search.prototype.onSearchComplete = function (e) {\n if (isBlazor() && !this.parent.isJsComponent) {\n e.rows = null;\n }\n this.parent.trigger(events.actionComplete, extend(e, {\n searchString: this.parent.searchSettings.key, requestType: 'searching', type: events.actionComplete\n }));\n };\n Search.prototype.onActionComplete = function (e) {\n this.refreshSearch = e.requestType !== 'searching';\n };\n Search.prototype.cancelBeginEvent = function (e) {\n if (e.requestType === 'searching') {\n this.parent.setProperties({ searchSettings: { key: '' } }, true);\n }\n };\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Search.prototype.getModuleName = function () {\n return 'search';\n };\n return Search;\n}());\nexport { Search };\n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { formatUnit } from '@syncfusion/ej2-base';\nimport { columnWidthChanged, preventFrozenScrollRefresh } from '../base/constant';\nimport { Column } from '../models/column';\nimport { parentsUntil, ispercentageWidth, getScrollBarWidth } from '../base/util';\n/**\n * ColumnWidthService\n * @hidden\n */\nvar ColumnWidthService = /** @class */ (function () {\n function ColumnWidthService(parent) {\n this.parent = parent;\n }\n ColumnWidthService.prototype.setWidthToColumns = function () {\n var i = 0;\n var indexes = this.parent.getColumnIndexesInView();\n var wFlag = true;\n var totalColumnsWidth = 0;\n if (this.parent.allowGrouping) {\n for (var len = this.parent.groupSettings.columns.length; i < len; i++) {\n if (this.parent.enableColumnVirtualization && indexes.indexOf(i) === -1) {\n wFlag = false;\n continue;\n }\n this.setColumnWidth(new Column({ width: '30px' }), i);\n }\n }\n if (this.parent.detailTemplate || this.parent.childGrid) {\n this.setColumnWidth(new Column({ width: '30px' }), i);\n i++;\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() !== 'Right') {\n this.setColumnWidth(new Column({ width: '30px' }), i);\n i++;\n }\n var columns = this.parent.getColumns();\n for (var j = 0; j < columns.length; j++) {\n this.setColumnWidth(columns[j], wFlag && this.parent.enableColumnVirtualization ? undefined : j + i);\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() === 'Right') {\n this.setColumnWidth(new Column({ width: '30px' }), columns.length);\n }\n totalColumnsWidth = this.getTableWidth(this.parent.getColumns());\n if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1) {\n this.setMinwidthBycalculation(totalColumnsWidth);\n }\n };\n ColumnWidthService.prototype.setMinwidthBycalculation = function (tWidth) {\n var difference = 0;\n var collection = this.parent.getColumns().filter(function (a) {\n return isNullOrUndefined(a.width) || a.width === 'auto';\n });\n if (collection.length) {\n if (!isNullOrUndefined(this.parent.width) && this.parent.width !== 'auto' &&\n typeof (this.parent.width) === 'string' && this.parent.width.indexOf('%') === -1) {\n difference = (typeof this.parent.width === 'string' ? parseInt(this.parent.width, 10) : this.parent.width) - tWidth;\n }\n else {\n difference = this.parent.element.getBoundingClientRect().width - tWidth;\n }\n var tmWidth = 0;\n for (var _i = 0, collection_1 = collection; _i < collection_1.length; _i++) {\n var cols = collection_1[_i];\n tmWidth += !isNullOrUndefined(cols.minWidth) ?\n ((typeof cols.minWidth === 'string' ? parseInt(cols.minWidth, 10) : cols.minWidth)) : 0;\n }\n for (var i = 0; i < collection.length; i++) {\n if (tWidth === 0 && this.parent.allowResizing && this.isWidthUndefined() && (i !== collection.length - 1)) {\n this.setUndefinedColumnWidth(collection);\n }\n if (tWidth !== 0 && difference < tmWidth) {\n this.setWidth(collection[i].minWidth, this.parent.getColumnIndexByField(collection[i].field));\n }\n else if (tWidth !== 0 && difference > tmWidth) {\n this.setWidth('', this.parent.getColumnIndexByField(collection[i].field) + this.parent.getIndentCount(), true);\n }\n }\n }\n };\n ColumnWidthService.prototype.setUndefinedColumnWidth = function (collection) {\n for (var k = 0; k < collection.length; k++) {\n if (k !== collection.length - 1) {\n collection[k].width = 200;\n this.setWidth(200, this.parent.getColumnIndexByField(collection[k].field));\n }\n }\n };\n ColumnWidthService.prototype.setColumnWidth = function (column, index, module) {\n if (this.parent.getColumns().length < 1) {\n return;\n }\n var columnIndex = isNullOrUndefined(index) ? this.parent.getNormalizedColumnIndex(column.uid) : index;\n var cWidth = this.getWidth(column);\n var tgridWidth = this.getTableWidth(this.parent.getColumns());\n if (cWidth !== null) {\n this.setWidth(cWidth, columnIndex);\n if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1) {\n this.setMinwidthBycalculation(tgridWidth);\n }\n if ((this.parent.allowResizing && module === 'resize') || (this.parent.getFrozenColumns() && this.parent.allowResizing)) {\n this.setWidthToTable();\n }\n this.parent.notify(columnWidthChanged, { index: columnIndex, width: cWidth, column: column, module: module });\n }\n };\n ColumnWidthService.prototype.setWidth = function (width, index, clear) {\n if (this.parent.groupSettings.columns.length > index && ispercentageWidth(this.parent)) {\n var elementWidth = this.parent.element.offsetWidth;\n width = (30 / elementWidth * 100).toFixed(1) + '%';\n }\n var header = this.parent.getHeaderTable();\n var content = this.parent.getContentTable();\n var fWidth = formatUnit(width);\n var headerCol;\n var frzCols = this.parent.getFrozenColumns();\n var isDraggable = this.parent.isRowDragable();\n frzCols = frzCols && isDraggable ? frzCols + 1 : frzCols;\n var mHdr = this.parent.getHeaderContent().querySelector('.e-movableheader');\n var mCont = this.parent.getContent().querySelector('.e-movablecontent');\n var freezeLeft = this.parent.getFrozenLeftColumnsCount();\n var freezeRight = this.parent.getFrozenRightColumnsCount();\n var movableCount = this.parent.getMovableColumnsCount();\n var isColFrozen = freezeLeft !== 0 || freezeRight !== 0;\n if (frzCols && index >= frzCols && mHdr && mHdr.querySelector('colgroup')) {\n headerCol = mHdr.querySelector('colgroup').children[index - frzCols];\n }\n else if (this.parent.enableColumnVirtualization && frzCols && this.parent.contentModule.isXaxis()\n && mHdr.scrollLeft > 0) {\n var colGroup = mHdr.querySelector('colgroup');\n headerCol = colGroup.children[(colGroup.children.length - 1) - index];\n }\n else if (isColFrozen) {\n var target = void 0;\n if (freezeLeft && !freezeRight) {\n index = isDraggable ? index - 1 : index;\n target = index < freezeLeft ? header : mHdr;\n }\n else if (!freezeLeft && freezeRight) {\n target = index >= movableCount ? header : mHdr;\n }\n else if (freezeLeft && freezeRight) {\n index = isDraggable ? index - 1 : index;\n var frHdr = this.parent.getFrozenRightHeader();\n target = index < freezeLeft ? header : index < (freezeLeft + movableCount) ? mHdr : frHdr;\n }\n headerCol = this.getColumnLevelFrozenColgroup(index, freezeLeft, movableCount, target);\n if (!headerCol) {\n return;\n }\n }\n else {\n headerCol = header.querySelector('colgroup').children[index];\n }\n if (headerCol && !clear) {\n headerCol.style.width = fWidth;\n }\n else if (headerCol && clear) {\n headerCol.style.width = '';\n }\n var contentCol;\n if (frzCols && index >= frzCols) {\n contentCol = this.parent.getContent().querySelector('.e-movablecontent')\n .querySelector('colgroup').children[index - frzCols];\n }\n else if (this.parent.enableColumnVirtualization && frzCols && this.parent.contentModule.isXaxis()\n && mCont.scrollLeft > 0) {\n var colGroup = this.parent.getContent().querySelector('.e-movablecontent')\n .querySelector('colgroup');\n contentCol = colGroup.children[(colGroup.children.length - 1) - index];\n }\n else if (isColFrozen) {\n var target = void 0;\n if (freezeLeft && !freezeRight) {\n target = index < freezeLeft ? content : mCont;\n }\n if (!freezeLeft && freezeRight) {\n target = index >= movableCount ? content : mCont;\n }\n if (freezeLeft && freezeRight) {\n var frCont = this.parent.getContent().querySelector('.e-frozen-right-content');\n target = index < freezeLeft ? content : index < (freezeLeft + movableCount) ? mCont : frCont;\n }\n contentCol = this.getColumnLevelFrozenColgroup(index, freezeLeft, movableCount, target);\n }\n else {\n contentCol = content.querySelector('colgroup').children[index];\n }\n if (contentCol && !clear) {\n contentCol.style.width = fWidth;\n }\n else if (contentCol && clear) {\n contentCol.style.width = '';\n }\n var edit = this.parent.element.querySelectorAll('.e-table.e-inline-edit');\n var editTableCol = [];\n for (var i = 0; i < edit.length; i++) {\n if (parentsUntil(edit[i], 'e-grid').id === this.parent.element.id) {\n for (var j = 0; j < edit[i].querySelector('colgroup').children.length; j++) {\n editTableCol.push(edit[i].querySelector('colgroup').children[j]);\n }\n }\n }\n if (edit.length && editTableCol.length) {\n editTableCol[index].style.width = fWidth;\n }\n if (this.parent.isFrozenGrid()) {\n this.refreshFrozenScrollbar();\n }\n };\n ColumnWidthService.prototype.getColumnLevelFrozenColgroup = function (index, left, movable, ele) {\n if (!ele || !ele.querySelector('colgroup')) {\n return null;\n }\n var columns = this.parent.getColumns();\n var isDrag = this.parent.isRowDragable();\n var frzMode = this.parent.getFrozenMode();\n var headerCol;\n var colGroup = [].slice.call(ele.querySelector('colgroup').children);\n if (frzMode === 'Right' && isDrag && index === (movable + this.parent.getFrozenRightColumnsCount())) {\n headerCol = colGroup[colGroup.length - 1];\n }\n else if (isDrag && index === -1) {\n headerCol = colGroup[0];\n }\n else if (columns[index].freeze === 'Left') {\n headerCol = colGroup[isDrag ? (index + 1) : index];\n }\n else if (columns[index].freeze === 'Right') {\n headerCol = colGroup[index - (left + movable)];\n }\n else {\n headerCol = colGroup[index - left];\n }\n return headerCol;\n };\n /** @hidden */\n ColumnWidthService.prototype.refreshFrozenScrollbar = function () {\n var args = { cancel: false };\n this.parent.notify(preventFrozenScrollRefresh, args);\n if (args.cancel) {\n return;\n }\n var scrollWidth = getScrollBarWidth();\n var frozenScrollbar = this.parent.element.querySelector('.e-frozenscrollbar');\n var movableScrollbar = this.parent.element.querySelector('.e-movablescrollbar');\n var frozencontent = this.parent.getContent().querySelector('.e-frozencontent');\n var movableContent = this.parent.getContent().querySelector('.e-movablecontent');\n var frozenWidth = frozencontent.firstElementChild.getBoundingClientRect().width;\n var movableWidth = movableContent.firstElementChild.getBoundingClientRect().width;\n if (this.parent.getFrozenMode() === 'Right') {\n frozenWidth = frozenWidth + scrollWidth;\n }\n frozenScrollbar.style.width = frozenWidth + 'px';\n if (this.parent.getFrozenMode() === 'Left-Right') {\n var frozenRightScrollbar = this.parent.element.querySelector('.e-frozen-right-scrollbar');\n var frozenRightWidth = this.parent.getContent().querySelector('.e-frozen-right-content')\n .firstElementChild.getBoundingClientRect().width;\n if (this.parent.height !== 'auto') {\n frozenRightWidth = frozenRightWidth + scrollWidth;\n }\n frozenRightScrollbar.style.width = frozenRightWidth + 'px';\n }\n else {\n if (this.parent.enableColumnVirtualization) {\n var placeHolder = this.parent.getMovableVirtualContent().querySelector('.e-virtualtrack');\n if (placeHolder) {\n movableWidth = placeHolder.scrollWidth;\n }\n }\n if (this.parent.getFrozenMode() !== 'Right' && this.parent.height !== 'auto') {\n movableWidth = movableWidth + scrollWidth;\n }\n }\n movableScrollbar.firstElementChild.style.width = movableWidth + 'px';\n };\n ColumnWidthService.prototype.getSiblingsHeight = function (element) {\n var previous = this.getHeightFromDirection(element, 'previous');\n var next = this.getHeightFromDirection(element, 'next');\n return previous + next;\n };\n ColumnWidthService.prototype.getHeightFromDirection = function (element, direction) {\n var sibling = element[direction + 'ElementSibling'];\n var result = 0;\n var classList = ['e-gridheader', 'e-gridfooter', 'e-groupdroparea', 'e-gridpager', 'e-toolbar'];\n while (sibling) {\n if (classList.some(function (value) { return sibling.classList.contains(value); })) {\n result += sibling.offsetHeight;\n }\n sibling = sibling[direction + 'ElementSibling'];\n }\n return result;\n };\n ColumnWidthService.prototype.isWidthUndefined = function () {\n var isWidUndefCount = this.parent.getColumns().filter(function (col) {\n return isNullOrUndefined(col.width) && isNullOrUndefined(col.minWidth);\n }).length;\n return (this.parent.getColumns().length === isWidUndefCount);\n };\n ColumnWidthService.prototype.getWidth = function (column) {\n if (isNullOrUndefined(column.width) && this.parent.allowResizing\n && isNullOrUndefined(column.minWidth) && !this.isWidthUndefined()) {\n column.width = 200;\n }\n if (this.parent.isFrozenGrid() && isNullOrUndefined(column.width) &&\n (column.getFreezeTableName() === 'frozen-left' || column.getFreezeTableName() === 'frozen-right')) {\n column.width = 200;\n }\n if (!column.width) {\n return null;\n }\n var width = parseInt(column.width.toString(), 10);\n if (column.minWidth && width < parseInt(column.minWidth.toString(), 10)) {\n return column.minWidth;\n }\n else if ((column.maxWidth && width > parseInt(column.maxWidth.toString(), 10))) {\n return column.maxWidth;\n }\n else {\n return column.width;\n }\n };\n ColumnWidthService.prototype.getTableWidth = function (columns) {\n var tWidth = 0;\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var column = columns_1[_i];\n var cWidth = this.getWidth(column);\n if (column.width === 'auto') {\n cWidth = 0;\n }\n if (column.visible !== false && cWidth !== null) {\n tWidth += parseInt(cWidth.toString(), 10);\n }\n }\n return tWidth;\n };\n ColumnWidthService.prototype.calcMovableOrFreezeColWidth = function (tableType) {\n var columns = this.parent.getColumns().slice();\n var left = this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenColumns();\n var movable = this.parent.getMovableColumnsCount();\n var right = this.parent.getFrozenRightColumnsCount();\n if (tableType === 'movable') {\n if (right) {\n columns.splice(left + movable, columns.length);\n }\n if (left) {\n columns.splice(0, left);\n }\n }\n else if (tableType === 'freeze-left') {\n columns.splice(left, columns.length);\n }\n else if (tableType === 'freeze-right') {\n columns.splice(0, left + movable);\n }\n return formatUnit(this.getTableWidth(columns));\n };\n ColumnWidthService.prototype.setWidthToFrozenRightTable = function () {\n var freezeWidth = this.calcMovableOrFreezeColWidth('freeze-right');\n freezeWidth = this.isAutoResize() ? '100%' : freezeWidth;\n var headerTbl = this.parent.getHeaderContent().querySelector('.e-frozen-right-header').querySelector('.e-table');\n var cntTbl = this.parent.getContent().querySelector('.e-frozen-right-content').querySelector('.e-table');\n headerTbl.style.width = freezeWidth;\n cntTbl.style.width = freezeWidth;\n };\n ColumnWidthService.prototype.setWidthToFrozenLeftTable = function () {\n var freezeWidth = this.calcMovableOrFreezeColWidth('freeze-left');\n freezeWidth = this.isAutoResize() ? '100%' : freezeWidth;\n this.parent.getHeaderTable().style.width = freezeWidth;\n this.parent.getContentTable().style.width = freezeWidth;\n };\n ColumnWidthService.prototype.setWidthToMovableTable = function () {\n var movableWidth = '';\n var isColUndefined = this.parent.getColumns().filter(function (a) { return isNullOrUndefined(a.width); }).length >= 1;\n var isWidthAuto = this.parent.getColumns().filter(function (a) { return (a.width === 'auto'); }).length >= 1;\n if (typeof this.parent.width === 'number' && !isColUndefined && !isWidthAuto) {\n movableWidth = formatUnit(this.parent.width - parseInt(this.calcMovableOrFreezeColWidth('freeze').split('px')[0], 10) - 5);\n }\n else if (!isColUndefined && !isWidthAuto) {\n movableWidth = this.calcMovableOrFreezeColWidth('movable');\n }\n movableWidth = this.isAutoResize() ? '100%' : movableWidth;\n if (this.parent.getHeaderContent().querySelector('.e-movableheader').firstElementChild) {\n this.parent.getHeaderContent().querySelector('.e-movableheader').firstElementChild.style.width\n = movableWidth;\n }\n this.parent.getContent().querySelector('.e-movablecontent').firstElementChild.style.width =\n movableWidth;\n };\n ColumnWidthService.prototype.setWidthToFrozenEditTable = function () {\n var freezeWidth = this.calcMovableOrFreezeColWidth('freeze');\n freezeWidth = this.isAutoResize() ? '100%' : freezeWidth;\n this.parent.element.querySelectorAll('.e-table.e-inline-edit')[0].style.width = freezeWidth;\n };\n ColumnWidthService.prototype.setWidthToMovableEditTable = function () {\n var movableWidth = this.calcMovableOrFreezeColWidth('movable');\n movableWidth = this.isAutoResize() ? '100%' : movableWidth;\n this.parent.element.querySelectorAll('.e-table.e-inline-edit')[1].style.width = movableWidth;\n };\n ColumnWidthService.prototype.setWidthToTable = function () {\n var tWidth = formatUnit(this.getTableWidth(this.parent.getColumns()));\n if (this.parent.isFrozenGrid()) {\n if (this.parent.getFrozenColumns() || this.parent.getFrozenLeftColumnsCount()) {\n this.setWidthToFrozenLeftTable();\n }\n this.setWidthToMovableTable();\n if (this.parent.getFrozenRightColumnsCount()) {\n this.setWidthToFrozenRightTable();\n }\n }\n else {\n if (this.parent.detailTemplate || this.parent.childGrid) {\n this.setColumnWidth(new Column({ width: '30px' }));\n }\n tWidth = this.isAutoResize() ? '100%' : tWidth;\n this.parent.getHeaderTable().style.width = tWidth;\n this.parent.getContentTable().style.width = tWidth;\n }\n var edit = this.parent.element.querySelector('.e-table.e-inline-edit');\n if (edit && this.parent.getFrozenColumns()) {\n this.setWidthToFrozenEditTable();\n this.setWidthToMovableEditTable();\n }\n else if (edit) {\n edit.style.width = tWidth;\n }\n };\n ColumnWidthService.prototype.isAutoResize = function () {\n return this.parent.allowResizing && this.parent.resizeSettings.mode === 'Auto';\n };\n return ColumnWidthService;\n}());\nexport { ColumnWidthService };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Vue Component Base\n */\nimport Vue from 'vue';\nimport { isNullOrUndefined, extend, getValue } from '@syncfusion/ej2-base';\nvar ComponentBase = /** @class */ (function (_super) {\n __extends(ComponentBase, _super);\n function ComponentBase() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hasInjectedModules = false;\n _this.hasChildDirective = false;\n _this.childDirObjects = '';\n return _this;\n }\n ComponentBase.prototype.created = function () {\n var _this = this;\n var _loop_1 = function (prop) {\n this_1.ej2Instances.addEventListener(prop, function (args) {\n _this.$emit(prop, args);\n });\n };\n var this_1 = this;\n for (var _i = 0, _a = this.propKeys; _i < _a.length; _i++) {\n var prop = _a[_i];\n _loop_1(prop);\n }\n };\n ComponentBase.prototype.mounted = function () {\n this.ej2Instances.isVue = true;\n this.ej2Instances.vueInstance = this;\n this.ej2Instances.appendTo(this.$el);\n };\n ComponentBase.prototype.getInjectedServices = function () {\n var ret = [];\n var provide = getValue('$vnode.context.$options.provide', this);\n if (provide) {\n // tslint:disable:no-any\n var injectables = provide;\n if (typeof provide === 'function') {\n // tslint:disable:no-any\n injectables = this.$vnode.context.$options.provide();\n }\n ret = injectables[this.ej2Instances.getModuleName()] || [];\n }\n return ret;\n };\n ComponentBase.prototype.updated = function () {\n if (this.hasChildDirective) {\n var childKey = {};\n this.fetchChildPropValues(childKey);\n var curChildDir = JSON.stringify(childKey);\n if (this.childDirObjects !== curChildDir) {\n this.childDirObjects = curChildDir;\n this.assignValueToWrapper(childKey, false);\n }\n }\n };\n ComponentBase.prototype.beforeDestroy = function () {\n var tempBeforeDestroyThis = this;\n tempBeforeDestroyThis.ej2Instances.destroy();\n tempBeforeDestroyThis.$el.style.visibility = 'hidden';\n tempBeforeDestroyThis = null;\n };\n ComponentBase.prototype.bindProperties = function () {\n var options = {};\n for (var _i = 0, _a = this.propKeys; _i < _a.length; _i++) {\n var prop = _a[_i];\n if (!isNullOrUndefined(this[prop])) {\n options[prop] = this[prop];\n }\n }\n if (this.hasChildDirective) {\n this.fetchChildPropValues(options);\n }\n if (this.hasInjectedModules) {\n var prevModule = this.getInjectedServices() || [];\n var curModule = this.ej2Instances.getInjectedModules() || [];\n for (var _b = 0, curModule_1 = curModule; _b < curModule_1.length; _b++) {\n var mod = curModule_1[_b];\n if (prevModule.indexOf(mod) === -1) {\n prevModule.push(mod);\n }\n }\n this.ej2Instances.injectedModules = prevModule;\n }\n this.assignValueToWrapper(options);\n };\n ComponentBase.prototype.assignValueToWrapper = function (option, silent) {\n this.ej2Instances.setProperties(extend({}, {}, option, true), isNullOrUndefined(silent) ? true : silent);\n };\n ComponentBase.prototype.fetchChildPropValues = function (childOption) {\n var dirProps = this.getDirectiveValues(this.$slots.default, this.tagMapper || {}, this.tagNameMapper || {});\n if (!this.childDirObjects) {\n this.childDirObjects = JSON.stringify(dirProps);\n }\n for (var _i = 0, _a = Object.keys(dirProps); _i < _a.length; _i++) {\n var dirProp = _a[_i];\n childOption[dirProp] = dirProps[dirProp];\n }\n };\n ComponentBase.prototype.getDirectiveValues = function (tagDirectives, tagMapper, tagNameMapper) {\n var keyTags = Object.keys(tagMapper);\n var dir = {};\n if (tagDirectives) {\n for (var _i = 0, tagDirectives_1 = tagDirectives; _i < tagDirectives_1.length; _i++) {\n var tagDirective = tagDirectives_1[_i];\n if (tagDirective.componentOptions && tagDirective.componentOptions.children && tagDirective.componentOptions.tag) {\n var dirTag = tagDirective.componentOptions.tag;\n if (keyTags.indexOf(dirTag) !== -1) {\n var tagName = tagNameMapper[dirTag] ? tagNameMapper[dirTag] : dirTag;\n dir[tagName.replace('e-', '')] = [];\n for (var _a = 0, _b = tagDirective.componentOptions.children; _a < _b.length; _a++) {\n var tagDirChild = _b[_a];\n var retObj = this.getVNodeValue(tagDirChild, tagMapper[dirTag], tagNameMapper);\n if (Object.keys(retObj).length !== 0) {\n dir[tagName.replace('e-', '')].push(retObj);\n }\n }\n }\n }\n }\n }\n return dir;\n };\n ComponentBase.prototype.getMultiLevelDirValue = function (tagDirectories, tagKey, tagNameMapper) {\n var mulObj = {};\n for (var _i = 0, tagDirectories_1 = tagDirectories; _i < tagDirectories_1.length; _i++) {\n var tagDir = tagDirectories_1[_i];\n if (tagDir.componentOptions) {\n var key = tagDir.componentOptions.tag;\n var tagName = tagNameMapper[key] ? tagNameMapper[key] : key;\n mulObj[tagName.replace('e-', '')] = [];\n if (tagDir.componentOptions && tagDir.componentOptions.children) {\n for (var _a = 0, _b = tagDir.componentOptions.children; _a < _b.length; _a++) {\n var tagDirChild = _b[_a];\n var mulLevObj = this.getVNodeValue(tagDirChild, tagKey[key], tagNameMapper);\n if (Object.keys(mulLevObj).length !== 0) {\n mulObj[tagName.replace('e-', '')].push(mulLevObj);\n }\n }\n }\n }\n }\n return mulObj;\n };\n ComponentBase.prototype.getVNodeValue = function (tagDirective, tagKey, tagNameMapper) {\n var ret = {};\n if (tagDirective.componentOptions) {\n var dirTag = tagDirective.componentOptions.tag;\n if (typeof tagKey === 'string' && dirTag === tagKey && tagDirective.data) {\n ret = tagDirective.data.attrs ? this.getCamelCaseProps(tagDirective.data.attrs) : this.getCamelCaseProps(tagDirective.data);\n }\n else if (typeof tagKey === 'object') {\n if (tagDirective.componentOptions.children && (Object.keys(tagKey).indexOf(dirTag) !== -1)) {\n ret = this.getMultiLevelDirValue(tagDirective.componentOptions.children, tagKey[dirTag], tagNameMapper);\n }\n if (tagDirective.data && tagDirective.data.attrs) {\n ret = extend(ret, this.getCamelCaseProps(tagDirective.data.attrs));\n }\n }\n }\n return ret;\n };\n /**\n * convert kebab case directive props to camel case\n */\n ComponentBase.prototype.getCamelCaseProps = function (props) {\n var retProps = {};\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\n var prop = _a[_i];\n retProps[prop.replace(/-[a-z]/g, function (e) { return e[1].toUpperCase(); })] = props[prop];\n }\n return retProps;\n };\n ComponentBase.prototype.dataBind = function () {\n this.ej2Instances.dataBind();\n };\n ComponentBase.prototype.setProperties = function (arg, muteOnChange) {\n return this.ej2Instances.setProperties(arg, muteOnChange);\n };\n return ComponentBase;\n}(Vue));\nexport { ComponentBase };\n","/**\n * Vue Component Base\n */\nimport Vue from 'vue';\nimport { ComponentBase } from './component-base';\nexport var $internalHooks = [\n 'data',\n 'beforeCreate',\n 'created',\n 'beforeMount',\n 'mounted',\n 'beforeDestroy',\n 'destroyed',\n 'beforeUpdate',\n 'updated',\n 'activated',\n 'deactivated',\n 'render',\n 'errorCaptured' // 2.5\n];\nexport function EJComponentDecorator(options) {\n return function (Component) {\n return EJcomponentFactory(Component, options);\n };\n}\nexport function EJcomponentFactory(Component, options) {\n if (options === void 0) { options = {}; }\n options.name = options.name || Component._componentTag || Component.name;\n // prototype props.\n var proto = Component.prototype;\n if (options.props) {\n var _loop_1 = function (prop) {\n (options.props || (options.props = {}))[prop] = {};\n (options.watch || (options.watch = {}))[prop] = function (newVal) {\n this.ej2Instances[prop] = newVal;\n if (this.dataBind && (options.name !== 'DateRangePickerComponent')) {\n this.dataBind();\n }\n };\n };\n for (var _i = 0, _a = options.props; _i < _a.length; _i++) {\n var prop = _a[_i];\n _loop_1(prop);\n }\n }\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n // hooks\n if (key === 'constructor') {\n return;\n }\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n if (typeof descriptor.value === 'function') {\n // methods\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n }\n else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n Object.getOwnPropertyNames(ComponentBase.prototype).forEach(function (key) {\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function () {\n return collectDataFromConstructor(this, Component);\n }\n });\n // decorate options\n var decorators = Component.__decorators__;\n if (decorators) {\n decorators.forEach(Function(options));\n delete Component.__decorators__;\n }\n // find super\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue\n ? superProto.constructor\n : Vue;\n var Extended = Super.extend(options);\n return Extended;\n}\nfunction collectDataFromConstructor(vm, Component) {\n Component.prototype._init = function () {\n var _this = this;\n var keys = Object.getOwnPropertyNames(vm);\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n keys.forEach(function (key) {\n if (key.charAt(0) !== '_') {\n Object.defineProperty(_this, key, {\n get: function () { return vm[key]; },\n set: function (value) { return vm[key] = value; }\n });\n }\n });\n };\n var data = new Component();\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n return plainData;\n}\n","import Vue from 'vue';\nimport { setTemplateEngine, getTemplateEngine, getUniqueID, createElement, detach, extend, getValue } from \"@syncfusion/ej2-base\";\n// tslint:disable:no-any\nvar stringCompiler = getTemplateEngine();\nexport function compile(templateElement, helper) {\n var that = this;\n if (typeof templateElement === 'string') {\n return stringCompiler(templateElement, helper);\n }\n else {\n return function (data, context) {\n var pid = getUniqueID('templateParentDiv');\n var id = getUniqueID('templateDiv');\n var ele = createElement('div', { id: pid, innerHTML: '
' });\n document.body.appendChild(ele);\n var tempObj = templateElement.call(that, {});\n var returnEle;\n if (context) {\n var templateFunction = tempObj.template;\n var propsData = getValue('template.propsData', tempObj);\n var dataObj = { 'data': { data: extend(tempObj.data || {}, data) }, parent: context.vueInstance };\n if (propsData) {\n templateFunction = tempObj.template.extends;\n dataObj.propsData = propsData;\n }\n if (typeof templateFunction !== 'function') {\n templateFunction = Vue.extend(templateFunction);\n }\n var templateVue = new templateFunction(dataObj);\n //let templateVue: any = new Vue(tempObj.template);\n //templateVue.$data.data = extend(tempObj.data, data);\n templateVue.$mount('#' + id);\n returnEle = ele.childNodes;\n detach(ele);\n }\n return returnEle || [];\n };\n }\n}\nsetTemplateEngine({ compile: compile });\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport Vue from 'vue';\nimport { EJComponentDecorator } from '@syncfusion/ej2-vue-base';\nvar ColumnsDirective = /** @class */ (function (_super) {\n __extends(ColumnsDirective, _super);\n function ColumnsDirective() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnsDirective.prototype.render = function () {\n return;\n };\n ColumnsDirective = __decorate([\n EJComponentDecorator({})\n ], ColumnsDirective);\n return ColumnsDirective;\n}(Vue));\nexport { ColumnsDirective };\nexport var ColumnsPlugin = {\n name: 'e-columns',\n install: function (Vue) {\n Vue.component(ColumnsPlugin.name, ColumnsDirective);\n }\n};\n/**\n * `e-column` directive represent a column of the VueJS Grid.\n * It must be contained in a Grid component(`ejs-grid`).\n * ```vue\n * \n * \n * \n * \n * \n * \n * ```\n */\nvar ColumnDirective = /** @class */ (function (_super) {\n __extends(ColumnDirective, _super);\n function ColumnDirective() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnDirective.prototype.render = function () {\n return;\n };\n ColumnDirective = __decorate([\n EJComponentDecorator({})\n ], ColumnDirective);\n return ColumnDirective;\n}(Vue));\nexport { ColumnDirective };\nexport var ColumnPlugin = {\n name: 'e-column',\n install: function (Vue) {\n Vue.component(ColumnPlugin.name, ColumnDirective);\n }\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport Vue from 'vue';\nimport { EJComponentDecorator } from '@syncfusion/ej2-vue-base';\nvar AggregateColumnsDirective = /** @class */ (function (_super) {\n __extends(AggregateColumnsDirective, _super);\n function AggregateColumnsDirective() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AggregateColumnsDirective.prototype.render = function () {\n return;\n };\n AggregateColumnsDirective = __decorate([\n EJComponentDecorator({})\n ], AggregateColumnsDirective);\n return AggregateColumnsDirective;\n}(Vue));\nexport { AggregateColumnsDirective };\nexport var AggregateColumnsPlugin = {\n name: 'e-columns',\n install: function (Vue) {\n Vue.component(AggregateColumnsPlugin.name, AggregateColumnsDirective);\n }\n};\n/**\n * `e-aggregate->e-column` directive represent a aggregate column of the VueJS Grid.\n * ```vue\n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * ```\n */\nvar AggregateColumnDirective = /** @class */ (function (_super) {\n __extends(AggregateColumnDirective, _super);\n function AggregateColumnDirective() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AggregateColumnDirective.prototype.render = function () {\n return;\n };\n AggregateColumnDirective = __decorate([\n EJComponentDecorator({})\n ], AggregateColumnDirective);\n return AggregateColumnDirective;\n}(Vue));\nexport { AggregateColumnDirective };\nexport var AggregateColumnPlugin = {\n name: 'e-column',\n install: function (Vue) {\n Vue.component(AggregateColumnPlugin.name, AggregateColumnDirective);\n }\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport Vue from 'vue';\nimport { EJComponentDecorator } from '@syncfusion/ej2-vue-base';\nvar AggregatesDirective = /** @class */ (function (_super) {\n __extends(AggregatesDirective, _super);\n function AggregatesDirective() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AggregatesDirective.prototype.render = function () {\n return;\n };\n AggregatesDirective = __decorate([\n EJComponentDecorator({})\n ], AggregatesDirective);\n return AggregatesDirective;\n}(Vue));\nexport { AggregatesDirective };\nexport var AggregatesPlugin = {\n name: 'e-aggregates',\n install: function (Vue) {\n Vue.component(AggregatesPlugin.name, AggregatesDirective);\n }\n};\n/**\n * `e-aggregate` directive represent a aggregate row of the VueJS Grid.\n * It must be contained in a Grid component(`ejs-grid`).\n * ```vue\n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * ```\n */\nvar AggregateDirective = /** @class */ (function (_super) {\n __extends(AggregateDirective, _super);\n function AggregateDirective() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AggregateDirective.prototype.render = function () {\n return;\n };\n AggregateDirective = __decorate([\n EJComponentDecorator({})\n ], AggregateDirective);\n return AggregateDirective;\n}(Vue));\nexport { AggregateDirective };\nexport var AggregatePlugin = {\n name: 'e-aggregate',\n install: function (Vue) {\n Vue.component(AggregatePlugin.name, AggregateDirective);\n }\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { isUndefined } from '@syncfusion/ej2-base';\nimport { ComponentBase, EJComponentDecorator } from '@syncfusion/ej2-vue-base';\nimport { Grid } from '@syncfusion/ej2-grids';\nimport { ColumnsDirective, ColumnDirective, ColumnsPlugin, ColumnPlugin } from './columns.directive';\nimport { AggregateColumnsDirective, AggregateColumnDirective, AggregateColumnsPlugin, AggregateColumnPlugin } from './aggregate-columns.directive';\nimport { AggregatesDirective, AggregateDirective, AggregatesPlugin, AggregatePlugin } from './aggregates.directive';\nexport var properties = ['aggregates', 'allowExcelExport', 'allowFiltering', 'allowGrouping', 'allowKeyboard', 'allowMultiSorting', 'allowPaging', 'allowPdfExport', 'allowReordering', 'allowResizing', 'allowRowDragAndDrop', 'allowSelection', 'allowSorting', 'allowTextWrap', 'childGrid', 'clipMode', 'columnChooserSettings', 'columnMenuItems', 'columnQueryMode', 'columns', 'contextMenuItems', 'currencyCode', 'currentAction', 'dataSource', 'detailTemplate', 'editSettings', 'ej2StatePersistenceVersion', 'enableAdaptiveUI', 'enableAltRow', 'enableAutoFill', 'enableColumnVirtualization', 'enableHeaderFocus', 'enableHover', 'enableImmutableMode', 'enableInfiniteScrolling', 'enablePersistence', 'enableRtl', 'enableVirtualization', 'filterSettings', 'frozenColumns', 'frozenRows', 'gridLines', 'groupSettings', 'height', 'hierarchyPrintMode', 'infiniteScrollSettings', 'locale', 'pageSettings', 'pagerTemplate', 'parentDetails', 'printMode', 'query', 'queryString', 'resizeSettings', 'rowDropSettings', 'rowHeight', 'rowRenderingMode', 'rowTemplate', 'searchSettings', 'selectedRowIndex', 'selectionSettings', 'showColumnChooser', 'showColumnMenu', 'sortSettings', 'textWrapSettings', 'toolbar', 'toolbarTemplate', 'width', 'actionBegin', 'actionComplete', 'actionFailure', 'batchAdd', 'batchCancel', 'batchDelete', 'beforeAutoFill', 'beforeBatchAdd', 'beforeBatchDelete', 'beforeBatchSave', 'beforeCopy', 'beforeDataBound', 'beforeExcelExport', 'beforeOpenColumnChooser', 'beforePaste', 'beforePdfExport', 'beforePrint', 'beginEdit', 'cellDeselected', 'cellDeselecting', 'cellEdit', 'cellSave', 'cellSaved', 'cellSelected', 'cellSelecting', 'checkBoxChange', 'columnDataStateChange', 'columnDeselected', 'columnDeselecting', 'columnDrag', 'columnDragStart', 'columnDrop', 'columnMenuClick', 'columnMenuOpen', 'columnSelected', 'columnSelecting', 'commandClick', 'contextMenuClick', 'contextMenuOpen', 'created', 'dataBound', 'dataSourceChanged', 'dataStateChange', 'destroyed', 'detailDataBound', 'excelAggregateQueryCellInfo', 'excelExportComplete', 'excelHeaderQueryCellInfo', 'excelQueryCellInfo', 'exportDetailDataBound', 'exportGroupCaption', 'headerCellInfo', 'keyPressed', 'lazyLoadGroupCollapse', 'lazyLoadGroupExpand', 'load', 'pdfAggregateQueryCellInfo', 'pdfExportComplete', 'pdfHeaderQueryCellInfo', 'pdfQueryCellInfo', 'printComplete', 'queryCellInfo', 'recordClick', 'recordDoubleClick', 'resizeStart', 'resizeStop', 'resizing', 'rowDataBound', 'rowDeselected', 'rowDeselecting', 'rowDrag', 'rowDragStart', 'rowDragStartHelper', 'rowDrop', 'rowSelected', 'rowSelecting', 'toolbarClick'];\nexport var modelProps = ['dataSource'];\n/**\n * `ejs-grid` represents the VueJS Grid Component.\n * ```vue\n * \n * ```\n */\nvar GridComponent = /** @class */ (function (_super) {\n __extends(GridComponent, _super);\n function GridComponent() {\n var _this = _super.call(this) || this;\n _this.propKeys = properties;\n _this.models = modelProps;\n _this.hasChildDirective = true;\n _this.hasInjectedModules = true;\n _this.tagMapper = { \"e-columns\": \"e-column\", \"e-aggregates\": { \"e-aggregate\": { \"e-columns\": \"e-column\" } } };\n _this.tagNameMapper = {};\n _this.ej2Instances = new Grid({});\n _this.ej2Instances._trigger = _this.ej2Instances.trigger;\n _this.ej2Instances.trigger = _this.trigger;\n _this.bindProperties();\n _this.ej2Instances._setProperties = _this.ej2Instances.setProperties;\n _this.ej2Instances.setProperties = _this.setProperties;\n return _this;\n }\n GridComponent.prototype.setProperties = function (prop, muteOnChange) {\n var _this = this;\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n _this.$emit('update:' + key, prop[key]);\n }\n });\n });\n }\n };\n GridComponent.prototype.trigger = function (eventName, eventProp, successHandler) {\n if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/checked|value/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/currentView|selectedDate/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n if (this.ej2Instances && this.ej2Instances._trigger) {\n this.ej2Instances._trigger(eventName, eventProp, successHandler);\n }\n };\n GridComponent.prototype.render = function (createElement) {\n return createElement('div', this.$slots.default);\n };\n GridComponent.prototype.addRecord = function (data, index) {\n return this.ej2Instances.addRecord(data, index);\n };\n GridComponent.prototype.autoFitColumns = function (fieldNames) {\n return this.ej2Instances.autoFitColumns(fieldNames);\n };\n GridComponent.prototype.batchAsyncUpdate = function (changes) {\n return this.ej2Instances.batchAsyncUpdate(changes);\n };\n GridComponent.prototype.batchUpdate = function (changes) {\n return this.ej2Instances.batchUpdate(changes);\n };\n GridComponent.prototype.calculatePageSizeByParentHeight = function (containerHeight) {\n return this.ej2Instances.calculatePageSizeByParentHeight(containerHeight);\n };\n GridComponent.prototype.clearCellSelection = function () {\n return this.ej2Instances.clearCellSelection();\n };\n GridComponent.prototype.clearFiltering = function (fields) {\n return this.ej2Instances.clearFiltering(fields);\n };\n GridComponent.prototype.clearGrouping = function () {\n return this.ej2Instances.clearGrouping();\n };\n GridComponent.prototype.clearRowSelection = function () {\n return this.ej2Instances.clearRowSelection();\n };\n GridComponent.prototype.clearSelection = function () {\n return this.ej2Instances.clearSelection();\n };\n GridComponent.prototype.clearSorting = function () {\n return this.ej2Instances.clearSorting();\n };\n GridComponent.prototype.closeEdit = function () {\n return this.ej2Instances.closeEdit();\n };\n GridComponent.prototype.copy = function (withHeader) {\n return this.ej2Instances.copy(withHeader);\n };\n GridComponent.prototype.csvExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {\n return this.ej2Instances.csvExport(excelExportProperties, isMultipleExport, workbook, isBlob);\n };\n GridComponent.prototype.dataReady = function () {\n return this.ej2Instances.dataReady();\n };\n GridComponent.prototype.deleteRecord = function (fieldname, data) {\n return this.ej2Instances.deleteRecord(fieldname, data);\n };\n GridComponent.prototype.deleteRow = function (tr) {\n return this.ej2Instances.deleteRow(tr);\n };\n GridComponent.prototype.destroyTemplate = function (propertyNames, index) {\n return this.ej2Instances.destroyTemplate(propertyNames, index);\n };\n GridComponent.prototype.detailCollapseAll = function () {\n return this.ej2Instances.detailCollapseAll();\n };\n GridComponent.prototype.detailExpandAll = function () {\n return this.ej2Instances.detailExpandAll();\n };\n GridComponent.prototype.editCell = function (index, field) {\n return this.ej2Instances.editCell(index, field);\n };\n GridComponent.prototype.enableToolbarItems = function (items, isEnable) {\n return this.ej2Instances.enableToolbarItems(items, isEnable);\n };\n GridComponent.prototype.endEdit = function () {\n return this.ej2Instances.endEdit();\n };\n GridComponent.prototype.excelExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {\n return this.ej2Instances.excelExport(excelExportProperties, isMultipleExport, workbook, isBlob);\n };\n GridComponent.prototype.extendRequiredModules = function (modules) {\n return this.ej2Instances.extendRequiredModules(modules);\n };\n GridComponent.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {\n return this.ej2Instances.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);\n };\n GridComponent.prototype.getBatchChanges = function () {\n return this.ej2Instances.getBatchChanges();\n };\n GridComponent.prototype.getCellFromIndex = function (rowIndex, columnIndex) {\n return this.ej2Instances.getCellFromIndex(rowIndex, columnIndex);\n };\n GridComponent.prototype.getColumnByField = function (field) {\n return this.ej2Instances.getColumnByField(field);\n };\n GridComponent.prototype.getColumnByUid = function (uid) {\n return this.ej2Instances.getColumnByUid(uid);\n };\n GridComponent.prototype.getColumnFieldNames = function () {\n return this.ej2Instances.getColumnFieldNames();\n };\n GridComponent.prototype.getColumnHeaderByField = function (field) {\n return this.ej2Instances.getColumnHeaderByField(field);\n };\n GridComponent.prototype.getColumnHeaderByIndex = function (index) {\n return this.ej2Instances.getColumnHeaderByIndex(index);\n };\n GridComponent.prototype.getColumnHeaderByUid = function (uid) {\n return this.ej2Instances.getColumnHeaderByUid(uid);\n };\n GridComponent.prototype.getColumnIndexByField = function (field) {\n return this.ej2Instances.getColumnIndexByField(field);\n };\n GridComponent.prototype.getColumnIndexByUid = function (uid) {\n return this.ej2Instances.getColumnIndexByUid(uid);\n };\n GridComponent.prototype.getColumns = function (isRefresh) {\n return this.ej2Instances.getColumns(isRefresh);\n };\n GridComponent.prototype.getContent = function () {\n return this.ej2Instances.getContent();\n };\n GridComponent.prototype.getContentTable = function () {\n return this.ej2Instances.getContentTable();\n };\n GridComponent.prototype.getCurrentViewRecords = function () {\n return this.ej2Instances.getCurrentViewRecords();\n };\n GridComponent.prototype.getDataModule = function () {\n return this.ej2Instances.getDataModule();\n };\n GridComponent.prototype.getDataRows = function () {\n return this.ej2Instances.getDataRows();\n };\n GridComponent.prototype.getFilterUIInfo = function () {\n return this.ej2Instances.getFilterUIInfo();\n };\n GridComponent.prototype.getFilteredRecords = function () {\n return this.ej2Instances.getFilteredRecords();\n };\n GridComponent.prototype.getFooterContent = function () {\n return this.ej2Instances.getFooterContent();\n };\n GridComponent.prototype.getFooterContentTable = function () {\n return this.ej2Instances.getFooterContentTable();\n };\n GridComponent.prototype.getForeignKeyColumns = function () {\n return this.ej2Instances.getForeignKeyColumns();\n };\n GridComponent.prototype.getFrozenDataRows = function () {\n return this.ej2Instances.getFrozenDataRows();\n };\n GridComponent.prototype.getFrozenLeftColumnHeaderByIndex = function (index) {\n return this.ej2Instances.getFrozenLeftColumnHeaderByIndex(index);\n };\n GridComponent.prototype.getFrozenLeftCount = function () {\n return this.ej2Instances.getFrozenLeftCount();\n };\n GridComponent.prototype.getFrozenMode = function () {\n return this.ej2Instances.getFrozenMode();\n };\n GridComponent.prototype.getFrozenRightCellFromIndex = function (rowIndex, columnIndex) {\n return this.ej2Instances.getFrozenRightCellFromIndex(rowIndex, columnIndex);\n };\n GridComponent.prototype.getFrozenRightColumnHeaderByIndex = function (index) {\n return this.ej2Instances.getFrozenRightColumnHeaderByIndex(index);\n };\n GridComponent.prototype.getFrozenRightDataRows = function () {\n return this.ej2Instances.getFrozenRightDataRows();\n };\n GridComponent.prototype.getFrozenRightRowByIndex = function (index) {\n return this.ej2Instances.getFrozenRightRowByIndex(index);\n };\n GridComponent.prototype.getFrozenRightRows = function () {\n return this.ej2Instances.getFrozenRightRows();\n };\n GridComponent.prototype.getFrozenRowByIndex = function (index) {\n return this.ej2Instances.getFrozenRowByIndex(index);\n };\n GridComponent.prototype.getHeaderContent = function () {\n return this.ej2Instances.getHeaderContent();\n };\n GridComponent.prototype.getHeaderTable = function () {\n return this.ej2Instances.getHeaderTable();\n };\n GridComponent.prototype.getHiddenColumns = function () {\n return this.ej2Instances.getHiddenColumns();\n };\n GridComponent.prototype.getMediaColumns = function () {\n return this.ej2Instances.getMediaColumns();\n };\n GridComponent.prototype.getMovableCellFromIndex = function (rowIndex, columnIndex) {\n return this.ej2Instances.getMovableCellFromIndex(rowIndex, columnIndex);\n };\n GridComponent.prototype.getMovableColumnHeaderByIndex = function (index) {\n return this.ej2Instances.getMovableColumnHeaderByIndex(index);\n };\n GridComponent.prototype.getMovableDataRows = function () {\n return this.ej2Instances.getMovableDataRows();\n };\n GridComponent.prototype.getMovableRowByIndex = function (index) {\n return this.ej2Instances.getMovableRowByIndex(index);\n };\n GridComponent.prototype.getMovableRows = function () {\n return this.ej2Instances.getMovableRows();\n };\n GridComponent.prototype.getPager = function () {\n return this.ej2Instances.getPager();\n };\n GridComponent.prototype.getPrimaryKeyFieldNames = function () {\n return this.ej2Instances.getPrimaryKeyFieldNames();\n };\n GridComponent.prototype.getRowByIndex = function (index) {\n return this.ej2Instances.getRowByIndex(index);\n };\n GridComponent.prototype.getRowIndexByPrimaryKey = function (value) {\n return this.ej2Instances.getRowIndexByPrimaryKey(value);\n };\n GridComponent.prototype.getRowInfo = function (target) {\n return this.ej2Instances.getRowInfo(target);\n };\n GridComponent.prototype.getRows = function () {\n return this.ej2Instances.getRows();\n };\n GridComponent.prototype.getSelectedColumnsUid = function () {\n return this.ej2Instances.getSelectedColumnsUid();\n };\n GridComponent.prototype.getSelectedRecords = function () {\n return this.ej2Instances.getSelectedRecords();\n };\n GridComponent.prototype.getSelectedRowCellIndexes = function () {\n return this.ej2Instances.getSelectedRowCellIndexes();\n };\n GridComponent.prototype.getSelectedRowIndexes = function () {\n return this.ej2Instances.getSelectedRowIndexes();\n };\n GridComponent.prototype.getSelectedRows = function () {\n return this.ej2Instances.getSelectedRows();\n };\n GridComponent.prototype.getSummaryValues = function (summaryCol, summaryData) {\n return this.ej2Instances.getSummaryValues(summaryCol, summaryData);\n };\n GridComponent.prototype.getUidByColumnField = function (field) {\n return this.ej2Instances.getUidByColumnField(field);\n };\n GridComponent.prototype.getVisibleColumns = function () {\n return this.ej2Instances.getVisibleColumns();\n };\n GridComponent.prototype.goToPage = function (pageNo) {\n return this.ej2Instances.goToPage(pageNo);\n };\n GridComponent.prototype.groupCollapseAll = function () {\n return this.ej2Instances.groupCollapseAll();\n };\n GridComponent.prototype.groupColumn = function (columnName) {\n return this.ej2Instances.groupColumn(columnName);\n };\n GridComponent.prototype.groupExpandAll = function () {\n return this.ej2Instances.groupExpandAll();\n };\n GridComponent.prototype.hideColumns = function (keys, hideBy) {\n return this.ej2Instances.hideColumns(keys, hideBy);\n };\n GridComponent.prototype.hideScroll = function () {\n return this.ej2Instances.hideScroll();\n };\n GridComponent.prototype.hideSpinner = function () {\n return this.ej2Instances.hideSpinner();\n };\n GridComponent.prototype.isFrozenGrid = function () {\n return this.ej2Instances.isFrozenGrid();\n };\n GridComponent.prototype.openColumnChooser = function (x, y) {\n return this.ej2Instances.openColumnChooser(x, y);\n };\n GridComponent.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {\n return this.ej2Instances.pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);\n };\n GridComponent.prototype.print = function () {\n return this.ej2Instances.print();\n };\n GridComponent.prototype.refresh = function () {\n return this.ej2Instances.refresh();\n };\n GridComponent.prototype.refreshColumns = function () {\n return this.ej2Instances.refreshColumns();\n };\n GridComponent.prototype.refreshHeader = function () {\n return this.ej2Instances.refreshHeader();\n };\n GridComponent.prototype.reorderColumnByIndex = function (fromIndex, toIndex) {\n return this.ej2Instances.reorderColumnByIndex(fromIndex, toIndex);\n };\n GridComponent.prototype.reorderColumnByTargetIndex = function (fieldName, toIndex) {\n return this.ej2Instances.reorderColumnByTargetIndex(fieldName, toIndex);\n };\n GridComponent.prototype.reorderColumns = function (fromFName, toFName) {\n return this.ej2Instances.reorderColumns(fromFName, toFName);\n };\n GridComponent.prototype.reorderRows = function (fromIndexes, toIndex) {\n return this.ej2Instances.reorderRows(fromIndexes, toIndex);\n };\n GridComponent.prototype.saveCell = function () {\n return this.ej2Instances.saveCell();\n };\n GridComponent.prototype.search = function (searchString) {\n return this.ej2Instances.search(searchString);\n };\n GridComponent.prototype.selectCell = function (cellIndex, isToggle) {\n return this.ej2Instances.selectCell(cellIndex, isToggle);\n };\n GridComponent.prototype.selectCells = function (rowCellIndexes) {\n return this.ej2Instances.selectCells(rowCellIndexes);\n };\n GridComponent.prototype.selectCellsByRange = function (startIndex, endIndex) {\n return this.ej2Instances.selectCellsByRange(startIndex, endIndex);\n };\n GridComponent.prototype.selectRow = function (index, isToggle) {\n return this.ej2Instances.selectRow(index, isToggle);\n };\n GridComponent.prototype.selectRows = function (rowIndexes) {\n return this.ej2Instances.selectRows(rowIndexes);\n };\n GridComponent.prototype.selectRowsByRange = function (startIndex, endIndex) {\n return this.ej2Instances.selectRowsByRange(startIndex, endIndex);\n };\n GridComponent.prototype.serverExcelExport = function (url) {\n return this.ej2Instances.serverExcelExport(url);\n };\n GridComponent.prototype.serverPdfExport = function (url) {\n return this.ej2Instances.serverPdfExport(url);\n };\n GridComponent.prototype.setCellValue = function (key, field, value) {\n return this.ej2Instances.setCellValue(key, field, value);\n };\n GridComponent.prototype.setGridContent = function (element) {\n return this.ej2Instances.setGridContent(element);\n };\n GridComponent.prototype.setGridContentTable = function (element) {\n return this.ej2Instances.setGridContentTable(element);\n };\n GridComponent.prototype.setGridHeaderContent = function (element) {\n return this.ej2Instances.setGridHeaderContent(element);\n };\n GridComponent.prototype.setGridHeaderTable = function (element) {\n return this.ej2Instances.setGridHeaderTable(element);\n };\n GridComponent.prototype.setGridPager = function (element) {\n return this.ej2Instances.setGridPager(element);\n };\n GridComponent.prototype.setRowData = function (key, rowData) {\n return this.ej2Instances.setRowData(key, rowData);\n };\n GridComponent.prototype.showColumns = function (keys, showBy) {\n return this.ej2Instances.showColumns(keys, showBy);\n };\n GridComponent.prototype.showSpinner = function () {\n return this.ej2Instances.showSpinner();\n };\n GridComponent.prototype.sortColumn = function (columnName, direction, isMultiSort) {\n return this.ej2Instances.sortColumn(columnName, direction, isMultiSort);\n };\n GridComponent.prototype.startEdit = function () {\n return this.ej2Instances.startEdit();\n };\n GridComponent.prototype.ungroupColumn = function (columnName) {\n return this.ej2Instances.ungroupColumn(columnName);\n };\n GridComponent.prototype.updateCell = function (rowIndex, field, value) {\n return this.ej2Instances.updateCell(rowIndex, field, value);\n };\n GridComponent.prototype.updateExternalMessage = function (message) {\n return this.ej2Instances.updateExternalMessage(message);\n };\n GridComponent.prototype.updateRow = function (index, data) {\n return this.ej2Instances.updateRow(index, data);\n };\n GridComponent.prototype.updateRowValue = function (key, rowData) {\n return this.ej2Instances.updateRowValue(key, rowData);\n };\n GridComponent = __decorate([\n EJComponentDecorator({\n props: properties,\n model: {\n event: 'modelchanged'\n }\n })\n ], GridComponent);\n return GridComponent;\n}(ComponentBase));\nexport { GridComponent };\nexport var GridPlugin = {\n name: 'ejs-grid',\n install: function (Vue) {\n Vue.component(GridPlugin.name, GridComponent);\n Vue.component(ColumnPlugin.name, ColumnDirective);\n Vue.component(ColumnsPlugin.name, ColumnsDirective);\n Vue.component(AggregatePlugin.name, AggregateDirective);\n Vue.component(AggregatesPlugin.name, AggregatesDirective);\n Vue.component(AggregateColumnPlugin.name, AggregateColumnDirective);\n Vue.component(AggregateColumnsPlugin.name, AggregateColumnsDirective);\n }\n};\n","/**\n * Used to `write a string` into output file.\n * @private\n */\nvar PdfWriter = /** @class */ (function () {\n /**\n * Initialize an instance of `PdfWriter` class.\n * @private\n */\n function PdfWriter(stream) {\n this.streamWriter = stream;\n }\n Object.defineProperty(PdfWriter.prototype, \"document\", {\n //properties\n /**\n * Gets and Sets the `document`.\n * @private\n */\n get: function () {\n return this.pdfDocument;\n },\n set: function (value) {\n this.pdfDocument = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfWriter.prototype, \"position\", {\n /**\n * Gets the `position`.\n * @private\n */\n get: function () {\n return this.streamWriter.buffer.size;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfWriter.prototype, \"length\", {\n /**\n * Gets the `length` of the stream'.\n * @private\n */\n get: function () {\n return this.streamWriter.buffer.size;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfWriter.prototype, \"stream\", {\n /**\n * Gets the `stream`.\n * @private\n */\n get: function () {\n var result = this.streamWriter;\n return result;\n },\n enumerable: true,\n configurable: true\n });\n //public Methods\n /**\n * `Writes the specified data`.\n * @private\n */\n PdfWriter.prototype.write = function (overload) {\n var data = [];\n var tempOverload = overload;\n this.streamWriter.write(tempOverload);\n };\n return PdfWriter;\n}());\nexport { PdfWriter };\n","/**\n * @private\n * @hidden\n */\nexport function defaultToString(item) {\n // if (item === null) {\n // return 'COLLECTION_NULL';\n // } else if (typeof item === 'undefined') {\n // return 'COLLECTION_UNDEFINED';\n // } else if (Object.prototype.toString.call(item) === '[object String]') {\n if (Object.prototype.toString.call(item) === '[object String]') {\n return '$s' + item;\n }\n else {\n return '$o' + item.toString();\n }\n}\n","/**\n * Dictionary.ts class for EJ2-PDF\n * @private\n * @hidden\n */\nimport { defaultToString } from './utils';\n/**\n * @private\n * @hidden\n */\nvar Dictionary = /** @class */ (function () {\n /**\n * @private\n * @hidden\n */\n function Dictionary(toStringFunction) {\n this.table = {};\n this.nElements = 0;\n this.toStr = toStringFunction || defaultToString;\n }\n /**\n * @private\n * @hidden\n */\n Dictionary.prototype.getValue = function (key) {\n var pair = this.table['$' + this.toStr(key)];\n if (typeof pair === 'undefined') {\n return undefined;\n }\n return pair.value;\n };\n /**\n * @private\n * @hidden\n */\n Dictionary.prototype.setValue = function (key, value) {\n // if (typeof key === 'undefined' || typeof value === 'undefined') {\n // return undefined;\n // }\n var ret;\n var k = '$' + this.toStr(key);\n var previousElement = this.table[k];\n // if (typeof previousElement === 'undefined') {\n this.nElements++;\n ret = undefined;\n // }\n this.table[k] = {\n key: key,\n value: value\n };\n return ret;\n };\n /**\n * @private\n * @hidden\n */\n Dictionary.prototype.remove = function (key) {\n var k = '$' + this.toStr(key);\n var previousElement = this.table[k];\n // if (typeof previousElement !== 'undefined') {\n delete this.table[k];\n this.nElements--;\n return previousElement.value;\n // }\n // return undefined;\n };\n /**\n * @private\n * @hidden\n */\n Dictionary.prototype.keys = function () {\n var keysArray = [];\n var namesOfKeys = Object.keys(this.table);\n for (var index1 = 0; index1 < namesOfKeys.length; index1++) {\n // if (Object.prototype.hasOwnProperty.call(this.table, namesOfKeys[index1])) {\n var pair1 = this.table[namesOfKeys[index1]];\n keysArray.push(pair1.key);\n // }\n }\n return keysArray;\n };\n /**\n * @private\n * @hidden\n */\n Dictionary.prototype.values = function () {\n var valuesArray = [];\n var namesOfValues = Object.keys(this.table);\n for (var index2 = 0; index2 < namesOfValues.length; index2++) {\n // if (Object.prototype.hasOwnProperty.call(this.table, namesOfValues[index2])) {\n var pair2 = this.table[namesOfValues[index2]];\n valuesArray.push(pair2.value);\n // }\n }\n return valuesArray;\n };\n /**\n * @private\n * @hidden\n */\n Dictionary.prototype.containsKey = function (key) {\n var retutnValue = true;\n if (typeof this.getValue(key) === 'undefined') {\n retutnValue = true;\n }\n else {\n retutnValue = false;\n }\n return !retutnValue;\n };\n /**\n * @private\n * @hidden\n */\n Dictionary.prototype.clear = function () {\n this.table = {};\n this.nElements = 0;\n };\n /**\n * @private\n * @hidden\n */\n Dictionary.prototype.size = function () {\n return this.nElements;\n };\n return Dictionary;\n}()); // End of dictionary\nexport { Dictionary };\n","/**\n * public Enum for `CompositeFontType`.\n * @private\n */\nexport var ObjectStatus;\n(function (ObjectStatus) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n ObjectStatus[ObjectStatus[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `Registered`.\n * @private\n */\n ObjectStatus[ObjectStatus[\"Registered\"] = 1] = \"Registered\";\n})(ObjectStatus || (ObjectStatus = {}));\n","/**\n * PdfMainObjectCollection.ts class for EJ2-PDF\n */\nimport { Dictionary } from './../collections/dictionary';\nimport { ObjectStatus } from './enum';\n/**\n * The collection of all `objects` within a PDF document.\n * @private\n */\nvar PdfMainObjectCollection = /** @class */ (function () {\n function PdfMainObjectCollection() {\n //Fields\n /**\n * The collection of the `indirect objects`.\n * @default []\n * @private\n */\n this.objectCollections = [];\n /**\n * The collection of the `Indirect objects`.\n * @default new Dictionary()\n * @private\n */\n this.mainObjectCollection = new Dictionary();\n /**\n * The collection of `primitive objects`.\n * @private\n */\n this.primitiveObjectCollection = new Dictionary();\n }\n Object.defineProperty(PdfMainObjectCollection.prototype, \"count\", {\n //Properties\n /**\n * Gets the `count`.\n * @private\n */\n get: function () {\n return this.objectCollections.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the value of `ObjectInfo` from object collection.\n * @private\n */\n PdfMainObjectCollection.prototype.items = function (index) {\n return this.objectCollections[index];\n };\n Object.defineProperty(PdfMainObjectCollection.prototype, \"outIsNew\", {\n //Methods\n /**\n * Specifies the value of `IsNew`.\n * @private\n */\n get: function () {\n return this.isNew;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Adds` the specified element.\n * @private\n */\n PdfMainObjectCollection.prototype.add = function (element) {\n var objInfo = new ObjectInfo(element);\n this.objectCollections.push(objInfo);\n if (!this.primitiveObjectCollection.containsKey(element)) {\n this.primitiveObjectCollection.setValue(element, this.objectCollections.length - 1);\n }\n element.position = this.index = this.objectCollections.length - 1;\n element.status = ObjectStatus.Registered;\n };\n /**\n * `Looks` through the collection for the object specified.\n * @private\n */\n PdfMainObjectCollection.prototype.lookFor = function (obj) {\n var index = -1;\n if (obj.position !== -1) {\n return obj.position;\n }\n if (this.primitiveObjectCollection.containsKey(obj) && this.count === this.primitiveObjectCollection.size()) {\n index = this.primitiveObjectCollection.getValue(obj);\n }\n else {\n for (var i = this.count - 1; i >= 0; i--) {\n var oi = this.objectCollections[i];\n if (oi.object === obj) {\n index = i;\n break;\n }\n }\n }\n return index;\n };\n /**\n * Gets the `reference of the object`.\n * @private\n */\n PdfMainObjectCollection.prototype.getReference = function (index, isNew) {\n this.index = this.lookFor(index);\n var reference;\n this.isNew = false;\n var oi = this.objectCollections[this.index];\n reference = oi.reference;\n var obj = { reference: reference, wasNew: isNew };\n return obj;\n };\n /**\n * Tries to set the `reference to the object`.\n * @private\n */\n PdfMainObjectCollection.prototype.trySetReference = function (obj, reference, found) {\n var result = true;\n found = true;\n this.index = this.lookFor(obj);\n var oi = this.objectCollections[this.index];\n oi.setReference(reference);\n return result;\n };\n PdfMainObjectCollection.prototype.destroy = function () {\n for (var _i = 0, _a = this.objectCollections; _i < _a.length; _i++) {\n var obj = _a[_i];\n if (obj !== undefined) {\n obj.pdfObject.position = -1;\n obj.pdfObject.isSaving = undefined;\n obj.pdfObject.objectCollectionIndex = undefined;\n obj.pdfObject.position = undefined;\n }\n }\n this.objectCollections = [];\n this.mainObjectCollection = new Dictionary();\n this.primitiveObjectCollection = new Dictionary();\n };\n return PdfMainObjectCollection;\n}());\nexport { PdfMainObjectCollection };\nvar ObjectInfo = /** @class */ (function () {\n function ObjectInfo(obj, reference) {\n this.pdfObject = obj;\n this.pdfReference = reference;\n }\n Object.defineProperty(ObjectInfo.prototype, \"object\", {\n //Properties\n /**\n * Gets the `object`.\n * @private\n */\n get: function () {\n return this.pdfObject;\n },\n set: function (value) {\n this.pdfObject = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ObjectInfo.prototype, \"reference\", {\n /**\n * Gets the `reference`.\n * @private\n */\n get: function () {\n return this.pdfReference;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets the `reference`.\n * @private\n */\n ObjectInfo.prototype.setReference = function (reference) {\n this.pdfReference = reference;\n };\n return ObjectInfo;\n}());\nexport { ObjectInfo };\n","/**\n * `PdfString` class is used to perform string related primitive operations.\n * @private\n */\nexport var InternalEnum;\n(function (InternalEnum) {\n //Internals\n /**\n * public Enum for `ForceEncoding`.\n * @private\n */\n var ForceEncoding;\n (function (ForceEncoding) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n ForceEncoding[ForceEncoding[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `Ascii`.\n * @private\n */\n ForceEncoding[ForceEncoding[\"Ascii\"] = 1] = \"Ascii\";\n /**\n * Specifies the type of `Unicode`.\n * @private\n */\n ForceEncoding[ForceEncoding[\"Unicode\"] = 2] = \"Unicode\";\n })(ForceEncoding = InternalEnum.ForceEncoding || (InternalEnum.ForceEncoding = {}));\n /**\n * public Enum for `SourceType`.\n * @private\n */\n var SourceType;\n (function (SourceType) {\n /**\n * Specifies the type of `StringValue`.\n * @private\n */\n SourceType[SourceType[\"StringValue\"] = 0] = \"StringValue\";\n /**\n * Specifies the type of `ByteBuffer`.\n * @private\n */\n SourceType[SourceType[\"ByteBuffer\"] = 1] = \"ByteBuffer\";\n })(SourceType || (SourceType = {}));\n})(InternalEnum || (InternalEnum = {}));\nvar PdfString = /** @class */ (function () {\n function PdfString(value) {\n /**\n * Value indicating whether the string was converted to hex.\n * @default false\n * @private\n */\n this.bHex = false;\n /**\n * Internal variable to store the `position`.\n * @default -1\n * @private\n */\n this.position1 = -1;\n /**\n * Internal variable to hold `cloned object`.\n * @default null\n * @private\n */\n this.clonedObject1 = null;\n /**\n * `Shows` if the data of the stream was decrypted.\n * @default false\n * @private\n */\n this.bDecrypted = false;\n /**\n * Shows if the data of the stream `was decrypted`.\n * @default false\n * @private\n */\n this.isParentDecrypted = false;\n /**\n * Gets a value indicating whether the object is `packed or not`.\n * @default false\n * @private\n */\n this.isPacked = false;\n /**\n * @hidden\n * @private\n */\n this.isFormField = false;\n /**\n * @hidden\n * @private\n */\n this.isColorSpace = false;\n /**\n * @hidden\n * @private\n */\n this.isHexString = true;\n if (typeof value === 'undefined') {\n this.bHex = false;\n }\n else {\n if (!(value.length > 0 && value[0] === '0xfeff')) {\n this.stringValue = value;\n this.data = [];\n for (var i = 0; i < value.length; ++i) {\n this.data.push(value.charCodeAt(i));\n }\n }\n }\n }\n Object.defineProperty(PdfString.prototype, \"hex\", {\n //Property\n /**\n * Gets a value indicating whether string is in `hex`.\n * @private\n */\n get: function () {\n return this.bHex;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfString.prototype, \"value\", {\n /**\n * Gets or sets string `value` of the object.\n * @private\n */\n get: function () {\n return this.stringValue;\n },\n set: function (value) {\n this.stringValue = value;\n this.data = null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfString.prototype, \"status\", {\n /**\n * Gets or sets the `Status` of the specified object.\n * @private\n */\n get: function () {\n return this.status1;\n },\n set: function (value) {\n this.status1 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfString.prototype, \"isSaving\", {\n /**\n * Gets or sets a value indicating whether this document `is saving` or not.\n * @private\n */\n get: function () {\n return this.isSaving1;\n },\n set: function (value) {\n this.isSaving1 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfString.prototype, \"objectCollectionIndex\", {\n /**\n * Gets or sets the `index` value of the specified object.\n * @private\n */\n get: function () {\n return this.index1;\n },\n set: function (value) {\n this.index1 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfString.prototype, \"clonedObject\", {\n /**\n * Returns `cloned object`.\n * @private\n */\n get: function () {\n return this.clonedObject1;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfString.prototype, \"position\", {\n /**\n * Gets or sets the `position` of the object.\n * @private\n */\n get: function () {\n return this.position1;\n },\n set: function (value) {\n this.position1 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfString.prototype, \"CrossTable\", {\n /**\n * Returns `PdfCrossTable` associated with the object.\n * @private\n */\n get: function () {\n return this.crossTable;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfString.prototype, \"converted\", {\n /**\n * Gets a value indicating whether to check if the value has unicode characters.\n * @private\n */\n get: function () {\n return this.bConverted;\n },\n /**\n * sets a value indicating whether to check if the value has unicode characters.\n * @private\n */\n set: function (value) {\n this.bConverted = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfString.prototype, \"encode\", {\n /**\n * Gets value indicating whether we should convert data to Unicode.\n */\n get: function () {\n return this.bForceEncoding;\n },\n set: function (value) {\n this.bForceEncoding = value;\n },\n enumerable: true,\n configurable: true\n });\n //Methods\n /**\n * Converts `bytes to string using hex format` for representing string.\n * @private\n */\n PdfString.bytesToHex = function (bytes) {\n if (bytes == null) {\n return '';\n }\n var builder = '';\n return builder;\n };\n /**\n * `Saves` the object using the specified writer.\n * @private\n */\n PdfString.prototype.save = function (writer) {\n if (writer === null) {\n throw new Error('ArgumentNullException : writer');\n }\n if (this.encode !== undefined && this.encode === InternalEnum.ForceEncoding.Ascii) {\n writer.write(this.pdfEncode());\n }\n else {\n writer.write(PdfString.stringMark[0] + this.value + PdfString.stringMark[1]);\n }\n };\n PdfString.prototype.pdfEncode = function () {\n var result = '';\n if (this.encode !== undefined && this.encode === InternalEnum.ForceEncoding.Ascii) {\n var data = this.escapeSymbols(this.value);\n for (var i = 0; i < data.length; i++) {\n result += String.fromCharCode(data[i]);\n }\n result = PdfString.stringMark[0] + result + PdfString.stringMark[1];\n }\n else {\n result = this.value;\n }\n return result;\n };\n PdfString.prototype.escapeSymbols = function (value) {\n var data = [];\n for (var i = 0; i < value.length; i++) {\n var currentData = value.charCodeAt(i);\n switch (currentData) {\n case 40:\n case 41:\n data.push(92);\n data.push(currentData);\n break;\n case 13:\n data.push(92);\n data.push(114);\n break;\n case 92:\n data.push(92);\n data.push(currentData);\n break;\n default:\n data.push(currentData);\n break;\n }\n }\n return data;\n };\n /**\n * Creates a `copy of PdfString`.\n * @private\n */\n PdfString.prototype.clone = function (crossTable) {\n if (this.clonedObject1 !== null && this.clonedObject1.CrossTable === crossTable) {\n return this.clonedObject1;\n }\n else {\n this.clonedObject1 = null;\n }\n var newString = new PdfString(this.stringValue);\n newString.bHex = this.bHex;\n newString.crossTable = crossTable;\n newString.isColorSpace = this.isColorSpace;\n this.clonedObject1 = newString;\n return newString;\n };\n /**\n * Converts string to array of unicode symbols.\n */\n PdfString.toUnicodeArray = function (value, bAddPrefix) {\n if (value == null) {\n throw new Error('Argument Null Exception : value');\n }\n var startIndex = 0;\n var output = [];\n for (var i = 0; i < value.length; i++) {\n var code = value.charCodeAt(i);\n output.push(code / 256 >>> 0);\n output.push(code & 0xff);\n }\n return output;\n };\n /**\n * Converts byte data to string.\n */\n PdfString.byteToString = function (data) {\n if (data == null) {\n throw new Error('Argument Null Exception : stream');\n }\n var result = '';\n for (var i = 0; i < data.length; ++i) {\n result += String.fromCharCode(data[i]);\n }\n return result;\n };\n //constants = ;\n /**\n * `General markers` for string.\n * @private\n */\n PdfString.stringMark = '()';\n /**\n * `Hex markers` for string.\n * @private\n */\n PdfString.hexStringMark = '<>';\n /**\n * Format of password data.\n * @private\n */\n PdfString.hexFormatPattern = '{0:X2}';\n return PdfString;\n}());\nexport { PdfString };\n","import { Encoding, validateNullOrUndefined } from './encoding';\nimport { Save } from './save';\n/**\n * StreamWriter class contains the implementation for writing characters to a file in a particular encoding\n * ```typescript\n * let writer = new StreamWriter();\n * writer.write('Hello World');\n * writer.save('Sample.txt');\n * writer.dispose();\n * ```\n */\nvar StreamWriter = /** @class */ (function () {\n /**\n * Initializes a new instance of the StreamWriter class by using the specified encoding.\n * @param {Encoding} encoding?- The character encoding to use.\n */\n function StreamWriter(encoding) {\n this.bufferBlob = new Blob(['']);\n this.bufferText = '';\n this.init(encoding);\n Save.isMicrosoftBrowser = !(!navigator.msSaveBlob);\n }\n Object.defineProperty(StreamWriter.prototype, \"buffer\", {\n /**\n * Gets the content written to the StreamWriter as Blob.\n * @returns Blob\n */\n get: function () {\n this.flush();\n return this.bufferBlob;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(StreamWriter.prototype, \"encoding\", {\n /**\n * Gets the encoding.\n * @returns Encoding\n */\n get: function () {\n return this.enc;\n },\n enumerable: true,\n configurable: true\n });\n StreamWriter.prototype.init = function (encoding) {\n if (encoding === null || encoding === undefined) {\n this.enc = new Encoding(false);\n this.enc.type = 'Utf8';\n }\n else {\n this.enc = encoding;\n this.setBomByte();\n }\n };\n /**\n * Private method to set Byte Order Mark(BOM) value based on EncodingType\n */\n StreamWriter.prototype.setBomByte = function () {\n if (this.encoding.includeBom) {\n switch (this.encoding.type) {\n case 'Unicode':\n var arrayUnicode = new ArrayBuffer(2);\n var uint8 = new Uint8Array(arrayUnicode);\n uint8[0] = 255;\n uint8[1] = 254;\n this.bufferBlob = new Blob([arrayUnicode]);\n break;\n case 'Utf8':\n var arrayUtf8 = new ArrayBuffer(3);\n var utf8 = new Uint8Array(arrayUtf8);\n utf8[0] = 239;\n utf8[1] = 187;\n utf8[2] = 191;\n this.bufferBlob = new Blob([arrayUtf8]);\n break;\n default:\n this.bufferBlob = new Blob(['']);\n break;\n }\n }\n };\n /**\n * Saves the file with specified name and sends the file to client browser\n * @param {string} fileName - The file name to save\n * @returns {void}\n */\n StreamWriter.prototype.save = function (fileName) {\n if (this.bufferText !== '') {\n this.flush();\n }\n Save.save(fileName, this.buffer);\n };\n /**\n * Writes the specified string.\n * @param {string} value - The string to write. If value is null or undefined, nothing is written.\n * @returns {void}\n */\n StreamWriter.prototype.write = function (value) {\n if (this.encoding === undefined) {\n throw new Error('Object Disposed Exception: current writer is disposed');\n }\n validateNullOrUndefined(value, 'string');\n this.bufferText += value;\n if (this.bufferText.length >= 10240) {\n this.flush();\n }\n };\n StreamWriter.prototype.flush = function () {\n if (this.bufferText === undefined || this.bufferText === null || this.bufferText.length === 0) {\n return;\n }\n var bufferArray = this.encoding.getBytes(this.bufferText, 0, this.bufferText.length);\n this.bufferText = '';\n this.bufferBlob = new Blob([this.bufferBlob, bufferArray]);\n };\n /**\n * Writes the specified string followed by a line terminator\n * @param {string} value - The string to write. If value is null or undefined, nothing is written\n * @returns {void}\n */\n StreamWriter.prototype.writeLine = function (value) {\n if (this.encoding === undefined) {\n throw new Error('Object Disposed Exception: current writer is disposed');\n }\n validateNullOrUndefined(value, 'string');\n this.bufferText = this.bufferText + value + '\\r\\n';\n if (this.bufferText.length >= 10240) {\n this.flush();\n }\n };\n /**\n * Releases the resources used by the StreamWriter\n * @returns {void}\n */\n StreamWriter.prototype.destroy = function () {\n this.bufferBlob = undefined;\n this.bufferText = undefined;\n if (this.enc instanceof Encoding) {\n this.enc.destroy();\n }\n this.enc = undefined;\n };\n return StreamWriter;\n}());\nexport { StreamWriter };\n","import { StreamWriter } from '@syncfusion/ej2-file-utils';\nimport { Encoding } from '@syncfusion/ej2-file-utils';\nimport { PdfDocument } from './pdf-document';\n/**\n * `PdfDocumentBase` class represent common properties of PdfDocument classes.\n * @private\n */\nvar PdfDocumentBase = /** @class */ (function () {\n function PdfDocumentBase(document) {\n /**\n * If the stream is copied, then it specifies true.\n * @private\n */\n this.isStreamCopied = false;\n if (document instanceof PdfDocument) {\n this.document = document;\n }\n }\n Object.defineProperty(PdfDocumentBase.prototype, \"pdfObjects\", {\n //Prpperties\n /**\n * Gets the `PDF objects` collection, which stores all objects and references to it..\n * @private\n */\n get: function () {\n return this.objects;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentBase.prototype, \"crossTable\", {\n /**\n * Gets the `cross-reference` table.\n * @private\n */\n get: function () {\n return this.pdfCrossTable;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentBase.prototype, \"currentSavingObj\", {\n /**\n * Gets or sets the current saving `object number`.\n * @private\n */\n get: function () {\n return this.currentSavingObject;\n },\n set: function (value) {\n this.currentSavingObject = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentBase.prototype, \"catalog\", {\n /**\n * Gets the PDF document `catalog`.\n * @private\n */\n get: function () {\n return this.pdfCatalog;\n },\n set: function (value) {\n this.pdfCatalog = value;\n },\n enumerable: true,\n configurable: true\n });\n //Public methods\n /**\n * Sets the `main object collection`.\n * @private\n */\n PdfDocumentBase.prototype.setMainObjectCollection = function (mainObjectCollection) {\n this.objects = mainObjectCollection;\n };\n /**\n * Sets the `cross table`.\n * @private\n */\n PdfDocumentBase.prototype.setCrossTable = function (cTable) {\n this.pdfCrossTable = cTable;\n };\n /**\n * Sets the `catalog`.\n * @private\n */\n PdfDocumentBase.prototype.setCatalog = function (catalog) {\n this.pdfCatalog = catalog;\n };\n PdfDocumentBase.prototype.save = function (filename) {\n var _this = this;\n var encoding = new Encoding(true);\n var SW = new StreamWriter(encoding);\n if (typeof filename === 'undefined') {\n var encoding_1 = new Encoding(true);\n var SW_1 = new StreamWriter(encoding_1);\n return new Promise(function (resolve, reject) {\n /* tslint:disable-next-line:no-any */\n var obj = {};\n obj.blobData = new Blob([_this.document.docSave(SW_1, true)], { type: 'application/pdf' });\n resolve(obj);\n });\n }\n else {\n this.document.docSave(SW, filename, true);\n }\n };\n /**\n * `Clone` of parent object - PdfDocument.\n * @private\n */\n PdfDocumentBase.prototype.clone = function () {\n return this.document;\n };\n return PdfDocumentBase;\n}());\nexport { PdfDocumentBase };\n","/**\n * `PdfName` class is used to perform name (element names) related primitive operations.\n * @private\n */\nvar PdfName = /** @class */ (function () {\n function PdfName(value) {\n /**\n * `Start symbol` of the name object.\n * @default /\n * @private\n */\n this.stringStartMark = '/';\n /**\n * `Value` of the element.\n * @private\n */\n this.internalValue = '';\n /**\n * Indicates if the object is currently in `saving state or not`.\n * @default false\n * @private\n */\n this.isSaving6 = false;\n /**\n * Internal variable to store the `position`.\n * @default -1\n * @private\n */\n this.position6 = -1;\n this.internalValue = this.normalizeValue(value);\n }\n Object.defineProperty(PdfName.prototype, \"status\", {\n //property\n /**\n * Gets or sets the `Status` of the specified object.\n * @private\n */\n get: function () {\n return this.status6;\n },\n set: function (value) {\n this.status6 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfName.prototype, \"isSaving\", {\n /**\n * Gets or sets a value indicating whether this document `is saving` or not.\n * @private\n */\n get: function () {\n return this.isSaving6;\n },\n set: function (value) {\n this.isSaving6 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfName.prototype, \"objectCollectionIndex\", {\n /**\n * Gets or sets the `index` value of the specified object.\n * @private\n */\n get: function () {\n return this.index6;\n },\n set: function (value) {\n this.index6 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfName.prototype, \"position\", {\n /**\n * Gets or sets the `position` of the object.\n * @private\n */\n get: function () {\n return this.position6;\n },\n set: function (value) {\n this.position6 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfName.prototype, \"clonedObject\", {\n /**\n * Returns `cloned object`.\n * @private\n */\n get: function () {\n return null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfName.prototype, \"value\", {\n /**\n * Gets or sets the `value` of the object.\n * @private\n */\n get: function () {\n return this.internalValue;\n },\n set: function (value) {\n // if (value !== this.value) {\n var val = value;\n if (value !== null && value.length > 0) {\n // val = (value.substring(0, 1) === this.stringStartMark) ? value.substring(1) : value;\n val = value;\n this.internalValue = this.normalizeValue(val);\n }\n else {\n this.internalValue = val;\n }\n // }\n },\n enumerable: true,\n configurable: true\n });\n //public methods\n /**\n * `Saves` the name using the specified writer.\n * @private\n */\n PdfName.prototype.save = function (writer) {\n // if (writer === null) {\n // throw new Error('ArgumentNullException : writer');\n // }\n writer.write(this.toString());\n };\n /**\n * Gets `string` representation of the primitive.\n * @private\n */\n PdfName.prototype.toString = function () {\n return (this.stringStartMark + this.escapeString(this.value));\n };\n /**\n * Creates a `copy of PdfName`.\n * @private\n */\n PdfName.prototype.clone = function (crossTable) {\n var newName = new PdfName();\n newName.value = this.internalValue;\n return newName;\n };\n /**\n * Replace some characters with its `escape sequences`.\n * @private\n */\n PdfName.prototype.escapeString = function (stringValue) {\n // if (str === null) {\n // throw new Error('ArgumentNullException : str');\n // }\n // if (str === '') {\n // return str;\n // }\n var result = '';\n var len = 0;\n for (var i = 0, len_1 = stringValue.length; i < len_1; i++) {\n var ch = stringValue[i];\n var index = PdfName.delimiters.indexOf(ch);\n // switch (ch) {\n // case '\\r' :\n // result = result + '\\\\r';\n // break;\n // case '\\n' :\n // result = result + '\\n';\n // break;\n // case '(' :\n // case ')' :\n // case '\\\\' :\n // //result.Append( '\\\\' ).Append( ch );\n // result = result + ch;\n // break;\n // default :\n // result = result + ch;\n // break;\n // }\n result = result + ch;\n }\n return result;\n };\n //methiods\n /**\n * Replace a symbol with its code with the precedence of the `sharp sign`.\n * @private\n */\n PdfName.prototype.normalizeValue = function (value, c) {\n // if (typeof c === undefined) {\n // let str : string = value;\n // for (let i : number = 0; i < PdfName.replacements.length; i++) {\n // str = this.normalizeValue(str, c);\n // }\n // return str;\n // } else {\n var strFormat = '#{0:X}';\n //return value.replace(c.toString(),String.format(strFormat,c));\n return value;\n // }\n };\n /**\n * PDF `special characters`.\n * @private\n */\n PdfName.delimiters = '()<>[]{}/%}';\n /**\n * The symbols that are not allowed in PDF names and `should be replaced`.\n * @private\n */\n PdfName.replacements = [' ', '\\t', '\\n', '\\r'];\n return PdfName;\n}());\nexport { PdfName };\n","/**\n * PdfOperators.ts class for EJ2-PDF\n * Class of string PDF common operators.\n * @private\n */\nvar Operators = /** @class */ (function () {\n /**\n * Create an instance of `PdfOperator` class.\n * @private\n */\n function Operators() {\n /**\n * Specifies the value of `test`.\n * @private\n */\n this.forTest = 'test';\n this.forTest = Operators.obj;\n }\n /**\n * Specifies the value of `obj`.\n * @private\n */\n Operators.obj = 'obj';\n /**\n * Specifies the value of `endObj`.\n * @private\n */\n Operators.endObj = 'endobj';\n /**\n * Specifies the value of `R`.\n * @private\n */\n Operators.r = 'R';\n /**\n * Specifies the value of ` `.\n * @private\n */\n Operators.whiteSpace = ' ';\n /**\n * Specifies the value of `/`.\n * @private\n */\n Operators.slash = '/';\n /**\n * Specifies the value of `\\r\\n`.\n * @private\n */\n Operators.newLine = '\\r\\n';\n /**\n * Specifies the value of `stream`.\n * @private\n */\n Operators.stream = 'stream';\n /**\n * Specifies the value of `endStream`.\n * @private\n */\n Operators.endStream = 'endstream';\n /**\n * Specifies the value of `xref`.\n * @private\n */\n Operators.xref = 'xref';\n /**\n * Specifies the value of `f`.\n * @private\n */\n Operators.f = 'f';\n /**\n * Specifies the value of `n`.\n * @private\n */\n Operators.n = 'n';\n /**\n * Specifies the value of `trailer`.\n * @private\n */\n Operators.trailer = 'trailer';\n /**\n * Specifies the value of `startxref`.\n * @private\n */\n Operators.startxref = 'startxref';\n /**\n * Specifies the value of `eof`.\n * @private\n */\n Operators.eof = '%%EOF';\n /**\n * Specifies the value of `header`.\n * @private\n */\n Operators.header = '%PDF-1.5';\n /**\n * Specifies the value of `beginText`.\n * @private\n */\n Operators.beginText = 'BT';\n /**\n * Specifies the value of `endText`.\n * @private\n */\n Operators.endText = 'ET';\n /**\n * Specifies the value of `m`.\n * @private\n */\n Operators.beginPath = 'm';\n /**\n * Specifies the value of `l`.\n * @private\n */\n Operators.appendLineSegment = 'l';\n /**\n * Specifies the value of `S`.\n * @private\n */\n Operators.stroke = 'S';\n /**\n * Specifies the value of `f`.\n * @private\n */\n Operators.fill = 'f';\n /**\n * Specifies the value of `f*`.\n * @private\n */\n Operators.fillEvenOdd = 'f*';\n /**\n * Specifies the value of `B`.\n * @private\n */\n Operators.fillStroke = 'B';\n /**\n * Specifies the value of `B*`.\n * @private\n */\n Operators.fillStrokeEvenOdd = 'B*';\n /**\n * Specifies the value of `c`.\n * @private\n */\n Operators.appendbeziercurve = 'c';\n /**\n * Specifies the value of `re`.\n * @private\n */\n Operators.appendRectangle = 're';\n /**\n * Specifies the value of `q`.\n * @private\n */\n Operators.saveState = 'q';\n /**\n * Specifies the value of `Q`.\n * @private\n */\n Operators.restoreState = 'Q';\n /**\n * Specifies the value of `Do`.\n * @private\n */\n Operators.paintXObject = 'Do';\n /**\n * Specifies the value of `cm`.\n * @private\n */\n Operators.modifyCtm = 'cm';\n /**\n * Specifies the value of `Tm`.\n * @private\n */\n Operators.modifyTM = 'Tm';\n /**\n * Specifies the value of `w`.\n * @private\n */\n Operators.setLineWidth = 'w';\n /**\n * Specifies the value of `J`.\n * @private\n */\n Operators.setLineCapStyle = 'J';\n /**\n * Specifies the value of `j`.\n * @private\n */\n Operators.setLineJoinStyle = 'j';\n /**\n * Specifies the value of `d`.\n * @private\n */\n Operators.setDashPattern = 'd';\n /**\n * Specifies the value of `i`.\n * @private\n */\n Operators.setFlatnessTolerance = 'i';\n /**\n * Specifies the value of `h`.\n * @private\n */\n Operators.closePath = 'h';\n /**\n * Specifies the value of `s`.\n * @private\n */\n Operators.closeStrokePath = 's';\n /**\n * Specifies the value of `b`.\n * @private\n */\n Operators.closeFillStrokePath = 'b';\n /**\n * Specifies the value of `setCharacterSpace`.\n * @private\n */\n Operators.setCharacterSpace = 'Tc';\n /**\n * Specifies the value of `setWordSpace`.\n * @private\n */\n Operators.setWordSpace = 'Tw';\n /**\n * Specifies the value of `setHorizontalScaling`.\n * @private\n */\n Operators.setHorizontalScaling = 'Tz';\n /**\n * Specifies the value of `setTextLeading`.\n * @private\n */\n Operators.setTextLeading = 'TL';\n /**\n * Specifies the value of `setFont`.\n * @private\n */\n Operators.setFont = 'Tf';\n /**\n * Specifies the value of `setRenderingMode`.\n * @private\n */\n Operators.setRenderingMode = 'Tr';\n /**\n * Specifies the value of `setTextRise`.\n * @private\n */\n Operators.setTextRise = 'Ts';\n /**\n * Specifies the value of `setTextScaling`.\n * @private\n */\n Operators.setTextScaling = 'Tz';\n /**\n * Specifies the value of `setCoords`.\n * @private\n */\n Operators.setCoords = 'Td';\n /**\n * Specifies the value of `goToNextLine`.\n * @private\n */\n Operators.goToNextLine = 'T*';\n /**\n * Specifies the value of `setText`.\n * @private\n */\n Operators.setText = 'Tj';\n /**\n * Specifies the value of `setTextWithFormatting`.\n * @private\n */\n Operators.setTextWithFormatting = 'TJ';\n /**\n * Specifies the value of `setTextOnNewLine`.\n * @private\n */\n Operators.setTextOnNewLine = '\\'';\n /**\n * Specifies the value of `selectcolorspaceforstroking`.\n * @private\n */\n Operators.selectcolorspaceforstroking = 'CS';\n /**\n * Specifies the value of `selectcolorspacefornonstroking`.\n * @private\n */\n Operators.selectcolorspacefornonstroking = 'cs';\n /**\n * Specifies the value of `setrbgcolorforstroking`.\n * @private\n */\n Operators.setrbgcolorforstroking = 'RG';\n /**\n * Specifies the value of `setrbgcolorfornonstroking`.\n * @private\n */\n Operators.setrbgcolorfornonstroking = 'rg';\n /**\n * Specifies the value of `K`.\n * @private\n */\n Operators.setcmykcolorforstroking = 'K';\n /**\n * Specifies the value of `k`.\n * @private\n */\n Operators.setcmykcolorfornonstroking = 'k';\n /**\n * Specifies the value of `G`.\n * @private\n */\n Operators.setgraycolorforstroking = 'G';\n /**\n * Specifies the value of `g`.\n * @private\n */\n Operators.setgraycolorfornonstroking = 'g';\n /**\n * Specifies the value of `W`.\n * @private\n */\n Operators.clipPath = 'W';\n /**\n * Specifies the value of `clipPathEvenOdd`.\n * @private\n */\n Operators.clipPathEvenOdd = 'W*';\n /**\n * Specifies the value of `n`.\n * @private\n */\n Operators.endPath = 'n';\n /**\n * Specifies the value of `setGraphicsState`.\n * @private\n */\n Operators.setGraphicsState = 'gs';\n /**\n * Specifies the value of `%`.\n * @private\n */\n Operators.comment = '%';\n /**\n * Specifies the value of `*`.\n * @private\n */\n Operators.evenOdd = '*';\n /**\n * Specifies the value of `M`.\n * @private\n */\n Operators.setMiterLimit = 'M';\n /**\n * Same as SC, but also supports Pattern, Separation, DeviceN, and ICCBased color spaces. For non-stroking operations.\n * @public\n */\n Operators.setColorAndPattern = 'scn';\n /**\n * Same as SC, but also supports Pattern, Separation, DeviceN, and ICCBased color spaces. For stroking.\n */\n Operators.setColorAndPatternStroking = 'SCN';\n return Operators;\n}());\nexport { Operators };\n","/**\n * dictionaryProperties.ts class for EJ2-PDF\n * PDF dictionary properties.\n * @private\n */\nvar DictionaryProperties = /** @class */ (function () {\n /**\n * Initialize an instance for `PdfDictionaryProperties` class.\n * @private\n */\n function DictionaryProperties() {\n /**\n * Specifies the value of `Pages`.\n * @private\n */\n this.pages = 'Pages';\n /**\n * Specifies the value of `Kids`.\n * @private\n */\n this.kids = 'Kids';\n /**\n * Specifies the value of `Count`.\n * @private\n */\n this.count = 'Count';\n /**\n * Specifies the value of `Resources`.\n * @private\n */\n this.resources = 'Resources';\n /**\n * Specifies the value of `Type`.\n * @private\n */\n this.type = 'Type';\n /**\n * Specifies the value of `Size`.\n * @private\n */\n this.size = 'Size';\n /**\n * Specifies the value of `MediaBox`.\n * @private\n */\n this.mediaBox = 'MediaBox';\n /**\n * Specifies the value of `Parent`.\n * @private\n */\n this.parent = 'Parent';\n /**\n * Specifies the value of `Root`.\n * @private\n */\n this.root = 'Root';\n /**\n * Specifies the value of `DecodeParms`.\n * @private\n */\n this.decodeParms = 'DecodeParms';\n /**\n * Specifies the value of `Filter`.\n * @private\n */\n this.filter = 'Filter';\n /**\n * Specifies the value of `Font`.\n * @private\n */\n this.font = 'Font';\n /**\n * Specifies the value of `Type1`.\n * @private\n */\n this.type1 = 'Type1';\n /**\n * Specifies the value of `BaseFont`.\n * @private\n */\n this.baseFont = 'BaseFont';\n /**\n * Specifies the value of `Encoding`.\n * @private\n */\n this.encoding = 'Encoding';\n /**\n * Specifies the value of `Subtype`.\n * @private\n */\n this.subtype = 'Subtype';\n /**\n * Specifies the value of `Contents`.\n * @private\n */\n this.contents = 'Contents';\n /**\n * Specifies the value of `ProcSet`.\n * @private\n */\n this.procset = 'ProcSet';\n /**\n * Specifies the value of `ColorSpace`.\n * @private\n */\n this.colorSpace = 'ColorSpace';\n /**\n * Specifies the value of `ExtGState`.\n * @private\n */\n this.extGState = 'ExtGState';\n /**\n * Specifies the value of `Pattern`.\n * @private\n */\n this.pattern = 'Pattern';\n /**\n * Specifies the value of `XObject`.\n * @private\n */\n this.xObject = 'XObject';\n /**\n * Specifies the value of `Length`.\n * @private\n */\n this.length = 'Length';\n /**\n * Specifies the value of `Width`.\n * @private\n */\n this.width = 'Width';\n /**\n * Specifies the value of `Height`.\n * @private\n */\n this.height = 'Height';\n /**\n * Specifies the value of `BitsPerComponent`.\n * @private\n */\n this.bitsPerComponent = 'BitsPerComponent';\n /**\n * Specifies the value of `Image`.\n * @private\n */\n this.image = 'Image';\n /**\n * Specifies the value of `dctdecode`.\n * @private\n */\n this.dctdecode = 'DCTDecode';\n /**\n * Specifies the value of `Columns`.\n * @private\n */\n this.columns = 'Columns';\n /**\n * Specifies the value of `BlackIs1`.\n * @private\n */\n this.blackIs1 = 'BlackIs1';\n /**\n * Specifies the value of `K`.\n * @private\n */\n this.k = 'K';\n /**\n * Specifies the value of `S`.\n * @private\n */\n this.s = 'S';\n /**\n * Specifies the value of `Predictor`.\n * @private\n */\n this.predictor = 'Predictor';\n /**\n * Specifies the value of `DeviceRGB`.\n * @private\n */\n this.deviceRgb = 'DeviceRGB';\n /**\n * Specifies the value of `Next`.\n * @private\n */\n this.next = 'Next';\n /**\n * Specifies the value of `Action`.\n * @private\n */\n this.action = 'Action';\n /**\n * Specifies the value of `Link`.\n * @private\n */\n this.link = 'Link';\n /**\n *\n * Specifies the value of `A`.\n * @private\n */\n this.a = 'A';\n /**\n * Specifies the value of `Annot`.\n * @private\n */\n this.annot = 'Annot';\n /**\n * Specifies the value of `P`.\n * @private\n */\n this.p = 'P';\n /**\n * Specifies the value of `C`.\n * @private\n */\n this.c = 'C';\n /**\n * Specifies the value of `Rect`.\n * @private\n */\n this.rect = 'Rect';\n /**\n * Specifies the value of `URI`.\n * @private\n */\n this.uri = 'URI';\n /**\n * Specifies the value of `Annots`.\n * @private\n */\n this.annots = 'Annots';\n /**\n * Specifies the value of `ca`.\n * @private\n */\n this.ca = 'ca';\n /**\n * Specifies the value of `CA`.\n * @private\n */\n this.CA = 'CA';\n /**\n * Specifies the value of `XYZ`.\n * @private\n */\n this.xyz = 'XYZ';\n /**\n * Specifies the value of `Fit`.\n * @private\n */\n this.fit = 'Fit';\n /**\n * Specifies the value of `Dest`.\n * @private\n */\n this.dest = 'Dest';\n /**\n * Specifies the value of `BM`.\n * @private\n */\n this.BM = 'BM';\n /**\n * Specifies the value of `flatedecode`.\n * @private\n */\n this.flatedecode = 'FlateDecode';\n /**\n * Specifies the value of `Rotate`.\n * @private\n */\n this.rotate = 'Rotate';\n /**\n * Specifies the value of 'bBox'.\n * @private\n */\n this.bBox = 'BBox';\n /**\n * Specifies the value of 'form'.\n * @private\n */\n this.form = 'Form';\n /**\n * Specifies the value of 'w'.\n * @private\n */\n this.w = 'W';\n /**\n * Specifies the value of 'cIDFontType2'.\n * @private\n */\n this.cIDFontType2 = 'CIDFontType2';\n /**\n * Specifies the value of 'cIDToGIDMap'.\n * @private\n */\n this.cIDToGIDMap = 'CIDToGIDMap';\n /**\n * Specifies the value of 'identity'.\n * @private\n */\n this.identity = 'Identity';\n /**\n * Specifies the value of 'dw'.\n * @private\n */\n this.dw = 'DW';\n /**\n * Specifies the value of 'fontDescriptor'.\n * @private\n */\n this.fontDescriptor = 'FontDescriptor';\n /**\n * Specifies the value of 'cIDSystemInfo'.\n * @private\n */\n this.cIDSystemInfo = 'CIDSystemInfo';\n /**\n * Specifies the value of 'fontName'.\n * @private\n */\n this.fontName = 'FontName';\n /**\n * Specifies the value of 'flags'.\n * @private\n */\n this.flags = 'Flags';\n /**\n * Specifies the value of 'fontBBox'.\n * @private\n */\n this.fontBBox = 'FontBBox';\n /**\n * Specifies the value of 'missingWidth'.\n * @private\n */\n this.missingWidth = 'MissingWidth';\n /**\n * Specifies the value of 'stemV'.\n * @private\n */\n this.stemV = 'StemV';\n /**\n * Specifies the value of 'italicAngle'.\n * @private\n */\n this.italicAngle = 'ItalicAngle';\n /**\n * Specifies the value of 'capHeight'.\n * @private\n */\n this.capHeight = 'CapHeight';\n /**\n * Specifies the value of 'ascent'.\n * @private\n */\n this.ascent = 'Ascent';\n /**\n * Specifies the value of 'descent'.\n * @private\n */\n this.descent = 'Descent';\n /**\n * Specifies the value of 'leading'.\n * @private\n */\n this.leading = 'Leading';\n /**\n * Specifies the value of 'avgWidth'.\n * @private\n */\n this.avgWidth = 'AvgWidth';\n /**\n * Specifies the value of 'fontFile2'.\n * @private\n */\n this.fontFile2 = 'FontFile2';\n /**\n * Specifies the value of 'maxWidth'.\n * @private\n */\n this.maxWidth = 'MaxWidth';\n /**\n * Specifies the value of 'xHeight'.\n * @private\n */\n this.xHeight = 'XHeight';\n /**\n * Specifies the value of 'stemH'.\n * @private\n */\n this.stemH = 'StemH';\n /**\n * Specifies the value of 'registry'.\n * @private\n */\n this.registry = 'Registry';\n /**\n * Specifies the value of 'ordering'.\n * @private\n */\n this.ordering = 'Ordering';\n /**\n * Specifies the value of 'supplement'.\n * @private\n */\n this.supplement = 'Supplement';\n /**\n * Specifies the value of 'type0'.\n * @private\n */\n this.type0 = 'Type0';\n /**\n * Specifies the value of 'identityH'.\n * @private\n */\n this.identityH = 'Identity-H';\n /**\n * Specifies the value of 'toUnicode'.\n * @private\n */\n this.toUnicode = 'ToUnicode';\n /**\n * Specifies the value of 'descendantFonts'.\n * @private\n */\n this.descendantFonts = 'DescendantFonts';\n /**\n * Specifies the value of 'background'.\n * @private\n */\n this.background = 'Background';\n /**\n * Specifies the value of 'shading'.\n * @private\n */\n this.shading = 'Shading';\n /**\n * Specifies the value of 'matrix'.\n * @private\n */\n this.matrix = 'Matrix';\n /**\n * Specifies the value of 'antiAlias'.\n * @private\n */\n this.antiAlias = 'AntiAlias';\n /**\n * Specifies the value of 'function'.\n * @private\n */\n this.function = 'Function';\n /**\n * Specifies the value of 'extend'.\n * @private\n */\n this.extend = 'Extend';\n /**\n * Specifies the value of 'shadingType'.\n * @private\n */\n this.shadingType = 'ShadingType';\n /**\n * Specifies the value of 'coords'.\n * @private\n */\n this.coords = 'Coords';\n /**\n * Specifies the value of 'domain'.\n * @private\n */\n this.domain = 'Domain';\n /**\n * Specifies the value of 'range'.\n * @private\n */\n this.range = 'Range';\n /**\n * Specifies the value of 'functionType'.\n * @private\n */\n this.functionType = 'FunctionType';\n /**\n * Specifies the value of 'bitsPerSample'.\n * @private\n */\n this.bitsPerSample = 'BitsPerSample';\n /**\n * Specifies the value of 'patternType'.\n * @private\n */\n this.patternType = 'PatternType';\n /**\n * Specifies the value of 'paintType'.\n * @private\n */\n this.paintType = 'PaintType';\n /**\n * Specifies the value of 'tilingType'.\n * @private\n */\n this.tilingType = 'TilingType';\n /**\n * Specifies the value of 'xStep'.\n * @private\n */\n this.xStep = 'XStep';\n /**\n * Specifies the value of 'yStep'.\n * @private\n */\n this.yStep = 'YStep';\n //\n }\n return DictionaryProperties;\n}());\nexport { DictionaryProperties };\n","import { Dictionary } from './../collections/dictionary';\nimport { PdfName } from './pdf-name';\nimport { Operators } from './../input-output/pdf-operators';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\n/**\n * `PdfDictionary` class is used to perform primitive operations.\n * @private\n */\nvar PdfDictionary = /** @class */ (function () {\n function PdfDictionary(dictionary) {\n /**\n * Internal variable to store the `position`.\n * @default -1\n * @private\n */\n this.position7 = -1;\n /**\n * The `IPdfSavable` with the specified key.\n * @private\n */\n this.primitiveItems = new Dictionary();\n /**\n * `Start marker` for dictionary.\n * @private\n */\n this.prefix = '<<';\n /**\n * `End marker` for dictionary.\n * @private\n */\n this.suffix = '>>';\n /**\n * @hidden\n * @private\n */\n this.resources = [];\n /**\n * Internal variable to hold `cloned object`.\n * @default null\n * @private\n */\n this.object = null;\n /**\n * Flag for PDF file formar 1.5 is dictionary `archiving` needed.\n * @default true\n * @private\n */\n this.archive = true;\n /**\n * Represents the Font dictionary.\n * @hidden\n * @private\n */\n this.isFont = false;\n if (typeof dictionary === 'undefined') {\n this.primitiveItems = new Dictionary();\n this.encrypt = true;\n this.dictionaryProperties = new DictionaryProperties();\n }\n else {\n this.primitiveItems = new Dictionary();\n var keys = dictionary.items.keys();\n var values = dictionary.items.values();\n for (var index = 0; index < dictionary.items.size(); index++) {\n this.primitiveItems.setValue(keys[index], values[index]);\n }\n this.status = dictionary.status;\n this.freezeChanges(this);\n this.encrypt = true;\n this.dictionaryProperties = new DictionaryProperties();\n }\n }\n Object.defineProperty(PdfDictionary.prototype, \"items\", {\n //Properties\n /**\n * Gets or sets the `IPdfSavable` with the specified key.\n * @private\n */\n get: function () {\n return this.primitiveItems;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDictionary.prototype, \"status\", {\n /**\n * Gets or sets the `Status` of the specified object.\n * @private\n */\n get: function () {\n return this.status7;\n },\n set: function (value) {\n this.status7 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDictionary.prototype, \"isSaving\", {\n /**\n * Gets or sets a value indicating whether this document `is saving` or not.\n * @private\n */\n get: function () {\n return this.isSaving7;\n },\n set: function (value) {\n this.isSaving7 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDictionary.prototype, \"objectCollectionIndex\", {\n /**\n * Gets or sets the `index` value of the specified object.\n * @private\n */\n get: function () {\n return this.index7;\n },\n set: function (value) {\n this.index7 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDictionary.prototype, \"clonedObject\", {\n /**\n * Returns `cloned object`.\n * @private\n */\n get: function () {\n return this.object;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDictionary.prototype, \"position\", {\n /**\n * Gets or sets the `position` of the object.\n * @private\n */\n get: function () {\n return this.position7;\n },\n set: function (value) {\n this.position7 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDictionary.prototype, \"Count\", {\n /**\n * Gets the `count`.\n * @private\n */\n get: function () {\n return this.primitiveItems.size();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDictionary.prototype, \"Dictionary\", {\n /**\n * Collection of `items` in the object.\n * @private\n */\n get: function () {\n return this;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Get flag if need to `archive` dictionary.\n * @private\n */\n PdfDictionary.prototype.getArchive = function () {\n return this.archive;\n };\n /**\n * Set flag if need to `archive` dictionary.\n * @private\n */\n PdfDictionary.prototype.setArchive = function (value) {\n this.archive = value;\n };\n /**\n * Sets flag if `encryption` is needed.\n * @private\n */\n PdfDictionary.prototype.setEncrypt = function (value) {\n this.encrypt = value;\n this.modify();\n };\n /**\n * Gets flag if `encryption` is needed.\n * @private\n */\n PdfDictionary.prototype.getEncrypt = function () {\n return this.encrypt;\n };\n /**\n * `Freezes` the changes.\n * @private\n */\n PdfDictionary.prototype.freezeChanges = function (freezer) {\n this.bChanged = false;\n };\n /**\n * Creates a `copy of PdfDictionary`.\n * @private\n */\n PdfDictionary.prototype.clone = function (crossTable) {\n //Need to add more codings\n var newDict = new PdfDictionary();\n return newDict;\n };\n /**\n * `Mark` this instance modified.\n * @private\n */\n PdfDictionary.prototype.modify = function () {\n this.bChanged = true;\n };\n /**\n * `Removes` the specified key.\n * @private\n */\n PdfDictionary.prototype.remove = function (key) {\n if (typeof key !== 'string') {\n this.primitiveItems.remove(key.value);\n this.modify();\n }\n else {\n this.remove(new PdfName(key));\n }\n };\n /**\n * `Determines` whether the dictionary contains the key.\n * @private\n */\n PdfDictionary.prototype.containsKey = function (key) {\n var returnValue = false;\n returnValue = this.primitiveItems.containsKey(key.toString());\n return returnValue;\n };\n /**\n * Raises event `BeginSave`.\n * @private\n */\n PdfDictionary.prototype.onBeginSave = function () {\n this.beginSave.sender.beginSave();\n };\n /**\n * Raises event `Font Dictionary BeginSave`.\n * @private\n */\n PdfDictionary.prototype.onFontDictionaryBeginSave = function () {\n this.fontDictionaryBeginSave.sender.fontDictionaryBeginSave();\n };\n /**\n * Raises event `Descendant Font BeginSave`.\n * @private\n */\n PdfDictionary.prototype.onDescendantFontBeginSave = function () {\n this.descendantFontBeginSave.sender.descendantFontBeginSave();\n };\n /**\n * Raises event 'BeginSave'.\n * @private\n */\n PdfDictionary.prototype.onTemplateBeginSave = function () {\n this.pageBeginDrawTemplate.sender.pageBeginSave();\n };\n /**\n * Raises event `BeginSave`.\n * @private\n */\n PdfDictionary.prototype.onBeginAnnotationSave = function () {\n this.annotationBeginSave.sender.beginSave();\n };\n /**\n * Raises event `BeginSave`.\n * @private\n */\n PdfDictionary.prototype.onSectionBeginSave = function (writer) {\n var saveEvent = this.sectionBeginSave;\n saveEvent.sender.beginSave(saveEvent.state, writer);\n };\n PdfDictionary.prototype.save = function (writer, bRaiseEvent) {\n if (typeof bRaiseEvent === 'undefined') {\n this.save(writer, true);\n }\n else {\n writer.write(this.prefix);\n if (typeof this.beginSave !== 'undefined') {\n this.onBeginSave();\n }\n if (typeof this.descendantFontBeginSave !== 'undefined') {\n this.onDescendantFontBeginSave();\n }\n if (typeof this.fontDictionaryBeginSave !== 'undefined') {\n this.onFontDictionaryBeginSave();\n }\n if (typeof this.annotationBeginSave !== 'undefined') {\n this.onBeginAnnotationSave();\n }\n if (typeof this.sectionBeginSave !== 'undefined') {\n this.onSectionBeginSave(writer);\n }\n if (typeof this.pageBeginDrawTemplate !== 'undefined') {\n this.onTemplateBeginSave();\n }\n // }\n if (this.Count > 0) {\n this.saveItems(writer);\n }\n writer.write(this.suffix);\n writer.write(Operators.newLine);\n }\n };\n /**\n * `Save dictionary items`.\n * @private\n */\n PdfDictionary.prototype.saveItems = function (writer) {\n writer.write(Operators.newLine);\n var keys = this.primitiveItems.keys();\n var values = this.primitiveItems.values();\n for (var index = 0; index < keys.length; index++) {\n var key = keys[index];\n var name_1 = new PdfName(key);\n name_1.save(writer);\n writer.write(Operators.whiteSpace);\n var resources = values[index];\n resources.save(writer);\n writer.write(Operators.newLine);\n }\n };\n return PdfDictionary;\n}());\nexport { PdfDictionary };\nvar SaveSectionCollectionEventHandler = /** @class */ (function () {\n /**\n * New instance for `save section collection event handler` class.\n * @private\n */\n function SaveSectionCollectionEventHandler(sender) {\n this.sender = sender;\n }\n return SaveSectionCollectionEventHandler;\n}());\nexport { SaveSectionCollectionEventHandler };\nvar SaveDescendantFontEventHandler = /** @class */ (function () {\n /**\n * New instance for `save section collection event handler` class.\n * @private\n */\n function SaveDescendantFontEventHandler(sender) {\n this.sender = sender;\n }\n return SaveDescendantFontEventHandler;\n}());\nexport { SaveDescendantFontEventHandler };\nvar SaveFontDictionaryEventHandler = /** @class */ (function () {\n /**\n * New instance for `save section collection event handler` class.\n * @private\n */\n function SaveFontDictionaryEventHandler(sender) {\n this.sender = sender;\n }\n return SaveFontDictionaryEventHandler;\n}());\nexport { SaveFontDictionaryEventHandler };\nvar SaveAnnotationEventHandler = /** @class */ (function () {\n /**\n * New instance for `save annotation event handler` class.\n * @private\n */\n function SaveAnnotationEventHandler(sender) {\n this.sender = sender;\n }\n return SaveAnnotationEventHandler;\n}());\nexport { SaveAnnotationEventHandler };\nvar SaveSectionEventHandler = /** @class */ (function () {\n // constructors\n /**\n * New instance for `save section event handler` class.\n * @private\n */\n function SaveSectionEventHandler(sender, state) {\n this.sender = sender;\n this.state = state;\n }\n return SaveSectionEventHandler;\n}());\nexport { SaveSectionEventHandler };\n/**\n * SaveTemplateEventHandler class used to store information about template elements.\n * @private\n * @hidden\n */\nvar SaveTemplateEventHandler = /** @class */ (function () {\n /**\n * New instance for save section collection event handler class.\n * @public\n */\n function SaveTemplateEventHandler(sender) {\n this.sender = sender;\n }\n return SaveTemplateEventHandler;\n}());\nexport { SaveTemplateEventHandler };\n","/**\n * `PdfNumber` class is used to perform number related primitive operations.\n * @private\n */\nvar PdfNumber = /** @class */ (function () {\n /**\n * Initializes a new instance of the `PdfNumber` class.\n * @private\n */\n function PdfNumber(value) {\n /**\n * Sotres the `position`.\n * @default -1\n * @private\n */\n this.position5 = -1;\n this.value = value;\n }\n Object.defineProperty(PdfNumber.prototype, \"intValue\", {\n /**\n * Gets or sets the `integer` value.\n * @private\n */\n get: function () {\n return this.value;\n },\n set: function (value) {\n this.value = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfNumber.prototype, \"isInteger\", {\n /**\n * Gets or sets a value indicating whether this instance `is integer`.\n * @private\n */\n get: function () {\n return this.integer;\n },\n set: function (value) {\n this.integer = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfNumber.prototype, \"status\", {\n /**\n * Gets or sets the `Status` of the specified object.\n * @private\n */\n get: function () {\n return this.status5;\n },\n set: function (value) {\n this.status5 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfNumber.prototype, \"isSaving\", {\n /**\n * Gets or sets a value indicating whether this document `is saving` or not.\n * @private\n */\n get: function () {\n return this.isSaving5;\n },\n set: function (value) {\n this.isSaving5 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfNumber.prototype, \"objectCollectionIndex\", {\n /**\n * Gets or sets the `index` value of the specified object.\n * @private\n */\n get: function () {\n return this.index5;\n },\n set: function (value) {\n this.index5 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfNumber.prototype, \"position\", {\n /**\n * Gets or sets the `position` of the object.\n * @private\n */\n get: function () {\n return this.position5;\n },\n set: function (value) {\n this.position5 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfNumber.prototype, \"clonedObject\", {\n /**\n * Returns `cloned object`.\n * @private\n */\n get: function () {\n var rValue = null;\n return rValue;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Saves the object`.\n * @private\n */\n PdfNumber.prototype.save = function (writer) {\n writer.write(this.intValue.toString()); //tostring(CultureInfo.InletiantCulture)\n };\n /**\n * Creates a `copy of PdfNumber`.\n * @private\n */\n PdfNumber.prototype.clone = function (crossTable) {\n var newNumber = new PdfNumber(this.value);\n return newNumber;\n };\n /**\n * Converts a `float value to a string` using Adobe PDF rules.\n * @private\n */\n PdfNumber.floatToString = function (number) {\n // let tempString1 : string = number.toString();\n // let tempString2 : string = tempString1.indexOf('.') != -1 ? tempString1.substring(0, tempString1.indexOf('.')) : tempString1;\n var returnString = number.toFixed(2);\n if (returnString === '0.00') {\n returnString = '.00';\n }\n // let prefixLength : number = (22 - tempString2.length) >= 0 ? (22 - tempString2.length) : 0;\n // for (let index : number = 0; index < prefixLength; index++) {\n // returnString += '0';\n // }\n // returnString += tempString2 + '.00';\n // returnString += (tempString3.length > 6) ? tempString3.substring(0,6) : tempString3;\n // let suffixLength : number = (6 - tempString3.length) >= 0 ? (6 - tempString3.length) : 0;\n // for (let index : number = 0; index < suffixLength; index++) {\n // returnString += '0';\n // }\n return returnString;\n };\n /**\n * Determines the `minimum of the three values`.\n * @private\n */\n PdfNumber.min = function (x, y, z) {\n var r = Math.min(x, y);\n return Math.min(z, r);\n };\n return PdfNumber;\n}());\nexport { PdfNumber };\n","import { PdfNumber } from './pdf-number';\nimport { Operators } from './../input-output/pdf-operators';\n/**\n * `PdfArray` class is used to perform array related primitive operations.\n * @private\n */\nvar PdfArray = /** @class */ (function () {\n function PdfArray(array) {\n //Fields\n /**\n * `startMark` - '['\n * @private\n */\n this.startMark = '[';\n /**\n * `endMark` - ']'.\n * @private\n */\n this.endMark = ']';\n /**\n * Internal variable to store the `position`.\n * @default -1\n * @private\n */\n this.position9 = -1;\n /**\n * Internal variable to hold `cloned object`.\n * @default null\n * @private\n */\n this.clonedObject9 = null;\n /**\n * Represents the Font dictionary.\n * @hidden\n * @private\n */\n this.isFont = false;\n if (typeof array === 'undefined') {\n this.internalElements = [];\n }\n else {\n if (typeof array !== 'undefined' && !(array instanceof PdfArray)) {\n var tempNumberArray = array;\n for (var index = 0; index < tempNumberArray.length; index++) {\n var pdfNumber = new PdfNumber(tempNumberArray[index]);\n this.add(pdfNumber);\n }\n // } else if (typeof array !== 'undefined' && (array instanceof PdfArray)) {\n }\n else {\n var tempArray = array;\n // if (tempArray.Elements.length > 0) {\n this.internalElements = [];\n for (var index = 0; index < tempArray.elements.length; index++) {\n this.internalElements.push(tempArray.elements[index]);\n }\n // }\n }\n }\n }\n //property\n /**\n * Gets the `IPdfSavable` at the specified index.\n * @private\n */\n PdfArray.prototype.items = function (index) {\n // if (index < 0 || index >= this.Count) {\n // throw new Error('ArgumentOutOfRangeException : index, The index can\"t be less then zero or greater then Count.');\n // }\n return this.internalElements[index];\n };\n Object.defineProperty(PdfArray.prototype, \"count\", {\n /**\n * Gets the `count`.\n * @private\n */\n get: function () {\n return this.internalElements.length;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfArray.prototype, \"status\", {\n /**\n * Gets or sets the `Status` of the specified object.\n * @private\n */\n get: function () {\n return this.status9;\n },\n set: function (value) {\n this.status9 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfArray.prototype, \"isSaving\", {\n /**\n * Gets or sets a value indicating whether this document `is saving` or not.\n * @private\n */\n get: function () {\n return this.isSaving9;\n },\n set: function (value) {\n this.isSaving9 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfArray.prototype, \"clonedObject\", {\n /**\n * Returns `cloned object`.\n * @private\n */\n get: function () {\n return this.clonedObject9;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfArray.prototype, \"position\", {\n /**\n * Gets or sets the `position` of the object.\n * @private\n */\n get: function () {\n return this.position9;\n },\n set: function (value) {\n this.position9 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfArray.prototype, \"objectCollectionIndex\", {\n /**\n * Gets or sets the `index` value of the specified object.\n * @private\n */\n get: function () {\n return this.index9;\n },\n set: function (value) {\n this.index9 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfArray.prototype, \"CrossTable\", {\n /**\n * Returns `PdfCrossTable` associated with the object.\n * @private\n */\n get: function () {\n return this.pdfCrossTable;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfArray.prototype, \"elements\", {\n /**\n * Gets the `elements` of the Pdf Array.\n * @private\n */\n get: function () {\n return this.internalElements;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Adds` the specified element to the PDF array.\n * @private\n */\n PdfArray.prototype.add = function (element) {\n // if (element === null) {\n // throw new Error('ArgumentNullException : obj');\n // }\n if (typeof this.internalElements === 'undefined') {\n this.internalElements = [];\n }\n this.internalElements.push(element);\n this.markedChange();\n };\n /**\n * `Marks` the object changed.\n * @private\n */\n PdfArray.prototype.markedChange = function () {\n this.bChanged = true;\n };\n /**\n * `Determines` whether the specified element is within the array.\n * @private\n */\n PdfArray.prototype.contains = function (element) {\n var returnValue = false;\n for (var index = 0; index < this.internalElements.length; index++) {\n var tempElement = this.internalElements[index];\n var inputElement = element;\n if (tempElement != null && typeof tempElement !== 'undefined' && inputElement != null && typeof inputElement !== 'undefined') {\n if (tempElement.value === inputElement.value) {\n return true;\n }\n }\n // if (this.internalElements[index] === element) {\n // returnValue = true;\n // }\n }\n return returnValue;\n };\n /**\n * Returns the `primitive object` of input index.\n * @private\n */\n PdfArray.prototype.getItems = function (index) {\n // if (index < 0 || index >= this.Count) {\n // throw new Error('ArgumentOutOfRangeException : index , The index can\"t be less then zero or greater then Count.');\n // }\n return this.internalElements[index];\n };\n /**\n * `Saves` the object using the specified writer.\n * @private\n */\n PdfArray.prototype.save = function (writer) {\n // if (writer === null) {\n // throw new Error('ArgumentNullException : writer');\n // }\n writer.write(this.startMark);\n for (var i = 0, len = this.count; i < len; i++) {\n this.getItems(i).save(writer);\n if (i + 1 !== len) {\n writer.write(Operators.whiteSpace);\n }\n }\n writer.write(this.endMark);\n };\n /**\n * Creates a `copy of PdfArray`.\n * @private\n */\n PdfArray.prototype.clone = function (crossTable) {\n // if (this.clonedObject9 !== null && this.clonedObject9.CrossTable === crossTable) {\n // return this.clonedObject9;\n // } else {\n this.clonedObject9 = null;\n // Else clone the object.\n var newArray = new PdfArray();\n for (var index = 0; index < this.internalElements.length; index++) {\n var obj = this.internalElements[index];\n newArray.add(obj.clone(crossTable));\n }\n newArray.pdfCrossTable = crossTable;\n this.clonedObject9 = newArray;\n return newArray;\n };\n /**\n * Creates filled PDF array `from the rectangle`.\n * @private\n */\n PdfArray.fromRectangle = function (bounds) {\n var values = [bounds.x, bounds.y, bounds.width, bounds.height];\n var array = new PdfArray(values);\n return array;\n };\n // /**\n // * Creates the rectangle from filled PDF array.\n // * @private\n // */\n // public ToRectangle() : RectangleF {\n // if (this.Count < 4) {\n // throw Error('InvalidOperationException-Can not convert to rectangle.');\n // }\n // let x1 : number;\n // let x2 : number;\n // let y1 : number;\n // let y2 : number;\n // let num : PdfNumber = this.getItems(0) as PdfNumber;\n // x1 = num.IntValue;\n // num = this.getItems(1) as PdfNumber;\n // y1 = num.IntValue;\n // num = this.getItems(2) as PdfNumber;\n // x2 = num.IntValue;\n // num = this.getItems(3) as PdfNumber;\n // y2 = num.IntValue;\n // let x : number = Math.min(x1, x2);\n // let y : number = Math.min(y1, y2);\n // let width : number = Math.abs(x1 - x2);\n // let height : number = Math.abs(y1 - y2);\n // let rect : RectangleF = new RectangleF(new PointF(x, y), new SizeF(width, height));\n // return rect;\n // }\n /**\n * `Inserts` the element into the array.\n * @private\n */\n PdfArray.prototype.insert = function (index, element) {\n if (index < this.internalElements.length && index > 0) {\n var tempElements = [];\n for (var i = 0; i < index; i++) {\n tempElements.push(this.internalElements[i]);\n }\n tempElements.push(element);\n for (var i = index; i < this.internalElements.length; i++) {\n tempElements.push(this.internalElements[i]);\n }\n this.internalElements = tempElements;\n }\n else {\n this.internalElements.push(element);\n }\n this.markChanged();\n };\n /**\n * `Checks whether array contains the element`.\n * @private\n */\n PdfArray.prototype.indexOf = function (element) {\n return this.internalElements.indexOf(element);\n };\n /**\n * `Removes` element from the array.\n * @private\n */\n PdfArray.prototype.remove = function (element) {\n // if (element === null) {\n // throw new Error('ArgumentNullException : element');\n // }\n var index = this.internalElements.indexOf(element);\n // if (index >= 0 && index < this.internalElements.length) {\n this.internalElements[index] = null;\n // }\n this.markChanged();\n };\n /**\n * `Remove` the element from the array by its index.\n * @private\n */\n PdfArray.prototype.removeAt = function (index) {\n // this.internalElements.RemoveAt(index);\n if (this.internalElements.length > index) {\n var tempArray = [];\n for (var i = 0; i < index; i++) {\n tempArray.push(this.internalElements[i]);\n }\n for (var i = index + 1; i < this.internalElements.length; i++) {\n tempArray.push(this.internalElements[i]);\n }\n this.internalElements = tempArray;\n }\n this.markChanged();\n };\n /**\n * `Clear` the array.\n * @private\n */\n PdfArray.prototype.clear = function () {\n this.internalElements = [];\n this.markChanged();\n };\n /**\n * `Marks` the object changed.\n * @private\n */\n PdfArray.prototype.markChanged = function () {\n this.bChanged = true;\n };\n return PdfArray;\n}());\nexport { PdfArray };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfDictionary } from './pdf-dictionary';\nimport { PdfNumber } from './pdf-number';\nimport { Operators } from './../input-output/pdf-operators';\nimport { PdfName } from './pdf-name';\nimport { PdfArray } from './pdf-array';\nimport { PdfReferenceHolder } from './pdf-reference';\nimport { CompressedStreamWriter } from '@syncfusion/ej2-compression';\n/**\n * `PdfStream` class is used to perform stream related primitive operations.\n * @private\n */\nvar PdfStream = /** @class */ (function (_super) {\n __extends(PdfStream, _super);\n function PdfStream(dictionary, data) {\n var _this = _super.call(this, dictionary) || this;\n //Constants\n /**\n * @hidden\n * @private\n */\n _this.dicPrefix = 'stream';\n /**\n * @hidden\n * @private\n */\n _this.dicSuffix = 'endstream';\n /**\n * Internal variable to hold `cloned object`.\n * @private\n */\n _this.clonedObject2 = null;\n /**\n * @hidden\n * @private\n */\n _this.bCompress = true;\n /**\n * @hidden\n * @private\n */\n _this.isImageStream = false;\n /**\n * @hidden\n * @private\n */\n _this.isFontStream = false;\n if (typeof dictionary !== 'undefined' || typeof data !== 'undefined') {\n _this.dataStream2 = [];\n _this.dataStream2 = data;\n _this.bCompress2 = false;\n }\n else {\n _this.dataStream2 = [];\n _this.bCompress2 = true;\n //Pending\n }\n return _this;\n }\n Object.defineProperty(PdfStream.prototype, \"internalStream\", {\n /**\n * Gets the `internal` stream.\n * @private\n */\n get: function () {\n return this.dataStream2;\n },\n set: function (value) {\n this.dataStream2 = [];\n this.dataStream2 = value;\n this.modify();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStream.prototype, \"isImage\", {\n /**\n * Gets or sets 'is image' flag.\n * @private\n */\n get: function () {\n return this.isImageStream;\n },\n set: function (value) {\n this.isImageStream = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStream.prototype, \"isFont\", {\n /**\n * Gets or sets 'is font' flag.\n * @private\n */\n get: function () {\n return this.isFontStream;\n },\n set: function (value) {\n this.isFontStream = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStream.prototype, \"compress\", {\n /**\n * Gets or sets `compression` flag.\n * @private\n */\n get: function () {\n return this.bCompress;\n },\n set: function (value) {\n this.bCompress = value;\n this.modify();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStream.prototype, \"data\", {\n /**\n * Gets or sets the `data`.\n * @private\n */\n get: function () {\n return this.dataStream2;\n },\n set: function (value) {\n this.dataStream2 = [];\n this.dataStream2 = value;\n this.modify();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Clear` the internal stream.\n * @private\n */\n PdfStream.prototype.clearStream = function () {\n this.internalStream = [];\n if (this.items.containsKey(this.dictionaryProperties.filter)) {\n this.remove(this.dictionaryProperties.filter);\n }\n this.bCompress = true;\n this.modify();\n };\n /**\n * `Writes` the specified string.\n * @private\n */\n PdfStream.prototype.write = function (text) {\n if (text == null) {\n throw new Error('ArgumentNullException:text');\n }\n if (text.length <= 0) {\n throw new Error('ArgumentException: Can not write an empty string, text');\n }\n this.dataStream2.push(text);\n this.modify();\n };\n /**\n * `Writes` the specified bytes.\n * @private\n */\n PdfStream.prototype.writeBytes = function (data) {\n if (data === null) {\n throw new Error('ArgumentNullException:data');\n }\n if (data.length <= 0) {\n throw new Error('ArgumentException: Can not write an empty bytes, data');\n }\n var text = '';\n for (var i = 0; i < data.length; i++) {\n text += String.fromCharCode(data[i]);\n }\n this.dataStream2.push(text);\n this.modify();\n };\n /**\n * Raises event `Cmap BeginSave`.\n * @private\n */\n PdfStream.prototype.onCmapBeginSave = function () {\n this.cmapBeginSave.sender.cmapBeginSave();\n };\n /**\n * Raises event `Font Program BeginSave`.\n * @private\n */\n PdfStream.prototype.onFontProgramBeginSave = function () {\n this.fontProgramBeginSave.sender.fontProgramBeginSave();\n };\n /**\n * `Compresses the content` if it's required.\n * @private\n */\n PdfStream.prototype.compressContent = function (data, writer) {\n if (this.bCompress) {\n var byteArray = [];\n for (var i = 0; i < data.length; i++) {\n byteArray.push(data.charCodeAt(i));\n }\n var dataArray = new Uint8Array(byteArray);\n var sw = new CompressedStreamWriter();\n // data = 'Hello World!!!';\n sw.write(dataArray, 0, dataArray.length);\n sw.close();\n data = sw.getCompressedString;\n this.addFilter(this.dictionaryProperties.flatedecode);\n }\n return data;\n };\n /**\n * `Adds a filter` to the filter array.\n * @private\n */\n PdfStream.prototype.addFilter = function (filterName) {\n var obj = this.items.getValue(this.dictionaryProperties.filter);\n if (obj instanceof PdfReferenceHolder) {\n var rh = obj;\n obj = rh.object;\n }\n var array = obj;\n var name = obj;\n if (name != null) {\n array = new PdfArray();\n array.insert(0, name);\n this.items.setValue(this.dictionaryProperties.filter, array);\n }\n name = new PdfName(filterName);\n if (array == null) {\n this.items.setValue(this.dictionaryProperties.filter, name);\n }\n else {\n array.insert(0, name);\n }\n };\n /**\n * `Saves` the object using the specified writer.\n * @private\n */\n PdfStream.prototype.save = function (writer) {\n if (typeof this.cmapBeginSave !== 'undefined') {\n this.onCmapBeginSave();\n }\n if (typeof this.fontProgramBeginSave !== 'undefined') {\n this.onFontProgramBeginSave();\n }\n var data = '';\n for (var i = 0; i < this.data.length; i++) {\n data = data + this.data[i];\n }\n if (data.length > 1 && !this.isImage && !this.isFont) {\n data = 'q\\r\\n' + data + 'Q\\r\\n';\n }\n data = this.compressContent(data, writer);\n var length = data.length;\n this.items.setValue(this.dictionaryProperties.length, new PdfNumber(length));\n _super.prototype.save.call(this, writer, false);\n writer.write(this.dicPrefix);\n writer.write(Operators.newLine);\n if (data.length > 0) {\n writer.write(data);\n }\n writer.write(Operators.newLine);\n writer.write(this.dicSuffix);\n writer.write(Operators.newLine);\n };\n /**\n * Converts `bytes to string`.\n * @private\n */\n PdfStream.bytesToString = function (byteArray) {\n var output = '';\n for (var i = 0; i < byteArray.length; i++) {\n output = output + String.fromCharCode(byteArray[i]);\n }\n return output;\n };\n return PdfStream;\n}(PdfDictionary));\nexport { PdfStream };\nvar SaveCmapEventHandler = /** @class */ (function () {\n /**\n * New instance for `save section collection event handler` class.\n * @private\n */\n function SaveCmapEventHandler(sender) {\n this.sender = sender;\n }\n return SaveCmapEventHandler;\n}());\nexport { SaveCmapEventHandler };\nvar SaveFontProgramEventHandler = /** @class */ (function () {\n /**\n * New instance for `save section collection event handler` class.\n * @private\n */\n function SaveFontProgramEventHandler(sender) {\n this.sender = sender;\n }\n return SaveFontProgramEventHandler;\n}());\nexport { SaveFontProgramEventHandler };\n","/**\n * public Enum for `ObjectType`.\n * @private\n */\nexport var ObjectType;\n(function (ObjectType) {\n /**\n * Specifies the type of `Free`.\n * @private\n */\n ObjectType[ObjectType[\"Free\"] = 0] = \"Free\";\n /**\n * Specifies the type of `Normal`.\n * @private\n */\n ObjectType[ObjectType[\"Normal\"] = 1] = \"Normal\";\n /**\n * Specifies the type of `Packed`.\n * @private\n */\n ObjectType[ObjectType[\"Packed\"] = 2] = \"Packed\";\n})(ObjectType || (ObjectType = {}));\n","import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\nimport { PdfStream } from './../primitives/pdf-stream';\nimport { PdfArray } from './../primitives/pdf-array';\nimport { PdfNumber } from './../primitives/pdf-number';\nimport { PdfName } from './../primitives/pdf-name';\nimport { PdfDictionary } from './../primitives/pdf-dictionary';\nimport { PdfString } from './../primitives/pdf-string';\n/**\n * `PdfReference` class is used to perform reference related primitive operations.\n * @private\n */\nvar PdfReference = /** @class */ (function () {\n function PdfReference(objNumber, genNumber) {\n /**\n * Holds the `index` number of the object.\n * @default -1\n * @private\n */\n this.index3 = -1;\n /**\n * Internal variable to store the `position`.\n * @default -1\n * @private\n */\n this.position3 = -1;\n /**\n * Holds the `object number`.\n * @default 0\n * @private\n */\n this.objNumber = 0;\n /**\n * Holds the `generation number` of the object.\n * @default 0\n * @private\n */\n this.genNumber = 0;\n if (typeof objNumber === 'number' && typeof genNumber === 'number') {\n this.objNumber = objNumber;\n this.genNumber = genNumber;\n // } else if (typeof objNum === 'string' && typeof genNum === 'string') {\n }\n else {\n this.objNumber = Number(objNumber);\n this.genNumber = Number(genNumber);\n }\n }\n Object.defineProperty(PdfReference.prototype, \"status\", {\n //Property\n /**\n * Gets or sets the `Status` of the specified object.\n * @private\n */\n get: function () {\n return this.status3;\n },\n set: function (value) {\n this.status3 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReference.prototype, \"isSaving\", {\n /**\n * Gets or sets a value indicating whether this document `is saving` or not.\n * @private\n */\n get: function () {\n return this.isSaving3;\n },\n set: function (value) {\n this.isSaving3 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReference.prototype, \"objectCollectionIndex\", {\n /**\n * Gets or sets the `index` value of the specified object.\n * @private\n */\n get: function () {\n return this.index3;\n },\n set: function (value) {\n this.index3 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReference.prototype, \"position\", {\n /**\n * Gets or sets the `position` of the object.\n * @private\n */\n get: function () {\n return this.position3;\n },\n set: function (value) {\n this.position3 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReference.prototype, \"clonedObject\", {\n /**\n * Returns `cloned object`.\n * @private\n */\n get: function () {\n var returnObject3 = null;\n return returnObject3;\n },\n enumerable: true,\n configurable: true\n });\n //IPdfPrimitives methods\n /**\n * `Saves` the object.\n * @private\n */\n PdfReference.prototype.save = function (writer) {\n writer.write(this.toString());\n };\n /**\n * Returns a `string` representing the object.\n * @private\n */\n PdfReference.prototype.toString = function () {\n return this.objNumber.toString() + ' ' + this.genNumber.toString() + ' R';\n };\n /**\n * Creates a `deep copy` of the IPdfPrimitive object.\n * @private\n */\n PdfReference.prototype.clone = function (crossTable) {\n return null;\n };\n return PdfReference;\n}());\nexport { PdfReference };\n/**\n * `PdfReferenceHolder` class is used to perform reference holder related primitive operations.\n * @private\n */\nvar PdfReferenceHolder = /** @class */ (function () {\n function PdfReferenceHolder(obj1, obj2) {\n /**\n * Holds the `index` number of the object.\n * @default -1\n * @private\n */\n this.index4 = -1;\n /**\n * Internal variable to store the `position`.\n * @default -1\n * @private\n */\n this.position4 = -1;\n /**\n * The `index` of the object within the object collection.\n * @default -1\n * @private\n */\n this.objectIndex = -1;\n /**\n * @hidden\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n // if (typeof obj2 === 'undefined') {\n this.initialize(obj1);\n // }\n // else {\n // if (obj2 === null) {\n // throw new Error('ArgumentNullException : crossTable');\n // }\n // if (obj1 === null) {\n // throw new Error('ArgumentNullException : reference');\n // }\n // this.crossTable = obj2;\n // let tempObj1 : PdfReference = obj1;\n // this.reference = tempObj1;\n // }\n }\n Object.defineProperty(PdfReferenceHolder.prototype, \"status\", {\n //Properties\n /**\n * Gets or sets the `Status` of the specified object.\n * @private\n */\n get: function () {\n return this.status4;\n },\n set: function (value) {\n this.status4 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReferenceHolder.prototype, \"isSaving\", {\n /**\n * Gets or sets a value indicating whether this document `is saving` or not.\n * @private\n */\n get: function () {\n return this.isSaving4;\n },\n set: function (value) {\n this.isSaving4 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReferenceHolder.prototype, \"objectCollectionIndex\", {\n /**\n * Gets or sets the `index` value of the specified object.\n * @private\n */\n get: function () {\n return this.index4;\n },\n set: function (value) {\n this.index4 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReferenceHolder.prototype, \"position\", {\n /**\n * Gets or sets the `position` of the object.\n * @private\n */\n get: function () {\n return this.position4;\n },\n set: function (value) {\n this.position4 = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReferenceHolder.prototype, \"clonedObject\", {\n /**\n * Returns `cloned object`.\n * @private\n */\n get: function () {\n return null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReferenceHolder.prototype, \"object\", {\n /**\n * Gets the `object` the reference is of.\n * @private\n */\n get: function () {\n // if ((this.reference != null) || (this.object == null)) {\n // this.object = this.GetterObject();\n // }\n return this.primitiveObject;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReferenceHolder.prototype, \"reference\", {\n /**\n * Gets the `reference`.\n * @private\n */\n get: function () {\n return this.pdfReference;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReferenceHolder.prototype, \"index\", {\n /**\n * Gets the `index` of the object.\n * @private\n */\n get: function () {\n // let items : PdfMainObjectCollection = this.crossTable.PdfObjects;\n // this.objectIndex = items.GetObjectIndex(this.reference);\n // if (this.objectIndex < 0) {\n // let obj : IPdfPrimitive = this.crossTable.GetObject(this.reference);\n // this.objectIndex = items.Count - 1;\n // }\n return this.objectIndex;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfReferenceHolder.prototype, \"element\", {\n /**\n * Gets the `element`.\n * @private\n */\n get: function () {\n return this.primitiveObject;\n },\n enumerable: true,\n configurable: true\n });\n PdfReferenceHolder.prototype.initialize = function (obj1) {\n if (obj1 instanceof PdfArray\n || obj1 instanceof PdfDictionary\n || obj1 instanceof PdfName\n || obj1 instanceof PdfNumber\n || obj1 instanceof PdfStream\n || obj1 instanceof PdfReference\n || obj1 instanceof PdfString) {\n this.primitiveObject = obj1;\n }\n else {\n var tempObj = obj1;\n this.initialize(tempObj.element);\n }\n };\n /**\n * `Writes` a reference into a PDF document.\n * @private\n */\n PdfReferenceHolder.prototype.save = function (writer) {\n // if (writer == null) {\n // throw new Error('ArgumentNullException : writer');\n // }\n var position = writer.position;\n var cTable = writer.document.crossTable;\n // if (cTable.Document instanceof PdfDocument) {\n this.object.isSaving = true;\n // }\n var reference = null;\n // if (writer.Document.FileStructure.IncrementalUpdate === true && writer.Document.isStreamCopied === true) {\n // if (this.reference === null) {\n // reference = cTable.GetReference(this.Object);\n // } else {\n // reference = this.reference;\n // }\n // } else {\n // reference = cTable.GetReference(this.Object);\n // }\n // if (!(writer.Document.FileStructure.IncrementalUpdate === true && writer.Document.isStreamCopied === true)) {\n reference = cTable.getReference(this.object);\n // }\n // if (writer.Position !== position) {\n // writer.Position = position;\n // }\n reference.save(writer);\n };\n /**\n * Creates a `copy of PdfReferenceHolder`.\n * @private\n */\n PdfReferenceHolder.prototype.clone = function (crossTable) {\n var refHolder = null;\n var temp = null;\n var refNum = '';\n var reference = null;\n // Restricts addition of same object multiple time.\n /* if (this.Reference != null && this.crossTable != null && this.crossTable.PageCorrespondance.containsKey(this.Reference)) {\n refHolder = new PdfReferenceHolder(this.crossTable.PageCorrespondance.getValue(this.Reference) as PdfReference, crossTable);\n return refHolder;\n }\n if (Object instanceof PdfNumber) {\n return new PdfNumber((Object as PdfNumber).IntValue);\n }\n */\n // if (Object instanceof PdfDictionary) {\n // // Meaning the referenced page is not available for import.\n // let type : PdfName = new PdfName(this.dictionaryProperties.type);\n // let dict : PdfDictionary = Object as PdfDictionary;\n // if (dict.ContainsKey(type)) {\n // let pageName : PdfName = dict.Items.getValue(type.Value) as PdfName;\n // if (pageName !== null) {\n // if (pageName.Value === 'Page') {\n // return new PdfNull();\n // }\n // }\n // }\n // }\n /* if (Object instanceof PdfName) {\n return new PdfName ((Object as PdfName ).Value);\n }\n */\n // Resolves circular references.\n // if (crossTable.PrevReference !== null && (crossTable.PrevReference.indexOf(this.Reference) !== -1)) {\n // let obj : IPdfPrimitive = this.crossTable.GetObject(this.Reference).ClonedObject;\n // if (obj !== null) {\n // reference = crossTable.GetReference(obj);\n // return new PdfReferenceHolder(reference, crossTable);\n // } else {\n // return new PdfNull();\n // }\n // }\n /*if (this.Reference !== null) {\n crossTable.PrevReference.push(this.Reference);\n }\n reference = crossTable.GetReference(temp);\n refHolder = new PdfReferenceHolder(reference, crossTable);\n return refHolder;\n */\n return null;\n };\n return PdfReferenceHolder;\n}());\nexport { PdfReferenceHolder };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfCatalog.ts class for EJ2-PDF\n */\nimport { PdfDictionary } from './../primitives/pdf-dictionary';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\nimport { PdfName } from './../primitives/pdf-name';\nimport { PdfReferenceHolder } from './../primitives/pdf-reference';\n/**\n * `PdfCatalog` class represents internal catalog of the Pdf document.\n * @private\n */\nvar PdfCatalog = /** @class */ (function (_super) {\n __extends(PdfCatalog, _super);\n //constructor\n /**\n * Initializes a new instance of the `PdfCatalog` class.\n * @private\n */\n function PdfCatalog() {\n var _this = _super.call(this) || this;\n //fields\n /**\n * Internal variable to store collection of `sections`.\n * @default null\n * @private\n */\n _this.sections = null;\n /**\n * Internal variable for accessing fields from `DictionryProperties` class.\n * @private\n */\n _this.tempDictionaryProperties = new DictionaryProperties();\n _this.items.setValue(new DictionaryProperties().type, new PdfName('Catalog'));\n return _this;\n }\n Object.defineProperty(PdfCatalog.prototype, \"pages\", {\n //Properties\n /**\n * Gets or sets the sections, which contain `pages`.\n * @private\n */\n get: function () {\n return this.sections;\n },\n set: function (value) {\n var dictionary = value.element;\n // if (this.sections !== value) {\n // this.sections = value;\n // this.Items.setValue(this.tempDictionaryProperties.pages, new PdfReferenceHolder(value));\n // }\n this.sections = value;\n this.items.setValue(this.tempDictionaryProperties.pages, new PdfReferenceHolder(value));\n },\n enumerable: true,\n configurable: true\n });\n return PdfCatalog;\n}(PdfDictionary));\nexport { PdfCatalog };\n","/**\n * public Enum for `PdfPageOrientation`.\n * @private\n */\nexport var PdfPageOrientation;\n(function (PdfPageOrientation) {\n /**\n * Specifies the type of `Portrait`.\n * @private\n */\n PdfPageOrientation[PdfPageOrientation[\"Portrait\"] = 0] = \"Portrait\";\n /**\n * Specifies the type of `Landscape`.\n * @private\n */\n PdfPageOrientation[PdfPageOrientation[\"Landscape\"] = 1] = \"Landscape\";\n})(PdfPageOrientation || (PdfPageOrientation = {}));\n/**\n * public Enum for `PdfPageRotateAngle`.\n * @private\n */\nexport var PdfPageRotateAngle;\n(function (PdfPageRotateAngle) {\n /**\n * Specifies the type of `RotateAngle0`.\n * @private\n */\n PdfPageRotateAngle[PdfPageRotateAngle[\"RotateAngle0\"] = 0] = \"RotateAngle0\";\n /**\n * Specifies the type of `RotateAngle90`.\n * @private\n */\n PdfPageRotateAngle[PdfPageRotateAngle[\"RotateAngle90\"] = 1] = \"RotateAngle90\";\n /**\n * Specifies the type of `RotateAngle180`.\n * @private\n */\n PdfPageRotateAngle[PdfPageRotateAngle[\"RotateAngle180\"] = 2] = \"RotateAngle180\";\n /**\n * Specifies the type of `RotateAngle270`.\n * @private\n */\n PdfPageRotateAngle[PdfPageRotateAngle[\"RotateAngle270\"] = 3] = \"RotateAngle270\";\n})(PdfPageRotateAngle || (PdfPageRotateAngle = {}));\n/**\n * public Enum for `PdfNumberStyle`.\n * @private\n */\nexport var PdfNumberStyle;\n(function (PdfNumberStyle) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n PdfNumberStyle[PdfNumberStyle[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `Numeric`.\n * @private\n */\n PdfNumberStyle[PdfNumberStyle[\"Numeric\"] = 1] = \"Numeric\";\n /**\n * Specifies the type of `LowerLatin`.\n * @private\n */\n PdfNumberStyle[PdfNumberStyle[\"LowerLatin\"] = 2] = \"LowerLatin\";\n /**\n * Specifies the type of `LowerRoman`.\n * @private\n */\n PdfNumberStyle[PdfNumberStyle[\"LowerRoman\"] = 3] = \"LowerRoman\";\n /**\n * Specifies the type of `UpperLatin`.\n * @private\n */\n PdfNumberStyle[PdfNumberStyle[\"UpperLatin\"] = 4] = \"UpperLatin\";\n /**\n * Specifies the type of `UpperRoman`.\n * @private\n */\n PdfNumberStyle[PdfNumberStyle[\"UpperRoman\"] = 5] = \"UpperRoman\";\n})(PdfNumberStyle || (PdfNumberStyle = {}));\n/**\n * public Enum for `PdfDockStyle`.\n * @private\n */\nexport var PdfDockStyle;\n(function (PdfDockStyle) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n PdfDockStyle[PdfDockStyle[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `Bottom`.\n * @private\n */\n PdfDockStyle[PdfDockStyle[\"Bottom\"] = 1] = \"Bottom\";\n /**\n * Specifies the type of `Top`.\n * @private\n */\n PdfDockStyle[PdfDockStyle[\"Top\"] = 2] = \"Top\";\n /**\n * Specifies the type of `Left`.\n * @private\n */\n PdfDockStyle[PdfDockStyle[\"Left\"] = 3] = \"Left\";\n /**\n * Specifies the type of `Right`.\n * @private\n */\n PdfDockStyle[PdfDockStyle[\"Right\"] = 4] = \"Right\";\n /**\n * Specifies the type of `Fill`.\n * @private\n */\n PdfDockStyle[PdfDockStyle[\"Fill\"] = 5] = \"Fill\";\n})(PdfDockStyle || (PdfDockStyle = {}));\n/**\n * public Enum for `PdfAlignmentStyle`.\n * @private\n */\nexport var PdfAlignmentStyle;\n(function (PdfAlignmentStyle) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `TopLeft`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"TopLeft\"] = 1] = \"TopLeft\";\n /**\n * Specifies the type of `TopCenter`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"TopCenter\"] = 2] = \"TopCenter\";\n /**\n * Specifies the type of `TopRight`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"TopRight\"] = 3] = \"TopRight\";\n /**\n * Specifies the type of `MiddleLeft`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"MiddleLeft\"] = 4] = \"MiddleLeft\";\n /**\n * Specifies the type of `MiddleCenter`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"MiddleCenter\"] = 5] = \"MiddleCenter\";\n /**\n * Specifies the type of `MiddleRight`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"MiddleRight\"] = 6] = \"MiddleRight\";\n /**\n * Specifies the type of `BottomLeft`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"BottomLeft\"] = 7] = \"BottomLeft\";\n /**\n * Specifies the type of `BottomCenter`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"BottomCenter\"] = 8] = \"BottomCenter\";\n /**\n * Specifies the type of `BottomRight`.\n * @private\n */\n PdfAlignmentStyle[PdfAlignmentStyle[\"BottomRight\"] = 9] = \"BottomRight\";\n})(PdfAlignmentStyle || (PdfAlignmentStyle = {}));\n/**\n * public Enum for `TemplateType`.\n * @private\n */\nexport var TemplateType;\n(function (TemplateType) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n TemplateType[TemplateType[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `Top`.\n * @private\n */\n TemplateType[TemplateType[\"Top\"] = 1] = \"Top\";\n /**\n * Specifies the type of `Bottom`.\n * @private\n */\n TemplateType[TemplateType[\"Bottom\"] = 2] = \"Bottom\";\n /**\n * Specifies the type of `Left`.\n * @private\n */\n TemplateType[TemplateType[\"Left\"] = 3] = \"Left\";\n /**\n * Specifies the type of `Right`.\n * @private\n */\n TemplateType[TemplateType[\"Right\"] = 4] = \"Right\";\n})(TemplateType || (TemplateType = {}));\n","import { ObjectStatus } from './../input-output/enum';\nimport { PdfDictionary } from './../primitives/pdf-dictionary';\nimport { DictionaryProperties } from './pdf-dictionary-properties';\nimport { Operators } from './pdf-operators';\nimport { Dictionary } from './../collections/dictionary';\nimport { PdfReference } from './../primitives/pdf-reference';\nimport { ObjectType } from './cross-table';\nimport { PdfStream } from './../primitives/pdf-stream';\nimport { PdfNumber } from './../primitives/pdf-number';\nimport { PdfCatalog } from './../document/pdf-catalog';\n/**\n * `PdfCrossTable` is responsible for intermediate level parsing\n * and savingof a PDF document.\n * @private\n */\nvar PdfCrossTable = /** @class */ (function () {\n function PdfCrossTable() {\n /**\n * The modified `objects` that should be saved.\n * @private\n */\n this.objects = new Dictionary();\n /**\n * Holds `maximal generation number` or offset to object.\n * @default 0\n * @private\n */\n this.maxGenNumIndex = 0;\n /**\n * The `number of the objects`.\n * @default 0\n * @private\n */\n this.objectCount = 0;\n /**\n * Internal variable for accessing fields from `DictionryProperties` class.\n * @default new PdfDictionaryProperties()\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n }\n Object.defineProperty(PdfCrossTable.prototype, \"isMerging\", {\n //Properties\n /**\n * Gets or sets if the document `is merged`.\n * @private\n */\n get: function () {\n return this.merging;\n },\n set: function (value) {\n this.merging = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfCrossTable.prototype, \"trailer\", {\n /**\n * Gets the `trailer`.\n * @private\n */\n get: function () {\n if (this.internalTrailer == null) {\n this.internalTrailer = new PdfStream();\n }\n return this.internalTrailer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfCrossTable.prototype, \"document\", {\n /**\n * Gets or sets the main `PdfDocument` class instance.\n * @private\n */\n get: function () {\n return this.pdfDocument;\n },\n set: function (value) {\n this.pdfDocument = value;\n this.items = this.pdfDocument.pdfObjects;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfCrossTable.prototype, \"pdfObjects\", {\n /**\n * Gets the catched `PDF object` main collection.\n * @private\n */\n get: function () {\n return this.items;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfCrossTable.prototype, \"objectCollection\", {\n /**\n * Gets the `object collection`.\n * @private\n */\n get: function () {\n return this.pdfDocument.pdfObjects;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfCrossTable.prototype, \"count\", {\n /**\n * Gets or sets the `number of the objects` within the document.\n * @private\n */\n get: function () {\n return this.objectCount;\n },\n set: function (value) {\n this.objectCount = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfCrossTable.prototype, \"nextObjNumber\", {\n /**\n * Returns `next available object number`.\n * @private\n */\n get: function () {\n this.count = this.count + 1;\n return this.count;\n },\n enumerable: true,\n configurable: true\n });\n PdfCrossTable.prototype.save = function (writer, filename) {\n this.saveHead(writer);\n var state = false;\n this.mappedReferences = null;\n this.objects.clear();\n this.markTrailerReferences();\n this.saveObjects(writer);\n var saveCount = this.count;\n var xrefPos = writer.position;\n this.registerObject(0, new PdfReference(0, -1), true);\n var prevXRef = 0;\n writer.write(Operators.xref);\n writer.write(Operators.newLine);\n this.saveSections(writer);\n this.saveTrailer(writer, this.count, prevXRef);\n this.saveTheEndess(writer, xrefPos);\n this.count = saveCount;\n for (var i = 0; i < this.objectCollection.count; ++i) {\n var oi = this.objectCollection.items(i);\n oi.object.isSaving = false;\n }\n if (typeof filename === 'undefined') {\n return writer.stream.buffer;\n }\n else {\n writer.stream.save(filename);\n }\n };\n /**\n * `Saves the endess` of the file.\n * @private\n */\n PdfCrossTable.prototype.saveTheEndess = function (writer, xrefPos) {\n writer.write(Operators.newLine + Operators.startxref + Operators.newLine);\n writer.write(xrefPos.toString() + Operators.newLine);\n writer.write(Operators.eof + Operators.newLine);\n };\n /**\n * `Saves the new trailer` dictionary.\n * @private\n */\n PdfCrossTable.prototype.saveTrailer = function (writer, count, prevXRef) {\n writer.write(Operators.trailer + Operators.newLine);\n // Save the dictionary.\n var trailer = this.trailer;\n trailer.items.setValue(this.dictionaryProperties.size, new PdfNumber(this.objectCount + 1));\n trailer = new PdfDictionary(trailer); // Make it real dictionary.\n trailer.setEncrypt(false);\n trailer.save(writer);\n };\n /**\n * `Saves the xref section`.\n * @private\n */\n PdfCrossTable.prototype.saveSections = function (writer) {\n var objectNum = 0;\n var count = 0;\n do {\n count = this.prepareSubsection(objectNum);\n this.saveSubsection(writer, objectNum, count);\n objectNum += count;\n } while (count !== 0);\n };\n /**\n * `Saves a subsection`.\n * @private\n */\n PdfCrossTable.prototype.saveSubsection = function (writer, objectNum, count) {\n if (count <= 0 || objectNum >= this.count) {\n return;\n }\n var subsectionHead = '{0} {1}{2}';\n writer.write(objectNum + ' ' + (count + 1) + Operators.newLine);\n for (var i = objectNum; i <= objectNum + count; ++i) {\n var obj = this.objects.getValue(i);\n var str = '';\n if (obj.type === ObjectType.Free) {\n str = this.getItem(obj.offset, 65535, true);\n }\n else {\n str = this.getItem(obj.offset, obj.generation, false);\n }\n writer.write(str);\n }\n };\n /**\n * Generates string for `xref table item`.\n * @private\n */\n PdfCrossTable.prototype.getItem = function (offset, genNumber, isFree) {\n var returnString = '';\n var addOffsetLength = 10 - offset.toString().length;\n if (genNumber <= 0) {\n genNumber = 0;\n }\n var addGenNumberLength = (5 - genNumber.toString().length) <= 0 ? 0 : (5 - genNumber.toString().length);\n for (var index = 0; index < addOffsetLength; index++) {\n returnString = returnString + '0';\n }\n returnString = returnString + offset.toString() + ' ';\n for (var index = 0; index < addGenNumberLength; index++) {\n returnString = returnString + '0';\n }\n returnString = returnString + genNumber.toString() + ' ';\n returnString = returnString + ((isFree) ? Operators.f : Operators.n) + Operators.newLine;\n return returnString;\n };\n /**\n * `Prepares a subsection` of the current section within the cross-reference table.\n * @private\n */\n PdfCrossTable.prototype.prepareSubsection = function (objectNum) {\n var count = 0;\n var i;\n var total = this.count;\n for (var k = 0; k < this.document.pdfObjects.count; k++) {\n var reference = this.document.pdfObjects.items(k).reference;\n var refString = reference.toString();\n var refArray = refString.split(' ');\n }\n if (objectNum >= total) {\n return count;\n }\n // search for first changed indirect object.\n for (i = objectNum; i < total; ++i) {\n break;\n }\n objectNum = i;\n // look up for all indirect objects in one subsection.\n for (; i < total; ++i) {\n ++count;\n }\n return count;\n };\n /**\n * `Marks the trailer references` being saved.\n * @private\n */\n PdfCrossTable.prototype.markTrailerReferences = function () {\n var tempArray;\n var keys = this.trailer.items.keys();\n var values = this.trailer.items.values();\n };\n /**\n * `Saves the head`.\n * @private\n */\n PdfCrossTable.prototype.saveHead = function (writer) {\n var version = this.generateFileVersion(writer.document);\n writer.write('%PDF-' + version);\n writer.write(Operators.newLine);\n };\n /**\n * Generates the `version` of the file.\n * @private\n */\n PdfCrossTable.prototype.generateFileVersion = function (document) {\n var iVersion = 4;\n var version = '1.' + iVersion.toString();\n return version;\n };\n PdfCrossTable.prototype.getReference = function (obj, bNew) {\n if (typeof bNew === 'undefined') {\n var wasNew = false;\n return this.getReference(obj, wasNew);\n }\n else {\n //code splitted for reducing lines of code exceeds 100.\n return this.getSubReference(obj, bNew);\n }\n };\n /**\n * Retrieves the `reference` of the object given.\n * @private\n */\n PdfCrossTable.prototype.getSubReference = function (obj, bNew) {\n var isNew = false;\n var wasNew;\n var reference = null;\n // if (obj.IsSaving) {\n if (this.items.count > 0 && obj.objectCollectionIndex > 0 && this.items.count > obj.objectCollectionIndex - 1) {\n var tempObj = this.document.pdfObjects.getReference(obj, wasNew);\n reference = tempObj.reference;\n wasNew = tempObj.wasNew;\n }\n if (reference == null) {\n if (obj.status === ObjectStatus.Registered) {\n wasNew = false;\n }\n else {\n wasNew = true;\n }\n }\n else {\n wasNew = false;\n }\n // need to add mapped reference code\n if (reference == null) {\n var objnumber = this.nextObjNumber;\n reference = new PdfReference(objnumber, 0);\n var found = void 0;\n if (wasNew) {\n this.document.pdfObjects.add(obj);\n this.document.pdfObjects.trySetReference(obj, reference, found);\n var tempIndex = this.document.pdfObjects.count - 1;\n var tempkey = this.document.pdfObjects.objectCollections[tempIndex].reference.objNumber;\n var tempvalue = this.document.pdfObjects.objectCollections[this.document.pdfObjects.count - 1];\n this.document.pdfObjects.mainObjectCollection.setValue(tempkey, tempvalue);\n obj.position = -1;\n }\n else {\n this.document.pdfObjects.trySetReference(obj, reference, found);\n }\n obj.objectCollectionIndex = reference.objNumber;\n obj.status = ObjectStatus.None;\n isNew = true;\n }\n bNew = isNew || this.bForceNew;\n return reference;\n };\n /**\n * `Saves all objects` in the collection.\n * @private\n */\n PdfCrossTable.prototype.saveObjects = function (writer) {\n var objectCollection = this.objectCollection;\n for (var i = 0; i < objectCollection.count; ++i) {\n var oi = objectCollection.items(i);\n var obj = oi.object;\n obj.isSaving = true;\n this.saveIndirectObject(obj, writer);\n }\n };\n /**\n * `Saves indirect object`.\n * @private\n */\n PdfCrossTable.prototype.saveIndirectObject = function (obj, writer) {\n var reference = this.getReference(obj);\n if (obj instanceof PdfCatalog) {\n this.trailer.items.setValue(this.dictionaryProperties.root, reference);\n }\n // NOTE : This is needed for correct string objects encryption.\n this.pdfDocument.currentSavingObj = reference;\n var tempArchive = false;\n tempArchive = obj.getArchive();\n var allowedType = !((obj instanceof PdfStream) || !tempArchive || (obj instanceof PdfCatalog));\n var sigFlag = false;\n this.registerObject(writer.position, reference);\n this.doSaveObject(obj, reference, writer);\n };\n /**\n * Performs `real saving` of the save object.\n * @private\n */\n PdfCrossTable.prototype.doSaveObject = function (obj, reference, writer) {\n var correctPosition = writer.length;\n writer.write(reference.objNumber.toString());\n writer.write(Operators.whiteSpace);\n writer.write(reference.genNumber.toString());\n writer.write(Operators.whiteSpace);\n writer.write(Operators.obj);\n writer.write(Operators.newLine);\n obj.save(writer);\n var stream = writer.stream;\n writer.write(Operators.endObj);\n writer.write(Operators.newLine);\n };\n PdfCrossTable.prototype.registerObject = function (offset, reference, free) {\n if (typeof free === 'boolean') {\n // Register the object by its number.\n this.objects.setValue(reference.objNumber, new RegisteredObject(offset, reference, free));\n this.maxGenNumIndex = Math.max(this.maxGenNumIndex, reference.genNumber);\n }\n else if (typeof free === 'undefined') {\n // Register the object by its number.\n this.objects.setValue(reference.objNumber, new RegisteredObject(offset, reference));\n this.maxGenNumIndex = Math.max(this.maxGenNumIndex, reference.genNumber);\n }\n };\n /**\n * `Dereferences` the specified primitive object.\n * @private\n */\n PdfCrossTable.dereference = function (obj) {\n var rh = obj;\n if (rh != null) {\n obj = rh.object;\n }\n return obj;\n };\n return PdfCrossTable;\n}());\nexport { PdfCrossTable };\nvar RegisteredObject = /** @class */ (function () {\n function RegisteredObject(offset, reference, free) {\n var tempOffset = offset;\n this.offsetNumber = tempOffset;\n var tempReference = reference;\n this.generation = tempReference.genNumber;\n this.object = tempReference.objNumber;\n if (typeof free === 'undefined') {\n this.type = ObjectType.Normal;\n }\n else {\n this.type = ObjectType.Free;\n }\n }\n Object.defineProperty(RegisteredObject.prototype, \"objectNumber\", {\n //Properties\n /**\n * Gets the `object number`.\n * @private\n */\n get: function () {\n return this.object;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RegisteredObject.prototype, \"offset\", {\n /**\n * Gets the `offset`.\n * @private\n */\n get: function () {\n var result;\n result = this.offsetNumber;\n return result;\n },\n enumerable: true,\n configurable: true\n });\n return RegisteredObject;\n}());\nexport { RegisteredObject };\n","/**\n * Coordinates of Position for `PointF`.\n * @private\n */\nvar PointF = /** @class */ (function () {\n function PointF(x, y) {\n if (typeof x === 'undefined') {\n this.x = 0;\n this.y = 0;\n }\n else {\n if (x !== null) {\n this.x = x;\n }\n else {\n this.x = 0;\n }\n if (y !== null) {\n this.y = y;\n }\n else {\n this.y = 0;\n }\n }\n }\n return PointF;\n}());\nexport { PointF };\n/**\n * Width and Height as `Size`.\n * @private\n */\nvar SizeF = /** @class */ (function () {\n function SizeF(width, height) {\n if (typeof height === 'undefined') {\n this.height = 0;\n this.width = 0;\n }\n else {\n if (height !== null) {\n this.height = height;\n }\n else {\n this.height = 0;\n }\n if (width !== null) {\n this.width = width;\n }\n else {\n this.width = 0;\n }\n }\n }\n return SizeF;\n}());\nexport { SizeF };\n/**\n * `RectangleF` with Position and size.\n * @private\n */\nvar RectangleF = /** @class */ (function () {\n function RectangleF(arg1, arg2, arg3, arg4) {\n if (typeof arg1 === typeof arg1 && typeof arg1 === 'undefined') {\n this.x = 0;\n this.y = 0;\n this.height = 0;\n this.width = 0;\n }\n else {\n if (arg1 instanceof PointF && arg2 instanceof SizeF && typeof arg3 === 'undefined') {\n var pointf = arg1;\n this.x = pointf.x;\n this.y = pointf.y;\n var sizef = arg2;\n this.height = sizef.height;\n this.width = sizef.width;\n }\n else {\n var x = arg1;\n var y = arg2;\n var width = arg3;\n var height = arg4;\n this.x = x;\n this.y = y;\n this.height = height;\n this.width = width;\n }\n }\n }\n return RectangleF;\n}());\nexport { RectangleF };\n/**\n * `Rectangle` with left, right, top and bottom.\n * @private\n */\nvar Rectangle = /** @class */ (function () {\n /**\n * Instance of `RectangleF` class with X, Y, Width and Height.\n * @private\n */\n function Rectangle(left, top, right, bottom) {\n this.left = left;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n }\n Object.defineProperty(Rectangle.prototype, \"width\", {\n /**\n * Gets a value of width\n */\n get: function () {\n return this.right - this.left;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rectangle.prototype, \"height\", {\n /**\n * Gets a value of height\n */\n get: function () {\n return this.bottom - this.top;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rectangle.prototype, \"topLeft\", {\n /**\n * Gets a value of Top and Left\n */\n get: function () {\n return new PointF(this.left, this.top);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rectangle.prototype, \"size\", {\n /**\n * Gets a value of size\n */\n get: function () {\n return new SizeF(this.width, this.height);\n },\n enumerable: true,\n configurable: true\n });\n Rectangle.prototype.toString = function () {\n return this.topLeft + 'x' + this.size;\n };\n return Rectangle;\n}());\nexport { Rectangle };\n","/**\n * PdfPageSize.ts class for EJ2-PDF\n */\nimport { SizeF } from './../drawing/pdf-drawing';\n/**\n * Represents information about various predefined `page sizes`.\n */\nvar PdfPageSize = /** @class */ (function () {\n //constructor\n /**\n * Initialize an instance for `PdfPageSize` class.\n * @private\n */\n function PdfPageSize() {\n // \n }\n /**\n * Specifies the size of `letter`.\n * @private\n */\n PdfPageSize.letter = new SizeF(612, 792);\n /**\n * Specifies the size of `note`.\n * @private\n */\n PdfPageSize.note = new SizeF(540, 720);\n /**\n * Specifies the size of `legal`.\n * @private\n */\n PdfPageSize.legal = new SizeF(612, 1008);\n /**\n * Specifies the size of `a0`.\n * @private\n */\n PdfPageSize.a0 = new SizeF(2380, 3368);\n /**\n * Specifies the size of `a1`.\n * @private\n */\n PdfPageSize.a1 = new SizeF(1684, 2380);\n /**\n * Specifies the size of `a2`.\n * @private\n */\n PdfPageSize.a2 = new SizeF(1190, 1684);\n /**\n * Specifies the size of `a3`.\n * @private\n */\n PdfPageSize.a3 = new SizeF(842, 1190);\n /**\n * Specifies the size of `a4`.\n * @private\n */\n PdfPageSize.a4 = new SizeF(595, 842);\n /**\n * Specifies the size of `a5`.\n * @private\n */\n PdfPageSize.a5 = new SizeF(421, 595);\n /**\n * Specifies the size of `a6`.\n * @private\n */\n PdfPageSize.a6 = new SizeF(297, 421);\n /**\n * Specifies the size of `a7`.\n * @private\n */\n PdfPageSize.a7 = new SizeF(210, 297);\n /**\n * Specifies the size of `a8`.\n * @private\n */\n PdfPageSize.a8 = new SizeF(148, 210);\n /**\n * Specifies the size of `a9`.\n * @private\n */\n PdfPageSize.a9 = new SizeF(105, 148);\n /**\n * Specifies the size of `a10`.\n * @private\n */\n PdfPageSize.a10 = new SizeF(74, 105);\n /**\n * Specifies the size of `b0`.\n * @private\n */\n PdfPageSize.b0 = new SizeF(2836, 4008);\n /**\n * Specifies the size of `b1`.\n * @private\n */\n PdfPageSize.b1 = new SizeF(2004, 2836);\n /**\n * Specifies the size of `b2`.\n * @private\n */\n PdfPageSize.b2 = new SizeF(1418, 2004);\n /**\n * Specifies the size of `b3`.\n * @private\n */\n PdfPageSize.b3 = new SizeF(1002, 1418);\n /**\n * Specifies the size of `b4`.\n * @private\n */\n PdfPageSize.b4 = new SizeF(709, 1002);\n /**\n * Specifies the size of `b5`.\n * @private\n */\n PdfPageSize.b5 = new SizeF(501, 709);\n /**\n * Specifies the size of `archE`.\n * @private\n */\n PdfPageSize.archE = new SizeF(2592, 3456);\n /**\n * Specifies the size of `archD`.\n * @private\n */\n PdfPageSize.archD = new SizeF(1728, 2592);\n /**\n * Specifies the size of `archC`.\n * @private\n */\n PdfPageSize.archC = new SizeF(1296, 1728);\n /**\n * Specifies the size of `archB`.\n * @private\n */\n PdfPageSize.archB = new SizeF(864, 1296);\n /**\n * Specifies the size of `archA`.\n * @private\n */\n PdfPageSize.archA = new SizeF(648, 864);\n /**\n * Specifies the size of `flsa`.\n * @private\n */\n PdfPageSize.flsa = new SizeF(612, 936);\n /**\n * Specifies the size of `halfLetter`.\n * @private\n */\n PdfPageSize.halfLetter = new SizeF(396, 612);\n /**\n * Specifies the size of `letter11x17`.\n * @private\n */\n PdfPageSize.letter11x17 = new SizeF(792, 1224);\n /**\n * Specifies the size of `ledger`.\n * @private\n */\n PdfPageSize.ledger = new SizeF(1224, 792);\n return PdfPageSize;\n}());\nexport { PdfPageSize };\n","/**\n * PdfMargins.ts class for EJ2-PDF\n * A class representing PDF page margins.\n */\nvar PdfMargins = /** @class */ (function () {\n /**\n * Initializes a new instance of the `PdfMargins` class.\n * @private\n */\n function PdfMargins() {\n /**\n * Represents the `Default Page Margin` value.\n * @default 0.0\n * @private\n */\n this.pdfMargin = 40.0;\n this.setMargins(this.pdfMargin);\n }\n Object.defineProperty(PdfMargins.prototype, \"left\", {\n //Properties\n /**\n * Gets or sets the `left margin` size.\n * @private\n */\n get: function () {\n return this.leftMargin;\n },\n set: function (value) {\n this.leftMargin = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfMargins.prototype, \"top\", {\n /**\n * Gets or sets the `top margin` size.\n * @private\n */\n get: function () {\n return this.topMargin;\n },\n set: function (value) {\n this.topMargin = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfMargins.prototype, \"right\", {\n /**\n * Gets or sets the `right margin` size.\n * @private\n */\n get: function () {\n return this.rightMargin;\n },\n set: function (value) {\n this.rightMargin = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfMargins.prototype, \"bottom\", {\n /**\n * Gets or sets the `bottom margin` size.\n * @private\n */\n get: function () {\n return this.bottomMargin;\n },\n set: function (value) {\n this.bottomMargin = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfMargins.prototype, \"all\", {\n /**\n * Sets the `margins`.\n * @private\n */\n set: function (value) {\n this.setMargins(value);\n },\n enumerable: true,\n configurable: true\n });\n PdfMargins.prototype.setMargins = function (margin1, margin2, margin3, margin4) {\n if (typeof margin2 === 'undefined') {\n this.leftMargin = this.topMargin = this.rightMargin = this.bottomMargin = margin1;\n }\n else {\n if (typeof margin3 === 'undefined') {\n this.leftMargin = this.rightMargin = margin1;\n this.bottomMargin = this.topMargin = margin2;\n }\n else {\n this.leftMargin = margin1;\n this.topMargin = margin2;\n this.rightMargin = margin3;\n this.bottomMargin = margin4;\n }\n }\n };\n /**\n * `Clones` the object.\n * @private\n */\n PdfMargins.prototype.clone = function () {\n return this;\n };\n return PdfMargins;\n}());\nexport { PdfMargins };\n","/**\n * public Enum for `PdfHorizontalAlignment`.\n * @private\n */\nexport var PdfHorizontalAlignment;\n(function (PdfHorizontalAlignment) {\n /**\n * Specifies the type of `Left`.\n * @private\n */\n PdfHorizontalAlignment[PdfHorizontalAlignment[\"Left\"] = 0] = \"Left\";\n /**\n * Specifies the type of `Center`.\n * @private\n */\n PdfHorizontalAlignment[PdfHorizontalAlignment[\"Center\"] = 1] = \"Center\";\n /**\n * Specifies the type of `Right`.\n * @private\n */\n PdfHorizontalAlignment[PdfHorizontalAlignment[\"Right\"] = 2] = \"Right\";\n})(PdfHorizontalAlignment || (PdfHorizontalAlignment = {}));\n/**\n * public Enum for `PdfVerticalAlignment`.\n * @private\n */\nexport var PdfVerticalAlignment;\n(function (PdfVerticalAlignment) {\n /**\n * Specifies the type of `Top`.\n * @private\n */\n PdfVerticalAlignment[PdfVerticalAlignment[\"Top\"] = 0] = \"Top\";\n /**\n * Specifies the type of `Middle`.\n * @private\n */\n PdfVerticalAlignment[PdfVerticalAlignment[\"Middle\"] = 1] = \"Middle\";\n /**\n * Specifies the type of `Bottom`.\n * @private\n */\n PdfVerticalAlignment[PdfVerticalAlignment[\"Bottom\"] = 2] = \"Bottom\";\n})(PdfVerticalAlignment || (PdfVerticalAlignment = {}));\n/**\n * public Enum for `public`.\n * @private\n */\nexport var PdfTextAlignment;\n(function (PdfTextAlignment) {\n /**\n * Specifies the type of `Left`.\n * @private\n */\n PdfTextAlignment[PdfTextAlignment[\"Left\"] = 0] = \"Left\";\n /**\n * Specifies the type of `Center`.\n * @private\n */\n PdfTextAlignment[PdfTextAlignment[\"Center\"] = 1] = \"Center\";\n /**\n * Specifies the type of `Right`.\n * @private\n */\n PdfTextAlignment[PdfTextAlignment[\"Right\"] = 2] = \"Right\";\n /**\n * Specifies the type of `Justify`.\n * @private\n */\n PdfTextAlignment[PdfTextAlignment[\"Justify\"] = 3] = \"Justify\";\n})(PdfTextAlignment || (PdfTextAlignment = {}));\n/**\n * public Enum for `TextRenderingMode`.\n * @private\n */\nexport var TextRenderingMode;\n(function (TextRenderingMode) {\n /**\n * Specifies the type of `Fill`.\n * @private\n */\n TextRenderingMode[TextRenderingMode[\"Fill\"] = 0] = \"Fill\";\n /**\n * Specifies the type of `Stroke`.\n * @private\n */\n TextRenderingMode[TextRenderingMode[\"Stroke\"] = 1] = \"Stroke\";\n /**\n * Specifies the type of `FillStroke`.\n * @private\n */\n TextRenderingMode[TextRenderingMode[\"FillStroke\"] = 2] = \"FillStroke\";\n /**\n * Specifies the type of `None`.\n * @private\n */\n TextRenderingMode[TextRenderingMode[\"None\"] = 3] = \"None\";\n /**\n * Specifies the type of `ClipFlag`.\n * @private\n */\n TextRenderingMode[TextRenderingMode[\"ClipFlag\"] = 4] = \"ClipFlag\";\n /**\n * Specifies the type of `ClipFill`.\n * @private\n */\n TextRenderingMode[TextRenderingMode[\"ClipFill\"] = 4] = \"ClipFill\";\n /**\n * Specifies the type of `ClipStroke`.\n * @private\n */\n TextRenderingMode[TextRenderingMode[\"ClipStroke\"] = 5] = \"ClipStroke\";\n /**\n * Specifies the type of `ClipFillStroke`.\n * @private\n */\n TextRenderingMode[TextRenderingMode[\"ClipFillStroke\"] = 6] = \"ClipFillStroke\";\n /**\n * Specifies the type of `Clip`.\n * @private\n */\n TextRenderingMode[TextRenderingMode[\"Clip\"] = 7] = \"Clip\";\n})(TextRenderingMode || (TextRenderingMode = {}));\n/**\n * public Enum for `PdfLineJoin`.\n * @private\n */\nexport var PdfLineJoin;\n(function (PdfLineJoin) {\n /**\n * Specifies the type of `Miter`.\n * @private\n */\n PdfLineJoin[PdfLineJoin[\"Miter\"] = 0] = \"Miter\";\n /**\n * Specifies the type of `Round`.\n * @private\n */\n PdfLineJoin[PdfLineJoin[\"Round\"] = 1] = \"Round\";\n /**\n * Specifies the type of `Bevel`.\n * @private\n */\n PdfLineJoin[PdfLineJoin[\"Bevel\"] = 2] = \"Bevel\";\n})(PdfLineJoin || (PdfLineJoin = {}));\n/**\n * public Enum for `PdfLineCap`.\n * @private\n */\nexport var PdfLineCap;\n(function (PdfLineCap) {\n /**\n * Specifies the type of `Flat`.\n * @private\n */\n PdfLineCap[PdfLineCap[\"Flat\"] = 0] = \"Flat\";\n /**\n * Specifies the type of `Round`.\n * @private\n */\n PdfLineCap[PdfLineCap[\"Round\"] = 1] = \"Round\";\n /**\n * Specifies the type of `Square`.\n * @private\n */\n PdfLineCap[PdfLineCap[\"Square\"] = 2] = \"Square\";\n})(PdfLineCap || (PdfLineCap = {}));\n/**\n * public Enum for `PdfDashStyle`.\n * @private\n */\nexport var PdfDashStyle;\n(function (PdfDashStyle) {\n /**\n * Specifies the type of `Solid`.\n * @private\n */\n PdfDashStyle[PdfDashStyle[\"Solid\"] = 0] = \"Solid\";\n /**\n * Specifies the type of `Dash`.\n * @private\n */\n PdfDashStyle[PdfDashStyle[\"Dash\"] = 1] = \"Dash\";\n /**\n * Specifies the type of `Dot`.\n * @private\n */\n PdfDashStyle[PdfDashStyle[\"Dot\"] = 2] = \"Dot\";\n /**\n * Specifies the type of `DashDot`.\n * @private\n */\n PdfDashStyle[PdfDashStyle[\"DashDot\"] = 3] = \"DashDot\";\n /**\n * Specifies the type of `DashDotDot`.\n * @private\n */\n PdfDashStyle[PdfDashStyle[\"DashDotDot\"] = 4] = \"DashDotDot\";\n /**\n * Specifies the type of `Custom`.\n * @private\n */\n PdfDashStyle[PdfDashStyle[\"Custom\"] = 5] = \"Custom\";\n})(PdfDashStyle || (PdfDashStyle = {}));\n/**\n * public Enum for `PdfFillMode`.\n * @private\n */\nexport var PdfFillMode;\n(function (PdfFillMode) {\n /**\n * Specifies the type of `Winding`.\n * @private\n */\n PdfFillMode[PdfFillMode[\"Winding\"] = 0] = \"Winding\";\n /**\n * Specifies the type of `Alternate`.\n * @private\n */\n PdfFillMode[PdfFillMode[\"Alternate\"] = 1] = \"Alternate\";\n})(PdfFillMode || (PdfFillMode = {}));\n/**\n * public Enum for `PdfColorSpace`.\n * @private\n */\nexport var PdfColorSpace;\n(function (PdfColorSpace) {\n /**\n * Specifies the type of `Rgb`.\n * @private\n */\n PdfColorSpace[PdfColorSpace[\"Rgb\"] = 0] = \"Rgb\";\n /**\n * Specifies the type of `Cmyk`.\n * @private\n */\n PdfColorSpace[PdfColorSpace[\"Cmyk\"] = 1] = \"Cmyk\";\n /**\n * Specifies the type of `GrayScale`.\n * @private\n */\n PdfColorSpace[PdfColorSpace[\"GrayScale\"] = 2] = \"GrayScale\";\n /**\n * Specifies the type of `Indexed`.\n * @private\n */\n PdfColorSpace[PdfColorSpace[\"Indexed\"] = 3] = \"Indexed\";\n})(PdfColorSpace || (PdfColorSpace = {}));\n/**\n * public Enum for `PdfBlendMode`.\n * @private\n */\nexport var PdfBlendMode;\n(function (PdfBlendMode) {\n /**\n * Specifies the type of `Normal`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Normal\"] = 0] = \"Normal\";\n /**\n * Specifies the type of `Multiply`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Multiply\"] = 1] = \"Multiply\";\n /**\n * Specifies the type of `Screen`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Screen\"] = 2] = \"Screen\";\n /**\n * Specifies the type of `Overlay`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Overlay\"] = 3] = \"Overlay\";\n /**\n * Specifies the type of `Darken`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Darken\"] = 4] = \"Darken\";\n /**\n * Specifies the type of `Lighten`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Lighten\"] = 5] = \"Lighten\";\n /**\n * Specifies the type of `ColorDodge`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"ColorDodge\"] = 6] = \"ColorDodge\";\n /**\n * Specifies the type of `ColorBurn`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"ColorBurn\"] = 7] = \"ColorBurn\";\n /**\n * Specifies the type of `HardLight`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"HardLight\"] = 8] = \"HardLight\";\n /**\n * Specifies the type of `SoftLight`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"SoftLight\"] = 9] = \"SoftLight\";\n /**\n * Specifies the type of `Difference`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Difference\"] = 10] = \"Difference\";\n /**\n * Specifies the type of `Exclusion`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Exclusion\"] = 11] = \"Exclusion\";\n /**\n * Specifies the type of `Hue`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Hue\"] = 12] = \"Hue\";\n /**\n * Specifies the type of `Saturation`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Saturation\"] = 13] = \"Saturation\";\n /**\n * Specifies the type of `Color`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Color\"] = 14] = \"Color\";\n /**\n * Specifies the type of `Luminosity`.\n * @private\n */\n PdfBlendMode[PdfBlendMode[\"Luminosity\"] = 15] = \"Luminosity\";\n})(PdfBlendMode || (PdfBlendMode = {}));\n/**\n * public Enum for `PdfGraphicsUnit`.\n * @private\n */\nexport var PdfGraphicsUnit;\n(function (PdfGraphicsUnit) {\n /**\n * Specifies the type of `Centimeter`.\n * @private\n */\n PdfGraphicsUnit[PdfGraphicsUnit[\"Centimeter\"] = 0] = \"Centimeter\";\n /**\n * Specifies the type of `Pica`.\n * @private\n */\n PdfGraphicsUnit[PdfGraphicsUnit[\"Pica\"] = 1] = \"Pica\";\n /**\n * Specifies the type of `Pixel`.\n * @private\n */\n PdfGraphicsUnit[PdfGraphicsUnit[\"Pixel\"] = 2] = \"Pixel\";\n /**\n * Specifies the type of `Point`.\n * @private\n */\n PdfGraphicsUnit[PdfGraphicsUnit[\"Point\"] = 3] = \"Point\";\n /**\n * Specifies the type of `Inch`.\n * @private\n */\n PdfGraphicsUnit[PdfGraphicsUnit[\"Inch\"] = 4] = \"Inch\";\n /**\n * Specifies the type of `Document`.\n * @private\n */\n PdfGraphicsUnit[PdfGraphicsUnit[\"Document\"] = 5] = \"Document\";\n /**\n * Specifies the type of `Millimeter`.\n * @private\n */\n PdfGraphicsUnit[PdfGraphicsUnit[\"Millimeter\"] = 6] = \"Millimeter\";\n})(PdfGraphicsUnit || (PdfGraphicsUnit = {}));\n/**\n * public Enum for `PdfGridImagePosition`.\n * @private\n */\nexport var PdfGridImagePosition;\n(function (PdfGridImagePosition) {\n /**\n * Specifies the type of `Fit`.\n * @private\n */\n PdfGridImagePosition[PdfGridImagePosition[\"Fit\"] = 0] = \"Fit\";\n /**\n * Specifies the type of `Center`.\n * @private\n */\n PdfGridImagePosition[PdfGridImagePosition[\"Center\"] = 1] = \"Center\";\n /**\n * Specifies the type of `Stretch`.\n * @private\n */\n PdfGridImagePosition[PdfGridImagePosition[\"Stretch\"] = 2] = \"Stretch\";\n /**\n * Specifies the type of `Tile`.\n * @private\n */\n PdfGridImagePosition[PdfGridImagePosition[\"Tile\"] = 3] = \"Tile\";\n})(PdfGridImagePosition || (PdfGridImagePosition = {}));\n/**\n * public Enum for `the text rendering direction`.\n * @private\n */\nexport var PdfTextDirection;\n(function (PdfTextDirection) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n PdfTextDirection[PdfTextDirection[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `LeftToRight`.\n * @private\n */\n PdfTextDirection[PdfTextDirection[\"LeftToRight\"] = 1] = \"LeftToRight\";\n /**\n * Specifies the type of `RightToLeft`.\n * @private\n */\n PdfTextDirection[PdfTextDirection[\"RightToLeft\"] = 2] = \"RightToLeft\";\n})(PdfTextDirection || (PdfTextDirection = {}));\n","/**\n * public Enum for `PdfFontStyle`.\n * @private\n */\nexport var PdfFontStyle;\n(function (PdfFontStyle) {\n /**\n * Specifies the type of `Regular`.\n * @private\n */\n PdfFontStyle[PdfFontStyle[\"Regular\"] = 0] = \"Regular\";\n /**\n * Specifies the type of `Bold`.\n * @private\n */\n PdfFontStyle[PdfFontStyle[\"Bold\"] = 1] = \"Bold\";\n /**\n * Specifies the type of `Italic`.\n * @private\n */\n PdfFontStyle[PdfFontStyle[\"Italic\"] = 2] = \"Italic\";\n /**\n * Specifies the type of `Underline`.\n * @private\n */\n PdfFontStyle[PdfFontStyle[\"Underline\"] = 4] = \"Underline\";\n /**\n * Specifies the type of `Strikeout`.\n * @private\n */\n PdfFontStyle[PdfFontStyle[\"Strikeout\"] = 8] = \"Strikeout\";\n})(PdfFontStyle || (PdfFontStyle = {}));\n/**\n * Specifies the font family from the standard font.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a new page to the document\n * let page1 : PdfPage = document.pages.add();\n * // create new standard font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // create black brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));\n * // save the document\n * document.save('output.pdf');\n * ```\n */\nexport var PdfFontFamily;\n(function (PdfFontFamily) {\n /**\n * Specifies the `Helvetica` font.\n */\n PdfFontFamily[PdfFontFamily[\"Helvetica\"] = 0] = \"Helvetica\";\n /**\n * Specifies the `Courier` font.\n */\n PdfFontFamily[PdfFontFamily[\"Courier\"] = 1] = \"Courier\";\n /**\n * Specifies the `TimesRoman` font.\n */\n PdfFontFamily[PdfFontFamily[\"TimesRoman\"] = 2] = \"TimesRoman\";\n /**\n * Specifies the `Symbol` font.\n */\n PdfFontFamily[PdfFontFamily[\"Symbol\"] = 3] = \"Symbol\";\n /**\n * Specifies the `ZapfDingbats` font.\n */\n PdfFontFamily[PdfFontFamily[\"ZapfDingbats\"] = 4] = \"ZapfDingbats\";\n})(PdfFontFamily || (PdfFontFamily = {}));\n/**\n * public Enum for `PdfFontType`.\n * @private\n */\nexport var PdfFontType;\n(function (PdfFontType) {\n /**\n * Specifies the type of `Standard`.\n * @private\n */\n PdfFontType[PdfFontType[\"Standard\"] = 0] = \"Standard\";\n /**\n * Specifies the type of `TrueType`.\n * @private\n */\n PdfFontType[PdfFontType[\"TrueType\"] = 1] = \"TrueType\";\n /**\n * Specifies the type of `TrueTypeEmbedded`.\n * @private\n */\n PdfFontType[PdfFontType[\"TrueTypeEmbedded\"] = 2] = \"TrueTypeEmbedded\";\n})(PdfFontType || (PdfFontType = {}));\n/**\n * public Enum for `PdfWordWrapType`.\n * @private\n */\nexport var PdfWordWrapType;\n(function (PdfWordWrapType) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n PdfWordWrapType[PdfWordWrapType[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `Word`.\n * @private\n */\n PdfWordWrapType[PdfWordWrapType[\"Word\"] = 1] = \"Word\";\n /**\n * Specifies the type of `WordOnly`.\n * @private\n */\n PdfWordWrapType[PdfWordWrapType[\"WordOnly\"] = 2] = \"WordOnly\";\n /**\n * Specifies the type of `Character`.\n * @private\n */\n PdfWordWrapType[PdfWordWrapType[\"Character\"] = 3] = \"Character\";\n})(PdfWordWrapType || (PdfWordWrapType = {}));\n/**\n * public Enum for `PdfSubSuperScript`.\n * @private\n */\nexport var PdfSubSuperScript;\n(function (PdfSubSuperScript) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n PdfSubSuperScript[PdfSubSuperScript[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `SuperScript`.\n * @private\n */\n PdfSubSuperScript[PdfSubSuperScript[\"SuperScript\"] = 1] = \"SuperScript\";\n /**\n * Specifies the type of `SubScript`.\n * @private\n */\n PdfSubSuperScript[PdfSubSuperScript[\"SubScript\"] = 2] = \"SubScript\";\n})(PdfSubSuperScript || (PdfSubSuperScript = {}));\n/**\n * public Enum for `FontEncoding`.\n * @private\n */\nexport var FontEncoding;\n(function (FontEncoding) {\n /**\n * Specifies the type of `Unknown`.\n * @private\n */\n FontEncoding[FontEncoding[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * Specifies the type of `StandardEncoding`.\n * @private\n */\n FontEncoding[FontEncoding[\"StandardEncoding\"] = 1] = \"StandardEncoding\";\n /**\n * Specifies the type of `MacRomanEncoding`.\n * @private\n */\n FontEncoding[FontEncoding[\"MacRomanEncoding\"] = 2] = \"MacRomanEncoding\";\n /**\n * Specifies the type of `MacExpertEncoding`.\n * @private\n */\n FontEncoding[FontEncoding[\"MacExpertEncoding\"] = 3] = \"MacExpertEncoding\";\n /**\n * Specifies the type of `WinAnsiEncoding`.\n * @private\n */\n FontEncoding[FontEncoding[\"WinAnsiEncoding\"] = 4] = \"WinAnsiEncoding\";\n /**\n * Specifies the type of `PdfDocEncoding`.\n * @private\n */\n FontEncoding[FontEncoding[\"PdfDocEncoding\"] = 5] = \"PdfDocEncoding\";\n /**\n * Specifies the type of `IdentityH`.\n * @private\n */\n FontEncoding[FontEncoding[\"IdentityH\"] = 6] = \"IdentityH\";\n})(FontEncoding || (FontEncoding = {}));\n/**\n * public Enum for `TtfCmapFormat`.\n * @private\n */\nexport var TtfCmapFormat;\n(function (TtfCmapFormat) {\n /**\n * This is the Apple standard character to glyph index mapping table.\n * @private\n */\n TtfCmapFormat[TtfCmapFormat[\"Apple\"] = 0] = \"Apple\";\n /**\n * This is the Microsoft standard character to glyph index mapping table.\n * @private\n */\n TtfCmapFormat[TtfCmapFormat[\"Microsoft\"] = 4] = \"Microsoft\";\n /**\n * Format 6: Trimmed table mapping.\n * @private\n */\n TtfCmapFormat[TtfCmapFormat[\"Trimmed\"] = 6] = \"Trimmed\";\n})(TtfCmapFormat || (TtfCmapFormat = {}));\n/**\n * Enumerator that implements CMAP encodings.\n * @private\n */\nexport var TtfCmapEncoding;\n(function (TtfCmapEncoding) {\n /**\n * Unknown encoding.\n * @private\n */\n TtfCmapEncoding[TtfCmapEncoding[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * When building a symbol font for Windows.\n * @private\n */\n TtfCmapEncoding[TtfCmapEncoding[\"Symbol\"] = 1] = \"Symbol\";\n /**\n * When building a Unicode font for Windows.\n * @private\n */\n TtfCmapEncoding[TtfCmapEncoding[\"Unicode\"] = 2] = \"Unicode\";\n /**\n * For font that will be used on a Macintosh.\n * @private\n */\n TtfCmapEncoding[TtfCmapEncoding[\"Macintosh\"] = 3] = \"Macintosh\";\n})(TtfCmapEncoding || (TtfCmapEncoding = {}));\n/**\n * Ttf platform ID.\n * @private\n */\nexport var TtfPlatformID;\n(function (TtfPlatformID) {\n /**\n * Apple platform.\n * @private\n */\n TtfPlatformID[TtfPlatformID[\"AppleUnicode\"] = 0] = \"AppleUnicode\";\n /**\n * Macintosh platform.\n * @private\n */\n TtfPlatformID[TtfPlatformID[\"Macintosh\"] = 1] = \"Macintosh\";\n /**\n * Iso platform.\n * @private\n */\n TtfPlatformID[TtfPlatformID[\"Iso\"] = 2] = \"Iso\";\n /**\n * Microsoft platform.\n * @private\n */\n TtfPlatformID[TtfPlatformID[\"Microsoft\"] = 3] = \"Microsoft\";\n})(TtfPlatformID || (TtfPlatformID = {}));\n/**\n * Microsoft encoding ID.\n * @private\n */\nexport var TtfMicrosoftEncodingID;\n(function (TtfMicrosoftEncodingID) {\n /**\n * Undefined encoding.\n * @private\n */\n TtfMicrosoftEncodingID[TtfMicrosoftEncodingID[\"Undefined\"] = 0] = \"Undefined\";\n /**\n * Unicode encoding.\n * @private\n */\n TtfMicrosoftEncodingID[TtfMicrosoftEncodingID[\"Unicode\"] = 1] = \"Unicode\";\n})(TtfMicrosoftEncodingID || (TtfMicrosoftEncodingID = {}));\n/**\n * Macintosh encoding ID.\n * @private\n */\nexport var TtfMacintoshEncodingID;\n(function (TtfMacintoshEncodingID) {\n /**\n * Roman encoding.\n * @private\n */\n TtfMacintoshEncodingID[TtfMacintoshEncodingID[\"Roman\"] = 0] = \"Roman\";\n /**\n * Japanese encoding.\n * @private\n */\n TtfMacintoshEncodingID[TtfMacintoshEncodingID[\"Japanese\"] = 1] = \"Japanese\";\n /**\n * Chinese encoding.\n * @private\n */\n TtfMacintoshEncodingID[TtfMacintoshEncodingID[\"Chinese\"] = 2] = \"Chinese\";\n})(TtfMacintoshEncodingID || (TtfMacintoshEncodingID = {}));\n/**\n * Enumerator that implements font descriptor flags.\n * @private\n */\nexport var FontDescriptorFlags;\n(function (FontDescriptorFlags) {\n /**\n * All glyphs have the same width (as opposed to proportional or variable-pitch fonts, which have different widths).\n * @private\n */\n FontDescriptorFlags[FontDescriptorFlags[\"FixedPitch\"] = 1] = \"FixedPitch\";\n /**\n * Glyphs have serifs, which are short strokes drawn at an angle on the top and\n * bottom of glyph stems (as opposed to sans serif fonts, which do not).\n * @private\n */\n FontDescriptorFlags[FontDescriptorFlags[\"Serif\"] = 2] = \"Serif\";\n /**\n * Font contains glyphs outside the Adobe standard Latin character set. The\n * flag and the nonsymbolic flag cannot both be set or both be clear.\n * @private\n */\n FontDescriptorFlags[FontDescriptorFlags[\"Symbolic\"] = 4] = \"Symbolic\";\n /**\n * Glyphs resemble cursive handwriting.\n * @private\n */\n FontDescriptorFlags[FontDescriptorFlags[\"Script\"] = 8] = \"Script\";\n /**\n * Font uses the Adobe standard Latin character set or a subset of it.\n * @private\n */\n FontDescriptorFlags[FontDescriptorFlags[\"Nonsymbolic\"] = 32] = \"Nonsymbolic\";\n /**\n * Glyphs have dominant vertical strokes that are slanted.\n * @private\n */\n FontDescriptorFlags[FontDescriptorFlags[\"Italic\"] = 64] = \"Italic\";\n /**\n * Bold font.\n * @private\n */\n FontDescriptorFlags[FontDescriptorFlags[\"ForceBold\"] = 262144] = \"ForceBold\";\n})(FontDescriptorFlags || (FontDescriptorFlags = {}));\n/**\n * true type font composite glyph flags.\n * @private\n */\nexport var TtfCompositeGlyphFlags;\n(function (TtfCompositeGlyphFlags) {\n /**\n * The Arg1And2AreWords.\n * @private\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"Arg1And2AreWords\"] = 1] = \"Arg1And2AreWords\";\n /**\n * The ArgsAreXyValues.\n * @private\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"ArgsAreXyValues\"] = 2] = \"ArgsAreXyValues\";\n /**\n * The RoundXyToGrid.\n * @private\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"RoundXyToGrid\"] = 4] = \"RoundXyToGrid\";\n /**\n * The WeHaveScale.\n * @private\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"WeHaveScale\"] = 8] = \"WeHaveScale\";\n /**\n * The Reserved.\n * @private\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"Reserved\"] = 16] = \"Reserved\";\n /**\n * The MoreComponents.\n * @private\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"MoreComponents\"] = 32] = \"MoreComponents\";\n /**\n * The WeHaveAnXyScale.\n * @private\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"WeHaveAnXyScale\"] = 64] = \"WeHaveAnXyScale\";\n /**\n * The WeHaveTwoByTwo\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"WeHaveTwoByTwo\"] = 128] = \"WeHaveTwoByTwo\";\n /**\n * The WeHaveInstructions.\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"WeHaveInstructions\"] = 256] = \"WeHaveInstructions\";\n /**\n * The UseMyMetrics.\n */\n TtfCompositeGlyphFlags[TtfCompositeGlyphFlags[\"UseMyMetrics\"] = 512] = \"UseMyMetrics\";\n})(TtfCompositeGlyphFlags || (TtfCompositeGlyphFlags = {}));\n","/**\n * PdfPageSettings.ts class for EJ2-PDF\n */\nimport { SizeF, PointF } from './../drawing/pdf-drawing';\nimport { PdfPageSize } from './pdf-page-size';\nimport { PdfPageRotateAngle, PdfPageOrientation } from './enum';\nimport { PdfMargins } from './../graphics/pdf-margins';\n/**\n * The class provides various `setting` related with PDF pages.\n */\nvar PdfPageSettings = /** @class */ (function () {\n function PdfPageSettings(margins) {\n //Fields\n /**\n * The page `margins`.\n * @private\n */\n this.pageMargins = new PdfMargins();\n /**\n * The page `size`.\n * @default a4\n * @private\n */\n this.pageSize = PdfPageSize.a4;\n /**\n * The page `rotation angle`.\n * @default PdfPageRotateAngle.RotateAngle0\n * @private\n */\n this.rotateAngle = PdfPageRotateAngle.RotateAngle0;\n /**\n * The page `orientation`.\n * @default PdfPageOrientation.Portrait\n * @private\n */\n this.pageOrientation = PdfPageOrientation.Portrait;\n /**\n * The page `origin`.\n * @default 0,0\n * @private\n */\n this.pageOrigin = new PointF(0, 0);\n /**\n * Checks the Whether the `rotation` is applied or not.\n * @default false\n * @private\n */\n this.isRotation = false;\n if (typeof margins === 'number') {\n this.pageMargins.setMargins(margins);\n }\n }\n Object.defineProperty(PdfPageSettings.prototype, \"size\", {\n //Properties\n /**\n * Gets or sets the `size` of the page.\n * @private\n */\n get: function () {\n return this.pageSize;\n },\n set: function (value) {\n this.setSize(value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageSettings.prototype, \"orientation\", {\n /**\n * Gets or sets the page `orientation`.\n * @private\n */\n get: function () {\n return this.pageOrientation;\n },\n set: function (orientation) {\n if (this.pageOrientation !== orientation) {\n this.pageOrientation = orientation;\n this.updateSize(orientation);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageSettings.prototype, \"margins\", {\n /**\n * Gets or sets the `margins` of the page.\n * @private\n */\n get: function () {\n return this.pageMargins;\n },\n set: function (value) {\n this.pageMargins = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageSettings.prototype, \"width\", {\n /**\n * Gets or sets the `width` of the page.\n * @private\n */\n get: function () {\n return this.pageSize.width;\n },\n set: function (value) {\n this.pageSize.width = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageSettings.prototype, \"height\", {\n /**\n * Gets or sets the `height` of the page.\n * @private\n */\n get: function () {\n return this.pageSize.height;\n },\n set: function (value) {\n this.pageSize.height = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageSettings.prototype, \"origin\", {\n /**\n * Gets or sets the `origin` of the page.\n * @private\n */\n get: function () {\n return this.pageOrigin;\n },\n set: function (value) {\n this.pageOrigin = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageSettings.prototype, \"rotate\", {\n /**\n * Gets or sets the number of degrees by which the page should be `rotated` clockwise when displayed or printed.\n * @private\n */\n get: function () {\n return this.rotateAngle;\n },\n set: function (value) {\n this.rotateAngle = value;\n this.isRotation = true;\n },\n enumerable: true,\n configurable: true\n });\n //Methods\n /**\n * `Update page size` depending on orientation.\n * @private\n */\n PdfPageSettings.prototype.updateSize = function (orientation) {\n var min = Math.min(this.pageSize.width, this.pageSize.height);\n var max = Math.max(this.pageSize.width, this.pageSize.height);\n switch (orientation) {\n case PdfPageOrientation.Portrait:\n this.pageSize = new SizeF(min, max);\n break;\n case PdfPageOrientation.Landscape:\n this.pageSize = new SizeF(max, min);\n break;\n }\n };\n /**\n * Creates a `clone` of the object.\n * @private\n */\n PdfPageSettings.prototype.clone = function () {\n var settings = this;\n settings.pageMargins = this.pageMargins.clone();\n // if (GetTransition() != null)\n // {\n // settings.Transition = (PdfPageTransition)Transition.clone();\n // }\n return settings;\n };\n /**\n * Returns `size`, shrinked by the margins.\n * @private\n */\n PdfPageSettings.prototype.getActualSize = function () {\n var width = this.width - (this.margins.left + this.margins.right);\n var height = this.height - (this.margins.top + this.margins.bottom);\n var size = new SizeF(width, height);\n return size;\n };\n /**\n * Sets `size` to the page aaccording to the orientation.\n * @private\n */\n PdfPageSettings.prototype.setSize = function (size) {\n var min = Math.min(size.width, size.height);\n var max = Math.max(size.width, size.height);\n if (this.orientation === PdfPageOrientation.Portrait) {\n this.pageSize = new SizeF(min, max);\n }\n else {\n this.pageSize = new SizeF(max, min);\n }\n };\n return PdfPageSettings;\n}());\nexport { PdfPageSettings };\n","import { Operators } from './pdf-operators';\nimport { PdfNumber } from './../primitives/pdf-number';\nimport { PointF, RectangleF } from './../drawing/pdf-drawing';\nimport { PdfString } from './../primitives/pdf-string';\nimport { PdfName } from './../primitives/pdf-name';\n/**\n * Helper class to `write PDF graphic streams` easily.\n * @private\n */\nvar PdfStreamWriter = /** @class */ (function () {\n /**\n * Initialize an instance of `PdfStreamWriter` class.\n * @private\n */\n function PdfStreamWriter(stream) {\n if (stream == null) {\n throw new Error('ArgumentNullException:stream');\n }\n this.stream = stream;\n }\n //Implementation\n /**\n * `Clear` the stream.\n * @public\n */\n PdfStreamWriter.prototype.clear = function () {\n this.stream.clearStream();\n };\n PdfStreamWriter.prototype.setGraphicsState = function (dictionaryName) {\n if (dictionaryName instanceof PdfName) {\n this.stream.write(dictionaryName.toString());\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setGraphicsState);\n }\n else {\n this.stream.write(Operators.slash);\n this.stream.write(dictionaryName);\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setGraphicsState);\n }\n };\n /**\n * `Executes the XObject`.\n * @private\n */\n PdfStreamWriter.prototype.executeObject = function (name) {\n this.stream.write(name.toString());\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.paintXObject);\n this.stream.write(Operators.newLine);\n };\n /**\n * `Closes path object`.\n * @private\n */\n PdfStreamWriter.prototype.closePath = function () {\n this.writeOperator(Operators.closePath);\n };\n /**\n * `Clips the path`.\n * @private\n */\n PdfStreamWriter.prototype.clipPath = function (useEvenOddRule) {\n this.stream.write(Operators.clipPath);\n if (useEvenOddRule) {\n this.stream.write(Operators.evenOdd);\n }\n this.stream.write(Operators.whiteSpace);\n this.stream.write(Operators.endPath);\n this.stream.write(Operators.newLine);\n };\n /**\n * `Closes, then fills and strokes the path`.\n * @private\n */\n PdfStreamWriter.prototype.closeFillStrokePath = function (useEvenOddRule) {\n this.stream.write(Operators.closeFillStrokePath);\n if (useEvenOddRule) {\n this.stream.write(Operators.evenOdd);\n this.stream.write(Operators.newLine);\n }\n else {\n this.stream.write(Operators.newLine);\n }\n };\n /**\n * `Fills and strokes path`.\n * @private\n */\n PdfStreamWriter.prototype.fillStrokePath = function (useEvenOddRule) {\n this.stream.write(Operators.fillStroke);\n if (useEvenOddRule) {\n this.stream.write(Operators.evenOdd);\n this.stream.write(Operators.newLine);\n }\n else {\n this.stream.write(Operators.newLine);\n }\n };\n /**\n * `Fills path`.\n * @private\n */\n PdfStreamWriter.prototype.fillPath = function (useEvenOddRule) {\n this.stream.write(Operators.fill);\n if (useEvenOddRule) {\n this.stream.write(Operators.evenOdd);\n this.stream.write(Operators.newLine);\n }\n else {\n this.stream.write(Operators.newLine);\n }\n };\n /**\n * `Ends the path`.\n * @private\n */\n PdfStreamWriter.prototype.endPath = function () {\n this.writeOperator(Operators.n);\n };\n /**\n * `Closes and fills the path`.\n * @private\n */\n PdfStreamWriter.prototype.closeFillPath = function (useEvenOddRule) {\n this.writeOperator(Operators.closePath);\n this.stream.write(Operators.fill);\n if (useEvenOddRule) {\n this.stream.write(Operators.evenOdd);\n this.stream.write(Operators.newLine);\n }\n else {\n this.stream.write(Operators.newLine);\n }\n };\n /**\n * `Closes and strokes the path`.\n * @private\n */\n PdfStreamWriter.prototype.closeStrokePath = function () {\n this.writeOperator(Operators.closeStrokePath);\n };\n /**\n * `Sets the text scaling`.\n * @private\n */\n PdfStreamWriter.prototype.setTextScaling = function (textScaling) {\n this.stream.write(PdfNumber.floatToString(textScaling));\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setTextScaling);\n };\n /**\n * `Strokes path`.\n * @private\n */\n PdfStreamWriter.prototype.strokePath = function () {\n this.writeOperator(Operators.stroke);\n };\n /**\n * `Restores` the graphics state.\n * @private\n */\n PdfStreamWriter.prototype.restoreGraphicsState = function () {\n this.writeOperator(Operators.restoreState);\n };\n /**\n * `Saves` the graphics state.\n * @private\n */\n PdfStreamWriter.prototype.saveGraphicsState = function () {\n this.writeOperator(Operators.saveState);\n };\n PdfStreamWriter.prototype.startNextLine = function (arg1, arg2) {\n if (typeof arg1 === 'undefined') {\n this.writeOperator(Operators.goToNextLine);\n }\n else if (arg1 instanceof PointF) {\n this.writePoint(arg1);\n this.writeOperator(Operators.setCoords);\n }\n else {\n this.writePoint(arg1, arg2);\n this.writeOperator(Operators.setCoords);\n }\n };\n /**\n * Shows the `text`.\n * @private\n */\n PdfStreamWriter.prototype.showText = function (text) {\n this.checkTextParam(text);\n this.writeText(text);\n this.writeOperator(Operators.setText);\n };\n /**\n * Sets `text leading`.\n * @private\n */\n PdfStreamWriter.prototype.setLeading = function (leading) {\n this.stream.write(PdfNumber.floatToString(leading));\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setTextLeading);\n };\n /**\n * `Begins the path`.\n * @private\n */\n PdfStreamWriter.prototype.beginPath = function (x, y) {\n this.writePoint(x, y);\n this.writeOperator(Operators.beginPath);\n };\n /**\n * `Begins text`.\n * @private\n */\n PdfStreamWriter.prototype.beginText = function () {\n this.writeOperator(Operators.beginText);\n };\n /**\n * `Ends text`.\n * @private\n */\n PdfStreamWriter.prototype.endText = function () {\n this.writeOperator(Operators.endText);\n };\n PdfStreamWriter.prototype.appendRectangle = function (arg1, arg2, arg3, arg4) {\n if (arg1 instanceof RectangleF) {\n this.appendRectangle(arg1.x, arg1.y, arg1.width, arg1.height);\n }\n else {\n this.writePoint(arg1, arg2);\n this.writePoint(arg3, arg4);\n this.writeOperator(Operators.appendRectangle);\n }\n };\n PdfStreamWriter.prototype.appendLineSegment = function (arg1, arg2) {\n if (arg1 instanceof PointF) {\n this.appendLineSegment(arg1.x, arg1.y);\n }\n else {\n this.writePoint(arg1, arg2);\n this.writeOperator(Operators.appendLineSegment);\n }\n };\n /**\n * Sets the `text rendering mode`.\n * @private\n */\n PdfStreamWriter.prototype.setTextRenderingMode = function (renderingMode) {\n this.stream.write(renderingMode.toString());\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setRenderingMode);\n };\n /**\n * Sets the `character spacing`.\n * @private\n */\n PdfStreamWriter.prototype.setCharacterSpacing = function (charSpacing) {\n this.stream.write(PdfNumber.floatToString(charSpacing));\n this.stream.write(Operators.whiteSpace);\n this.stream.write(Operators.setCharacterSpace);\n this.stream.write(Operators.newLine);\n };\n /**\n * Sets the `word spacing`.\n * @private\n */\n PdfStreamWriter.prototype.setWordSpacing = function (wordSpacing) {\n this.stream.write(PdfNumber.floatToString(wordSpacing));\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setWordSpace);\n };\n PdfStreamWriter.prototype.showNextLineText = function (arg1, arg2) {\n if (arg1 instanceof PdfString) {\n this.checkTextParam(arg1);\n this.writeText(arg1);\n this.writeOperator(Operators.setTextOnNewLine);\n }\n else {\n this.checkTextParam(arg1);\n this.writeText(arg1, arg2);\n this.writeOperator(Operators.setTextOnNewLine);\n }\n };\n PdfStreamWriter.prototype.setColorSpace = function (arg1, arg2) {\n if (arg1 instanceof PdfName && typeof arg2 === 'boolean') {\n var temparg1 = arg1;\n var temparg2 = arg2;\n // if (temparg1 == null) {\n // throw new Error('ArgumentNullException:name');\n // }\n var op = (temparg2) ? Operators.selectcolorspaceforstroking : Operators.selectcolorspacefornonstroking;\n this.stream.write(temparg1.toString());\n this.stream.write(Operators.whiteSpace);\n this.stream.write(op);\n this.stream.write(Operators.newLine);\n }\n else {\n var temparg1 = arg1;\n var temparg2 = arg2;\n this.setColorSpace(new PdfName(temparg1), temparg2);\n }\n };\n /**\n * Modifies current `transformation matrix`.\n * @private\n */\n PdfStreamWriter.prototype.modifyCtm = function (matrix) {\n if (matrix == null) {\n throw new Error('ArgumentNullException:matrix');\n }\n this.stream.write(matrix.toString());\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.modifyCtm);\n };\n PdfStreamWriter.prototype.setFont = function (font, name, size) {\n if (typeof name === 'string') {\n this.setFont(font, new PdfName(name), size);\n }\n else {\n if (font == null) {\n throw new Error('ArgumentNullException:font');\n }\n this.stream.write(name.toString());\n this.stream.write(Operators.whiteSpace);\n this.stream.write(PdfNumber.floatToString(size));\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setFont);\n }\n };\n /**\n * `Writes the operator`.\n * @private\n */\n PdfStreamWriter.prototype.writeOperator = function (opcode) {\n this.stream.write(opcode);\n this.stream.write(Operators.newLine);\n };\n PdfStreamWriter.prototype.checkTextParam = function (text) {\n if (text == null) {\n throw new Error('ArgumentNullException:text');\n }\n if (typeof text === 'string' && text === '') {\n throw new Error('ArgumentException:The text can not be an empty string, text');\n }\n };\n PdfStreamWriter.prototype.writeText = function (arg1, arg2) {\n if ((arg1 instanceof PdfString) && (typeof arg2 === 'undefined')) {\n this.stream.write(arg1.pdfEncode());\n }\n else {\n var start = void 0;\n var end = void 0;\n if (arg2) {\n start = PdfString.hexStringMark[0];\n end = PdfString.hexStringMark[1];\n }\n else {\n start = PdfString.stringMark[0];\n end = PdfString.stringMark[1];\n }\n this.stream.write(start);\n this.stream.write(arg1);\n this.stream.write(end);\n }\n };\n PdfStreamWriter.prototype.writePoint = function (arg1, arg2) {\n if ((arg1 instanceof PointF) && (typeof arg2 === 'undefined')) {\n this.writePoint(arg1.x, arg1.y);\n }\n else {\n var temparg1 = arg1;\n this.stream.write(PdfNumber.floatToString(temparg1));\n this.stream.write(Operators.whiteSpace);\n // NOTE: Change Y co-ordinate because we shifted co-ordinate system only.\n arg2 = this.updateY(arg2);\n this.stream.write(PdfNumber.floatToString(arg2));\n this.stream.write(Operators.whiteSpace);\n }\n };\n /**\n * `Updates y` co-ordinate.\n * @private\n */\n PdfStreamWriter.prototype.updateY = function (arg) {\n return -arg;\n };\n /**\n * `Writes string` to the file.\n * @private\n */\n PdfStreamWriter.prototype.write = function (string) {\n var builder = '';\n builder += string;\n builder += Operators.newLine;\n this.writeOperator(builder);\n };\n /**\n * `Writes comment` to the file.\n * @private\n */\n PdfStreamWriter.prototype.writeComment = function (comment) {\n if (comment != null && comment.length > 0) {\n var builder = '';\n builder += Operators.comment;\n builder += Operators.whiteSpace;\n builder += comment;\n //builder.Append( Operators.NewLine );\n this.writeOperator(builder);\n }\n else {\n throw new Error('Invalid comment');\n }\n };\n /**\n * Sets the `color and space`.\n * @private\n */\n PdfStreamWriter.prototype.setColorAndSpace = function (color, colorSpace, forStroking) {\n if (!color.isEmpty) {\n // bool test = color is PdfExtendedColor;\n this.stream.write(color.toString(colorSpace, forStroking));\n this.stream.write(Operators.newLine);\n }\n };\n // public setLineDashPattern(pattern : number[], patternOffset : number) : void\n // {\n // let pat : PdfArray = new PdfArray(pattern);\n // let off : PdfNumber = new PdfNumber(patternOffset);\n // this.setLineDashPatternHelper(pat, off);\n // }\n // private setLineDashPatternHelper(pattern : PdfArray, patternOffset : PdfNumber) : void\n // {\n // pattern.Save(this);\n // this.m_stream.write(Operators.whiteSpace);\n // patternOffset.Save(this);\n // this.m_stream.write(Operators.whiteSpace);\n // this.writeOperator(Operators.setDashPattern);\n // }\n /**\n * Sets the `line dash pattern`.\n * @private\n */\n PdfStreamWriter.prototype.setLineDashPattern = function (pattern, patternOffset) {\n // let pat : PdfArray = new PdfArray(pattern);\n // let off : PdfNumber = new PdfNumber(patternOffset);\n // this.setLineDashPatternHelper(pat, off);\n this.setLineDashPatternHelper(pattern, patternOffset);\n };\n /**\n * Sets the `line dash pattern`.\n * @private\n */\n PdfStreamWriter.prototype.setLineDashPatternHelper = function (pattern, patternOffset) {\n var tempPattern = '[';\n if (pattern.length > 1) {\n for (var index = 0; index < pattern.length; index++) {\n if (index === pattern.length - 1) {\n tempPattern += pattern[index].toString();\n }\n else {\n tempPattern += pattern[index].toString() + ' ';\n }\n }\n }\n tempPattern += '] ';\n tempPattern += patternOffset.toString();\n tempPattern += ' ' + Operators.setDashPattern;\n this.stream.write(tempPattern);\n this.stream.write(Operators.newLine);\n };\n /**\n * Sets the `miter limit`.\n * @private\n */\n PdfStreamWriter.prototype.setMiterLimit = function (miterLimit) {\n this.stream.write(PdfNumber.floatToString(miterLimit));\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setMiterLimit);\n };\n /**\n * Sets the `width of the line`.\n * @private\n */\n PdfStreamWriter.prototype.setLineWidth = function (width) {\n this.stream.write(PdfNumber.floatToString(width));\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setLineWidth);\n };\n /**\n * Sets the `line cap`.\n * @private\n */\n PdfStreamWriter.prototype.setLineCap = function (lineCapStyle) {\n this.stream.write((lineCapStyle).toString());\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setLineCapStyle);\n };\n /**\n * Sets the `line join`.\n * @private\n */\n PdfStreamWriter.prototype.setLineJoin = function (lineJoinStyle) {\n this.stream.write((lineJoinStyle).toString());\n this.stream.write(Operators.whiteSpace);\n this.writeOperator(Operators.setLineJoinStyle);\n };\n Object.defineProperty(PdfStreamWriter.prototype, \"position\", {\n //IPdfWriter members\n /**\n * Gets or sets the current `position` within the stream.\n * @private\n */\n get: function () {\n return this.stream.position;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStreamWriter.prototype, \"length\", {\n /**\n * Gets `stream length`.\n * @private\n */\n get: function () {\n var returnValue = 0;\n if (this.stream.data.length !== 0 && this.stream.data.length !== -1) {\n for (var index = 0; index < this.stream.data.length; index++) {\n returnValue += this.stream.data[index].length;\n }\n }\n return returnValue;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStreamWriter.prototype, \"document\", {\n /**\n * Gets and Sets the `current document`.\n * @private\n */\n get: function () {\n return null;\n },\n enumerable: true,\n configurable: true\n });\n /* tslint:disable-next-line:max-line-length */\n PdfStreamWriter.prototype.appendBezierSegment = function (arg1, arg2, arg3, arg4, arg5, arg6) {\n if (arg1 instanceof PointF && arg2 instanceof PointF && arg3 instanceof PointF) {\n this.writePoint(arg1.x, arg1.y);\n this.writePoint(arg2.x, arg2.y);\n this.writePoint(arg3.x, arg3.y);\n }\n else {\n this.writePoint(arg1, arg2);\n this.writePoint(arg3, arg4);\n this.writePoint(arg5, arg6);\n }\n this.writeOperator(Operators.appendbeziercurve);\n };\n PdfStreamWriter.prototype.setColourWithPattern = function (colours, patternName, forStroking) {\n if ((colours != null)) {\n var count = colours.length;\n var i = 0;\n for (i = 0; i < count; ++i) {\n this.stream.write(colours[i].toString());\n this.stream.write(Operators.whiteSpace);\n }\n }\n if ((patternName != null)) {\n this.stream.write(patternName.toString());\n this.stream.write(Operators.whiteSpace);\n }\n if (forStroking) {\n this.writeOperator(Operators.setColorAndPatternStroking);\n }\n else {\n this.writeOperator(Operators.setColorAndPattern);\n }\n };\n return PdfStreamWriter;\n}());\nexport { PdfStreamWriter };\n","import { SizeF, RectangleF, PointF } from './../../drawing/pdf-drawing';\nimport { PdfWordWrapType } from './enum';\nimport { StringTokenizer } from './string-tokenizer';\n/**\n * Class `lay outing the text`.\n */\nvar PdfStringLayouter = /** @class */ (function () {\n // Constructors\n /**\n * Initializes a new instance of the `StringLayouter` class.\n * @private\n */\n function PdfStringLayouter() {\n /**\n * Checks whether the x co-ordinate is need to set as client size or not.\n * @hidden\n * @private\n */\n this.isOverloadWithPosition = false;\n //\n }\n PdfStringLayouter.prototype.layout = function (arg1, arg2, arg3, arg4, arg5, arg6, arg7) {\n if (arg4 instanceof RectangleF) {\n this.initialize(arg1, arg2, arg3, arg4, arg5);\n this.isOverloadWithPosition = arg6;\n this.clientSize = arg7;\n var result = this.doLayout();\n this.clear();\n return result;\n }\n else {\n this.initialize(arg1, arg2, arg3, arg4);\n this.isOverloadWithPosition = arg5;\n this.clientSize = arg6;\n var result = this.doLayout();\n this.clear();\n return result;\n }\n };\n PdfStringLayouter.prototype.initialize = function (text, font, format, rectSize, pageHeight) {\n if (typeof pageHeight === 'number') {\n if (text == null) {\n throw new Error('ArgumentNullException:text');\n }\n if (font == null) {\n throw new Error('ArgumentNullException:font');\n }\n this.text = text;\n this.font = font;\n this.format = format;\n this.size = new SizeF(rectSize.width, rectSize.height);\n this.rectangle = rectSize;\n this.pageHeight = pageHeight;\n this.reader = new StringTokenizer(text);\n }\n else {\n this.initialize(text, font, format, new RectangleF(new PointF(0, 0), rectSize), 0);\n }\n };\n /**\n * `Clear` all resources.\n * @private\n */\n PdfStringLayouter.prototype.clear = function () {\n this.font = null;\n this.format = null;\n this.reader.close();\n this.reader = null;\n this.text = null;\n };\n /**\n * `Layouts` the text.\n * @private\n */\n PdfStringLayouter.prototype.doLayout = function () {\n var result = new PdfStringLayoutResult();\n var lineResult = new PdfStringLayoutResult();\n var lines = [];\n var line = this.reader.peekLine();\n var lineIndent = this.getLineIndent(true);\n while (line != null) {\n lineResult = this.layoutLine(line, lineIndent);\n if (lineResult !== null || typeof lineResult !== 'undefined') {\n var numSymbolsInserted = 0;\n /* tslint:disable */\n var returnedValue = this.copyToResult(result, lineResult, lines, /*out*/ numSymbolsInserted);\n /* tslint:enable */\n var success = returnedValue.success;\n numSymbolsInserted = returnedValue.numInserted;\n if (!success) {\n this.reader.read(numSymbolsInserted);\n break;\n }\n }\n // if (lineResult.textRemainder != null && lineResult.textRemainder.length > 0 ) {\n // break;\n // }\n this.reader.readLine();\n line = this.reader.peekLine();\n lineIndent = this.getLineIndent(false);\n }\n this.finalizeResult(result, lines);\n return result;\n };\n /**\n * Returns `line indent` for the line.\n * @private\n */\n PdfStringLayouter.prototype.getLineIndent = function (firstLine) {\n var lineIndent = 0;\n if (this.format != null) {\n lineIndent = (firstLine) ? this.format.firstLineIndent : this.format.paragraphIndent;\n lineIndent = (this.size.width > 0) ? Math.min(this.size.width, lineIndent) : lineIndent;\n }\n return lineIndent;\n };\n /**\n * Calculates `height` of the line.\n * @private\n */\n PdfStringLayouter.prototype.getLineHeight = function () {\n var height = this.font.height;\n if (this.format != null && this.format.lineSpacing !== 0) {\n height = this.format.lineSpacing + this.font.height;\n }\n return height;\n };\n /**\n * Calculates `width` of the line.\n * @private\n */\n PdfStringLayouter.prototype.getLineWidth = function (line) {\n var width = this.font.getLineWidth(line, this.format);\n return width;\n };\n // tslint:disable\n /**\n * `Layouts` line.\n * @private\n */\n PdfStringLayouter.prototype.layoutLine = function (line, lineIndent) {\n var lineResult = new PdfStringLayoutResult();\n lineResult.layoutLineHeight = this.getLineHeight();\n var lines = [];\n var maxWidth = this.size.width;\n var lineWidth = this.getLineWidth(line) + lineIndent;\n var lineType = LineType.FirstParagraphLine;\n var readWord = true;\n // line is in bounds.\n if (maxWidth <= 0 || Math.round(lineWidth) <= Math.round(maxWidth)) {\n this.addToLineResult(lineResult, lines, line, lineWidth, LineType.NewLineBreak | lineType);\n }\n else {\n var builder = '';\n var curLine = '';\n lineWidth = lineIndent;\n var curIndent = lineIndent;\n var reader = new StringTokenizer(line);\n var word = reader.peekWord();\n var isSingleWord = false;\n if (word.length !== reader.length) {\n if (word === ' ') {\n curLine = curLine + word;\n builder = builder + word;\n reader.position += 1;\n word = reader.peekWord();\n }\n }\n while (word != null) {\n curLine = curLine + word;\n var curLineWidth = this.getLineWidth(curLine.toString()) + curIndent /*)*/;\n if (curLine.toString() === ' ') {\n curLine = '';\n curLineWidth = 0;\n }\n if (curLineWidth > maxWidth) {\n if (this.getWrapType() === PdfWordWrapType.None) {\n break;\n }\n if (curLine.length === word.length) {\n // Character wrap is disabled or one symbol is greater than bounds.\n if (this.getWrapType() === PdfWordWrapType.WordOnly) {\n lineResult.textRemainder = line.substring(reader.position);\n break;\n }\n else if (curLine.length === 1) {\n builder = builder + word;\n break;\n }\n else {\n readWord = false;\n curLine = '';\n word = reader.peek().toString();\n continue;\n }\n }\n else {\n if (this.getLineWidth(word.toString()) > maxWidth) {\n this.format.wordWrap = PdfWordWrapType.Character;\n }\n else {\n if (typeof this.format !== 'undefined' && this.format !== null) {\n this.format.wordWrap = PdfWordWrapType.Word;\n }\n }\n if (this.getWrapType() !== PdfWordWrapType.Character || !readWord) {\n var ln = builder.toString();\n // if (ln.indexOf(' ') === -1) {\n // isSingleWord = true;\n // this.addToLineResult(lineResult, lines, curLine, lineWidth, LineType.LayoutBreak | lineType);\n // } else {\n // this.addToLineResult(lineResult, lines, ln, lineWidth, LineType.LayoutBreak | lineType);\n // } \n if (ln !== ' ') {\n this.addToLineResult(lineResult, lines, ln, lineWidth, LineType.LayoutBreak | lineType);\n }\n if (this.isOverloadWithPosition) {\n maxWidth = this.clientSize.width;\n }\n curLine = '';\n builder = '';\n lineWidth = 0;\n curIndent = 0;\n curLineWidth = 0;\n lineType = LineType.None;\n // if (isSingleWord) {\n // reader.readWord();\n // readWord = false;\n // }\n word = (readWord) ? word : reader.peekWord();\n //isSingleWord = false;\n readWord = true;\n }\n else {\n readWord = false;\n curLine = '';\n curLine = curLine + builder.toString();\n word = reader.peek().toString();\n }\n continue;\n }\n }\n /*tslint:disable:max-func-body-length */\n builder = builder + word;\n lineWidth = curLineWidth;\n if (readWord) {\n reader.readWord();\n word = reader.peekWord();\n //isSingleWord = false;\n }\n else {\n reader.read();\n word = reader.peek().toString();\n }\n }\n if (builder.length > 0) {\n var ln = builder.toString();\n this.addToLineResult(lineResult, lines, ln, lineWidth, LineType.NewLineBreak | LineType.LastParagraphLine);\n }\n reader.close();\n }\n lineResult.layoutLines = [];\n for (var index = 0; index < lines.length; index++) {\n lineResult.layoutLines.push(lines[index]);\n }\n lines = [];\n return lineResult;\n };\n /**\n * `Adds` line to line result.\n * @private\n */\n PdfStringLayouter.prototype.addToLineResult = function (lineResult, lines, line, lineWidth, breakType) {\n var info = new LineInfo();\n info.text = line;\n info.width = lineWidth;\n info.lineType = breakType;\n lines.push(info);\n var size = lineResult.actualSize;\n size.height += this.getLineHeight();\n size.width = Math.max(size.width, lineWidth);\n lineResult.size = size;\n };\n /**\n * `Copies` layout result from line result to entire result. Checks whether we can proceed lay outing or not.\n * @private\n */\n PdfStringLayouter.prototype.copyToResult = function (result, lineResult, lines, \n /*out*/ numInserted) {\n var success = true;\n var allowPartialLines = (this.format != null && !this.format.lineLimit);\n var height = result.actualSize.height;\n var maxHeight = this.size.height;\n if ((this.pageHeight > 0) && (maxHeight + this.rectangle.y > this.pageHeight)) {\n maxHeight = this.rectangle.y - this.pageHeight;\n maxHeight = Math.max(maxHeight, -maxHeight);\n }\n numInserted = 0;\n if (lineResult.lines != null) {\n for (var i = 0, len = lineResult.lines.length; i < len; i++) {\n var expHeight = height + lineResult.lineHeight;\n if (expHeight <= maxHeight || maxHeight <= 0 || allowPartialLines) {\n var info = lineResult.lines[i];\n numInserted += info.text.length;\n info = this.trimLine(info, (lines.length === 0));\n lines.push(info);\n // Update width.\n var size = result.actualSize;\n size.width = Math.max(size.width, info.width);\n result.size = size;\n // The part of the line fits only and it's allowed to use partial lines.\n // if (expHeight >= maxHeight && maxHeight > 0 && allowPartialLines)\n // {\n // let shouldClip : boolean = (this.format == null || !this.format.noClip);\n // if (shouldClip)\n // {\n // let exceededHeight : number = expHeight - maxHeight;\n // let fitHeight : number = /*Utils.Round(*/ lineResult.lineHeight - exceededHeight /*)*/;\n // height = /*Utils.Round(*/ height + fitHeight /*)*/;\n // }\n // else\n // {\n // height = expHeight;\n // }\n // success = false;\n // break;\n // } else {\n height = expHeight;\n // }\n }\n else {\n success = false;\n break;\n }\n }\n }\n if (height != result.size.height) {\n var size1 = result.actualSize;\n size1.height = height;\n result.size = size1;\n }\n return { success: success, numInserted: numInserted };\n };\n /**\n * `Finalizes` final result.\n * @private\n */\n PdfStringLayouter.prototype.finalizeResult = function (result, lines) {\n result.layoutLines = [];\n for (var index = 0; index < lines.length; index++) {\n result.layoutLines.push(lines[index]);\n }\n result.layoutLineHeight = this.getLineHeight();\n if (!this.reader.end) {\n result.textRemainder = this.reader.readToEnd();\n }\n lines = [];\n };\n /**\n * `Trims` whitespaces at the line.\n * @private\n */\n PdfStringLayouter.prototype.trimLine = function (info, firstLine) {\n var line = info.text;\n var lineWidth = info.width;\n // Trim start whitespaces if the line is not a start of the paragraph only.\n var trimStartSpaces = ((info.lineType & LineType.FirstParagraphLine) === 0);\n var start = (this.format == null || !this.format.rightToLeft);\n var spaces = StringTokenizer.spaces;\n line = (start) ? line.trim() : line.trim();\n // Recalculate line width.\n if (line.length !== info.text.length) {\n lineWidth = this.getLineWidth(line);\n if ((info.lineType & LineType.FirstParagraphLine) > 0) {\n lineWidth += this.getLineIndent(firstLine);\n }\n }\n info.text = line;\n info.width = lineWidth;\n return info;\n };\n /**\n * Returns `wrap` type.\n * @private\n */\n PdfStringLayouter.prototype.getWrapType = function () {\n var wrapType = (this.format != null) ? this.format.wordWrap : PdfWordWrapType.Word;\n return wrapType;\n };\n return PdfStringLayouter;\n}());\nexport { PdfStringLayouter };\n//Internal declaration\nvar PdfStringLayoutResult = /** @class */ (function () {\n function PdfStringLayoutResult() {\n }\n Object.defineProperty(PdfStringLayoutResult.prototype, \"remainder\", {\n // Properties\n /**\n * Gets the `text` which is not lay outed.\n * @private\n */\n get: function () {\n return this.textRemainder;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringLayoutResult.prototype, \"actualSize\", {\n /**\n * Gets the actual layout text `bounds`.\n * @private\n */\n get: function () {\n if (typeof this.size === 'undefined') {\n this.size = new SizeF(0, 0);\n }\n return this.size;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringLayoutResult.prototype, \"lines\", {\n /**\n * Gets layout `lines` information.\n * @private\n */\n get: function () {\n return this.layoutLines;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringLayoutResult.prototype, \"lineHeight\", {\n /**\n * Gets the `height` of the line.\n * @private\n */\n get: function () {\n return this.layoutLineHeight;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringLayoutResult.prototype, \"empty\", {\n /**\n * Gets value that indicates whether any layout text [`empty`].\n * @private\n */\n get: function () {\n return (this.layoutLines == null || this.layoutLines.length === 0);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringLayoutResult.prototype, \"lineCount\", {\n /**\n * Gets `number of` the layout lines.\n * @private\n */\n get: function () {\n var count = (!this.empty) ? this.layoutLines.length : 0;\n return count;\n },\n enumerable: true,\n configurable: true\n });\n return PdfStringLayoutResult;\n}());\nexport { PdfStringLayoutResult };\nvar LineInfo = /** @class */ (function () {\n function LineInfo() {\n }\n Object.defineProperty(LineInfo.prototype, \"lineType\", {\n //Properties\n /**\n * Gets the `type` of the line text.\n * @private\n */\n get: function () {\n return this.type;\n },\n set: function (value) {\n this.type = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LineInfo.prototype, \"text\", {\n /**\n * Gets the line `text`.\n * @private\n */\n get: function () {\n return this.content;\n },\n set: function (value) {\n this.content = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LineInfo.prototype, \"width\", {\n /**\n * Gets `width` of the line text.\n * @private\n */\n get: function () {\n return this.lineWidth;\n },\n set: function (value) {\n this.lineWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n return LineInfo;\n}());\nexport { LineInfo };\n/**\n* Break type of the `line`.\n* @private\n*/\nexport var LineType;\n(function (LineType) {\n /**\n * Specifies the type of `None`.\n * @private\n */\n LineType[LineType[\"None\"] = 0] = \"None\";\n /**\n * Specifies the type of `NewLineBreak`.\n * @private\n */\n LineType[LineType[\"NewLineBreak\"] = 1] = \"NewLineBreak\";\n /**\n * Specifies the type of `LayoutBreak`.\n * @private\n */\n LineType[LineType[\"LayoutBreak\"] = 2] = \"LayoutBreak\";\n /**\n * Specifies the type of `FirstParagraphLine`.\n * @private\n */\n LineType[LineType[\"FirstParagraphLine\"] = 4] = \"FirstParagraphLine\";\n /**\n * Specifies the type of `LastParagraphLine`.\n * @private\n */\n LineType[LineType[\"LastParagraphLine\"] = 8] = \"LastParagraphLine\";\n})(LineType || (LineType = {}));\n","import { PdfColorSpace } from './enum';\nimport { Operators } from './../input-output/pdf-operators';\nimport { Dictionary } from './../collections/dictionary';\nimport { PdfNumber } from './../primitives/pdf-number';\nimport { PdfArray } from './../primitives/pdf-array';\n/**\n * Implements structures and routines working with `color`.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a new page to the document\n * let page1 : PdfPage = document.pages.add();\n * // set the font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * //\n * // set color\n * let brushColor : PdfColor = new PdfColor(0, 0, 0);\n * //\n * // create black brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(brushColor);\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n * @default black color\n */\nvar PdfColor = /** @class */ (function () {\n function PdfColor(color1, color2, color3, color4) {\n if (typeof color1 === 'undefined') {\n if (typeof color2 !== 'undefined' && typeof color3 !== 'undefined' && typeof color4 !== 'undefined') {\n this.assignRGB(color2, color3, color4);\n }\n else {\n this.filled = false;\n }\n }\n else if (color1 instanceof PdfColor) {\n this.redColor = color1.r;\n this.greenColor = color1.g;\n this.blueColor = color1.b;\n this.grayColor = color1.gray;\n this.alpha = color1.alpha;\n this.filled = (this.alpha !== 0);\n /* tslint:disable-next-line:max-line-length */\n }\n else if (typeof color1 === 'number' && typeof color2 === 'undefined' && typeof color3 === 'undefined' && typeof color4 === 'undefined') {\n if (color1 < 0) {\n color1 = 0;\n }\n if (color1 > 1) {\n color1 = 1;\n }\n this.redColor = color1 * PdfColor.maxColourChannelValue;\n this.greenColor = color1 * PdfColor.maxColourChannelValue;\n this.blueColor = color1 * PdfColor.maxColourChannelValue;\n this.cyanColor = color1;\n this.magentaColor = color1;\n this.yellowColor = color1;\n this.blackColor = color1;\n this.grayColor = color1;\n this.alpha = PdfColor.maxColourChannelValue;\n this.filled = true;\n }\n else if (typeof color4 === 'undefined') {\n this.assignRGB(color1, color2, color3);\n }\n else {\n this.assignRGB(color2, color3, color4, color1);\n }\n }\n /**\n * `Assign` red, green, blue colors with alpha value..\n * @private\n */\n PdfColor.prototype.assignRGB = function (r, g, b, a) {\n if (typeof r === 'undefined' || typeof g === 'undefined' || typeof b === 'undefined') {\n this.filled = false;\n }\n else {\n this.cyanColor = 0;\n this.magentaColor = 0;\n this.yellowColor = 0;\n this.blackColor = 0;\n this.grayColor = 0;\n this.redColor = r;\n this.greenColor = g;\n this.blueColor = b;\n if (typeof a === 'undefined') {\n this.alpha = PdfColor.maxColourChannelValue;\n }\n else {\n this.alpha = a;\n }\n this.filled = true;\n this.assignCMYK(r, g, b);\n }\n };\n /**\n * `Calculate and assign` cyan, megenta, yellow colors from rgb values..\n * @private\n */\n PdfColor.prototype.assignCMYK = function (r, g, b) {\n var red = r / PdfColor.maxColourChannelValue;\n var green = g / PdfColor.maxColourChannelValue;\n var blue = b / PdfColor.maxColourChannelValue;\n var black = PdfNumber.min(1 - red, 1 - green, 1 - blue);\n var cyan = (black === 1.0) ? 0 : (1 - red - black) / (1 - black);\n var magenta = (black === 1.0) ? 0 : (1 - green - black) / (1 - black);\n var yellow = (black === 1.0) ? 0 : (1 - blue - black) / (1 - black);\n this.blackColor = black;\n this.cyanColor = cyan;\n this.magentaColor = magenta;\n this.yellowColor = yellow;\n };\n Object.defineProperty(PdfColor.prototype, \"r\", {\n //Properties\n // public static get Empty():PdfColor\n // {\n // return this.s_emptyColor\n // }\n /**\n * Gets or sets `Red` channel value.\n * @private\n */\n get: function () {\n return this.redColor;\n },\n set: function (value) {\n this.redColor = value;\n this.assignCMYK(this.redColor, this.greenColor, this.blueColor);\n this.filled = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"red\", {\n /**\n * Gets the `Red` color\n * @private\n */\n get: function () {\n return (this.r / PdfColor.maxColourChannelValue);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"b\", {\n /**\n * Gets or sets `Blue` channel value.\n * @private\n */\n get: function () {\n return this.blueColor;\n },\n set: function (value) {\n this.blueColor = value;\n this.assignCMYK(this.redColor, this.greenColor, this.blueColor);\n this.filled = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"blue\", {\n /**\n * Gets the `blue` color.\n * @private\n */\n get: function () {\n return (this.b / PdfColor.maxColourChannelValue);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"c\", {\n /**\n * Gets or sets `Cyan` channel value.\n * @private\n */\n get: function () {\n return this.cyanColor;\n },\n set: function (value) {\n if (value < 0) {\n this.cyanColor = 0;\n }\n else if (value > 1) {\n this.cyanColor = 1;\n }\n else {\n this.cyanColor = value;\n }\n this.assignRGB(this.cyanColor, this.magentaColor, this.yellowColor, this.blackColor);\n this.filled = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"k\", {\n /**\n * Gets or sets `Black` channel value.\n * @private\n */\n get: function () {\n return this.blackColor;\n },\n set: function (value) {\n if ((value < 0)) {\n this.blackColor = 0;\n }\n else if ((value > 1)) {\n this.blackColor = 1;\n }\n else {\n this.blackColor = value;\n }\n this.assignRGB(this.cyanColor, this.magentaColor, this.yellowColor, this.blackColor);\n this.filled = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"m\", {\n /**\n * Gets or sets `Magenta` channel value.\n * @private\n */\n get: function () {\n return this.magentaColor;\n },\n set: function (value) {\n if ((value < 0)) {\n this.magentaColor = 0;\n }\n else if ((value > 1)) {\n this.magentaColor = 1;\n }\n else {\n this.magentaColor = value;\n }\n this.assignRGB(this.cyanColor, this.magentaColor, this.yellowColor, this.blackColor);\n this.filled = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"y\", {\n /**\n * Gets or sets `Yellow` channel value.\n * @private\n */\n get: function () {\n return this.yellowColor;\n },\n set: function (value) {\n if ((value < 0)) {\n this.yellowColor = 0;\n }\n else if ((value > 1)) {\n this.yellowColor = 1;\n }\n else {\n this.yellowColor = value;\n }\n this.assignRGB(this.cyanColor, this.magentaColor, this.yellowColor, this.blackColor);\n this.filled = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"g\", {\n /**\n * Gets or sets `Green` channel value.\n * @private\n */\n get: function () {\n return this.greenColor;\n },\n set: function (value) {\n this.greenColor = value;\n this.assignCMYK(this.redColor, this.greenColor, this.blueColor);\n this.filled = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"green\", {\n /**\n * Gets the `Green` color.\n * @private\n */\n get: function () {\n return (this.g / PdfColor.maxColourChannelValue);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"gray\", {\n /**\n * Gets or sets `Gray` channel value.\n * @private\n */\n get: function () {\n return ((((this.redColor + this.greenColor) + this.blueColor)) / (PdfColor.maxColourChannelValue * 3));\n },\n set: function (value) {\n if (value < 0) {\n this.grayColor = 0;\n }\n else if (value > 1) {\n this.grayColor = 1;\n }\n else {\n this.grayColor = value;\n }\n this.r = (this.grayColor * PdfColor.maxColourChannelValue);\n this.g = (this.grayColor * PdfColor.maxColourChannelValue);\n this.b = (this.grayColor * PdfColor.maxColourChannelValue);\n this.assignCMYK(this.redColor, this.greenColor, this.blueColor);\n this.filled = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"isEmpty\", {\n /**\n * Gets whether the PDFColor `is Empty` or not.\n * @private\n */\n get: function () {\n return !this.filled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfColor.prototype, \"a\", {\n /**\n * Gets or sets `Alpha` channel value.\n * @private\n */\n get: function () {\n return this.alpha;\n },\n set: function (value) {\n if (value < 0) {\n this.alpha = 0;\n }\n else {\n // if (this.alpha !== value) {\n this.alpha = value;\n // }\n }\n this.filled = true;\n },\n enumerable: true,\n configurable: true\n });\n //Public methods\n /**\n * Converts `PDFColor to PDF string` representation.\n * @private\n */\n PdfColor.prototype.toString = function (colorSpace, stroke) {\n if (this.isEmpty) {\n return '';\n }\n var str = '';\n switch (colorSpace) {\n case PdfColorSpace.Rgb:\n str = this.rgbToString(stroke);\n break;\n case PdfColorSpace.GrayScale:\n str = this.grayScaleToString(stroke);\n break;\n case PdfColorSpace.Cmyk:\n str = this.cmykToString(stroke);\n break;\n }\n return str;\n };\n /**\n * Sets `GrayScale` color.\n * @private\n */\n PdfColor.prototype.grayScaleToString = function (ifStroking) {\n var gray = this.gray;\n var colour = '';\n var obj = null;\n /* tslint:disable-next-line:max-line-length */\n obj = (ifStroking) ? PdfColor.grayStringsSroke.containsKey(gray) ? PdfColor.grayStringsSroke.getValue(gray) : null : PdfColor.grayStringsFill.containsKey(gray) ? PdfColor.grayStringsFill.getValue(gray) : null;\n if (obj == null) {\n if (ifStroking) {\n colour = gray.toString() + ' G';\n PdfColor.grayStringsSroke.setValue(gray, colour);\n }\n }\n else {\n colour = obj.toString();\n }\n return colour + Operators.newLine;\n };\n /**\n * Sets `RGB` color.\n * @private\n */\n PdfColor.prototype.rgbToString = function (ifStroking) {\n var r = this.r;\n var g = this.g;\n var b = this.b;\n var key = (r << 16) + (g << 8) + b;\n if (ifStroking) {\n key += 1 << 24;\n }\n var colour = '';\n var obj = null;\n if (PdfColor.rgbStrings.containsKey(key)) {\n obj = PdfColor.rgbStrings.getValue(key);\n }\n if (obj == null) {\n var red = r / PdfColor.maxColourChannelValue;\n var green = g / PdfColor.maxColourChannelValue;\n var blue = b / PdfColor.maxColourChannelValue;\n if (ifStroking) {\n colour = red.toString() + ' ' + green.toString() + ' ' + blue.toString() + ' RG';\n }\n else {\n colour = red.toString() + ' ' + green.toString() + ' ' + blue.toString() + ' rg';\n }\n PdfColor.rgbStrings.setValue(key, colour);\n }\n else {\n colour = obj.toString();\n }\n return colour + Operators.newLine;\n };\n /***\n * Sets `CMYK` color.\n * @private\n */\n PdfColor.prototype.cmykToString = function (ifStroking) {\n var cyan = this.c;\n var magenta = this.m;\n var yellow = this.y;\n var black = this.b;\n var colour = '';\n colour = cyan.toString() + ' ' + magenta.toString() + ' ' + yellow.toString() + ' ' + black.toString() + ' K';\n return colour + Operators.newLine;\n };\n /**\n * Converts `colour to a PDF array`.\n * @private\n */\n PdfColor.prototype.toArray = function (colorSpace) {\n var array = new PdfArray();\n switch (colorSpace) {\n case PdfColorSpace.Rgb:\n array.add(new PdfNumber(this.red));\n array.add(new PdfNumber(this.green));\n array.add(new PdfNumber(this.blue));\n break;\n }\n return array;\n };\n //Fields\n /**\n * Holds `RGB colors` converted into strings.\n * @private\n */\n PdfColor.rgbStrings = new Dictionary();\n /**\n * Holds Gray scale colors converted into strings for `stroking`.\n * @private\n */\n PdfColor.grayStringsSroke = new Dictionary();\n /**\n * Holds Gray scale colors converted into strings for `filling`.\n * @private\n */\n PdfColor.grayStringsFill = new Dictionary();\n /**\n * `Max value` of color channel.\n * @private\n */\n PdfColor.maxColourChannelValue = 255.0;\n return PdfColor;\n}());\nexport { PdfColor };\n","/**\n * `PdfBrush` class provides objects used to fill the interiors of graphical shapes such as rectangles,\n * ellipses, pies, polygons, and paths.\n * @private\n */\nvar PdfBrush = /** @class */ (function () {\n /**\n * Creates instanceof `PdfBrush` class.\n * @hidden\n * @private\n */\n function PdfBrush() {\n //\n }\n //IClonable implementation\n PdfBrush.prototype.clone = function () {\n return this;\n };\n return PdfBrush;\n}());\nexport { PdfBrush };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfColor } from './../pdf-color';\nimport { PdfColorSpace } from './../enum';\nimport { PdfBrush } from './pdf-brush';\n/**\n * Represents a brush that fills any object with a solid color.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // set font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10));\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\nvar PdfSolidBrush = /** @class */ (function (_super) {\n __extends(PdfSolidBrush, _super);\n //Constructors\n /**\n * Initializes a new instance of the `PdfSolidBrush` class.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // set font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10));\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n * @param color color of the brush\n */\n function PdfSolidBrush(color) {\n var _this = _super.call(this) || this;\n _this.pdfColor = color;\n return _this;\n }\n Object.defineProperty(PdfSolidBrush.prototype, \"color\", {\n //Properties\n /**\n * Gets or sets the `color` of the brush.\n * @private\n */\n get: function () {\n return this.pdfColor;\n },\n set: function (value) {\n this.pdfColor = value;\n },\n enumerable: true,\n configurable: true\n });\n //Implementation\n /**\n * `Monitors` the changes of the brush and modify PDF state respectively.\n * @private\n */\n PdfSolidBrush.prototype.monitorChanges = function (brush, streamWriter, getResources, saveChanges, currentColorSpace) {\n if (streamWriter == null) {\n throw new Error('ArgumentNullException:streamWriter');\n }\n var diff = false;\n if (brush == null) {\n diff = true;\n streamWriter.setColorAndSpace(this.pdfColor, currentColorSpace, false);\n return diff;\n }\n else {\n var sBrush = brush;\n diff = true;\n streamWriter.setColorAndSpace(this.pdfColor, currentColorSpace, false);\n return diff;\n }\n };\n /**\n * `Resets` the changes, which were made by the brush.\n * @private\n */\n PdfSolidBrush.prototype.resetChanges = function (streamWriter) {\n streamWriter.setColorAndSpace(new PdfColor(0, 0, 0), PdfColorSpace.Rgb, false);\n };\n return PdfSolidBrush;\n}(PdfBrush));\nexport { PdfSolidBrush };\n","/**\n * PdfPen.ts class for EJ2-PDF\n */\nimport { PdfColor } from './pdf-color';\nimport { PdfSolidBrush } from './brushes/pdf-solid-brush';\nimport { PdfDashStyle, PdfColorSpace } from './enum';\nimport { PdfBrush } from './brushes/pdf-brush';\n/**\n * `PdfPen` class defining settings for drawing operations, that determines the color,\n * width, and style of the drawing elements.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // create a new page\n * let page1 : PdfPage = document.pages.add();\n * // set pen\n * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));\n * // draw rectangle\n * page1.graphics.drawRectangle(pen, new RectangleF({x : 0, y : 0}, {width : 100, height : 50}));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\nvar PdfPen = /** @class */ (function () {\n function PdfPen(arg1, arg2) {\n //Fields\n /**\n * Specifies the `color of the pen`.\n * @default new PdfColor()\n * @private\n */\n this.pdfColor = new PdfColor(0, 0, 0);\n /**\n * Specifies the `dash offset of the pen`.\n * @default 0\n * @private\n */\n this.dashOffsetValue = 0;\n /**\n * Specifies the `dash pattern of the pen`.\n * @default [0]\n * @private\n */\n this.penDashPattern = [0];\n /**\n * Specifies the `dash style of the pen`.\n * @default Solid\n * @private\n */\n this.pdfDashStyle = PdfDashStyle.Solid;\n /**\n * Specifies the `line cap of the pen`.\n * @default 0\n * @private\n */\n this.pdfLineCap = 0;\n /**\n * Specifies the `line join of the pen`.\n * @default 0\n * @private\n */\n this.pdfLineJoin = 0;\n /**\n * Specifies the `width of the pen`.\n * @default 1.0\n * @private\n */\n this.penWidth = 1.0;\n /**\n * Specifies the `mitter limit of the pen`.\n * @default 0.0\n * @private\n */\n this.internalMiterLimit = 0.0;\n /**\n * Stores the `colorspace` value.\n * @default Rgb\n * @private\n */\n this.colorSpace = PdfColorSpace.Rgb;\n if (arg1 instanceof PdfBrush) {\n this.setBrush(arg1);\n }\n else if (arg1 instanceof PdfColor) {\n this.color = arg1;\n }\n if (typeof arg2 === 'number') {\n this.width = arg2;\n }\n }\n Object.defineProperty(PdfPen.prototype, \"color\", {\n //Properties\n /**\n * Gets or sets the `color of the pen`.\n * @private\n */\n get: function () {\n return this.pdfColor;\n },\n set: function (value) {\n this.pdfColor = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPen.prototype, \"dashOffset\", {\n /**\n * Gets or sets the `dash offset of the pen`.\n * @private\n */\n get: function () {\n if (typeof this.dashOffsetValue === 'undefined' || this.dashOffsetValue == null) {\n return 0;\n }\n else {\n return this.dashOffsetValue;\n }\n },\n set: function (value) {\n this.dashOffsetValue = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPen.prototype, \"dashPattern\", {\n /**\n * Gets or sets the `dash pattern of the pen`.\n * @private\n */\n get: function () {\n return this.penDashPattern;\n },\n set: function (value) {\n this.penDashPattern = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPen.prototype, \"dashStyle\", {\n /**\n * Gets or sets the `dash style of the pen`.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // create a new page\n * let page1 : PdfPage = document.pages.add();\n * // set pen\n * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));\n * //\n * // set pen style\n * pen.dashStyle = PdfDashStyle.DashDot;\n * // get pen style\n * let style : PdfDashStyle = pen.dashStyle;\n * //\n * // draw rectangle\n * page1.graphics.drawRectangle(pen, new RectangleF({x : 0, y : 0}, {width : 100, height : 50}));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n return this.pdfDashStyle;\n },\n set: function (value) {\n if (this.pdfDashStyle !== value) {\n this.pdfDashStyle = value;\n switch (this.pdfDashStyle) {\n case PdfDashStyle.Custom:\n break;\n case PdfDashStyle.Dash:\n this.penDashPattern = [3, 1];\n break;\n case PdfDashStyle.Dot:\n this.penDashPattern = [1, 1];\n break;\n case PdfDashStyle.DashDot:\n this.penDashPattern = [3, 1, 1, 1];\n break;\n case PdfDashStyle.DashDotDot:\n this.penDashPattern = [3, 1, 1, 1, 1, 1];\n break;\n case PdfDashStyle.Solid:\n break;\n default:\n this.pdfDashStyle = PdfDashStyle.Solid;\n this.penDashPattern = [0];\n break;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPen.prototype, \"lineCap\", {\n /**\n * Gets or sets the `line cap of the pen`.\n * @private\n */\n get: function () {\n return this.pdfLineCap;\n },\n set: function (value) {\n this.pdfLineCap = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPen.prototype, \"lineJoin\", {\n /**\n * Gets or sets the `line join style of the pen`.\n * @private\n */\n get: function () {\n return this.pdfLineJoin;\n },\n set: function (value) {\n this.pdfLineJoin = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPen.prototype, \"miterLimit\", {\n /**\n * Gets or sets the `miter limit`.\n * @private\n */\n get: function () {\n return this.internalMiterLimit;\n },\n set: function (value) {\n this.internalMiterLimit = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPen.prototype, \"width\", {\n /**\n * Gets or sets the `width of the pen`.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // create a new page\n * let page1 : PdfPage = document.pages.add();\n * // set pen\n * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));\n * //\n * // set pen width\n * pen.width = 2;\n * //\n * // draw rectangle\n * page1.graphics.drawRectangle(pen, new RectangleF({x : 0, y : 0}, {width : 100, height : 50}));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n return this.penWidth;\n },\n set: function (value) {\n this.penWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n //Helper\n /**\n * `Clones` this instance of PdfPen class.\n * @private\n */\n PdfPen.prototype.clone = function () {\n var pen = this;\n return pen;\n };\n /**\n * `Sets the brush`.\n * @private\n */\n PdfPen.prototype.setBrush = function (brush) {\n var sBrush = brush;\n if ((sBrush != null && sBrush instanceof PdfSolidBrush)) {\n this.color = sBrush.color;\n this.pdfBrush = sBrush;\n }\n this.color = sBrush.color;\n this.pdfBrush = sBrush;\n };\n /**\n * `Monitors the changes`.\n * @private\n */\n PdfPen.prototype.monitorChanges = function (currentPen, streamWriter, getResources, saveState, currentColorSpace, matrix) {\n var diff = false;\n saveState = true;\n if (currentPen == null) {\n diff = true;\n }\n diff = this.dashControl(currentPen, saveState, streamWriter);\n streamWriter.setLineWidth(this.width);\n streamWriter.setLineJoin(this.lineJoin);\n streamWriter.setLineCap(this.lineCap);\n var miterLimit = this.miterLimit;\n if (miterLimit > 0) {\n streamWriter.setMiterLimit(miterLimit);\n diff = true;\n }\n var brush = this.pdfBrush;\n streamWriter.setColorAndSpace(this.color, currentColorSpace, true);\n diff = true;\n return diff;\n };\n /**\n * `Controls the dash style` and behaviour of each line.\n * @private\n */\n PdfPen.prototype.dashControl = function (pen, saveState, streamWriter) {\n saveState = true;\n var lineWidth = this.width;\n var pattern = this.getPattern();\n streamWriter.setLineDashPattern(pattern, this.dashOffset * lineWidth);\n return saveState;\n };\n /**\n * `Gets the pattern` of PdfPen.\n * @private\n */\n PdfPen.prototype.getPattern = function () {\n var pattern = this.dashPattern;\n for (var i = 0; i < pattern.length; ++i) {\n pattern[i] *= this.width;\n }\n return pattern;\n };\n return PdfPen;\n}());\nexport { PdfPen };\n","/**\n * PdfStringFormat.ts class for EJ2-PDF\n */\nimport { PdfVerticalAlignment } from './../../graphics/enum';\nimport { PdfSubSuperScript, PdfWordWrapType } from './../../graphics/fonts/enum';\n/**\n * `PdfStringFormat` class represents the text layout information on PDF.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // set font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * //\n * // set the format for string\n * let stringFormat : PdfStringFormat = new PdfStringFormat();\n * // set the text alignment\n * stringFormat.alignment = PdfTextAlignment.Center;\n * // set the vertical alignment\n * stringFormat.lineAlignment = PdfVerticalAlignment.Middle;\n * //\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\nvar PdfStringFormat = /** @class */ (function () {\n function PdfStringFormat(arg1, arg2) {\n /**\n * The `scaling factor` of the text being drawn.\n * @private\n */\n this.scalingFactor = 100.0;\n /**\n * Indicates text `wrapping` type.\n * @private\n */\n this.wordWrapType = PdfWordWrapType.Word;\n this.internalLineLimit = true;\n this.wordWrapType = PdfWordWrapType.Word;\n if ((typeof arg1 !== 'undefined') && (typeof arg1 !== 'string')) {\n this.textAlignment = arg1;\n }\n if (typeof arg2 !== 'undefined') {\n this.verticalAlignment = arg2;\n }\n }\n Object.defineProperty(PdfStringFormat.prototype, \"alignment\", {\n //Properties\n /**\n * Gets or sets the `horizontal` text alignment\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // set font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * //\n * // set the format for string\n * let stringFormat : PdfStringFormat = new PdfStringFormat();\n * // set the text alignment\n * stringFormat.alignment = PdfTextAlignment.Center;\n * //\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n return this.textAlignment;\n },\n set: function (value) {\n this.textAlignment = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"textDirection\", {\n get: function () {\n return this.direction;\n },\n set: function (value) {\n this.direction = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"lineAlignment\", {\n /**\n * Gets or sets the `vertical` text alignment.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // set font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * //\n * // set the format for string\n * let stringFormat : PdfStringFormat = new PdfStringFormat();\n * // set the vertical alignment\n * stringFormat.lineAlignment = PdfVerticalAlignment.Middle;\n * //\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n if (typeof this.verticalAlignment === 'undefined' || this.verticalAlignment == null) {\n return PdfVerticalAlignment.Top;\n }\n else {\n return this.verticalAlignment;\n }\n },\n set: function (value) {\n this.verticalAlignment = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"rightToLeft\", {\n /**\n * Gets or sets the value that indicates text `direction` mode.\n * @private\n */\n get: function () {\n if (typeof this.isRightToLeft === 'undefined' || this.isRightToLeft == null) {\n return false;\n }\n else {\n return this.isRightToLeft;\n }\n },\n set: function (value) {\n this.isRightToLeft = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"characterSpacing\", {\n /**\n * Gets or sets value that indicates a `size` among the characters in the text.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // set font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * //\n * // set the format for string\n * let stringFormat : PdfStringFormat = new PdfStringFormat();\n * // set character spacing\n * stringFormat.characterSpacing = 10;\n * //\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n if (typeof this.internalCharacterSpacing === 'undefined' || this.internalCharacterSpacing == null) {\n return 0;\n }\n else {\n return this.internalCharacterSpacing;\n }\n },\n set: function (value) {\n this.internalCharacterSpacing = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"wordSpacing\", {\n /**\n * Gets or sets value that indicates a `size` among the words in the text.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // set font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * //\n * // set the format for string\n * let stringFormat : PdfStringFormat = new PdfStringFormat();\n * // set word spacing\n * stringFormat.wordSpacing = 10;\n * //\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(10, 10), stringFormat);\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n if (typeof this.internalWordSpacing === 'undefined' || this.internalWordSpacing == null) {\n return 0;\n }\n else {\n return this.internalWordSpacing;\n }\n },\n set: function (value) {\n this.internalWordSpacing = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"lineSpacing\", {\n /**\n * Gets or sets value that indicates the `vertical distance` between the baselines of adjacent lines of text.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // set font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // set string\n * let text : string = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\n * incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitati';\n * // set rectangle bounds\n * let rectangle : RectangleF = new RectangleF({x : 0, y : 0}, {width : 300, height : 100})\n * //\n * // set the format for string\n * let stringFormat : PdfStringFormat = new PdfStringFormat();\n * // set line spacing\n * stringFormat.lineSpacing = 10;\n * //\n * // draw the text\n * page1.graphics.drawString(text, font, blackBrush, rectangle, stringFormat);\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n if (typeof this.leading === 'undefined' || this.leading == null) {\n return 0;\n }\n else {\n return this.leading;\n }\n },\n set: function (value) {\n this.leading = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"clipPath\", {\n /**\n * Gets or sets a value indicating whether the text is `clipped` or not.\n * @private\n */\n get: function () {\n if (typeof this.clip === 'undefined' || this.clip == null) {\n return false;\n }\n else {\n return this.clip;\n }\n },\n set: function (value) {\n this.clip = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"subSuperScript\", {\n /**\n * Gets or sets value indicating whether the text is in `subscript or superscript` mode.\n * @private\n */\n get: function () {\n if (typeof this.pdfSubSuperScript === 'undefined' || this.pdfSubSuperScript == null) {\n return PdfSubSuperScript.None;\n }\n else {\n return this.pdfSubSuperScript;\n }\n },\n set: function (value) {\n this.pdfSubSuperScript = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"paragraphIndent\", {\n /**\n * Gets or sets the `indent` of the first line in the paragraph.\n * @private\n */\n get: function () {\n if (typeof this.internalParagraphIndent === 'undefined' || this.internalParagraphIndent == null) {\n return 0;\n }\n else {\n return this.internalParagraphIndent;\n }\n },\n set: function (value) {\n this.internalParagraphIndent = value;\n this.firstLineIndent = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"lineLimit\", {\n /**\n * Gets or sets a value indicating whether [`line limit`].\n * @private\n */\n get: function () {\n return this.internalLineLimit;\n },\n set: function (value) {\n this.internalLineLimit = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"measureTrailingSpaces\", {\n /**\n * Gets or sets a value indicating whether [`measure trailing spaces`].\n * @private\n */\n get: function () {\n if (typeof this.trailingSpaces === 'undefined' || this.trailingSpaces == null) {\n return false;\n }\n else {\n return this.trailingSpaces;\n }\n },\n set: function (value) {\n this.trailingSpaces = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"noClip\", {\n /**\n * Gets or sets a value indicating whether [`no clip`].\n * @private\n */\n get: function () {\n if (typeof this.isNoClip === 'undefined' || this.isNoClip == null) {\n return false;\n }\n else {\n return this.isNoClip;\n }\n },\n set: function (value) {\n this.isNoClip = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"wordWrap\", {\n /**\n * Gets or sets value indicating type of the text `wrapping`.\n * @private\n */\n get: function () {\n // if (typeof this.wrapType === 'undefined' || this.wrapType == null) {\n // return PdfWordWrapType.Word;\n // } else {\n return this.wordWrapType;\n // }\n },\n set: function (value) {\n this.wordWrapType = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"horizontalScalingFactor\", {\n /**\n * Gets or sets the `scaling factor`.\n * @private\n */\n get: function () {\n // if (typeof this.scalingFactor === 'undefined' || this.scalingFactor == null) {\n // return 100;\n // } else {\n return this.scalingFactor;\n // }\n },\n set: function (value) {\n if (value <= 0) {\n throw new Error('ArgumentOutOfRangeException:The scaling factor cant be less of equal to zero, ScalingFactor');\n }\n this.scalingFactor = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfStringFormat.prototype, \"firstLineIndent\", {\n /**\n * Gets or sets the `indent` of the first line in the text.\n * @private\n */\n get: function () {\n if (typeof this.initialLineIndent === 'undefined' || this.initialLineIndent == null) {\n return 0;\n }\n else {\n return this.initialLineIndent;\n }\n },\n set: function (value) {\n this.initialLineIndent = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Clones` the object.\n * @private\n */\n //IClonable implementation\n PdfStringFormat.prototype.clone = function () {\n var format = this;\n return format;\n };\n return PdfStringFormat;\n}());\nexport { PdfStringFormat };\n","/**\n * StringTokenizer.ts class for EJ2-PDF\n * Utility class for working with strings.\n * @private\n */\nvar StringTokenizer = /** @class */ (function () {\n // Constructors\n /**\n * Initializes a new instance of the `StringTokenizer` class.\n * @private\n */\n function StringTokenizer(textValue) {\n /**\n * Current `position`.\n * @private\n */\n this.currentPosition = 0;\n if (textValue == null) {\n throw new Error('ArgumentNullException:text');\n }\n this.text = textValue;\n }\n Object.defineProperty(StringTokenizer.prototype, \"length\", {\n // Properties\n /**\n * Gets text `length`.\n * @private\n */\n get: function () {\n return this.text.length;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(StringTokenizer.prototype, \"end\", {\n get: function () {\n return (this.currentPosition === this.text.length);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(StringTokenizer.prototype, \"position\", {\n /**\n * Gets or sets the position.\n * @private\n */\n get: function () {\n return this.currentPosition;\n },\n set: function (value) {\n this.currentPosition = value;\n },\n enumerable: true,\n configurable: true\n });\n StringTokenizer.getCharsCount = function (text, symbols) {\n if (typeof symbols === 'string') {\n if (text == null) {\n throw new Error('ArgumentNullException:wholeText');\n }\n var numSymbols = 0;\n var curIndex = 0;\n for (;;) {\n curIndex = text.indexOf(symbols, curIndex);\n if (curIndex === -1) {\n break;\n }\n else {\n numSymbols++;\n curIndex++;\n }\n }\n return numSymbols;\n }\n else {\n if (text == null) {\n throw new Error('ArgumentNullException:text');\n }\n if (symbols == null) {\n throw new Error('ArgumentNullException:symbols');\n }\n var count = 0;\n for (var i = 0, len = text.length; i < len; i++) {\n var ch = text[i];\n if (this.contains(symbols, ch)) {\n count++;\n }\n }\n return count;\n }\n };\n /**\n * Reads line of the text.\n * @private\n */\n StringTokenizer.prototype.readLine = function () {\n var pos = this.currentPosition;\n while (pos < this.length) {\n var ch = this.text[pos];\n switch (ch) {\n case '\\r':\n case '\\n': {\n var text = this.text.substring(this.currentPosition, pos - this.currentPosition);\n this.currentPosition = pos + 1;\n if (((ch === '\\r') && (this.currentPosition < this.length)) && (this.text[this.currentPosition] === '\\n')) {\n this.currentPosition++;\n }\n return text;\n }\n }\n pos++;\n }\n // The remaining text.\n if (pos > this.currentPosition) {\n var text2 = this.text.substr(this.currentPosition, pos - this.currentPosition);\n this.currentPosition = pos;\n return text2;\n }\n return null;\n };\n /**\n * Reads line of the text.\n * @private\n */\n StringTokenizer.prototype.peekLine = function () {\n var pos = this.currentPosition;\n var line = this.readLine();\n this.currentPosition = pos;\n return line;\n };\n /**\n * Reads a word from the text.\n * @private\n */\n StringTokenizer.prototype.readWord = function () {\n var pos = this.currentPosition;\n while (pos < this.length) {\n var ch = this.text[pos];\n switch (ch) {\n case '\\r':\n case '\\n':\n var textValue = this.text.substr(this.currentPosition, pos - this.currentPosition);\n this.currentPosition = pos + 1;\n if (((ch === '\\r') && (this.currentPosition < this.length)) && (this.text[this.currentPosition] === '\\n')) {\n this.currentPosition++;\n }\n return textValue;\n case ' ':\n case '\\t': {\n if (pos === this.currentPosition) {\n pos++;\n }\n var text = this.text.substr(this.currentPosition, pos - this.currentPosition);\n this.currentPosition = pos;\n return text;\n }\n }\n pos++;\n }\n // The remaining text.\n if (pos > this.currentPosition) {\n var text2 = this.text.substr(this.currentPosition, pos - this.currentPosition);\n this.currentPosition = pos;\n return text2;\n }\n return null;\n };\n /**\n * Peeks a word from the text.\n * @private\n */\n StringTokenizer.prototype.peekWord = function () {\n var pos = this.currentPosition;\n var word = this.readWord();\n this.currentPosition = pos;\n return word;\n };\n StringTokenizer.prototype.read = function (count) {\n if (typeof count === 'undefined') {\n var ch = '0';\n if (!this.end) {\n ch = this.text[this.currentPosition];\n this.currentPosition++;\n }\n return ch;\n }\n else {\n var num = 0;\n var builder = '';\n while (!this.end && num < count) {\n var ch = this.read();\n builder = builder + ch;\n num++;\n }\n return builder;\n }\n };\n /**\n * Peeks char form the data.\n * @private\n */\n StringTokenizer.prototype.peek = function () {\n var ch = '0';\n if (!this.end) {\n ch = this.text[this.currentPosition];\n }\n return ch;\n };\n /**\n * Closes a reader.\n * @private\n */\n StringTokenizer.prototype.close = function () {\n this.text = null;\n };\n StringTokenizer.prototype.readToEnd = function () {\n var text;\n if (this.currentPosition === 0) {\n text = this.text;\n }\n else {\n text = this.text.substring(this.length, this.currentPosition);\n }\n this.currentPosition = this.length;\n return text;\n };\n //Implementation\n /**\n * Checks whether array contains a symbol.\n * @private\n */\n StringTokenizer.contains = function (array, symbol) {\n var contains = false;\n for (var i = 0; i < array.length; i++) {\n if (array[i] === symbol) {\n contains = true;\n break;\n }\n }\n return contains;\n };\n // Constants\n /**\n * `Whitespace` symbol.\n * @private\n */\n StringTokenizer.whiteSpace = ' ';\n /**\n * `tab` symbol.\n * @private\n */\n StringTokenizer.tab = '\\t';\n /**\n * Array of `spaces`.\n * @private\n */\n StringTokenizer.spaces = [StringTokenizer.whiteSpace, StringTokenizer.tab];\n /**\n * `Pattern` for WhiteSpace.\n * @private\n */\n StringTokenizer.whiteSpacePattern = '^[ \\t]+$';\n return StringTokenizer;\n}());\nexport { StringTokenizer };\n","/**\n * PdfFont.ts class for EJ2-PDF\n */\nimport { PdfFontStyle } from './enum';\nimport { SizeF } from './../../drawing/pdf-drawing';\nimport { PdfStringFormat } from './pdf-string-format';\nimport { PdfStringLayouter } from './string-layouter';\nimport { StringTokenizer } from './string-tokenizer';\n/**\n * Defines a particular format for text, including font face, size, and style attributes.\n * @private\n */\nvar PdfFont = /** @class */ (function () {\n function PdfFont(size, style) {\n /**\n * `Style` of the font.\n * @private\n */\n this.fontStyle = PdfFontStyle.Regular;\n if (typeof size === 'number' && typeof style === 'undefined') {\n this.fontSize = size;\n }\n else {\n this.fontSize = size;\n this.setStyle(style);\n }\n }\n Object.defineProperty(PdfFont.prototype, \"name\", {\n //Properties\n /**\n * Gets the face name of this Font.\n * @private\n */\n get: function () {\n return this.metrics.name;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfFont.prototype, \"size\", {\n /**\n * Gets the size of this font.\n * @private\n */\n get: function () {\n return this.fontSize;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfFont.prototype, \"height\", {\n /**\n * Gets the height of the font in points.\n * @private\n */\n get: function () {\n return this.metrics.getHeight(null);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfFont.prototype, \"style\", {\n /**\n * Gets the style information for this font.\n * @private\n */\n get: function () {\n return this.fontStyle;\n },\n set: function (value) {\n this.fontStyle = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfFont.prototype, \"bold\", {\n /**\n * Gets a value indicating whether this `PdfFont` is `bold`.\n * @private\n */\n get: function () {\n return ((this.style & PdfFontStyle.Bold) > 0);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfFont.prototype, \"italic\", {\n /**\n * Gets a value indicating whether this `PdfFont` has the `italic` style applied.\n * @private\n */\n get: function () {\n return ((this.style & PdfFontStyle.Italic) > 0);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfFont.prototype, \"strikeout\", {\n /**\n * Gets a value indicating whether this `PdfFont` is `strikeout`.\n * @private\n */\n get: function () {\n return ((this.style & PdfFontStyle.Strikeout) > 0);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfFont.prototype, \"underline\", {\n /**\n * Gets a value indicating whether this `PdfFont` is `underline`.\n * @private\n */\n get: function () {\n return ((this.style & PdfFontStyle.Underline) > 0);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfFont.prototype, \"metrics\", {\n /**\n * Gets or sets the `metrics` for this font.\n * @private\n */\n get: function () {\n return this.fontMetrics;\n },\n set: function (value) {\n this.fontMetrics = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfFont.prototype, \"element\", {\n // /**\n // * Gets and Sets the font `internals`.\n // * @private\n // */\n // public get fontInternal() : IPdfPrimitive {\n // return this.pdfFontInternals;\n // }\n // public set fontInternal(value : IPdfPrimitive) {\n // this.pdfFontInternals = value;\n // }\n //IPdfWrapper Members\n /**\n * Gets the `element` representing the font.\n * @private\n */\n get: function () {\n return this.pdfFontInternals;\n },\n enumerable: true,\n configurable: true\n });\n PdfFont.prototype.measureString = function (text, arg2, arg3, arg4, arg5) {\n if (typeof text === 'string' && typeof arg2 === 'undefined') {\n return this.measureString(text, null);\n }\n else if (typeof text === 'string' && (arg2 instanceof PdfStringFormat || arg2 == null) && typeof arg3 === 'undefined' && typeof arg4 === 'undefined') {\n var temparg2 = arg2;\n var charactersFitted = 0;\n var linesFilled = 0;\n return this.measureString(text, temparg2, charactersFitted, linesFilled);\n }\n else if (typeof text === 'string' && (arg2 instanceof PdfStringFormat || arg2 == null) && typeof arg3 === 'number' && typeof arg4 === 'number') {\n var temparg2 = arg2;\n return this.measureString(text, 0, temparg2, arg3, arg4);\n // } else if (typeof text === 'string' && typeof arg2 === 'number' && typeof arg3 === 'undefined') {\n // return this.measureString(text, arg2, null);\n // } else if (typeof text === 'string' && typeof arg2 === 'number' && (arg3 instanceof PdfStringFormat || arg3 == null) && typeof arg4 === 'undefined' && typeof arg5 === 'undefined') {\n // let temparg3 : PdfStringFormat = arg3 as PdfStringFormat;\n // let charactersFitted : number = 0;\n // let linesFilled : number = 0;\n // return this.measureString(text, arg2, temparg3, charactersFitted, linesFilled);\n }\n else if (typeof text === 'string' && typeof arg2 === 'number' && (arg3 instanceof PdfStringFormat || arg3 == null) && typeof arg4 === 'number' && typeof arg5 === 'number') {\n var layoutArea = new SizeF(arg2, 0);\n var temparg3 = arg3;\n return this.measureString(text, layoutArea, temparg3, arg4, arg5);\n // } else if (typeof text === 'string' && arg2 instanceof SizeF && typeof arg3 === 'undefined') {\n // return this.measureString(text, arg2, null);\n // } else if (typeof text === 'string' && arg2 instanceof SizeF && (arg3 instanceof PdfStringFormat || arg3 == null) && typeof arg4 === 'undefined' && typeof arg5 === 'undefined') {\n // let temparg3 : PdfStringFormat = arg3 as PdfStringFormat;\n // let charactersFitted : number = 0;\n // let linesFilled : number = 0;\n // return this.measureString(text, arg2, temparg3, charactersFitted, linesFilled);\n }\n else {\n if (text == null) {\n throw Error(\"ArgumentNullException(\\\"text\\\")\");\n }\n var temparg2 = arg2;\n var temparg3 = arg3;\n var layouter = new PdfStringLayouter();\n var result = layouter.layout(text, this, temparg3, temparg2, false, new SizeF(0, 0));\n // arg4 = (result.Remainder == null) ? text.length : text.length - result.Remainder.length;\n arg4 = text.length;\n arg5 = (result.empty) ? 0 : result.lines.length;\n return result.actualSize;\n }\n };\n /* tslint:enable */\n //IPdfCache Members\n /**\n * `Checks` whether the object is similar to another object.\n * @private\n */\n PdfFont.prototype.equalsTo = function (obj) {\n var result = this.equalsToFont(obj);\n return result;\n };\n /**\n * Returns `internals` of the object.\n * @private\n */\n PdfFont.prototype.getInternals = function () {\n return this.pdfFontInternals;\n };\n /**\n * Sets `internals` to the object.\n * @private\n */\n PdfFont.prototype.setInternals = function (internals) {\n if (internals == null) {\n throw new Error('ArgumentNullException:internals');\n }\n this.pdfFontInternals = internals;\n };\n /**\n * Sets the `style` of the font.\n * @private\n */\n PdfFont.prototype.setStyle = function (style) {\n this.fontStyle = style;\n };\n /**\n * Applies `settings` to the default line width.\n * @private\n */\n PdfFont.prototype.applyFormatSettings = function (line, format, width) {\n // if (line == null) {\n // throw new Error(`ArgumentNullException:line`);\n // }\n var realWidth = width;\n if (format != null && width > 0) {\n // Space among characters is not default.\n if (format.characterSpacing !== 0) {\n realWidth += (line.length - 1) * format.characterSpacing;\n }\n // Space among words is not default.\n if (format.wordSpacing !== 0) {\n var symbols = StringTokenizer.spaces;\n var whitespacesCount = StringTokenizer.getCharsCount(line, symbols);\n realWidth += whitespacesCount * format.wordSpacing;\n }\n }\n return realWidth;\n };\n //Constants\n /**\n * `Multiplier` of the symbol width.\n * @default 0.001\n * @private\n */\n PdfFont.charSizeMultiplier = 0.001;\n /**\n * `Synchronization` object.\n * @private\n */\n PdfFont.syncObject = new Object();\n return PdfFont;\n}());\nexport { PdfFont };\n","/**\n * public Enum for `PdfLayoutType`.\n * @private\n */\nexport var PdfLayoutType;\n(function (PdfLayoutType) {\n /**\n * Specifies the type of `Paginate`.\n * @private\n */\n PdfLayoutType[PdfLayoutType[\"Paginate\"] = 0] = \"Paginate\";\n /**\n * Specifies the type of `OnePage`.\n * @private\n */\n PdfLayoutType[PdfLayoutType[\"OnePage\"] = 1] = \"OnePage\";\n})(PdfLayoutType || (PdfLayoutType = {}));\n/**\n * public Enum for `PdfLayoutBreakType`.\n * @private\n */\nexport var PdfLayoutBreakType;\n(function (PdfLayoutBreakType) {\n /**\n * Specifies the type of `FitPage`.\n * @private\n */\n PdfLayoutBreakType[PdfLayoutBreakType[\"FitPage\"] = 0] = \"FitPage\";\n /**\n * Specifies the type of `FitElement`.\n * @private\n */\n PdfLayoutBreakType[PdfLayoutBreakType[\"FitElement\"] = 1] = \"FitElement\";\n /**\n * Specifies the type of `FitColumnsToPage`.\n * @private\n */\n PdfLayoutBreakType[PdfLayoutBreakType[\"FitColumnsToPage\"] = 2] = \"FitColumnsToPage\";\n})(PdfLayoutBreakType || (PdfLayoutBreakType = {}));\nexport var PathPointType;\n(function (PathPointType) {\n /**\n * Specifies the path point type of `Start`.\n * @private\n */\n PathPointType[PathPointType[\"Start\"] = 0] = \"Start\";\n /**\n * Specifies the path point type of `Line`.\n * @private\n */\n PathPointType[PathPointType[\"Line\"] = 1] = \"Line\";\n /**\n * Specifies the path point type of `Bezier3`.\n * @private\n */\n PathPointType[PathPointType[\"Bezier3\"] = 3] = \"Bezier3\";\n /**\n * Specifies the path point type of `Bezier`.\n * @private\n */\n PathPointType[PathPointType[\"Bezier\"] = 3] = \"Bezier\";\n /**\n * Specifies the path point type of `PathTypeMask`.\n * @private\n */\n PathPointType[PathPointType[\"PathTypeMask\"] = 7] = \"PathTypeMask\";\n /**\n * Specifies the path point type of `DashMode`.\n * @private\n */\n PathPointType[PathPointType[\"DashMode\"] = 16] = \"DashMode\";\n /**\n * Specifies the path point type of `PathMarker`.\n * @private\n */\n PathPointType[PathPointType[\"PathMarker\"] = 32] = \"PathMarker\";\n /**\n * Specifies the path point type of `CloseSubpath`.\n * @private\n */\n PathPointType[PathPointType[\"CloseSubpath\"] = 128] = \"CloseSubpath\";\n})(PathPointType || (PathPointType = {}));\n","/**\n * PdfTransformationMatrix.ts class for EJ2-PDF\n */\nimport { PointF } from './../drawing/pdf-drawing';\nimport { PdfNumber } from './../primitives/pdf-number';\n/**\n * Class for representing Root `transformation matrix`.\n */\nvar PdfTransformationMatrix = /** @class */ (function () {\n function PdfTransformationMatrix(value) {\n /**\n * Value for `angle converting`.\n * @default 180.0 / Math.PI\n * @private\n */\n this.radDegFactor = 180.0 / Math.PI;\n if (typeof value === 'undefined') {\n this.transformationMatrix = new Matrix(1.00, 0.00, 0.00, 1.00, 0.00, 0.00);\n }\n else {\n this.transformationMatrix = new Matrix(1.00, 0.00, 0.00, -1.00, 0.00, 0.00);\n }\n }\n Object.defineProperty(PdfTransformationMatrix.prototype, \"matrix\", {\n // Properties\n /**\n * Gets or sets the `internal matrix object`.\n * @private\n */\n get: function () {\n return this.transformationMatrix;\n },\n set: function (value) {\n this.transformationMatrix = value;\n },\n enumerable: true,\n configurable: true\n });\n // Public methods\n /**\n * `Translates` coordinates by specified coordinates.\n * @private\n */\n PdfTransformationMatrix.prototype.translate = function (offsetX, offsetY) {\n this.transformationMatrix.translate(offsetX, offsetY);\n };\n /**\n * `Scales` coordinates by specified coordinates.\n * @private\n */\n PdfTransformationMatrix.prototype.scale = function (scaleX, scaleY) {\n this.transformationMatrix.elements[0] = scaleX;\n this.transformationMatrix.elements[3] = scaleY;\n };\n /**\n * `Rotates` coordinate system in counterclockwise direction.\n * @private\n */\n PdfTransformationMatrix.prototype.rotate = function (angle) {\n //Convert from degree to radian \n angle = (angle * Math.PI) / 180;\n //Rotation \n this.transformationMatrix.elements[0] = Math.cos(angle);\n this.transformationMatrix.elements[1] = Math.sin(angle);\n this.transformationMatrix.elements[2] = -Math.sin(angle);\n this.transformationMatrix.elements[3] = Math.cos(angle);\n };\n // Overrides\n /**\n * Gets `PDF representation`.\n * @private\n */\n PdfTransformationMatrix.prototype.toString = function () {\n var builder = '';\n var whitespace = ' ';\n for (var i = 0, len = this.transformationMatrix.elements.length; i < len; i++) {\n var temp = this.matrix.elements[i];\n builder += PdfNumber.floatToString(this.transformationMatrix.elements[i]);\n builder += whitespace;\n }\n return builder;\n };\n // Implementation\n /**\n * `Multiplies` matrices (changes coordinate system.)\n * @private\n */\n PdfTransformationMatrix.prototype.multiply = function (matrix) {\n this.transformationMatrix.multiply(matrix.matrix);\n };\n /**\n * Converts `degrees to radians`.\n * @private\n */\n PdfTransformationMatrix.degreesToRadians = function (degreesX) {\n return this.degRadFactor * degreesX;\n };\n /**\n * Converts `radians to degrees`.\n * @private\n */\n PdfTransformationMatrix.prototype.radiansToDegrees = function (radians) {\n return this.radDegFactor * radians;\n };\n /**\n * `Clones` this instance of PdfTransformationMatrix.\n * @private\n */\n PdfTransformationMatrix.prototype.clone = function () {\n return this;\n };\n // Constants\n /**\n * Value for `angle converting`.\n * @default Math.PI / 180.0\n * @private\n */\n PdfTransformationMatrix.degRadFactor = Math.PI / 180.0;\n return PdfTransformationMatrix;\n}());\nexport { PdfTransformationMatrix };\nvar Matrix = /** @class */ (function () {\n function Matrix(arg1, arg2, arg3, arg4, arg5, arg6) {\n if (typeof arg1 === 'undefined') {\n this.metrixElements = [];\n }\n else if (typeof arg1 === 'number') {\n this.metrixElements = [];\n this.metrixElements.push(arg1);\n this.metrixElements.push(arg2);\n this.metrixElements.push(arg3);\n this.metrixElements.push(arg4);\n this.metrixElements.push(arg5);\n this.metrixElements.push(arg6);\n }\n else {\n this.metrixElements = arg1;\n }\n }\n Object.defineProperty(Matrix.prototype, \"elements\", {\n // Properties\n /**\n * Gets the `elements`.\n * @private\n */\n get: function () {\n return this.metrixElements;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Matrix.prototype, \"offsetX\", {\n /**\n * Gets the off set `X`.\n * @private\n */\n get: function () {\n return this.metrixElements[4];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Matrix.prototype, \"offsetY\", {\n /**\n * Gets the off set `Y`.\n * @private\n */\n get: function () {\n return this.metrixElements[5];\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * `Translates` coordinates by specified coordinates.\n * @private\n */\n Matrix.prototype.translate = function (offsetX, offsetY) {\n this.metrixElements[4] = offsetX;\n this.metrixElements[5] = offsetY;\n };\n /**\n * `Translates` the specified offset X.\n * @private\n */\n Matrix.prototype.transform = function (point) {\n var x = point.x;\n var y = point.y;\n var x2 = x * this.elements[0] + y * this.elements[2] + this.offsetX;\n var y2 = x * this.elements[1] + y * this.elements[3] + this.offsetY;\n return new PointF(x2, y2);\n };\n /**\n * `Multiplies matrices` (changes coordinate system.)\n * @private\n */\n Matrix.prototype.multiply = function (matrix) {\n var tempMatrix = [];\n tempMatrix.push(this.elements[0] * matrix.elements[0] + this.elements[1] * matrix.elements[2]);\n tempMatrix[1] = (this.elements[0] * matrix.elements[1] + this.elements[1] * matrix.elements[3]);\n tempMatrix[2] = (this.elements[2] * matrix.elements[0] + this.elements[3] * matrix.elements[2]);\n tempMatrix[3] = (this.elements[2] * matrix.elements[1] + this.elements[3] * matrix.elements[3]);\n tempMatrix[4] = (this.offsetX * matrix.elements[0] + this.offsetY * matrix.elements[2] + matrix.offsetX);\n tempMatrix[5] = (this.offsetX * matrix.elements[1] + this.offsetY * matrix.elements[3] + matrix.offsetY);\n for (var i = 0; i < tempMatrix.length; i++) {\n this.elements[i] = tempMatrix[i];\n }\n };\n // IDisposable Members\n /**\n * `Dispose` this instance of PdfTransformationMatrix class.\n * @private\n */\n Matrix.prototype.dispose = function () {\n this.metrixElements = null;\n };\n // ICloneable Members\n /**\n * `Clones` this instance of PdfTransformationMatrix class.\n * @private\n */\n Matrix.prototype.clone = function () {\n var m = new Matrix(this.metrixElements);\n return m;\n };\n return Matrix;\n}());\nexport { Matrix };\n","/**\n * `constants.ts` class for EJ2-PDF\n * @private\n */\nvar ProcedureSets = /** @class */ (function () {\n function ProcedureSets() {\n /**\n * Specifies the `PDF` procedure set.\n * @private\n */\n this.pdf = 'PDF';\n /**\n * Specifies the `Text` procedure set.\n * @private\n */\n this.text = 'Text';\n /**\n * Specifies the `ImageB` procedure set.\n * @private\n */\n this.imageB = 'ImageB';\n /**\n * Specifies the `ImageC` procedure set.\n * @private\n */\n this.imageC = 'ImageC';\n /**\n * Specifies the `ImageI` procedure set.\n * @private\n */\n this.imageI = 'ImageI';\n }\n return ProcedureSets;\n}());\nexport { ProcedureSets };\n","/**\n * Dictionary class\n * @private\n * @hidden\n */\nvar TemporaryDictionary = /** @class */ (function () {\n function TemporaryDictionary() {\n /**\n * @hidden\n * @private\n */\n this.mKeys = [];\n /**\n * @hidden\n * @private\n */\n this.mValues = [];\n }\n /**\n * @hidden\n * @private\n */\n TemporaryDictionary.prototype.size = function () {\n return this.mKeys.length;\n };\n /**\n * @hidden\n * @private\n */\n TemporaryDictionary.prototype.add = function (key, value) {\n if (key === undefined || key === null || value === undefined || value === null) {\n throw new ReferenceError('Provided key or value is not valid.');\n }\n var index = this.mKeys.indexOf(key);\n if (index < 0) {\n this.mKeys.push(key);\n this.mValues.push(value);\n return 1;\n }\n else {\n throw new RangeError('An item with the same key has already been added.');\n }\n };\n /**\n * @hidden\n * @private\n */\n TemporaryDictionary.prototype.keys = function () {\n return this.mKeys;\n };\n /**\n * @hidden\n * @private\n */\n TemporaryDictionary.prototype.values = function () {\n return this.mValues;\n };\n /**\n * @hidden\n * @private\n */\n TemporaryDictionary.prototype.getValue = function (key) {\n if (key === undefined || key === null) {\n throw new ReferenceError('Provided key is not valid.');\n }\n var index = this.mKeys.indexOf(key);\n if (index < 0) {\n throw new RangeError('No item with the specified key has been added.');\n }\n else {\n return this.mValues[index];\n }\n };\n /**\n * @hidden\n * @private\n */\n TemporaryDictionary.prototype.setValue = function (key, value) {\n if (key === undefined || key === null) {\n throw new ReferenceError('Provided key is not valid.');\n }\n var index = this.mKeys.indexOf(key);\n if (index < 0) {\n this.mKeys.push(key);\n this.mValues.push(value);\n }\n else {\n this.mValues[index] = value;\n }\n };\n /**\n * @hidden\n * @private\n */\n TemporaryDictionary.prototype.remove = function (key) {\n if (key === undefined || key === null) {\n throw new ReferenceError('Provided key is not valid.');\n }\n var index = this.mKeys.indexOf(key);\n if (index < 0) {\n throw new RangeError('No item with the specified key has been added.');\n }\n else {\n this.mKeys.splice(index, 1);\n this.mValues.splice(index, 1);\n return true;\n }\n };\n /**\n * @hidden\n * @private\n */\n TemporaryDictionary.prototype.containsKey = function (key) {\n if (key === undefined || key === null) {\n throw new ReferenceError('Provided key is not valid.');\n }\n var index = this.mKeys.indexOf(key);\n if (index < 0) {\n return false;\n }\n return true;\n };\n /**\n * @hidden\n * @private\n */\n TemporaryDictionary.prototype.clear = function () {\n this.mKeys = [];\n this.mValues = [];\n };\n return TemporaryDictionary;\n}());\nexport { TemporaryDictionary };\n","import { PdfDictionary } from './../primitives/pdf-dictionary';\nimport { PdfNumber } from './../primitives/pdf-number';\nimport { PdfName } from './../primitives/pdf-name';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\n/**\n * Represents a simple `transparency`.\n * @private\n */\nvar PdfTransparency = /** @class */ (function () {\n // Properties\n // /**\n // * Gets the `stroke` operation alpha value.\n // * @private\n // */\n // public get stroke() : number {\n // let result : number = this.getNumber(this.dictionaryProperties.CA);\n // return result;\n // }\n // /**\n // * Gets the `fill` operation alpha value.\n // * @private\n // */\n // public get fill() : number {\n // let result : number = this.getNumber(this.dictionaryProperties.ca);\n // return result;\n // }\n // /**\n // * Gets the `blend mode`.\n // * @private\n // */\n // public get mode() : PdfBlendMode {\n // let result : string = this.getName(this.dictionaryProperties.ca);\n // return PdfBlendMode.Normal;\n // }\n // Constructors\n /**\n * Initializes a new instance of the `Transparency` class.\n * @private\n */\n function PdfTransparency(stroke, fill, mode) {\n // Fields\n /**\n * Internal variable to store `dictionary`.\n * @default new PdfDictionary()\n * @private\n */\n this.dictionary = new PdfDictionary();\n /**\n * Internal variable for accessing fields from `DictionryProperties` class.\n * @default new DictionaryProperties()\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n this.dictionary.items.setValue(this.dictionaryProperties.CA, new PdfNumber(stroke));\n this.dictionary.items.setValue(this.dictionaryProperties.ca, new PdfNumber(fill));\n this.dictionary.items.setValue(this.dictionaryProperties.BM, new PdfName(mode.toString()));\n }\n Object.defineProperty(PdfTransparency.prototype, \"element\", {\n // // Implementation\n // /**\n // * Gets the `number value`.\n // * @private\n // */\n // private getNumber(keyName : string) : number {\n // let result : number = 0.0;\n // let numb : PdfNumber = this.dictionary.items.getValue(keyName) as PdfNumber;\n // result = numb.intValue;\n // return result;\n // }\n // /**\n // * Gets the `name value`.\n // * @private\n // */\n // private getName(keyName : string) : string {\n // let result : string = null;\n // let name : PdfName = this.dictionary.items.getValue(keyName) as PdfName;\n // result = name.value;\n // return result;\n // }\n // IPdfWrapper Members\n /**\n * Gets the `element`.\n * @private\n */\n get: function () {\n return this.dictionary;\n },\n enumerable: true,\n configurable: true\n });\n return PdfTransparency;\n}());\nexport { PdfTransparency };\n","/**\n * Represent a `collection of automatic fields information`.\n * @private\n */\nvar PdfAutomaticFieldInfoCollection = /** @class */ (function () {\n /**\n * Initializes a new instance of the 'PdfPageNumberFieldInfoCollection' class.\n * @private\n */\n function PdfAutomaticFieldInfoCollection() {\n /**\n * Internal variable to store instance of `pageNumberFields` class.\n * @private\n */\n this.automaticFieldsInformation = [];\n //\n }\n Object.defineProperty(PdfAutomaticFieldInfoCollection.prototype, \"automaticFields\", {\n /**\n * Gets the `page number fields collection`.\n * @private\n */\n get: function () {\n return this.automaticFieldsInformation;\n },\n enumerable: true,\n configurable: true\n });\n // Public methods\n /// Adds the specified field info.\n /**\n * Add page number field into collection.\n * @private\n */\n PdfAutomaticFieldInfoCollection.prototype.add = function (fieldInfo) {\n return this.automaticFields.push(fieldInfo);\n };\n return PdfAutomaticFieldInfoCollection;\n}());\nexport { PdfAutomaticFieldInfoCollection };\n","/**\n * Represents a base class for all page graphics elements.\n */\nvar PdfGraphicsElement = /** @class */ (function () {\n // Constructors\n function PdfGraphicsElement() {\n //\n }\n /**\n * `Draws` the page number field.\n * @public\n */\n PdfGraphicsElement.prototype.drawHelper = function (graphics, x, y) {\n var bNeedSave = (x !== 0 || y !== 0);\n var gState = null;\n // Translate co-ordinates.\n if (bNeedSave) {\n // Save state.\n gState = graphics.save();\n graphics.translateTransform(x, y);\n }\n this.drawInternal(graphics);\n if (bNeedSave) {\n // Restore state.\n graphics.restore(gState);\n }\n };\n return PdfGraphicsElement;\n}());\nexport { PdfGraphicsElement };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfAutomaticField.ts class for EJ2-PDF\n */\nimport { RectangleF, SizeF, PointF } from './../../drawing/pdf-drawing';\nimport { PdfSolidBrush } from './../../graphics/brushes/pdf-solid-brush';\nimport { PdfColor } from './../../graphics/pdf-color';\nimport { PdfDocument } from './../pdf-document';\nimport { PdfGraphicsElement } from './../../graphics/figures/base/graphics-element';\nimport { PdfAutomaticFieldInfo } from './automatic-field-info';\n/**\n * Represents a fields which is calculated before the document saves.\n */\nvar PdfAutomaticField = /** @class */ (function (_super) {\n __extends(PdfAutomaticField, _super);\n // Constructors\n function PdfAutomaticField() {\n var _this = _super.call(this) || this;\n // Fields\n _this.internalBounds = new RectangleF(0, 0, 0, 0);\n _this.internalTemplateSize = new SizeF(0, 0);\n return _this;\n }\n Object.defineProperty(PdfAutomaticField.prototype, \"bounds\", {\n // Properties\n get: function () {\n return this.internalBounds;\n },\n set: function (value) {\n this.internalBounds = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAutomaticField.prototype, \"size\", {\n get: function () {\n return new SizeF(this.bounds.width, this.bounds.height);\n },\n set: function (value) {\n this.bounds.width = value.width;\n this.bounds.height = value.height;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAutomaticField.prototype, \"location\", {\n get: function () {\n return new PointF(this.bounds.x, this.bounds.y);\n },\n set: function (value) {\n this.bounds.x = value.x;\n this.bounds.y = value.y;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAutomaticField.prototype, \"font\", {\n get: function () {\n return this.internalFont;\n },\n set: function (value) {\n this.internalFont = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAutomaticField.prototype, \"brush\", {\n get: function () {\n return this.internalBrush;\n },\n set: function (value) {\n this.internalBrush = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAutomaticField.prototype, \"pen\", {\n get: function () {\n return this.internalPen;\n },\n set: function (value) {\n this.internalPen = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAutomaticField.prototype, \"stringFormat\", {\n get: function () {\n return this.internalStringFormat;\n },\n set: function (value) {\n this.internalStringFormat = value;\n },\n enumerable: true,\n configurable: true\n });\n PdfAutomaticField.prototype.performDrawHelper = function (graphics, location, scalingX, scalingY) {\n if (this.bounds.height === 0 || this.bounds.width === 0) {\n var text = this.getValue(graphics);\n this.internalTemplateSize = this.getFont().measureString(text, this.size, this.stringFormat);\n }\n };\n PdfAutomaticField.prototype.draw = function (arg1, arg2, arg3) {\n if (typeof arg2 === 'undefined') {\n var location_1 = new PointF(0, 0);\n this.draw(arg1, location_1);\n }\n else if (arg2 instanceof PointF) {\n this.draw(arg1, arg2.x, arg2.y);\n }\n else {\n this.drawHelper(arg1, arg2, arg3);\n var info = new PdfAutomaticFieldInfo(this, new PointF(arg2, arg3));\n arg1.automaticFields.add(info);\n }\n };\n PdfAutomaticField.prototype.getSize = function () {\n if (this.bounds.height === 0 || this.bounds.width === 0) {\n return this.internalTemplateSize;\n }\n else {\n return this.size;\n }\n };\n PdfAutomaticField.prototype.drawInternal = function (graphics) {\n //\n };\n /* tslint:disable */\n PdfAutomaticField.prototype.getBrush = function () {\n return (typeof this.internalBrush === 'undefined' || this.internalBrush == null) ? new PdfSolidBrush(new PdfColor(0, 0, 0)) : this.internalBrush;\n };\n PdfAutomaticField.prototype.getFont = function () {\n return (typeof this.internalFont === 'undefined' || this.internalFont == null) ? PdfDocument.defaultFont : this.internalFont;\n };\n /* tslint:enable */\n PdfAutomaticField.prototype.getPageFromGraphics = function (graphics) {\n if (typeof graphics.page !== 'undefined' && graphics.page !== null) {\n var page = graphics.page;\n return page;\n }\n else {\n var page = graphics.currentPage;\n return page;\n }\n };\n return PdfAutomaticField;\n}(PdfGraphicsElement));\nexport { PdfAutomaticField };\n","/**\n * PdfAutomaticFieldInfo.ts class for EJ2-PDF\n * @private\n */\nimport { PointF } from './../../drawing/pdf-drawing';\nimport { PdfAutomaticField } from './automatic-field';\n/**\n * Represents information about the automatic field.\n * @private\n */\nvar PdfAutomaticFieldInfo = /** @class */ (function () {\n function PdfAutomaticFieldInfo(field, location, scaleX, scaleY) {\n // Fields\n /**\n * Internal variable to store location of the field.\n * @private\n */\n this.pageNumberFieldLocation = new PointF();\n /**\n * Internal variable to store field.\n * @private\n */\n this.pageNumberField = null;\n /**\n * Internal variable to store x scaling factor.\n * @private\n */\n this.scaleX = 1;\n /**\n * Internal variable to store y scaling factor.\n * @private\n */\n this.scaleY = 1;\n if (typeof location === 'undefined' && field instanceof PdfAutomaticFieldInfo) {\n this.pageNumberField = field.field;\n this.pageNumberFieldLocation = field.location;\n this.scaleX = field.scalingX;\n this.scaleY = field.scalingY;\n }\n else if (typeof scaleX === 'undefined' && location instanceof PointF && field instanceof PdfAutomaticField) {\n this.pageNumberField = field;\n this.pageNumberFieldLocation = location;\n }\n else {\n this.pageNumberField = field;\n this.pageNumberFieldLocation = location;\n this.scaleX = scaleX;\n this.scaleY = scaleY;\n }\n }\n Object.defineProperty(PdfAutomaticFieldInfo.prototype, \"location\", {\n /* tslint:enable */\n // Properties\n /**\n * Gets or sets the location.\n * @private\n */\n get: function () {\n return this.pageNumberFieldLocation;\n },\n set: function (value) {\n this.pageNumberFieldLocation = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAutomaticFieldInfo.prototype, \"field\", {\n /**\n * Gets or sets the field.\n * @private\n */\n get: function () {\n return this.pageNumberField;\n },\n set: function (value) {\n this.pageNumberField = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAutomaticFieldInfo.prototype, \"scalingX\", {\n /**\n * Gets or sets the scaling X factor.\n * @private\n */\n get: function () {\n return this.scaleX;\n },\n set: function (value) {\n this.scaleX = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAutomaticFieldInfo.prototype, \"scalingY\", {\n /**\n * Gets or sets the scaling Y factor.\n * @private\n */\n get: function () {\n return this.scaleY;\n },\n set: function (value) {\n this.scaleY = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfAutomaticFieldInfo;\n}());\nexport { PdfAutomaticFieldInfo };\n","/**\n * ByteArray class\n * Used to keep information about image stream as byte array.\n * @private\n */\nvar ByteArray = /** @class */ (function () {\n /**\n * Initialize the new instance for `byte-array` class\n * @hidden\n * @private\n */\n function ByteArray(length) {\n /**\n * Current stream `position`.\n * @default 0\n * @private\n */\n this.mPosition = 0;\n this.buffer = new Uint8Array(length);\n this.dataView = new DataView(this.buffer.buffer);\n }\n Object.defineProperty(ByteArray.prototype, \"position\", {\n /**\n * Gets and Sets a current `position` of byte array.\n * @hidden\n * @private\n */\n get: function () {\n return this.mPosition;\n },\n set: function (value) {\n this.mPosition = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Read` from current stream position.\n * @default 0\n * @hidden\n * @private\n */\n ByteArray.prototype.read = function (buffer, offset, count) {\n for (var index = offset; index < count; index++) {\n var position = this.position;\n buffer.buffer[index] = this.readByte(position);\n this.position++;\n }\n };\n /**\n * @hidden\n */\n ByteArray.prototype.getBuffer = function (index) {\n return this.buffer[index];\n };\n /**\n * @hidden\n */\n ByteArray.prototype.writeFromBase64String = function (base64) {\n var arr = this.encodedString(base64);\n this.buffer = arr;\n };\n /**\n * @hidden\n */\n ByteArray.prototype.encodedString = function (input) {\n var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var chr1;\n var chr2;\n var chr3;\n var enc1;\n var enc2;\n var enc3;\n var enc4;\n var i = 0;\n var resultIndex = 0;\n var dataUrlPrefix = 'data:';\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, '');\n var totalLength = input.length * 3 / 4;\n if (input.charAt(input.length - 1) === keyStr.charAt(64)) {\n totalLength--;\n }\n var output = new Uint8Array(totalLength | 0);\n while (i < input.length) {\n enc1 = keyStr.indexOf(input.charAt(i++));\n enc2 = keyStr.indexOf(input.charAt(i++));\n enc3 = keyStr.indexOf(input.charAt(i++));\n enc4 = keyStr.indexOf(input.charAt(i++));\n chr1 = (enc1 << 2) | (enc2 >> 4);\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n chr3 = ((enc3 & 3) << 6) | enc4;\n output[resultIndex++] = chr1;\n output[resultIndex++] = chr2;\n output[resultIndex++] = chr3;\n }\n return output;\n };\n /**\n * @hidden\n */\n ByteArray.prototype.readByte = function (offset) {\n return (this.buffer[offset]);\n };\n Object.defineProperty(ByteArray.prototype, \"internalBuffer\", {\n /**\n * @hidden\n */\n get: function () {\n return this.buffer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ByteArray.prototype, \"count\", {\n /**\n * @hidden\n */\n get: function () {\n return this.buffer.byteLength;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * 'readNextTwoBytes' stream\n * @hidden\n * @private\n */\n ByteArray.prototype.readNextTwoBytes = function (stream) {\n var data = stream.readByte(this.position);\n this.position++;\n data <<= 8;\n data |= stream.readByte(this.position);\n this.position++;\n return data;\n };\n return ByteArray;\n}());\nexport { ByteArray };\n","/**\n * TtfTableInfo.ts class for EJ2-PDF\n */\nvar TtfTableInfo = /** @class */ (function () {\n function TtfTableInfo() {\n }\n Object.defineProperty(TtfTableInfo.prototype, \"empty\", {\n //Properties\n /**\n * Gets a value indicating whether this table is empty.\n * @private\n */\n get: function () {\n var empty = (this.offset === this.length && this.length === this.checksum && this.checksum === 0);\n return empty;\n },\n enumerable: true,\n configurable: true\n });\n return TtfTableInfo;\n}());\nexport { TtfTableInfo };\n","var TtfNameTable = /** @class */ (function () {\n function TtfNameTable() {\n }\n return TtfNameTable;\n}());\nexport { TtfNameTable };\n","/**\n * TtfNameRecord.ts class for EJ2-PDF\n */\nvar TtfNameRecord = /** @class */ (function () {\n function TtfNameRecord() {\n }\n return TtfNameRecord;\n}());\nexport { TtfNameRecord };\n","/**\n * TtfHeadTable.ts class for EJ2-PDF\n */\nvar TtfHeadTable = /** @class */ (function () {\n function TtfHeadTable() {\n }\n return TtfHeadTable;\n}());\nexport { TtfHeadTable };\n","var TtfMetrics = /** @class */ (function () {\n function TtfMetrics() {\n }\n Object.defineProperty(TtfMetrics.prototype, \"isItalic\", {\n //Properties\n /**\n * Gets a value indicating whether this instance is italic.\n */\n get: function () {\n return ((this.macStyle & 2) !== 0);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TtfMetrics.prototype, \"isBold\", {\n /**\n * Gets a value indicating whether this instance is bold.\n */\n get: function () {\n return ((this.macStyle & 1) !== 0);\n },\n enumerable: true,\n configurable: true\n });\n return TtfMetrics;\n}());\nexport { TtfMetrics };\n","/**\n * TtfHorizontalHeaderTable.ts class for EJ2-PDF\n */\nvar TtfHorizontalHeaderTable = /** @class */ (function () {\n function TtfHorizontalHeaderTable() {\n }\n return TtfHorizontalHeaderTable;\n}());\nexport { TtfHorizontalHeaderTable };\n","/**\n * TtfOS2Table.ts class for EJ2-PDF\n * The OS/2 table consists of a set of metrics that are required by Windows and OS/2.\n */\nvar TtfOS2Table = /** @class */ (function () {\n function TtfOS2Table() {\n }\n return TtfOS2Table;\n}());\nexport { TtfOS2Table };\n","/**\n * TtfPostTable.ts class for EJ2-PDF\n */\nvar TtfPostTable = /** @class */ (function () {\n function TtfPostTable() {\n }\n return TtfPostTable;\n}());\nexport { TtfPostTable };\n","/**\n * TtfLongHorMetric.ts class for EJ2-PDF\n */\nvar TtfLongHorMetric = /** @class */ (function () {\n function TtfLongHorMetric() {\n }\n return TtfLongHorMetric;\n}());\nexport { TtfLongHorMetric };\n","/**\n * TtfCmapSubTable.ts class for EJ2-PDF\n */\nvar TtfCmapSubTable = /** @class */ (function () {\n function TtfCmapSubTable() {\n }\n return TtfCmapSubTable;\n}());\nexport { TtfCmapSubTable };\n","/**\n * TtfCmapTable.ts class for EJ2-PDF\n */\nvar TtfCmapTable = /** @class */ (function () {\n function TtfCmapTable() {\n }\n return TtfCmapTable;\n}());\nexport { TtfCmapTable };\n","/**\n * TtfGlyphInfo.ts class for EJ2-PDF\n */\nvar TtfGlyphInfo = /** @class */ (function () {\n function TtfGlyphInfo() {\n }\n Object.defineProperty(TtfGlyphInfo.prototype, \"empty\", {\n //Properties\n /**\n * Gets a value indicating whether this TtfGlyphInfo is empty.\n */\n get: function () {\n var empty = (this.index === this.width && this.width === this.charCode && this.charCode === 0);\n return empty;\n },\n enumerable: true,\n configurable: true\n });\n //IComparable implementation\n /**\n * Compares two WidthDescriptor objects.\n */\n TtfGlyphInfo.prototype.compareTo = function (obj) {\n var glyph = obj;\n return this.index - glyph.index;\n };\n return TtfGlyphInfo;\n}());\nexport { TtfGlyphInfo };\n","/**\n * TtfLocaTable.ts class for EJ2-PDF\n */\nvar TtfLocaTable = /** @class */ (function () {\n function TtfLocaTable() {\n }\n return TtfLocaTable;\n}());\nexport { TtfLocaTable };\n","/**\n * TtfAppleCmapSubTable.ts class for EJ2-PDF\n */\nvar TtfAppleCmapSubTable = /** @class */ (function () {\n function TtfAppleCmapSubTable() {\n }\n return TtfAppleCmapSubTable;\n}());\nexport { TtfAppleCmapSubTable };\n","/**\n * TtfMicrosoftCmapSubTable.ts class for EJ2-PDF\n */\nvar TtfMicrosoftCmapSubTable = /** @class */ (function () {\n function TtfMicrosoftCmapSubTable() {\n }\n return TtfMicrosoftCmapSubTable;\n}());\nexport { TtfMicrosoftCmapSubTable };\n","/**\n * TtfTrimmedCmapSubTable.ts class for EJ2-PDF\n */\nvar TtfTrimmedCmapSubTable = /** @class */ (function () {\n function TtfTrimmedCmapSubTable() {\n }\n return TtfTrimmedCmapSubTable;\n}());\nexport { TtfTrimmedCmapSubTable };\n","/**\n * TtfLocaTable.ts class for EJ2-PDF\n */\nvar TtfGlyphHeader = /** @class */ (function () {\n function TtfGlyphHeader() {\n }\n return TtfGlyphHeader;\n}());\nexport { TtfGlyphHeader };\n","/**\n * Writes data in BigEndian order.\n */\nvar BigEndianWriter = /** @class */ (function () {\n //Constructors\n /**\n * Creates a new writer.\n */\n function BigEndianWriter(capacity) {\n //Constants\n /**\n * Size of Int32 type.\n */\n this.int32Size = 4;\n /**\n * Size of Int16 type.\n */\n this.int16Size = 2;\n /**\n * Size of long type.\n */\n this.int64Size = 8;\n this.bufferLength = capacity;\n this.buffer = [];\n }\n Object.defineProperty(BigEndianWriter.prototype, \"data\", {\n //Properties\n /**\n * Gets data written to the writer.\n */\n get: function () {\n if (this.buffer.length < this.bufferLength) {\n var length_1 = this.bufferLength - this.buffer.length;\n for (var i = 0; i < length_1; i++) {\n this.buffer.push(0);\n }\n }\n return this.buffer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BigEndianWriter.prototype, \"position\", {\n /// \n /// Gets position of the internal buffer.\n /// \n get: function () {\n if (this.internalPosition === undefined || this.internalPosition === null) {\n this.internalPosition = 0;\n }\n return this.internalPosition;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Writes short value.\n */\n BigEndianWriter.prototype.writeShort = function (value) {\n var bytes = [((value & 0x0000ff00) >> 8), value & 0x000000ff];\n this.flush(bytes);\n };\n /**\n * Writes int value.\n */\n BigEndianWriter.prototype.writeInt = function (value) {\n var i1 = (value & 0xff000000) >> 24;\n i1 = i1 < 0 ? 256 + i1 : i1;\n var i2 = (value & 0x00ff0000) >> 16;\n i2 = i2 < 0 ? 256 + i2 : i2;\n var i3 = (value & 0x0000ff00) >> 8;\n i3 = i3 < 0 ? 256 + i3 : i3;\n var i4 = value & 0x000000ff;\n i4 = i4 < 0 ? 256 + i4 : i4;\n var bytes = [(value & 0xff000000) >> 24, (value & 0x00ff0000) >> 16, (value & 0x0000ff00) >> 8, value & 0x000000ff];\n this.flush(bytes);\n };\n /**\n * Writes u int value.\n */\n BigEndianWriter.prototype.writeUInt = function (value) {\n var buff = [(value & 0xff000000) >> 24, (value & 0x00ff0000) >> 16, (value & 0x0000ff00) >> 8, value & 0x000000ff];\n this.flush(buff);\n };\n /**\n * Writes string value.\n */\n BigEndianWriter.prototype.writeString = function (value) {\n if (value == null) {\n throw new Error('Argument Null Exception : value');\n }\n var bytes = [];\n for (var i = 0; i < value.length; i++) {\n bytes.push(value.charCodeAt(i));\n }\n this.flush(bytes);\n };\n /**\n * Writes byte[] value.\n */\n BigEndianWriter.prototype.writeBytes = function (value) {\n this.flush(value);\n };\n // //Implementation\n BigEndianWriter.prototype.flush = function (buff) {\n if (buff === null) {\n throw new Error('Argument Null Exception : buff');\n }\n var position = this.position;\n for (var i = 0; i < buff.length; i++) {\n this.buffer[position] = buff[i];\n position++;\n }\n this.internalPosition += buff.length;\n };\n return BigEndianWriter;\n}());\nexport { BigEndianWriter };\n","/**\n * TtfReader.ts class for EJ2-PDF\n */\nimport { TtfTableInfo } from './ttf-table-info';\nimport { Dictionary } from './../../collections/dictionary';\nimport { TtfNameTable } from './ttf-name-table';\nimport { TtfNameRecord } from './ttf-name-record';\nimport { TtfHeadTable } from './ttf-head-table';\nimport { TtfMetrics } from './ttf-metrics';\nimport { TtfHorizontalHeaderTable } from './ttf-horizontal-header-table';\nimport { TtfOS2Table } from './ttf-OS2-Table';\nimport { TtfPostTable } from './ttf-post-table';\nimport { TtfLongHorMetric } from './ttf-long-hor-metric';\nimport { TtfCmapSubTable } from './ttf-cmap-sub-table';\nimport { TtfCmapTable } from './ttf-cmap-table';\nimport { TtfGlyphInfo } from './ttf-glyph-info';\nimport { TtfLocaTable } from './ttf-loca-table';\nimport { TtfAppleCmapSubTable } from './ttf-apple-cmap-sub-table';\nimport { TtfMicrosoftCmapSubTable } from './ttf-microsoft-cmap-sub-table';\nimport { TtfTrimmedCmapSubTable } from './ttf-trimmed-cmap-sub-table';\nimport { TtfGlyphHeader } from './ttf-glyph-header';\nimport { Rectangle } from './../../drawing/pdf-drawing';\nimport { StringTokenizer } from './string-tokenizer';\nimport { TtfCmapFormat, TtfCmapEncoding, TtfPlatformID } from './enum';\nimport { TtfMicrosoftEncodingID, TtfMacintoshEncodingID, TtfCompositeGlyphFlags } from './enum';\nimport { BigEndianWriter } from './../../input-output/big-endian-writer';\nvar TtfReader = /** @class */ (function () {\n //Constructors\n function TtfReader(fontData) {\n this.int32Size = 4;\n this.isTtcFont = false;\n this.isMacTtf = false;\n this.metricsName = '';\n this.isMacTTF = false;\n this.missedGlyphs = 0;\n this.tableNames = ['cvt ', 'fpgm', 'glyf', 'head', 'hhea', 'hmtx', 'loca', 'maxp', 'prep'];\n this.entrySelectors = [0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4];\n this.fontData = fontData;\n this.initialize();\n }\n Object.defineProperty(TtfReader.prototype, \"macintosh\", {\n //Properties\n /**\n * Gets glyphs for Macintosh or Symbol fonts (char - key, glyph - value).\n */\n get: function () {\n if (this.macintoshDictionary === null || this.macintoshDictionary === undefined) {\n this.macintoshDictionary = new Dictionary();\n }\n return this.macintoshDictionary;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TtfReader.prototype, \"microsoft\", {\n /**\n * Gets glyphs for Microsoft or Symbol fonts (char - key, glyph - value).\n */\n get: function () {\n if (this.microsoftDictionary === null || this.microsoftDictionary === undefined) {\n this.microsoftDictionary = new Dictionary();\n }\n return this.microsoftDictionary;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TtfReader.prototype, \"macintoshGlyphs\", {\n /**\n * Gets glyphs for Macintosh or Symbol fonts (glyph index - key, glyph - value).\n */\n get: function () {\n if (this.internalMacintoshGlyphs === null || this.internalMacintoshGlyphs === undefined) {\n this.internalMacintoshGlyphs = new Dictionary();\n }\n return this.internalMacintoshGlyphs;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TtfReader.prototype, \"microsoftGlyphs\", {\n /**\n * Gets glyphs for Microsoft Unicode fonts (glyph index - key, glyph - value).\n */\n get: function () {\n if (this.internalMicrosoftGlyphs === null || this.internalMicrosoftGlyphs === undefined) {\n this.internalMicrosoftGlyphs = new Dictionary();\n }\n return this.internalMicrosoftGlyphs;\n },\n enumerable: true,\n configurable: true\n });\n //Implementation\n TtfReader.prototype.initialize = function () {\n if (this.metrics === undefined) {\n this.metrics = new TtfMetrics();\n }\n this.readFontDictionary();\n var nameTable = this.readNameTable();\n var headTable = this.readHeadTable();\n this.initializeFontName(nameTable);\n this.metrics.macStyle = headTable.macStyle;\n };\n TtfReader.prototype.readFontDictionary = function () {\n this.offset = 0;\n var version = this.checkPreambula();\n //this.offset += 4;\n var numTables = this.readInt16(this.offset);\n var searchRange = this.readInt16(this.offset);\n var entrySelector = this.readInt16(this.offset);\n var rangeShift = this.readInt16(this.offset);\n if (this.tableDirectory === undefined) {\n this.tableDirectory = new Dictionary();\n }\n for (var i = 0; i < numTables; ++i) {\n var table = new TtfTableInfo();\n var tableKey = this.readString(this.int32Size);\n table.checksum = this.readInt32(this.offset);\n table.offset = this.readInt32(this.offset);\n table.length = this.readInt32(this.offset);\n this.tableDirectory.setValue(tableKey, table);\n }\n this.lowestPosition = this.offset;\n if (!this.isTtcFont) {\n this.fixOffsets();\n }\n };\n TtfReader.prototype.fixOffsets = function () {\n var minOffset = Number.MAX_VALUE;\n // Search for a smallest offset and compare it with the lowest position found.\n var tableKeys = this.tableDirectory.keys();\n for (var i = 0; i < tableKeys.length; i++) {\n var value = this.tableDirectory.getValue(tableKeys[i]);\n var offset = value.offset;\n if (minOffset > offset) {\n minOffset = offset;\n if (minOffset <= this.lowestPosition) {\n break;\n }\n }\n }\n var shift = minOffset - this.lowestPosition;\n if (shift !== 0) {\n var table = new Dictionary();\n for (var i = 0; i < tableKeys.length; i++) {\n var value = this.tableDirectory.getValue(tableKeys[i]);\n value.offset -= shift;\n table.setValue(tableKeys[i], value);\n }\n this.tableDirectory = table;\n }\n };\n TtfReader.prototype.checkPreambula = function () {\n var version = this.readInt32(this.offset);\n this.isMacTtf = (version === 0x74727565) ? true : false;\n if (version !== 0x10000 && version !== 0x74727565 && version !== 0x4f54544f) {\n this.isTtcFont = true;\n this.offset = 0;\n var fontTag = this.readString(4);\n if (fontTag !== 'ttcf') {\n throw new Error('Can not read TTF font data');\n }\n //skip 4\n this.offset += 4;\n var ttcIdentificationNumber = this.readInt32(this.offset);\n if (ttcIdentificationNumber < 0) {\n throw new Error('Can not read TTF font data');\n }\n this.offset = this.readInt32(this.offset);\n version = this.readInt32(this.offset);\n }\n return version;\n };\n TtfReader.prototype.readNameTable = function () {\n var tableInfo = this.getTable('name');\n this.offset = tableInfo.offset;\n var table = new TtfNameTable();\n table.formatSelector = this.readUInt16(this.offset);\n table.recordsCount = this.readUInt16(this.offset);\n table.offset = this.readUInt16(this.offset);\n table.nameRecords = [];\n var recordSize = 12;\n var position = this.offset;\n for (var i = 0; i < table.recordsCount; i++) {\n this.offset = position;\n var record = new TtfNameRecord();\n record.platformID = this.readUInt16(this.offset);\n record.encodingID = this.readUInt16(this.offset);\n record.languageID = this.readUInt16(this.offset);\n record.nameID = this.readUInt16(this.offset);\n record.length = this.readUInt16(this.offset);\n record.offset = this.readUInt16(this.offset);\n this.offset = tableInfo.offset + table.offset + record.offset;\n var unicode = (record.platformID === 0 || record.platformID === 3);\n record.name = this.readString(record.length, unicode);\n table.nameRecords[i] = record;\n position += recordSize;\n }\n return table;\n };\n TtfReader.prototype.readHeadTable = function () {\n var tableInfo = this.getTable('head');\n this.offset = tableInfo.offset;\n var table = new TtfHeadTable();\n table.version = this.readFixed(this.offset);\n table.fontRevision = this.readFixed(this.offset);\n table.checkSumAdjustment = this.readUInt32(this.offset);\n table.magicNumber = this.readUInt32(this.offset);\n table.flags = this.readUInt16(this.offset);\n table.unitsPerEm = this.readUInt16(this.offset);\n table.created = this.readInt64(this.offset);\n table.modified = this.readInt64(this.offset);\n table.xMin = this.readInt16(this.offset);\n table.yMin = this.readInt16(this.offset);\n table.xMax = this.readInt16(this.offset);\n table.yMax = this.readInt16(this.offset);\n table.macStyle = this.readUInt16(this.offset);\n table.lowestReadableSize = this.readUInt16(this.offset);\n table.fontDirectionHint = this.readInt16(this.offset);\n table.indexToLocalFormat = this.readInt16(this.offset);\n table.glyphDataFormat = this.readInt16(this.offset);\n return table;\n };\n TtfReader.prototype.readHorizontalHeaderTable = function () {\n var tableInfo = this.getTable('hhea');\n this.offset = tableInfo.offset;\n var table = new TtfHorizontalHeaderTable();\n table.version = this.readFixed(this.offset);\n table.ascender = this.readInt16(this.offset);\n table.descender = this.readInt16(this.offset);\n table.lineGap = this.readInt16(this.offset);\n table.advanceWidthMax = this.readUInt16(this.offset);\n table.minLeftSideBearing = this.readInt16(this.offset);\n table.minRightSideBearing = this.readInt16(this.offset);\n table.xMaxExtent = this.readInt16(this.offset);\n table.caretSlopeRise = this.readInt16(this.offset);\n table.caretSlopeRun = this.readInt16(this.offset);\n //skip 2 * 5\n this.offset += 10;\n table.metricDataFormat = this.readInt16(this.offset);\n table.numberOfHMetrics = this.readUInt16(this.offset);\n return table;\n };\n TtfReader.prototype.readOS2Table = function () {\n var tableInfo = this.getTable('OS/2');\n this.offset = tableInfo.offset;\n var table = new TtfOS2Table();\n table.version = this.readUInt16(this.offset);\n table.xAvgCharWidth = this.readInt16(this.offset);\n table.usWeightClass = this.readUInt16(this.offset);\n table.usWidthClass = this.readUInt16(this.offset);\n table.fsType = this.readInt16(this.offset);\n table.ySubscriptXSize = this.readInt16(this.offset);\n table.ySubscriptYSize = this.readInt16(this.offset);\n table.ySubscriptXOffset = this.readInt16(this.offset);\n table.ySubscriptYOffset = this.readInt16(this.offset);\n table.ySuperscriptXSize = this.readInt16(this.offset);\n table.ySuperscriptYSize = this.readInt16(this.offset);\n table.ySuperscriptXOffset = this.readInt16(this.offset);\n table.ySuperscriptYOffset = this.readInt16(this.offset);\n table.yStrikeoutSize = this.readInt16(this.offset);\n table.yStrikeoutPosition = this.readInt16(this.offset);\n table.sFamilyClass = this.readInt16(this.offset);\n table.panose = this.readBytes(10);\n table.ulUnicodeRange1 = this.readUInt32(this.offset);\n table.ulUnicodeRange2 = this.readUInt32(this.offset);\n table.ulUnicodeRange3 = this.readUInt32(this.offset);\n table.ulUnicodeRange4 = this.readUInt32(this.offset);\n table.vendorIdentifier = this.readBytes(4);\n table.fsSelection = this.readUInt16(this.offset);\n table.usFirstCharIndex = this.readUInt16(this.offset);\n table.usLastCharIndex = this.readUInt16(this.offset);\n table.sTypoAscender = this.readInt16(this.offset);\n table.sTypoDescender = this.readInt16(this.offset);\n table.sTypoLineGap = this.readInt16(this.offset);\n table.usWinAscent = this.readUInt16(this.offset);\n table.usWinDescent = this.readUInt16(this.offset);\n table.ulCodePageRange1 = this.readUInt32(this.offset);\n table.ulCodePageRange2 = this.readUInt32(this.offset);\n if (table.version > 1) {\n table.sxHeight = this.readInt16(this.offset);\n table.sCapHeight = this.readInt16(this.offset);\n table.usDefaultChar = this.readUInt16(this.offset);\n table.usBreakChar = this.readUInt16(this.offset);\n table.usMaxContext = this.readUInt16(this.offset);\n }\n else {\n table.sxHeight = 0;\n table.sCapHeight = 0;\n table.usDefaultChar = 0;\n table.usBreakChar = 0;\n table.usMaxContext = 0;\n }\n return table;\n };\n TtfReader.prototype.readPostTable = function () {\n var tableInfo = this.getTable('post');\n this.offset = tableInfo.offset;\n var table = new TtfPostTable();\n table.formatType = this.readFixed(this.offset);\n table.italicAngle = this.readFixed(this.offset);\n table.underlinePosition = this.readInt16(this.offset);\n table.underlineThickness = this.readInt16(this.offset);\n table.isFixedPitch = this.readUInt32(this.offset);\n table.minType42 = this.readUInt32(this.offset);\n table.maxType42 = this.readUInt32(this.offset);\n table.minType1 = this.readUInt32(this.offset);\n table.maxType1 = this.readUInt32(this.offset);\n return table;\n };\n /**\n * Reads Width of the glyphs.\n */\n TtfReader.prototype.readWidthTable = function (glyphCount, unitsPerEm) {\n var tableInfo = this.getTable('hmtx');\n this.offset = tableInfo.offset;\n var width = [];\n for (var i = 0; i < glyphCount; i++) {\n var glyph = new TtfLongHorMetric();\n glyph.advanceWidth = this.readUInt16(this.offset);\n glyph.lsb = this.readInt16(this.offset);\n var glyphWidth = glyph.advanceWidth * 1000 / unitsPerEm;\n width.push(Math.floor(glyphWidth));\n }\n return width;\n };\n /**\n * Reads the cmap table.\n */\n TtfReader.prototype.readCmapTable = function () {\n var tableInfo = this.getTable('cmap');\n this.offset = tableInfo.offset;\n var table = new TtfCmapTable();\n table.version = this.readUInt16(this.offset);\n table.tablesCount = this.readUInt16(this.offset);\n var position = this.offset;\n var subTables = [];\n for (var i = 0; i < table.tablesCount; i++) {\n this.offset = position;\n var subTable = new TtfCmapSubTable();\n subTable.platformID = this.readUInt16(this.offset);\n subTable.encodingID = this.readUInt16(this.offset);\n subTable.offset = this.readUInt32(this.offset);\n position = this.offset;\n this.readCmapSubTable(subTable);\n subTables[i] = subTable;\n }\n return subTables;\n };\n /**\n * Reads the cmap sub table.\n */\n TtfReader.prototype.readCmapSubTable = function (subTable) {\n var tableInfo = this.getTable('cmap');\n this.offset = tableInfo.offset + subTable.offset;\n var format = this.readUInt16(this.offset);\n var encoding = this.getCmapEncoding(subTable.platformID, subTable.encodingID);\n var platform = (encoding === TtfCmapEncoding.Macintosh) ? TtfPlatformID.Macintosh : TtfPlatformID.Microsoft;\n if (encoding !== TtfCmapEncoding.Unknown) {\n switch (format) {\n case TtfCmapFormat.Apple:\n this.readAppleCmapTable(subTable, encoding);\n break;\n case TtfCmapFormat.Microsoft:\n this.readMicrosoftCmapTable(subTable, encoding);\n break;\n case TtfCmapFormat.Trimmed:\n this.readTrimmedCmapTable(subTable, encoding);\n break;\n }\n }\n };\n /**\n * Reads Symbol cmap table.\n */\n TtfReader.prototype.readAppleCmapTable = function (subTable, encoding) {\n var tableInfo = this.getTable('cmap');\n this.offset = tableInfo.offset + subTable.offset;\n var table = new TtfAppleCmapSubTable();\n table.format = this.readUInt16(this.offset);\n table.length = this.readUInt16(this.offset);\n table.version = this.readUInt16(this.offset);\n if (this.maxMacIndex === null || this.maxMacIndex === undefined) {\n this.maxMacIndex = 0;\n }\n for (var i = 0; i < 256; ++i) {\n var glyphInfo = new TtfGlyphInfo();\n glyphInfo.index = this.readByte(this.offset);\n glyphInfo.width = this.getWidth(glyphInfo.index);\n glyphInfo.charCode = i;\n this.macintosh.setValue(i, glyphInfo);\n this.addGlyph(glyphInfo, encoding);\n // NOTE: this code fixes char codes that extends 0x100. However, it might corrupt something.\n this.maxMacIndex = Math.max(i, this.maxMacIndex);\n }\n };\n /**\n * Reads Symbol cmap table.\n */\n TtfReader.prototype.readMicrosoftCmapTable = function (subTable, encoding) {\n var tableInfo = this.getTable('cmap');\n this.offset = tableInfo.offset + subTable.offset;\n var collection = (encoding === TtfCmapEncoding.Unicode) ? this.microsoft : this.macintosh;\n var table = new TtfMicrosoftCmapSubTable();\n table.format = this.readUInt16(this.offset);\n table.length = this.readUInt16(this.offset);\n table.version = this.readUInt16(this.offset);\n table.segCountX2 = this.readUInt16(this.offset);\n table.searchRange = this.readUInt16(this.offset);\n table.entrySelector = this.readUInt16(this.offset);\n table.rangeShift = this.readUInt16(this.offset);\n var segCount = table.segCountX2 / 2;\n table.endCount = this.readUshortArray(segCount);\n table.reservedPad = this.readUInt16(this.offset);\n table.startCount = this.readUshortArray(segCount);\n table.idDelta = this.readUshortArray(segCount);\n table.idRangeOffset = this.readUshortArray(segCount);\n var length = (table.length / 2 - 8) - (segCount * 4);\n table.glyphID = this.readUshortArray(length);\n // Process glyphIdArray array.\n var codeOffset = 0;\n var index = 0;\n for (var j = 0; j < segCount; j++) {\n for (var k = table.startCount[j]; k <= table.endCount[j] && k !== 65535; k++) {\n if (table.idRangeOffset[j] === 0) {\n codeOffset = (k + table.idDelta[j]) & 65535;\n }\n else {\n index = j + table.idRangeOffset[j] / 2 - segCount + k - table.startCount[j];\n if (index >= table.glyphID.length) {\n continue;\n }\n codeOffset = (table.glyphID[index] + table.idDelta[j]) & 65535;\n }\n var glyph = new TtfGlyphInfo();\n glyph.index = codeOffset;\n glyph.width = this.getWidth(glyph.index);\n var id = (encoding === TtfCmapEncoding.Symbol) ? ((k & 0xff00) === 0xf000 ? k & 0xff : k) : k;\n glyph.charCode = id;\n collection.setValue(id, glyph);\n this.addGlyph(glyph, encoding);\n }\n }\n };\n /**\n * Reads Trimed cmap table.\n */\n TtfReader.prototype.readTrimmedCmapTable = function (subTable, encoding) {\n var tableInfo = this.getTable('cmap');\n this.offset = tableInfo.offset + subTable.offset;\n var table = new TtfTrimmedCmapSubTable();\n table.format = this.readUInt16(this.offset);\n table.length = this.readUInt16(this.offset);\n table.version = this.readUInt16(this.offset);\n table.firstCode = this.readUInt16(this.offset);\n table.entryCount = this.readUInt16(this.offset);\n for (var i = 0; i < table.entryCount; ++i) {\n var glyphInfo = new TtfGlyphInfo();\n glyphInfo.index = this.readUInt16(this.offset);\n glyphInfo.width = this.getWidth(glyphInfo.index);\n glyphInfo.charCode = i + table.firstCode;\n this.macintosh.setValue(i, glyphInfo);\n this.addGlyph(glyphInfo, encoding);\n // NOTE: this code fixes char codes that extends 0x100. However, it might corrupt something.\n this.maxMacIndex = Math.max(i, this.maxMacIndex);\n }\n };\n TtfReader.prototype.initializeFontName = function (nameTable) {\n for (var i = 0; i < nameTable.recordsCount; i++) {\n var record = nameTable.nameRecords[i];\n if (record.nameID === 1) {\n //font family\n this.metrics.fontFamily = record.name;\n }\n else if (record.nameID === 6) {\n //post script name\n this.metrics.postScriptName = record.name;\n }\n /* tslint:disable */\n if (this.metrics.fontFamily !== null && this.metrics.fontFamily !== undefined && this.metrics.postScriptName !== null && this.metrics.postScriptName !== undefined) {\n break;\n }\n /* tslint:disable */\n }\n };\n TtfReader.prototype.getTable = function (name) {\n // if (name === null) {\n // throw new Error('Argument Null Exception : name');\n // }\n var table = new TtfTableInfo();\n var obj;\n if (this.tableDirectory.containsKey(name)) {\n obj = this.tableDirectory.getValue(name);\n }\n if (obj !== null && obj !== undefined) {\n table = obj;\n }\n return table;\n };\n /**\n * Returns width of the glyph.\n */\n TtfReader.prototype.getWidth = function (glyphCode) {\n glyphCode = (glyphCode < this.width.length) ? glyphCode : this.width.length - 1;\n return this.width[glyphCode];\n };\n /**\n * Gets CMAP encoding based on platform ID and encoding ID.\n */\n /* tslint:disable */\n TtfReader.prototype.getCmapEncoding = function (platformID, encodingID) {\n var format = TtfCmapEncoding.Unknown;\n if (platformID == TtfPlatformID.Microsoft && encodingID == TtfMicrosoftEncodingID.Undefined) {\n // When building a symbol font for Windows,\n // the platform ID should be 3 and the encoding ID should be 0.\n format = TtfCmapEncoding.Symbol;\n }\n else if (platformID == TtfPlatformID.Microsoft && encodingID == TtfMicrosoftEncodingID.Unicode) {\n // When building a Unicode font for Windows,\n // the platform ID should be 3 and the encoding ID should be 1.\n format = TtfCmapEncoding.Unicode;\n }\n else if (platformID == TtfPlatformID.Macintosh && encodingID == TtfMacintoshEncodingID.Roman) {\n // When building a font that will be used on the Macintosh,\n // the platform ID should be 1 and the encoding ID should be 0.\n format = TtfCmapEncoding.Macintosh;\n }\n return format;\n };\n /* tslint:enable */\n /**\n * Adds glyph to the collection.\n */\n TtfReader.prototype.addGlyph = function (glyph, encoding) {\n var collection = null;\n switch (encoding) {\n case TtfCmapEncoding.Unicode:\n collection = this.microsoftGlyphs;\n break;\n case TtfCmapEncoding.Macintosh:\n case TtfCmapEncoding.Symbol:\n collection = this.macintoshGlyphs;\n break;\n }\n collection.setValue(glyph.index, glyph);\n };\n /**\n * Initializes metrics.\n */\n /* tslint:disable */\n TtfReader.prototype.initializeMetrics = function (nameTable, headTable, horizontalHeadTable, os2Table, postTable, cmapTables) {\n /* tslint:enable */\n // if (cmapTables === null) {\n // throw new Error('ArgumentNullException : cmapTables');\n // }\n this.initializeFontName(nameTable);\n // Get font encoding.\n var bSymbol = false;\n for (var i = 0; i < cmapTables.length; i++) {\n var subTable = cmapTables[i];\n var encoding = this.getCmapEncoding(subTable.platformID, subTable.encodingID);\n if (encoding === TtfCmapEncoding.Symbol) {\n bSymbol = true;\n break;\n }\n }\n this.metrics.isSymbol = bSymbol;\n this.metrics.macStyle = headTable.macStyle;\n this.metrics.isFixedPitch = (postTable.isFixedPitch !== 0);\n this.metrics.italicAngle = postTable.italicAngle;\n var factor = 1000 / headTable.unitsPerEm;\n this.metrics.winAscent = os2Table.sTypoAscender * factor;\n this.metrics.macAscent = horizontalHeadTable.ascender * factor;\n //m_metrics.MacAscent = os2Table.UsWinAscent * factor;\n // NOTE: This is stange workaround. The value is good if os2Table.SCapHeight != 0, otherwise it should be properly computed.\n this.metrics.capHeight = (os2Table.sCapHeight !== 0) ? os2Table.sCapHeight : 0.7 * headTable.unitsPerEm * factor;\n this.metrics.winDescent = os2Table.sTypoDescender * factor;\n this.metrics.macDescent = horizontalHeadTable.descender * factor;\n //m_metrics.MacDescent = -os2Table.UsWinDescent * factor;\n this.metrics.leading = (os2Table.sTypoAscender - os2Table.sTypoDescender + os2Table.sTypoLineGap) * factor;\n this.metrics.lineGap = Math.ceil(horizontalHeadTable.lineGap * factor);\n var left = headTable.xMin * factor;\n var top = Math.ceil(this.metrics.macAscent + this.metrics.lineGap);\n var right = headTable.xMax * factor;\n var bottom = this.metrics.macDescent;\n this.metrics.fontBox = new Rectangle(left, top, right, bottom);\n // NOTE: Strange!\n this.metrics.stemV = 80;\n this.metrics.widthTable = this.updateWidth();\n this.metrics.contains = this.tableDirectory.containsKey('CFF');\n this.metrics.subScriptSizeFactor = headTable.unitsPerEm / os2Table.ySubscriptYSize;\n this.metrics.superscriptSizeFactor = headTable.unitsPerEm / os2Table.ySuperscriptYSize;\n };\n /**\n * Updates chars structure which is used in the case of ansi encoding (256 bytes).\n */\n TtfReader.prototype.updateWidth = function () {\n var count = 256;\n var bytes = [];\n if (this.metrics.isSymbol) {\n for (var i = 0; i < count; i++) {\n var glyphInfo = this.getGlyph(String.fromCharCode(i));\n bytes[i] = (glyphInfo.empty) ? 0 : glyphInfo.width;\n }\n }\n else {\n var byteToProcess = [];\n var unknown = '?';\n var space = String.fromCharCode(32);\n for (var i = 0; i < count; i++) {\n byteToProcess[0] = i;\n var text = this.getString(byteToProcess, 0, byteToProcess.length);\n var ch = (text.length > 0) ? text[0] : unknown;\n var glyphInfo = this.getGlyph(ch);\n if (!glyphInfo.empty) {\n bytes[i] = glyphInfo.width;\n }\n else {\n glyphInfo = this.getGlyph(space);\n bytes[i] = (glyphInfo.empty) ? 0 : glyphInfo.width;\n }\n }\n }\n return bytes;\n };\n /**\n * Returns default glyph.\n */\n TtfReader.prototype.getDefaultGlyph = function () {\n var glyph = this.getGlyph(StringTokenizer.whiteSpace);\n return glyph;\n };\n /**\n * Reads unicode string from byte array.\n */\n TtfReader.prototype.getString = function (byteToProcess, start, length) {\n var result = '';\n for (var index = 0; index < length; index++) {\n result += String.fromCharCode(byteToProcess[index + start]);\n }\n return result;\n };\n /**\n * Reads loca table.\n */\n TtfReader.prototype.readLocaTable = function (bShort) {\n var tableInfo = this.getTable('loca');\n this.offset = tableInfo.offset;\n var table = new TtfLocaTable();\n var buffer = null;\n if (bShort) {\n var len = tableInfo.length / 2;\n buffer = [];\n for (var i = 0; i < len; i++) {\n buffer[i] = this.readUInt16(this.offset) * 2;\n }\n }\n else {\n var len = tableInfo.length / 4;\n buffer = [];\n for (var i = 0; i < len; i++) {\n buffer[i] = this.readUInt32(this.offset);\n }\n }\n table.offsets = buffer;\n return table;\n };\n /**\n * Updates hash table of used glyphs.\n */\n TtfReader.prototype.updateGlyphChars = function (glyphChars, locaTable) {\n // if (glyphChars === null) {\n // throw new Error('Argument Null Exception : glyphChars');\n // }\n // Add zero key.\n if (!glyphChars.containsKey(0)) {\n glyphChars.setValue(0, 0);\n }\n var clone = new Dictionary();\n var glyphCharKeys = glyphChars.keys();\n for (var i = 0; i < glyphCharKeys.length; i++) {\n clone.setValue(glyphCharKeys[i], glyphChars.getValue(glyphCharKeys[i]));\n }\n for (var i = 0; i < glyphCharKeys.length; i++) {\n var nextKey = glyphCharKeys[i];\n this.processCompositeGlyph(glyphChars, nextKey, locaTable);\n }\n };\n /**\n * Checks if glyph is composite or not.\n */\n TtfReader.prototype.processCompositeGlyph = function (glyphChars, glyph, locaTable) {\n // if (glyphChars === null) {\n // throw new Error('Argument Null Exception : glyphChars');\n // }\n // Is in range.\n if (glyph < locaTable.offsets.length - 1) {\n var glyphOffset = locaTable.offsets[glyph];\n if (glyphOffset !== locaTable.offsets[glyph + 1]) {\n var tableInfo = this.getTable('glyf');\n this.offset = tableInfo.offset + glyphOffset;\n var glyphHeader = new TtfGlyphHeader();\n glyphHeader.numberOfContours = this.readInt16(this.offset);\n glyphHeader.xMin = this.readInt16(this.offset);\n glyphHeader.yMin = this.readInt16(this.offset);\n glyphHeader.xMax = this.readInt16(this.offset);\n glyphHeader.yMax = this.readInt16(this.offset);\n // Glyph is composite.\n if (glyphHeader.numberOfContours < 0) {\n var skipBytes = 0;\n var entry = true;\n while (entry) {\n var flags = this.readUInt16(this.offset);\n var glyphIndex = this.readUInt16(this.offset);\n if (!glyphChars.containsKey(glyphIndex)) {\n glyphChars.setValue(glyphIndex, 0);\n }\n if ((flags & TtfCompositeGlyphFlags.MoreComponents) === 0) {\n break;\n }\n skipBytes = ((flags & TtfCompositeGlyphFlags.Arg1And2AreWords) !== 0) ? 4 : 2;\n if ((flags & TtfCompositeGlyphFlags.WeHaveScale) !== 0) {\n skipBytes += 2;\n }\n else if ((flags & TtfCompositeGlyphFlags.WeHaveAnXyScale) !== 0) {\n skipBytes += 4;\n }\n else if ((flags & TtfCompositeGlyphFlags.WeHaveTwoByTwo) !== 0) {\n skipBytes += 2 * 4;\n }\n this.offset += skipBytes;\n }\n }\n }\n }\n };\n /**\n * Creates new glyph tables based on chars that are used for output.\n */\n /* tslint:disable */\n TtfReader.prototype.generateGlyphTable = function (glyphChars, locaTable, newLocaTable, newGlyphTable) {\n /* tslint:enable */\n // if (glyphChars === null) {\n // throw new Error('Argument Null Exception : glyphChars');\n // }\n newLocaTable = [];\n // Sorting used glyphs keys.\n var activeGlyphs = glyphChars.keys();\n activeGlyphs.sort(function (a, b) { return a - b; });\n var glyphSize = 0;\n for (var i = 0; i < activeGlyphs.length; i++) {\n var glyphIndex = activeGlyphs[i];\n if (locaTable.offsets.length > 0) {\n glyphSize += locaTable.offsets[glyphIndex + 1] - locaTable.offsets[glyphIndex];\n }\n }\n var glyphSizeAligned = this.align(glyphSize);\n newGlyphTable = [];\n for (var i = 0; i < glyphSizeAligned; i++) {\n newGlyphTable.push(0);\n }\n var nextGlyphOffset = 0;\n var nextGlyphIndex = 0;\n var table = this.getTable('glyf');\n // Creating NewLocaTable - that would hold offsets for filtered glyphs.\n for (var i = 0; i < locaTable.offsets.length; i++) {\n newLocaTable.push(nextGlyphOffset);\n if (nextGlyphIndex < activeGlyphs.length && activeGlyphs[nextGlyphIndex] === i) {\n ++nextGlyphIndex;\n newLocaTable[i] = nextGlyphOffset;\n var oldGlyphOffset = locaTable.offsets[i];\n var oldNextGlyphOffset = locaTable.offsets[i + 1] - oldGlyphOffset;\n if (oldNextGlyphOffset > 0) {\n this.offset = table.offset + oldGlyphOffset;\n var result = this.read(newGlyphTable, nextGlyphOffset, oldNextGlyphOffset);\n newGlyphTable = result.buffer;\n nextGlyphOffset += oldNextGlyphOffset;\n }\n }\n }\n return { glyphTableSize: glyphSize, newLocaTable: newLocaTable, newGlyphTable: newGlyphTable };\n };\n /**\n * Updates new Loca table.\n */\n /* tslint:disable */\n TtfReader.prototype.updateLocaTable = function (newLocaTable, bLocaIsShort, newLocaTableOut) {\n /* tslint:enable */\n if (newLocaTable === null) {\n throw new Error('Argument Null Exception : newLocaTable');\n }\n var size = (bLocaIsShort) ? newLocaTable.length * 2 : newLocaTable.length * 4;\n var count = this.align(size);\n //BigEndianWiter\n var writer = new BigEndianWriter(count);\n for (var i = 0; i < newLocaTable.length; i++) {\n var value = newLocaTable[i];\n if (bLocaIsShort) {\n value /= 2;\n writer.writeShort(value);\n }\n else {\n writer.writeInt(value);\n }\n }\n return { newLocaUpdated: writer.data, newLocaSize: size };\n };\n /**\n * Aligns number to be divisible on 4.\n */\n TtfReader.prototype.align = function (value) {\n return (value + 3) & (~3);\n };\n /**\n * Returns font program data.\n */\n /* tslint:disable */\n TtfReader.prototype.getFontProgram = function (newLocaTableOut, newGlyphTable, glyphTableSize, locaTableSize) {\n /* tslint:enable */\n if (newLocaTableOut === null) {\n throw new Error('Argument Null Exception : newLocaTableOut');\n }\n if (newGlyphTable === null) {\n throw new Error('Argument Null Exception : newGlyphTable');\n }\n var tableNames = this.tableNames;\n var result = this.getFontProgramLength(newLocaTableOut, newGlyphTable, 0);\n var fontProgramLength = result.fontProgramLength;\n var numTables = result.numTables;\n var writer = new BigEndianWriter(fontProgramLength);\n writer.writeInt(0x10000);\n writer.writeShort(numTables);\n var entrySelector = this.entrySelectors[numTables];\n writer.writeShort((1 << (entrySelector & 31)) * 16);\n writer.writeShort(entrySelector);\n writer.writeShort((numTables - (1 << (entrySelector & 31))) * 16);\n // Writing to destination buffer - checksums && sizes of used tables.\n this.writeCheckSums(writer, numTables, newLocaTableOut, newGlyphTable, glyphTableSize, locaTableSize);\n // // Writing to destination buffer - used glyphs.\n this.writeGlyphs(writer, newLocaTableOut, newGlyphTable);\n return writer.data;\n };\n /* tslint:disable */\n TtfReader.prototype.getFontProgramLength = function (newLocaTableOut, newGlyphTable, numTables) {\n /* tslint:enable */\n if (newLocaTableOut === null) {\n throw new Error('Argument Null Exception : newLocaTableOut');\n }\n if (newGlyphTable === null) {\n throw new Error('Argument Null Exception : newGlyphTable');\n }\n // glyf and loca are used by default;\n numTables = 2;\n var tableNames = this.tableNames;\n var fontProgramLength = 0;\n for (var i = 0; i < tableNames.length; i++) {\n var tableName = tableNames[i];\n if (tableName !== 'glyf' && tableName !== 'loca') {\n var table = this.getTable(tableName);\n if (!table.empty) {\n ++numTables;\n fontProgramLength += this.align(table.length);\n }\n }\n }\n fontProgramLength += newLocaTableOut.length;\n fontProgramLength += newGlyphTable.length;\n var usedTablesSize = numTables * 16 + (3 * 4);\n fontProgramLength += usedTablesSize;\n return { fontProgramLength: fontProgramLength, numTables: numTables };\n };\n /**\n * Writing to destination buffer - checksums and sizes of used tables.\n */\n /* tslint:disable */\n TtfReader.prototype.writeCheckSums = function (writer, numTables, newLocaTableOut, newGlyphTable, glyphTableSize, locaTableSize) {\n /* tslint:enable */\n if (writer === null) {\n throw new Error('Argument Null Exception : writer');\n }\n if (newLocaTableOut === null) {\n throw new Error('Argument Null Exception : newLocaTableOut');\n }\n if (newGlyphTable === null) {\n throw new Error('Argument Null Exception : newGlyphTable');\n }\n var tableNames = this.tableNames;\n var usedTablesSize = numTables * 16 + (3 * 4);\n var nextTableSize = 0;\n for (var i = 0; i < tableNames.length; i++) {\n var tableName = tableNames[i];\n var tableInfo = this.getTable(tableName);\n if (tableInfo.empty) {\n continue;\n }\n writer.writeString(tableName);\n if (tableName === 'glyf') {\n var checksum = this.calculateCheckSum(newGlyphTable);\n writer.writeInt(checksum);\n nextTableSize = glyphTableSize;\n }\n else if (tableName === 'loca') {\n var checksum = this.calculateCheckSum(newLocaTableOut);\n writer.writeInt(checksum);\n nextTableSize = locaTableSize;\n }\n else {\n writer.writeInt(tableInfo.checksum);\n nextTableSize = tableInfo.length;\n }\n writer.writeUInt(usedTablesSize);\n writer.writeUInt(nextTableSize);\n usedTablesSize += this.align(nextTableSize);\n }\n };\n /**\n * Gets checksum from source buffer.\n */\n TtfReader.prototype.calculateCheckSum = function (bytes) {\n if (bytes === null) {\n throw new Error('Argument Null Exception : bytes');\n }\n var pos = 0;\n var byte1 = 0;\n var byte2 = 0;\n var byte3 = 0;\n var byte4 = 0;\n for (var i = 0; i < (bytes.length + 1) / 4; i++) {\n byte4 += (bytes[pos++] & 255);\n byte3 += (bytes[pos++] & 255);\n byte2 += (bytes[pos++] & 255);\n byte1 += (bytes[pos++] & 255);\n }\n var result = byte1;\n result += (byte2 << 8);\n result += (byte3 << 16);\n result += (byte4 << 24);\n return result;\n };\n /**\n * Writing to destination buffer - used glyphs.\n */\n TtfReader.prototype.writeGlyphs = function (writer, newLocaTable, newGlyphTable) {\n if (writer === null) {\n throw new Error('Argument Null Exception : writer');\n }\n if (newLocaTable === null) {\n throw new Error('Argument Null Exception : newLocaTableOut');\n }\n if (newGlyphTable === null) {\n throw new Error('Argument Null Exception : newGlyphTable');\n }\n var tableNames = this.tableNames;\n for (var i = 0; i < tableNames.length; i++) {\n var tableName = tableNames[i];\n var tableInfo = this.getTable(tableName);\n if (tableInfo.empty) {\n continue;\n }\n if (tableName === 'glyf') {\n writer.writeBytes(newGlyphTable);\n }\n else if (tableName === 'loca') {\n writer.writeBytes(newLocaTable);\n }\n else {\n var count = this.align(tableInfo.length);\n var buff = [];\n for (var i_1 = 0; i_1 < count; i_1++) {\n buff.push(0);\n }\n this.offset = tableInfo.offset;\n var result = this.read(buff, 0, tableInfo.length);\n writer.writeBytes(result.buffer);\n }\n }\n };\n //public methods\n /**\n * Sets position value of font data.\n */\n TtfReader.prototype.setOffset = function (offset) {\n this.offset = offset;\n };\n /**\n * Creates font Internals\n * @private\n */\n TtfReader.prototype.createInternals = function () {\n this.metrics = new TtfMetrics();\n var nameTable = this.readNameTable();\n var headTable = this.readHeadTable();\n this.bIsLocaShort = (headTable.indexToLocalFormat === 0);\n var horizontalHeadTable = this.readHorizontalHeaderTable();\n var os2Table = this.readOS2Table();\n var postTable = this.readPostTable();\n this.width = this.readWidthTable(horizontalHeadTable.numberOfHMetrics, headTable.unitsPerEm);\n var subTables = this.readCmapTable();\n this.initializeMetrics(nameTable, headTable, horizontalHeadTable, os2Table, postTable, subTables);\n };\n TtfReader.prototype.getGlyph = function (charCode) {\n if (typeof charCode === 'number') {\n var obj1 = null;\n if (!this.metrics.isSymbol && this.microsoftGlyphs != null) {\n if (this.microsoftGlyphs.containsKey(charCode)) {\n obj1 = this.microsoftGlyphs.getValue(charCode);\n }\n }\n else if (this.metrics.isSymbol && this.macintoshGlyphs != null) {\n if (this.macintoshGlyphs.containsKey(charCode)) {\n obj1 = this.macintoshGlyphs.getValue(charCode);\n }\n }\n var glyph = (obj1 != null) ? obj1 : this.getDefaultGlyph();\n return glyph;\n }\n else {\n var obj = null;\n var code = charCode.charCodeAt(0);\n if (!this.metrics.isSymbol && this.microsoft !== null) {\n if (this.microsoft.containsKey(code)) {\n obj = this.microsoft.getValue(code);\n if (code !== StringTokenizer.whiteSpace.charCodeAt(0)) {\n this.isFontPresent = true;\n }\n }\n else if (code !== StringTokenizer.whiteSpace.charCodeAt(0)) {\n this.isFontPresent = false;\n }\n }\n else if (this.metrics.isSymbol && this.macintosh !== null || this.isMacTTF) {\n // NOTE: this code fixes char codes that extends 0x100. However, it might corrupt something.\n if (this.maxMacIndex !== 0) {\n code %= this.maxMacIndex + 1;\n }\n else {\n code = ((code & 0xff00) === 0xf000 ? code & 0xff : code);\n }\n if (this.macintosh.containsKey(code)) {\n obj = this.macintosh.getValue(code);\n this.isFontPresent = true;\n }\n }\n // Fix for StackOverFlow exception in XPS to PDF converter\n if (charCode === StringTokenizer.whiteSpace && obj === null) {\n obj = new TtfGlyphInfo();\n }\n var glyph = (obj !== null) ? obj : this.getDefaultGlyph();\n return glyph;\n }\n };\n /**\n * Gets hash table with chars indexed by glyph index.\n */\n TtfReader.prototype.getGlyphChars = function (chars) {\n if (chars === null || chars === undefined) {\n throw new Error('Argument Null Exception : chars');\n }\n var dictionary = new Dictionary();\n var charKeys = chars.keys();\n for (var i = 0; i < charKeys.length; i++) {\n var ch = charKeys[i];\n var glyph = this.getGlyph(ch);\n if (!glyph.empty) {\n dictionary.setValue(glyph.index, ch.charCodeAt(0));\n }\n }\n return dictionary;\n };\n /**\n * Gets all glyphs.\n */\n TtfReader.prototype.getAllGlyphs = function () {\n var allGlyphInfo = [];\n var info = new TtfGlyphInfo();\n var index = 0;\n for (var i = 0; i < this.width.length; i++) {\n var width = this.width[i];\n info.index = index;\n info.width = width;\n allGlyphInfo.push(info);\n index++;\n }\n return allGlyphInfo;\n };\n /**\n * Reads a font's program.\n * @private\n */\n TtfReader.prototype.readFontProgram = function (chars) {\n var glyphChars = this.getGlyphChars(chars);\n var locaTable = this.readLocaTable(this.bIsLocaShort);\n if (glyphChars.size() < chars.size()) {\n this.missedGlyphs = chars.size() - glyphChars.size();\n }\n this.updateGlyphChars(glyphChars, locaTable);\n /* tslint:disable */\n var result1 = this.generateGlyphTable(glyphChars, locaTable, null, null);\n /* tslint:enable */\n var glyphTableSize = result1.glyphTableSize;\n var newLocaTable = result1.newLocaTable;\n var newGlyphTable = result1.newGlyphTable;\n var result2 = this.updateLocaTable(newLocaTable, this.bIsLocaShort, null);\n var newLocaSize = result2.newLocaSize;\n var newLocaUpdated = result2.newLocaUpdated;\n var fontProgram = this.getFontProgram(newLocaUpdated, newGlyphTable, glyphTableSize, newLocaSize);\n return fontProgram;\n };\n /**\n * Reconverts string to be in proper format saved into PDF file.\n */\n TtfReader.prototype.convertString = function (text) {\n if (text === null) {\n throw new Error('Argument Null Exception : text');\n }\n var glyph = '';\n var i = 0;\n for (var k = 0; k < text.length; k++) {\n var ch = text[k];\n var glyphInfo = this.getGlyph(ch);\n if (!glyphInfo.empty) {\n glyph += String.fromCharCode(glyphInfo.index);\n i++;\n }\n }\n return glyph;\n };\n /**\n * Gets char width.\n */\n TtfReader.prototype.getCharWidth = function (code) {\n var glyphInfo = this.getGlyph(code);\n glyphInfo = (!glyphInfo.empty) ? glyphInfo : this.getDefaultGlyph();\n var codeWidth = (!glyphInfo.empty) ? glyphInfo.width : 0;\n return codeWidth;\n };\n TtfReader.prototype.readString = function (length, isUnicode) {\n if (isUnicode === undefined) {\n return this.readString(length, false);\n }\n else {\n //let buffer : number[] = this.readBytes(length);\n var result = '';\n if (isUnicode) {\n for (var i = 0; i < length; i++) {\n if (i % 2 !== 0) {\n result += String.fromCharCode(this.fontData[this.offset]);\n }\n this.offset += 1;\n }\n }\n else {\n for (var i = 0; i < length; i++) {\n result += String.fromCharCode(this.fontData[this.offset]);\n this.offset += 1;\n }\n }\n return result;\n }\n };\n TtfReader.prototype.readFixed = function (offset) {\n var integer = this.readInt16(offset);\n var sFraction = this.readInt16(offset + 2);\n var fraction = sFraction / 16384;\n return integer + fraction;\n };\n TtfReader.prototype.readInt32 = function (offset) {\n var i1 = this.fontData[offset + 3];\n var i2 = this.fontData[offset + 2];\n var i3 = this.fontData[offset + 1];\n var i4 = this.fontData[offset];\n this.offset += 4;\n return i1 + (i2 << 8) + (i3 << 16) + (i4 << 24);\n };\n TtfReader.prototype.readUInt32 = function (offset) {\n var i1 = this.fontData[offset + 3];\n var i2 = this.fontData[offset + 2];\n var i3 = this.fontData[offset + 1];\n var i4 = this.fontData[offset];\n this.offset += 4;\n return (i1 | i2 << 8 | i3 << 16 | i4 << 24);\n };\n // private readInt16(offset : number) : number {\n // let result : number = (this.fontData[offset] << 8) + this.fontData[offset + 1];\n // this.offset += 2;\n // return result;\n // }\n TtfReader.prototype.readInt16 = function (offset) {\n var result = (this.fontData[offset] << 8) + this.fontData[offset + 1];\n result = result & (1 << 15) ? result - 0x10000 : result;\n this.offset += 2;\n return result;\n };\n TtfReader.prototype.readInt64 = function (offset) {\n var low = this.readInt32(offset + 4);\n var n = this.readInt32(offset) * 4294967296.0 + low;\n if (low < 0) {\n n += 4294967296;\n }\n return n;\n };\n TtfReader.prototype.readUInt16 = function (offset) {\n var result = (this.fontData[offset] << 8) | this.fontData[offset + 1];\n this.offset += 2;\n return result;\n };\n /**\n * Reads ushort array.\n */\n TtfReader.prototype.readUshortArray = function (length) {\n var buffer = [];\n for (var i = 0; i < length; i++) {\n buffer[i] = this.readUInt16(this.offset);\n }\n return buffer;\n };\n TtfReader.prototype.readBytes = function (length) {\n var result = [];\n for (var i = 0; i < length; i++) {\n result.push(this.fontData[this.offset]);\n this.offset += 1;\n }\n return result;\n };\n TtfReader.prototype.readByte = function (offset) {\n var result = this.fontData[offset];\n this.offset += 1;\n return result;\n };\n /**\n * Reads bytes to array in BigEndian order.\n * @private\n */\n TtfReader.prototype.read = function (buffer, index, count) {\n if (buffer === null) {\n throw new Error('Argument Null Exception : buffer');\n }\n var written = 0;\n var read = 0;\n do {\n for (var i = 0; (i < count - written) && (this.offset + i < this.fontData.length); i++) {\n buffer[index + i] = this.fontData[this.offset + i];\n }\n read = count - written;\n this.offset += read;\n written += read;\n } while (written < count);\n return { buffer: buffer, written: written };\n };\n return TtfReader;\n}());\nexport { TtfReader };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfFont } from './pdf-font';\nimport { PdfSubSuperScript } from './enum';\nimport { PdfArray } from './../../primitives/pdf-array';\n/**\n * `Metrics` of the font.\n * @private\n */\nvar PdfFontMetrics = /** @class */ (function () {\n function PdfFontMetrics() {\n /**\n * `Line gap`.\n * @private\n */\n this.lineGap = 0;\n }\n // Public methods\n /**\n * Returns `ascent` taking into consideration font`s size.\n * @private\n */\n PdfFontMetrics.prototype.getAscent = function (format) {\n var returnValue = this.ascent * PdfFont.charSizeMultiplier * this.getSize(format);\n return returnValue;\n };\n /**\n * Returns `descent` taking into consideration font`s size.\n * @private\n */\n PdfFontMetrics.prototype.getDescent = function (format) {\n var returnValue = this.descent * PdfFont.charSizeMultiplier * this.getSize(format);\n return returnValue;\n };\n /**\n * Returns `Line gap` taking into consideration font`s size.\n * @private\n */\n PdfFontMetrics.prototype.getLineGap = function (format) {\n var returnValue = this.lineGap * PdfFont.charSizeMultiplier * this.getSize(format);\n return returnValue;\n };\n /**\n * Returns `height` taking into consideration font`s size.\n * @private\n */\n PdfFontMetrics.prototype.getHeight = function (format) {\n var height;\n var clearTypeFonts = ['cambria', 'candara', 'constantia', 'corbel', 'cariadings'];\n var clearTypeFontCollection = [];\n for (var index = 0; index < clearTypeFonts.length; index++) {\n var font = clearTypeFonts[index];\n clearTypeFontCollection.push(font);\n }\n if (this.getDescent(format) < 0) {\n // if ((clearTypeFontCollection.indexOf(this.name.toLowerCase()) !== -1) && !this.isUnicodeFont) {\n // height = (this.GetAscent(format) - this.GetDescent(format) - this.GetLineGap(format));\n // } else {\n height = (this.getAscent(format) - this.getDescent(format) + this.getLineGap(format));\n // }\n }\n else {\n height = (this.getAscent(format) + this.getDescent(format) + this.getLineGap(format));\n }\n return height;\n };\n /**\n * Calculates `size` of the font depending on the subscript/superscript value.\n * @private\n */\n PdfFontMetrics.prototype.getSize = function (format) {\n var size = this.size;\n if (format != null) {\n switch (format.subSuperScript) {\n case PdfSubSuperScript.SubScript:\n size /= this.subScriptSizeFactor;\n break;\n case PdfSubSuperScript.SuperScript:\n size /= this.superscriptSizeFactor;\n break;\n }\n }\n return size;\n };\n /**\n * `Clones` the metrics.\n * @private\n */\n PdfFontMetrics.prototype.clone = function () {\n var metrics = this;\n metrics.widthTable = WidthTable.clone();\n return metrics;\n };\n Object.defineProperty(PdfFontMetrics.prototype, \"widthTable\", {\n // Properies\n /**\n * Gets or sets the `width table`.\n * @private\n */\n get: function () {\n return this.internalWidthTable;\n },\n set: function (value) {\n this.internalWidthTable = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfFontMetrics;\n}());\nexport { PdfFontMetrics };\nvar WidthTable = /** @class */ (function () {\n function WidthTable() {\n }\n /**\n * Static `clones` this instance of the WidthTable class.\n * @private\n */\n WidthTable.clone = function () {\n return null;\n };\n return WidthTable;\n}());\nexport { WidthTable };\nvar StandardWidthTable = /** @class */ (function (_super) {\n __extends(StandardWidthTable, _super);\n // Constructors\n /**\n * Initializes a new instance of the `StandardWidthTable` class.\n * @private\n */\n function StandardWidthTable(widths) {\n var _this = _super.call(this) || this;\n if (widths == null) {\n throw new Error('ArgumentNullException:widths');\n }\n _this.widths = widths;\n return _this;\n }\n //Properties\n /**\n * Gets the `32 bit number` at the specified index.\n * @private\n */\n StandardWidthTable.prototype.items = function (index) {\n if (index < 0 || index >= this.widths.length) {\n throw new Error('ArgumentOutOfRangeException:index, The character is not supported by the font.');\n }\n var result = this.widths[index];\n return result;\n };\n Object.defineProperty(StandardWidthTable.prototype, \"length\", {\n /**\n * Gets the `length` of the internal array.\n * @private\n */\n get: function () {\n return this.widths.length;\n },\n enumerable: true,\n configurable: true\n });\n //Overrides\n /**\n * `Clones` this instance of the WidthTable class.\n * @private\n */\n StandardWidthTable.prototype.clone = function () {\n var swt = this;\n swt.widths = this.widths;\n return swt;\n };\n /**\n * Converts width table to a `PDF array`.\n * @private\n */\n StandardWidthTable.prototype.toArray = function () {\n var arr = new PdfArray(this.widths);\n return arr;\n };\n return StandardWidthTable;\n}(WidthTable));\nexport { StandardWidthTable };\n","/**\n * TrueTypeFont.ts class for EJ2-PDF\n */\nimport { ByteArray } from './../../graphics/images/index';\nimport { TtfReader } from './ttf-reader';\nimport { PdfDictionary, SaveDescendantFontEventHandler, SaveFontDictionaryEventHandler } from './../../primitives/pdf-dictionary';\nimport { SaveFontProgramEventHandler, SaveCmapEventHandler } from './../../primitives/pdf-stream';\nimport { PdfStream } from './../../primitives/pdf-stream';\nimport { PdfArray } from './../../primitives/pdf-array';\nimport { PdfName } from './../../primitives/pdf-name';\nimport { PdfNumber } from './../../primitives/pdf-number';\nimport { PdfString } from './../../primitives/pdf-string';\nimport { PdfReferenceHolder } from './../../primitives/pdf-reference';\nimport { PdfFontMetrics } from './pdf-font-metrics';\nimport { StandardWidthTable } from './pdf-font-metrics';\nimport { DictionaryProperties } from './../../input-output/pdf-dictionary-properties';\nimport { Dictionary } from './../../collections/dictionary';\nimport { FontDescriptorFlags } from './enum';\nimport { RectangleF } from './../../drawing/pdf-drawing';\nimport { Operators } from './../../input-output/pdf-operators';\nvar UnicodeTrueTypeFont = /** @class */ (function () {\n /* tslint:enable */\n //Constructors\n /**\n * Initializes a new instance of the `PdfTrueTypeFont` class.\n * @private\n */\n function UnicodeTrueTypeFont(base64String, size) {\n // Fields\n this.nameString = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n /**\n * Specifies the Internal variable to store fields of `PdfDictionaryProperties`.\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n /**\n * Indicates whether the font program is compressed or not.\n * @private\n */\n this.isCompress = false;\n /**\n * Indicates whether the font is embedded or not.\n */\n this.isEmbedFont = false;\n /**\n * Cmap table's start prefix.\n */\n /* tslint:disable */\n this.cmapPrefix = '/CIDInit /ProcSet findresource begin\\n12 dict begin\\nbegincmap' + Operators.newLine + '/CIDSystemInfo << /Registry (Adobe)/Ordering (UCS)/Supplement 0>> def\\n/CMapName ' + '/Adobe-Identity-UCS def\\n/CMapType 2 def\\n1 begincodespacerange' + Operators.newLine;\n /* tslint:enable */\n /**\n * Cmap table's start suffix.\n */\n this.cmapEndCodespaceRange = 'endcodespacerange' + Operators.newLine;\n /**\n * Cmap's begin range marker.\n */\n this.cmapBeginRange = 'beginbfrange' + Operators.newLine;\n /**\n * Cmap's end range marker.\n */\n this.cmapEndRange = 'endbfrange' + Operators.newLine;\n /**\n * Cmap table's end\n */\n /* tslint:disable */\n this.cmapSuffix = 'endbfrange\\nendcmap\\nCMapName currentdict ' + '/CMap defineresource pop\\nend end' + Operators.newLine;\n if (base64String === null || base64String === undefined) {\n throw new Error('ArgumentNullException:base64String');\n }\n this.fontSize = size;\n this.fontString = base64String;\n this.Initialize();\n }\n //Implementation\n /**\n * Returns width of the char symbol.\n */\n UnicodeTrueTypeFont.prototype.getCharWidth = function (charCode) {\n var codeWidth = this.ttfReader.getCharWidth(charCode);\n return codeWidth;\n };\n /**\n * Returns width of the text line.\n */\n UnicodeTrueTypeFont.prototype.getLineWidth = function (line) {\n // if (line == null) {\n // throw new Error('ArgumentNullException : line');\n // }\n var width = 0;\n for (var i = 0, len = line.length; i < len; i++) {\n var ch = line[i];\n var charWidth = this.getCharWidth(ch);\n width += charWidth;\n }\n return width;\n };\n /**\n * Initializes a new instance of the `PdfTrueTypeFont` class.\n * @private\n */\n UnicodeTrueTypeFont.prototype.Initialize = function () {\n var byteArray = new ByteArray(this.fontString.length);\n byteArray.writeFromBase64String(this.fontString);\n this.fontData = byteArray.internalBuffer;\n this.ttfReader = new TtfReader(this.fontData);\n this.ttfMetrics = this.ttfReader.metrics;\n };\n UnicodeTrueTypeFont.prototype.createInternals = function () {\n this.fontDictionary = new PdfDictionary();\n this.fontProgram = new PdfStream();\n this.cmap = new PdfStream();\n this.descendantFont = new PdfDictionary();\n this.metrics = new PdfFontMetrics();\n this.ttfReader.createInternals();\n this.ttfMetrics = this.ttfReader.metrics;\n this.initializeMetrics();\n // Create all the dictionaries of the font.\n this.subsetName = this.getFontName();\n this.createDescendantFont();\n this.createCmap();\n this.createFontDictionary();\n this.createFontProgram();\n };\n UnicodeTrueTypeFont.prototype.getInternals = function () {\n return this.fontDictionary;\n };\n /**\n * Initializes metrics.\n */\n UnicodeTrueTypeFont.prototype.initializeMetrics = function () {\n var ttfMetrics = this.ttfReader.metrics;\n this.metrics.ascent = ttfMetrics.macAscent;\n this.metrics.descent = ttfMetrics.macDescent;\n this.metrics.height = ttfMetrics.macAscent - ttfMetrics.macDescent + ttfMetrics.lineGap;\n this.metrics.name = ttfMetrics.fontFamily;\n this.metrics.postScriptName = ttfMetrics.postScriptName;\n this.metrics.size = this.fontSize;\n this.metrics.widthTable = new StandardWidthTable(ttfMetrics.widthTable);\n this.metrics.lineGap = ttfMetrics.lineGap;\n this.metrics.subScriptSizeFactor = ttfMetrics.subScriptSizeFactor;\n this.metrics.superscriptSizeFactor = ttfMetrics.superscriptSizeFactor;\n this.metrics.isBold = ttfMetrics.isBold;\n };\n /**\n * Gets random string.\n */\n UnicodeTrueTypeFont.prototype.getFontName = function () {\n var builder = '';\n var name;\n // if (this.isEmbed === false) {\n for (var i = 0; i < 6; i++) {\n var index = Math.floor(Math.random() * (25 - 0 + 1)) + 0;\n builder += this.nameString[index];\n }\n builder += '+';\n // }\n builder += this.ttfReader.metrics.postScriptName;\n name = builder.toString();\n // if (name === '') {\n // name = this.ttfReader.metrics.fontFamily;\n // }\n name = this.formatName(name);\n return name;\n };\n /**\n * Generates name of the font.\n */\n UnicodeTrueTypeFont.prototype.formatName = function (fontName) {\n // if (fontName === null) {\n // throw new Error('ArgumentNullException : fontName');\n // }\n // if (fontName === '') {\n // throw new Error('ArgumentOutOfRangeException : fontName, Parameter can not be empty');\n // }\n var ret = fontName.replace('(', '#28');\n ret = ret.replace(')', '#29');\n ret = ret.replace('[', '#5B');\n ret = ret.replace(']', '#5D');\n ret = ret.replace('<', '#3C');\n ret = ret.replace('>', '#3E');\n ret = ret.replace('{', '#7B');\n ret = ret.replace('}', '#7D');\n ret = ret.replace('/', '#2F');\n ret = ret.replace('%', '#25');\n return ret.replace(' ', '#20');\n };\n /**\n * Creates descendant font.\n */\n UnicodeTrueTypeFont.prototype.createDescendantFont = function () {\n // Set property used to clone Font every time\n this.descendantFont.isFont = true;\n this.descendantFont.descendantFontBeginSave = new SaveDescendantFontEventHandler(this);\n this.descendantFont.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.font));\n this.descendantFont.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.cIDFontType2));\n this.descendantFont.items.setValue(this.dictionaryProperties.baseFont, new PdfName(this.subsetName));\n this.descendantFont.items.setValue(this.dictionaryProperties.cIDToGIDMap, new PdfName(this.dictionaryProperties.identity));\n this.descendantFont.items.setValue(this.dictionaryProperties.dw, new PdfNumber(1000));\n this.fontDescriptor = this.createFontDescriptor();\n this.descendantFont.items.setValue(this.dictionaryProperties.fontDescriptor, new PdfReferenceHolder(this.fontDescriptor));\n var systemInfo = this.createSystemInfo();\n this.descendantFont.items.setValue(this.dictionaryProperties.cIDSystemInfo, systemInfo);\n };\n /**\n * Creates font descriptor.\n */\n UnicodeTrueTypeFont.prototype.createFontDescriptor = function () {\n var descriptor = new PdfDictionary();\n var metrics = this.ttfReader.metrics;\n // Set property used to clone Font every time\n descriptor.isFont = true;\n descriptor.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.fontDescriptor));\n descriptor.items.setValue(this.dictionaryProperties.fontName, new PdfName(this.subsetName));\n descriptor.items.setValue(this.dictionaryProperties.flags, new PdfNumber(this.getDescriptorFlags()));\n descriptor.items.setValue(this.dictionaryProperties.fontBBox, PdfArray.fromRectangle(this.getBoundBox()));\n descriptor.items.setValue(this.dictionaryProperties.missingWidth, new PdfNumber(metrics.widthTable[32]));\n descriptor.items.setValue(this.dictionaryProperties.stemV, new PdfNumber(metrics.stemV));\n descriptor.items.setValue(this.dictionaryProperties.italicAngle, new PdfNumber(metrics.italicAngle));\n descriptor.items.setValue(this.dictionaryProperties.capHeight, new PdfNumber(metrics.capHeight));\n descriptor.items.setValue(this.dictionaryProperties.ascent, new PdfNumber(metrics.winAscent));\n descriptor.items.setValue(this.dictionaryProperties.descent, new PdfNumber(metrics.winDescent));\n descriptor.items.setValue(this.dictionaryProperties.leading, new PdfNumber(metrics.leading));\n descriptor.items.setValue(this.dictionaryProperties.avgWidth, new PdfNumber(metrics.widthTable[32]));\n descriptor.items.setValue(this.dictionaryProperties.fontFile2, new PdfReferenceHolder(this.fontProgram));\n descriptor.items.setValue(this.dictionaryProperties.maxWidth, new PdfNumber(metrics.widthTable[32]));\n descriptor.items.setValue(this.dictionaryProperties.xHeight, new PdfNumber(0));\n descriptor.items.setValue(this.dictionaryProperties.stemH, new PdfNumber(0));\n return descriptor;\n };\n /**\n * Generates cmap.\n * @private\n */\n UnicodeTrueTypeFont.prototype.createCmap = function () {\n this.cmap.cmapBeginSave = new SaveCmapEventHandler(this);\n };\n /**\n * Generates font dictionary.\n */\n UnicodeTrueTypeFont.prototype.createFontDictionary = function () {\n // Set property used to clone Font every time\n this.fontDictionary.isFont = true;\n this.fontDictionary.fontDictionaryBeginSave = new SaveFontDictionaryEventHandler(this);\n this.fontDictionary.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.font));\n this.fontDictionary.items.setValue(this.dictionaryProperties.baseFont, new PdfName(this.subsetName));\n this.fontDictionary.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.type0));\n this.fontDictionary.items.setValue(this.dictionaryProperties.encoding, new PdfName(this.dictionaryProperties.identityH));\n var descFonts = new PdfArray();\n var reference = new PdfReferenceHolder(this.descendantFont);\n // Set property used to clone Font every time\n descFonts.isFont = true;\n descFonts.add(reference);\n this.fontDictionary.items.setValue(this.dictionaryProperties.descendantFonts, descFonts);\n };\n /**\n * Creates font program.\n */\n UnicodeTrueTypeFont.prototype.createFontProgram = function () {\n this.fontProgram.fontProgramBeginSave = new SaveFontProgramEventHandler(this);\n };\n /**\n * Creates system info dictionary for CID font.\n * @private\n */\n UnicodeTrueTypeFont.prototype.createSystemInfo = function () {\n var systemInfo = new PdfDictionary();\n systemInfo.items.setValue(this.dictionaryProperties.registry, new PdfString('Adobe'));\n systemInfo.items.setValue(this.dictionaryProperties.ordering, new PdfString(this.dictionaryProperties.identity));\n systemInfo.items.setValue(this.dictionaryProperties.supplement, new PdfNumber(0));\n return systemInfo;\n };\n /**\n * Runs before font Dictionary will be saved.\n */\n UnicodeTrueTypeFont.prototype.descendantFontBeginSave = function () {\n if (this.usedChars !== null && this.usedChars !== undefined && this.usedChars.size() > 0) {\n var width = this.getDescendantWidth();\n if (width !== null) {\n this.descendantFont.items.setValue(this.dictionaryProperties.w, width);\n }\n }\n };\n /**\n * Runs before font Dictionary will be saved.\n */\n UnicodeTrueTypeFont.prototype.cmapBeginSave = function () {\n this.generateCmap();\n };\n /**\n * Runs before font Dictionary will be saved.\n */\n /* tslint:disable */\n UnicodeTrueTypeFont.prototype.fontDictionaryBeginSave = function () {\n if (this.usedChars !== null && this.usedChars !== undefined && this.usedChars.size() > 0 && !this.fontDictionary.containsKey(this.dictionaryProperties.toUnicode)) {\n this.fontDictionary.items.setValue(this.dictionaryProperties.toUnicode, new PdfReferenceHolder(this.cmap));\n }\n };\n /* tslint:enable */\n /**\n * Runs before font program stream save.\n */\n UnicodeTrueTypeFont.prototype.fontProgramBeginSave = function () {\n this.isCompress = true;\n this.generateFontProgram();\n };\n /**\n * Gets width description pad array for c i d font.\n */\n UnicodeTrueTypeFont.prototype.getDescendantWidth = function () {\n var array = new PdfArray();\n if (this.usedChars !== null && this.usedChars !== undefined && this.usedChars.size() > 0) {\n var glyphInfo = [];\n // if (!this.isEmbedFont) {\n var keys = this.usedChars.keys();\n for (var i = 0; i < keys.length; i++) {\n var chLen = keys[i];\n var glyph = this.ttfReader.getGlyph(chLen);\n if (glyph.empty) {\n continue;\n }\n glyphInfo.push(glyph);\n }\n // } else {\n // glyphInfo = this.ttfReader.getAllGlyphs();\n // }\n glyphInfo.sort(function (a, b) { return a.index - b.index; });\n var firstGlyphIndex = 0;\n var lastGlyphIndex = 0;\n var firstGlyphIndexWasSet = false;\n var widthDetails = new PdfArray();\n // if (!this.isEmbedFont) {\n for (var i = 0; i < glyphInfo.length; i++) {\n var glyph = glyphInfo[i];\n if (!firstGlyphIndexWasSet) {\n firstGlyphIndexWasSet = true;\n firstGlyphIndex = glyph.index;\n lastGlyphIndex = glyph.index - 1;\n }\n if ((lastGlyphIndex + 1 !== glyph.index || (i + 1 === glyphInfo.length)) && glyphInfo.length > 1) {\n // Add glyph index / width.\n array.add(new PdfNumber(firstGlyphIndex));\n if (i !== 0) {\n array.add(widthDetails);\n }\n firstGlyphIndex = glyph.index;\n widthDetails = new PdfArray();\n }\n widthDetails.add(new PdfNumber(glyph.width));\n if (i + 1 === glyphInfo.length) {\n array.add(new PdfNumber(firstGlyphIndex));\n array.add(widthDetails);\n }\n lastGlyphIndex = glyph.index;\n }\n // } else {\n // for (let i : number = 0; i < glyphInfo.length; i++) {\n // let glyph : TtfGlyphInfo = glyphInfo[i];\n // if (!firstGlyphIndexWasSet) {\n // firstGlyphIndexWasSet = true;\n // lastGlyphIndex = glyph.index - 1;\n // }\n // firstGlyphIndex = glyph.index;\n // if ((lastGlyphIndex + 1 === glyph.index || (i + 1 === glyphInfo.length)) && glyphInfo.length > 1) {\n // // Add glyph index / width.\n // widthDetails.add(new PdfNumber(glyph.width));\n // array.add(new PdfNumber(firstGlyphIndex));\n // array.add(widthDetails);\n // widthDetails = new PdfArray();\n // }\n // lastGlyphIndex = glyph.index;\n // }\n // }\n }\n return array;\n };\n /**\n * Creates cmap.\n */\n UnicodeTrueTypeFont.prototype.generateCmap = function () {\n if (this.usedChars !== null && this.usedChars !== undefined && this.usedChars.size() > 0) {\n var glyphChars = this.ttfReader.getGlyphChars(this.usedChars);\n if (glyphChars.size() > 0) {\n var keys = glyphChars.keys().sort();\n // add first and last glyph indexes\n var first = keys[0];\n var last = keys[keys.length - 1];\n var middlePart = this.toHexString(first, false) + this.toHexString(last, false) + Operators.newLine;\n var builder = '';\n builder += this.cmapPrefix;\n builder += middlePart;\n builder += this.cmapEndCodespaceRange;\n var nextRange = 0;\n for (var i = 0; i < keys.length; i++) {\n if (nextRange === 0) {\n if (i !== 0) {\n builder += this.cmapEndRange;\n }\n nextRange = Math.min(100, keys.length - i);\n builder += nextRange;\n builder += Operators.whiteSpace;\n builder += this.cmapBeginRange;\n }\n nextRange -= 1;\n var key = keys[i];\n /* tslint:disable */\n builder += this.toHexString(key, true) + this.toHexString(key, true) + this.toHexString(glyphChars.getValue(key), true) + '\\n';\n /* tslint:enable */\n }\n builder += this.cmapSuffix;\n this.cmap.clearStream();\n this.cmap.isFont = true;\n this.cmap.write(builder);\n }\n }\n };\n /**\n * Generates font program.\n */\n UnicodeTrueTypeFont.prototype.generateFontProgram = function () {\n var fontProgram = null;\n this.usedChars = (this.usedChars === null || this.usedChars === undefined) ? new Dictionary() : this.usedChars;\n this.ttfReader.setOffset(0);\n fontProgram = this.ttfReader.readFontProgram(this.usedChars);\n this.fontProgram.clearStream();\n this.fontProgram.isFont = true;\n this.fontProgram.writeBytes(fontProgram);\n };\n /**\n * Calculates flags for the font descriptor.\n * @private\n */\n UnicodeTrueTypeFont.prototype.getDescriptorFlags = function () {\n var flags = 0;\n var metrics = this.ttfReader.metrics;\n if (metrics.isFixedPitch) {\n flags |= FontDescriptorFlags.FixedPitch;\n }\n if (metrics.isSymbol) {\n flags |= FontDescriptorFlags.Symbolic;\n }\n else {\n flags |= FontDescriptorFlags.Nonsymbolic;\n }\n if (metrics.isItalic) {\n flags |= FontDescriptorFlags.Italic;\n }\n if (metrics.isBold) {\n flags |= FontDescriptorFlags.ForceBold;\n }\n return flags;\n };\n /**\n * Calculates BoundBox of the descriptor.\n * @private\n */\n UnicodeTrueTypeFont.prototype.getBoundBox = function () {\n var rect = this.ttfReader.metrics.fontBox;\n var width = Math.abs(rect.right - rect.left);\n var height = Math.abs(rect.top - rect.bottom);\n var rectangle = new RectangleF(rect.left, rect.bottom, width, height);\n return rectangle;\n };\n /**\n * Converts integer of decimal system to hex integer.\n */\n UnicodeTrueTypeFont.prototype.toHexString = function (n, isCaseChange) {\n var s = n.toString(16);\n if (isCaseChange) {\n s = s.toUpperCase();\n }\n return '<0000'.substring(0, 5 - s.length) + s + '>';\n };\n /**\n * Stores used symbols.\n */\n UnicodeTrueTypeFont.prototype.setSymbols = function (text) {\n if (text === null) {\n throw new Error('Argument Null Exception : text');\n }\n if (this.usedChars === null || this.usedChars === undefined) {\n this.usedChars = new Dictionary();\n }\n for (var i = 0; i < text.length; i++) {\n var ch = text[i];\n this.usedChars.setValue(ch, String.fromCharCode(0));\n }\n // else {\n // if (text === null) {\n // throw new Error('Argument Null Exception : glyphs');\n // }\n // if (this.usedChars === null || this.usedChars === undefined) {\n // this.usedChars = new Dictionary();\n // }\n // for (let i : number = 0; i < text.length; i++) {\n // let glyphIndex : number = text[i];\n // let glyph : TtfGlyphInfo = this.ttfReader.getGlyph(glyphIndex);\n // if (!glyph == null) {\n // let c : string = glyph.charCode.toLocaleString();\n // this.usedChars.setValue(c, String.fromCharCode(0));\n // }\n // }\n // }\n if (this.isEmbedFont === false) {\n this.getDescendantWidth();\n }\n };\n return UnicodeTrueTypeFont;\n}());\nexport { UnicodeTrueTypeFont };\n","/**\n * ArabicShapeRenderer.ts class for EJ2-PDF\n */\nimport { Dictionary } from './../../../collections/dictionary';\nvar ArabicShapeRenderer = /** @class */ (function () {\n //#endregion\n //#region Constructor\n function ArabicShapeRenderer() {\n //#region Constants\n this.arabicCharTable = [['\\u0621', '\\uFE80'], ['\\u0622', '\\uFE81', '\\uFE82'],\n ['\\u0623', '\\uFE83', '\\uFE84'],\n ['\\u0624', '\\uFE85', '\\uFE86'],\n ['\\u0625', '\\uFE87', '\\uFE88'],\n ['\\u0626', '\\uFE89', '\\uFE8A', '\\uFE8B', '\\uFE8C'],\n ['\\u0627', '\\uFE8D', '\\uFE8E'],\n ['\\u0628', '\\uFE8F', '\\uFE90', '\\uFE91', '\\uFE92'],\n ['\\u0629', '\\uFE93', '\\uFE94'],\n ['\\u062A', '\\uFE95', '\\uFE96', '\\uFE97', '\\uFE98'],\n ['\\u062B', '\\uFE99', '\\uFE9A', '\\uFE9B', '\\uFE9C'],\n ['\\u062C', '\\uFE9D', '\\uFE9E', '\\uFE9F', '\\uFEA0'],\n ['\\u062D', '\\uFEA1', '\\uFEA2', '\\uFEA3', '\\uFEA4'],\n ['\\u062E', '\\uFEA5', '\\uFEA6', '\\uFEA7', '\\uFEA8'],\n ['\\u062F', '\\uFEA9', '\\uFEAA'],\n ['\\u0630', '\\uFEAB', '\\uFEAC'],\n ['\\u0631', '\\uFEAD', '\\uFEAE'],\n ['\\u0632', '\\uFEAF', '\\uFEB0'],\n ['\\u0633', '\\uFEB1', '\\uFEB2', '\\uFEB3', '\\uFEB4'],\n ['\\u0634', '\\uFEB5', '\\uFEB6', '\\uFEB7', '\\uFEB8'],\n ['\\u0635', '\\uFEB9', '\\uFEBA', '\\uFEBB', '\\uFEBC'],\n ['\\u0636', '\\uFEBD', '\\uFEBE', '\\uFEBF', '\\uFEC0'],\n ['\\u0637', '\\uFEC1', '\\uFEC2', '\\uFEC3', '\\uFEC4'],\n ['\\u0638', '\\uFEC5', '\\uFEC6', '\\uFEC7', '\\uFEC8'],\n ['\\u0639', '\\uFEC9', '\\uFECA', '\\uFECB', '\\uFECC'],\n ['\\u063A', '\\uFECD', '\\uFECE', '\\uFECF', '\\uFED0'],\n ['\\u0640', '\\u0640', '\\u0640', '\\u0640', '\\u0640'],\n ['\\u0641', '\\uFED1', '\\uFED2', '\\uFED3', '\\uFED4'],\n ['\\u0642', '\\uFED5', '\\uFED6', '\\uFED7', '\\uFED8'],\n ['\\u0643', '\\uFED9', '\\uFEDA', '\\uFEDB', '\\uFEDC'],\n ['\\u0644', '\\uFEDD', '\\uFEDE', '\\uFEDF', '\\uFEE0'],\n ['\\u0645', '\\uFEE1', '\\uFEE2', '\\uFEE3', '\\uFEE4'],\n ['\\u0646', '\\uFEE5', '\\uFEE6', '\\uFEE7', '\\uFEE8'],\n ['\\u0647', '\\uFEE9', '\\uFEEA', '\\uFEEB', '\\uFEEC'],\n ['\\u0648', '\\uFEED', '\\uFEEE'],\n ['\\u0649', '\\uFEEF', '\\uFEF0', '\\uFBE8', '\\uFBE9'],\n ['\\u064A', '\\uFEF1', '\\uFEF2', '\\uFEF3', '\\uFEF4'],\n ['\\u0671', '\\uFB50', '\\uFB51'],\n ['\\u0679', '\\uFB66', '\\uFB67', '\\uFB68', '\\uFB69'],\n ['\\u067A', '\\uFB5E', '\\uFB5F', '\\uFB60', '\\uFB61'],\n ['\\u067B', '\\uFB52', '\\uFB53', '\\uFB54', '\\uFB55'],\n ['\\u067E', '\\uFB56', '\\uFB57', '\\uFB58', '\\uFB59'],\n ['\\u067F', '\\uFB62', '\\uFB63', '\\uFB64', '\\uFB65'],\n ['\\u0680', '\\uFB5A', '\\uFB5B', '\\uFB5C', '\\uFB5D'],\n ['\\u0683', '\\uFB76', '\\uFB77', '\\uFB78', '\\uFB79'],\n ['\\u0684', '\\uFB72', '\\uFB73', '\\uFB74', '\\uFB75'],\n ['\\u0686', '\\uFB7A', '\\uFB7B', '\\uFB7C', '\\uFB7D'],\n ['\\u0687', '\\uFB7E', '\\uFB7F', '\\uFB80', '\\uFB81'],\n ['\\u0688', '\\uFB88', '\\uFB89'],\n ['\\u068C', '\\uFB84', '\\uFB85'],\n ['\\u068D', '\\uFB82', '\\uFB83'],\n ['\\u068E', '\\uFB86', '\\uFB87'],\n ['\\u0691', '\\uFB8C', '\\uFB8D'],\n ['\\u0698', '\\uFB8A', '\\uFB8B'],\n ['\\u06A4', '\\uFB6A', '\\uFB6B', '\\uFB6C', '\\uFB6D'],\n ['\\u06A6', '\\uFB6E', '\\uFB6F', '\\uFB70', '\\uFB71'],\n ['\\u06A9', '\\uFB8E', '\\uFB8F', '\\uFB90', '\\uFB91'],\n ['\\u06AD', '\\uFBD3', '\\uFBD4', '\\uFBD5', '\\uFBD6'],\n ['\\u06AF', '\\uFB92', '\\uFB93', '\\uFB94', '\\uFB95'],\n ['\\u06B1', '\\uFB9A', '\\uFB9B', '\\uFB9C', '\\uFB9D'],\n ['\\u06B3', '\\uFB96', '\\uFB97', '\\uFB98', '\\uFB99'],\n ['\\u06BA', '\\uFB9E', '\\uFB9F'],\n ['\\u06BB', '\\uFBA0', '\\uFBA1', '\\uFBA2', '\\uFBA3'],\n ['\\u06BE', '\\uFBAA', '\\uFBAB', '\\uFBAC', '\\uFBAD'],\n ['\\u06C0', '\\uFBA4', '\\uFBA5'],\n ['\\u06C1', '\\uFBA6', '\\uFBA7', '\\uFBA8', '\\uFBA9'],\n ['\\u06C5', '\\uFBE0', '\\uFBE1'],\n ['\\u06C6', '\\uFBD9', '\\uFBDA'],\n ['\\u06C7', '\\uFBD7', '\\uFBD8'],\n ['\\u06C8', '\\uFBDB', '\\uFBDC'],\n ['\\u06C9', '\\uFBE2', '\\uFBE3'],\n ['\\u06CB', '\\uFBDE', '\\uFBDF'],\n ['\\u06CC', '\\uFBFC', '\\uFBFD', '\\uFBFE', '\\uFBFF'],\n ['\\u06D0', '\\uFBE4', '\\uFBE5', '\\uFBE6', '\\uFBE7'],\n ['\\u06D2', '\\uFBAE', '\\uFBAF'],\n ['\\u06D3', '\\uFBB0', '\\uFBB1']\n ];\n this.alef = '\\u0627';\n this.alefHamza = '\\u0623';\n this.alefHamzaBelow = '\\u0625';\n this.alefMadda = '\\u0622';\n this.lam = '\\u0644';\n this.hamza = '\\u0621';\n this.zeroWidthJoiner = '\\u200D';\n this.hamzaAbove = '\\u0654';\n this.hamzaBelow = '\\u0655';\n this.wawHamza = '\\u0624';\n this.yehHamza = '\\u0626';\n this.waw = '\\u0648';\n this.alefMaksura = '\\u0649';\n this.yeh = '\\u064A';\n this.farsiYeh = '\\u06CC';\n this.shadda = '\\u0651';\n this.madda = '\\u0653';\n this.lwa = '\\uFEFB';\n this.lwawh = '\\uFEF7';\n this.lwawhb = '\\uFEF9';\n this.lwawm = '\\uFEF5';\n this.bwhb = '\\u06D3';\n this.fathatan = '\\u064B';\n this.superScriptalef = '\\u0670';\n this.vowel = 0x1;\n // #endregion\n //#region Fields\n this.arabicMapTable = new Dictionary();\n for (var i = 0; i < this.arabicCharTable.length; i++) {\n this.arabicMapTable.setValue(this.arabicCharTable[i][0], this.arabicCharTable[i]);\n }\n }\n //#endregion\n //#region implementation\n ArabicShapeRenderer.prototype.getCharacterShape = function (input, index) {\n if ((input >= this.hamza) && (input <= this.bwhb)) {\n var value = [];\n if (this.arabicMapTable.getValue(input)) {\n value = this.arabicMapTable.getValue(input);\n return value[index + 1];\n }\n }\n else if (input >= this.lwawm && input <= this.lwa) {\n return (input);\n }\n return input;\n };\n ArabicShapeRenderer.prototype.shape = function (text, level) {\n var builder = '';\n var str2 = '';\n for (var i = 0; i < text.length; i++) {\n var c = text[i];\n if (c >= '؀' && c <= 'ۿ') {\n //if(c>= 0x0600.toString() && c<= 0x06FF.toString()) {\n str2 = str2 + c;\n }\n else {\n if (str2.length > 0) {\n var st = this.doShape(str2.toString(), 0);\n builder = builder + st;\n str2 = '';\n }\n builder = builder + c;\n }\n }\n if (str2.length > 0) {\n var st = this.doShape(str2.toString(), 0);\n builder = builder + st;\n }\n return builder.toString();\n };\n ArabicShapeRenderer.prototype.doShape = function (input, level) {\n var str = '';\n var ligature = 0;\n var len = 0;\n var i = 0;\n var next = '';\n var previous = new ArabicShape();\n var present = new ArabicShape();\n while (i < input.length) {\n next = input[i++];\n ligature = this.ligature(next, present);\n if (ligature === 0) {\n var shapeCount = this.getShapeCount(next);\n len = (shapeCount === 1) ? 0 : 2;\n if (previous.Shapes > 2) {\n len += 1;\n }\n len = len % (present.Shapes);\n present.Value = this.getCharacterShape(present.Value, len);\n str = this.append(str, previous, level);\n previous = present;\n present = new ArabicShape();\n present.Value = next;\n present.Shapes = shapeCount;\n present.Ligature++;\n }\n }\n len = (previous.Shapes > 2) ? 1 : 0;\n len = len % (present.Shapes);\n present.Value = this.getCharacterShape(present.Value, len);\n str = this.append(str, previous, level);\n str = this.append(str, present, level);\n return str.toString();\n };\n ArabicShapeRenderer.prototype.append = function (builder, shape, level) {\n if (shape.Value !== '') {\n builder = builder + shape.Value;\n shape.Ligature -= 1;\n if (shape.Type !== '') {\n if ((level & this.vowel) === 0) {\n builder = builder + shape.Type;\n shape.Ligature -= 1;\n }\n else {\n shape.Ligature -= 1;\n }\n }\n if (shape.vowel !== '') {\n if ((level & this.vowel) === 0) {\n builder = builder + shape.vowel;\n shape.Ligature -= 1;\n }\n else {\n shape.Ligature -= 1;\n }\n }\n }\n return builder;\n };\n ArabicShapeRenderer.prototype.ligature = function (value, shape) {\n if (shape.Value !== '') {\n var result = 0;\n if ((value >= this.fathatan && value <= this.hamzaBelow) || value === this.superScriptalef) {\n result = 1;\n if ((shape.vowel !== '') && (value !== this.shadda)) {\n result = 2;\n }\n if (value === this.shadda) {\n if (shape.Type == null) {\n shape.Type = this.shadda;\n }\n else {\n return 0;\n }\n }\n else if (value === this.hamzaBelow) {\n if (shape.Value === this.alef) {\n shape.Value = this.alefHamzaBelow;\n result = 2;\n }\n else if (value === this.lwa) {\n shape.Value = this.lwawhb;\n result = 2;\n }\n else {\n shape.Type = this.hamzaBelow;\n }\n }\n else if (value === this.hamzaAbove) {\n if (shape.Value === this.alef) {\n shape.Value = this.alefHamza;\n result = 2;\n }\n else if (shape.Value === this.lwa) {\n shape.Value = this.lwawh;\n result = 2;\n }\n else if (shape.Value === this.waw) {\n shape.Value = this.wawHamza;\n result = 2;\n }\n else if (shape.Value === this.yeh || shape.Value === this.alefMaksura || shape.Value === this.farsiYeh) {\n shape.Value = this.yehHamza;\n result = 2;\n }\n else {\n shape.Type = this.hamzaAbove;\n }\n }\n else if (value === this.madda) {\n if (shape.Value === this.alef) {\n shape.Value = this.alefMadda;\n result = 2;\n }\n }\n else {\n shape.vowel = value;\n }\n if (result === 1) {\n shape.Ligature++;\n }\n return result;\n }\n if (shape.vowel !== '') {\n return 0;\n }\n if (shape.Value === this.lam) {\n if (value === this.alef) {\n shape.Value = this.lwa;\n shape.Shapes = 2;\n result = 3;\n }\n else if (value === this.alefHamza) {\n shape.Value = this.lwawh;\n shape.Shapes = 2;\n result = 3;\n }\n else if (value === this.alefHamzaBelow) {\n shape.Value = this.lwawhb;\n shape.Shapes = 2;\n result = 3;\n }\n else if (value === this.alefMadda) {\n shape.Value = this.lwawm;\n shape.Shapes = 2;\n result = 3;\n }\n }\n // else if (shape.Value === '') {\n // shape.Value = value;\n // shape.Shapes = this.getShapeCount(value);\n // result = 1;\n // }\n return result;\n }\n else {\n return 0;\n }\n };\n ArabicShapeRenderer.prototype.getShapeCount = function (shape) {\n if ((shape >= this.hamza) && (shape <= this.bwhb) && !((shape >= this.fathatan && shape <= this.hamzaBelow)\n || shape === this.superScriptalef)) {\n var c = [];\n if (this.arabicMapTable.getValue(shape)) {\n c = this.arabicMapTable.getValue(shape);\n return c.length - 1;\n }\n }\n else if (shape === this.zeroWidthJoiner) {\n return 4;\n }\n return 1;\n };\n return ArabicShapeRenderer;\n}());\nexport { ArabicShapeRenderer };\n//#endregion\n//#region Internals\nvar ArabicShape = /** @class */ (function () {\n function ArabicShape() {\n //#region Fields\n this.shapeValue = '';\n this.shapeType = '';\n this.shapeVowel = '';\n this.shapeLigature = 0;\n this.shapeShapes = 1;\n //#endregion\n }\n Object.defineProperty(ArabicShape.prototype, \"Value\", {\n //#endregion\n //#region Properties \n /**\n * Gets or sets the values.\n * @private\n */\n get: function () {\n return this.shapeValue;\n },\n set: function (value) {\n this.shapeValue = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ArabicShape.prototype, \"Type\", {\n /**\n * Gets or sets the values.\n * @private\n */\n get: function () {\n return this.shapeType;\n },\n set: function (value) {\n this.shapeType = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ArabicShape.prototype, \"vowel\", {\n /**\n * Gets or sets the values.\n * @private\n */\n get: function () {\n return this.shapeVowel;\n },\n set: function (value) {\n this.shapeVowel = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ArabicShape.prototype, \"Ligature\", {\n /**\n * Gets or sets the values.\n * @private\n */\n get: function () {\n return this.shapeLigature;\n },\n set: function (value) {\n this.shapeLigature = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ArabicShape.prototype, \"Shapes\", {\n /**\n * Gets or sets the values.\n * @private\n */\n get: function () {\n return this.shapeShapes;\n },\n set: function (value) {\n this.shapeShapes = value;\n },\n enumerable: true,\n configurable: true\n });\n return ArabicShape;\n}());\nexport { ArabicShape };\n//#endregion\n","/**\n * Bidi.ts class for EJ2-PDF\n */\nimport { Dictionary } from './../../../collections/dictionary';\n/**\n * `Metrics` of the font.\n * @private\n */\nvar Bidi = /** @class */ (function () {\n //#endregion\n //#region Constructor\n function Bidi() {\n //#region Fields\n this.indexes = [];\n this.indexLevels = [];\n this.mirroringShapeCharacters = new Dictionary();\n this.update();\n }\n //#endregion\n //#region implementation\n Bidi.prototype.doMirrorShaping = function (text) {\n var result = [];\n for (var i = 0; i < text.length; i++) {\n if (((this.indexLevels[i] & 1) === 1) && this.mirroringShapeCharacters.containsKey(text[i].charCodeAt(0))) {\n result[i] = String.fromCharCode(this.mirroringShapeCharacters.getValue(text[i].charCodeAt(0)));\n }\n else {\n result[i] = text[i].toString();\n }\n }\n var res = '';\n for (var j = 0; j < result.length; j++) {\n res = res + result[j];\n }\n return res;\n };\n Bidi.prototype.getLogicalToVisualString = function (inputText, isRtl) {\n var rtlCharacters = new RtlCharacters();\n this.indexLevels = rtlCharacters.getVisualOrder(inputText, isRtl);\n this.setDefaultIndexLevel();\n this.doOrder(0, this.indexLevels.length - 1);\n var text = this.doMirrorShaping(inputText);\n //let text : string = inputText;\n var resultBuilder = '';\n for (var i = 0; i < this.indexes.length; i++) {\n var index = this.indexes[i];\n resultBuilder += text[index];\n }\n return resultBuilder.toString();\n };\n Bidi.prototype.setDefaultIndexLevel = function () {\n for (var i = 0; i < this.indexLevels.length; i++) {\n this.indexes[i] = i;\n }\n };\n Bidi.prototype.doOrder = function (sIndex, eIndex) {\n var max = this.indexLevels[sIndex];\n var min = max;\n var odd = max;\n var even = max;\n for (var i = sIndex + 1; i <= eIndex; ++i) {\n var data = this.indexLevels[i];\n if (data > max) {\n max = data;\n }\n else if (data < min) {\n min = data;\n }\n odd &= data;\n even |= data;\n }\n if ((even & 1) === 0) {\n return;\n }\n if ((odd & 1) === 1) {\n this.reArrange(sIndex, eIndex + 1);\n return;\n }\n min |= 1;\n while (max >= min) {\n var pstart = sIndex;\n /*tslint:disable:no-constant-condition */\n while (true) {\n while (pstart <= eIndex) {\n if (this.indexLevels[pstart] >= max) {\n break;\n }\n pstart += 1;\n }\n if (pstart > eIndex) {\n break;\n }\n var pend = pstart + 1;\n while (pend <= eIndex) {\n if (this.indexLevels[pend] < max) {\n break;\n }\n pend += 1;\n }\n this.reArrange(pstart, pend);\n pstart = pend + 1;\n }\n max -= 1;\n }\n };\n Bidi.prototype.reArrange = function (i, j) {\n var length = (i + j) / 2;\n --j;\n for (; i < length; ++i, --j) {\n var temp = this.indexes[i];\n this.indexes[i] = this.indexes[j];\n this.indexes[j] = temp;\n }\n };\n Bidi.prototype.update = function () {\n this.mirroringShapeCharacters.setValue(40, 41);\n this.mirroringShapeCharacters.setValue(41, 40);\n this.mirroringShapeCharacters.setValue(60, 62);\n this.mirroringShapeCharacters.setValue(62, 60);\n this.mirroringShapeCharacters.setValue(91, 93);\n this.mirroringShapeCharacters.setValue(93, 91);\n this.mirroringShapeCharacters.setValue(123, 125);\n this.mirroringShapeCharacters.setValue(125, 123);\n this.mirroringShapeCharacters.setValue(171, 187);\n this.mirroringShapeCharacters.setValue(187, 171);\n this.mirroringShapeCharacters.setValue(8249, 8250);\n this.mirroringShapeCharacters.setValue(8250, 8249);\n this.mirroringShapeCharacters.setValue(8261, 8262);\n this.mirroringShapeCharacters.setValue(8262, 8261);\n this.mirroringShapeCharacters.setValue(8317, 8318);\n this.mirroringShapeCharacters.setValue(8318, 8317);\n this.mirroringShapeCharacters.setValue(8333, 8334);\n this.mirroringShapeCharacters.setValue(8334, 8333);\n this.mirroringShapeCharacters.setValue(8712, 8715);\n this.mirroringShapeCharacters.setValue(8713, 8716);\n this.mirroringShapeCharacters.setValue(8714, 8717);\n this.mirroringShapeCharacters.setValue(8715, 8712);\n this.mirroringShapeCharacters.setValue(8716, 8713);\n this.mirroringShapeCharacters.setValue(8717, 8714);\n this.mirroringShapeCharacters.setValue(8725, 10741);\n this.mirroringShapeCharacters.setValue(8764, 8765);\n this.mirroringShapeCharacters.setValue(8765, 8764);\n this.mirroringShapeCharacters.setValue(8771, 8909);\n this.mirroringShapeCharacters.setValue(8786, 8787);\n this.mirroringShapeCharacters.setValue(8787, 8786);\n this.mirroringShapeCharacters.setValue(8788, 8789);\n this.mirroringShapeCharacters.setValue(8789, 8788);\n this.mirroringShapeCharacters.setValue(8804, 8805);\n this.mirroringShapeCharacters.setValue(8805, 8804);\n this.mirroringShapeCharacters.setValue(8806, 8807);\n this.mirroringShapeCharacters.setValue(8807, 8806);\n this.mirroringShapeCharacters.setValue(8808, 8809);\n this.mirroringShapeCharacters.setValue(8809, 8808);\n this.mirroringShapeCharacters.setValue(8810, 8811);\n this.mirroringShapeCharacters.setValue(8811, 8810);\n this.mirroringShapeCharacters.setValue(8814, 8815);\n this.mirroringShapeCharacters.setValue(8815, 8814);\n this.mirroringShapeCharacters.setValue(8816, 8817);\n this.mirroringShapeCharacters.setValue(8817, 8816);\n this.mirroringShapeCharacters.setValue(8818, 8819);\n this.mirroringShapeCharacters.setValue(8819, 8818);\n this.mirroringShapeCharacters.setValue(8820, 8821);\n this.mirroringShapeCharacters.setValue(8821, 8820);\n this.mirroringShapeCharacters.setValue(8822, 8823);\n this.mirroringShapeCharacters.setValue(8823, 8822);\n this.mirroringShapeCharacters.setValue(8824, 8825);\n this.mirroringShapeCharacters.setValue(8825, 8824);\n this.mirroringShapeCharacters.setValue(8826, 8827);\n this.mirroringShapeCharacters.setValue(8827, 8826);\n this.mirroringShapeCharacters.setValue(8828, 8829);\n this.mirroringShapeCharacters.setValue(8829, 8828);\n this.mirroringShapeCharacters.setValue(8830, 8831);\n this.mirroringShapeCharacters.setValue(8831, 8830);\n this.mirroringShapeCharacters.setValue(8832, 8833);\n this.mirroringShapeCharacters.setValue(8833, 8832);\n this.mirroringShapeCharacters.setValue(8834, 8835);\n this.mirroringShapeCharacters.setValue(8835, 8834);\n this.mirroringShapeCharacters.setValue(8836, 8837);\n this.mirroringShapeCharacters.setValue(8837, 8836);\n this.mirroringShapeCharacters.setValue(8838, 8839);\n this.mirroringShapeCharacters.setValue(8839, 8838);\n this.mirroringShapeCharacters.setValue(8840, 8841);\n this.mirroringShapeCharacters.setValue(8841, 8840);\n this.mirroringShapeCharacters.setValue(8842, 8843);\n this.mirroringShapeCharacters.setValue(8843, 8842);\n this.mirroringShapeCharacters.setValue(8847, 8848);\n this.mirroringShapeCharacters.setValue(8848, 8847);\n this.mirroringShapeCharacters.setValue(8849, 8850);\n this.mirroringShapeCharacters.setValue(8850, 8849);\n this.mirroringShapeCharacters.setValue(8856, 10680);\n this.mirroringShapeCharacters.setValue(8866, 8867);\n this.mirroringShapeCharacters.setValue(8867, 8866);\n this.mirroringShapeCharacters.setValue(8870, 10974);\n this.mirroringShapeCharacters.setValue(8872, 10980);\n this.mirroringShapeCharacters.setValue(8873, 10979);\n this.mirroringShapeCharacters.setValue(8875, 10981);\n this.mirroringShapeCharacters.setValue(8880, 8881);\n this.mirroringShapeCharacters.setValue(8881, 8880);\n this.mirroringShapeCharacters.setValue(8882, 8883);\n this.mirroringShapeCharacters.setValue(8883, 8882);\n this.mirroringShapeCharacters.setValue(8884, 8885);\n this.mirroringShapeCharacters.setValue(8885, 8884);\n /*tslint:disable:max-func-body-length */\n this.mirroringShapeCharacters.setValue(8886, 8887);\n this.mirroringShapeCharacters.setValue(8887, 8886);\n this.mirroringShapeCharacters.setValue(8905, 8906);\n this.mirroringShapeCharacters.setValue(8906, 8905);\n this.mirroringShapeCharacters.setValue(8907, 8908);\n this.mirroringShapeCharacters.setValue(8908, 8907);\n this.mirroringShapeCharacters.setValue(8909, 8771);\n this.mirroringShapeCharacters.setValue(8912, 8913);\n this.mirroringShapeCharacters.setValue(8913, 8912);\n this.mirroringShapeCharacters.setValue(8918, 8919);\n this.mirroringShapeCharacters.setValue(8919, 8918);\n this.mirroringShapeCharacters.setValue(8920, 8921);\n this.mirroringShapeCharacters.setValue(8921, 8920);\n this.mirroringShapeCharacters.setValue(8922, 8923);\n this.mirroringShapeCharacters.setValue(8923, 8922);\n this.mirroringShapeCharacters.setValue(8924, 8925);\n this.mirroringShapeCharacters.setValue(8925, 8924);\n this.mirroringShapeCharacters.setValue(8926, 8927);\n this.mirroringShapeCharacters.setValue(8927, 8926);\n this.mirroringShapeCharacters.setValue(8928, 8929);\n this.mirroringShapeCharacters.setValue(8929, 8928);\n this.mirroringShapeCharacters.setValue(8930, 8931);\n this.mirroringShapeCharacters.setValue(8931, 8930);\n this.mirroringShapeCharacters.setValue(8932, 8933);\n this.mirroringShapeCharacters.setValue(8933, 8932);\n this.mirroringShapeCharacters.setValue(8934, 8935);\n this.mirroringShapeCharacters.setValue(8935, 8934);\n this.mirroringShapeCharacters.setValue(8936, 8937);\n this.mirroringShapeCharacters.setValue(8937, 8936);\n this.mirroringShapeCharacters.setValue(8938, 8939);\n this.mirroringShapeCharacters.setValue(8939, 8938);\n this.mirroringShapeCharacters.setValue(8940, 8941);\n this.mirroringShapeCharacters.setValue(8941, 8940);\n this.mirroringShapeCharacters.setValue(8944, 8945);\n this.mirroringShapeCharacters.setValue(8945, 8944);\n this.mirroringShapeCharacters.setValue(8946, 8954);\n this.mirroringShapeCharacters.setValue(8947, 8955);\n this.mirroringShapeCharacters.setValue(8948, 8956);\n this.mirroringShapeCharacters.setValue(8950, 8957);\n this.mirroringShapeCharacters.setValue(8951, 8958);\n this.mirroringShapeCharacters.setValue(8954, 8946);\n this.mirroringShapeCharacters.setValue(8955, 8947);\n this.mirroringShapeCharacters.setValue(8956, 8948);\n this.mirroringShapeCharacters.setValue(8957, 8950);\n this.mirroringShapeCharacters.setValue(8958, 8951);\n this.mirroringShapeCharacters.setValue(8968, 8969);\n this.mirroringShapeCharacters.setValue(8969, 8968);\n this.mirroringShapeCharacters.setValue(8970, 8971);\n this.mirroringShapeCharacters.setValue(8971, 8970);\n this.mirroringShapeCharacters.setValue(9001, 9002);\n this.mirroringShapeCharacters.setValue(9002, 9001);\n this.mirroringShapeCharacters.setValue(10088, 10089);\n this.mirroringShapeCharacters.setValue(10089, 10088);\n this.mirroringShapeCharacters.setValue(10090, 10091);\n this.mirroringShapeCharacters.setValue(10091, 10090);\n this.mirroringShapeCharacters.setValue(10092, 10093);\n this.mirroringShapeCharacters.setValue(10093, 10092);\n this.mirroringShapeCharacters.setValue(10094, 10095);\n this.mirroringShapeCharacters.setValue(10095, 10094);\n this.mirroringShapeCharacters.setValue(10096, 10097);\n this.mirroringShapeCharacters.setValue(10097, 10096);\n this.mirroringShapeCharacters.setValue(10098, 10099);\n this.mirroringShapeCharacters.setValue(10099, 10098);\n this.mirroringShapeCharacters.setValue(10100, 10101);\n this.mirroringShapeCharacters.setValue(10101, 10100);\n this.mirroringShapeCharacters.setValue(10197, 10198);\n this.mirroringShapeCharacters.setValue(10198, 10197);\n this.mirroringShapeCharacters.setValue(10205, 10206);\n this.mirroringShapeCharacters.setValue(10206, 10205);\n this.mirroringShapeCharacters.setValue(10210, 10211);\n this.mirroringShapeCharacters.setValue(10211, 10210);\n this.mirroringShapeCharacters.setValue(10212, 10213);\n this.mirroringShapeCharacters.setValue(10213, 10212);\n this.mirroringShapeCharacters.setValue(10214, 10215);\n this.mirroringShapeCharacters.setValue(10215, 10214);\n this.mirroringShapeCharacters.setValue(10216, 10217);\n this.mirroringShapeCharacters.setValue(10217, 10216);\n this.mirroringShapeCharacters.setValue(10218, 10219);\n this.mirroringShapeCharacters.setValue(10219, 10218);\n this.mirroringShapeCharacters.setValue(10627, 10628);\n this.mirroringShapeCharacters.setValue(10628, 10627);\n this.mirroringShapeCharacters.setValue(10629, 10630);\n this.mirroringShapeCharacters.setValue(10630, 10629);\n this.mirroringShapeCharacters.setValue(10631, 10632);\n this.mirroringShapeCharacters.setValue(10632, 10631);\n this.mirroringShapeCharacters.setValue(10633, 10634);\n this.mirroringShapeCharacters.setValue(10634, 10633);\n this.mirroringShapeCharacters.setValue(10635, 10636);\n this.mirroringShapeCharacters.setValue(10636, 10635);\n this.mirroringShapeCharacters.setValue(10637, 10640);\n this.mirroringShapeCharacters.setValue(10638, 10639);\n this.mirroringShapeCharacters.setValue(10639, 10638);\n this.mirroringShapeCharacters.setValue(10640, 10637);\n this.mirroringShapeCharacters.setValue(10641, 10642);\n this.mirroringShapeCharacters.setValue(10642, 10641);\n this.mirroringShapeCharacters.setValue(10643, 10644);\n this.mirroringShapeCharacters.setValue(10644, 10643);\n this.mirroringShapeCharacters.setValue(10645, 10646);\n this.mirroringShapeCharacters.setValue(10646, 10645);\n this.mirroringShapeCharacters.setValue(10647, 10648);\n this.mirroringShapeCharacters.setValue(10648, 10647);\n this.mirroringShapeCharacters.setValue(10680, 8856);\n this.mirroringShapeCharacters.setValue(10688, 10689);\n this.mirroringShapeCharacters.setValue(10689, 10688);\n this.mirroringShapeCharacters.setValue(10692, 10693);\n this.mirroringShapeCharacters.setValue(10693, 10692);\n this.mirroringShapeCharacters.setValue(10703, 10704);\n this.mirroringShapeCharacters.setValue(10704, 10703);\n this.mirroringShapeCharacters.setValue(10705, 10706);\n this.mirroringShapeCharacters.setValue(10706, 10705);\n this.mirroringShapeCharacters.setValue(10708, 10709);\n this.mirroringShapeCharacters.setValue(10709, 10708);\n this.mirroringShapeCharacters.setValue(10712, 10713);\n this.mirroringShapeCharacters.setValue(10713, 10712);\n this.mirroringShapeCharacters.setValue(10714, 10715);\n this.mirroringShapeCharacters.setValue(10715, 10714);\n this.mirroringShapeCharacters.setValue(10741, 8725);\n this.mirroringShapeCharacters.setValue(10744, 10745);\n this.mirroringShapeCharacters.setValue(10745, 10744);\n this.mirroringShapeCharacters.setValue(10748, 10749);\n this.mirroringShapeCharacters.setValue(10749, 10748);\n this.mirroringShapeCharacters.setValue(10795, 10796);\n this.mirroringShapeCharacters.setValue(10796, 10795);\n this.mirroringShapeCharacters.setValue(10797, 10796);\n this.mirroringShapeCharacters.setValue(10798, 10797);\n this.mirroringShapeCharacters.setValue(10804, 10805);\n this.mirroringShapeCharacters.setValue(10805, 10804);\n this.mirroringShapeCharacters.setValue(10812, 10813);\n this.mirroringShapeCharacters.setValue(10813, 10812);\n this.mirroringShapeCharacters.setValue(10852, 10853);\n this.mirroringShapeCharacters.setValue(10853, 10852);\n this.mirroringShapeCharacters.setValue(10873, 10874);\n this.mirroringShapeCharacters.setValue(10874, 10873);\n this.mirroringShapeCharacters.setValue(10877, 10878);\n this.mirroringShapeCharacters.setValue(10878, 10877);\n this.mirroringShapeCharacters.setValue(10879, 10880);\n this.mirroringShapeCharacters.setValue(10880, 10879);\n this.mirroringShapeCharacters.setValue(10881, 10882);\n this.mirroringShapeCharacters.setValue(10882, 10881);\n this.mirroringShapeCharacters.setValue(10883, 10884);\n this.mirroringShapeCharacters.setValue(10884, 10883);\n this.mirroringShapeCharacters.setValue(10891, 10892);\n this.mirroringShapeCharacters.setValue(10892, 10891);\n this.mirroringShapeCharacters.setValue(10897, 10898);\n this.mirroringShapeCharacters.setValue(10898, 10897);\n this.mirroringShapeCharacters.setValue(10899, 10900);\n this.mirroringShapeCharacters.setValue(10900, 10899);\n this.mirroringShapeCharacters.setValue(10901, 10902);\n this.mirroringShapeCharacters.setValue(10902, 10901);\n this.mirroringShapeCharacters.setValue(10903, 10904);\n this.mirroringShapeCharacters.setValue(10904, 10903);\n this.mirroringShapeCharacters.setValue(10905, 10906);\n this.mirroringShapeCharacters.setValue(10906, 10905);\n this.mirroringShapeCharacters.setValue(10907, 10908);\n this.mirroringShapeCharacters.setValue(10908, 10907);\n this.mirroringShapeCharacters.setValue(10913, 10914);\n this.mirroringShapeCharacters.setValue(10914, 10913);\n this.mirroringShapeCharacters.setValue(10918, 10919);\n this.mirroringShapeCharacters.setValue(10919, 10918);\n this.mirroringShapeCharacters.setValue(10920, 10921);\n this.mirroringShapeCharacters.setValue(10921, 10920);\n this.mirroringShapeCharacters.setValue(10922, 10923);\n this.mirroringShapeCharacters.setValue(10923, 10922);\n this.mirroringShapeCharacters.setValue(10924, 10925);\n this.mirroringShapeCharacters.setValue(10925, 10924);\n this.mirroringShapeCharacters.setValue(10927, 10928);\n this.mirroringShapeCharacters.setValue(10928, 10927);\n this.mirroringShapeCharacters.setValue(10931, 10932);\n this.mirroringShapeCharacters.setValue(10932, 10931);\n this.mirroringShapeCharacters.setValue(10939, 10940);\n this.mirroringShapeCharacters.setValue(10940, 10939);\n this.mirroringShapeCharacters.setValue(10941, 10942);\n this.mirroringShapeCharacters.setValue(10942, 10941);\n this.mirroringShapeCharacters.setValue(10943, 10944);\n this.mirroringShapeCharacters.setValue(10944, 10943);\n this.mirroringShapeCharacters.setValue(10945, 10946);\n this.mirroringShapeCharacters.setValue(10946, 10945);\n this.mirroringShapeCharacters.setValue(10947, 10948);\n this.mirroringShapeCharacters.setValue(10948, 10947);\n this.mirroringShapeCharacters.setValue(10949, 10950);\n this.mirroringShapeCharacters.setValue(10950, 10949);\n this.mirroringShapeCharacters.setValue(10957, 10958);\n this.mirroringShapeCharacters.setValue(10958, 10957);\n this.mirroringShapeCharacters.setValue(10959, 10960);\n this.mirroringShapeCharacters.setValue(10960, 10959);\n this.mirroringShapeCharacters.setValue(10961, 10962);\n this.mirroringShapeCharacters.setValue(10962, 10961);\n this.mirroringShapeCharacters.setValue(10963, 10964);\n this.mirroringShapeCharacters.setValue(10964, 10963);\n this.mirroringShapeCharacters.setValue(10965, 10966);\n this.mirroringShapeCharacters.setValue(10966, 10965);\n this.mirroringShapeCharacters.setValue(10974, 8870);\n this.mirroringShapeCharacters.setValue(10979, 8873);\n this.mirroringShapeCharacters.setValue(10980, 8872);\n this.mirroringShapeCharacters.setValue(10981, 8875);\n this.mirroringShapeCharacters.setValue(10988, 10989);\n this.mirroringShapeCharacters.setValue(10989, 10988);\n this.mirroringShapeCharacters.setValue(10999, 11000);\n this.mirroringShapeCharacters.setValue(11000, 10999);\n this.mirroringShapeCharacters.setValue(11001, 11002);\n this.mirroringShapeCharacters.setValue(11002, 11001);\n this.mirroringShapeCharacters.setValue(12296, 12297);\n this.mirroringShapeCharacters.setValue(12297, 12296);\n this.mirroringShapeCharacters.setValue(12298, 12299);\n this.mirroringShapeCharacters.setValue(12299, 12298);\n this.mirroringShapeCharacters.setValue(12300, 12301);\n this.mirroringShapeCharacters.setValue(12301, 12300);\n this.mirroringShapeCharacters.setValue(12302, 12303);\n this.mirroringShapeCharacters.setValue(12303, 12302);\n this.mirroringShapeCharacters.setValue(12304, 12305);\n this.mirroringShapeCharacters.setValue(12305, 12304);\n this.mirroringShapeCharacters.setValue(12308, 12309);\n this.mirroringShapeCharacters.setValue(12309, 12308);\n this.mirroringShapeCharacters.setValue(12310, 12311);\n this.mirroringShapeCharacters.setValue(12311, 12310);\n this.mirroringShapeCharacters.setValue(12312, 12313);\n this.mirroringShapeCharacters.setValue(12313, 12312);\n this.mirroringShapeCharacters.setValue(12314, 12315);\n this.mirroringShapeCharacters.setValue(12315, 12314);\n this.mirroringShapeCharacters.setValue(65288, 65289);\n this.mirroringShapeCharacters.setValue(65289, 65288);\n this.mirroringShapeCharacters.setValue(65308, 65310);\n this.mirroringShapeCharacters.setValue(65310, 65308);\n this.mirroringShapeCharacters.setValue(65339, 65341);\n this.mirroringShapeCharacters.setValue(65341, 65339);\n this.mirroringShapeCharacters.setValue(65371, 65373);\n this.mirroringShapeCharacters.setValue(65373, 65371);\n this.mirroringShapeCharacters.setValue(65375, 65376);\n this.mirroringShapeCharacters.setValue(65376, 65375);\n this.mirroringShapeCharacters.setValue(65378, 65379);\n this.mirroringShapeCharacters.setValue(65379, 65378);\n };\n return Bidi;\n}());\nexport { Bidi };\nvar RtlCharacters = /** @class */ (function () {\n //#endregion\n //#region constructors\n function RtlCharacters() {\n //#region fields\n /// \n /// Specifies the character types.\n /// \n this.types = [];\n /// \n /// Specifies the text order (RTL or LTR).\n /// \n this.textOrder = -1;\n /// \n /// Specifies the RTL character types.\n /// \n /* tslint:disable-next-line:prefer-array-literal */\n this.rtlCharacterTypes = new Array(65536);\n //#endregion\n //#region constants\n /// \n /// Left-to-Right (Non-European or non-Arabic digits).\n /// \n this.L = 0;\n /// \n /// Left-to-Right Embedding\n /// \n this.LRE = 1;\n /// \n /// Left-to-Right Override\n /// \n this.LRO = 2;\n /// \n /// Right-to-Left (Hebrew alphabet, and related punctuation).\n /// \n this.R = 3;\n /// \n /// Right-to-Left Arabic \n /// \n this.AL = 4;\n /// \n /// Right-to-Left Embedding.\n /// \n this.RLE = 5;\n /// \n /// Right-to-Left Override\n /// \n this.RLO = 6;\n /// \n /// Pop Directional Format\n /// \n this.PDF = 7;\n /// \n /// European Number (European digits, Eastern Arabic-Indic digits).\n /// \n this.EN = 8;\n /// \n /// European Number Separator (Plus sign, Minus sign).\n /// \n this.ES = 9;\n /// \n /// European Number Terminator (Degree sign, currency symbols).\n /// \n this.ET = 10;\n /// \n /// Arabic Number (Arabic-Indic digits, Arabic decimal and thousands separators).\n /// \n this.AN = 11;\n /// \n /// Common Number Separator (Colon, Comma, Full Stop, No-Break Space.\n /// \n this.CS = 12;\n /// \n /// Nonspacing Mark (Characters with the General_Category values).\n /// \n this.NSM = 13;\n /// \n /// Boundary Neutral (Default ignorables, non-characters, and control characters, other than those explicitly given other types.)\n /// \n this.BN = 14;\n /// \n /// Paragraph Separator (Paragraph separator, appropriate Newline Functions, higher-level protocol paragraph determination).\n /// \n this.B = 15;\n /// \n /// \tSegment Separator (tab).\n /// \n this.S = 16;\n /// \n /// Whitespace (Space, Figure space, Line separator, Form feed, General Punctuation spaces).\n /// \n this.WS = 17;\n /// \n /// Other Neutrals (All other characters, including object replacement character).\n /// \n this.ON = 18;\n /// \n /// RTL character types.\n /// \n this.charTypes = [\n this.L, this.EN, this.BN, this.ES, this.ES, this.S, this.ET, this.ET, this.B, this.AN, this.AN, this.S, this.CS, this.CS,\n this.WS, this.NSM, this.NSM, this.B, this.BN, 27, this.BN, 28, 30, this.B, 31, 31, this.S, 32, 32, this.WS, 33, 34,\n this.ON, 35, 37, this.ET, 38, 42, this.ON, 43, 43, this.ET, 44, 44, this.CS, 45, 45, this.ET, 46, 46, this.CS,\n 47, 47, this.CS, 48, 57, this.EN, 58, 58, this.CS, 59, 64, this.ON, 65, 90, this.L, 91, 96, this.ON, 97, 122, this.L,\n 123, 126, this.ON, 127, 132, this.BN, 133, 133, this.B, 134, 159, this.BN, 160, 160, this.CS,\n 161, 161, this.ON, 162, 165, this.ET, 166, 169, this.ON, 170, 170, this.L, 171, 175, this.ON,\n 176, 177, this.ET, 178, 179, this.EN, 180, 180, this.ON, 181, 181, this.L, 182, 184, this.ON,\n 185, 185, this.EN, 186, 186, this.L, 187, 191, this.ON, 192, 214, this.L, 215, 215, this.ON,\n 216, 246, this.L, 247, 247, this.ON, 248, 696, this.L, 697, 698, this.ON, 699, 705, this.L,\n 706, 719, this.ON, 720, 721, this.L, 722, 735, this.ON, 736, 740, this.L, 741, 749, this.ON,\n 750, 750, this.L, 751, 767, this.ON, 768, 855, this.NSM, 856, 860, this.L, 861, 879, this.NSM,\n 880, 883, this.L, 884, 885, this.ON, 886, 893, this.L, 894, 894, this.ON, 895, 899, this.L,\n 900, 901, this.ON, 902, 902, this.L, 903, 903, this.ON, 904, 1013, this.L, 1014, 1014, this.ON,\n 1015, 1154, this.L, 1155, 1158, this.NSM, 1159, 1159, this.L, 1160, 1161, this.NSM,\n 1162, 1417, this.L, 1418, 1418, this.ON, 1419, 1424, this.L, 1425, 1441, this.NSM,\n 1442, 1442, this.L, 1443, 1465, this.NSM, 1466, 1466, this.L, 1467, 1469, this.NSM,\n 1470, 1470, this.R, 1471, 1471, this.NSM, 1472, 1472, this.R, 1473, 1474, this.NSM,\n 1475, 1475, this.R, 1476, 1476, this.NSM, 1477, 1487, this.L, 1488, 1514, this.R,\n 1515, 1519, this.L, 1520, 1524, this.R, 1525, 1535, this.L, 1536, 1539, this.AL,\n 1540, 1547, this.L, 1548, 1548, this.CS, 1549, 1549, this.AL, 1550, 1551, this.ON,\n 1552, 1557, this.NSM, 1558, 1562, this.L, 1563, 1563, this.AL, 1564, 1566, this.L,\n 1567, 1567, this.AL, 1568, 1568, this.L, 1569, 1594, this.AL, 1595, 1599, this.L,\n 1600, 1610, this.AL, 1611, 1624, this.NSM, 1625, 1631, this.L, 1632, 1641, this.AN,\n 1642, 1642, this.ET, 1643, 1644, this.AN, 1645, 1647, this.AL, 1648, 1648, this.NSM,\n 1649, 1749, this.AL, 1750, 1756, this.NSM, 1757, 1757, this.AL, 1758, 1764, this.NSM,\n 1765, 1766, this.AL, 1767, 1768, this.NSM, 1769, 1769, this.ON, 1770, 1773, this.NSM,\n 1774, 1775, this.AL, 1776, 1785, this.EN, 1786, 1805, this.AL, 1806, 1806, this.L,\n 1807, 1807, this.BN, 1808, 1808, this.AL, 1809, 1809, this.NSM, 1810, 1839, this.AL,\n 1840, 1866, this.NSM, 1867, 1868, this.L, 1869, 1871, this.AL, 1872, 1919, this.L,\n 1920, 1957, this.AL, 1958, 1968, this.NSM, 1969, 1969, this.AL, 1970, 2304, this.L,\n 2305, 2306, this.NSM, 2307, 2363, this.L, 2364, 2364, this.NSM, 2365, 2368, this.L,\n 2369, 2376, this.NSM, 2377, 2380, this.L, 2381, 2381, this.NSM, 2382, 2384, this.L,\n 2385, 2388, this.NSM, 2389, 2401, this.L, 2402, 2403, this.NSM, 2404, 2432, this.L,\n 2433, 2433, this.NSM, 2434, 2491, this.L, 2492, 2492, this.NSM, 2493, 2496, this.L,\n 2497, 2500, this.NSM, 2501, 2508, this.L, 2509, 2509, this.NSM, 2510, 2529, this.L,\n 2530, 2531, this.NSM, 2532, 2545, this.L, 2546, 2547, this.ET, 2548, 2560, this.L,\n 2561, 2562, this.NSM, 2563, 2619, this.L, 2620, 2620, this.NSM, 2621, 2624, this.L,\n 2625, 2626, this.NSM, 2627, 2630, this.L, 2631, 2632, this.NSM, 2633, 2634, this.L,\n 2635, 2637, this.NSM, 2638, 2671, this.L, 2672, 2673, this.NSM, 2674, 2688, this.L,\n 2689, 2690, this.NSM, 2691, 2747, this.L, 2748, 2748, this.NSM, 2749, 2752, this.L,\n 2753, 2757, this.NSM, 2758, 2758, this.L, 2759, 2760, this.NSM, 2761, 2764, this.L,\n 2765, 2765, this.NSM, 2766, 2785, this.L, 2786, 2787, this.NSM, 2788, 2800, this.L,\n 2801, 2801, this.ET, 2802, 2816, this.L, 2817, 2817, this.NSM, 2818, 2875, this.L,\n 2876, 2876, this.NSM, 2877, 2878, this.L, 2879, 2879, this.NSM, 2880, 2880, this.L,\n 2881, 2883, this.NSM, 2884, 2892, this.L, 2893, 2893, this.NSM, 2894, 2901, this.L,\n 2902, 2902, this.NSM, 2903, 2945, this.L, 2946, 2946, this.NSM, 2947, 3007, this.L,\n 3008, 3008, this.NSM, 3009, 3020, this.L, 3021, 3021, this.NSM, 3022, 3058, this.L,\n 3059, 3064, this.ON, 3065, 3065, this.ET, 3066, 3066, this.ON, 3067, 3133, this.L,\n 3134, 3136, this.NSM, 3137, 3141, this.L, 3142, 3144, this.NSM, 3145, 3145, this.L,\n 3146, 3149, this.NSM, 3150, 3156, this.L, 3157, 3158, this.NSM, 3159, 3259, this.L,\n 3260, 3260, this.NSM, 3261, 3275, this.L, 3276, 3277, this.NSM, 3278, 3392, this.L,\n 3393, 3395, this.NSM, 3396, 3404, this.L, 3405, 3405, this.NSM, 3406, 3529, this.L,\n 3530, 3530, this.NSM, 3531, 3537, this.L, 3538, 3540, this.NSM, 3541, 3541, this.L,\n 3542, 3542, this.NSM, 3543, 3632, this.L, 3633, 3633, this.NSM, 3634, 3635, this.L,\n 3636, 3642, this.NSM, 3643, 3646, this.L, 3647, 3647, this.ET, 3648, 3654, this.L,\n 3655, 3662, this.NSM, 3663, 3760, this.L, 3761, 3761, this.NSM, 3762, 3763, this.L,\n 3764, 3769, this.NSM, 3770, 3770, this.L, 3771, 3772, this.NSM, 3773, 3783, this.L,\n 3784, 3789, this.NSM, 3790, 3863, this.L, 3864, 3865, this.NSM, 3866, 3892, this.L,\n 3893, 3893, this.NSM, 3894, 3894, this.L, 3895, 3895, this.NSM, 3896, 3896, this.L,\n 3897, 3897, this.NSM, 3898, 3901, this.ON, 3902, 3952, this.L, 3953, 3966, this.NSM,\n 3967, 3967, this.L, 3968, 3972, this.NSM, 3973, 3973, this.L, 3974, 3975, this.NSM,\n 3976, 3983, this.L, 3984, 3991, this.NSM, 3992, 3992, this.L, 3993, 4028, this.NSM,\n 4029, 4037, this.L, 4038, 4038, this.NSM, 4039, 4140, this.L, 4141, 4144, this.NSM,\n 4145, 4145, this.L, 4146, 4146, this.NSM, 4147, 4149, this.L, 4150, 4151, this.NSM,\n 4152, 4152, this.L, 4153, 4153, this.NSM, 4154, 4183, this.L, 4184, 4185, this.NSM,\n 4186, 5759, this.L, 5760, 5760, this.WS, 5761, 5786, this.L, 5787, 5788, this.ON,\n 5789, 5905, this.L, 5906, 5908, this.NSM, 5909, 5937, this.L, 5938, 5940, this.NSM,\n 5941, 5969, this.L, 5970, 5971, this.NSM, 5972, 6001, this.L, 6002, 6003, this.NSM,\n 6004, 6070, this.L, 6071, 6077, this.NSM, 6078, 6085, this.L, 6086, 6086, this.NSM,\n 6087, 6088, this.L, 6089, 6099, this.NSM, 6100, 6106, this.L, 6107, 6107, this.ET,\n 6108, 6108, this.L, 6109, 6109, this.NSM, 6110, 6127, this.L, 6128, 6137, this.ON,\n 6138, 6143, this.L, 6144, 6154, this.ON, 6155, 6157, this.NSM, 6158, 6158, this.WS,\n 6159, 6312, this.L, 6313, 6313, this.NSM, 6314, 6431, this.L, 6432, 6434, this.NSM,\n 6435, 6438, this.L, 6439, 6443, this.NSM, 6444, 6449, this.L, 6450, 6450, this.NSM,\n 6451, 6456, this.L, 6457, 6459, this.NSM, 6460, 6463, this.L, 6464, 6464, this.ON,\n 6465, 6467, this.L, 6468, 6469, this.ON, 6470, 6623, this.L, 6624, 6655, this.ON,\n 6656, 8124, this.L, 8125, 8125, this.ON, 8126, 8126, this.L, 8127, 8129, this.ON,\n 8130, 8140, this.L, 8141, 8143, this.ON, 8144, 8156, this.L, 8157, 8159, this.ON,\n 8160, 8172, this.L, 8173, 8175, this.ON, 8176, 8188, this.L, 8189, 8190, this.ON,\n 8191, 8191, this.L, 8192, 8202, this.WS, 8203, 8205, this.BN, 8206, 8206, this.L,\n 8207, 8207, this.R, 8208, 8231, this.ON, 8232, 8232, this.WS, 8233, 8233, this.B,\n 8234, 8234, this.LRE, 8235, 8235, this.RLE, 8236, 8236, this.PDF, 8237, 8237, this.LRO,\n 8238, 8238, this.RLO, 8239, 8239, this.WS, 8240, 8244, this.ET, 8245, 8276, this.ON,\n 8277, 8278, this.L, 8279, 8279, this.ON, 8280, 8286, this.L, 8287, 8287, this.WS,\n 8288, 8291, this.BN, 8292, 8297, this.L, 8298, 8303, this.BN, 8304, 8304, this.EN,\n 8305, 8307, this.L, 8308, 8313, this.EN, 8314, 8315, this.ET, 8316, 8318, this.ON,\n 8319, 8319, this.L, 8320, 8329, this.EN, 8330, 8331, this.ET, 8332, 8334, this.ON,\n 8335, 8351, this.L, 8352, 8369, this.ET, 8370, 8399, this.L, 8400, 8426, this.NSM,\n 8427, 8447, this.L, 8448, 8449, this.ON, 8450, 8450, this.L, 8451, 8454, this.ON,\n 8455, 8455, this.L, 8456, 8457, this.ON, 8458, 8467, this.L, 8468, 8468, this.ON,\n 8469, 8469, this.L, 8470, 8472, this.ON, 8473, 8477, this.L, 8478, 8483, this.ON,\n 8484, 8484, this.L, 8485, 8485, this.ON, 8486, 8486, this.L, 8487, 8487, this.ON,\n 8488, 8488, this.L, 8489, 8489, this.ON, 8490, 8493, this.L, 8494, 8494, this.ET,\n 8495, 8497, this.L, 8498, 8498, this.ON, 8499, 8505, this.L, 8506, 8507, this.ON,\n 8508, 8511, this.L, 8512, 8516, this.ON, 8517, 8521, this.L, 8522, 8523, this.ON,\n 8524, 8530, this.L, 8531, 8543, this.ON, 8544, 8591, this.L, 8592, 8721, this.ON,\n 8722, 8723, this.ET, 8724, 9013, this.ON, 9014, 9082, this.L, 9083, 9108, this.ON,\n 9109, 9109, this.L, 9110, 9168, this.ON, 9169, 9215, this.L, 9216, 9254, this.ON,\n 9255, 9279, this.L, 9280, 9290, this.ON, 9291, 9311, this.L, 9312, 9371, this.EN,\n 9372, 9449, this.L, 9450, 9450, this.EN, 9451, 9751, this.ON, 9752, 9752, this.L,\n 9753, 9853, this.ON, 9854, 9855, this.L, 9856, 9873, this.ON, 9874, 9887, this.L,\n 9888, 9889, this.ON, 9890, 9984, this.L, 9985, 9988, this.ON, 9989, 9989, this.L,\n 9990, 9993, this.ON, 9994, 9995, this.L, 9996, 10023, this.ON, 10024, 10024, this.L,\n 10025, 10059, this.ON, 10060, 10060, this.L, 10061, 10061, this.ON, 10062, 10062, this.L,\n 10063, 10066, this.ON, 10067, 10069, this.L, 10070, 10070, this.ON, 10071, 10071, this.L,\n 10072, 10078, this.ON, 10079, 10080, this.L, 10081, 10132, this.ON, 10133, 10135, this.L,\n 10136, 10159, this.ON, 10160, 10160, this.L, 10161, 10174, this.ON, 10175, 10191, this.L,\n 10192, 10219, this.ON, 10220, 10223, this.L, 10224, 11021, this.ON, 11022, 11903, this.L,\n 11904, 11929, this.ON, 11930, 11930, this.L, 11931, 12019, this.ON, 12020, 12031, this.L,\n 12032, 12245, this.ON, 12246, 12271, this.L, 12272, 12283, this.ON, 12284, 12287, this.L,\n 12288, 12288, this.WS, 12289, 12292, this.ON, 12293, 12295, this.L, 12296, 12320, this.ON,\n 12321, 12329, this.L, 12330, 12335, this.NSM, 12336, 12336, this.ON, 12337, 12341, this.L,\n 12342, 12343, this.ON, 12344, 12348, this.L, 12349, 12351, this.ON, 12352, 12440, this.L,\n 12441, 12442, this.NSM, 12443, 12444, this.ON, 12445, 12447, this.L, 12448, 12448, this.ON,\n 12449, 12538, this.L, 12539, 12539, this.ON, 12540, 12828, this.L, 12829, 12830, this.ON,\n 12831, 12879, this.L, 12880, 12895, this.ON, 12896, 12923, this.L, 12924, 12925, this.ON,\n 12926, 12976, this.L, 12977, 12991, this.ON, 12992, 13003, this.L, 13004, 13007, this.ON,\n 13008, 13174, this.L, 13175, 13178, this.ON, 13179, 13277, this.L, 13278, 13279, this.ON,\n 13280, 13310, this.L, 13311, 13311, this.ON, 13312, 19903, this.L, 19904, 19967, this.ON,\n 19968, 42127, this.L, 42128, 42182, this.ON, 42183, 64284, this.L, 64285, 64285, this.R,\n 64286, 64286, this.NSM, 64287, 64296, this.R, 64297, 64297, this.ET, 64298, 64310, this.R,\n 64311, 64311, this.L, 64312, 64316, this.R, 64317, 64317, this.L, 64318, 64318, this.R,\n 64319, 64319, this.L, 64320, 64321, this.R, 64322, 64322, this.L, 64323, 64324, this.R,\n 64325, 64325, this.L, 64326, 64335, this.R, 64336, 64433, this.AL, 64434, 64466, this.L,\n 64467, 64829, this.AL, 64830, 64831, this.ON, 64832, 64847, this.L, 64848, 64911, this.AL,\n 64912, 64913, this.L, 64914, 64967, this.AL, 64968, 65007, this.L, 65008, 65020, this.AL,\n 65021, 65021, this.ON, 65022, 65023, this.L, 65024, 65039, this.NSM, 65040, 65055, this.L,\n 65056, 65059, this.NSM, 65060, 65071, this.L, 65072, 65103, this.ON, 65104, 65104, this.CS,\n 65105, 65105, this.ON, 65106, 65106, this.CS, 65107, 65107, this.L, 65108, 65108, this.ON,\n 65109, 65109, this.CS, 65110, 65118, this.ON, 65119, 65119, this.ET, 65120, 65121, this.ON,\n 65122, 65123, this.ET, 65124, 65126, this.ON, 65127, 65127, this.L, 65128, 65128, this.ON,\n 65129, 65130, this.ET, 65131, 65131, this.ON, 65132, 65135, this.L, 65136, 65140, this.AL,\n 65141, 65141, this.L, 65142, 65276, this.AL, 65277, 65278, this.L, 65279, 65279, this.BN,\n 65280, 65280, this.L, 65281, 65282, this.ON, 65283, 65285, this.ET, 65286, 65290, this.ON,\n 65291, 65291, this.ET, 65292, 65292, this.CS, 65293, 65293, this.ET, 65294, 65294, this.CS,\n 65295, 65295, this.ES, 65296, 65305, this.EN, 65306, 65306, this.CS, 65307, 65312, this.ON,\n 65313, 65338, this.L, 65339, 65344, this.ON, 65345, 65370, this.L, 65371, 65381, this.ON,\n 65382, 65503, this.L, 65504, 65505, this.ET, 65506, 65508, this.ON, 65509, 65510, this.ET,\n 65511, 65511, this.L, 65512, 65518, this.ON, 65519, 65528, this.L, 65529, 65531, this.BN,\n 65532, 65533, this.ON, 65534, 65535, this.L\n ];\n for (var i = 0; i < this.charTypes.length; ++i) {\n var start = this.charTypes[i];\n var end = this.charTypes[++i];\n var b = this.charTypes[++i];\n while (start <= end) {\n this.rtlCharacterTypes[start++] = b;\n }\n }\n }\n //#endregion\n //#region implementation\n RtlCharacters.prototype.getVisualOrder = function (inputText, isRtl) {\n this.types = this.getCharacterCode(inputText);\n this.textOrder = isRtl ? this.LRE : this.L;\n this.doVisualOrder();\n var result = [];\n for (var i = 0; i < this.levels.length; i++) {\n result[i] = this.levels[i];\n }\n return result;\n };\n RtlCharacters.prototype.getCharacterCode = function (text) {\n var characterCodes = [];\n for (var i = 0; i < text.length; i++) {\n characterCodes[i] = this.rtlCharacterTypes[text[i].charCodeAt(0)];\n }\n return characterCodes;\n };\n RtlCharacters.prototype.setDefaultLevels = function () {\n for (var i = 0; i < this.length; i++) {\n this.levels[i] = this.textOrder;\n }\n };\n RtlCharacters.prototype.setLevels = function () {\n this.setDefaultLevels();\n for (var n = 0; n < this.length; ++n) {\n var level = this.levels[n];\n if ((level & 0x80) !== 0) {\n level &= 0x7f;\n this.result[n] = ((level & 0x1) === 0) ? this.L : this.R;\n }\n this.levels[n] = level;\n }\n };\n RtlCharacters.prototype.updateLevels = function (index, level, length) {\n if ((level & 1) === 0) {\n for (var i = index; i < length; ++i) {\n if (this.result[i] === this.R) {\n this.levels[i] += 1;\n }\n else if (this.result[i] !== this.L) {\n this.levels[i] += 2;\n }\n }\n }\n else {\n for (var i = index; i < length; ++i) {\n if (this.result[i] !== this.R) {\n this.levels[i] += 1;\n }\n }\n }\n };\n RtlCharacters.prototype.doVisualOrder = function () {\n this.length = this.types.length;\n this.result = this.types;\n this.levels = [];\n this.setLevels();\n this.length = this.getEmbeddedCharactersLength();\n var preview = this.textOrder;\n var i = 0;\n while (i < this.length) {\n var level = this.levels[i];\n var preType = ((Math.max(preview, level) & 0x1) === 0) ? this.L : this.R;\n var length_1 = i + 1;\n while (length_1 < this.length && this.levels[length_1] === level) {\n ++length_1;\n }\n var success = length_1 < this.length ? this.levels[length_1] : this.textOrder;\n var type = ((Math.max(success, level) & 0x1) === 0) ? this.L : this.R;\n this.checkNSM(i, length_1, level, preType, type);\n this.updateLevels(i, level, length_1);\n preview = level;\n i = length_1;\n }\n this.checkEmbeddedCharacters(this.length);\n };\n RtlCharacters.prototype.getEmbeddedCharactersLength = function () {\n var index = 0;\n for (var i = 0; i < this.length; ++i) {\n if (!(this.types[i] === this.LRE || this.types[i] === this.RLE || this.types[i] === this.LRO ||\n this.types[i] === this.RLO || this.types[i] === this.PDF || this.types[i] === this.BN)) {\n this.result[index] = this.result[i];\n this.levels[index] = this.levels[i];\n index++;\n }\n }\n return index;\n };\n RtlCharacters.prototype.checkEmbeddedCharacters = function (length) {\n for (var i = this.types.length - 1; i >= 0; --i) {\n if (this.types[i] === this.LRE || this.types[i] === this.RLE || this.types[i] === this.LRO ||\n this.types[i] === this.RLO || this.types[i] === this.PDF || this.types[i] === this.BN) {\n this.result[i] = this.types[i];\n this.levels[i] = -1;\n }\n else {\n length -= 1;\n this.result[i] = this.result[length];\n this.levels[i] = this.levels[length];\n }\n }\n for (var i = 0; i < this.types.length; i++) {\n if (this.levels[i] === -1) {\n if (i === 0) {\n this.levels[i] = this.textOrder;\n }\n else {\n this.levels[i] = this.levels[i - 1];\n }\n }\n }\n };\n RtlCharacters.prototype.checkNSM = function (index, length, level, startType, endType) {\n var charType = startType;\n for (var i = index; i < length; ++i) {\n if (this.result[i] === this.NSM) {\n this.result[i] = charType;\n }\n else {\n charType = this.result[i];\n }\n }\n this.checkEuropeanDigits(index, length, level, startType, endType);\n };\n RtlCharacters.prototype.checkEuropeanDigits = function (index, length, level, startType, endType) {\n for (var i = index; i < length; ++i) {\n if (this.result[i] === this.EN) {\n for (var j = i - 1; j >= index; --j) {\n if (this.result[j] === this.L || this.result[j] === this.R || this.result[j] === this.AL) {\n if (this.result[j] === this.AL) {\n this.result[i] = this.AN;\n }\n break;\n }\n }\n }\n }\n this.checkArabicCharacters(index, length, level, startType, endType);\n };\n RtlCharacters.prototype.checkArabicCharacters = function (index, length, level, startType, endType) {\n for (var i = index; i < length; ++i) {\n if (this.result[i] === this.AL) {\n this.result[i] = this.R;\n }\n }\n this.checkEuropeanNumberSeparator(index, length, level, startType, endType);\n };\n RtlCharacters.prototype.checkEuropeanNumberSeparator = function (index, length, level, startType, endType) {\n for (var i = index + 1; i < length - 1; ++i) {\n if (this.result[i] === this.ES || this.result[i] === this.CS) {\n var preview = this.result[i - 1];\n var success = this.result[i + 1];\n if (preview === this.EN && success === this.EN) {\n this.result[i] = this.EN;\n }\n else if (this.result[i] === this.CS && preview === this.AN && success === this.AN) {\n this.result[i] = this.AN;\n }\n }\n }\n this.checkEuropeanNumberTerminator(index, length, level, startType, endType);\n };\n RtlCharacters.prototype.checkEuropeanNumberTerminator = function (index, length, level, startType, endType) {\n for (var i = index; i < length; ++i) {\n if (this.result[i] === this.ET) {\n var s = i;\n var b = [];\n b.push(this.ET);\n var l = this.getLength(s, length, b);\n var data = s === index ? startType : this.result[s - 1];\n if (data !== this.EN) {\n data = (l === length) ? endType : this.result[l];\n }\n if (data === this.EN) {\n for (var j = s; j < l; ++j) {\n this.result[j] = this.EN;\n }\n }\n i = l;\n }\n }\n this.checkOtherNeutrals(index, length, level, startType, endType);\n };\n RtlCharacters.prototype.checkOtherNeutrals = function (index, length, level, startType, endType) {\n for (var i = index; i < length; ++i) {\n if (this.result[i] === this.ES || this.result[i] === this.ET || this.result[i] === this.CS) {\n this.result[i] = this.ON;\n }\n }\n this.checkOtherCharacters(index, length, level, startType, endType);\n };\n RtlCharacters.prototype.checkOtherCharacters = function (index, length, level, startType, endType) {\n for (var i = index; i < length; ++i) {\n if (this.result[i] === this.EN) {\n var pst = startType;\n for (var j = i - 1; j >= index; --j) {\n if (this.result[j] === this.L || this.result[j] === this.R) {\n pst = this.result[j];\n break;\n }\n }\n if (pst === this.L) {\n this.result[i] = this.L;\n }\n }\n }\n this.checkCommanCharacters(index, length, level, startType, endType);\n };\n RtlCharacters.prototype.getLength = function (index, length, validSet) {\n --index;\n while (++index < length) {\n var t = this.result[index];\n for (var i = 0; i < validSet.length; ++i) {\n if (t === validSet[i]) {\n index = this.getLength(++index, length, validSet);\n }\n }\n return index;\n }\n return length;\n };\n RtlCharacters.prototype.checkCommanCharacters = function (index, length, level, startType, endType) {\n for (var i = index; i < length; ++i) {\n if (this.result[i] === this.WS || this.result[i] === this.ON || this.result[i] === this.B ||\n this.result[i] === this.S) {\n var s = i;\n var byte = [this.B, this.S, this.WS, this.ON];\n var l = this.getLength(s, length, byte);\n var lt = 0;\n var tt = 0;\n var rt = 0;\n if (s === index) {\n lt = startType;\n }\n else {\n lt = this.result[s - 1];\n if (lt === this.AN) {\n lt = this.R;\n }\n else if (lt === this.EN) {\n lt = this.R;\n }\n }\n if (l === length) {\n tt = endType;\n }\n else {\n tt = this.result[l];\n if (tt === this.AN) {\n tt = this.R;\n }\n else if (tt === this.EN) {\n tt = this.R;\n }\n }\n if (lt === tt) {\n rt = lt;\n }\n else {\n rt = ((level & 0x1) === 0) ? this.L : this.R;\n }\n for (var j = s; j < l; ++j) {\n this.result[j] = rt;\n }\n i = l;\n }\n }\n };\n return RtlCharacters;\n}());\nexport { RtlCharacters };\n","import { PdfString } from './../../primitives/pdf-string';\nimport { ArabicShapeRenderer } from './rtl/rtl-text-shape';\nimport { PdfTextDirection } from './../enum';\nimport { Bidi } from './rtl/rtl-bidirectional';\n/**\n * `Metrics` of the font.\n * @private\n */\nvar RtlRenderer = /** @class */ (function () {\n function RtlRenderer() {\n //region Constants\n /// Open bracket symbol.\n /// \n this.openBracket = '(';\n /// \n /// Close bracket symbol.\n /// \n this.closeBracket = ')';\n //#endregion\n }\n //#region Constructors\n /// \n /// Initializes a new instance of the class.\n /// \n // public constructor() {\n // }\n //#region Public Methods\n /// \n /// Layouts text. Changes blocks position in the RTL text.\n /// Ligates the text if needed.\n /// \n /// Line of the text.\n /// Font to be used for string printing.\n /// Font alignment.\n /// Indicates whether Word Spacing used or not.\n /// Layout string.\n RtlRenderer.prototype.layout = function (line, font, rtl, wordSpace, format) {\n if (line == null) {\n throw new Error('ArgumentNullException : line');\n }\n if (font == null) {\n throw new Error('ArgumentNullException : font');\n }\n var result = [];\n if (font.Unicode) {\n result = this.customLayout(line, rtl, format, font, wordSpace);\n }\n else {\n result = [];\n result[0] = line;\n }\n return result;\n };\n /// \n /// Layouts a string and splits it by the words and using correct lay outing.\n /// \n /// Text line.\n /// Font object.\n /// Indicates whether RTL should be applied.\n /// Indicates whether word spacing is used.\n /// Array of words if converted, null otherwise.\n RtlRenderer.prototype.splitLayout = function (line, font, rtl, wordSpace, format) {\n if (line == null) {\n throw new Error('ArgumentNullException : line');\n }\n if (font == null) {\n throw new Error('ArgumentNullException : font');\n }\n var words = [];\n var system = false;\n if (!system || words == null) {\n words = this.customSplitLayout(line, font, rtl, wordSpace, format);\n }\n return words;\n };\n //#endregion\n //#region Implementation\n // private isEnglish( word : string) : boolean\n // {\n // let c : string = (word.length > 0) ? word[0] : '';\n // return (c >= '0' && c < 'ÿ');\n // }\n // private keepOrder( words : string, startIndex : number, count: number, result : string[], resultIndex : number) : void\n // {\n // for (let i : number = 0, ri = resultIndex - count + 1; i < count; ++i, ++ri) {\n // result[ri] = words[i + startIndex];\n // }\n // }\n /// \n /// Uses system API to layout the text.\n /// \n /// Line of the text to be layouted.\n /// Font which is used for text printing.\n /// Indicates whether we use RTL or RTL lay outing of the text container.\n /// Layout string.\n /* tslint:disable-next-line:max-line-length */\n RtlRenderer.prototype.getGlyphIndex = function (line, font, rtl, /*out*/ glyphs, custom) {\n var success = true;\n var fail = false;\n if (line == null) {\n throw new Error('ArgumentNullException : line');\n }\n if (font == null) {\n throw new Error('ArgumentNullException : font');\n }\n glyphs = null;\n if (line.length === 0) {\n return { success: fail, glyphs: glyphs };\n }\n var renderer = new ArabicShapeRenderer();\n var text = renderer.shape(line, 0);\n var internalFont = font.fontInternal;\n var ttfReader = internalFont.ttfReader;\n glyphs = new Uint16Array(text.length);\n var i = 0;\n for (var k = 0, len = text.length; k < len; k++) {\n var ch = text[k];\n var glyphInfo = ttfReader.getGlyph(ch);\n if (glyphInfo !== null && typeof glyphInfo !== 'undefined') {\n glyphs[i++] = (glyphInfo).index;\n }\n }\n return { success: success, glyphs: glyphs };\n };\n /* tslint:disable-next-line:max-line-length */\n RtlRenderer.prototype.customLayout = function (line, rtl, format, font, wordSpace) {\n if (wordSpace === null || typeof wordSpace === 'undefined') {\n if (line == null) {\n throw new Error('ArgumentNullException : line');\n }\n var result = null;\n //bidirectional order.\n if (format !== null && typeof format !== 'undefined' && format.textDirection !== PdfTextDirection.None) {\n var bidi = new Bidi();\n result = bidi.getLogicalToVisualString(line, rtl);\n }\n return result;\n }\n else {\n if (line == null) {\n throw new Error('ArgumentNullException : line');\n }\n if (font == null) {\n throw new Error('ArgumentNullException : font');\n }\n var layouted = null;\n if (format !== null && typeof format !== 'undefined' && format.textDirection !== PdfTextDirection.None) {\n var renderer = new ArabicShapeRenderer();\n var txt = renderer.shape(line, 0);\n layouted = this.customLayout(txt, rtl, format);\n }\n // else {\n // layouted = this.customLayout(line, rtl, format);\n // }\n // We have unicode font, but from the file. \n var result = [];\n // Split the text by words if word spacing is not default.\n if (wordSpace) {\n var words = layouted.split('');\n var count = words.length;\n for (var i = 0; i < count; i++) {\n words[i] = this.addChars(font, words[i]);\n }\n result = words;\n }\n else {\n result = [];\n result[0] = this.addChars(font, layouted);\n }\n return result;\n }\n };\n /// \n /// Add information about used glyphs to the font.\n /// \n /// Font used for text rendering.\n /// Array of used glyphs.\n /// String in the form to be written to the file.\n RtlRenderer.prototype.addChars = function (font, glyphs) {\n var line = glyphs;\n if (font == null) {\n throw new Error('ArgumentNullException : font');\n }\n if (line == null) {\n throw new Error('ArgumentNullException : line');\n }\n var text = line;\n var internalFont = font.fontInternal;\n var ttfReader = internalFont.ttfReader;\n font.setSymbols(text);\n // Reconvert string according to unicode standard.\n text = ttfReader.convertString(text);\n var bytes = PdfString.toUnicodeArray(text, false);\n text = PdfString.byteToString(bytes);\n return text;\n // else {\n // if (font == null) {\n // throw new Error('ArgumentNullException : font');\n // }\n // if (glyphs == null) {\n // throw new Error('ArgumentNullException : glyphs');\n // }\n // // Mark the chars as used.\n // let text : string = '';\n // font.setSymbols(glyphs);\n // // Create string from the glyphs.\n // \n // let chars : string[] = [];\n // for (let i : number = 0; i < glyphs.length; i++) {\n // chars[i] = glyphs[i].toString();\n // }\n // for (let j : number = 0 ; j < chars.length; j++) {\n // text = text + chars[j];\n // }\n // let bytes : number[] = PdfString.toUnicodeArray(text, false);\n // text = PdfString.byteToString(bytes);\n // return text;\n // }\n };\n /// \n /// Layouts a string and splits it by the words by using custom lay outing.\n /// \n /// Text line.\n /// Font object.\n /// Indicates whether RTL should be applied.\n /// Indicates whether word spacing is used.\n /// Array of words if converted, null otherwise.\n /* tslint:disable-next-line:max-line-length */\n RtlRenderer.prototype.customSplitLayout = function (line, font, rtl, wordSpace, format) {\n if (line == null) {\n throw new Error('ArgumentNullException : line');\n }\n if (font == null) {\n throw new Error('ArgumentNullException : font');\n }\n var reversedLine = this.customLayout(line, rtl, format);\n var words = reversedLine.split('');\n return words;\n };\n return RtlRenderer;\n}());\nexport { RtlRenderer };\n","/**\n * `PdfBoolean` class is used to perform boolean related primitive operations.\n * @private\n */\nvar PdfBoolean = /** @class */ (function () {\n //constructor\n /**\n * Initializes a new instance of the `PdfBoolean` class.\n * @private\n */\n function PdfBoolean(value) {\n /**\n * Internal variable to store the `position`.\n * @default -1\n * @private\n */\n this.currentPosition = -1;\n this.value = value;\n }\n Object.defineProperty(PdfBoolean.prototype, \"status\", {\n //Properties\n /**\n * Gets or sets the `Status` of the specified object.\n * @private\n */\n get: function () {\n return this.objectStatus;\n },\n set: function (value) {\n this.objectStatus = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBoolean.prototype, \"isSaving\", {\n /**\n * Gets or sets a value indicating whether this document `is saving` or not.\n * @private\n */\n get: function () {\n return this.saving;\n },\n set: function (value) {\n this.saving = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBoolean.prototype, \"objectCollectionIndex\", {\n /**\n * Gets or sets the `index` value of the specified object.\n * @private\n */\n get: function () {\n return this.index;\n },\n set: function (value) {\n this.index = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBoolean.prototype, \"position\", {\n /**\n * Gets or sets the `position` of the object.\n * @private\n */\n get: function () {\n return this.currentPosition;\n },\n set: function (value) {\n this.currentPosition = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBoolean.prototype, \"clonedObject\", {\n /**\n * Returns `cloned object`.\n * @private\n */\n get: function () {\n var rValue = null;\n return rValue;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Saves` the object using the specified writer.\n * @private\n */\n PdfBoolean.prototype.save = function (writer) {\n writer.write(this.boolToStr(this.value));\n };\n /**\n * Creates a `copy of PdfBoolean`.\n * @private\n */\n PdfBoolean.prototype.clone = function (crossTable) {\n var newNumber = new PdfBoolean(this.value);\n return newNumber;\n };\n // Implementation\n /**\n * Converts `boolean to string` - 0/1 'true'/'false'.\n * @private\n */\n PdfBoolean.prototype.boolToStr = function (value) {\n return value ? 'true' : 'false';\n };\n return PdfBoolean;\n}());\nexport { PdfBoolean };\n","/**\n * ImageDecoder class\n */\nimport { ByteArray } from './byte-array';\nimport { PdfStream } from './../../primitives/pdf-stream';\nimport { DictionaryProperties } from './../../input-output/pdf-dictionary-properties';\nimport { PdfName } from './../../primitives/pdf-name';\nimport { PdfNumber } from './../../primitives/pdf-number';\nimport { PdfBoolean } from './../../primitives/pdf-boolean';\nimport { PdfDictionary } from './../../primitives/pdf-dictionary';\n/**\n * Specifies the image `format`.\n * @private\n */\nexport var ImageFormat;\n(function (ImageFormat) {\n /**\n * Specifies the type of `Unknown`.\n * @hidden\n * @private\n */\n ImageFormat[ImageFormat[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * Specifies the type of `Bmp`.\n * @hidden\n * @private\n */\n ImageFormat[ImageFormat[\"Bmp\"] = 1] = \"Bmp\";\n /**\n * Specifies the type of `Emf`.\n * @hidden\n * @private\n */\n ImageFormat[ImageFormat[\"Emf\"] = 2] = \"Emf\";\n /**\n * Specifies the type of `Gif`.\n * @hidden\n * @private\n */\n ImageFormat[ImageFormat[\"Gif\"] = 3] = \"Gif\";\n /**\n * Specifies the type of `Jpeg`.\n * @hidden\n * @private\n */\n ImageFormat[ImageFormat[\"Jpeg\"] = 4] = \"Jpeg\";\n /**\n * Specifies the type of `Png`.\n * @hidden\n * @private\n */\n ImageFormat[ImageFormat[\"Png\"] = 5] = \"Png\";\n /**\n * Specifies the type of `Wmf`.\n * @hidden\n * @private\n */\n ImageFormat[ImageFormat[\"Wmf\"] = 6] = \"Wmf\";\n /**\n * Specifies the type of `Icon`.\n * @hidden\n * @private\n */\n ImageFormat[ImageFormat[\"Icon\"] = 7] = \"Icon\";\n})(ImageFormat || (ImageFormat = {}));\n/**\n * `Decode the image stream`.\n * @private\n */\nvar ImageDecoder = /** @class */ (function () {\n /**\n * Initialize the new instance for `image-decoder` class.\n * @private\n */\n function ImageDecoder(stream) {\n /**\n * Start of file markers.\n * @hidden\n * @private\n */\n this.sof1Marker = 0x00C1;\n this.sof2Marker = 0x00C2;\n this.sof3Marker = 0x00C3;\n this.sof5Marker = 0x00C5;\n this.sof6Marker = 0x00C6;\n this.sof7Marker = 0x00C7;\n this.sof9Marker = 0x00C9;\n this.sof10Marker = 0x00CA;\n this.sof11Marker = 0x00CB;\n this.sof13Marker = 0x00CD;\n this.sof14Marker = 0x00CE;\n this.sof15Marker = 0x00CF;\n /**\n * Specifies `format` of image.\n * @hidden\n * @private\n */\n this.mFormat = ImageFormat.Unknown;\n /**\n * `Bits per component`.\n * @default 8\n * @hidden\n * @private\n */\n this.mbitsPerComponent = 8;\n /**\n * Internal variable for accessing fields from `DictionryProperties` class.\n * @hidden\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n this.mStream = stream;\n this.initialize();\n }\n Object.defineProperty(ImageDecoder.prototype, \"height\", {\n /**\n * Gets the `height` of image.\n * @hidden\n * @private\n */\n get: function () {\n return this.mHeight;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ImageDecoder.prototype, \"width\", {\n /**\n * Gets the `width` of image.\n * @hidden\n * @private\n */\n get: function () {\n return this.mWidth;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ImageDecoder.prototype, \"bitsPerComponent\", {\n /**\n * Gets `bits per component`.\n * @hidden\n * @private\n */\n get: function () {\n return this.mbitsPerComponent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ImageDecoder.prototype, \"size\", {\n /**\n * Gets the `size` of an image data.\n * @hidden\n * @private\n */\n get: function () {\n return this.mImageData.count;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ImageDecoder.prototype, \"imageData\", {\n /**\n * Gets the value of an `image data`.\n * @hidden\n * @private\n */\n get: function () {\n return this.mImageData;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ImageDecoder.prototype, \"imageDataAsNumberArray\", {\n /**\n * Gets the value of an `image data as number array`.\n * @hidden\n * @private\n */\n get: function () {\n return this.mImageData.internalBuffer.buffer;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Initialize` image data and image stream.\n * @hidden\n * @private\n */\n ImageDecoder.prototype.initialize = function () {\n if (this.mFormat === ImageFormat.Unknown && this.checkIfJpeg()) {\n this.mFormat = ImageFormat.Jpeg;\n this.parseJpegImage();\n }\n this.reset();\n this.mImageData = new ByteArray(this.mStream.count);\n this.mStream.read(this.mImageData, 0, this.mImageData.count);\n };\n /**\n * `Reset` stream position into 0.\n * @hidden\n * @private\n */\n ImageDecoder.prototype.reset = function () {\n this.mStream.position = 0;\n };\n /**\n * `Parse` Jpeg image.\n * @hidden\n * @private\n */\n ImageDecoder.prototype.parseJpegImage = function () {\n this.reset();\n var imgData = new ByteArray(this.mStream.count);\n this.mStream.read(imgData, 0, imgData.count);\n var i = 4;\n var isLengthExceed = false;\n /* tslint:disable */\n var length = imgData.getBuffer(i) * 256 + imgData.getBuffer(i + 1);\n while (i < imgData.count) {\n i += length;\n if (i < imgData.count) {\n if (imgData.getBuffer(i + 1) === 192) {\n this.mHeight = imgData.getBuffer(i + 5) * 256 + imgData.getBuffer(i + 6);\n this.mWidth = imgData.getBuffer(i + 7) * 256 + imgData.getBuffer(i + 8);\n return;\n }\n else {\n i += 2;\n length = imgData.getBuffer(i) * 256 + imgData.getBuffer(i + 1);\n }\n }\n else {\n isLengthExceed = true;\n break;\n }\n }\n if (isLengthExceed) {\n this.mStream.position = 0;\n this.skip(this.mStream, 2);\n this.readExceededJPGImage(this.mStream);\n }\n /* tslint:enable */\n };\n Object.defineProperty(ImageDecoder.prototype, \"format\", {\n /**\n * Gets the image `format`.\n * @private\n * @hidden\n */\n get: function () {\n return this.mFormat;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Checks if JPG`.\n * @private\n * @hidden\n */\n ImageDecoder.prototype.checkIfJpeg = function () {\n this.reset();\n for (var i = 0; i < ImageDecoder.mJpegHeader.length; i++) {\n if (ImageDecoder.mJpegHeader[i] !== this.mStream.readByte(i)) {\n return false;\n }\n this.mStream.position++;\n }\n return true;\n };\n /**\n * Return image `dictionary`.\n * @hidden\n * @private\n */\n ImageDecoder.prototype.getImageDictionary = function () {\n if (this.mFormat === ImageFormat.Jpeg) {\n var tempArrayBuffer = this.imageData.internalBuffer.length;\n this.imageStream = new PdfStream();\n this.imageStream.isImage = true;\n var tempString = '';\n var decodedString = '';\n for (var i = 0; i < this.imageDataAsNumberArray.byteLength; i++) {\n tempString += String.fromCharCode(null, this.mStream.readByte(i));\n }\n for (var i = 0; i < tempString.length; i++) {\n if (i % 2 !== 0) {\n decodedString += tempString[i];\n }\n }\n this.imageStream.data = [decodedString];\n this.imageStream.compress = false;\n this.imageStream.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.xObject));\n this.imageStream.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.image));\n this.imageStream.items.setValue(this.dictionaryProperties.width, new PdfNumber(this.width));\n this.imageStream.items.setValue(this.dictionaryProperties.height, new PdfNumber(this.height));\n this.imageStream.items.setValue(this.dictionaryProperties.bitsPerComponent, new PdfNumber(this.bitsPerComponent));\n this.imageStream.items.setValue(this.dictionaryProperties.filter, new PdfName(this.dictionaryProperties.dctdecode));\n this.imageStream.items.setValue(this.dictionaryProperties.colorSpace, new PdfName(this.getColorSpace()));\n this.imageStream.items.setValue(this.dictionaryProperties.decodeParms, this.getDecodeParams());\n return this.imageStream;\n }\n else {\n return this.imageStream;\n }\n };\n /**\n * Return `colorSpace` of an image.\n * @hidden\n * @private\n */\n ImageDecoder.prototype.getColorSpace = function () {\n return this.dictionaryProperties.deviceRgb;\n };\n /**\n * Return `decode parameters` of an image.\n * @hidden\n * @private\n */\n ImageDecoder.prototype.getDecodeParams = function () {\n var decodeParams = new PdfDictionary();\n decodeParams.items.setValue(this.dictionaryProperties.columns, new PdfNumber(this.width));\n decodeParams.items.setValue(this.dictionaryProperties.blackIs1, new PdfBoolean(true));\n decodeParams.items.setValue(this.dictionaryProperties.k, new PdfNumber(-1));\n decodeParams.items.setValue(this.dictionaryProperties.predictor, new PdfNumber(15));\n decodeParams.items.setValue(this.dictionaryProperties.bitsPerComponent, new PdfNumber(this.bitsPerComponent));\n return decodeParams;\n };\n /**\n * 'readExceededJPGImage' stream\n * @hidden\n * @private\n */\n ImageDecoder.prototype.readExceededJPGImage = function (stream) {\n this.mStream = stream;\n var isContinueReading = true;\n while (isContinueReading) {\n var marker = this.getMarker(stream);\n switch (marker) {\n case this.sof1Marker:\n case this.sof2Marker:\n case this.sof3Marker:\n case this.sof5Marker:\n case this.sof6Marker:\n case this.sof7Marker:\n case this.sof9Marker:\n case this.sof10Marker:\n case this.sof11Marker:\n case this.sof13Marker:\n case this.sof14Marker:\n case this.sof15Marker:\n stream.position += 3;\n this.mHeight = this.mStream.readNextTwoBytes(stream);\n this.mWidth = this.mStream.readNextTwoBytes(stream);\n isContinueReading = false;\n break;\n default:\n this.skipStream(stream);\n break;\n }\n }\n };\n /**\n * 'skip' stream\n * @hidden\n * @private\n */\n ImageDecoder.prototype.skip = function (stream, noOfBytes) {\n this.mStream = stream;\n var temp = new ByteArray(noOfBytes);\n this.mStream.read(temp, 0, temp.count);\n };\n /**\n * 'getMarker' stream\n * @hidden\n * @private\n */\n ImageDecoder.prototype.getMarker = function (stream) {\n var skippedByte = 0;\n var marker = 32;\n marker = stream.readByte(this.mStream.position);\n stream.position++;\n while (marker !== 255) {\n skippedByte++;\n marker = stream.readByte(this.mStream.position);\n stream.position++;\n }\n do {\n marker = stream.readByte(this.mStream.position);\n stream.position++;\n } while (marker === 255);\n return marker;\n };\n /**\n * 'skipStream' stream\n * @hidden\n * @private\n */\n ImageDecoder.prototype.skipStream = function (stream) {\n var markerLength = this.mStream.readNextTwoBytes(stream) - 2;\n if (markerLength > 0) {\n stream.position += markerLength;\n }\n };\n /**\n * Number array for `png header`.\n * @hidden\n * @private\n */\n ImageDecoder.mPngHeader = [137, 80, 78, 71, 13, 10, 26, 10];\n /**\n * Number Array for `jpeg header`.\n * @hidden\n * @private\n */\n ImageDecoder.mJpegHeader = [255, 216];\n /**\n * Number array for `gif header`.\n * @hidden\n * @private\n */\n ImageDecoder.GIF_HEADER = 'G,I,F,8';\n /**\n * Number array for `bmp header.`\n * @hidden\n * @private\n */\n ImageDecoder.BMP_HEADER = 'B,M';\n return ImageDecoder;\n}());\nexport { ImageDecoder };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfColorSpace } from './../enum';\nimport { PdfColor } from './../pdf-color';\nimport { PdfBrush } from './pdf-brush';\nimport { PdfDictionary } from '../../primitives/pdf-dictionary';\nimport { DictionaryProperties } from './../../input-output/pdf-dictionary-properties';\nimport { PdfBoolean } from './../../primitives/pdf-boolean';\nimport { PdfArray } from './../../primitives/pdf-array';\nimport { PdfName } from '../../primitives/pdf-name';\nimport { PdfNumber } from '../../primitives/pdf-number';\nimport { PdfReferenceHolder } from '../../primitives/pdf-reference';\n/**\n * `PdfGradientBrush` class provides objects used to fill the interiors of graphical shapes such as rectangles,\n * ellipses, pies, polygons, and paths.\n * @private\n */\nvar PdfGradientBrush = /** @class */ (function (_super) {\n __extends(PdfGradientBrush, _super);\n //Constructor\n /**\n * Initializes a new instance of the `PdfGradientBrush` class.\n * @public\n */\n /* tslint:disable-next-line:max-line-length */\n function PdfGradientBrush(shading) {\n var _this = _super.call(this) || this;\n // Fields\n /**\n * Local variable to store the background color.\n * @private\n */\n _this.mbackground = new PdfColor(255, 255, 255);\n /**\n * Local variable to store the stroking color.\n * @private\n */\n _this.mbStroking = false;\n /**\n * Local variable to store the function.\n * @private\n */\n _this.mfunction = null;\n /**\n * Local variable to store the DictionaryProperties.\n * @private\n */\n _this.dictionaryProperties = new DictionaryProperties();\n _this.mpatternDictionary = new PdfDictionary();\n _this.mpatternDictionary.items.setValue(_this.dictionaryProperties.type, new PdfName(_this.dictionaryProperties.pattern));\n _this.mpatternDictionary.items.setValue(_this.dictionaryProperties.patternType, new PdfNumber(2));\n _this.shading = shading;\n _this.colorSpace = PdfColorSpace.Rgb;\n return _this;\n }\n Object.defineProperty(PdfGradientBrush.prototype, \"background\", {\n //Properties\n /**\n * Gets or sets the background color of the brush.\n * @public\n */\n get: function () {\n return this.mbackground;\n },\n set: function (value) {\n this.mbackground = value;\n var sh = this.shading;\n if (value.isEmpty) {\n sh.remove(this.dictionaryProperties.background);\n }\n else {\n sh.items.setValue(this.dictionaryProperties.background, value.toArray(this.colorSpace));\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGradientBrush.prototype, \"antiAlias\", {\n /**\n * Gets or sets a value indicating whether use anti aliasing algorithm.\n * @public\n */\n get: function () {\n var sh = this.shading;\n var aa = (sh.items.getValue(this.dictionaryProperties.antiAlias));\n return aa.value;\n },\n set: function (value) {\n var sh = this.shading;\n var aa = (sh.items.getValue(this.dictionaryProperties.antiAlias));\n if ((aa == null && typeof aa === 'undefined')) {\n aa = new PdfBoolean(value);\n sh.items.setValue(this.dictionaryProperties.antiAlias, aa);\n }\n else {\n aa.value = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGradientBrush.prototype, \"function\", {\n /**\n * Gets or sets the function of the brush.\n * @protected\n */\n get: function () {\n return this.mfunction;\n },\n set: function (value) {\n this.mfunction = value;\n if (value != null && typeof value !== 'undefined') {\n this.shading.items.setValue(this.dictionaryProperties.function, new PdfReferenceHolder(this.mfunction));\n }\n else {\n this.shading.remove(this.dictionaryProperties.function);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGradientBrush.prototype, \"bBox\", {\n /**\n * Gets or sets the boundary box of the brush.\n * @protected\n */\n get: function () {\n var sh = this.shading;\n var box = (sh.items.getValue(this.dictionaryProperties.bBox));\n return box;\n },\n set: function (value) {\n var sh = this.shading;\n if (value == null && typeof value === 'undefined') {\n sh.remove(this.dictionaryProperties.bBox);\n }\n else {\n sh.items.setValue(this.dictionaryProperties.bBox, value);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGradientBrush.prototype, \"colorSpace\", {\n /**\n * Gets or sets the color space of the brush.\n * @public\n */\n get: function () {\n return this.mcolorSpace;\n },\n set: function (value) {\n var colorSpace = this.shading.items.getValue(this.dictionaryProperties.colorSpace);\n if ((value !== this.mcolorSpace) || (colorSpace == null)) {\n this.mcolorSpace = value;\n var csValue = this.colorSpaceToDeviceName(value);\n this.shading.items.setValue(this.dictionaryProperties.colorSpace, new PdfName(csValue));\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGradientBrush.prototype, \"stroking\", {\n /**\n * Gets or sets a value indicating whether this PdfGradientBrush is stroking.\n * @public\n */\n get: function () {\n return this.mbStroking;\n },\n set: function (value) {\n this.mbStroking = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGradientBrush.prototype, \"patternDictionary\", {\n /**\n * Gets the pattern dictionary.\n * @protected\n */\n get: function () {\n if (this.mpatternDictionary == null) {\n this.mpatternDictionary = new PdfDictionary();\n }\n return this.mpatternDictionary;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGradientBrush.prototype, \"shading\", {\n /**\n * Gets or sets the shading dictionary.\n * @protected\n */\n get: function () {\n return this.mshading;\n },\n set: function (value) {\n if (value == null) {\n throw new Error('ArgumentNullException : Shading');\n }\n if (value !== this.mshading) {\n this.mshading = value;\n this.patternDictionary.items.setValue(this.dictionaryProperties.shading, new PdfReferenceHolder(this.mshading));\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGradientBrush.prototype, \"matrix\", {\n /**\n * Gets or sets the transformation matrix.\n * @public\n */\n get: function () {\n return this.mmatrix;\n },\n set: function (value) {\n if (value == null) {\n throw new Error('ArgumentNullException : Matrix');\n }\n if (value !== this.mmatrix) {\n this.mmatrix = value.clone();\n var m = new PdfArray(this.mmatrix.matrix.elements);\n this.mpatternDictionary.items.setValue(this.dictionaryProperties.matrix, m);\n }\n },\n enumerable: true,\n configurable: true\n });\n //Overrides\n /**\n * Monitors the changes of the brush and modify PDF state respectfully.\n * @param brush The brush.\n * @param streamWriter The stream writer.\n * @param getResources The get resources delegate.\n * @param saveChanges if set to true the changes should be saved anyway.\n * @param currentColorSpace The current color space.\n */\n /* tslint:disable-next-line:max-line-length */\n PdfGradientBrush.prototype.monitorChanges = function (brush, streamWriter, getResources, saveChanges, currentColorSpace) {\n var diff = false;\n if (brush instanceof PdfGradientBrush) {\n if ((this.colorSpace !== currentColorSpace)) {\n this.colorSpace = currentColorSpace;\n this.resetFunction();\n }\n // Set the /Pattern colour space.\n streamWriter.setColorSpace('Pattern', this.mbStroking);\n // Set the pattern for non-stroking operations.\n var resources = getResources.getResources();\n var name_1 = resources.getName(this);\n streamWriter.setColourWithPattern(null, name_1, this.mbStroking);\n diff = true;\n }\n return diff;\n };\n /**\n * Resets the changes, which were made by the brush.\n * In other words resets the state to the initial one.\n * @param streamWriter The stream writer.\n */\n PdfGradientBrush.prototype.resetChanges = function (streamWriter) {\n // Unable reset.\n };\n //Implementation\n /**\n * Converts colorspace enum to a PDF name.\n * @param colorSpace The color space enum value.\n */\n PdfGradientBrush.prototype.colorSpaceToDeviceName = function (colorSpace) {\n var result;\n switch (colorSpace) {\n case PdfColorSpace.Rgb:\n result = 'DeviceRGB';\n break;\n }\n return result;\n };\n /**\n * Resets the pattern dictionary.\n * @param dictionary A new pattern dictionary.\n */\n PdfGradientBrush.prototype.resetPatternDictionary = function (dictionary) {\n this.mpatternDictionary = dictionary;\n };\n /**\n * Clones the anti aliasing value.\n * @param brush The brush.\n */\n PdfGradientBrush.prototype.cloneAntiAliasingValue = function (brush) {\n if ((brush == null)) {\n throw new Error('ArgumentNullException : brush');\n }\n var sh = this.shading;\n var aa = (sh.items.getValue(this.dictionaryProperties.antiAlias));\n if ((aa != null)) {\n brush.shading.items.setValue(this.dictionaryProperties.antiAlias, new PdfBoolean(aa.value));\n }\n };\n /**\n * Clones the background value.\n * @param brush The brush.\n */\n PdfGradientBrush.prototype.cloneBackgroundValue = function (brush) {\n var background = this.background;\n if (!background.isEmpty) {\n brush.background = background;\n }\n };\n Object.defineProperty(PdfGradientBrush.prototype, \"element\", {\n /* tslint:enable */\n // IPdfWrapper Members\n /**\n * Gets the `element`.\n * @private\n */\n get: function () {\n return this.patternDictionary;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGradientBrush;\n}(PdfBrush));\nexport { PdfGradientBrush };\n","/**\n * PdfTemplate.ts class for EJ2-PDF\n */\nimport { PdfStream } from './../../primitives/pdf-stream';\nimport { DictionaryProperties } from './../../input-output/pdf-dictionary-properties';\nimport { PdfArray } from './../../primitives/pdf-array';\nimport { PdfGraphics } from './../pdf-graphics';\nimport { PdfResources } from './../pdf-resources';\nimport { PdfName } from './../../primitives/pdf-name';\nimport { PointF, SizeF, RectangleF } from './../../drawing/pdf-drawing';\nimport { GetResourceEventHandler } from './../pdf-graphics';\n/**\n * Represents `Pdf Template` object.\n * @private\n */\nvar PdfTemplate = /** @class */ (function () {\n function PdfTemplate(arg1, arg2) {\n /**\n * Initialize an instance for `DictionaryProperties` class.\n * @private\n * @hidden\n */\n this.dictionaryProperties = new DictionaryProperties();\n /**\n * Checks whether the transformation 'is performed'.\n * @default true\n * @private\n */\n this.writeTransformation = true;\n if (typeof arg1 === 'undefined') {\n //\n }\n else if (arg1 instanceof SizeF && typeof arg2 === 'undefined') {\n this.content = new PdfStream();\n var tempSize = new SizeF(arg1.width, arg1.height);\n this.setSize(tempSize);\n this.initialize();\n }\n else {\n this.content = new PdfStream();\n this.setSize(new SizeF(arg1, arg2));\n this.initialize();\n }\n }\n Object.defineProperty(PdfTemplate.prototype, \"size\", {\n //Properties\n /**\n * Gets the size of the 'PdfTemplate'.\n */\n get: function () {\n return this.templateSize;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTemplate.prototype, \"width\", {\n /**\n * Gets the width of the 'PdfTemplate'.\n */\n get: function () {\n return this.size.width;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTemplate.prototype, \"height\", {\n /**\n * Gets the height of the 'PdfTemplate'.\n */\n get: function () {\n return this.size.height;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTemplate.prototype, \"graphics\", {\n /**\n * Gets the `graphics` of the 'PdfTemplate'.\n */\n get: function () {\n if (this.pdfGraphics == null || typeof this.pdfGraphics === 'undefined') {\n var gr = new GetResourceEventHandler(this);\n var g = new PdfGraphics(this.size, gr, this.content);\n this.pdfGraphics = g;\n // if(this.writeTransformation) {\n // Transform co-ordinates to Top/Left.\n this.pdfGraphics.initializeCoordinates();\n // }\n }\n return this.pdfGraphics;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the resources and modifies the template dictionary.\n * @private\n */\n PdfTemplate.prototype.getResources = function () {\n if (this.resources == null) {\n this.resources = new PdfResources();\n this.content.items.setValue(this.dictionaryProperties.resources, this.resources);\n }\n return this.resources;\n };\n // Public methods\n /**\n * `Initialize` the type and subtype of the template.\n * @private\n */\n PdfTemplate.prototype.initialize = function () {\n this.addType();\n this.addSubType();\n };\n /**\n * `Adds type key`.\n * @private\n */\n PdfTemplate.prototype.addType = function () {\n var value = new PdfName(this.dictionaryProperties.xObject);\n this.content.items.setValue(this.dictionaryProperties.type, value);\n };\n /**\n * `Adds SubType key`.\n * @private\n */\n PdfTemplate.prototype.addSubType = function () {\n var value = new PdfName(this.dictionaryProperties.form);\n this.content.items.setValue(this.dictionaryProperties.subtype, value);\n };\n PdfTemplate.prototype.reset = function (size) {\n if (typeof size === 'undefined') {\n if (this.resources != null) {\n this.resources = null;\n this.content.remove(this.dictionaryProperties.resources);\n }\n if (this.graphics != null) {\n this.graphics.reset(this.size);\n }\n }\n else {\n this.setSize(size);\n this.reset();\n }\n };\n /**\n * `Set the size` of the 'PdfTemplate'.\n * @private\n */\n PdfTemplate.prototype.setSize = function (size) {\n var rect = new RectangleF(new PointF(0, 0), size);\n var val = PdfArray.fromRectangle(rect);\n this.content.items.setValue(this.dictionaryProperties.bBox, val);\n this.templateSize = size;\n };\n Object.defineProperty(PdfTemplate.prototype, \"element\", {\n // /**\n // * Returns the value of current graphics.\n // * @private\n // */\n // public GetGraphics(g : PdfGraphics) : PdfGraphics {\n // if (this.graphics == null || typeof this.graphics === 'undefined') {\n // this.graphics = g;\n // this.graphics.Size = this.Size;\n // this.graphics.StreamWriter = new PdfStreamWriter(this.content)\n // this.graphics.Initialize();\n // if(this.writeTransformation) {\n // this.graphics.InitializeCoordinates();\n // }\n // }\n // return this.graphics;\n // }\n // IPdfWrapper Members\n /**\n * Gets the `content stream` of 'PdfTemplate' class.\n * @private\n */\n get: function () {\n return this.content;\n },\n enumerable: true,\n configurable: true\n });\n return PdfTemplate;\n}());\nexport { PdfTemplate };\n","/**\n * public Enum for `PdfBorderOverlapStyle`.\n * @private\n */\nexport var PdfBorderOverlapStyle;\n(function (PdfBorderOverlapStyle) {\n /**\n * Specifies the type of `Overlap`.\n * @private\n */\n PdfBorderOverlapStyle[PdfBorderOverlapStyle[\"Overlap\"] = 0] = \"Overlap\";\n /**\n * Specifies the type of `Inside`.\n * @private\n */\n PdfBorderOverlapStyle[PdfBorderOverlapStyle[\"Inside\"] = 1] = \"Inside\";\n})(PdfBorderOverlapStyle || (PdfBorderOverlapStyle = {}));\n","/**\n * Used to perform `convertion between pixels and points`.\n * @private\n */\nvar PdfUnitConverter = /** @class */ (function () {\n //constructors\n /**\n * Initializes a new instance of the `UnitConvertor` class with DPI value.\n * @private\n */\n function PdfUnitConverter(dpi) {\n this.updateProportionsHelper(dpi);\n }\n /**\n * `Converts` the value, from one graphics unit to another graphics unit.\n * @private\n */\n PdfUnitConverter.prototype.convertUnits = function (value, from, to) {\n return this.convertFromPixels(this.convertToPixels(value, from), to);\n };\n /**\n * Converts the value `to pixel` from specified graphics unit.\n * @private\n */\n PdfUnitConverter.prototype.convertToPixels = function (value, from) {\n var index = from;\n var result = (value * this.proportions[index]);\n return result;\n };\n /**\n * Converts value, to specified graphics unit `from Pixel`.\n * @private\n */\n PdfUnitConverter.prototype.convertFromPixels = function (value, to) {\n var index = to;\n var result = (value / this.proportions[index]);\n return result;\n };\n /**\n * `Update proportions` matrix according to Graphics settings.\n * @private\n */\n PdfUnitConverter.prototype.updateProportionsHelper = function (pixelPerInch) {\n this.proportions = [\n pixelPerInch / 2.54,\n pixelPerInch / 6.0,\n 1,\n pixelPerInch / 72.0,\n pixelPerInch,\n pixelPerInch / 300.0,\n pixelPerInch / 25.4 // Millimeter\n ];\n };\n //Fields\n /**\n * Indicates default `horizontal resolution`.\n * @default 96\n * @private\n */\n PdfUnitConverter.horizontalResolution = 96;\n /**\n * Indicates default `vertical resolution`.\n * @default 96\n * @private\n */\n PdfUnitConverter.verticalResolution = 96;\n return PdfUnitConverter;\n}());\nexport { PdfUnitConverter };\n","import { SizeF } from './../../drawing/pdf-drawing';\nimport { PdfGraphicsUnit } from './../enum';\nimport { PdfUnitConverter } from './../unit-convertor';\n/**\n * `PdfImage` class represents the base class for images and provides functionality for the 'PdfBitmap' class.\n * @private\n */\nvar PdfImage = /** @class */ (function () {\n function PdfImage() {\n }\n Object.defineProperty(PdfImage.prototype, \"width\", {\n /**\n * Gets and Sets the `width` of an image.\n * @private\n */\n get: function () {\n return this.imageWidth;\n },\n set: function (value) {\n this.imageWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfImage.prototype, \"height\", {\n /**\n * Gets and Sets the `height` of an image.\n * @private\n */\n get: function () {\n return this.imageHeight;\n },\n set: function (value) {\n this.imageHeight = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfImage.prototype, \"size\", {\n /**\n * Gets or sets the size of the image.\n * @private\n */\n set: function (value) {\n this.width = value.width;\n this.height = value.height;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfImage.prototype, \"physicalDimension\", {\n /**\n * Gets the `physical dimension` of an image.\n * @private\n */\n get: function () {\n this.imagePhysicalDimension = this.getPointSize(this.width, this.height, this.horizontalResolution, this.verticalResolution);\n return new SizeF(this.width, this.height);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfImage.prototype, \"element\", {\n // /**\n // * Gets the `image stream as string`.\n // * @private\n // */\n // public static fromString(string : string) : PdfImage {\n // let image : PdfImage = new PdfBitmap(string);\n // return image;\n // }\n /**\n * Gets the `element` image stream.\n * @private\n */\n get: function () {\n return this.imageStream;\n },\n enumerable: true,\n configurable: true\n });\n PdfImage.prototype.getPointSize = function (width, height, horizontalResolution, verticalResolution) {\n if (typeof horizontalResolution === 'undefined') {\n var dpiX = PdfUnitConverter.horizontalResolution;\n var dpiY = PdfUnitConverter.verticalResolution;\n var size = this.getPointSize(width, height, dpiX, dpiY);\n return size;\n }\n else {\n var ucX = new PdfUnitConverter(horizontalResolution);\n var ucY = new PdfUnitConverter(verticalResolution);\n var ptWidth = ucX.convertUnits(width, PdfGraphicsUnit.Pixel, PdfGraphicsUnit.Point);\n var ptHeight = ucY.convertUnits(height, PdfGraphicsUnit.Pixel, PdfGraphicsUnit.Point);\n var size = new SizeF(ptWidth, ptHeight);\n return size;\n }\n };\n return PdfImage;\n}());\nexport { PdfImage };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfBitmap.ts class for EJ2-PDF\n */\nimport { ImageDecoder } from './../../graphics/images/image-decoder';\nimport { ByteArray } from './../../graphics/images/byte-array';\nimport { DictionaryProperties } from './../../input-output/pdf-dictionary-properties';\nimport { PdfImage } from './pdf-image';\n/**\n * The 'PdfBitmap' contains methods and properties to handle the Bitmap images.\n * ```typescript\n * // create a new PDF document.\n * let document : PdfDocument = new PdfDocument();\n * // add a page to the document.\n * let page1 : PdfPage = document.pages.add();\n * // base64 string of an image\n * let imageString : string = '/9j/3+2w7em7HzY/KiijFw … 1OEYRUYrQ45yc5OUtz/9k=';\n * // load the image from the base64 string of original image.\n * let image : PdfBitmap = new PdfBitmap(imageString);\n * // draw the image\n * page1.graphics.drawImage(image, new RectangleF({x : 10, y : 10}, {width : 200, height : 200}));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\nvar PdfBitmap = /** @class */ (function (_super) {\n __extends(PdfBitmap, _super);\n /**\n * Create an instance for `PdfBitmap` class.\n * @param encodedString Base64 string of an image.\n * ```typescript\n * // create a new PDF document.\n * let document : PdfDocument = new PdfDocument();\n * // add a page to the document.\n * let page1 : PdfPage = document.pages.add();\n * // base64 string of an image\n * let imageString : string = '/9j/3+2w7em7HzY/KiijFw … 1OEYRUYrQ45yc5OUtz/9k=';\n * //\n * // load the image from the base64 string of original image.\n * let image : PdfBitmap = new PdfBitmap(imageString);\n * //\n * // draw the image\n * page1.graphics.drawImage(image, new RectangleF({x : 10, y : 10}, {width : 200, height : 200}));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n function PdfBitmap(encodedString) {\n var _this = _super.call(this) || this;\n //Fields\n /**\n * Specifies the `status` of an image.\n * @default true.\n * @hidden\n * @private\n */\n _this.imageStatus = true;\n /**\n * Internal variable for accessing fields from `DictionryProperties` class.\n * @hidden\n * @private\n */\n _this.dictionaryProperties = new DictionaryProperties();\n _this.loadImage(encodedString);\n return _this;\n }\n /**\n * `Load image`.\n * @hidden\n * @private\n */\n PdfBitmap.prototype.loadImage = function (encodedString) {\n var task = this.initializeAsync(encodedString);\n };\n /**\n * `Initialize` image parameters.\n * @private\n */\n PdfBitmap.prototype.initializeAsync = function (encodedString) {\n var byteArray = new ByteArray(encodedString.length);\n byteArray.writeFromBase64String(encodedString);\n this.decoder = new ImageDecoder(byteArray);\n this.height = this.decoder.height;\n this.width = this.decoder.width;\n // FrameCount = BitmapImageDecoder.FrameCount;\n this.bitsPerComponent = this.decoder.bitsPerComponent;\n };\n /**\n * `Saves` the image into stream.\n * @private\n */\n PdfBitmap.prototype.save = function () {\n this.imageStatus = true;\n this.imageStream = this.decoder.getImageDictionary();\n };\n return PdfBitmap;\n}(PdfImage));\nexport { PdfBitmap };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfResources.ts class for EJ2-PDF\n */\nimport { PdfDictionary } from './../primitives/pdf-dictionary';\nimport { TemporaryDictionary } from './../collections/object-object-pair/dictionary';\nimport { PdfName } from './../primitives/pdf-name';\nimport { PdfArray } from './../primitives/pdf-array';\nimport { PdfReferenceHolder } from './../primitives/pdf-reference';\nimport { PdfCrossTable } from './../input-output/pdf-cross-table';\nimport { PdfFont } from './fonts/pdf-font';\nimport { PdfTemplate } from './figures/pdf-template';\nimport { PdfBrush } from './brushes/pdf-brush';\nimport { PdfTransparency } from './pdf-transparency';\nimport { PdfBitmap } from './../graphics/images/pdf-bitmap';\nimport { PdfImage } from './../graphics/images/pdf-image';\nimport { PdfGradientBrush } from './brushes/pdf-gradient-brush';\nimport { PdfTilingBrush } from './brushes/pdf-tiling-brush';\n/**\n * `PdfResources` class used to set resource contents like font, image.\n * @private\n */\nvar PdfResources = /** @class */ (function (_super) {\n __extends(PdfResources, _super);\n function PdfResources(baseDictionary) {\n var _this = _super.call(this, baseDictionary) || this;\n /**\n * Dictionary for the `properties names`.\n * @private\n */\n _this.properties = new PdfDictionary();\n return _this;\n }\n Object.defineProperty(PdfResources.prototype, \"names\", {\n //Properties\n /**\n * Gets the `font names`.\n * @private\n */\n get: function () {\n return this.getNames();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfResources.prototype, \"document\", {\n /**\n * Get or set the `page document`.\n * @private\n */\n get: function () {\n return this.pdfDocument;\n },\n set: function (value) {\n this.pdfDocument = value;\n },\n enumerable: true,\n configurable: true\n });\n //Public Methods\n /**\n * `Generates name` for the object and adds to the resource if the object is new.\n * @private\n */\n PdfResources.prototype.getName = function (obj) {\n var primitive = obj.element;\n var name = null;\n if (this.names.containsKey(primitive)) {\n name = this.names.getValue(primitive);\n }\n // Object is new.\n if (name == null) {\n var sName = this.generateName();\n name = new PdfName(sName);\n this.names.setValue(primitive, name);\n if (obj instanceof PdfFont) {\n this.add(obj, name);\n }\n else if (obj instanceof PdfTemplate) {\n this.add(obj, name);\n }\n else if (obj instanceof PdfGradientBrush || obj instanceof PdfTilingBrush) {\n this.add(obj, name);\n }\n else if (obj instanceof PdfTransparency) {\n this.add(obj, name);\n }\n else if (obj instanceof PdfImage || obj instanceof PdfBitmap) {\n this.add(obj, name);\n }\n }\n return name;\n };\n /**\n * Gets `resource names` to font dictionaries.\n * @private\n */\n PdfResources.prototype.getNames = function () {\n if (this.pdfNames == null) {\n this.pdfNames = new TemporaryDictionary();\n }\n var fonts = this.items.getValue(this.dictionaryProperties.font);\n if (fonts != null) {\n var reference = fonts;\n var dictionary = fonts;\n dictionary = PdfCrossTable.dereference(fonts);\n }\n return this.pdfNames;\n };\n /**\n * Add `RequireProcedureSet` into procset array.\n * @private\n */\n PdfResources.prototype.requireProcedureSet = function (procedureSetName) {\n if (procedureSetName == null) {\n throw new Error('ArgumentNullException:procedureSetName');\n }\n var procSets = this.items.getValue(this.dictionaryProperties.procset);\n if (procSets == null) {\n procSets = new PdfArray();\n this.items.setValue(this.dictionaryProperties.procset, procSets);\n }\n var name = new PdfName(procedureSetName);\n if (!procSets.contains(name)) {\n procSets.add(name);\n }\n };\n //Helper Methods\n /**\n * `Remove font` from array.\n * @private\n */\n PdfResources.prototype.removeFont = function (name) {\n var key = null;\n var keys = this.pdfNames.keys();\n for (var index = 0; index < this.pdfNames.size(); index++) {\n if (this.pdfNames.getValue(keys[index]) === new PdfName(name)) {\n key = keys[index];\n break;\n }\n }\n if (key != null) {\n this.pdfNames.remove(key);\n }\n };\n /**\n * Generates `Unique string name`.\n * @private\n */\n PdfResources.prototype.generateName = function () {\n var name = Guid.getNewGuidString();\n return name;\n };\n PdfResources.prototype.add = function (arg1, arg2) {\n if (arg1 instanceof PdfFont) {\n var dictionary = null;\n var fonts = this.items.getValue(this.dictionaryProperties.font);\n if (fonts != null) {\n var reference = fonts;\n dictionary = fonts;\n dictionary = fonts;\n }\n else {\n dictionary = new PdfDictionary();\n this.items.setValue(this.dictionaryProperties.font, dictionary);\n }\n dictionary.items.setValue(arg2.value, new PdfReferenceHolder(arg1.element));\n }\n else if (arg1 instanceof PdfTemplate) {\n var xobjects = void 0;\n xobjects = this.items.getValue(this.dictionaryProperties.xObject);\n // Create fonts dictionary.\n if (xobjects == null) {\n xobjects = new PdfDictionary();\n this.items.setValue(this.dictionaryProperties.xObject, xobjects);\n }\n xobjects.items.setValue(arg2.value, new PdfReferenceHolder(arg1.element));\n }\n else if (arg1 instanceof PdfBrush) {\n if (arg1 instanceof PdfGradientBrush || arg1 instanceof PdfTilingBrush) {\n var savable = arg1.element;\n if (savable != null) {\n var pattern = this.items.getValue(this.dictionaryProperties.pattern);\n // Create a new pattern dictionary.\n if (pattern == null) {\n pattern = new PdfDictionary();\n this.items.setValue(this.dictionaryProperties.pattern, pattern);\n }\n pattern.items.setValue(arg2.value, new PdfReferenceHolder(savable));\n }\n }\n }\n else if (arg1 instanceof PdfTransparency) {\n var savable = arg1.element;\n var transDic = null;\n transDic = this.items.getValue(this.dictionaryProperties.extGState);\n // Create a new pattern dictionary.\n if (transDic == null) {\n transDic = new PdfDictionary();\n this.items.setValue(this.dictionaryProperties.extGState, transDic);\n }\n transDic.items.setValue(arg2.value, new PdfReferenceHolder(savable));\n }\n else {\n /* tslint:disable */\n var xobjects = this.Dictionary.items.getValue(this.dictionaryProperties.xObject);\n var parentXObjects = void 0;\n if (typeof this.pdfDocument !== 'undefined') {\n parentXObjects = this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.getValue(this.dictionaryProperties.xObject);\n }\n var values = this.Dictionary.items.values();\n var hasSameImageStream = false;\n var oldReference = void 0;\n if (typeof this.pdfDocument !== 'undefined' && (typeof parentXObjects === undefined || parentXObjects == null)) {\n parentXObjects = new PdfDictionary();\n this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.setValue(this.dictionaryProperties.xObject, parentXObjects);\n }\n else if (typeof this.pdfDocument !== 'undefined') {\n var values_1 = parentXObjects.items.values();\n for (var i = 0; i < values_1.length; i++) {\n if (typeof values_1[i] !== 'undefined' && typeof values_1[i].element !== 'undefined') {\n if (values_1[i].element.data[0] === arg1.element.data[0]) {\n oldReference = values_1[i];\n hasSameImageStream = true;\n }\n }\n }\n }\n if (xobjects == null) {\n xobjects = new PdfDictionary();\n this.Dictionary.items.setValue(this.dictionaryProperties.xObject, xobjects);\n }\n if (hasSameImageStream && typeof oldReference !== 'undefined') {\n xobjects.items.setValue(arg2.value, oldReference);\n }\n else {\n var reference = new PdfReferenceHolder(arg1.element);\n xobjects.items.setValue(arg2.value, reference);\n if (typeof this.pdfDocument !== 'undefined') {\n parentXObjects.items.setValue(arg2.value, reference);\n }\n }\n /* tslint:enable */\n }\n };\n return PdfResources;\n}(PdfDictionary));\nexport { PdfResources };\n/* tslint:disable */\n/**\n * Used to create new guid for resources.\n * @private\n */\nvar Guid = /** @class */ (function () {\n function Guid() {\n }\n /**\n * Generate `new GUID`.\n * @private\n */\n Guid.getNewGuidString = function () {\n return 'aaaaaaaa-aaaa-4aaa-baaa-aaaaaaaaaaaa'.replace(/[ab]/g, function (c) {\n var random = Math.random() * 16 | 0;\n var result = c === 'a' ? random : (random & 0x3 | 0x8);\n return result.toString(16);\n });\n };\n return Guid;\n}());\nexport { Guid };\n/* tslint:enable */ \n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { GetResourceEventHandler } from './../pdf-graphics';\nimport { PdfBrush } from './pdf-brush';\nimport { PointF, SizeF, RectangleF, Rectangle } from './../../drawing/pdf-drawing';\nimport { DictionaryProperties } from './../../input-output/pdf-dictionary-properties';\nimport { PdfArray } from './../../primitives/pdf-array';\nimport { PdfNumber } from './../../primitives/pdf-number';\nimport { PdfGraphics } from './../pdf-graphics';\nimport { PdfResources } from './../pdf-resources';\nimport { PdfStream } from './../../primitives/pdf-stream';\nimport { PdfPage } from './../../pages/pdf-page';\n/**\n * `PdfTilingBrush` Implements a colored tiling brush.\n */\nvar PdfTilingBrush = /** @class */ (function (_super) {\n __extends(PdfTilingBrush, _super);\n /**\n * Initializes a new instance of the `PdfTilingBrush` class.\n * @public\n */\n function PdfTilingBrush(arg1, arg2) {\n var _this = _super.call(this) || this;\n /**\n * Local variable to store Stroking.\n * @private\n */\n _this.mStroking = false;\n /**\n * Local variable to store the tile start location.\n * @private\n */\n _this.mLocation = new PointF(0, 0);\n /**\n * Local variable to store the dictionary properties.\n * @private\n */\n _this.mDictionaryProperties = new DictionaryProperties();\n var rect = null;\n if (arg1 instanceof Rectangle) {\n rect = arg1;\n }\n else if (arg1 instanceof SizeF) {\n rect = new Rectangle(0, 0, arg1.width, arg1.height);\n }\n if (arg2 !== null && arg2 instanceof PdfPage) {\n _this.mPage = arg2;\n }\n _this.brushStream = new PdfStream();\n _this.mResources = new PdfResources();\n _this.brushStream.items.setValue(_this.mDictionaryProperties.resources, _this.mResources);\n _this.setBox(rect);\n _this.setObligatoryFields();\n if (arg2 !== null && arg2 instanceof PdfPage) {\n _this.mPage = arg2;\n _this.graphics.colorSpace = arg2.document.colorSpace;\n }\n return _this;\n }\n /**\n * Initializes a new instance of the `PdfTilingBrush` class.\n * @private\n * @param rectangle The size of the smallest brush cell.\n * @param page The Current Page Object.\n * @param location The Tile start location.\n * @param matrix The matrix.\n */\n PdfTilingBrush.prototype.initialize = function (rectangle, page, location, matrix) {\n this.mPage = page;\n this.mLocation = location;\n this.mTransformationMatrix = matrix;\n this.tempBrushStream = this.brushStream;\n this.brushStream = new PdfStream();\n var tempResource = new PdfResources();\n this.brushStream.items.setValue(this.mDictionaryProperties.resources, tempResource);\n this.setBox(rectangle);\n this.setObligatoryFields();\n return this;\n };\n Object.defineProperty(PdfTilingBrush.prototype, \"location\", {\n //Properties\n /**\n * Location representing the start position of the tiles.\n * @public\n */\n get: function () {\n return this.mLocation;\n },\n set: function (value) {\n this.mLocation = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets the obligatory fields.\n * @private\n */\n PdfTilingBrush.prototype.setObligatoryFields = function () {\n this.brushStream.items.setValue(this.mDictionaryProperties.patternType, new PdfNumber(1));\n // Tiling brush.\n this.brushStream.items.setValue(this.mDictionaryProperties.paintType, new PdfNumber(1));\n // Coloured.\n this.brushStream.items.setValue(this.mDictionaryProperties.tilingType, new PdfNumber(1));\n // Constant spacing.\n this.brushStream.items.setValue(this.mDictionaryProperties.xStep, new PdfNumber((this.mBox.right - this.mBox.left)));\n this.brushStream.items.setValue(this.mDictionaryProperties.yStep, new PdfNumber((this.mBox.bottom - this.mBox.top)));\n if ((this.mPage != null) && (this.mLocation != null)) {\n if ((this.mTransformationMatrix == null && typeof this.mTransformationMatrix === 'undefined')) {\n // Transform the tile origin to fit the location\n var tileTransform = (this.mPage.size.height % this.rectangle.size.height) - (this.mLocation.y);\n /* tslint:disable-next-line:max-line-length */\n this.brushStream.items.setValue(this.mDictionaryProperties.matrix, new PdfArray([1, 0, 0, 1, this.mLocation.x, tileTransform]));\n }\n else {\n var tileTransform = 0;\n // Transform the tile origin to fit the location\n var elements = this.mTransformationMatrix.matrix.elements;\n if ((this.mPage.size.height > this.rectangle.size.height)) {\n tileTransform = (this.mTransformationMatrix.matrix.offsetY\n - (this.mPage.size.height % this.rectangle.size.height));\n }\n else {\n tileTransform = ((this.mPage.size.height % this.rectangle.size.height) + this.mTransformationMatrix.matrix.offsetY);\n }\n this.brushStream.items.setValue(this.mDictionaryProperties.matrix, new PdfArray([\n elements[0], elements[1], elements[2], elements[3], elements[4], tileTransform\n ]));\n }\n }\n };\n /**\n * Sets the BBox coordinates.\n * @private\n */\n PdfTilingBrush.prototype.setBox = function (box) {\n this.mBox = box;\n var rect = new RectangleF(this.mBox.left, this.mBox.top, this.mBox.right, this.mBox.bottom);\n this.brushStream.items.setValue(this.mDictionaryProperties.bBox, PdfArray.fromRectangle(rect));\n };\n Object.defineProperty(PdfTilingBrush.prototype, \"rectangle\", {\n //Properties\n /**\n * Gets the boundary box of the smallest brush cell.\n * @public\n */\n get: function () {\n return this.mBox;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTilingBrush.prototype, \"size\", {\n /**\n * Gets the size of the smallest brush cell.\n * @public\n */\n get: function () {\n return this.mBox.size;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTilingBrush.prototype, \"graphics\", {\n /**\n * Gets Graphics context of the brush.\n */\n get: function () {\n if ((this.mGraphics == null && typeof this.mGraphics === 'undefined')) {\n var gr = new GetResourceEventHandler(this);\n var g = new PdfGraphics(this.size, gr, this.brushStream);\n this.mGraphics = g;\n this.mResources = this.getResources();\n this.mGraphics.initializeCoordinates();\n }\n return this.mGraphics;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the resources and modifies the template dictionary.\n * @public\n */\n PdfTilingBrush.prototype.getResources = function () {\n return this.mResources;\n };\n Object.defineProperty(PdfTilingBrush.prototype, \"stroking\", {\n /**\n * Gets or sets a value indicating whether this PdfTilingBrush\n * is used for stroking operations.\n */\n get: function () {\n return this.mStroking;\n },\n set: function (value) {\n this.mStroking = value;\n },\n enumerable: true,\n configurable: true\n });\n //PdfBrush methods\n /**\n * Creates a new copy of a brush.\n * @public\n */\n PdfTilingBrush.prototype.clone = function () {\n var brush = this.initialize(this.rectangle, this.mPage, this.location, this.mTransformationMatrix);\n if ((this.mTransformationMatrix != null) && (this.mTransformationMatrix.matrix != null)) {\n /* tslint:disable-next-line:max-line-length */\n brush.brushStream.items.setValue(this.mDictionaryProperties.matrix, new PdfArray(this.mTransformationMatrix.matrix.elements));\n }\n brush.brushStream.data = this.tempBrushStream.data;\n brush.mResources = new PdfResources(this.mResources);\n brush.brushStream.items.setValue(this.mDictionaryProperties.resources, brush.mResources);\n return brush;\n };\n /**\n * Monitors the changes of the brush and modify PDF state respectfully.\n * @param brush The brush\n * @param streamWriter The stream writer\n * @param getResources The get resources delegate.\n * @param saveChanges if set to true the changes should be saved anyway.\n * @param currentColorSpace The current color space.\n */\n /* tslint:disable-next-line:max-line-length */\n PdfTilingBrush.prototype.monitorChanges = function (brush, streamWriter, getResources, saveChanges, currentColorSpace) {\n var diff = false;\n if (brush !== this) {\n // Set the Pattern colour space.\n streamWriter.setColorSpace('Pattern', this.mStroking);\n // Set the pattern for non-stroking operations.\n var resources1 = getResources.getResources();\n var name1 = resources1.getName(this);\n streamWriter.setColourWithPattern(null, name1, this.mStroking);\n diff = true;\n }\n else if (brush instanceof PdfTilingBrush) {\n // Set the /Pattern colour space.\n streamWriter.setColorSpace('Pattern', this.mStroking);\n // Set the pattern for non-stroking operations.\n var resources = getResources.getResources();\n var name_1 = resources.getName(this);\n streamWriter.setColourWithPattern(null, name_1, this.mStroking);\n diff = true;\n }\n return diff;\n };\n /**\n * Resets the changes, which were made by the brush.\n * In other words resets the state to the initial one.\n * @param streamWriter The stream writer.\n */\n PdfTilingBrush.prototype.resetChanges = function (streamWriter) {\n // We shouldn't do anything to reset changes.\n // All changes will be reset automatically by setting a new colour space.\n };\n Object.defineProperty(PdfTilingBrush.prototype, \"element\", {\n /* tslint:enable */\n // IPdfWrapper Members\n /**\n * Gets the `element`.\n * @public\n */\n get: function () {\n return this.brushStream;\n },\n enumerable: true,\n configurable: true\n });\n return PdfTilingBrush;\n}(PdfBrush));\nexport { PdfTilingBrush };\n","/**\n * PdfGraphics.ts class for EJ2-PDF\n */\nimport { PdfColorSpace, TextRenderingMode, PdfFillMode, PdfTextAlignment } from './enum';\nimport { PdfVerticalAlignment, PdfBlendMode } from './enum';\nimport { PdfSubSuperScript } from './fonts/enum';\nimport { PdfStreamWriter } from './../input-output/pdf-stream-writer';\nimport { PdfPen } from './pdf-pen';\nimport { PdfBrush } from './brushes/pdf-brush';\nimport { PdfSolidBrush } from './brushes/pdf-solid-brush';\nimport { PdfFont } from './fonts/pdf-font';\nimport { PdfTransformationMatrix } from './pdf-transformation-matrix';\nimport { PointF, SizeF, RectangleF } from './../drawing/pdf-drawing';\nimport { ProcedureSets } from './constants';\nimport { PdfString } from './../primitives/pdf-string';\nimport { PdfStringFormat } from './fonts/pdf-string-format';\nimport { TemporaryDictionary } from './../collections/object-object-pair/dictionary';\nimport { PdfTransparency } from './pdf-transparency';\nimport { PdfStringLayouter, LineType } from './fonts/string-layouter';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\nimport { StringTokenizer } from './fonts/string-tokenizer';\nimport { PdfAutomaticFieldInfoCollection } from './../document/automatic-fields/automatic-field-info-collection';\nimport { PdfAutomaticFieldInfo } from './../document/automatic-fields/automatic-field-info';\nimport { Operators } from './../input-output/pdf-operators';\nimport { UnicodeTrueTypeFont } from './fonts/unicode-true-type-font';\nimport { InternalEnum } from './../primitives/pdf-string';\nimport { RtlRenderer } from './fonts/rtl-renderer';\nimport { PdfTextDirection } from './enum';\nimport { PathPointType } from './figures/enum';\nimport { PdfGradientBrush } from './../../implementation/graphics/brushes/pdf-gradient-brush';\nimport { PdfTilingBrush } from './brushes/pdf-tiling-brush';\n/**\n * `PdfGraphics` class represents a graphics context of the objects.\n * It's used for performing all the graphics operations.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a new page to the document\n * let page1 : PdfPage = document.pages.add();\n * // set the font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // create black brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * //\n * //graphics of the page\n * let page1Graphics : PdfGraphics = page1.graphics;\n * // draw the text on the page1 graphics\n * page1Graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));\n * //\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\nvar PdfGraphics = /** @class */ (function () {\n function PdfGraphics(arg1, arg2, arg3) {\n /**\n * Represents the `Current color space`.\n * @private\n */\n this.currentColorSpace = PdfColorSpace.Rgb;\n /**\n * Stores `previous rendering mode`.\n * @private\n */\n this.previousTextRenderingMode = TextRenderingMode.Fill;\n /**\n * Previous `character spacing` value or 0.\n * @private\n */\n this.previousCharacterSpacing = 0.0;\n /**\n * Previous `word spacing` value or 0.\n * @private\n */\n this.previousWordSpacing = 0.0;\n /**\n * The `previously used text scaling` value.\n * @private\n */\n this.previousTextScaling = 100.0;\n /**\n * Instance of `ProcedureSets` class.\n * @private\n */\n this.procedureSets = new ProcedureSets();\n /**\n * To check wihether it is a `direct text rendering`.\n * @default true\n * @private\n */\n this.isNormalRender = true;\n /**\n * check whether to `use font size` to calculate the shift.\n * @default false\n * @private\n */\n this.isUseFontSize = false;\n /**\n * check whether the font is in `italic type`.\n * @default false\n * @private\n */\n this.isItalic = false;\n /**\n * Check whether it is an `emf Text Matrix`.\n * @default false\n * @private\n */\n this.isEmfTextScaled = false;\n /**\n * Check whether it is an `emf` call.\n * @default false\n * @private\n */\n this.isEmf = false;\n /**\n * Check whether it is an `emf plus` call.\n * @default false\n * @private\n */\n this.isEmfPlus = false;\n /**\n * Check whether it is in `base line format`.\n * @default true\n * @private\n */\n this.isBaselineFormat = true;\n /**\n * Emf Text `Scaling Factor`.\n * @private\n */\n this.emfScalingFactor = new SizeF(0, 0);\n /**\n * To check whether the `last color space` of document and garphics is saved.\n * @private\n */\n this.colorSpaceChanged = false;\n /**\n * Stores an instance of `DictionaryProperties`.\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n /**\n * Checks whether the x co-ordinate is need to set as client size or not.\n * @hidden\n * @private\n */\n this.isOverloadWithPosition = false;\n /**\n * Checks whether the x co-ordinate is need to set as client size or not.\n * @hidden\n * @private\n */\n this.isPointOverload = false;\n /**\n * Current colorspaces.\n * @hidden\n * @private\n */\n this.currentColorSpaces = ['RGB', 'CMYK', 'GrayScale', 'Indexed'];\n /**\n * Checks the current image `is optimized` or not.\n * @default false.\n * @private\n */\n this.isImageOptimized = false;\n /**\n * Stores the `graphics states`.\n * @private\n */\n this.graphicsState = [];\n /**\n * Indicates whether the object `had trasparency`.\n * @default false\n * @private\n */\n this.istransparencySet = false;\n /**\n * Stores the instance of `PdfAutomaticFieldInfoCollection` class .\n * @default null\n * @private\n */\n this.internalAutomaticFields = null;\n /**\n * Stores the index of the start line that should draw with in the next page.\n * @private\n */\n this.startCutIndex = -1;\n this.getResources = arg2;\n this.canvasSize = arg1;\n if (arg3 instanceof PdfStreamWriter) {\n this.pdfStreamWriter = arg3;\n }\n else {\n this.pdfStreamWriter = new PdfStreamWriter(arg3);\n }\n this.initialize();\n }\n Object.defineProperty(PdfGraphics.prototype, \"stringLayoutResult\", {\n // Properties\n /**\n * Returns the `result` after drawing string.\n * @private\n */\n get: function () {\n return this.pdfStringLayoutResult;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphics.prototype, \"size\", {\n /**\n * Gets the `size` of the canvas.\n * @private\n */\n get: function () {\n return this.canvasSize;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphics.prototype, \"mediaBoxUpperRightBound\", {\n /**\n * Gets and Sets the value of `MediaBox upper right bound`.\n * @private\n */\n get: function () {\n if (typeof this.internalMediaBoxUpperRightBound === 'undefined') {\n this.internalMediaBoxUpperRightBound = 0;\n }\n return this.internalMediaBoxUpperRightBound;\n },\n set: function (value) {\n this.internalMediaBoxUpperRightBound = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphics.prototype, \"clientSize\", {\n /**\n * Gets the `size` of the canvas reduced by margins and page templates.\n * @private\n */\n get: function () {\n return new SizeF(this.clipBounds.width, this.clipBounds.height);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphics.prototype, \"colorSpace\", {\n /**\n * Gets or sets the current `color space` of the document\n * @private\n */\n get: function () {\n return this.currentColorSpace;\n },\n set: function (value) {\n this.currentColorSpace = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphics.prototype, \"streamWriter\", {\n /**\n * Gets the `stream writer`.\n * @private\n */\n get: function () {\n return this.pdfStreamWriter;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphics.prototype, \"matrix\", {\n /**\n * Gets the `transformation matrix` reflecting current transformation.\n * @private\n */\n get: function () {\n if (this.transformationMatrix == null) {\n this.transformationMatrix = new PdfTransformationMatrix();\n }\n return this.transformationMatrix;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphics.prototype, \"layer\", {\n /**\n * Gets the `layer` for the graphics, if exists.\n * @private\n */\n get: function () {\n return this.pageLayer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphics.prototype, \"page\", {\n /**\n * Gets the `page` for this graphics, if exists.\n * @private\n */\n get: function () {\n return this.pageLayer.page;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphics.prototype, \"automaticFields\", {\n get: function () {\n if (this.internalAutomaticFields == null || typeof this.internalAutomaticFields === 'undefined') {\n this.internalAutomaticFields = new PdfAutomaticFieldInfoCollection();\n }\n return this.internalAutomaticFields;\n },\n enumerable: true,\n configurable: true\n });\n //Implementation\n /**\n * `Initializes` this instance.\n * @private\n */\n PdfGraphics.prototype.initialize = function () {\n this.bStateSaved = false;\n this.currentPen = null;\n this.currentBrush = null;\n this.currentFont = null;\n this.currentColorSpace = PdfColorSpace.Rgb;\n this.bCSInitialized = false;\n this.transformationMatrix = null;\n this.previousTextRenderingMode = (-1); //.Fill;\n this.previousCharacterSpacing = -1.0;\n this.previousWordSpacing = -1.0;\n this.previousTextScaling = -100.0;\n // this.m_trasparencies = null;\n this.currentStringFormat = null;\n this.clipBounds = new RectangleF(new PointF(0, 0), this.size);\n this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf);\n };\n PdfGraphics.prototype.drawPdfTemplate = function (template, location, size) {\n if (typeof size === 'undefined') {\n if (template == null) {\n throw Error('ArgumentNullException-template');\n }\n this.drawPdfTemplate(template, location, template.size);\n }\n else {\n // let crossTable : PdfCrossTable = null;\n // if (this.pageLayer != null) {\n // crossTable = (this.page as PdfPage).section.parentDocument.crossTable;\n // }\n if (template == null) {\n throw Error('ArgumentNullException-template');\n }\n var scaleX = (template.width > 0) ? size.width / template.width : 1;\n var scaleY = (template.height > 0) ? size.height / template.height : 1;\n var bNeedScale = !(scaleX === 1 && scaleY === 1);\n // Save state.\n var state = this.save();\n // Take into consideration that rect location is bottom/left.\n var matrix = new PdfTransformationMatrix();\n if (this.pageLayer != null) {\n this.getTranslateTransform(location.x, location.y + size.height, matrix);\n }\n if (bNeedScale) {\n this.getScaleTransform(scaleX, scaleY, matrix);\n }\n this.pdfStreamWriter.modifyCtm(matrix);\n // Output template.\n var resources = this.getResources.getResources();\n var name_1 = resources.getName(template);\n this.pdfStreamWriter.executeObject(name_1);\n // Restore state.\n this.restore(state);\n //Transfer automatic fields from template.\n var g = template.graphics;\n if (g != null) {\n for (var index = 0; index < g.automaticFields.automaticFields.length; index++) {\n var fieldInfo = g.automaticFields.automaticFields[index];\n var newLocation = new PointF(fieldInfo.location.x + location.x, fieldInfo.location.y + location.y);\n var scalingX = template.size.width == 0 ? 0 : size.width / template.size.width;\n var scalingY = template.size.height == 0 ? 0 : size.height / template.size.height;\n this.automaticFields.add(new PdfAutomaticFieldInfo(fieldInfo.field, newLocation, scalingX, scalingY));\n this.page.dictionary.modify();\n }\n }\n this.getResources.getResources().requireProcedureSet(this.procedureSets.imageB);\n this.getResources.getResources().requireProcedureSet(this.procedureSets.imageC);\n this.getResources.getResources().requireProcedureSet(this.procedureSets.imageI);\n this.getResources.getResources().requireProcedureSet(this.procedureSets.text);\n }\n };\n /* tslint:disable */\n /**\n * @public\n */\n PdfGraphics.prototype.drawString = function (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {\n if (typeof arg1 === 'string' && arg2 instanceof PdfFont && (arg3 instanceof PdfPen || arg3 === null) && (arg4 instanceof PdfBrush || arg4 === null) && typeof arg5 === 'number' && typeof arg6 === 'number' && (arg7 instanceof PdfStringFormat || arg7 === null) && typeof arg8 === 'undefined') {\n this.isOverloadWithPosition = true;\n this.drawString(arg1, arg2, arg3, arg4, arg5, arg6, (this.clientSize.width - arg5), 0, arg7);\n }\n else {\n var temparg3 = arg3;\n var temparg4 = arg4;\n var temparg5 = arg5;\n var temparg6 = arg6;\n var temparg7 = arg7;\n var temparg8 = arg8;\n var temparg9 = arg9;\n var layouter = new PdfStringLayouter();\n var result = layouter.layout(arg1, arg2, temparg9, new SizeF(temparg7, temparg8), this.isOverloadWithPosition, this.clientSize);\n if (!result.empty) {\n var rect = this.checkCorrectLayoutRectangle(result.actualSize, temparg5, temparg6, temparg9);\n if (temparg7 <= 0) {\n temparg5 = rect.x;\n temparg7 = rect.width;\n }\n if (temparg8 <= 0) {\n temparg6 = rect.y;\n temparg8 = rect.height;\n }\n this.drawStringLayoutResult(result, arg2, temparg3, temparg4, new RectangleF(temparg5, temparg6, temparg7, temparg8), temparg9);\n this.isEmfTextScaled = false;\n this.emfScalingFactor = new SizeF(0, 0);\n }\n this.getResources.getResources().requireProcedureSet(this.procedureSets.text);\n this.isNormalRender = true;\n this.pdfStringLayoutResult = result;\n this.isUseFontSize = false;\n }\n }; /* tslint:enable */\n PdfGraphics.prototype.drawLine = function (arg1, arg2, arg3, arg4, arg5) {\n if (arg2 instanceof PointF) {\n var temparg2 = arg2;\n var temparg3 = arg3;\n this.drawLine(arg1, temparg2.x, temparg2.y, temparg3.x, temparg3.y);\n }\n else {\n var temparg2 = arg2;\n var temparg3 = arg3;\n var temparg4 = arg4;\n var temparg5 = arg5;\n this.stateControl(arg1, null, null);\n var sw = this.streamWriter;\n sw.beginPath(temparg2, temparg3);\n sw.appendLineSegment(temparg4, temparg5);\n sw.strokePath();\n this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf);\n }\n };\n /* tslint:disable */\n PdfGraphics.prototype.drawRectangle = function (arg1, arg2, arg3, arg4, arg5, arg6) {\n if (arg1 instanceof PdfPen && typeof arg2 === 'number') {\n var temparg3 = arg3;\n this.drawRectangle(arg1, null, arg2, temparg3, arg4, arg5);\n }\n else if (arg1 instanceof PdfBrush && typeof arg2 === 'number') {\n var temparg3 = arg3;\n this.drawRectangle(null, arg1, arg2, temparg3, arg4, arg5);\n }\n else {\n var temparg3 = arg3;\n var temparg4 = arg4;\n var temparg5 = arg5;\n var temparg6 = arg6;\n if ((arg2 instanceof PdfTilingBrush)) {\n this.bCSInitialized = false;\n var xOffset = (this.matrix.matrix.offsetX + temparg3);\n var yOffset = void 0;\n if (((this.layer != null) && (this.layer.page != null))) {\n yOffset = ((this.layer.page.size.height - this.matrix.matrix.offsetY) + temparg4);\n }\n else {\n yOffset = ((this.clientSize.height - this.matrix.matrix.offsetY) + temparg4);\n }\n (arg2).location = new PointF(xOffset, yOffset);\n (arg2).graphics.colorSpace = this.colorSpace;\n }\n else if ((arg2 instanceof PdfGradientBrush)) {\n arg2.colorSpace = this.colorSpace;\n }\n if (arg2 instanceof PdfSolidBrush && arg2.color.isEmpty) {\n arg2 = null;\n }\n var temparg1 = arg1;\n var temparg2 = arg2;\n this.stateControl(temparg1, temparg2, null);\n this.streamWriter.appendRectangle(temparg3, temparg4, temparg5, temparg6);\n this.drawPathHelper(temparg1, temparg2, false);\n }\n };\n PdfGraphics.prototype.drawPathHelper = function (arg1, arg2, arg3, arg4) {\n if (typeof arg3 === 'boolean') {\n var temparg3 = arg3;\n this.drawPathHelper(arg1, arg2, PdfFillMode.Winding, temparg3);\n }\n else {\n var temparg3 = arg3;\n var temparg4 = arg4;\n var isPen = arg1 != null;\n var isBrush = arg2 != null;\n var isEvenOdd = (temparg3 === PdfFillMode.Alternate);\n if (isPen && isBrush) {\n this.streamWriter.fillStrokePath(isEvenOdd);\n }\n else if (!isPen && !isBrush) {\n this.streamWriter.endPath();\n }\n else if (isPen) {\n this.streamWriter.strokePath();\n }\n else {\n this.streamWriter.fillPath(isEvenOdd);\n }\n }\n };\n /* tslint:disable */\n PdfGraphics.prototype.drawImage = function (arg1, arg2, arg3, arg4, arg5) {\n if (typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'undefined') {\n var size = arg1.physicalDimension;\n this.drawImage(arg1, arg2, arg3, size.width, size.height);\n }\n else {\n var temparg2 = arg2;\n var temparg3 = arg3;\n var temparg4 = arg4;\n var temparg5 = arg5;\n arg1.save();\n var matrix = new PdfTransformationMatrix();\n this.getTranslateTransform(temparg2, (temparg3 + temparg5), matrix);\n this.getScaleTransform(arg4, arg5, matrix);\n this.pdfStreamWriter.write('q');\n this.pdfStreamWriter.modifyCtm(matrix);\n // Output template.\n var resources = this.getResources.getResources();\n if (typeof this.pageLayer !== 'undefined' && this.page != null) {\n resources.document = this.page.document;\n }\n var name_2 = resources.getName(arg1);\n if (typeof this.pageLayer !== 'undefined') {\n this.page.setResources(resources);\n }\n this.pdfStreamWriter.executeObject(name_2);\n this.pdfStreamWriter.write(Operators.restoreState);\n this.pdfStreamWriter.write(Operators.newLine);\n var resource = this.getResources.getResources();\n resource.requireProcedureSet(this.procedureSets.imageB);\n resource.requireProcedureSet(this.procedureSets.imageC);\n resource.requireProcedureSet(this.procedureSets.imageI);\n resource.requireProcedureSet(this.procedureSets.text);\n }\n };\n //Implementation\n /* tslint:disable */\n /**\n * Returns `bounds` of the line info.\n * @private\n */\n PdfGraphics.prototype.getLineBounds = function (lineIndex, result, font, layoutRectangle, format) {\n var bounds;\n if (!result.empty && lineIndex < result.lineCount && lineIndex >= 0) {\n var line = result.lines[lineIndex];\n var vShift = this.getTextVerticalAlignShift(result.actualSize.height, layoutRectangle.height, format);\n var y = vShift + layoutRectangle.y + (result.lineHeight * lineIndex);\n var lineWidth = line.width;\n var hShift = this.getHorizontalAlignShift(lineWidth, layoutRectangle.width, format);\n var lineIndent = this.getLineIndent(line, format, layoutRectangle, (lineIndex === 0));\n hShift += (!this.rightToLeft(format)) ? lineIndent : 0;\n var x = layoutRectangle.x + hShift;\n /* tslint:disable */\n var width = (!this.shouldJustify(line, layoutRectangle.width, format)) ? lineWidth - lineIndent : layoutRectangle.width - lineIndent; /* tslint:enable */\n var height = result.lineHeight;\n bounds = new RectangleF(x, y, width, height);\n }\n else {\n bounds = new RectangleF(0, 0, 0, 0);\n }\n return bounds;\n };\n /**\n * Creates `lay outed rectangle` depending on the text settings.\n * @private\n */\n PdfGraphics.prototype.checkCorrectLayoutRectangle = function (textSize, x, y, format) {\n var layoutedRectangle = new RectangleF(x, y, textSize.width, textSize.width);\n if (format != null) {\n switch (format.alignment) {\n case PdfTextAlignment.Center:\n layoutedRectangle.x -= layoutedRectangle.width / 2;\n break;\n case PdfTextAlignment.Right:\n layoutedRectangle.x -= layoutedRectangle.width;\n break;\n }\n switch (format.lineAlignment) {\n case PdfVerticalAlignment.Middle:\n layoutedRectangle.y -= layoutedRectangle.height / 2;\n break;\n case PdfVerticalAlignment.Bottom:\n layoutedRectangle.y -= layoutedRectangle.height;\n break;\n }\n }\n return layoutedRectangle;\n };\n /**\n * Sets the `layer` for the graphics.\n * @private\n */\n PdfGraphics.prototype.setLayer = function (layer) {\n this.pageLayer = layer;\n var page = layer.page;\n if (page != null && typeof page !== 'undefined') {\n page.beginSave = this.pageSave;\n }\n };\n /**\n * Adding page number field before page saving.\n * @private\n */\n /* tslint:disable */\n PdfGraphics.prototype.pageSave = function (page) {\n if (page.graphics.automaticFields != null) {\n for (var i = 0; i < page.graphics.automaticFields.automaticFields.length; i++) {\n var fieldInfo = page.graphics.automaticFields.automaticFields[i];\n fieldInfo.field.performDraw(page.graphics, fieldInfo.location, fieldInfo.scalingX, fieldInfo.scalingY);\n }\n }\n };\n /**\n * `Draws a layout result`.\n * @private\n */\n PdfGraphics.prototype.drawStringLayoutResult = function (result, font, pen, brush, layoutRectangle, format) {\n if (!result.empty) {\n this.applyStringSettings(font, pen, brush, format, layoutRectangle);\n // Set text scaling\n var textScaling = (format != null) ? format.horizontalScalingFactor : 100.0;\n if (textScaling !== this.previousTextScaling && !this.isEmfTextScaled) {\n this.pdfStreamWriter.setTextScaling(textScaling);\n this.previousTextScaling = textScaling;\n }\n var height = (format == null || format.lineSpacing === 0) ? font.height : format.lineSpacing + font.height;\n var subScript = (format != null && format.subSuperScript === PdfSubSuperScript.SubScript);\n var shift = 0;\n shift = (subScript) ? height - (font.height + font.metrics.getDescent(format)) : (height - font.metrics.getAscent(format));\n this.shift = shift;\n this.pdfStreamWriter.startNextLine(layoutRectangle.x, layoutRectangle.y - shift);\n this.pdfStreamWriter.setLeading(+height);\n var resultHeight = 0;\n var remainingString = '';\n for (var i = 0; i < result.lines.length; i++) {\n resultHeight += result.lineHeight;\n if ((layoutRectangle.y + resultHeight) > this.clientSize.height) {\n this.startCutIndex = i;\n break;\n }\n }\n for (var j = this.startCutIndex; (j < result.lines.length && j >= 0); j++) {\n remainingString += result.lines[j].text;\n }\n var bounds = new RectangleF(layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height);\n this.drawLayoutResult(result, font, format, layoutRectangle);\n this.underlineStrikeoutText(pen, brush, result, font, bounds, format);\n this.isEmfPlus = false;\n this.isUseFontSize = false;\n if (this.startCutIndex !== -1) {\n var page = this.getNextPage();\n page.graphics.drawString(remainingString, font, pen, brush, layoutRectangle.x, 0, layoutRectangle.width, 0, format);\n }\n }\n else {\n throw new Error('ArgumentNullException:result');\n }\n };\n /**\n * Gets the `next page`.\n * @private\n */\n PdfGraphics.prototype.getNextPage = function () {\n var section = this.currentPage.section;\n var nextPage = null;\n var index = section.indexOf(this.currentPage);\n if (index === section.count - 1) {\n nextPage = section.add();\n }\n else {\n nextPage = section.getPages()[index + 1];\n }\n return nextPage;\n };\n PdfGraphics.prototype.setClip = function (rectangle, mode) {\n if (typeof mode === 'undefined') {\n this.setClip(rectangle, PdfFillMode.Winding);\n }\n else {\n this.pdfStreamWriter.appendRectangle(rectangle);\n this.pdfStreamWriter.clipPath((mode === PdfFillMode.Alternate));\n }\n };\n /**\n * Applies all the `text settings`.\n * @private\n */\n PdfGraphics.prototype.applyStringSettings = function (font, pen, brush, format, bounds) {\n if (brush instanceof PdfTilingBrush) {\n this.bCSInitialized = false;\n brush.graphics.colorSpace = this.colorSpace;\n }\n else if ((brush instanceof PdfGradientBrush)) {\n this.bCSInitialized = false;\n brush.colorSpace = this.colorSpace;\n }\n var setLineWidth = false;\n var tm = this.getTextRenderingMode(pen, brush, format);\n this.stateControl(pen, brush, font, format);\n this.pdfStreamWriter.beginText();\n if ((tm) !== this.previousTextRenderingMode) {\n this.pdfStreamWriter.setTextRenderingMode(tm);\n this.previousTextRenderingMode = tm;\n }\n // Set character spacing.\n var cs = (format != null) ? format.characterSpacing : 0;\n if (cs !== this.previousCharacterSpacing && !this.isEmfTextScaled) {\n this.pdfStreamWriter.setCharacterSpacing(cs);\n this.previousCharacterSpacing = cs;\n }\n // Set word spacing.\n // NOTE: it works only if the space code is equal to 32 (0x20).\n var ws = (format != null) ? format.wordSpacing : 0;\n if (ws !== this.previousWordSpacing) {\n this.pdfStreamWriter.setWordSpacing(ws);\n this.previousWordSpacing = ws;\n }\n };\n /**\n * Calculates `shift value` if the text is vertically aligned.\n * @private\n */\n PdfGraphics.prototype.getTextVerticalAlignShift = function (textHeight, boundsHeight, format) {\n var shift = 0;\n if (boundsHeight >= 0 && format != null && format.lineAlignment !== PdfVerticalAlignment.Top) {\n switch (format.lineAlignment) {\n case PdfVerticalAlignment.Middle:\n shift = (boundsHeight - textHeight) / 2;\n break;\n case PdfVerticalAlignment.Bottom:\n shift = boundsHeight - textHeight;\n break;\n }\n }\n return shift;\n };\n /* tslint:disable */\n /**\n * `Draws layout result`.\n * @private\n */\n PdfGraphics.prototype.drawLayoutResult = function (result, font, format, layoutRectangle) {\n var vAlignShift = this.getTextVerticalAlignShift(result.actualSize.height, layoutRectangle.height, format);\n if (vAlignShift !== 0) {\n this.pdfStreamWriter.startNextLine(0, vAlignShift);\n }\n var ttfFont = font;\n var unicode = (ttfFont != null && ttfFont.isUnicode);\n var embed = (ttfFont != null && ttfFont.isEmbedFont);\n var lines = result.lines;\n for (var i = 0, len = lines.length; (i < len && i !== this.startCutIndex); i++) {\n var lineInfo = lines[i];\n var line = lineInfo.text;\n var lineWidth = lineInfo.width;\n var hAlignShift = this.getHorizontalAlignShift(lineWidth, layoutRectangle.width, format);\n var lineIndent = this.getLineIndent(lineInfo, format, layoutRectangle, (i === 0));\n hAlignShift += (!this.rightToLeft(format)) ? lineIndent : 0;\n if (hAlignShift !== 0 && !this.isEmfTextScaled) {\n this.pdfStreamWriter.startNextLine(hAlignShift, 0);\n }\n if (unicode) {\n this.drawUnicodeLine(lineInfo, layoutRectangle, font, format);\n }\n else {\n this.drawAsciiLine(lineInfo, layoutRectangle, font, format);\n }\n if (hAlignShift !== 0 && !this.isEmfTextScaled) {\n this.pdfStreamWriter.startNextLine(-hAlignShift, 0);\n }\n if (this.isOverloadWithPosition && lines.length > 1) {\n this.pdfStreamWriter.startNextLine(-(layoutRectangle.x), 0);\n layoutRectangle.x = 0;\n layoutRectangle.width = this.clientSize.width;\n this.isOverloadWithPosition = false;\n this.isPointOverload = true;\n }\n }\n this.getResources.getResources().requireProcedureSet(this.procedureSets.text);\n if (vAlignShift !== 0) {\n this.pdfStreamWriter.startNextLine(0, -(vAlignShift - result.lineHeight));\n }\n this.pdfStreamWriter.endText();\n };\n /**\n * `Draws Ascii line`.\n * @private\n */\n PdfGraphics.prototype.drawAsciiLine = function (lineInfo, layoutRectangle, font, format) {\n this.justifyLine(lineInfo, layoutRectangle.width, format);\n var value = '';\n if (lineInfo.text.indexOf('(') !== -1 || lineInfo.text.indexOf(')') !== -1) {\n for (var i = 0; i < lineInfo.text.length; i++) {\n if (lineInfo.text[i] === '(') {\n value += '\\\\\\(';\n }\n else if (lineInfo.text[i] === ')') {\n value += '\\\\\\)';\n }\n else {\n value += lineInfo.text[i];\n }\n }\n }\n if (value === '') {\n value = lineInfo.text;\n }\n var line = '(' + value + ')';\n this.pdfStreamWriter.showNextLineText(new PdfString(line));\n };\n /**\n * Draws unicode line.\n * @private\n */\n PdfGraphics.prototype.drawUnicodeLine = function (lineInfo, layoutRectangle, font, format) {\n var line = lineInfo.text;\n var lineWidth = lineInfo.width;\n var rtl = (format !== null && typeof format !== 'undefined' && format.rightToLeft);\n /* tslint:disable-next-line:max-line-length */\n var useWordSpace = (format !== null && typeof format !== 'undefined' && (format.wordSpacing !== 0 || format.alignment === PdfTextAlignment.Justify));\n var ttfFont = font;\n var wordSpacing = this.justifyLine(lineInfo, layoutRectangle.width, format);\n var rtlRender = new RtlRenderer();\n if (rtl || (format !== null && typeof format !== 'undefined' && format.textDirection !== PdfTextDirection.None)) {\n var blocks = null;\n /* tslint:disable-next-line:max-line-length */\n var rightAlign = (format !== null && typeof format !== 'undefined' && format.alignment === PdfTextAlignment.Right);\n if (format !== null && typeof format !== 'undefined' && format.textDirection !== PdfTextDirection.None) {\n /* tslint:disable-next-line:max-line-length */\n blocks = rtlRender.layout(line, ttfFont, (format.textDirection === PdfTextDirection.RightToLeft) ? true : false, useWordSpace, format);\n }\n else {\n blocks = rtlRender.layout(line, ttfFont, rightAlign, useWordSpace, format);\n }\n var words = null;\n if (blocks.length > 1) {\n if (format !== null && typeof format !== 'undefined' && format.textDirection !== PdfTextDirection.None) {\n /* tslint:disable-next-line:max-line-length */\n words = rtlRender.splitLayout(line, ttfFont, (format.textDirection === PdfTextDirection.RightToLeft) ? true : false, useWordSpace, format);\n }\n else {\n words = rtlRender.splitLayout(line, ttfFont, rightAlign, useWordSpace, format);\n }\n }\n else {\n words = [line];\n }\n this.drawUnicodeBlocks(blocks, words, ttfFont, format, wordSpacing);\n }\n else {\n if (useWordSpace) {\n var result = this.breakUnicodeLine(line, ttfFont, null);\n var blocks = result.tokens;\n var words = result.words;\n this.drawUnicodeBlocks(blocks, words, ttfFont, format, wordSpacing);\n }\n else {\n var token = this.convertToUnicode(line, ttfFont);\n var value = this.getUnicodeString(token);\n this.streamWriter.showNextLineText(value);\n }\n }\n };\n /**\n * Draws array of unicode tokens.\n */\n /* tslint:disable */\n PdfGraphics.prototype.drawUnicodeBlocks = function (blocks, words, font, format, wordSpacing) {\n /* tslint:enable */\n if (blocks == null) {\n throw new Error('Argument Null Exception : blocks');\n }\n if (words == null) {\n throw new Error('Argument Null Exception : words');\n }\n if (font == null) {\n throw new Error('Argument Null Exception : font');\n }\n this.streamWriter.startNextLine();\n var x = 0;\n var xShift = 0;\n var firstLineIndent = 0;\n var paragraphIndent = 0;\n try {\n if (format !== null && typeof format !== 'undefined') {\n firstLineIndent = format.firstLineIndent;\n paragraphIndent = format.paragraphIndent;\n format.firstLineIndent = 0;\n format.paragraphIndent = 0;\n }\n var spaceWidth = font.getCharWidth(StringTokenizer.whiteSpace, format) + wordSpacing;\n var characterSpacing = (format != null) ? format.characterSpacing : 0;\n var wordSpace = (format !== null && typeof format !== 'undefined' && wordSpacing === 0) ? format.wordSpacing : 0;\n spaceWidth += characterSpacing + wordSpace;\n for (var i = 0; i < blocks.length; i++) {\n var token = blocks[i];\n var word = words[i];\n var tokenWidth = 0;\n if (x !== 0) {\n this.streamWriter.startNextLine(x, 0);\n }\n if (word.length > 0) {\n tokenWidth += /*Utils.Round(*/ font.measureString(word, format).width /*)*/;\n tokenWidth += characterSpacing;\n var val = this.getUnicodeString(token);\n this.streamWriter.showText(val);\n }\n if (i !== blocks.length - 1) {\n x = tokenWidth + spaceWidth;\n xShift += x;\n }\n }\n // Rolback current line position.\n if (xShift > 0) {\n this.streamWriter.startNextLine(-xShift, 0);\n }\n }\n finally {\n if (format !== null && typeof format !== 'undefined') {\n format.firstLineIndent = firstLineIndent;\n format.paragraphIndent = paragraphIndent;\n }\n }\n };\n /**\n * Breakes the unicode line to the words and converts symbols to glyphs.\n */\n PdfGraphics.prototype.breakUnicodeLine = function (line, ttfFont, words) {\n if (line === null) {\n throw new Error('Argument Null Exception : line');\n }\n words = line.split(null);\n var tokens = [];\n for (var i = 0; i < words.length; i++) {\n // Reconvert string according to unicode standard.\n var word = words[i];\n var token = this.convertToUnicode(word, ttfFont);\n tokens[i] = token;\n }\n return { tokens: tokens, words: words };\n };\n /**\n * Creates PdfString from the unicode text.\n */\n PdfGraphics.prototype.getUnicodeString = function (token) {\n if (token === null) {\n throw new Error('Argument Null Exception : token');\n }\n var val = new PdfString(token);\n val.converted = true;\n val.encode = InternalEnum.ForceEncoding.Ascii;\n return val;\n };\n /**\n * Converts to unicode format.\n */\n PdfGraphics.prototype.convertToUnicode = function (text, ttfFont) {\n var token = null;\n if (text == null) {\n throw new Error('Argument Null Exception : text');\n }\n if (ttfFont == null) {\n throw new Error('Argument Null Exception : ttfFont');\n }\n if (ttfFont.fontInternal instanceof UnicodeTrueTypeFont) {\n var ttfReader = ttfFont.fontInternal.ttfReader;\n ttfFont.setSymbols(text);\n token = ttfReader.convertString(text);\n var bytes = PdfString.toUnicodeArray(token, false);\n token = PdfString.byteToString(bytes);\n }\n return token;\n };\n /**\n * `Justifies` the line if needed.\n * @private\n */\n PdfGraphics.prototype.justifyLine = function (lineInfo, boundsWidth, format) {\n var line = lineInfo.text;\n var lineWidth = lineInfo.width;\n var shouldJustify = this.shouldJustify(lineInfo, boundsWidth, format);\n var hasWordSpacing = (format != null && format.wordSpacing !== 0);\n var symbols = StringTokenizer.spaces;\n var whitespacesCount = StringTokenizer.getCharsCount(line, symbols);\n var wordSpace = 0;\n if (shouldJustify) {\n // Correct line width.\n if (hasWordSpacing) {\n lineWidth -= (whitespacesCount * format.wordSpacing);\n }\n var difference = boundsWidth - lineWidth;\n wordSpace = difference / whitespacesCount;\n this.pdfStreamWriter.setWordSpacing(wordSpace);\n }\n else {\n // If there is justifying, but the line shouldn't be justified, restore default word spacing.\n if (hasWordSpacing) {\n this.pdfStreamWriter.setWordSpacing(format.wordSpacing);\n }\n else {\n this.pdfStreamWriter.setWordSpacing(0);\n }\n }\n return wordSpace;\n };\n /**\n * `Reset` or reinitialize the current graphic value.\n * @private\n */\n PdfGraphics.prototype.reset = function (size) {\n this.canvasSize = size;\n this.streamWriter.clear();\n this.initialize();\n this.initializeCoordinates();\n };\n /**\n * Checks whether the line should be `justified`.\n * @private\n */\n PdfGraphics.prototype.shouldJustify = function (lineInfo, boundsWidth, format) {\n var line = lineInfo.text;\n var lineWidth = lineInfo.width;\n var justifyStyle = (format != null && format.alignment === PdfTextAlignment.Justify);\n var goodWidth = (boundsWidth >= 0 && lineWidth < boundsWidth);\n var symbols = StringTokenizer.spaces;\n var whitespacesCount = StringTokenizer.getCharsCount(line, symbols);\n var hasSpaces = (whitespacesCount > 0 && line[0] !== StringTokenizer.whiteSpace);\n var goodLineBreakStyle = ((lineInfo.lineType & LineType.LayoutBreak) > 0);\n /* tslint:disable */\n var shouldJustify = (justifyStyle && goodWidth && hasSpaces && (goodLineBreakStyle || format.alignment === PdfTextAlignment.Justify)); /* tslint:enable */\n return shouldJustify;\n };\n /* tslint:disable */\n /**\n * Emulates `Underline, Strikeout` of the text if needed.\n * @private\n */\n PdfGraphics.prototype.underlineStrikeoutText = function (pen, brush, result, font, layoutRectangle, format) {\n if (font.underline || font.strikeout) {\n // Calculate line width.\n var linePen = this.createUnderlineStikeoutPen(pen, brush, font, format);\n if (linePen != null) {\n // Approximate line positions.\n var vShift = this.getTextVerticalAlignShift(result.actualSize.height, layoutRectangle.height, format);\n var underlineYOffset = 0;\n underlineYOffset = layoutRectangle.y + vShift + font.metrics.getAscent(format) + 1.5 * linePen.width;\n var strikeoutYOffset = layoutRectangle.y + vShift + font.metrics.getHeight(format) / 2 + 1.5 * linePen.width;\n var lines = result.lines;\n // Run through the text and draw lines.\n for (var i = 0, len = result.lineCount; i < len; i++) {\n var lineInfo = lines[i];\n var line = lineInfo.text;\n var lineWidth = lineInfo.width;\n var hShift = this.getHorizontalAlignShift(lineWidth, layoutRectangle.width, format);\n var lineIndent = this.getLineIndent(lineInfo, format, layoutRectangle, (i === 0));\n hShift += (!this.rightToLeft(format)) ? lineIndent : 0;\n var x1 = layoutRectangle.x + hShift;\n /* tslint:disable */\n var x2 = (!this.shouldJustify(lineInfo, layoutRectangle.width, format)) ? x1 + lineWidth - lineIndent : x1 + layoutRectangle.width - lineIndent;\n /* tslint:enable */\n if (font.underline) {\n var y = underlineYOffset;\n this.drawLine(linePen, x1, y, x2, y);\n underlineYOffset += result.lineHeight;\n }\n if (font.strikeout) {\n var y = strikeoutYOffset;\n this.drawLine(linePen, x1, y, x2, y);\n strikeoutYOffset += result.lineHeight;\n }\n if (this.isPointOverload && lines.length > 1) {\n layoutRectangle.x = 0;\n layoutRectangle.width = this.clientSize.width;\n }\n }\n this.isPointOverload = false;\n }\n }\n };\n /**\n * `Creates a pen` for drawing lines in the text.\n * @private\n */\n PdfGraphics.prototype.createUnderlineStikeoutPen = function (pen, brush, font, format) {\n // Calculate line width.\n var lineWidth = font.metrics.getSize(format) / 20;\n var linePen = null;\n // Create a pen fo the lines.\n if (pen != null) {\n linePen = new PdfPen(pen.color, lineWidth);\n }\n else if (brush != null) {\n linePen = new PdfPen(brush, lineWidth);\n }\n return linePen;\n };\n /**\n * Return `text rendering mode`.\n * @private\n */\n PdfGraphics.prototype.getTextRenderingMode = function (pen, brush, format) {\n var tm = TextRenderingMode.None;\n if (pen != null && brush != null) {\n tm = TextRenderingMode.FillStroke;\n }\n else if (pen != null) {\n tm = TextRenderingMode.Stroke;\n }\n else {\n tm = TextRenderingMode.Fill;\n }\n if (format != null && format.clipPath) {\n tm |= TextRenderingMode.ClipFlag;\n }\n return tm;\n };\n /**\n * Returns `line indent` for the line.\n * @private\n */\n PdfGraphics.prototype.getLineIndent = function (lineInfo, format, layoutBounds, firstLine) {\n var lineIndent = 0;\n var firstParagraphLine = ((lineInfo.lineType & LineType.FirstParagraphLine) > 0);\n if (format != null && firstParagraphLine) {\n lineIndent = (firstLine) ? format.firstLineIndent : format.paragraphIndent;\n lineIndent = (layoutBounds.width > 0) ? Math.min(layoutBounds.width, lineIndent) : lineIndent;\n }\n return lineIndent;\n };\n /**\n * Calculates shift value if the line is `horizontaly aligned`.\n * @private\n */\n PdfGraphics.prototype.getHorizontalAlignShift = function (lineWidth, boundsWidth, format) {\n var shift = 0;\n if (boundsWidth >= 0 && format != null && format.alignment !== PdfTextAlignment.Left) {\n switch (format.alignment) {\n case PdfTextAlignment.Center:\n shift = (boundsWidth - lineWidth) / 2;\n break;\n case PdfTextAlignment.Right:\n shift = boundsWidth - lineWidth;\n break;\n }\n }\n return shift;\n };\n /**\n * Gets or sets the value that indicates `text direction` mode.\n * @private\n */\n PdfGraphics.prototype.rightToLeft = function (format) {\n var rtl = (format !== null && typeof format !== 'undefined' && format.rightToLeft);\n if (format !== null && typeof format !== 'undefined') {\n if (format.textDirection !== PdfTextDirection.None && typeof format.textDirection !== 'undefined') {\n rtl = true;\n }\n }\n return rtl;\n };\n PdfGraphics.prototype.stateControl = function (pen, brush, font, format) {\n if (typeof format === 'undefined') {\n this.stateControl(pen, brush, font, null);\n }\n else {\n if (brush instanceof PdfGradientBrush) {\n this.bCSInitialized = false;\n brush.colorSpace = this.colorSpace;\n }\n if (brush instanceof PdfTilingBrush) {\n this.bCSInitialized = false;\n brush.graphics.colorSpace = this.colorSpace;\n }\n var saveState = false;\n if (brush !== null) {\n var solidBrush = brush;\n if (typeof this.pageLayer !== 'undefined' && this.pageLayer != null) {\n if (this.colorSpaceChanged === false) {\n this.lastDocumentCS = this.pageLayer.page.document.colorSpace;\n this.lastGraphicsCS = this.pageLayer.page.graphics.colorSpace;\n this.colorSpace = this.pageLayer.page.document.colorSpace;\n this.currentColorSpace = this.pageLayer.page.document.colorSpace;\n this.colorSpaceChanged = true;\n }\n }\n this.initCurrentColorSpace(this.currentColorSpace);\n }\n else if (pen != null) {\n var pdfPen = pen;\n if (typeof this.pageLayer !== 'undefined' && this.pageLayer != null) {\n /* tslint:disable */\n this.colorSpace = this.pageLayer.page.document.colorSpace;\n this.currentColorSpace = this.pageLayer.page.document.colorSpace;\n }\n this.initCurrentColorSpace(this.currentColorSpace);\n }\n this.penControl(pen, saveState);\n this.brushControl(brush, saveState);\n this.fontControl(font, format, saveState);\n }\n };\n /**\n * Initializes the `current color space`.\n * @private\n */\n PdfGraphics.prototype.initCurrentColorSpace = function (colorspace) {\n var re = this.getResources.getResources();\n if (!this.bCSInitialized) {\n if (this.currentColorSpace != PdfColorSpace.GrayScale) {\n this.pdfStreamWriter.setColorSpace('Device' + this.currentColorSpaces[this.currentColorSpace], true);\n this.pdfStreamWriter.setColorSpace('Device' + this.currentColorSpaces[this.currentColorSpace], false);\n this.bCSInitialized = true;\n }\n else {\n this.pdfStreamWriter.setColorSpace('DeviceGray', true);\n this.pdfStreamWriter.setColorSpace('DeviceGray', false);\n this.bCSInitialized = true;\n }\n }\n };\n /**\n * Controls the `pen state`.\n * @private\n */\n PdfGraphics.prototype.penControl = function (pen, saveState) {\n if (pen != null) {\n this.currentPen = pen;\n /* tslint:disable */\n pen.monitorChanges(this.currentPen, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace, this.matrix.clone());\n /* tslint:enable */\n this.currentPen = pen.clone();\n }\n };\n /**\n * Controls the `brush state`.\n * @private\n */\n PdfGraphics.prototype.brushControl = function (brush, saveState) {\n if (brush != null && typeof brush !== 'undefined') {\n var b = brush.clone();\n var lgb = b;\n if (lgb !== null && typeof lgb !== 'undefined' && !(brush instanceof PdfSolidBrush) && !(brush instanceof PdfTilingBrush)) {\n var m = lgb.matrix;\n var matrix = this.matrix.clone();\n if ((m != null)) {\n m.multiply(matrix);\n matrix = m;\n }\n lgb.matrix = matrix;\n }\n this.currentBrush = lgb;\n var br = (brush);\n /* tslint:disable */\n b.monitorChanges(this.currentBrush, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace);\n /* tslint:enable */\n this.currentBrush = brush;\n brush = null;\n }\n };\n /**\n * Saves the font and other `font settings`.\n * @private\n */\n PdfGraphics.prototype.fontControl = function (font, format, saveState) {\n if (font != null) {\n var curSubSuper = (format != null) ? format.subSuperScript : PdfSubSuperScript.None;\n /* tslint:disable */\n var prevSubSuper = (this.currentStringFormat != null) ? this.currentStringFormat.subSuperScript : PdfSubSuperScript.None; /* tslint:enable */\n if (saveState || font !== this.currentFont || curSubSuper !== prevSubSuper) {\n var resources = this.getResources.getResources();\n this.currentFont = font;\n this.currentStringFormat = format;\n var size = font.metrics.getSize(format);\n /* tslint:disable */\n this.isEmfTextScaled = false;\n var fontName = resources.getName(font);\n this.pdfStreamWriter.setFont(font, fontName, size);\n }\n }\n };\n PdfGraphics.prototype.setTransparency = function (arg1, arg2, arg3) {\n if (typeof arg2 === 'undefined') {\n this.istransparencySet = true;\n this.setTransparency(arg1, arg1, PdfBlendMode.Normal);\n }\n else if (typeof arg2 === 'number' && typeof arg3 === 'undefined') {\n this.setTransparency(arg1, arg2, PdfBlendMode.Normal);\n }\n else {\n if (this.trasparencies == null) {\n this.trasparencies = new TemporaryDictionary();\n }\n var transp = null;\n var td = new TransparencyData(arg1, arg2, arg3);\n if (this.trasparencies.containsKey(td)) {\n transp = this.trasparencies.getValue(td);\n }\n if (transp == null) {\n transp = new PdfTransparency(arg1, arg2, arg3);\n this.trasparencies.setValue(td, transp);\n }\n var resources = this.getResources.getResources();\n var name_3 = resources.getName(transp);\n var sw = this.streamWriter;\n sw.setGraphicsState(name_3);\n }\n };\n PdfGraphics.prototype.clipTranslateMargins = function (x, y, left, top, right, bottom) {\n if (x instanceof RectangleF && typeof y === 'undefined') {\n this.clipBounds = x;\n this.pdfStreamWriter.writeComment('Clip margins.');\n this.pdfStreamWriter.appendRectangle(x);\n this.pdfStreamWriter.closePath();\n this.pdfStreamWriter.clipPath(false);\n this.pdfStreamWriter.writeComment('Translate co-ordinate system.');\n this.translateTransform(x.x, x.y);\n }\n else if (typeof x === 'number') {\n var clipArea = new RectangleF(left, top, this.size.width - left - right, this.size.height - top - bottom);\n this.clipBounds = clipArea;\n this.pdfStreamWriter.writeComment(\"Clip margins.\");\n this.pdfStreamWriter.appendRectangle(clipArea);\n this.pdfStreamWriter.closePath();\n this.pdfStreamWriter.clipPath(false);\n this.pdfStreamWriter.writeComment(\"Translate co-ordinate system.\");\n this.translateTransform(x, y);\n }\n };\n /**\n * `Updates y` co-ordinate.\n * @private\n */\n PdfGraphics.prototype.updateY = function (y) {\n return -y;\n };\n /**\n * Used to `translate the transformation`.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // create a new page\n * let page1 : PdfPage = document.pages.add();\n * // set pen\n * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));\n * //\n * // set translate transform\n * page1.graphics.translateTransform(100, 100);\n * //\n * // draw the rectangle after applying translate transform\n * page1.graphics.drawRectangle(pen, new RectangleF({x : 0, y : 0}, {width : 100, height : 50}));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n * @param offsetX The x-coordinate of the translation.\n * @param offsetY The y-coordinate of the translation.\n */\n PdfGraphics.prototype.translateTransform = function (offsetX, offsetY) {\n var matrix = new PdfTransformationMatrix();\n this.getTranslateTransform(offsetX, offsetY, matrix);\n this.pdfStreamWriter.modifyCtm(matrix);\n this.matrix.multiply(matrix);\n };\n /**\n * `Translates` coordinates of the input matrix.\n * @private\n */\n PdfGraphics.prototype.getTranslateTransform = function (x, y, input) {\n input.translate(x, this.updateY(y));\n return input;\n };\n /* tslint:disable */\n /**\n * Applies the specified `scaling operation` to the transformation matrix of this Graphics by prepending it to the object's transformation matrix.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // create a new page\n * let page1 : PdfPage = document.pages.add();\n * // create pen\n * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));\n * //\n * // apply scaling trasformation\n * page1.graphics.scaleTransform(1.5, 2);\n * //\n * // draw the rectangle after applying scaling transform\n * page1.graphics.drawRectangle(pen, new RectangleF({x : 100, y : 100}, {width : 100, height : 50}));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n * @param scaleX Scale factor in the x direction.\n * @param scaleY Scale factor in the y direction.\n */\n /* tslint:enable */\n PdfGraphics.prototype.scaleTransform = function (scaleX, scaleY) {\n var matrix = new PdfTransformationMatrix();\n this.getScaleTransform(scaleX, scaleY, matrix);\n this.pdfStreamWriter.modifyCtm(matrix);\n this.matrix.multiply(matrix);\n };\n /**\n * `Scales` coordinates of the input matrix.\n * @private\n */\n PdfGraphics.prototype.getScaleTransform = function (x, y, input) {\n if (input == null) {\n input = new PdfTransformationMatrix();\n }\n input.scale(x, y);\n return input;\n };\n /**\n * Applies the specified `rotation` to the transformation matrix of this Graphics.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // create a new page\n * let page1 : PdfPage = document.pages.add();\n * // create pen\n * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));\n * //\n * // set RotateTransform with 25 degree of angle\n * page1.graphics.rotateTransform(25);\n * //\n * // draw the rectangle after RotateTransformation\n * page1.graphics.drawRectangle(pen, new RectangleF({x : 100, y : 100}, {width : 100, height : 50}));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n * @param angle Angle of rotation in degrees.\n */\n PdfGraphics.prototype.rotateTransform = function (angle) {\n var matrix = new PdfTransformationMatrix();\n this.getRotateTransform(angle, matrix);\n this.pdfStreamWriter.modifyCtm(matrix);\n this.matrix.multiply(matrix);\n };\n /**\n * `Initializes coordinate system`.\n * @private\n */\n PdfGraphics.prototype.initializeCoordinates = function () {\n // Matrix equation: TM(T-1)=M', where T=[1 0 0 -1 0 h]\n this.pdfStreamWriter.writeComment('Change co-ordinate system to left/top.');\n // Translate co-ordinates only, don't flip.\n if (this.mediaBoxUpperRightBound !== -(this.size.height)) {\n if (this.cropBox == null) {\n if (this.mediaBoxUpperRightBound === this.size.height || this.mediaBoxUpperRightBound === 0) {\n this.translateTransform(0, this.updateY(this.size.height));\n }\n else {\n this.translateTransform(0, this.updateY(this.mediaBoxUpperRightBound));\n }\n }\n }\n };\n /**\n * `Rotates` coordinates of the input matrix.\n * @private\n */\n PdfGraphics.prototype.getRotateTransform = function (angle, input) {\n if (input == null || typeof input === 'undefined') {\n input = new PdfTransformationMatrix();\n }\n input.rotate(this.updateY(angle));\n return input;\n };\n /**\n * `Saves` the current state of this Graphics and identifies the saved state with a GraphicsState.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // create a new page\n * let page1 : PdfPage = document.pages.add();\n * // create pen\n * let pen : PdfPen = new PdfPen(new PdfColor(0, 0, 0));\n * //\n * // save the graphics state\n * let state1 : PdfGraphicsState = page1.graphics.save();\n * //\n * page1.graphics.scaleTransform(1.5, 2);\n * // draw the rectangle\n * page1.graphics.drawRectangle(pen, new RectangleF({x : 100, y : 100}, {width : 100, height : 50}));\n * // restore the graphics state\n * page1.graphics.restore(state1);\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n PdfGraphics.prototype.save = function () {\n var state = new PdfGraphicsState(this, this.matrix.clone());\n state.brush = this.currentBrush;\n state.pen = this.currentPen;\n state.font = this.currentFont;\n state.colorSpace = this.currentColorSpace;\n state.characterSpacing = this.previousCharacterSpacing;\n state.wordSpacing = this.previousWordSpacing;\n state.textScaling = this.previousTextScaling;\n state.textRenderingMode = this.previousTextRenderingMode;\n this.graphicsState.push(state);\n this.pdfStreamWriter.saveGraphicsState();\n return state;\n };\n PdfGraphics.prototype.restore = function (state) {\n if (typeof state === 'undefined') {\n if (this.graphicsState.length > 0) {\n this.doRestoreState();\n }\n }\n else {\n if (this.graphicsState.indexOf(state) !== -1) {\n for (;;) {\n if (this.graphicsState.length === 0) {\n break;\n }\n var popState = this.doRestoreState();\n if (popState === state) {\n break;\n }\n }\n }\n }\n };\n /**\n * `Restores graphics state`.\n * @private\n */\n PdfGraphics.prototype.doRestoreState = function () {\n var state = this.graphicsState.pop();\n this.transformationMatrix = state.matrix;\n this.currentBrush = state.brush;\n this.currentPen = state.pen;\n this.currentFont = state.font;\n this.currentColorSpace = state.colorSpace;\n this.previousCharacterSpacing = state.characterSpacing;\n this.previousWordSpacing = state.wordSpacing;\n this.previousTextScaling = state.textScaling;\n this.previousTextRenderingMode = state.textRenderingMode;\n this.pdfStreamWriter.restoreGraphicsState();\n return state;\n };\n /* tslint:enable */\n /**\n * `Draws the specified path`, using its original physical size, at the location specified by a coordinate pair.\n * ```typescript\n * // create a new PDF document.\n * let document : PdfDocument = new PdfDocument();\n * // add a page to the document.\n * let page1 : PdfPage = document.pages.add();\n * //Create new PDF path.\n * let path : PdfPath = new PdfPath();\n * //Add line path points.\n * path.addLine(new PointF(10, 100), new PointF(10, 200));\n * path.addLine(new PointF(100, 100), new PointF(100, 200));\n * path.addLine(new PointF(100, 200), new PointF(55, 150));\n * // set pen\n * let pen : PdfPen = new PdfPen(new PdfColor(255, 0, 0));\n * // set brush\n * let brush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // draw the path\n * page1.graphics.drawPath(pen, brush, path);\n * //\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n * @param pen Color of the text.\n * @param brush Color of the text.\n * @param path Draw path.\n */\n PdfGraphics.prototype.drawPath = function (pen, brush, path) {\n if (brush instanceof PdfTilingBrush) {\n this.bCSInitialized = false;\n brush.graphics.colorSpace = this.colorSpace;\n }\n else if (brush instanceof PdfGradientBrush) {\n this.bCSInitialized = false;\n brush.colorSpace = this.colorSpace;\n }\n this.stateControl(pen, brush, null);\n this.buildUpPath(path.pathPoints, path.pathTypes);\n this.drawPathHelper(pen, brush, path.fillMode, false);\n };\n /* tslint:disable-next-line:max-line-length */\n PdfGraphics.prototype.drawArc = function (arg1, arg2, arg3, arg4, arg5, arg6, arg7) {\n if (arg2 instanceof RectangleF) {\n this.drawArc(arg1, arg2.x, arg2.y, arg2.width, arg2.height, arg3, arg4);\n }\n else {\n if ((arg7 !== 0)) {\n this.stateControl(arg1, null, null);\n this.constructArcPath(arg2, arg3, (arg2 + arg4), (arg3 + arg5), arg6, arg7);\n this.drawPathHelper(arg1, null, false);\n }\n }\n };\n /**\n * Builds up the path.\n * @private\n */\n PdfGraphics.prototype.buildUpPath = function (arg1, arg2) {\n var cnt = arg1.length;\n for (var i = 0; i < cnt; ++i) {\n var typeValue = 0;\n var point = arg1[i];\n switch (((arg2[i] & (PdfGraphics.pathTypesValuesMask)))) {\n case PathPointType.Start:\n this.pdfStreamWriter.beginPath(point.x, point.y);\n break;\n case PathPointType.Bezier3:\n var p2 = new PointF(0, 0);\n var p3 = new PointF(0, 0);\n var result1 = this.getBezierPoints(arg1, arg2, i, p2, p3);\n this.pdfStreamWriter.appendBezierSegment(point, result1.p2, result1.p3);\n i = result1.i;\n break;\n case PathPointType.Line:\n this.pdfStreamWriter.appendLineSegment(point);\n break;\n default:\n throw new Error('ArithmeticException - Incorrect path formation.');\n }\n typeValue = arg2[i];\n this.checkFlags(typeValue);\n }\n };\n /**\n * Gets the bezier points from respective arrays.\n * @private\n */\n /* tslint:disable-next-line:max-line-length */\n PdfGraphics.prototype.getBezierPoints = function (points, types, i, p2, p3) {\n var errorMsg = 'Malforming path.';\n ++i;\n if ((((types[i] & PdfGraphics.pathTypesValuesMask)) === PathPointType.Bezier3)) {\n p2 = points[i];\n ++i;\n if ((((types[i] & PdfGraphics.pathTypesValuesMask)) === PathPointType.Bezier3)) {\n p3 = points[i];\n }\n else {\n throw new Error('ArgumentException : errorMsg');\n }\n }\n else {\n throw new Error('ArgumentException : errorMsg');\n }\n return { i: i, p2: p2, p3: p3 };\n };\n /**\n * Checks path point type flags.\n * @private\n */\n PdfGraphics.prototype.checkFlags = function (type) {\n if ((((type & (PathPointType.CloseSubpath))) === PathPointType.CloseSubpath)) {\n this.pdfStreamWriter.closePath();\n }\n };\n /**\n * Constructs the arc path using Bezier curves.\n * @private\n */\n PdfGraphics.prototype.constructArcPath = function (x1, y1, x2, y2, startAng, sweepAngle) {\n var points = this.getBezierArc(x1, y1, x2, y2, startAng, sweepAngle);\n if ((points.length === 0)) {\n return;\n }\n var pt = [points[0], points[1], points[2], points[3], points[4], points[5], points[6], points[7]];\n this.pdfStreamWriter.beginPath(pt[0], pt[1]);\n var i = 0;\n for (i = 0; i < points.length; i = i + 8) {\n pt = [points[i], points[i + 1], points[i + 2], points[i + 3], points[i + 4], points[i + 5], points[i + 6], points[i + 7]];\n this.pdfStreamWriter.appendBezierSegment(pt[2], pt[3], pt[4], pt[5], pt[6], pt[7]);\n }\n };\n /**\n * Gets the bezier points for arc constructing.\n * @private\n */\n PdfGraphics.prototype.getBezierArc = function (numX1, numY1, numX2, numY2, s1, e1) {\n if ((numX1 > numX2)) {\n var tmp = void 0;\n tmp = numX1;\n numX1 = numX2;\n numX2 = tmp;\n }\n if ((numY2 > numY1)) {\n var tmp = void 0;\n tmp = numY1;\n numY1 = numY2;\n numY2 = tmp;\n }\n var fragAngle1;\n var numFragments;\n if ((Math.abs(e1) <= 90)) {\n fragAngle1 = e1;\n numFragments = 1;\n }\n else {\n numFragments = (Math.ceil((Math.abs(e1) / 90)));\n fragAngle1 = (e1 / numFragments);\n }\n var xcen = ((numX1 + numX2) / 2);\n var ycen = ((numY1 + numY2) / 2);\n var rx = ((numX2 - numX1) / 2);\n var ry = ((numY2 - numY1) / 2);\n var halfAng = ((fragAngle1 * (Math.PI / 360)));\n var kappa = (Math.abs(4.0 / 3.0 * (1.0 - Math.cos(halfAng)) / Math.sin(halfAng)));\n var pointsList = [];\n for (var i = 0; (i < numFragments); i++) {\n var thetaValue0 = (((s1 + (i * fragAngle1)) * (Math.PI / 180)));\n var thetaValue1 = (((s1 + ((i + 1) * fragAngle1)) * (Math.PI / 180)));\n var cos0 = (Math.cos(thetaValue0));\n var cos1 = (Math.cos(thetaValue1));\n var sin0 = (Math.sin(thetaValue0));\n var sin1 = (Math.sin(thetaValue1));\n if ((fragAngle1 > 0)) {\n /* tslint:disable-next-line:max-line-length */\n pointsList.push((xcen + (rx * cos0)), (ycen - (ry * sin0)), (xcen + (rx * (cos0 - (kappa * sin0)))), (ycen - (ry * (sin0 + (kappa * cos0)))), (xcen + (rx * (cos1 + (kappa * sin1)))), (ycen - (ry * (sin1 - (kappa * cos1)))), (xcen + (rx * cos1)), (ycen - (ry * sin1)));\n }\n else {\n /* tslint:disable-next-line:max-line-length */\n pointsList.push((xcen + (rx * cos0)), (ycen - (ry * sin0)), (xcen + (rx * (cos0 + (kappa * sin0)))), (ycen - (ry * (sin0 - (kappa * cos0)))), (xcen + (rx * (cos1 - (kappa * sin1)))), (ycen - (ry * (sin1 + (kappa * cos1)))), (xcen + (rx * cos1)), (ycen - (ry * sin1)));\n }\n }\n return pointsList;\n };\n // Constants\n /**\n * Specifies the mask of `path type values`.\n * @private\n */\n PdfGraphics.pathTypesValuesMask = 0xf;\n /**\n * Checks whether the object is `transparencyObject`.\n * @hidden\n * @private\n */\n PdfGraphics.transparencyObject = false;\n return PdfGraphics;\n}());\nexport { PdfGraphics };\n/**\n * `GetResourceEventHandler` class is alternate for event handlers and delegates.\n * @private\n * @hidden\n */\nvar GetResourceEventHandler = /** @class */ (function () {\n /**\n * Initialize instance of `GetResourceEventHandler` class.\n * Alternate for event handlers and delegates.\n * @private\n */\n function GetResourceEventHandler(sender) {\n this.sender = sender;\n }\n /**\n * Return the instance of `PdfResources` class.\n * @private\n */\n GetResourceEventHandler.prototype.getResources = function () {\n return this.sender.getResources();\n };\n return GetResourceEventHandler;\n}());\nexport { GetResourceEventHandler };\nvar PdfGraphicsState = /** @class */ (function () {\n function PdfGraphicsState(graphics, matrix) {\n /**\n * Stores `previous rendering mode`.\n * @default TextRenderingMode.Fill\n * @private\n */\n this.internalTextRenderingMode = TextRenderingMode.Fill;\n /**\n * `Previous character spacing` value or 0.\n * @default 0.0\n * @private\n */\n this.internalCharacterSpacing = 0.0;\n /**\n * `Previous word spacing` value or 0.\n * @default 0.0\n * @private\n */\n this.internalWordSpacing = 0.0;\n /**\n * The previously used `text scaling value`.\n * @default 100.0\n * @private\n */\n this.internalTextScaling = 100.0;\n /**\n * `Current color space`.\n * @default PdfColorSpace.Rgb\n * @private\n */\n this.pdfColorSpace = PdfColorSpace.Rgb;\n if (typeof graphics !== 'undefined') {\n this.pdfGraphics = graphics;\n this.transformationMatrix = matrix;\n }\n }\n Object.defineProperty(PdfGraphicsState.prototype, \"graphics\", {\n // Properties\n /**\n * Gets the parent `graphics object`.\n * @private\n */\n get: function () {\n return this.pdfGraphics;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphicsState.prototype, \"matrix\", {\n /**\n * Gets the `current matrix`.\n * @private\n */\n get: function () {\n return this.transformationMatrix;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphicsState.prototype, \"characterSpacing\", {\n /**\n * Gets or sets the `current character spacing`.\n * @private\n */\n get: function () {\n return this.internalCharacterSpacing;\n },\n set: function (value) {\n this.internalCharacterSpacing = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphicsState.prototype, \"wordSpacing\", {\n /**\n * Gets or sets the `word spacing` value.\n * @private\n */\n get: function () {\n return this.internalWordSpacing;\n },\n set: function (value) {\n this.internalWordSpacing = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphicsState.prototype, \"textScaling\", {\n /**\n * Gets or sets the `text scaling` value.\n * @private\n */\n get: function () {\n return this.internalTextScaling;\n },\n set: function (value) {\n this.internalTextScaling = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphicsState.prototype, \"pen\", {\n /**\n * Gets or sets the `current pen` object.\n * @private\n */\n get: function () {\n return this.pdfPen;\n },\n set: function (value) {\n this.pdfPen = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphicsState.prototype, \"brush\", {\n /**\n * Gets or sets the `brush`.\n * @private\n */\n get: function () {\n return this.pdfBrush;\n },\n set: function (value) {\n this.pdfBrush = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphicsState.prototype, \"font\", {\n /**\n * Gets or sets the `current font` object.\n * @private\n */\n get: function () {\n return this.pdfFont;\n },\n set: function (value) {\n this.pdfFont = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphicsState.prototype, \"colorSpace\", {\n /**\n * Gets or sets the `current color space` value.\n * @private\n */\n get: function () {\n return this.pdfColorSpace;\n },\n set: function (value) {\n this.pdfColorSpace = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGraphicsState.prototype, \"textRenderingMode\", {\n /**\n * Gets or sets the `text rendering mode`.\n * @private\n */\n get: function () {\n return this.internalTextRenderingMode;\n },\n set: function (value) {\n this.internalTextRenderingMode = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGraphicsState;\n}());\nexport { PdfGraphicsState };\nvar TransparencyData = /** @class */ (function () {\n // Constructors\n /**\n * Initializes a new instance of the `TransparencyData` class.\n * @private\n */\n function TransparencyData(alphaPen, alphaBrush, blendMode) {\n this.alphaPen = alphaPen;\n this.alphaBrush = alphaBrush;\n this.blendMode = blendMode;\n }\n return TransparencyData;\n}());\n","import { PdfStream } from './../primitives/pdf-stream';\nimport { PdfGraphics, GetResourceEventHandler } from './../graphics/pdf-graphics';\nimport { PdfPageLayerCollection } from './pdf-page-layer-collection';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\nimport { PdfColorSpace } from './../graphics/enum';\n/**\n * The `PdfPageLayer` used to create layers in PDF document.\n * @private\n */\nvar PdfPageLayer = /** @class */ (function () {\n function PdfPageLayer(page, streamClipPageTemplates) {\n // private bSaved : boolean;\n /**\n * Local Variable to store the `color space` of the document.\n * @private\n */\n this.pdfColorSpace = PdfColorSpace.Rgb;\n /**\n * Local Variable to set `visibility`.\n * @default true\n * @private\n */\n this.isVisible = true;\n /**\n * Indicates if `Sublayer` is present.\n * @default false\n * @private\n */\n this.sublayer = false;\n /**\n * Local variable to store `length` of the graphics.\n * @default 0\n * @private\n */\n this.contentLength = 0;\n /**\n * Instance for `PdfDictionaryProperties` Class.\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n if (page === null) {\n throw new Error('ArgumentNullException:page');\n }\n this.pdfPage = page;\n this.clipPageTemplates = true;\n if (typeof streamClipPageTemplates === 'undefined') {\n this.content = new PdfStream();\n }\n else if (streamClipPageTemplates instanceof PdfStream || streamClipPageTemplates === null) {\n if (streamClipPageTemplates === null) {\n throw new Error('ArgumentNullException:stream');\n }\n this.content = streamClipPageTemplates;\n }\n else {\n this.content = new PdfStream();\n this.clipPageTemplates = streamClipPageTemplates;\n }\n }\n Object.defineProperty(PdfPageLayer.prototype, \"colorSpace\", {\n // Properties\n /**\n * Get or set the `color space`.\n * @private\n */\n get: function () {\n return this.pdfColorSpace;\n },\n set: function (value) {\n this.pdfColorSpace = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageLayer.prototype, \"page\", {\n /**\n * Gets parent `page` of the layer.\n * @private\n */\n get: function () {\n return this.pdfPage;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageLayer.prototype, \"layerId\", {\n /**\n * Gets and Sets the `id of the layer`.\n * @private\n */\n get: function () {\n return this.layerid;\n },\n set: function (value) {\n this.layerid = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageLayer.prototype, \"name\", {\n /**\n * Gets or sets the `name` of the layer.\n * @private\n */\n get: function () {\n return this.layerName;\n },\n set: function (value) {\n this.layerName = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageLayer.prototype, \"visible\", {\n /**\n * Gets or sets the `visibility` of the layer.\n * @private\n */\n get: function () {\n return this.isVisible;\n },\n set: function (value) {\n this.isVisible = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageLayer.prototype, \"graphics\", {\n /**\n * Gets `Graphics` context of the layer, used to draw various graphical content on layer.\n * @private\n */\n get: function () {\n if ((this.pdfGraphics == null)) {\n this.initializeGraphics(this.page);\n }\n return this.pdfGraphics;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageLayer.prototype, \"layers\", {\n /**\n * Gets the collection of `PdfPageLayer`, this collection handle by the class 'PdfPageLayerCollection'.\n * @private\n */\n get: function () {\n if (this.layer == null) {\n this.layer = new PdfPageLayerCollection(this.page);\n this.layer.sublayer = true;\n return this.layer;\n }\n else {\n return this.layer;\n }\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * `Adds` a new PDF Page layer.\n * @private\n */\n PdfPageLayer.prototype.add = function () {\n var layer = new PdfPageLayer(this.pdfPage);\n layer.name = '';\n return layer;\n };\n /**\n * Returns a value indicating the `sign` of a single-precision floating-point number.\n * @private\n */\n PdfPageLayer.prototype.sign = function (number) {\n if (number === 0) {\n return 0;\n }\n else if (number > 0) {\n return 1;\n }\n else {\n return -1;\n }\n };\n /**\n * `Initializes Graphics context` of the layer.\n * @private\n */\n PdfPageLayer.prototype.initializeGraphics = function (page) {\n var oPage = page;\n var gr = new GetResourceEventHandler(this.page);\n var cropBox = null;\n this.pdfGraphics = new PdfGraphics(page.size, gr, this.content);\n this.pdfGraphics.mediaBoxUpperRightBound = 0;\n if (oPage != null) {\n var sc = oPage.section.parent;\n if (sc != null) {\n this.pdfGraphics.colorSpace = sc.document.colorSpace;\n this.colorSpace = sc.document.colorSpace;\n }\n }\n // Transform coordinates to the left/top and activate margins.\n var isSame = (this.sign(page.origin.y) === this.sign(page.origin.x));\n // if (page != null) {\n if (page.origin.x >= 0 && page.origin.y >= 0 || !(isSame)) {\n this.pdfGraphics.initializeCoordinates();\n }\n else {\n // this.m_graphics.InitializeCoordinates(page);\n }\n var clipRect = oPage.section.getActualBounds(oPage, true);\n var margins = oPage.section.pageSettings.margins;\n if (this.clipPageTemplates) {\n if (page.origin.x >= 0 && page.origin.y >= 0) {\n this.pdfGraphics.clipTranslateMargins(clipRect);\n }\n }\n else {\n this.graphics.clipTranslateMargins(clipRect.x, clipRect.y, margins.left, margins.top, margins.right, margins.bottom);\n }\n this.pdfGraphics.setLayer(this);\n // this.bSaved = false;\n };\n Object.defineProperty(PdfPageLayer.prototype, \"element\", {\n // IPdfWrapper Members\n /**\n * Gets the wrapped `element`.\n * @private\n */\n get: function () {\n return this.content;\n },\n enumerable: true,\n configurable: true\n });\n return PdfPageLayer;\n}());\nexport { PdfPageLayer };\n","/**\n * PdfCollection.ts class for EJ2-PDF\n * The class used to handle the collection of PdF objects.\n */\nvar PdfCollection = /** @class */ (function () {\n // Constructors\n /**\n * Initializes a new instance of the `Collection` class.\n * @private\n */\n function PdfCollection() {\n //\n }\n Object.defineProperty(PdfCollection.prototype, \"count\", {\n // Properties\n /**\n * Gets the `Count` of stored objects.\n * @private\n */\n get: function () {\n if (typeof this.collection === 'undefined') {\n this.collection = [];\n }\n return this.collection.length;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfCollection.prototype, \"list\", {\n /**\n * Gets the `list` of stored objects.\n * @private\n */\n get: function () {\n if (typeof this.collection === 'undefined') {\n this.collection = [];\n }\n return this.collection;\n },\n enumerable: true,\n configurable: true\n });\n return PdfCollection;\n}());\nexport { PdfCollection };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfPageLayerCollection.ts class for EJ2-PDF\n */\nimport { PdfPageBase } from './pdf-page-base';\nimport { PdfDictionary } from './../primitives/pdf-dictionary';\nimport { PdfPageLayer } from './pdf-page-layer';\nimport { PdfCollection } from './../general/pdf-collection';\nimport { PdfReferenceHolder } from './../primitives/pdf-reference';\nimport { PdfStream } from './../primitives/pdf-stream';\n/**\n * The class provides methods and properties to handle the collections of `PdfPageLayer`.\n */\nvar PdfPageLayerCollection = /** @class */ (function (_super) {\n __extends(PdfPageLayerCollection, _super);\n function PdfPageLayerCollection(page) {\n var _this = _super.call(this) || this;\n /**\n * Stores the `number of first level layers` in the document.\n * @default 0\n * @private\n */\n _this.parentLayerCount = 0;\n /**\n * Indicates if `Sublayer` is present.\n * @default false\n * @private\n */\n _this.sublayer = false;\n /**\n * Stores the `optional content dictionary`.\n * @private\n */\n _this.optionalContent = new PdfDictionary();\n if (page instanceof PdfPageBase) {\n // if (page == null) {\n // throw new Error('ArgumentNullException:page');\n // }\n _this.page = page;\n var lPage = page;\n // if (lPage != null) {\n _this.parseLayers(lPage);\n // }\n }\n return _this;\n }\n PdfPageLayerCollection.prototype.items = function (index, value) {\n if (typeof index === 'number' && typeof value === 'undefined') {\n var obj = this.list[index];\n return obj;\n }\n else {\n if (value == null) {\n throw new Error('ArgumentNullException: layer');\n }\n if (value.page !== this.page) {\n throw new Error('ArgumentException: The layer belongs to another page');\n }\n // // Add/remove the layer.\n // let layer : PdfPageLayer = this.items(index);\n // if (layer != null) {\n // this.RemoveLayer(layer);\n // }\n // this.List[index] = value;\n // this.InsertLayer(index, value);\n }\n };\n PdfPageLayerCollection.prototype.add = function (firstArgument, secondArgument) {\n if (typeof firstArgument === 'undefined') {\n var layer = new PdfPageLayer(this.page);\n layer.name = '';\n this.add(layer);\n return layer;\n }\n else if (firstArgument instanceof PdfPageLayer) {\n // if (layer == null)\n // throw new ArgumentNullException(\"layer\");\n // if (layer.Page != m_page)\n // throw new ArgumentException(\"The layer belongs to another page\");\n var index = this.list.push(firstArgument);\n // Register layer.\n this.addLayer(index, firstArgument);\n return index;\n }\n else {\n return 0;\n }\n };\n /**\n * Registers `layer` at the page.\n * @private\n */\n PdfPageLayerCollection.prototype.addLayer = function (index, layer) {\n var reference = new PdfReferenceHolder(layer);\n this.page.contents.add(reference);\n };\n // private RemoveLayer(layer : PdfPageLayer) : void {\n // if (layer == null) {\n // throw new Error('ArgumentNullException:layer');\n // }\n // let reference : PdfReferenceHolder = new PdfReferenceHolder(layer);\n // if (this.page != null) {\n // this.page.Contents.Remove(reference);\n // }\n // }\n /**\n * Inserts `PdfPageLayer` into the collection at specified index.\n * @private\n */\n PdfPageLayerCollection.prototype.insert = function (index, layer) {\n // if (index < 0)\n // throw new ArgumentOutOfRangeException(\"index\", \"Value can not be less 0\");\n // if (layer == null)\n // throw new ArgumentNullException(\"layer\");\n // if (layer.Page != m_page)\n // throw new ArgumentException(\"The layer belongs to another page\");\n var list = [];\n var length = this.list.length;\n for (var i = index; i < length; i++) {\n list.push(this.list.pop());\n }\n this.list.push(layer);\n for (var i = 0; i < list.length; i++) {\n this.list.push(list[i]);\n }\n // Register layer.\n this.insertLayer(index, layer);\n };\n /**\n * Registers layer at the page.\n * @private\n */\n PdfPageLayerCollection.prototype.insertLayer = function (index, layer) {\n if (layer == null) {\n throw new Error('ArgumentNullException:layer');\n }\n var reference = new PdfReferenceHolder(layer);\n this.page.contents.insert(index, reference);\n };\n // tslint:disable\n /**\n * `Parses the layers`.\n * @private\n */\n PdfPageLayerCollection.prototype.parseLayers = function (loadedPage) {\n // if (loadedPage == null) {\n // throw new Error('ArgumentNullException:loadedPage');\n // }\n var contents = this.page.contents;\n var resource = this.page.getResources();\n var crossTable = null;\n var ocproperties = null;\n var propertie = null;\n var isLayerAdded = false;\n // if (loadedPage instanceof PdfPage) {\n crossTable = loadedPage.crossTable;\n // } else {\n // crossTable = (loadedPage as PdfLoadedPage).CrossTable;\n // Propertie = PdfCrossTable.Dereference(Resource[DictionaryProperties.Properties]) as PdfDictionary;\n // ocproperties = PdfCrossTable.Dereference((loadedPage as PdfLoadedPage).\n // Document.Catalog[DictionaryProperties.OCProperties]) as PdfDictionary;\n // }\n var saveStream = new PdfStream();\n var restoreStream = new PdfStream();\n var saveState = 'q';\n var newLine = '\\n';\n var restoreState = 'Q';\n // for (let index : number = 0; index < contents.Items.length; index++) {\n // let obj : IPdfPrimitive = contents[index];\n // let stream : PdfStream = crossTable.GetObject(obj) as PdfStream;\n // if (stream == null)\n // throw new PdfDocumentException(\"Invalid contents array.\");\n // // if (stream.Compress)\n // {\n // if (!loadedPage.Imported)\n // stream.Decompress();\n // }\n // byte[] contentId = stream.Data;\n // string str = PdfString.ByteToString(contentId);\n // if (!loadedPage.Imported && (contents.Count == 1) && ((stream.Data[stream.Data.Length - 2] ==\n // RestoreState) || (stream.Data[stream.Data.Length - 1] == RestoreState)))\n // {\n // byte[] content = stream.Data;\n // byte[] data = new byte[content.Length + 4];\n // data[0] = SaveState;\n // data[1] = NewLine;\n // content.CopyTo(data, 2);\n // data[data.Length - 2] = NewLine;\n // data[data.Length - 1] = RestoreState;\n // stream.Data = data;\n // }\n // if (ocproperties != null)\n // {\n // if (Propertie != null)\n // {\n // foreach (KeyValuePair prop in Propertie.Items)\n // {\n // String Key = prop.Key.ToString();\n // PdfReferenceHolder refh = prop.Value as PdfReferenceHolder;\n // PdfDictionary Dict = null;\n // if (refh != null)\n // {\n // Dict = refh.Object as PdfDictionary;\n // }\n // else\n // {\n // Dict = prop.Value as PdfDictionary;\n // }\n // PdfDictionary m_usage = PdfCrossTable.Dereference(Dict[DictionaryProperties.Usage]) as PdfDictionary;\n // if (m_usage != null)\n // {\n // if (str.Contains(Key))\n // {\n // PdfPageLayer layer = new PdfPageLayer(loadedPage, stream);\n // PdfDictionary printoption = PdfCrossTable.Dereference(m_usage[DictionaryProperties.Print])\n // as PdfDictionary;\n // if (printoption != null)\n // {\n // layer.m_printOption = printoption;\n // foreach (KeyValuePair value in printoption.Items)\n // {\n // if (value.Key.Value.Equals(DictionaryProperties.PrintState))\n // {\n // string printState = (value.Value as PdfName).Value;\n // if (printState.Equals(DictionaryProperties.OCGON))\n // {\n // layer.PrintState = PdfPrintState.AlwaysPrint;\n // break;\n // }\n // else\n // {\n // layer.PrintState = PdfPrintState.NeverPrint;\n // break;\n // }\n // }\n // }\n // }\n // PdfString layerName = PdfCrossTable.Dereference(Dict[DictionaryProperties.Name]) as PdfString;\n // layer.Name = layerName.Value;\n // List.add(layer);\n // isLayerAdded = true;\n // if(!str.Contains(\"EMC\"))\n // break;\n // }\n // }\n // else\n // {\n // if (str.Contains(Key))\n // {\n // PdfPageLayer layer = new PdfPageLayer(loadedPage, stream);\n // List.add(layer);\n // if(Dict.ContainsKey(DictionaryProperties.Name))\n // {\n // PdfString layerName = PdfCrossTable.Dereference(Dict[DictionaryProperties.Name]) as PdfString;\n // layer.Name = layerName.Value;\n // }\n // isLayerAdded = true;\n // break;\n // }\n // }\n // }\n // }\n // }\n // if (!isLayerAdded)\n // {\n // PdfPageLayer layer = new PdfPageLayer(loadedPage, stream);\n // List.add(layer);\n // }\n // else\n // isLayerAdded = false;\n // }\n var saveData = [];\n saveData.push(saveState);\n saveStream.data = saveData;\n contents.insert(0, new PdfReferenceHolder(saveStream));\n saveData = [];\n saveData.push(restoreState);\n restoreStream.data = saveData;\n contents.insert(contents.count, new PdfReferenceHolder(restoreStream));\n };\n /**\n * Returns `index of` the `PdfPageLayer` in the collection if exists, -1 otherwise.\n * @private\n */\n PdfPageLayerCollection.prototype.indexOf = function (layer) {\n if (layer == null) {\n throw new Error('ArgumentNullException: layer');\n }\n var index = this.list.indexOf(layer);\n return index;\n };\n return PdfPageLayerCollection;\n}(PdfCollection));\nexport { PdfPageLayerCollection };\n","import { PdfArray } from './../primitives/pdf-array';\nimport { PdfPageLayerCollection } from './pdf-page-layer-collection';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\nimport { PdfResources } from './../graphics/pdf-resources';\n/**\n * The abstract base class for all pages,\n * `PdfPageBase` class provides methods and properties to create PDF pages and its elements.\n * @private\n */\nvar PdfPageBase = /** @class */ (function () {\n //constructors\n /**\n * Initializes a new instance of the `PdfPageBase` class.\n * @private\n */\n function PdfPageBase(dictionary) {\n /**\n * `Index` of the default layer.\n * @default -1.\n * @private\n */\n this.defLayerIndex = -1;\n /**\n * Local variable to store if page `updated`.\n * @default false.\n * @private\n */\n this.modified = false;\n /**\n * Instance of `DictionaryProperties` class.\n * @hidden\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n this.pageDictionary = dictionary;\n }\n Object.defineProperty(PdfPageBase.prototype, \"section\", {\n //Properties\n /**\n * Gets the `section` of a page.\n * @private\n */\n get: function () {\n // if (this.pdfSection === null) {\n // throw new Error('PdfException : Page must be added to some section before using.');\n // }\n return this.pdfSection;\n },\n set: function (value) {\n this.pdfSection = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageBase.prototype, \"dictionary\", {\n /**\n * Gets the page `dictionary`.\n * @private\n */\n get: function () {\n return this.pageDictionary;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageBase.prototype, \"element\", {\n /**\n * Gets the wrapped `element`.\n * @private\n */\n get: function () {\n return this.pageDictionary;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageBase.prototype, \"defaultLayer\", {\n /**\n * Gets the `default layer` of the page (Read only).\n * @private\n */\n get: function () {\n var layer = this.layers;\n var index = this.defaultLayerIndex;\n var returnlayer = layer.items(index);\n return returnlayer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageBase.prototype, \"defaultLayerIndex\", {\n /**\n * Gets or sets `index of the default layer`.\n * @private\n */\n get: function () {\n if (this.layerCollection.count === 0 || this.defLayerIndex === -1) {\n var layer = this.layerCollection.add();\n this.defLayerIndex = this.layerCollection.indexOf(layer);\n }\n return this.defLayerIndex;\n },\n /**\n * Gets or sets` index of the default layer`.\n * @private\n */\n set: function (value) {\n if (value < 0 || value > this.layers.count - 1) {\n throw new Error('ArgumentOutOfRangeException : value, Index can not be less 0 and greater Layers.Count - 1');\n }\n else {\n this.defLayerIndex = value;\n this.modified = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageBase.prototype, \"layers\", {\n /**\n * Gets the collection of the page's `layers` (Read only).\n * @private\n */\n get: function () {\n if (this.layerCollection == null || typeof this.layerCollection === 'undefined') {\n this.layerCollection = new PdfPageLayerCollection(this);\n }\n return this.layerCollection;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Return an instance of `PdfResources` class.\n * @private\n */\n PdfPageBase.prototype.getResources = function () {\n if (this.resources == null) {\n this.resources = new PdfResources();\n this.dictionary.items.setValue(this.dictionaryProperties.resources, this.resources);\n }\n return this.resources;\n };\n Object.defineProperty(PdfPageBase.prototype, \"contents\", {\n /**\n * Gets `array of page's content`.\n * @private\n */\n get: function () {\n var obj = this.pageDictionary.items.getValue(this.dictionaryProperties.contents);\n var contents = obj;\n var rh = obj;\n if (contents == null) {\n contents = new PdfArray();\n this.pageDictionary.items.setValue(this.dictionaryProperties.contents, contents);\n }\n return contents;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets the `resources`.\n * @private\n */\n PdfPageBase.prototype.setResources = function (res) {\n this.resources = res;\n this.dictionary.items.setValue(this.dictionaryProperties.resources, this.resources);\n this.modified = true;\n };\n return PdfPageBase;\n}());\nexport { PdfPageBase };\n","import { PdfArray } from './../primitives/pdf-array';\nimport { PdfReferenceHolder } from './../primitives/pdf-reference';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\nimport { SizeF, RectangleF, PointF } from './../drawing/pdf-drawing';\nimport { PdfStringLayouter } from './../graphics/fonts/string-layouter';\nimport { PdfColorSpace } from './../graphics/enum';\n/**\n * `PdfAnnotationCollection` class represents the collection of 'PdfAnnotation' objects.\n * @private\n */\nvar PdfAnnotationCollection = /** @class */ (function () {\n function PdfAnnotationCollection(page) {\n // Constants\n /**\n * `Error` constant message.\n * @private\n */\n this.alreadyExistsAnnotationError = 'This annotatation had been already added to page';\n /**\n * `Error` constant message.\n * @private\n */\n this.missingAnnotationException = 'Annotation is not contained in collection.';\n /**\n * Specifies the Internal variable to store fields of `PdfDictionaryProperties`.\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n /**\n * Array of the `annotations`.\n * @private\n */\n this.internalAnnotations = new PdfArray();\n /**\n * privte `list` for the annotations.\n * @private\n */\n this.lists = [];\n if (typeof page !== 'undefined') {\n this.page = page;\n }\n }\n Object.defineProperty(PdfAnnotationCollection.prototype, \"annotations\", {\n /**\n * Gets the `PdfAnnotation` object at the specified index. Read-Only.\n * @private\n */\n get: function () {\n return this.internalAnnotations;\n },\n set: function (value) {\n this.internalAnnotations = value;\n },\n enumerable: true,\n configurable: true\n });\n // Public methods\n /**\n * `Adds` a new annotation to the collection.\n * @private\n */\n PdfAnnotationCollection.prototype.add = function (annotation) {\n // this.SetPrint(annotation);\n this.doAdd(annotation);\n };\n /**\n * `Adds` a Annotation to collection.\n * @private\n */\n /* tslint:disable */\n PdfAnnotationCollection.prototype.doAdd = function (annotation) {\n if (typeof annotation.destination !== 'undefined') {\n var layout = new PdfStringLayouter();\n var layoutResult = layout.layout(annotation.text, annotation.font, annotation.stringFormat, new SizeF((annotation.bounds.width), 0), false, new SizeF(0, 0));\n var lastPosition = annotation.bounds.y;\n if (layoutResult.lines.length === 1) {\n var size = annotation.font.measureString(layoutResult.lines[0].text);\n annotation.bounds = new RectangleF(new PointF(annotation.bounds.x, lastPosition), size);\n annotation.text = layoutResult.lines[0].text;\n //Draw Annotation Text.\n this.page.graphics.drawString(annotation.text, annotation.font, null, annotation.brush, annotation.bounds.x, annotation.bounds.y, annotation.bounds.width, annotation.bounds.height, null);\n //Add annotation to dictionary.\n annotation.setPage(this.page);\n this.setColor(annotation);\n this.internalAnnotations.add(new PdfReferenceHolder(annotation));\n this.lists.push(annotation);\n }\n else {\n for (var i = 0; i < layoutResult.lines.length; i++) {\n var size = annotation.font.measureString(layoutResult.lines[i].text);\n if (i === 0) {\n annotation.bounds = new RectangleF(annotation.bounds.x, lastPosition, size.width, size.height);\n annotation.text = layoutResult.lines[i].text;\n //Draw Annotation Text.\n this.page.graphics.drawString(annotation.text, annotation.font, null, annotation.brush, annotation.bounds.x, lastPosition, size.width, size.height, null);\n //Add annotation to dictionary.\n annotation.setPage(this.page);\n this.setColor(annotation);\n this.internalAnnotations.add(new PdfReferenceHolder(annotation));\n this.lists.push(annotation);\n //Update y for drawing next line of the text.\n lastPosition += annotation.bounds.height;\n }\n else {\n var annot = annotation.clone();\n annot.bounds = new RectangleF(new PointF(annotation.bounds.x, lastPosition), size);\n annot.text = layoutResult.lines[i].text;\n //Draw Annotation Text.\n this.page.graphics.drawString(annot.text, annot.font, null, annot.brush, annot.bounds.x, annot.bounds.y, annot.bounds.width, annot.bounds.height, null);\n //Add annotation to dictionary.\n annot.setPage(this.page);\n this.setColor(annot);\n this.internalAnnotations.add(new PdfReferenceHolder(annot));\n this.lists.push(annot);\n //Update y for drawing next line of the text.\n lastPosition += annot.bounds.height;\n }\n }\n }\n }\n else {\n annotation.setPage(this.page);\n this.internalAnnotations.add(new PdfReferenceHolder(annotation));\n return this.lists.push(annotation);\n }\n };\n /* tslint:enable */\n /**\n * `Set a color of an annotation`.\n * @private\n */\n PdfAnnotationCollection.prototype.setColor = function (annotation) {\n var cs = PdfColorSpace.Rgb;\n var colours = annotation.color.toArray(cs);\n annotation.dictionary.items.setValue(this.dictionaryProperties.c, colours);\n };\n Object.defineProperty(PdfAnnotationCollection.prototype, \"element\", {\n // IPdfWrapper Members\n /**\n * Gets the `Element` representing this object.\n * @private\n */\n get: function () {\n return this.internalAnnotations;\n },\n enumerable: true,\n configurable: true\n });\n return PdfAnnotationCollection;\n}());\nexport { PdfAnnotationCollection };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfPageBase } from './pdf-page-base';\nimport { PdfDictionary, SaveTemplateEventHandler } from './../primitives/pdf-dictionary';\nimport { PdfName } from './../primitives/pdf-name';\nimport { PdfReferenceHolder } from './../primitives/pdf-reference';\nimport { SizeF } from './../drawing/pdf-drawing';\nimport { PdfAnnotationCollection } from './../annotations/annotation-collection';\nimport { PdfPageLayer } from './pdf-page-layer';\n/**\n * Provides methods and properties to create pages and its elements.\n * `PdfPage` class inherited from the `PdfPageBase` class.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * //\n * // add a new page to the document\n * let page1 : PdfPage = document.pages.add();\n * //\n * // set the font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // create black brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\nvar PdfPage = /** @class */ (function (_super) {\n __extends(PdfPage, _super);\n //constructors\n /**\n * Initialize the new instance for `PdfPage` class.\n * @private\n */\n function PdfPage() {\n var _this = _super.call(this, new PdfDictionary()) || this;\n /**\n * Stores the instance of `PdfAnnotationCollection` class.\n * @hidden\n * @default null\n * @private\n */\n _this.annotationCollection = null;\n /**\n * Stores the instance of `PageBeginSave` event for Page Number Field.\n * @default null\n * @private\n */\n _this.beginSave = null;\n _this.initialize();\n return _this;\n }\n Object.defineProperty(PdfPage.prototype, \"document\", {\n //Properties\n /**\n * Gets current `document`.\n * @private\n */\n get: function () {\n if (this.section !== null && this.section.parent !== null) {\n return this.section.parent.document;\n }\n else {\n return null;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPage.prototype, \"graphics\", {\n /**\n * Get the current `graphics`.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a new page to the document\n * let page1 : PdfPage = document.pages.add();\n * //\n * // get graphics\n * let graphics : PdfGraphics = page1.graphics;\n * //\n * // set the font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // create black brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // draw the text\n * graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n var result = this.defaultLayer.graphics;\n result.currentPage = this;\n return result;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPage.prototype, \"crossTable\", {\n /**\n * Gets the `cross table`.\n * @private\n */\n get: function () {\n if (this.section === null) {\n throw new Error('PdfDocumentException : Page is not created');\n }\n return this.section.parent === null ? this.section.parentDocument.crossTable : this.section.parent.document.crossTable;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPage.prototype, \"size\", {\n /**\n * Gets the size of the PDF page- Read only.\n * @public\n */\n get: function () {\n return this.section.pageSettings.size;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPage.prototype, \"origin\", {\n /**\n * Gets the `origin` of the page.\n * @private\n */\n get: function () {\n return this.section.pageSettings.origin;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPage.prototype, \"annotations\", {\n /**\n * Gets a collection of the `annotations` of the page- Read only.\n * @private\n */\n get: function () {\n if (this.annotationCollection == null) {\n this.annotationCollection = new PdfAnnotationCollection(this);\n // if (!this.Dictionary.ContainsKey(this.dictionaryProperties.annots)) {\n this.dictionary.items.setValue(this.dictionaryProperties.annots, this.annotationCollection.element);\n // }\n this.annotationCollection.annotations = this.dictionary.items.getValue(this.dictionaryProperties.annots);\n }\n return this.annotationCollection;\n },\n enumerable: true,\n configurable: true\n });\n //Implementation\n /**\n * `Initializes` a page.\n * @private\n */\n PdfPage.prototype.initialize = function () {\n this.dictionary.items.setValue(this.dictionaryProperties.type, new PdfName('Page'));\n this.dictionary.pageBeginDrawTemplate = new SaveTemplateEventHandler(this);\n };\n /**\n * Sets parent `section` to the page.\n * @private\n */\n PdfPage.prototype.setSection = function (section) {\n this.section = section;\n this.dictionary.items.setValue(this.dictionaryProperties.parent, new PdfReferenceHolder(section));\n };\n /**\n * `Resets the progress`.\n * @private\n */\n PdfPage.prototype.resetProgress = function () {\n this.isProgressOn = false;\n };\n /**\n * Get the page size reduced by page margins and page template dimensions.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // create new standard font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * //\n * // set the specified point using `getClientSize` method\n * let point : PointF = new PointF(page1.getClientSize().width - 200, page1.getClientSize().height - 200);\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, point);\n * //\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n PdfPage.prototype.getClientSize = function () {\n var returnValue = this.section.getActualBounds(this, true);\n return new SizeF(returnValue.width, returnValue.height);\n };\n /**\n * Helper method to retrive the instance of `PageBeginSave` event for header and footer elements.\n * @private\n */\n PdfPage.prototype.pageBeginSave = function () {\n var doc = this.document;\n if (typeof doc !== undefined && doc != null) {\n this.drawPageTemplates(doc);\n }\n if (this.beginSave != null && typeof this.beginSave !== 'undefined') {\n this.beginSave(this);\n }\n };\n /**\n * Helper method to draw template elements.\n * @private\n */\n PdfPage.prototype.drawPageTemplates = function (document) {\n // Draw Background templates.\n var hasBackTemplates = this.section.containsTemplates(document, this, false);\n if (hasBackTemplates) {\n var backLayer = new PdfPageLayer(this, false);\n this.layers.insert(0, backLayer);\n this.section.drawTemplates(this, backLayer, document, false);\n if (backLayer.graphics !== null && typeof backLayer.graphics !== 'undefined') {\n for (var i = 0; i < backLayer.graphics.automaticFields.automaticFields.length; i++) {\n var fieldInfo = backLayer.graphics.automaticFields.automaticFields[i];\n fieldInfo.field.performDraw(backLayer.graphics, fieldInfo.location, fieldInfo.scalingX, fieldInfo.scalingY);\n }\n }\n }\n // Draw Foreground templates.\n var hasFrontTemplates = this.section.containsTemplates(document, this, true);\n if (hasFrontTemplates) {\n var frontLayer = new PdfPageLayer(this, false);\n this.layers.add(frontLayer);\n this.section.drawTemplates(this, frontLayer, document, true);\n }\n };\n return PdfPage;\n}(PdfPageBase));\nexport { PdfPage };\n","/**\n * Provides data for `PageAddedEventHandler` event.\n * This event raises when adding the new PDF page to the PDF document.\n */\nvar PageAddedEventArgs = /** @class */ (function () {\n function PageAddedEventArgs(page) {\n if (typeof page !== 'undefined') {\n this.pdfPage = page;\n }\n else {\n this.pdfPage = null;\n }\n }\n Object.defineProperty(PageAddedEventArgs.prototype, \"page\", {\n /**\n * Gets the `newly added page`.\n * @private\n */\n get: function () {\n return this.pdfPage;\n },\n enumerable: true,\n configurable: true\n });\n return PageAddedEventArgs;\n}());\nexport { PageAddedEventArgs };\n","/**\n * Represents the `collection of pages in a section`.\n * @private\n */\nvar PdfSectionPageCollection = /** @class */ (function () {\n // Constructors\n /**\n * Initializes a new instance of the `PdfSectionPageCollection` class.\n * @private\n */\n function PdfSectionPageCollection(section) {\n // Fields\n /**\n * @hidden\n * @private\n */\n this.pdfSection = null;\n if (section == null) {\n throw Error('ArgumentNullException(\"section\")');\n }\n this.section = section;\n }\n Object.defineProperty(PdfSectionPageCollection.prototype, \"section\", {\n // Properties\n /**\n * Gets the `PdfPage` at the specified index.\n * @private\n */\n get: function () {\n return this.pdfSection;\n },\n set: function (value) {\n this.pdfSection = value;\n },\n enumerable: true,\n configurable: true\n });\n // Public Methods\n /**\n * `Determines` whether the specified page is within the collection.\n * @private\n */\n PdfSectionPageCollection.prototype.contains = function (page) {\n return this.section.contains(page);\n };\n /**\n * `Removes` the specified page from collection.\n * @private\n */\n PdfSectionPageCollection.prototype.remove = function (page) {\n this.section.remove(page);\n };\n /**\n * `Adds` a new page from collection.\n * @private\n */\n PdfSectionPageCollection.prototype.add = function () {\n return this.section.add();\n };\n return PdfSectionPageCollection;\n}());\nexport { PdfSectionPageCollection };\n","import { TemplateType } from './../pages/enum';\n// import { PdfStampCollection } from `./../Pages/PdfStampCollection`;\n/**\n * `PdfDocumentTemplate` class encapsulates a page template for all the pages in the document.\n * @private\n */\nvar PdfDocumentTemplate = /** @class */ (function () {\n // Constructors\n /**\n * Initializes a new instance of the `PdfDocumentTemplate` class.\n * @public\n */\n function PdfDocumentTemplate() {\n //\n }\n Object.defineProperty(PdfDocumentTemplate.prototype, \"left\", {\n // private m_stamps : PdfStampCollection;\n // Properties\n /**\n * `Left` page template object.\n * @public\n */\n get: function () {\n return this.leftTemplate;\n },\n set: function (value) {\n this.leftTemplate = this.checkElement(value, TemplateType.Left);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"top\", {\n /**\n * `Top` page template object.\n * @public\n */\n get: function () {\n return this.topTemplate;\n },\n set: function (value) {\n this.topTemplate = this.checkElement(value, TemplateType.Top);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"right\", {\n /**\n * `Right` page template object.\n * @public\n */\n get: function () {\n return this.rightTemplate;\n },\n set: function (value) {\n this.rightTemplate = this.checkElement(value, TemplateType.Right);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"bottom\", {\n /**\n * `Bottom` page template object.\n * @public\n */\n get: function () {\n return this.bottomTemplate;\n },\n set: function (value) {\n this.bottomTemplate = this.checkElement(value, TemplateType.Bottom);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"EvenLeft\", {\n /**\n * `EvenLeft` page template object.\n * @public\n */\n get: function () {\n return this.evenLeft;\n },\n set: function (value) {\n this.evenLeft = this.checkElement(value, TemplateType.Left);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"EvenTop\", {\n /**\n * `EvenTop` page template object.\n * @public\n */\n get: function () {\n return this.evenTop;\n },\n set: function (value) {\n this.evenTop = this.checkElement(value, TemplateType.Top);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"EvenRight\", {\n /**\n * `EvenRight` page template object.\n * @public\n */\n get: function () {\n return this.evenRight;\n },\n set: function (value) {\n this.evenRight = this.checkElement(value, TemplateType.Right);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"EvenBottom\", {\n /**\n * `EvenBottom` page template object.\n * @public\n */\n get: function () {\n return this.evenBottom;\n },\n set: function (value) {\n this.evenBottom = this.checkElement(value, TemplateType.Bottom);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"OddLeft\", {\n /**\n * `OddLeft` page template object.\n * @public\n */\n get: function () {\n return this.oddLeft;\n },\n set: function (value) {\n this.oddLeft = this.checkElement(value, TemplateType.Left);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"OddTop\", {\n /**\n * `OddTop` page template object.\n * @public\n */\n get: function () {\n return this.oddTop;\n },\n set: function (value) {\n this.oddTop = this.checkElement(value, TemplateType.Top);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"OddRight\", {\n /**\n * `OddRight` page template object.\n * @public\n */\n get: function () {\n return this.oddRight;\n },\n set: function (value) {\n this.oddRight = this.checkElement(value, TemplateType.Right);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentTemplate.prototype, \"OddBottom\", {\n /**\n * `OddBottom` page template object.\n * @public\n */\n get: function () {\n return this.oddBottom;\n },\n set: function (value) {\n this.oddBottom = this.checkElement(value, TemplateType.Bottom);\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * Returns `left` template.\n * @public\n */\n PdfDocumentTemplate.prototype.getLeft = function (page) {\n if (page == null) {\n throw new Error('ArgumentNullException:page');\n }\n var template = null;\n // if (page.Document.Pages != null) {\n var even = this.isEven(page);\n if (even) {\n template = (this.EvenLeft != null) ? this.EvenLeft : this.left;\n }\n else {\n template = (this.OddLeft != null) ? this.OddLeft : this.left;\n }\n // }\n return template;\n };\n /**\n * Returns `top` template.\n * @public\n */\n PdfDocumentTemplate.prototype.getTop = function (page) {\n if (page == null) {\n throw new Error('ArgumentNullException:page');\n }\n var template = null;\n // if (page.Document.Pages != null) {\n var even = this.isEven(page);\n if (even) {\n template = (this.EvenTop != null) ? this.EvenTop : this.top;\n }\n else {\n template = (this.OddTop != null) ? this.OddTop : this.top;\n }\n // }\n return template;\n };\n /**\n * Returns `right` template.\n * @public\n */\n PdfDocumentTemplate.prototype.getRight = function (page) {\n if (page == null) {\n throw new Error('ArgumentNullException:page');\n }\n var template = null;\n // if (page.Document.Pages != null) {\n var even = this.isEven(page);\n if (even) {\n template = (this.EvenRight != null) ? this.EvenRight : this.right;\n }\n else {\n template = (this.OddRight != null) ? this.OddRight : this.right;\n }\n // }\n return template;\n };\n /**\n * Returns `bottom` template.\n * @public\n */\n PdfDocumentTemplate.prototype.getBottom = function (page) {\n if (page == null) {\n throw new Error('ArgumentNullException:page');\n }\n var template = null;\n // if (page.Document.Pages != null) {\n var even = this.isEven(page);\n if (even) {\n template = (this.EvenBottom != null) ? this.EvenBottom : this.bottom;\n }\n else {\n template = (this.OddBottom != null) ? this.OddBottom : this.bottom;\n }\n // }\n return template;\n };\n /**\n * Checks whether the page `is even`.\n * @private\n */\n PdfDocumentTemplate.prototype.isEven = function (page) {\n var pages = page.section.document.pages;\n var index = 0;\n if (pages.pageCollectionIndex.containsKey(page)) {\n index = pages.pageCollectionIndex.getValue(page) + 1;\n }\n else {\n index = pages.indexOf(page) + 1;\n }\n var even = ((index % 2) === 0);\n return even;\n };\n /**\n * Checks a `template element`.\n * @private\n */\n PdfDocumentTemplate.prototype.checkElement = function (templateElement, type) {\n if (templateElement != null) {\n if ((typeof templateElement.type !== 'undefined') && (templateElement.type !== TemplateType.None)) {\n throw new Error('NotSupportedException:Can not reassign the template element. Please, create new one.');\n }\n templateElement.type = type;\n }\n return templateElement;\n };\n return PdfDocumentTemplate;\n}());\nexport { PdfDocumentTemplate };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfSectionTemplate.ts class for EJ2-PDF\n */\nimport { PdfDocumentTemplate } from './../document/pdf-document-template';\n/**\n * Represents a `page template` for all the pages in the section.\n */\nvar PdfSectionTemplate = /** @class */ (function (_super) {\n __extends(PdfSectionTemplate, _super);\n // Constructors\n /**\n * `Creates a new object`.\n * @private\n */\n function PdfSectionTemplate() {\n var _this = _super.call(this) || this;\n _this.leftValue = _this.topValue = _this.rightValue = _this.bottomValue = _this.stampValue = true;\n return _this;\n }\n Object.defineProperty(PdfSectionTemplate.prototype, \"applyDocumentLeftTemplate\", {\n // Properties\n /**\n * Gets or sets value indicating whether parent `Left page template should be used or not`.\n * @private\n */\n get: function () {\n return this.leftValue;\n },\n set: function (value) {\n this.leftValue = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSectionTemplate.prototype, \"applyDocumentTopTemplate\", {\n /**\n * Gets or sets value indicating whether parent `Top page template should be used or not`.\n * @private\n */\n get: function () {\n return this.topValue;\n },\n set: function (value) {\n this.topValue = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSectionTemplate.prototype, \"applyDocumentRightTemplate\", {\n /**\n * Gets or sets value indicating whether parent `Right page template should be used or not`.\n * @private\n */\n get: function () {\n return this.rightValue;\n },\n set: function (value) {\n this.rightValue = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSectionTemplate.prototype, \"applyDocumentBottomTemplate\", {\n /**\n * Gets or sets value indicating whether parent `Bottom page template should be used or not`.\n * @private\n */\n get: function () {\n return this.bottomValue;\n },\n set: function (value) {\n this.bottomValue = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSectionTemplate.prototype, \"applyDocumentStamps\", {\n /**\n * Gets or sets value indicating whether the `stamp value` is true or not.\n * @private\n */\n get: function () {\n return this.stampValue;\n },\n set: function (value) {\n this.stampValue = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfSectionTemplate;\n}(PdfDocumentTemplate));\nexport { PdfSectionTemplate };\n","import { PdfPage } from './pdf-page';\nimport { PageAddedEventArgs } from './page-added-event-arguments';\nimport { PdfReferenceHolder } from './../primitives/pdf-reference';\nimport { PdfArray } from './../primitives/pdf-array';\nimport { PdfNumber } from './../primitives/pdf-number';\nimport { PdfName } from './../primitives/pdf-name';\nimport { PdfDictionary } from './../primitives/pdf-dictionary';\nimport { SaveSectionEventHandler } from './../primitives/pdf-dictionary';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\nimport { PdfSectionCollection } from './pdf-section-collection';\nimport { PdfSectionPageCollection } from './pdf-section-page-collection';\nimport { RectangleF } from './../drawing/pdf-drawing';\nimport { PdfSectionTemplate } from './pdf-section-templates';\n/**\n * Represents a `section` entity. A section it's a set of the pages with similar page settings.\n */\nvar PdfSection = /** @class */ (function () {\n function PdfSection(document, pageSettings) {\n //Fields\n //public PageAdded() : PageAddedEventArgs.PageAddedEventHandler = new PageAddedEventArgs.PageAddedEventHandler(Object,args)\n /**\n * @hidden\n * @private\n */\n this.pageAdded = new PageAddedEventArgs();\n /**\n * @hidden\n * @private\n */\n this.pdfPages = [];\n /**\n * @hidden\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n this.pdfDocument = document;\n if (typeof pageSettings === 'undefined') {\n this.settings = document.pageSettings.clone();\n this.initialSettings = this.settings.clone();\n }\n else {\n this.settings = pageSettings.clone();\n this.initialSettings = this.settings.clone();\n }\n this.initialize();\n }\n Object.defineProperty(PdfSection.prototype, \"parent\", {\n //Property\n /**\n * Gets or sets the `parent`.\n * @private\n */\n get: function () {\n return this.sectionCollection;\n },\n set: function (value) {\n this.sectionCollection = value;\n this.section.items.setValue(this.dictionaryProperties.parent, new PdfReferenceHolder(value));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSection.prototype, \"parentDocument\", {\n /**\n * Gets the `parent document`.\n * @private\n */\n get: function () {\n return this.pdfDocument;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSection.prototype, \"pageSettings\", {\n /**\n * Gets or sets the `page settings` of the section.\n * @private\n */\n get: function () {\n return this.settings;\n },\n set: function (value) {\n if (value != null) {\n this.settings = value;\n }\n else {\n throw Error('Value can not be null.');\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSection.prototype, \"element\", {\n /**\n * Gets the wrapped `element`.\n * @private\n */\n get: function () {\n return this.section;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSection.prototype, \"count\", {\n /**\n * Gets the `count` of the pages in the section.\n * @private\n */\n get: function () {\n return this.pagesReferences.count;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSection.prototype, \"template\", {\n /**\n * Gets or sets a `template` for the pages in the section.\n * @private\n */\n get: function () {\n if (this.pageTemplate == null) {\n this.pageTemplate = new PdfSectionTemplate();\n }\n return this.pageTemplate;\n },\n set: function (value) {\n this.pageTemplate = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSection.prototype, \"document\", {\n /**\n * Gets the `document`.\n * @private\n */\n get: function () {\n return this.sectionCollection.document;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSection.prototype, \"pages\", {\n /**\n * Gets the collection of `pages` in a section (Read only)\n * @private\n */\n get: function () {\n if (this.pagesCollection == null || typeof this.pagesCollection === 'undefined') {\n this.pagesCollection = new PdfSectionPageCollection(this);\n }\n return this.pagesCollection;\n },\n enumerable: true,\n configurable: true\n });\n //methods\n /**\n * `Return the page collection` of current section.\n * @private\n */\n PdfSection.prototype.getPages = function () {\n return this.pdfPages;\n };\n /**\n * `Translates` point into native coordinates of the page.\n * @private\n */\n PdfSection.prototype.pointToNativePdf = function (page, point) {\n var bounds = this.getActualBounds(page, true);\n point.x += bounds.x;\n point.y = this.pageSettings.height - (point.y);\n return point;\n };\n /**\n * Sets the page setting of the current section.\n * @public\n * @param settings Instance of `PdfPageSettings`\n */\n PdfSection.prototype.setPageSettings = function (settings) {\n this.settings = settings;\n this.state.orientation = settings.orientation;\n this.state.rotate = settings.rotate;\n this.state.size = settings.size;\n this.state.origin = settings.origin;\n };\n /**\n * `Initializes` the object.\n * @private\n */\n PdfSection.prototype.initialize = function () {\n this.pagesReferences = new PdfArray();\n this.section = new PdfDictionary();\n this.state = new PageSettingsState(this.pdfDocument);\n this.section.sectionBeginSave = new SaveSectionEventHandler(this, this.state);\n this.pageCount = new PdfNumber(0);\n this.section.items.setValue(this.dictionaryProperties.count, this.pageCount);\n this.section.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.pages));\n this.section.items.setValue(this.dictionaryProperties.kids, this.pagesReferences);\n };\n /**\n * Checks whether any template should be printed on this layer.\n * @private\n * @param document The parent document.\n * @param page The parent page.\n * @param foreground Layer z-order.\n * @returns True - if some content should be printed on the layer, False otherwise.\n */\n PdfSection.prototype.containsTemplates = function (document, page, foreground) {\n var documentHeaders = this.getDocumentTemplates(document, page, foreground);\n var sectionTemplates = this.getSectionTemplates(page, foreground);\n return (documentHeaders.length > 0 || sectionTemplates.length > 0);\n };\n /**\n * Returns array of the document templates.\n * @private\n * @param document The parent document.\n * @param page The parent page.\n * @param foreground If true - return foreground templates, if false - return background templates.\n * @returns Returns array of the document templates.\n */\n /* tslint:disable */\n PdfSection.prototype.getDocumentTemplates = function (document, page, foreground) {\n var templates = [];\n if (this.template.applyDocumentTopTemplate && document.template.getTop(page) != null) {\n if ((!(document.template.getTop(page).foreground || foreground)) || (document.template.getTop(page).foreground && foreground)) {\n templates.push(document.template.getTop(page));\n }\n }\n if (this.template.applyDocumentBottomTemplate && document.template.getBottom(page) != null) {\n if ((!(document.template.getBottom(page).foreground || foreground)) || (document.template.getBottom(page).foreground && foreground)) {\n templates.push(document.template.getBottom(page));\n }\n }\n if (this.template.applyDocumentLeftTemplate && document.template.getLeft(page) != null) {\n if ((!(document.template.getLeft(page).foreground || foreground)) || (document.template.getLeft(page).foreground && foreground)) {\n templates.push(document.template.getLeft(page));\n }\n }\n if (this.template.applyDocumentRightTemplate && document.template.getRight(page) != null) {\n if ((!(document.template.getRight(page).foreground || foreground)) || (document.template.getRight(page).foreground && foreground)) {\n templates.push(document.template.getRight(page));\n }\n }\n return templates;\n };\n /**\n * Returns array of the section templates.\n * @private\n * @param page The parent page.\n * @param foreground If true - return foreground templates, if false - return background templates.\n * @returns Returns array of the section templates.\n */\n /* tslint:disable */\n PdfSection.prototype.getSectionTemplates = function (page, foreground) {\n var templates = [];\n if (this.template.getTop(page) != null) {\n var pageTemplate = this.template.getTop(page);\n if ((!(pageTemplate.foreground || foreground)) || (pageTemplate.foreground && foreground)) {\n templates.push(pageTemplate);\n }\n }\n if (this.template.getBottom(page) != null) {\n var pageTemplate = this.template.getBottom(page);\n if ((!(pageTemplate.foreground || foreground)) || (pageTemplate.foreground && foreground)) {\n templates.push(pageTemplate);\n }\n }\n if (this.template.getLeft(page) != null) {\n var pageTemplate = this.template.getLeft(page);\n if ((!(pageTemplate.foreground || foreground)) || (pageTemplate.foreground && foreground)) {\n templates.push(pageTemplate);\n }\n }\n if (this.template.getRight(page) != null) {\n var pageTemplate = this.template.getRight(page);\n if ((!(pageTemplate.foreground || foreground)) || (pageTemplate.foreground && foreground)) {\n templates.push(pageTemplate);\n }\n }\n return templates;\n };\n /* tslint:enable */\n /**\n * `Adds` the specified page.\n * @private\n */\n PdfSection.prototype.add = function (page) {\n if (typeof page === 'undefined') {\n var page_1 = new PdfPage();\n this.add(page_1);\n return page_1;\n }\n else {\n var r = this.checkPresence(page);\n this.pdfPages.push(page);\n this.pagesReferences.add(r);\n page.setSection(this);\n page.resetProgress();\n this.pageAddedMethod(page);\n }\n };\n /**\n * `Checks the presence`.\n * @private\n */\n PdfSection.prototype.checkPresence = function (page) {\n var rh = new PdfReferenceHolder(page);\n var contains = false;\n var sc = this.parent;\n for (var index = 0; index < sc.section.length; index++) {\n var section = sc.section[index];\n contains = contains || section.contains(page);\n }\n return rh;\n };\n /**\n * `Determines` whether the page in within the section.\n * @private\n */\n PdfSection.prototype.contains = function (page) {\n var index = this.indexOf(page);\n return (0 <= index);\n };\n /**\n * Get the `index of` the page.\n * @private\n */\n PdfSection.prototype.indexOf = function (page) {\n for (var index = 0; index < this.pdfPages.length; index++) {\n if (this.pdfPages[index] === page) {\n return this.pdfPages.indexOf(page);\n }\n }\n var r = new PdfReferenceHolder(page);\n return this.pagesReferences.indexOf(r);\n };\n /**\n * Call two event's methods.\n * @hidden\n * @private\n */\n PdfSection.prototype.pageAddedMethod = function (page) {\n //Create event's arguments\n var args = new PageAddedEventArgs(page);\n this.onPageAdded(args);\n var parent = this.parent;\n parent.document.pages.onPageAdded(args);\n this.pageCount.intValue = this.count;\n };\n /**\n * Called when the page has been added.\n * @hidden\n * @private\n */\n PdfSection.prototype.onPageAdded = function (args) {\n //\n };\n PdfSection.prototype.getActualBounds = function (arg1, arg2, arg3) {\n if (arg1 instanceof PdfPage && typeof arg2 === 'boolean') {\n var result = void 0;\n var document_1 = this.parent.document;\n result = this.getActualBounds(document_1, arg1, arg2);\n return result;\n }\n else {\n arg1 = arg1;\n arg2 = arg2;\n arg3 = arg3;\n var bounds = new RectangleF(0, 0, 0, 0);\n bounds.height = (arg3) ? this.pageSettings.size.height : this.pageSettings.getActualSize().height;\n bounds.width = (arg3) ? this.pageSettings.size.width : this.pageSettings.getActualSize().width;\n var left = this.getLeftIndentWidth(arg1, arg2, arg3);\n var top_1 = this.getTopIndentHeight(arg1, arg2, arg3);\n var right = this.getRightIndentWidth(arg1, arg2, arg3);\n var bottom = this.getBottomIndentHeight(arg1, arg2, arg3);\n bounds.x += left;\n bounds.y += top_1;\n bounds.width -= (left + right);\n bounds.height -= (top_1 + bottom);\n return bounds;\n }\n };\n /**\n * Calculates width of the `left indent`.\n * @private\n */\n PdfSection.prototype.getLeftIndentWidth = function (document, page, includeMargins) {\n if (document == null) {\n throw new Error('ArgumentNullException:document');\n }\n if (page == null) {\n throw new Error('ArgumentNullException:page');\n }\n var value = (includeMargins) ? this.pageSettings.margins.left : 0;\n var templateWidth = (this.template.getLeft(page) != null) ? this.template.getLeft(page).width : 0;\n var docTemplateWidth = (document.template.getLeft(page) != null) ? document.template.getLeft(page).width : 0;\n value += (this.template.applyDocumentLeftTemplate) ? Math.max(templateWidth, docTemplateWidth) : templateWidth;\n return value;\n };\n /**\n * Calculates `Height` of the top indent.\n * @private\n */\n PdfSection.prototype.getTopIndentHeight = function (document, page, includeMargins) {\n if (document == null) {\n throw new Error('ArgumentNullException:document');\n }\n if (page == null) {\n throw new Error('ArgumentNullException:page');\n }\n var value = (includeMargins) ? this.pageSettings.margins.top : 0;\n var templateHeight = (this.template.getTop(page) != null) ? this.template.getTop(page).height : 0;\n var docTemplateHeight = (document.template.getTop(page) != null) ? document.template.getTop(page).height : 0;\n value += (this.template.applyDocumentTopTemplate) ? Math.max(templateHeight, docTemplateHeight) : templateHeight;\n return value;\n };\n /**\n * Calculates `width` of the right indent.\n * @private\n */\n PdfSection.prototype.getRightIndentWidth = function (document, page, includeMargins) {\n if (document == null) {\n throw new Error('ArgumentNullException:document');\n }\n if (page == null) {\n throw new Error('ArgumentNullException:page');\n }\n var value = (includeMargins) ? this.pageSettings.margins.right : 0;\n var templateWidth = (this.template.getRight(page) != null) ? this.template.getRight(page).width : 0;\n var docTemplateWidth = (document.template.getRight(page) != null) ? document.template.getRight(page).width : 0;\n value += (this.template.applyDocumentRightTemplate) ? Math.max(templateWidth, docTemplateWidth) : templateWidth;\n return value;\n };\n /**\n * Calculates `Height` of the bottom indent.\n * @private\n */\n PdfSection.prototype.getBottomIndentHeight = function (document, page, includeMargins) {\n if (document == null) {\n throw new Error('ArgumentNullException:document');\n }\n if (page == null) {\n throw new Error('ArgumentNullException:page');\n }\n var value = (includeMargins) ? this.pageSettings.margins.bottom : 0;\n var templateHeight = (this.template.getBottom(page) != null) ? this.template.getBottom(page).height : 0;\n var docTemplateHeight = (document.template.getBottom(page) != null) ? document.template.getBottom(page).height : 0;\n value += (this.template.applyDocumentBottomTemplate) ? Math.max(templateHeight, docTemplateHeight) : templateHeight;\n return value;\n };\n /**\n * `Removes` the page from the section.\n * @private\n */\n PdfSection.prototype.remove = function (page) {\n if (page == null) {\n throw Error('ArgumentNullException(\"page\")');\n }\n var index = this.pdfPages.indexOf(page);\n this.pagesReferences.removeAt(index);\n var temproaryPages = [];\n for (var j = 0; j < index; j++) {\n temproaryPages.push(this.pdfPages[j]);\n }\n for (var j = index + 1; j < this.pdfPages.length; j++) {\n temproaryPages.push(this.pdfPages[j]);\n }\n this.pdfPages = temproaryPages;\n };\n /**\n * In fills dictionary by the data from `Page settings`.\n * @private\n */\n PdfSection.prototype.applyPageSettings = function (container, parentSettings, state) {\n var bounds = new RectangleF(state.origin, state.size);\n container.items.setValue(this.dictionaryProperties.mediaBox, PdfArray.fromRectangle(bounds));\n var rotate = 0;\n rotate = PdfSectionCollection.rotateFactor * state.rotate;\n var angle = new PdfNumber(rotate);\n container.items.setValue(this.dictionaryProperties.rotate, angle);\n };\n /**\n * Catches the Save event of the dictionary.\n * @hidden\n * @private\n */\n PdfSection.prototype.beginSave = function (state, writer) {\n var doc = writer.document;\n this.applyPageSettings(this.section, doc.pageSettings, state);\n };\n /**\n * Draws page templates on the page.\n * @private\n */\n PdfSection.prototype.drawTemplates = function (page, layer, document, foreground) {\n var documentHeaders = this.getDocumentTemplates(document, page, foreground);\n var sectionHeaders = this.getSectionTemplates(page, foreground);\n this.drawTemplatesHelper(layer, document, documentHeaders);\n this.drawTemplatesHelper(layer, document, sectionHeaders);\n };\n /**\n * Draws page templates on the page.\n * @private\n */\n PdfSection.prototype.drawTemplatesHelper = function (layer, document, templates) {\n if (templates != null && templates.length > 0) {\n var len = templates.length;\n for (var i = 0; i < len; i++) {\n var template = templates[i];\n template.draw(layer, document);\n }\n }\n };\n return PdfSection;\n}());\nexport { PdfSection };\nvar PageSettingsState = /** @class */ (function () {\n //Public Constructor\n /**\n * New instance to store the `PageSettings`.\n * @private\n */\n function PageSettingsState(document) {\n this.pageOrientation = document.pageSettings.orientation;\n this.pageRotate = document.pageSettings.rotate;\n this.pageSize = document.pageSettings.size;\n this.pageOrigin = document.pageSettings.origin;\n }\n Object.defineProperty(PageSettingsState.prototype, \"orientation\", {\n //public Properties\n /**\n * @hidden\n * @private\n */\n get: function () {\n return this.pageOrientation;\n },\n set: function (value) {\n this.pageOrientation = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PageSettingsState.prototype, \"rotate\", {\n /**\n * @hidden\n * @private\n */\n get: function () {\n return this.pageRotate;\n },\n set: function (value) {\n this.pageRotate = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PageSettingsState.prototype, \"size\", {\n /**\n * @hidden\n * @private\n */\n get: function () {\n return this.pageSize;\n },\n set: function (value) {\n this.pageSize = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PageSettingsState.prototype, \"origin\", {\n /**\n * @hidden\n * @private\n */\n get: function () {\n return this.pageOrigin;\n },\n set: function (value) {\n this.pageOrigin = value;\n },\n enumerable: true,\n configurable: true\n });\n return PageSettingsState;\n}());\nexport { PageSettingsState };\n","import { PdfNumber } from './../primitives/pdf-number';\nimport { PdfName } from './../primitives/pdf-name';\nimport { PdfArray } from './../primitives/pdf-array';\nimport { PdfDictionary, SaveSectionCollectionEventHandler } from './../primitives/pdf-dictionary';\nimport { PdfReferenceHolder } from './../primitives/pdf-reference';\nimport { RectangleF, PointF } from './../drawing/pdf-drawing';\nimport { PdfSection } from './pdf-section';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\n/**\n * Represents the `collection of the sections`.\n * @private\n */\nvar PdfSectionCollection = /** @class */ (function () {\n //constructor\n /**\n * Initializes a new instance of the `PdfSectionCollection` class.\n * @private\n */\n function PdfSectionCollection(document) {\n /**\n * @hidden\n * @private\n */\n this.sections = [];\n /**\n * @hidden\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n // if (document === null) {\n // throw new Error('ArgumentNullException : document');\n // }\n this.pdfDocument = document.clone();\n this.initialize();\n }\n Object.defineProperty(PdfSectionCollection.prototype, \"section\", {\n //Properties\n /**\n * Gets the `Section` collection.\n */\n get: function () {\n return this.sections;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSectionCollection.prototype, \"document\", {\n /**\n * Gets a parent `document`.\n * @private\n */\n get: function () {\n return this.pdfDocument;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSectionCollection.prototype, \"count\", {\n /**\n * Gets the `number of sections` in a document.\n * @private\n */\n get: function () {\n return this.sections.length;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfSectionCollection.prototype, \"element\", {\n /**\n * Gets the wrapped `element`.\n * @private\n */\n get: function () {\n return this.pages;\n },\n enumerable: true,\n configurable: true\n });\n //Methods\n /**\n * `Initializes the object`.\n * @private\n */\n PdfSectionCollection.prototype.initialize = function () {\n this.sectionCount = new PdfNumber(0);\n this.sectionCollection = new PdfArray();\n this.pages = new PdfDictionary();\n this.pages.beginSave = new SaveSectionCollectionEventHandler(this);\n this.pages.items.setValue(this.dictionaryProperties.type, new PdfName('Pages'));\n this.pages.items.setValue(this.dictionaryProperties.kids, this.sectionCollection);\n this.pages.items.setValue(this.dictionaryProperties.count, this.sectionCount);\n this.pages.items.setValue(this.dictionaryProperties.resources, new PdfDictionary());\n this.setPageSettings(this.pages, this.pdfDocument.pageSettings);\n };\n /**\n * Initializes a new instance of the `PdfSectionCollection` class.\n * @private\n */\n PdfSectionCollection.prototype.pdfSectionCollection = function (index) {\n if (index < 0 || index >= this.count) {\n throw new Error('IndexOutOfRangeException()');\n }\n return this.sections[index];\n };\n /**\n * In fills dictionary by the data from `Page settings`.\n * @private\n */\n PdfSectionCollection.prototype.setPageSettings = function (container, pageSettings) {\n // if (container === null) {\n // throw new Error('ArgumentNullException : container');\n // }\n // if (pageSettings === null) {\n // throw new Error('ArgumentNullException : pageSettings');\n // }\n var bounds = new RectangleF(new PointF(), pageSettings.size);\n container.items.setValue(this.dictionaryProperties.mediaBox, PdfArray.fromRectangle(bounds));\n };\n /**\n * `Adds` the specified section.\n * @private\n */\n PdfSectionCollection.prototype.add = function (section) {\n if (typeof section === 'undefined') {\n var section_1 = new PdfSection(this.pdfDocument);\n this.add(section_1);\n return section_1;\n }\n else {\n // if (section === null) {\n // throw new Error('ArgumentNullException : section');\n // }\n var r = this.checkSection(section);\n this.sections.push(section);\n section.parent = this;\n this.sectionCollection.add(r);\n return this.sections.indexOf(section);\n }\n };\n /**\n * `Checks` if the section is within the collection.\n * @private\n */\n PdfSectionCollection.prototype.checkSection = function (section) {\n var r = new PdfReferenceHolder(section);\n var contains = this.sectionCollection.contains(r);\n // if (contains) {\n // throw new Error('ArgumentException : The object can not be added twice to the collection,section');\n // }\n return r;\n };\n /**\n * Catches the Save event of the dictionary to `count the pages`.\n * @private\n */\n PdfSectionCollection.prototype.countPages = function () {\n var count = 0;\n this.sections.forEach(function (n) { return (count += n.count); });\n return count;\n };\n /**\n * Catches the Save event of the dictionary to `count the pages`.\n * @hidden\n * @private\n */\n PdfSectionCollection.prototype.beginSave = function () {\n this.sectionCount.intValue = this.countPages();\n };\n //Fields\n /**\n * Rotate factor for page `rotation`.\n * @default 90\n * @private\n */\n PdfSectionCollection.rotateFactor = 90;\n return PdfSectionCollection;\n}());\nexport { PdfSectionCollection };\n","import { PdfPage } from './pdf-page';\nimport { Dictionary } from './../collections/dictionary';\n/**\n * Represents a virtual collection of all the pages in the document.\n * @private\n */\nvar PdfDocumentPageCollection = /** @class */ (function () {\n //constructor\n /**\n * Initializes a new instance of the `PdfPageCollection` class.\n * @private\n */\n function PdfDocumentPageCollection(document) {\n /**\n * It holds the page collection with the `index`.\n * @private\n */\n this.pdfPageCollectionIndex = new Dictionary();\n this.document = document;\n }\n Object.defineProperty(PdfDocumentPageCollection.prototype, \"count\", {\n //Property\n /**\n * Gets the total `number of the pages`.\n * @private\n */\n get: function () {\n return this.countPages();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocumentPageCollection.prototype, \"pageCollectionIndex\", {\n /**\n * Gets a `page index` from the document.\n * @private\n */\n get: function () {\n return this.pdfPageCollectionIndex;\n },\n enumerable: true,\n configurable: true\n });\n PdfDocumentPageCollection.prototype.add = function (page) {\n if (typeof page === 'undefined') {\n var page_1 = new PdfPage();\n this.add(page_1);\n return page_1;\n }\n else {\n var section = this.getLastSection();\n section.add(page);\n }\n };\n /**\n * Returns `last section` in the document.\n * @private\n */\n PdfDocumentPageCollection.prototype.getLastSection = function () {\n var sc = this.document.sections;\n if (sc.section.length === 0) {\n sc.add();\n }\n var section = sc.section[sc.section.length - 1];\n return section;\n };\n /**\n * Called when `new page has been added`.\n * @private\n */\n PdfDocumentPageCollection.prototype.onPageAdded = function (args) {\n // if (PageAdded !== null)\n // {\n // PageAdded(this, args);\n // }\n };\n /**\n * Gets the `total number of pages`.\n * @private\n */\n PdfDocumentPageCollection.prototype.countPages = function () {\n var sc = this.document.sections;\n var count = 0;\n for (var index = 0; index < sc.section.length; index++) {\n count += sc.section[index].count;\n }\n return count;\n };\n /**\n * Gets the `page object` from page index.\n * @private\n */\n PdfDocumentPageCollection.prototype.getPageByIndex = function (index) {\n return this.getPage(index);\n };\n /**\n * Gets a page by its `index` in the document.\n * @private\n */\n PdfDocumentPageCollection.prototype.getPage = function (index) {\n if ((index < 0) || (index >= this.count)) {\n throw Error('ArgumentOutOfRangeException(\"index\", \"Value can not be less 0\")');\n }\n var page = null;\n var sectionStartIndex = 0;\n var sectionCount = 0;\n var pageIndex = 0;\n var length = this.document.sections.count;\n for (var i = 0; i < length; i++) {\n var section = this.document.sections.section[i];\n sectionCount = section.count;\n pageIndex = index - sectionStartIndex;\n // We found a section containing the page.\n if ((index >= sectionStartIndex && pageIndex < sectionCount)) {\n page = section.getPages()[pageIndex];\n break;\n }\n sectionStartIndex += sectionCount;\n }\n return page;\n };\n /**\n * Gets the `index of` the page in the document.\n * @private\n */\n PdfDocumentPageCollection.prototype.indexOf = function (page) {\n var index = -1;\n if (page == null) {\n throw new Error('ArgumentNullException: page');\n }\n else {\n var numPages = 0;\n for (var i = 0, len = this.document.sections.count; i < len; i++) {\n var section = this.document.sections.pdfSectionCollection(i);\n index = section.indexOf(page);\n if (index >= 0) {\n index += numPages;\n break;\n }\n else {\n index = -1;\n }\n numPages += section.count;\n }\n }\n return index;\n };\n /**\n * `Removes` the specified page.\n * @private\n */\n PdfDocumentPageCollection.prototype.remove = function (page) {\n if (page == null) {\n throw Error('ArgumentNullException(\"page\")');\n }\n var section = null;\n var len;\n for (var i = 0, len_1 = this.document.sections.count; i < len_1; i++) {\n section = this.document.sections.pdfSectionCollection(i);\n if (section.pages.contains(page)) {\n section.pages.remove(page);\n break;\n }\n }\n return section;\n };\n return PdfDocumentPageCollection;\n}());\nexport { PdfDocumentPageCollection };\n","/**\n * PdfCacheCollection.ts class for EJ2-PDF\n */\nimport { Dictionary } from './../collections/dictionary';\n/**\n * `Collection of the cached objects`.\n * @private\n */\nvar PdfCacheCollection = /** @class */ (function () {\n // Constructors\n /**\n * Initializes a new instance of the `PdfCacheCollection` class.\n * @private\n */\n function PdfCacheCollection() {\n this.referenceObjects = [];\n this.pdfFontCollection = new Dictionary();\n }\n // Public methods\n /**\n * `Searches` for the similar cached object. If is not found - adds the object to the cache.\n * @private\n */\n PdfCacheCollection.prototype.search = function (obj) {\n var result = null;\n var group = this.getGroup(obj);\n if (group == null) {\n group = this.createNewGroup();\n }\n else if (group.length > 0) {\n result = group[0];\n }\n group.push(obj);\n return result;\n };\n // Implementation\n /**\n * `Creates` a new group.\n * @private\n */\n PdfCacheCollection.prototype.createNewGroup = function () {\n var group = [];\n this.referenceObjects.push(group);\n return group;\n };\n /**\n * `Find and Return` a group.\n * @private\n */\n PdfCacheCollection.prototype.getGroup = function (result) {\n var group = null;\n if (result !== null) {\n var len = this.referenceObjects.length;\n for (var i = 0; i < len; i++) {\n if (this.referenceObjects.length > 0) {\n var tGroup = this.referenceObjects[i];\n if (tGroup.length > 0) {\n var representative = tGroup[0];\n if (result.equalsTo(representative)) {\n group = tGroup;\n break;\n }\n }\n else {\n this.removeGroup(tGroup);\n }\n }\n len = this.referenceObjects.length;\n }\n }\n return group;\n };\n /**\n * Remove a group from the storage.\n */\n PdfCacheCollection.prototype.removeGroup = function (group) {\n if (group !== null) {\n var index = this.referenceObjects.indexOf(group);\n this.referenceObjects.slice(index, index + 1);\n }\n };\n PdfCacheCollection.prototype.destroy = function () {\n this.pdfFontCollection = undefined;\n this.referenceObjects = undefined;\n };\n return PdfCacheCollection;\n}());\nexport { PdfCacheCollection };\n","/**\n * PdfStandardFontMetricsFactory.ts class for EJ2-PDF\n */\nimport { PdfFontStyle, PdfFontFamily } from './enum';\nimport { PdfFontMetrics, StandardWidthTable } from './pdf-font-metrics';\n/**\n * @private\n * `Factory of the standard fonts metrics`.\n */\nvar PdfStandardFontMetricsFactory = /** @class */ (function () {\n function PdfStandardFontMetricsFactory() {\n }\n /**\n * Returns `metrics` of the font.\n * @private\n */\n PdfStandardFontMetricsFactory.getMetrics = function (fontFamily, fontStyle, size) {\n var metrics = null;\n switch (fontFamily) {\n case PdfFontFamily.Helvetica:\n metrics = this.getHelveticaMetrics(fontFamily, fontStyle, size);\n break;\n case PdfFontFamily.Courier:\n metrics = this.getCourierMetrics(fontFamily, fontStyle, size);\n break;\n case PdfFontFamily.TimesRoman:\n metrics = this.getTimesMetrics(fontFamily, fontStyle, size);\n break;\n case PdfFontFamily.Symbol:\n metrics = this.getSymbolMetrics(fontFamily, fontStyle, size);\n break;\n case PdfFontFamily.ZapfDingbats:\n metrics = this.getZapfDingbatsMetrics(fontFamily, fontStyle, size);\n break;\n default:\n metrics = this.getHelveticaMetrics(PdfFontFamily.Helvetica, fontStyle, size);\n break;\n }\n metrics.name = fontFamily.toString();\n metrics.subScriptSizeFactor = this.subSuperScriptFactor;\n metrics.superscriptSizeFactor = this.subSuperScriptFactor;\n return metrics;\n };\n // Implementation\n /**\n * Creates `Helvetica font metrics`.\n * @private\n */\n PdfStandardFontMetricsFactory.getHelveticaMetrics = function (fontFamily, fontStyle, size) {\n var metrics = new PdfFontMetrics();\n if ((fontStyle & PdfFontStyle.Bold) > 0 && (fontStyle & PdfFontStyle.Italic) > 0) {\n metrics.ascent = this.helveticaBoldItalicAscent;\n metrics.descent = this.helveticaBoldItalicDescent;\n metrics.postScriptName = this.helveticaBoldItalicName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.arialBoldWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n else if ((fontStyle & PdfFontStyle.Bold) > 0) {\n metrics.ascent = this.helveticaBoldAscent;\n metrics.descent = this.helveticaBoldDescent;\n metrics.postScriptName = this.helveticaBoldName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.arialBoldWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n else if ((fontStyle & PdfFontStyle.Italic) > 0) {\n metrics.ascent = this.helveticaItalicAscent;\n metrics.descent = this.helveticaItalicDescent;\n metrics.postScriptName = this.helveticaItalicName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.arialWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n else {\n metrics.ascent = this.helveticaAscent;\n metrics.descent = this.helveticaDescent;\n metrics.postScriptName = this.helveticaName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.arialWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n return metrics;\n };\n /**\n * Creates `Courier font metrics`.\n * @private\n */\n PdfStandardFontMetricsFactory.getCourierMetrics = function (fontFamily, fontStyle, size) {\n var metrics = new PdfFontMetrics();\n if ((fontStyle & PdfFontStyle.Bold) > 0 && (fontStyle & PdfFontStyle.Italic) > 0) {\n metrics.ascent = this.courierBoldItalicAscent;\n metrics.descent = this.courierBoldItalicDescent;\n metrics.postScriptName = this.courierBoldItalicName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.fixedWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n else if ((fontStyle & PdfFontStyle.Bold) > 0) {\n metrics.ascent = this.courierBoldAscent;\n metrics.descent = this.courierBoldDescent;\n metrics.postScriptName = this.courierBoldName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.fixedWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n else if ((fontStyle & PdfFontStyle.Italic) > 0) {\n metrics.ascent = this.courierItalicAscent;\n metrics.descent = this.courierItalicDescent;\n metrics.postScriptName = this.courierItalicName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.fixedWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n else {\n metrics.ascent = this.courierAscent;\n metrics.descent = this.courierDescent;\n metrics.postScriptName = this.courierName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.fixedWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n return metrics;\n };\n /**\n * Creates `Times font metrics`.\n * @private\n */\n PdfStandardFontMetricsFactory.getTimesMetrics = function (fontFamily, fontStyle, size) {\n var metrics = new PdfFontMetrics();\n if ((fontStyle & PdfFontStyle.Bold) > 0 && (fontStyle & PdfFontStyle.Italic) > 0) {\n metrics.ascent = this.timesBoldItalicAscent;\n metrics.descent = this.timesBoldItalicDescent;\n metrics.postScriptName = this.timesBoldItalicName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.timesRomanBoldItalicWidths);\n metrics.height = metrics.ascent - metrics.descent;\n }\n else if ((fontStyle & PdfFontStyle.Bold) > 0) {\n metrics.ascent = this.timesBoldAscent;\n metrics.descent = this.timesBoldDescent;\n metrics.postScriptName = this.timesBoldName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.timesRomanBoldWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n else if ((fontStyle & PdfFontStyle.Italic) > 0) {\n metrics.ascent = this.timesItalicAscent;\n metrics.descent = this.timesItalicDescent;\n metrics.postScriptName = this.timesItalicName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.timesRomanItalicWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n else {\n metrics.ascent = this.timesAscent;\n metrics.descent = this.timesDescent;\n metrics.postScriptName = this.timesName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.timesRomanWidth);\n metrics.height = metrics.ascent - metrics.descent;\n }\n return metrics;\n };\n /**\n * Creates `Symbol font metrics`.\n * @private\n */\n PdfStandardFontMetricsFactory.getSymbolMetrics = function (fontFamily, fontStyle, size) {\n var metrics = new PdfFontMetrics();\n metrics.ascent = this.symbolAscent;\n metrics.descent = this.symbolDescent;\n metrics.postScriptName = this.symbolName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.symbolWidth);\n metrics.height = metrics.ascent - metrics.descent;\n return metrics;\n };\n /**\n * Creates `ZapfDingbats font metrics`.\n * @private\n */\n PdfStandardFontMetricsFactory.getZapfDingbatsMetrics = function (fontFamily, fontStyle, size) {\n var metrics = new PdfFontMetrics();\n metrics.ascent = this.zapfDingbatsAscent;\n metrics.descent = this.zapfDingbatsDescent;\n metrics.postScriptName = this.zapfDingbatsName;\n metrics.size = size;\n metrics.widthTable = new StandardWidthTable(this.zapfDingbatsWidth);\n metrics.height = metrics.ascent - metrics.descent;\n return metrics;\n };\n /**\n * `Multiplier` os subscript superscript.\n * @private\n */\n PdfStandardFontMetricsFactory.subSuperScriptFactor = 1.52;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaAscent = 931;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaDescent = -225;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaName = 'Helvetica';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaBoldAscent = 962;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaBoldDescent = -228;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaBoldName = 'Helvetica-Bold';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaItalicAscent = 931;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaItalicDescent = -225;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaItalicName = 'Helvetica-Oblique';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaBoldItalicAscent = 962;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaBoldItalicDescent = -228;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.helveticaBoldItalicName = 'Helvetica-BoldOblique';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.courierAscent = 805;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.courierDescent = -250;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.courierName = 'Courier';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.courierBoldAscent = 801;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.courierBoldDescent = -250;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.courierBoldName = 'Courier-Bold';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.courierItalicAscent = 805;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.courierItalicDescent = -250;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.courierItalicName = 'Courier-Oblique';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.courierBoldItalicAscent = 801;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.courierBoldItalicDescent = -250;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.courierBoldItalicName = 'Courier-BoldOblique';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.timesAscent = 898;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.timesDescent = -218;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.timesName = 'Times-Roman';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.timesBoldAscent = 935;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.timesBoldDescent = -218;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.timesBoldName = 'Times-Bold';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.timesItalicAscent = 883;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.timesItalicDescent = -217;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.timesItalicName = 'Times-Italic';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.timesBoldItalicAscent = 921;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.timesBoldItalicDescent = -218;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.timesBoldItalicName = 'Times-BoldItalic';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.symbolAscent = 1010;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.symbolDescent = -293;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.symbolName = 'Symbol';\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.zapfDingbatsAscent = 820;\n /**\n * `Ascender` value for the font.\n * @private\n */\n PdfStandardFontMetricsFactory.zapfDingbatsDescent = -143;\n /**\n * `Font type`.\n * @private\n */\n PdfStandardFontMetricsFactory.zapfDingbatsName = 'ZapfDingbats';\n /**\n * `Arial` widths table.\n * @private\n */\n PdfStandardFontMetricsFactory.arialWidth = [\n 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333,\n 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584,\n 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833,\n 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278,\n 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833,\n 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334,\n 584, 0, 556, 0, 222, 556, 333, 1000, 556, 556, 333, 1000, 667, 333, 1000, 0,\n 611, 0, 0, 222, 222, 333, 333, 350, 556, 1000, 333, 1000, 500, 333, 944, 0,\n 500, 667, 0, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 0,\n 737, 333, 400, 584, 333, 333, 333, 556, 537, 278, 333, 333, 365, 556, 834, 834,\n 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278,\n 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667,\n 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278,\n 278, 278, 556, 556, 556, 556, 556, 556, 556, 584, 611, 556, 556, 556, 556, 500,\n 556, 500\n ];\n /**\n * `Arial bold` widths table.\n * @private\n */\n PdfStandardFontMetricsFactory.arialBoldWidth = [\n 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333,\n 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584,\n 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833,\n 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333,\n 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889,\n 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389,\n 584, 0, 556, 0, 278, 556, 500, 1000, 556, 556, 333, 1000, 667, 333, 1000, 0,\n 611, 0, 0, 278, 278, 500, 500, 350, 556, 1000, 333, 1000, 556, 333, 944, 0,\n 500, 667, 0, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 0,\n 737, 333, 400, 584, 333, 333, 333, 611, 556, 278, 333, 333, 365, 556, 834, 834,\n 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278,\n 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667,\n 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278,\n 278, 278, 611, 611, 611, 611, 611, 611, 611, 584, 611, 611, 611, 611, 611, 556,\n 611, 556\n ];\n /**\n * `Fixed` widths table.\n * @private\n */\n PdfStandardFontMetricsFactory.fixedWidth = [\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,\n 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600\n ];\n /**\n * `Times` widths table.\n * @private\n */\n PdfStandardFontMetricsFactory.timesRomanWidth = [\n 250, 333, 408, 500, 500, 833, 778, 180, 333, 333, 500, 564, 250, 333,\n 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 564, 564,\n 564, 444, 921, 722, 667, 667, 722, 611, 556, 722, 722, 333, 389, 722, 611, 889,\n 722, 722, 556, 722, 667, 556, 611, 722, 722, 944, 722, 722, 611, 333, 278, 333,\n 469, 500, 333, 444, 500, 444, 500, 444, 333, 500, 500, 278, 278, 500, 278, 778,\n 500, 500, 500, 500, 333, 389, 278, 500, 500, 722, 500, 500, 444, 480, 200, 480,\n 541, 0, 500, 0, 333, 500, 444, 1000, 500, 500, 333, 1000, 556, 333, 889, 0,\n 611, 0, 0, 333, 333, 444, 444, 350, 500, 1000, 333, 980, 389, 333, 722, 0,\n 444, 722, 0, 333, 500, 500, 500, 500, 200, 500, 333, 760, 276, 500, 564, 0,\n 760, 333, 400, 564, 300, 300, 333, 500, 453, 250, 333, 300, 310, 500, 750, 750,\n 750, 444, 722, 722, 722, 722, 722, 722, 889, 667, 611, 611, 611, 611, 333, 333,\n 333, 333, 722, 722, 722, 722, 722, 722, 722, 564, 722, 722, 722, 722, 722, 722,\n 556, 500, 444, 444, 444, 444, 444, 444, 667, 444, 444, 444, 444, 444, 278, 278,\n 278, 278, 500, 500, 500, 500, 500, 500, 500, 564, 500, 500, 500, 500, 500, 500,\n 500, 500\n ];\n /**\n * `Times bold` widths table.\n * @private\n */\n PdfStandardFontMetricsFactory.timesRomanBoldWidth = [\n 250, 333, 555, 500, 500, 1000, 833, 278, 333, 333, 500, 570, 250, 333,\n 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570,\n 570, 500, 930, 722, 667, 722, 722, 667, 611, 778, 778, 389, 500, 778, 667, 944,\n 722, 778, 611, 778, 722, 556, 667, 722, 722, 1000, 722, 722, 667, 333, 278, 333,\n 581, 500, 333, 500, 556, 444, 556, 444, 333, 500, 556, 278, 333, 556, 278, 833,\n 556, 500, 556, 556, 444, 389, 333, 556, 500, 722, 500, 500, 444, 394, 220, 394,\n 520, 0, 500, 0, 333, 500, 500, 1000, 500, 500, 333, 1000, 556, 333, 1000, 0,\n 667, 0, 0, 333, 333, 500, 500, 350, 500, 1000, 333, 1000, 389, 333, 722, 0,\n 444, 722, 0, 333, 500, 500, 500, 500, 220, 500, 333, 747, 300, 500, 570, 0,\n 747, 333, 400, 570, 300, 300, 333, 556, 540, 250, 333, 300, 330, 500, 750, 750,\n 750, 500, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 389, 389,\n 389, 389, 722, 722, 778, 778, 778, 778, 778, 570, 778, 722, 722, 722, 722, 722,\n 611, 556, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278,\n 278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 500,\n 556, 500\n ];\n /**\n * `Times italic` widths table.\n * @private\n */\n PdfStandardFontMetricsFactory.timesRomanItalicWidth = [\n 250, 333, 420, 500, 500, 833, 778, 214, 333, 333, 500, 675, 250, 333,\n 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 675, 675,\n 675, 500, 920, 611, 611, 667, 722, 611, 611, 722, 722, 333, 444, 667, 556, 833,\n 667, 722, 611, 722, 611, 500, 556, 722, 611, 833, 611, 556, 556, 389, 278, 389,\n 422, 500, 333, 500, 500, 444, 500, 444, 278, 500, 500, 278, 278, 444, 278, 722,\n 500, 500, 500, 500, 389, 389, 278, 500, 444, 667, 444, 444, 389, 400, 275, 400,\n 541, 0, 500, 0, 333, 500, 556, 889, 500, 500, 333, 1000, 500, 333, 944, 0,\n 556, 0, 0, 333, 333, 556, 556, 350, 500, 889, 333, 980, 389, 333, 667, 0,\n 389, 556, 0, 389, 500, 500, 500, 500, 275, 500, 333, 760, 276, 500, 675, 0,\n 760, 333, 400, 675, 300, 300, 333, 500, 523, 250, 333, 300, 310, 500, 750, 750,\n 750, 500, 611, 611, 611, 611, 611, 611, 889, 667, 611, 611, 611, 611, 333, 333,\n 333, 333, 722, 667, 722, 722, 722, 722, 722, 675, 722, 722, 722, 722, 722, 556,\n 611, 500, 500, 500, 500, 500, 500, 500, 667, 444, 444, 444, 444, 444, 278, 278,\n 278, 278, 500, 500, 500, 500, 500, 500, 500, 675, 500, 500, 500, 500, 500, 444,\n 500, 444\n ];\n /**\n * `Times bold italic` widths table.\n * @private\n */\n PdfStandardFontMetricsFactory.timesRomanBoldItalicWidths = [\n 250, 389, 555, 500, 500, 833, 778, 278, 333, 333, 500, 570, 250, 333,\n 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570,\n 570, 500, 832, 667, 667, 667, 722, 667, 667, 722, 778, 389, 500, 667, 611, 889,\n 722, 722, 611, 722, 667, 556, 611, 722, 667, 889, 667, 611, 611, 333, 278, 333,\n 570, 500, 333, 500, 500, 444, 500, 444, 333, 500, 556, 278, 278, 500, 278, 778,\n 556, 500, 500, 500, 389, 389, 278, 556, 444, 667, 500, 444, 389, 348, 220, 348,\n 570, 0, 500, 0, 333, 500, 500, 1000, 500, 500, 333, 1000, 556, 333, 944, 0,\n 611, 0, 0, 333, 333, 500, 500, 350, 500, 1000, 333, 1000, 389, 333, 722, 0,\n 389, 611, 0, 389, 500, 500, 500, 500, 220, 500, 333, 747, 266, 500, 606, 0,\n 747, 333, 400, 570, 300, 300, 333, 576, 500, 250, 333, 300, 300, 500, 750, 750,\n 750, 500, 667, 667, 667, 667, 667, 667, 944, 667, 667, 667, 667, 667, 389, 389,\n 389, 389, 722, 722, 722, 722, 722, 722, 722, 570, 722, 722, 722, 722, 722, 611,\n 611, 500, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278,\n 278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 444,\n 500, 444\n ];\n /**\n * `Symbol` widths table.\n * @private\n */\n PdfStandardFontMetricsFactory.symbolWidth = [\n 250, 333, 713, 500, 549, 833, 778, 439, 333, 333, 500, 549, 250, 549,\n 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278,\n 549, 549, 549, 444, 549, 722, 667, 722, 612, 611, 763, 603, 722, 333,\n 631, 722, 686, 889, 722, 722, 768, 741, 556, 592, 611, 690, 439, 768,\n 645, 795, 611, 333, 863, 333, 658, 500, 500, 631, 549, 549, 494, 439,\n 521, 411, 603, 329, 603, 549, 549, 576, 521, 549, 549, 521, 549, 603,\n 439, 576, 713, 686, 493, 686, 494, 480, 200, 480, 549, 750, 620, 247,\n 549, 167, 713, 500, 753, 753, 753, 753, 1042, 987, 603, 987, 603, 400,\n 549, 411, 549, 549, 713, 494, 460, 549, 549, 549, 549, 1000, 603, 1000,\n 658, 823, 686, 795, 987, 768, 768, 823, 768, 768, 713, 713, 713, 713,\n 713, 713, 713, 768, 713, 790, 790, 890, 823, 549, 250, 713, 603, 603,\n 1042, 987, 603, 987, 603, 494, 329, 790, 790, 786, 713, 384, 384, 384,\n 384, 384, 384, 494, 494, 494, 494, 329, 274, 686, 686, 686, 384, 384,\n 384, 384, 384, 384, 494, 494, 494, -1\n ];\n /**\n * `Zip dingbats` widths table.\n * @private\n */\n PdfStandardFontMetricsFactory.zapfDingbatsWidth = [\n 278, 974, 961, 974, 980, 719, 789, 790, 791, 690, 960, 939, 549, 855,\n 911, 933, 911, 945, 974, 755, 846, 762, 761, 571, 677, 763, 760, 759,\n 754, 494, 552, 537, 577, 692, 786, 788, 788, 790, 793, 794, 816, 823,\n 789, 841, 823, 833, 816, 831, 923, 744, 723, 749, 790, 792, 695, 776,\n 768, 792, 759, 707, 708, 682, 701, 826, 815, 789, 789, 707, 687, 696,\n 689, 786, 787, 713, 791, 785, 791, 873, 761, 762, 762, 759, 759, 892,\n 892, 788, 784, 438, 138, 277, 415, 392, 392, 668, 668, 390, 390, 317,\n 317, 276, 276, 509, 509, 410, 410, 234, 234, 334, 334, 732, 544, 544,\n 910, 667, 760, 760, 776, 595, 694, 626, 788, 788, 788, 788, 788, 788,\n 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788,\n 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788,\n 788, 788, 788, 788, 788, 788, 894, 838, 1016, 458, 748, 924, 748, 918,\n 927, 928, 928, 834, 873, 828, 924, 924, 917, 930, 931, 463, 883, 836,\n 836, 867, 867, 696, 696, 874, 874, 760, 946, 771, 865, 771, 888, 967,\n 888, 831, 873, 927, 970, 918\n ];\n return PdfStandardFontMetricsFactory;\n}());\nexport { PdfStandardFontMetricsFactory };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfFontFamily, PdfFontStyle, FontEncoding } from './enum';\nimport { PdfFont } from './pdf-font';\nimport { PdfDocument } from './../../document/pdf-document';\nimport { PdfStandardFontMetricsFactory } from './pdf-standard-font-metrics-factory';\nimport { PdfDictionary } from './../../primitives/pdf-dictionary';\nimport { DictionaryProperties } from './../../input-output/pdf-dictionary-properties';\nimport { PdfName } from './../../primitives/pdf-name';\n/**\n * Represents one of the 14 standard fonts.\n * It's used to create a standard PDF font to draw the text in to the PDF.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a new page to the document\n * let page1 : PdfPage = document.pages.add();\n * //\n * // create new standard font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * //\n * // create black brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\nvar PdfStandardFont = /** @class */ (function (_super) {\n __extends(PdfStandardFont, _super);\n function PdfStandardFont(fontFamilyPrototype, size, style) {\n var _this = _super.call(this, size, (typeof style === 'undefined') ? ((fontFamilyPrototype instanceof PdfStandardFont) ? fontFamilyPrototype.style : PdfFontStyle.Regular) : style) || this;\n /**\n * Gets `ascent` of the font.\n * @private\n */\n _this.dictionaryProperties = new DictionaryProperties();\n /**\n * Gets `encodings` for internal class use.\n * @hidden\n * @private\n */\n _this.encodings = ['Unknown', 'StandardEncoding', 'MacRomanEncoding', 'MacExpertEncoding',\n 'WinAnsiEncoding', 'PDFDocEncoding', 'IdentityH'];\n if (typeof fontFamilyPrototype === 'undefined') {\n _this.pdfFontFamily = PdfFontFamily.Helvetica;\n }\n else if ((fontFamilyPrototype instanceof PdfStandardFont)) {\n _this.pdfFontFamily = fontFamilyPrototype.fontFamily;\n }\n else {\n _this.pdfFontFamily = fontFamilyPrototype;\n }\n _this.checkStyle();\n _this.initializeInternals();\n return _this;\n }\n Object.defineProperty(PdfStandardFont.prototype, \"fontFamily\", {\n /* tslint:enable */\n //Properties\n /**\n * Gets the `FontFamily`.\n * @private\n */\n get: function () {\n return this.pdfFontFamily;\n },\n enumerable: true,\n configurable: true\n });\n //methods\n /**\n * Checks font `style` of the font.\n * @private\n */\n PdfStandardFont.prototype.checkStyle = function () {\n if (this.fontFamily === PdfFontFamily.Symbol || this.fontFamily === PdfFontFamily.ZapfDingbats) {\n var style = this.style;\n style &= ~(PdfFontStyle.Bold | PdfFontStyle.Italic);\n this.setStyle(style);\n }\n };\n /**\n * Returns `width` of the line.\n * @public\n */\n PdfStandardFont.prototype.getLineWidth = function (line, format) {\n if (line == null) {\n throw new Error('ArgumentNullException:line');\n }\n var width = 0;\n var name = this.name;\n line = PdfStandardFont.convert(line);\n for (var i = 0, len = line.length; i < len; i++) {\n var ch = line[i];\n var charWidth = this.getCharWidthInternal(ch, format);\n width += charWidth;\n }\n var size = this.metrics.getSize(format);\n width *= (PdfFont.charSizeMultiplier * size);\n width = this.applyFormatSettings(line, format, width);\n return width;\n };\n /**\n * Checks whether fonts are `equals`.\n * @private\n */\n PdfStandardFont.prototype.equalsToFont = function (font) {\n var equal = false;\n var stFont = font;\n if (stFont != null) {\n var fontFamilyEqual = (this.fontFamily === stFont.fontFamily);\n var lineReducer = (~(PdfFontStyle.Underline | PdfFontStyle.Strikeout));\n var styleEqual = (this.style & lineReducer) === (stFont.style & lineReducer);\n equal = (fontFamilyEqual && styleEqual);\n }\n return equal;\n };\n /**\n * `Initializes` font internals..\n * @private\n */\n PdfStandardFont.prototype.initializeInternals = function () {\n var equalFont = null;\n // if (PdfDocument.EnableCache) {\n equalFont = PdfDocument.cache.search(this);\n // }\n var internals = null;\n // if (equalFont == null) {\n // Create font metrics.\n var metrics = PdfStandardFontMetricsFactory.getMetrics(this.pdfFontFamily, this.style, this.size);\n this.metrics = metrics;\n internals = this.createInternals();\n this.setInternals(internals);\n };\n /**\n * `Creates` font`s dictionary.\n * @private\n */\n PdfStandardFont.prototype.createInternals = function () {\n var dictionary = new PdfDictionary();\n dictionary.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.font));\n dictionary.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.type1));\n dictionary.items.setValue(this.dictionaryProperties.baseFont, new PdfName(this.metrics.postScriptName));\n if (this.fontFamily !== PdfFontFamily.Symbol && this.fontFamily !== PdfFontFamily.ZapfDingbats) {\n var encoding = this.encodings[FontEncoding.WinAnsiEncoding];\n dictionary.items.setValue(this.dictionaryProperties.encoding, new PdfName(encoding));\n }\n return dictionary;\n };\n /**\n * Returns `width` of the char. This methods doesn`t takes into consideration font`s size.\n * @private\n */\n PdfStandardFont.prototype.getCharWidthInternal = function (charCode, format) {\n var width = 0;\n var code = 0;\n code = charCode.charCodeAt(0);\n if (this.name === '0' || this.name === '1' || this.name === '2' ||\n this.name === '3' || this.name === '4') {\n code = code - PdfStandardFont.charOffset;\n }\n code = (code >= 0 && code !== 128) ? code : 0;\n var metrics = this.metrics;\n var widthTable = metrics.widthTable;\n width = widthTable.items(code);\n return width;\n };\n /**\n * `Converts` the specified text.\n * @private\n */\n PdfStandardFont.convert = function (text) {\n return text;\n };\n //Constants\n /**\n * First character `position`.\n * @private\n */\n PdfStandardFont.charOffset = 32;\n return PdfStandardFont;\n}(PdfFont));\nexport { PdfStandardFont };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfWriter } from './../input-output/pdf-writer';\nimport { PdfMainObjectCollection } from './../input-output/pdf-main-object-collection';\nimport { PdfDocumentBase } from './pdf-document-base';\nimport { PdfCrossTable } from './../input-output/pdf-cross-table';\nimport { PdfCatalog } from './pdf-catalog';\nimport { PdfPageSettings } from './../pages/pdf-page-settings';\nimport { PdfSectionCollection } from './../pages/pdf-section-collection';\nimport { PdfDocumentPageCollection } from './../pages/pdf-document-page-collection';\nimport { PdfCacheCollection } from './../general/pdf-cache-collection';\nimport { PdfColorSpace } from './../graphics/enum';\nimport { PdfDocumentTemplate } from './pdf-document-template';\nimport { PdfFontFamily } from './../graphics/fonts/enum';\nimport { PdfStandardFont } from './../graphics/fonts/pdf-standard-font';\n/**\n * Represents a PDF document and can be used to create a new PDF document from the scratch.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a new page to the document\n * let page1 : PdfPage = document.pages.add();\n * // set the font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // create black brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\nvar PdfDocument = /** @class */ (function (_super) {\n __extends(PdfDocument, _super);\n function PdfDocument(isMerging) {\n var _this = _super.call(this) || this;\n /**\n * Default `margin` value.\n * @default 40.0\n * @private\n */\n _this.defaultMargin = 40.0;\n /**\n * Internal variable to store instance of `StreamWriter` classes..\n * @default null\n * @private\n */\n _this.streamWriter = null;\n _this.document = _this;\n var isMerge = false;\n if (typeof isMerging === 'undefined') {\n PdfDocument.cacheCollection = new PdfCacheCollection();\n isMerge = false;\n }\n else {\n isMerge = isMerging;\n }\n var objects = new PdfMainObjectCollection();\n _this.setMainObjectCollection(objects);\n var crossTable = new PdfCrossTable();\n crossTable.isMerging = isMerge;\n crossTable.document = _this;\n _this.setCrossTable(crossTable);\n var catalog = new PdfCatalog();\n _this.setCatalog(catalog);\n objects.add(catalog);\n catalog.position = -1;\n _this.sectionCollection = new PdfSectionCollection(_this);\n _this.documentPageCollection = new PdfDocumentPageCollection(_this);\n catalog.pages = _this.sectionCollection;\n return _this;\n }\n Object.defineProperty(PdfDocument, \"defaultFont\", {\n //Properties\n /**\n * Gets the `default font`. It is used for complex objects when font is not explicitly defined.\n * @private\n */\n get: function () {\n if (this.defaultStandardFont == null) {\n this.defaultStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 8);\n }\n return this.defaultStandardFont;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocument.prototype, \"sections\", {\n /**\n * Gets the collection of the `sections` in the document.\n * @private\n */\n get: function () {\n return this.sectionCollection;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocument.prototype, \"pageSettings\", {\n /**\n * Gets the document's page setting.\n * @public\n */\n get: function () {\n if (this.settings == null) {\n this.settings = new PdfPageSettings(this.defaultMargin);\n }\n return this.settings;\n },\n /**\n * Sets the document's page setting.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n *\n * // sets the right margin of the page\n * document.pageSettings.margins.right = 0;\n * // set the page size.\n * document.pageSettings.size = new SizeF(500, 500);\n * // change the page orientation to landscape\n * document.pageSettings.orientation = PdfPageOrientation.Landscape;\n * // apply 90 degree rotation on the page\n * document.pageSettings.rotate = PdfPageRotateAngle.RotateAngle90;\n *\n * // add a pages to the document\n * let page1 : PdfPage = document.pages.add();\n * // set font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // set brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // set the specified Point\n * let point : PointF = new PointF(page1.getClientSize().width - 200, page1.getClientSize().height - 200);\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, point);\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n set: function (value) {\n this.settings = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocument.prototype, \"pages\", {\n /**\n * Represents the collection of pages in the PDF document.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * //\n * // get the collection of pages in the document\n * let pageCollection : PdfDocumentPageCollection = document.pages;\n * //\n * // add pages\n * let page1 : PdfPage = pageCollection.add();\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n return this.documentPageCollection;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocument, \"cache\", {\n /**\n * Gets collection of the `cached objects`.\n * @private\n */\n get: function () {\n if (typeof PdfDocument.cacheCollection === 'undefined' || PdfDocument.cacheCollection == null) {\n return new PdfCacheCollection();\n }\n return PdfDocument.cacheCollection;\n },\n /**\n * Sets collection of the `cached objects`.\n * @private\n */\n set: function (value) {\n this.cacheCollection = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocument, \"enableCache\", {\n /**\n * Gets the value of enable cache.\n * @private\n */\n get: function () {\n return this.isCacheEnabled;\n },\n /**\n * Sets thie value of enable cache.\n * @private\n */\n set: function (value) {\n this.isCacheEnabled = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocument.prototype, \"colorSpace\", {\n /* tslint:disable */\n /**\n * Gets or sets the `color space` of the document. This property can be used to create PDF document in RGB, Gray scale or CMYK color spaces.\n * @private\n */\n get: function () {\n if ((this.pdfColorSpace === PdfColorSpace.Rgb) || ((this.pdfColorSpace === PdfColorSpace.Cmyk)\n || (this.pdfColorSpace === PdfColorSpace.GrayScale))) {\n return this.pdfColorSpace;\n }\n else {\n return PdfColorSpace.Rgb;\n }\n },\n set: function (value) {\n if ((value === PdfColorSpace.Rgb) || ((value === PdfColorSpace.Cmyk) ||\n (value === PdfColorSpace.GrayScale))) {\n this.pdfColorSpace = value;\n }\n else {\n this.pdfColorSpace = PdfColorSpace.Rgb;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfDocument.prototype, \"template\", {\n /* tslint:enable */\n /**\n * Gets or sets a `template` to all pages in the document.\n * @private\n */\n get: function () {\n if (this.pageTemplate == null) {\n this.pageTemplate = new PdfDocumentTemplate();\n }\n return this.pageTemplate;\n },\n set: function (value) {\n this.pageTemplate = value;\n },\n enumerable: true,\n configurable: true\n });\n PdfDocument.prototype.docSave = function (stream, arg2, arg3) {\n this.checkPagesPresence();\n if (stream === null) {\n throw new Error('ArgumentNullException : stream');\n }\n this.streamWriter = stream;\n var writer = new PdfWriter(stream);\n writer.document = this;\n if (typeof arg2 === 'boolean' && typeof arg3 === 'undefined') {\n return this.crossTable.save(writer);\n }\n else {\n this.crossTable.save(writer, arg2);\n }\n };\n /**\n * Checks the pages `presence`.\n * @private\n */\n PdfDocument.prototype.checkPagesPresence = function () {\n if (this.pages.count === 0) {\n this.pages.add();\n }\n };\n /**\n * disposes the current instance of `PdfDocument` class.\n * ```typescript\n * // create a new PDF document\n * let document : PdfDocument = new PdfDocument();\n * // add a new page to the document\n * let page1 : PdfPage = document.pages.add();\n * // set the font\n * let font : PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 20);\n * // create black brush\n * let blackBrush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n * // draw the text\n * page1.graphics.drawString('Hello World', font, blackBrush, new PointF(0, 0));\n * // save the document\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n PdfDocument.prototype.destroy = function () {\n this.catalog = undefined;\n this.colorSpace = undefined;\n this.currentSavingObj = undefined;\n this.documentPageCollection = undefined;\n this.isStreamCopied = undefined;\n this.pageSettings = undefined;\n this.pageTemplate = undefined;\n this.pdfColorSpace = undefined;\n this.sectionCollection = undefined;\n PdfDocument.cache.destroy();\n this.crossTable.pdfObjects.destroy();\n PdfDocument.cache = undefined;\n this.streamWriter.destroy();\n };\n /**\n * `Font` used in complex objects to draw strings and text when it is not defined explicitly.\n * @default null\n * @private\n */\n PdfDocument.defaultStandardFont = null;\n /**\n * Indicates whether enable cache or not\n * @default true\n * @private\n */\n PdfDocument.isCacheEnabled = true;\n return PdfDocument;\n}(PdfDocumentBase));\nexport { PdfDocument };\n","/**\n * PdfBorders.ts class for EJ2-PDF\n */\nimport { PdfPen } from './../../../graphics/pdf-pen';\nimport { PdfDashStyle } from './../../../graphics/enum';\nimport { PdfColor } from './../../../graphics/pdf-color';\n/**\n * `PdfBorders` class used represents the cell border of the PDF grid.\n */\nvar PdfBorders = /** @class */ (function () {\n // Constructor\n /**\n * Create a new instance for `PdfBorders` class.\n * @private\n */\n function PdfBorders() {\n var defaultBorderPenLeft = new PdfPen(new PdfColor(0, 0, 0));\n defaultBorderPenLeft.dashStyle = PdfDashStyle.Solid;\n var defaultBorderPenRight = new PdfPen(new PdfColor(0, 0, 0));\n defaultBorderPenRight.dashStyle = PdfDashStyle.Solid;\n var defaultBorderPenTop = new PdfPen(new PdfColor(0, 0, 0));\n defaultBorderPenTop.dashStyle = PdfDashStyle.Solid;\n var defaultBorderPenBottom = new PdfPen(new PdfColor(0, 0, 0));\n defaultBorderPenBottom.dashStyle = PdfDashStyle.Solid;\n this.leftPen = defaultBorderPenLeft;\n this.rightPen = defaultBorderPenRight;\n this.topPen = defaultBorderPenTop;\n this.bottomPen = defaultBorderPenBottom;\n }\n Object.defineProperty(PdfBorders.prototype, \"left\", {\n // Properties\n /**\n * Gets or sets the `Left`.\n * @private\n */\n get: function () {\n return this.leftPen;\n },\n set: function (value) {\n this.leftPen = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBorders.prototype, \"right\", {\n /**\n * Gets or sets the `Right`.\n * @private\n */\n get: function () {\n return this.rightPen;\n },\n set: function (value) {\n this.rightPen = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBorders.prototype, \"top\", {\n /**\n * Gets or sets the `Top`.\n * @private\n */\n get: function () {\n return this.topPen;\n },\n set: function (value) {\n this.topPen = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBorders.prototype, \"bottom\", {\n /**\n * Gets or sets the `Bottom`.\n * @private\n */\n get: function () {\n return this.bottomPen;\n },\n set: function (value) {\n this.bottomPen = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBorders.prototype, \"all\", {\n /**\n * sets the `All`.\n * @private\n */\n set: function (value) {\n this.leftPen = this.rightPen = this.topPen = this.bottomPen = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBorders.prototype, \"isAll\", {\n /**\n * Gets a value indicating whether this instance `is all`.\n * @private\n */\n get: function () {\n return ((this.leftPen === this.rightPen) && (this.leftPen === this.topPen) && (this.leftPen === this.bottomPen));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfBorders, \"default\", {\n /**\n * Gets the `default`.\n * @private\n */\n get: function () {\n return new PdfBorders();\n },\n enumerable: true,\n configurable: true\n });\n return PdfBorders;\n}());\nexport { PdfBorders };\nvar PdfPaddings = /** @class */ (function () {\n function PdfPaddings(left, right, top, bottom) {\n /**\n * The 'left' border padding set.\n * @private\n */\n this.hasLeftPad = false;\n /**\n * The 'right' border padding set.\n * @private\n */\n this.hasRightPad = false;\n /**\n * The 'top' border padding set.\n * @private\n */\n this.hasTopPad = false;\n /**\n * The 'bottom' border padding set.\n * @private\n */\n this.hasBottomPad = false;\n if (typeof left === 'undefined') {\n //5.76 and 0 are taken from ms-word default table margins.\n this.leftPad = this.rightPad = 5.76;\n //0.5 is set for top and bottom by default.\n this.bottomPad = this.topPad = 0.5;\n }\n else {\n this.leftPad = left;\n this.rightPad = right;\n this.topPad = top;\n this.bottomPad = bottom;\n this.hasLeftPad = true;\n this.hasRightPad = true;\n this.hasTopPad = true;\n this.hasBottomPad = true;\n }\n }\n Object.defineProperty(PdfPaddings.prototype, \"left\", {\n // Properties\n /**\n * Gets or sets the `left` value of the edge\n * @private\n */\n get: function () {\n return this.leftPad;\n },\n set: function (value) {\n this.leftPad = value;\n this.hasLeftPad = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPaddings.prototype, \"right\", {\n /**\n * Gets or sets the `right` value of the edge.\n * @private\n */\n get: function () {\n return this.rightPad;\n },\n set: function (value) {\n this.rightPad = value;\n this.hasRightPad = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPaddings.prototype, \"top\", {\n /**\n * Gets or sets the `top` value of the edge\n * @private\n */\n get: function () {\n return this.topPad;\n },\n set: function (value) {\n this.topPad = value;\n this.hasTopPad = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPaddings.prototype, \"bottom\", {\n /**\n * Gets or sets the `bottom` value of the edge.\n * @private\n */\n get: function () {\n return this.bottomPad;\n },\n set: function (value) {\n this.bottomPad = value;\n this.hasBottomPad = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPaddings.prototype, \"all\", {\n /**\n * Sets value to all sides `left,right,top and bottom`.s\n * @private\n */\n set: function (value) {\n this.leftPad = this.rightPad = this.topPad = this.bottomPad = value;\n this.hasLeftPad = true;\n this.hasRightPad = true;\n this.hasTopPad = true;\n this.hasBottomPad = true;\n },\n enumerable: true,\n configurable: true\n });\n return PdfPaddings;\n}());\nexport { PdfPaddings };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfBorders, PdfPaddings } from './pdf-borders';\nimport { PdfBorderOverlapStyle } from './../../tables/light-tables/enum';\n/**\n * Base class for the `grid style`,\n */\nvar PdfGridStyleBase = /** @class */ (function () {\n function PdfGridStyleBase() {\n }\n Object.defineProperty(PdfGridStyleBase.prototype, \"backgroundBrush\", {\n // Properties\n /**\n * Gets or sets the `background brush`.\n * @private\n */\n get: function () {\n return this.gridBackgroundBrush;\n },\n set: function (value) {\n this.gridBackgroundBrush = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridStyleBase.prototype, \"textBrush\", {\n /**\n * Gets or sets the `text brush`.\n * @private\n */\n get: function () {\n return this.gridTextBrush;\n },\n set: function (value) {\n this.gridTextBrush = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridStyleBase.prototype, \"textPen\", {\n /**\n * Gets or sets the `text pen`.\n * @private\n */\n get: function () {\n return this.gridTextPen;\n },\n set: function (value) {\n this.gridTextPen = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridStyleBase.prototype, \"font\", {\n /**\n * Gets or sets the `font`.\n * @private\n */\n get: function () {\n return this.gridFont;\n },\n set: function (value) {\n this.gridFont = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridStyleBase.prototype, \"backgroundImage\", {\n /**\n * Gets or sets the `background Image`.\n * @private\n */\n get: function () {\n return this.gridBackgroundImage;\n },\n set: function (value) {\n this.gridBackgroundImage = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGridStyleBase;\n}());\nexport { PdfGridStyleBase };\n/**\n * `PdfGridStyle` class provides customization of the appearance for the 'PdfGrid'.\n */\nvar PdfGridStyle = /** @class */ (function (_super) {\n __extends(PdfGridStyle, _super);\n //constructor\n /**\n * Initialize a new instance for `PdfGridStyle` class.\n * @private\n */\n function PdfGridStyle() {\n var _this = _super.call(this) || this;\n _this.gridBorderOverlapStyle = PdfBorderOverlapStyle.Overlap;\n _this.bAllowHorizontalOverflow = false;\n _this.gridHorizontalOverflowType = PdfHorizontalOverflowType.LastPage;\n return _this;\n }\n Object.defineProperty(PdfGridStyle.prototype, \"cellSpacing\", {\n //Properties\n /**\n * Gets or sets the `cell spacing` of the 'PdfGrid'.\n * @private\n */\n get: function () {\n if (typeof this.gridCellSpacing === 'undefined') {\n this.gridCellSpacing = 0;\n }\n return this.gridCellSpacing;\n },\n set: function (value) {\n this.gridCellSpacing = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridStyle.prototype, \"horizontalOverflowType\", {\n /**\n * Gets or sets the type of the `horizontal overflow` of the 'PdfGrid'.\n * @private\n */\n get: function () {\n return this.gridHorizontalOverflowType;\n },\n set: function (value) {\n this.gridHorizontalOverflowType = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridStyle.prototype, \"allowHorizontalOverflow\", {\n /**\n * Gets or sets a value indicating whether to `allow horizontal overflow`.\n * @private\n */\n get: function () {\n return this.bAllowHorizontalOverflow;\n },\n set: function (value) {\n this.bAllowHorizontalOverflow = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridStyle.prototype, \"cellPadding\", {\n /**\n * Gets or sets the `cell padding`.\n * @private\n */\n get: function () {\n if (typeof this.gridCellPadding === 'undefined') {\n this.gridCellPadding = new PdfPaddings();\n }\n return this.gridCellPadding;\n },\n set: function (value) {\n if (typeof this.gridCellPadding === 'undefined') {\n this.gridCellPadding = new PdfPaddings();\n this.gridCellPadding = value;\n }\n else {\n this.gridCellPadding = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridStyle.prototype, \"borderOverlapStyle\", {\n /**\n * Gets or sets the `border overlap style` of the 'PdfGrid'.\n * @private\n */\n get: function () {\n return this.gridBorderOverlapStyle;\n },\n set: function (value) {\n this.gridBorderOverlapStyle = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGridStyle;\n}(PdfGridStyleBase));\nexport { PdfGridStyle };\n/**\n * `PdfGridCellStyle` class provides customization of the appearance for the 'PdfGridCell'.\n */\nvar PdfGridCellStyle = /** @class */ (function (_super) {\n __extends(PdfGridCellStyle, _super);\n /**\n * Initializes a new instance of the `PdfGridCellStyle` class.\n * @private\n */\n function PdfGridCellStyle() {\n var _this = _super.call(this) || this;\n /**\n * @hidden\n * @private\n */\n _this.gridCellBorders = PdfBorders.default;\n return _this;\n }\n Object.defineProperty(PdfGridCellStyle.prototype, \"stringFormat\", {\n //Properties\n /**\n * Gets the `string format` of the 'PdfGridCell'.\n * @private\n */\n get: function () {\n return this.format;\n },\n set: function (value) {\n this.format = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCellStyle.prototype, \"borders\", {\n /**\n * Gets or sets the `border` of the 'PdfGridCell'.\n * @private\n */\n get: function () {\n return this.gridCellBorders;\n },\n set: function (value) {\n this.gridCellBorders = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCellStyle.prototype, \"cellPadding\", {\n /**\n * Gets or sets the `cell padding`.\n * @private\n */\n get: function () {\n return this.gridCellPadding;\n },\n set: function (value) {\n if (this.gridCellPadding == null || typeof this.gridCellPadding === 'undefined') {\n this.gridCellPadding = new PdfPaddings();\n }\n this.gridCellPadding = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGridCellStyle;\n}(PdfGridStyleBase));\nexport { PdfGridCellStyle };\n/**\n * `PdfGridRowStyle` class provides customization of the appearance for the `PdfGridRow`.\n */\nvar PdfGridRowStyle = /** @class */ (function () {\n // public setBackgroundImage(value : PdfImage) : void {\n // this.gridRowBackgroundImage = value;\n // if (typeof this.parent !== 'undefined') {\n // for (let i : number = 0; i < this.parent.cells.count; i++) {\n // this.parent.cells.getCell(i).style.backgroundImage = value;\n // }\n // }\n // }\n // Constructor\n /**\n * Initializes a new instance of the `PdfGridRowStyle` class.\n * @private\n */\n function PdfGridRowStyle() {\n //\n }\n Object.defineProperty(PdfGridRowStyle.prototype, \"backgroundBrush\", {\n // Properties\n /**\n * Gets or sets the `background brush`.\n * @private\n */\n get: function () {\n return this.gridRowBackgroundBrush;\n },\n enumerable: true,\n configurable: true\n });\n PdfGridRowStyle.prototype.setBackgroundBrush = function (value) {\n this.gridRowBackgroundBrush = value;\n if (typeof this.parent !== 'undefined') {\n for (var i = 0; i < this.parent.cells.count; i++) {\n this.parent.cells.getCell(i).style.backgroundBrush = value;\n }\n }\n };\n Object.defineProperty(PdfGridRowStyle.prototype, \"textBrush\", {\n /**\n * Gets or sets the `text brush`.\n * @private\n */\n get: function () {\n return this.gridRowTextBrush;\n },\n enumerable: true,\n configurable: true\n });\n PdfGridRowStyle.prototype.setTextBrush = function (value) {\n this.gridRowTextBrush = value;\n if (typeof this.parent !== 'undefined') {\n for (var i = 0; i < this.parent.cells.count; i++) {\n this.parent.cells.getCell(i).style.textBrush = value;\n }\n }\n };\n Object.defineProperty(PdfGridRowStyle.prototype, \"textPen\", {\n /**\n * Gets or sets the `text pen`.\n * @private\n */\n get: function () {\n return this.gridRowTextPen;\n },\n enumerable: true,\n configurable: true\n });\n PdfGridRowStyle.prototype.setTextPen = function (value) {\n this.gridRowTextPen = value;\n if (typeof this.parent !== 'undefined') {\n for (var i = 0; i < this.parent.cells.count; i++) {\n this.parent.cells.getCell(i).style.textPen = value;\n }\n }\n };\n Object.defineProperty(PdfGridRowStyle.prototype, \"font\", {\n /**\n * Gets or sets the `font`.\n * @private\n */\n get: function () {\n return this.gridRowFont;\n },\n enumerable: true,\n configurable: true\n });\n PdfGridRowStyle.prototype.setFont = function (value) {\n this.gridRowFont = value;\n if (typeof this.parent !== 'undefined') {\n for (var i = 0; i < this.parent.cells.count; i++) {\n this.parent.cells.getCell(i).style.font = value;\n }\n }\n };\n Object.defineProperty(PdfGridRowStyle.prototype, \"border\", {\n /**\n * Gets or sets the `border` of the current row.\n * @private\n */\n get: function () {\n if (typeof this.gridRowBorder === 'undefined') {\n this.setBorder(new PdfBorders());\n }\n return this.gridRowBorder;\n },\n enumerable: true,\n configurable: true\n });\n PdfGridRowStyle.prototype.setBorder = function (value) {\n this.gridRowBorder = value;\n if (typeof this.parent !== 'undefined') {\n for (var i = 0; i < this.parent.cells.count; i++) {\n this.parent.cells.getCell(i).style.borders = value;\n }\n }\n };\n /**\n * sets the `parent row` of the current object.\n * @private\n */\n PdfGridRowStyle.prototype.setParent = function (parent) {\n this.parent = parent;\n };\n Object.defineProperty(PdfGridRowStyle.prototype, \"backgroundImage\", {\n /**\n * Gets or sets the `backgroundImage` of the 'PdfGridCell'.\n * @private\n */\n get: function () {\n return this.gridRowBackgroundImage;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGridRowStyle;\n}());\nexport { PdfGridRowStyle };\n/**\n * public Enum for `PdfHorizontalOverflowType`.\n * @private\n */\nexport var PdfHorizontalOverflowType;\n(function (PdfHorizontalOverflowType) {\n /**\n * Specifies the type of `NextPage`.\n * @private\n */\n PdfHorizontalOverflowType[PdfHorizontalOverflowType[\"NextPage\"] = 0] = \"NextPage\";\n /**\n * Specifies the type of `LastPage`.\n * @private\n */\n PdfHorizontalOverflowType[PdfHorizontalOverflowType[\"LastPage\"] = 1] = \"LastPage\";\n})(PdfHorizontalOverflowType || (PdfHorizontalOverflowType = {}));\n","/**\n * ElementLayouter.ts class for EJ2-PDF\n */\nimport { RectangleF } from './../../../drawing/pdf-drawing';\n/**\n * Base class for `elements lay outing`.\n * @private\n */\nvar ElementLayouter = /** @class */ (function () {\n // Constructor\n /**\n * Initializes a new instance of the `ElementLayouter` class.\n * @private\n */\n function ElementLayouter(element) {\n this.layoutElement = element;\n }\n Object.defineProperty(ElementLayouter.prototype, \"elements\", {\n // Properties\n /**\n * Gets the `element`.\n * @private\n */\n get: function () {\n return this.layoutElement;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the `element`.\n * @private\n */\n ElementLayouter.prototype.getElement = function () {\n return this.layoutElement;\n };\n // Implementation\n /**\n * `Layouts` the element.\n * @private\n */\n ElementLayouter.prototype.layout = function (param) {\n return this.layoutInternal(param);\n };\n ElementLayouter.prototype.Layouter = function (param) {\n return this.layoutInternal(param);\n };\n /**\n * Returns the `next page`.\n * @private\n */\n ElementLayouter.prototype.getNextPage = function (currentPage) {\n var section = currentPage.section;\n var nextPage = section.add();\n return nextPage;\n };\n ElementLayouter.prototype.getPaginateBounds = function (param) {\n if ((param == null)) {\n throw new Error('ArgumentNullException : param');\n }\n var result = param.format.usePaginateBounds ? param.format.paginateBounds\n : new RectangleF(param.bounds.x, 0, param.bounds.width, param.bounds.height);\n return result;\n };\n return ElementLayouter;\n}());\nexport { ElementLayouter };\nvar PdfLayoutFormat = /** @class */ (function () {\n function PdfLayoutFormat(baseFormat) {\n if (typeof baseFormat === 'undefined') {\n //\n }\n else {\n this.break = baseFormat.break;\n this.layout = baseFormat.layout;\n this.paginateBounds = baseFormat.paginateBounds;\n this.boundsSet = baseFormat.usePaginateBounds;\n }\n }\n Object.defineProperty(PdfLayoutFormat.prototype, \"layout\", {\n // Properties\n /**\n * Gets or sets `layout` type of the element.\n * @private\n */\n get: function () {\n // if (typeof this.layoutType === 'undefined' || this.layoutType == null) {\n // this.layoutType = PdfLayoutType.Paginate;\n // }\n return this.layoutType;\n },\n set: function (value) {\n this.layoutType = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfLayoutFormat.prototype, \"break\", {\n /**\n * Gets or sets `break` type of the element.\n * @private\n */\n get: function () {\n // if (typeof this.breakType === 'undefined' || this.boundsSet == null) {\n // this.breakType = PdfLayoutBreakType.FitPage;\n // }\n return this.breakType;\n },\n set: function (value) {\n this.breakType = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfLayoutFormat.prototype, \"paginateBounds\", {\n /**\n * Gets or sets the `bounds` on the next page.\n * @private\n */\n get: function () {\n if (typeof this.layoutPaginateBounds === 'undefined' && this.layoutPaginateBounds == null) {\n this.layoutPaginateBounds = new RectangleF(0, 0, 0, 0);\n }\n return this.layoutPaginateBounds;\n },\n set: function (value) {\n this.layoutPaginateBounds = value;\n this.boundsSet = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfLayoutFormat.prototype, \"usePaginateBounds\", {\n /**\n * Gets a value indicating whether [`use paginate bounds`].\n * @private\n */\n get: function () {\n // if (typeof this.boundsSet === 'undefined' || this.boundsSet == null) {\n // this.boundsSet = false;\n // }\n return this.boundsSet;\n },\n enumerable: true,\n configurable: true\n });\n return PdfLayoutFormat;\n}());\nexport { PdfLayoutFormat };\nvar PdfLayoutParams = /** @class */ (function () {\n function PdfLayoutParams() {\n }\n Object.defineProperty(PdfLayoutParams.prototype, \"page\", {\n // Properties\n /**\n * Gets or sets the layout `page` for the element.\n * @private\n */\n get: function () {\n return this.pdfPage;\n },\n set: function (value) {\n this.pdfPage = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfLayoutParams.prototype, \"bounds\", {\n /**\n * Gets or sets layout `bounds` for the element.\n * @private\n */\n get: function () {\n return new RectangleF(this.layoutBounds.x, this.layoutBounds.y, this.layoutBounds.width, this.layoutBounds.height);\n },\n set: function (value) {\n this.layoutBounds = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfLayoutParams.prototype, \"format\", {\n /**\n * Gets or sets `layout settings` for the element.\n * @private\n */\n get: function () {\n return this.layoutFormat;\n },\n set: function (value) {\n this.layoutFormat = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfLayoutParams;\n}());\nexport { PdfLayoutParams };\nvar PdfLayoutResult = /** @class */ (function () {\n // Constructors\n /**\n * Initializes the new instance of `PdfLayoutResult` class.\n * @private\n */\n function PdfLayoutResult(page, bounds) {\n this.pdfPage = page;\n this.layoutBounds = bounds;\n }\n Object.defineProperty(PdfLayoutResult.prototype, \"page\", {\n // Properties\n /**\n * Gets the last `page` where the element was drawn.\n * @private\n */\n get: function () {\n return this.pdfPage;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfLayoutResult.prototype, \"bounds\", {\n /**\n * Gets the `bounds` of the element on the last page where it was drawn.\n * @private\n */\n get: function () {\n return this.layoutBounds;\n },\n enumerable: true,\n configurable: true\n });\n return PdfLayoutResult;\n}());\nexport { PdfLayoutResult };\n","import { RectangleF, PointF } from './../../drawing/pdf-drawing';\nimport { PdfLayoutParams, PdfLayoutFormat } from './base/element-layouter';\nimport { PdfBorders } from './../../structured-elements/grid/styles/pdf-borders';\n/**\n * `PdfLayoutElement` class represents the base class for all elements that can be layout on the pages.\n * @private\n */\nvar PdfLayoutElement = /** @class */ (function () {\n function PdfLayoutElement() {\n }\n Object.defineProperty(PdfLayoutElement.prototype, \"raiseBeginPageLayout\", {\n // Property\n /**\n * Gets a value indicating whether the `start page layout event` should be raised.\n * @private\n */\n get: function () {\n return (typeof this.beginPageLayout !== 'undefined');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfLayoutElement.prototype, \"raiseEndPageLayout\", {\n /**\n * Gets a value indicating whether the `ending page layout event` should be raised.\n * @private\n */\n get: function () {\n return (typeof this.endPageLayout !== 'undefined');\n },\n enumerable: true,\n configurable: true\n });\n //Event Handlers\n PdfLayoutElement.prototype.onBeginPageLayout = function (args) {\n if (this.beginPageLayout) {\n this.beginPageLayout(this, args);\n }\n };\n PdfLayoutElement.prototype.onEndPageLayout = function (args) {\n if (this.endPageLayout) {\n this.endPageLayout(this, args);\n }\n };\n PdfLayoutElement.prototype.drawHelper = function (arg2, arg3, arg4, arg5) {\n if (arg3 instanceof PointF && typeof arg3.width === 'undefined' && typeof arg4 === 'undefined') {\n return this.drawHelper(arg2, arg3.x, arg3.y);\n }\n else if (typeof arg3 === 'number' && typeof arg4 === 'number' && typeof arg5 === 'undefined') {\n return this.drawHelper(arg2, arg3, arg4, null);\n }\n else if (arg3 instanceof RectangleF && typeof arg3.width !== 'undefined' && typeof arg4 === 'undefined') {\n return this.drawHelper(arg2, arg3, null);\n }\n else if (arg3 instanceof PointF && typeof arg3.width === 'undefined' && arg4 instanceof PdfLayoutFormat) {\n return this.drawHelper(arg2, arg3.x, arg3.y, arg4);\n }\n else if (typeof arg3 === 'number' && typeof arg4 === 'number' && (arg5 instanceof PdfLayoutFormat || arg5 == null)) {\n var width = (arg2.graphics.clientSize.width - arg3);\n var layoutRectangle = new RectangleF(arg3, arg4, width, 0);\n return this.drawHelper(arg2, layoutRectangle, arg5);\n }\n else if (arg3 instanceof RectangleF && typeof arg3.width !== 'undefined' && typeof arg4 === 'boolean') {\n this.bEmbedFonts = arg4;\n return this.drawHelper(arg2, arg3, null);\n }\n else {\n var param = new PdfLayoutParams();\n var temparg3 = arg3;\n var temparg4 = arg4;\n param.page = arg2;\n param.bounds = temparg3;\n if (param != null) {\n var x = param.bounds.x;\n var y = param.bounds.y;\n if (param.bounds.x === 0) {\n x = PdfBorders.default.right.width / 2;\n }\n if (param.bounds.y === 0) {\n y = PdfBorders.default.top.width / 2;\n }\n var newBound = new RectangleF(x, y, param.bounds.width, param.bounds.height);\n param.bounds = newBound;\n }\n param.format = (temparg4 != null) ? temparg4 : new PdfLayoutFormat();\n var result = this.layout(param);\n return result;\n }\n };\n return PdfLayoutElement;\n}());\nexport { PdfLayoutElement };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * TextLayouter.ts class for EJ2-PDF\n */\nimport { ElementLayouter, PdfLayoutResult } from './element-layouter';\nimport { RectangleF, SizeF } from './../../../drawing/pdf-drawing';\nimport { PdfStringLayouter } from './../../fonts/string-layouter';\nimport { PdfLayoutBreakType } from './../../figures/enum';\nimport { PdfColor } from './../../pdf-color';\nimport { PdfTextWebLink } from './../../../annotations/pdf-text-web-link';\n/**\n * Class that `layouts the text`.\n * @private\n */\nvar TextLayouter = /** @class */ (function (_super) {\n __extends(TextLayouter, _super);\n // Constructors\n /**\n * Initializes a new instance of the `TextLayouter` class.\n * @private\n */\n function TextLayouter(element) {\n return _super.call(this, element) || this;\n }\n Object.defineProperty(TextLayouter.prototype, \"element\", {\n /**\n * Gets the layout `element`.\n * @private\n */\n get: function () {\n return _super.prototype.getElement.call(this);\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * `Layouts` the element.\n * @private\n */\n TextLayouter.prototype.layoutInternal = function (param) {\n /* tslint:disable */\n this.format = (this.element.stringFormat !== null && typeof this.element.stringFormat !== 'undefined') ? this.element.stringFormat : null;\n var currentPage = param.page;\n var currentBounds = param.bounds;\n var text = this.element.value;\n var result = null;\n var pageResult = new TextPageLayoutResult();\n pageResult.page = currentPage;\n pageResult.remainder = text;\n for (;;) {\n pageResult = this.layoutOnPage(text, currentPage, currentBounds, param);\n result = this.getLayoutResult(pageResult);\n break;\n }\n /* tslint:enable */\n return result;\n };\n /**\n * Raises `PageLayout` event if needed.\n * @private\n */\n TextLayouter.prototype.getLayoutResult = function (pageResult) {\n var result = new PdfTextLayoutResult(pageResult.page, pageResult.bounds, pageResult.remainder, pageResult.lastLineBounds);\n return result;\n };\n /* tslint:disable */\n /**\n * `Layouts` the text on the page.\n * @private\n */\n TextLayouter.prototype.layoutOnPage = function (text, currentPage, currentBounds, param) {\n var result = new TextPageLayoutResult();\n result.remainder = text;\n result.page = currentPage;\n currentBounds = this.checkCorrectBounds(currentPage, currentBounds);\n var layouter = new PdfStringLayouter();\n var stringResult = layouter.layout(text, this.element.font, this.format, currentBounds, currentPage.getClientSize().height, false, new SizeF(0, 0));\n var textFinished = (stringResult.remainder == null);\n var doesntFit = (param.format.break === PdfLayoutBreakType.FitElement);\n var canDraw = !(doesntFit || stringResult.empty);\n // Draw the text.\n var graphics = currentPage.graphics;\n var brush = this.element.getBrush();\n if (this.element instanceof PdfTextWebLink) {\n brush.color = new PdfColor(0, 0, 255);\n }\n graphics.drawStringLayoutResult(stringResult, this.element.font, this.element.pen, brush, currentBounds, this.format);\n var lineInfo = stringResult.lines[stringResult.lineCount - 1];\n result.lastLineBounds = graphics.getLineBounds(stringResult.lineCount - 1, stringResult, this.element.font, currentBounds, this.format);\n result.bounds = this.getTextPageBounds(currentPage, currentBounds, stringResult);\n result.remainder = stringResult.remainder;\n result.end = (textFinished);\n return result;\n };\n /* tslint:enable */\n /**\n * `Corrects current bounds` on the page.\n * @private\n */\n TextLayouter.prototype.checkCorrectBounds = function (currentPage, currentBounds) {\n var pageSize = currentPage.graphics.clientSize;\n currentBounds.height = (currentBounds.height > 0) ? currentBounds.height : pageSize.height - currentBounds.y;\n return currentBounds;\n };\n /**\n * Returns a `rectangle` where the text was printed on the page.\n * @private\n */\n /* tslint:disable */\n TextLayouter.prototype.getTextPageBounds = function (currentPage, currentBounds, stringResult) {\n var textSize = stringResult.actualSize;\n var x = currentBounds.x;\n var y = currentBounds.y;\n var width = (currentBounds.width > 0) ? currentBounds.width : textSize.width;\n var height = textSize.height;\n var shiftedRect = currentPage.graphics.checkCorrectLayoutRectangle(textSize, currentBounds.x, currentBounds.y, this.format);\n // if (currentBounds.width <= 0) {\n x = shiftedRect.x;\n // }\n var verticalShift = currentPage.graphics.getTextVerticalAlignShift(textSize.height, currentBounds.height, this.format);\n y += verticalShift;\n var bounds = new RectangleF(x, y, width, height);\n return bounds;\n };\n return TextLayouter;\n}(ElementLayouter));\nexport { TextLayouter };\nvar TextPageLayoutResult = /** @class */ (function () {\n function TextPageLayoutResult() {\n }\n return TextPageLayoutResult;\n}());\nexport { TextPageLayoutResult };\nvar PdfTextLayoutResult = /** @class */ (function (_super) {\n __extends(PdfTextLayoutResult, _super);\n // Constructors\n /**\n * Initializes the new instance of `PdfTextLayoutResult` class.\n * @private\n */\n function PdfTextLayoutResult(page, bounds, remainder, lastLineBounds) {\n var _this = _super.call(this, page, bounds) || this;\n _this.remainderText = remainder;\n _this.lastLineTextBounds = lastLineBounds;\n return _this;\n }\n Object.defineProperty(PdfTextLayoutResult.prototype, \"remainder\", {\n // Properties\n /**\n * Gets a value that contains the `text` that was not printed.\n * @private\n */\n get: function () {\n return this.remainderText;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTextLayoutResult.prototype, \"lastLineBounds\", {\n /**\n * Gets a value that indicates the `bounds` of the last line that was printed on the page.\n * @private\n */\n get: function () {\n return this.lastLineTextBounds;\n },\n enumerable: true,\n configurable: true\n });\n return PdfTextLayoutResult;\n}(PdfLayoutResult));\nexport { PdfTextLayoutResult };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfTextElement.ts class for EJ2-PDF\n */\nimport { PdfLayoutElement } from './../figures/layout-element';\nimport { PdfBrush } from './../brushes/pdf-brush';\nimport { PdfFont } from './../fonts/pdf-font';\nimport { PdfStandardFont } from './../fonts/pdf-standard-font';\nimport { PdfPen } from './../pdf-pen';\nimport { PdfLayoutParams } from './../figures/base/element-layouter';\nimport { TextLayouter } from './base/text-layouter';\nimport { PdfSolidBrush } from './../brushes/pdf-solid-brush';\nimport { PdfColor } from './../pdf-color';\nimport { RectangleF, SizeF, PointF } from './../../drawing/pdf-drawing';\nimport { PdfLayoutFormat } from './base/element-layouter';\nimport { PdfStringLayouter } from './../fonts/string-layouter';\nimport { PdfTextAlignment } from './../enum';\n/**\n * `PdfTextElement` class represents the text area with the ability to span several pages\n * and inherited from the 'PdfLayoutElement' class.\n * @private\n */\nvar PdfTextElement = /** @class */ (function (_super) {\n __extends(PdfTextElement, _super);\n function PdfTextElement(arg1, arg2, arg3, arg4, arg5) {\n var _this = _super.call(this) || this;\n // Fields\n /**\n * `Text` data.\n * @private\n */\n _this.content = '';\n /**\n * `Value` of text data.\n * @private\n */\n _this.elementValue = '';\n /**\n * indicate whether the drawText with PointF overload is called or not.\n * @default false\n * @private\n */\n _this.hasPointOverload = false;\n /**\n * indicate whether the PdfGridCell value is `PdfTextElement`\n * @default false\n * @private\n */\n _this.isPdfTextElement = false;\n if (typeof arg1 === 'undefined') {\n //\n }\n else if (typeof arg1 === 'string' && typeof arg2 === 'undefined') {\n _this.content = arg1;\n _this.elementValue = arg1;\n }\n else if (typeof arg1 === 'string' && arg2 instanceof PdfFont && typeof arg3 === 'undefined') {\n _this.content = arg1;\n _this.elementValue = arg1;\n _this.pdfFont = arg2;\n }\n else if (typeof arg1 === 'string' && arg2 instanceof PdfFont && arg3 instanceof PdfPen && typeof arg4 === 'undefined') {\n _this.content = arg1;\n _this.elementValue = arg1;\n _this.pdfFont = arg2;\n _this.pdfPen = arg3;\n }\n else if (typeof arg1 === 'string' && arg2 instanceof PdfFont && arg3 instanceof PdfBrush && typeof arg4 === 'undefined') {\n _this.content = arg1;\n _this.elementValue = arg1;\n _this.pdfFont = arg2;\n _this.pdfBrush = arg3;\n }\n else {\n _this.content = arg1;\n _this.elementValue = arg1;\n _this.pdfFont = arg2;\n _this.pdfPen = arg3;\n _this.pdfBrush = arg4;\n _this.format = arg5;\n }\n return _this;\n }\n Object.defineProperty(PdfTextElement.prototype, \"text\", {\n // Properties\n /**\n * Gets or sets a value indicating the `text` that should be printed.\n * ```typescript\n * // create a new PDF document.\n * let document : PdfDocument = new PdfDocument();\n * // add a page to the document.\n * let page1 : PdfPage = document.pages.add();\n * // create the font\n * let font : PdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12);\n * // create the Text Web Link\n * let textLink : PdfTextWebLink = new PdfTextWebLink();\n * // set the hyperlink\n * textLink.url = 'http://www.google.com';\n * //\n * // set the link text\n * textLink.text = 'Google';\n * //\n * // set the font\n * textLink.font = font;\n * // draw the hyperlink in PDF page\n * textLink.draw(page1, new PointF(10, 40));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n return this.content;\n },\n set: function (value) {\n this.elementValue = value;\n this.content = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTextElement.prototype, \"value\", {\n //get value\n /**\n * Gets or sets a `value` indicating the text that should be printed.\n * @private\n */\n get: function () {\n return this.elementValue;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTextElement.prototype, \"pen\", {\n //get pen\n /**\n * Gets or sets a `PdfPen` that determines the color, width, and style of the text\n * @private\n */\n get: function () {\n return this.pdfPen;\n },\n //Set pen value\n set: function (value) {\n this.pdfPen = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTextElement.prototype, \"brush\", {\n //get brush\n /**\n * Gets or sets the `PdfBrush` that will be used to draw the text with color and texture.\n * @private\n */\n get: function () {\n return this.pdfBrush;\n },\n //Set brush value\n set: function (value) {\n this.pdfBrush = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTextElement.prototype, \"font\", {\n //get font\n /**\n * Gets or sets a `PdfFont` that defines the text format.\n * ```typescript\n * // create a new PDF document.\n * let document : PdfDocument = new PdfDocument();\n * // add a page to the document.\n * let page1 : PdfPage = document.pages.add();\n * // create the font\n * let font : PdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12);\n * // create the Text Web Link\n * let textLink : PdfTextWebLink = new PdfTextWebLink();\n * // set the hyperlink\n * textLink.url = 'http://www.google.com';\n * // set the link text\n * textLink.text = 'Google';\n * //\n * // set the font\n * textLink.font = font;\n * //\n * // draw the hyperlink in PDF page\n * textLink.draw(page1, new PointF(10, 40));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n return this.pdfFont;\n },\n set: function (value) {\n this.pdfFont = value;\n if (this.pdfFont instanceof PdfStandardFont && this.content != null) {\n this.elementValue = PdfStandardFont.convert(this.content);\n }\n else {\n this.elementValue = this.content;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTextElement.prototype, \"stringFormat\", {\n /**\n * Gets or sets the `PdfStringFormat` that will be used to set the string format\n * @private\n */\n get: function () {\n return this.format;\n },\n set: function (value) {\n this.format = value;\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * Gets a `brush` for drawing.\n * @private\n */\n PdfTextElement.prototype.getBrush = function () {\n return (this.pdfBrush == null || typeof this.pdfBrush === 'undefined') ? new PdfSolidBrush(new PdfColor(0, 0, 0)) : this.pdfBrush;\n };\n // /**\n // * `Draws` an element on the Graphics.\n // * @private\n // */\n // public drawInternal(graphics : PdfGraphics) : void {\n // graphics.drawString(this.elementValue, this.pdfFont, this.pdfPen, this.getBrush(), 0, 0, this.stringFormat);\n // }\n /**\n * `Layouts` the element.\n * @private\n */\n PdfTextElement.prototype.layout = function (param) {\n var layouter = new TextLayouter(this);\n var result = layouter.layout(param);\n return result;\n };\n PdfTextElement.prototype.drawText = function (arg2, arg3, arg4, arg5) {\n if (arg3 instanceof PointF && typeof arg3.width === 'undefined' && typeof arg4 === 'undefined') {\n this.hasPointOverload = true;\n return this.drawText(arg2, arg3.x, arg3.y);\n }\n else if (typeof arg3 === 'number' && typeof arg4 === 'number' && typeof arg5 === 'undefined') {\n this.hasPointOverload = true;\n return this.drawText(arg2, arg3, arg4, null);\n }\n else if (arg3 instanceof RectangleF && typeof arg3.width !== 'undefined' && typeof arg4 === 'undefined') {\n return this.drawText(arg2, arg3, null);\n }\n else if (arg3 instanceof PointF && typeof arg3.width === 'undefined' && arg4 instanceof PdfLayoutFormat) {\n this.hasPointOverload = true;\n return this.drawText(arg2, arg3.x, arg3.y, arg4);\n }\n else if (typeof arg3 === 'number' && typeof arg4 === 'number' && (arg5 instanceof PdfLayoutFormat || arg5 == null)) {\n this.hasPointOverload = true;\n var width = (arg2.graphics.clientSize.width - arg3);\n var layoutRectangle = new RectangleF(arg3, arg4, width, 0);\n return this.drawText(arg2, layoutRectangle, arg5);\n }\n else if (arg3 instanceof RectangleF && typeof arg3.width !== 'undefined' && typeof arg4 === 'boolean') {\n return this.drawText(arg2, arg3, null);\n }\n else {\n var layout = new PdfStringLayouter();\n if (this.hasPointOverload) {\n var stringLayoutResult = layout.layout(this.value, this.font, this.stringFormat, new SizeF((arg2.graphics.clientSize.width - arg3.x), 0), true, arg2.graphics.clientSize);\n var layoutResult = void 0;\n var param = new PdfLayoutParams();\n var temparg3 = arg3;\n var temparg4 = arg4;\n param.page = arg2;\n var previousPage = arg2;\n param.bounds = temparg3;\n param.format = (temparg4 != null) ? temparg4 : new PdfLayoutFormat();\n if (stringLayoutResult.lines.length > 1) {\n this.text = stringLayoutResult.layoutLines[0].text;\n if (param.bounds.y <= param.page.graphics.clientSize.height) {\n var previousPosition = new PointF(param.bounds.x, param.bounds.y);\n layoutResult = this.layout(param);\n var bounds = new RectangleF(0, layoutResult.bounds.y + stringLayoutResult.lineHeight, arg2.graphics.clientSize.width, stringLayoutResult.lineHeight);\n var isPaginate = false;\n for (var i = 1; i < stringLayoutResult.lines.length; i++) {\n param.page = layoutResult.page;\n param.bounds = new RectangleF(new PointF(bounds.x, bounds.y), new SizeF(bounds.width, bounds.height));\n this.text = stringLayoutResult.layoutLines[i].text;\n if (bounds.y + stringLayoutResult.lineHeight > layoutResult.page.graphics.clientSize.height) {\n isPaginate = true;\n param.page = param.page.graphics.getNextPage();\n if (previousPosition.y > (layoutResult.page.graphics.clientSize.height - layoutResult.bounds.height)) {\n bounds = new RectangleF(0, layoutResult.bounds.height, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight);\n }\n else {\n bounds = new RectangleF(0, 0, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight);\n }\n param.bounds = bounds;\n }\n layoutResult = this.layout(param);\n if (i !== (stringLayoutResult.lines.length - 1)) {\n bounds = new RectangleF(0, layoutResult.bounds.y + stringLayoutResult.lineHeight, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight);\n }\n else {\n var lineWidth = this.font.measureString(this.text, this.format).width;\n layoutResult = this.calculateResultBounds(layoutResult, lineWidth, layoutResult.page.graphics.clientSize.width, 0);\n }\n }\n }\n return layoutResult;\n }\n else {\n var lineSize = this.font.measureString(this.text, this.format);\n if (param.bounds.y <= param.page.graphics.clientSize.height) {\n layoutResult = this.layout(param);\n layoutResult = this.calculateResultBounds(layoutResult, lineSize.width, layoutResult.page.graphics.clientSize.width, 0);\n }\n return layoutResult;\n }\n }\n else {\n var layoutResult = layout.layout(this.value, this.font, this.stringFormat, new SizeF(arg3.width, 0), false, arg2.graphics.clientSize);\n var result = void 0;\n var param = new PdfLayoutParams();\n var temparg3 = arg3;\n var temparg4 = arg4;\n param.page = arg2;\n param.bounds = temparg3;\n param.format = (temparg4 != null) ? temparg4 : new PdfLayoutFormat();\n if (layoutResult.lines.length > 1) {\n this.text = layoutResult.layoutLines[0].text;\n if (param.bounds.y <= param.page.graphics.clientSize.height) {\n var previousPosition = new PointF(param.bounds.x, param.bounds.y);\n result = this.layout(param);\n var bounds = new RectangleF(temparg3.x, result.bounds.y + layoutResult.lineHeight, temparg3.width, layoutResult.lineHeight);\n var isPaginate = false;\n for (var i = 1; i < layoutResult.lines.length; i++) {\n param.page = result.page;\n param.bounds = new RectangleF(bounds.x, bounds.y, bounds.width, bounds.height);\n this.text = layoutResult.layoutLines[i].text;\n if (bounds.y + layoutResult.lineHeight > result.page.graphics.clientSize.height) {\n isPaginate = true;\n param.page = param.page.graphics.getNextPage();\n if (previousPosition.y > (result.page.graphics.clientSize.height - result.bounds.height)) {\n bounds = new RectangleF(temparg3.x, layoutResult.lineHeight, temparg3.width, layoutResult.lineHeight);\n }\n else {\n bounds = new RectangleF(temparg3.x, 0, temparg3.width, layoutResult.lineHeight);\n }\n param.bounds = bounds;\n }\n result = this.layout(param);\n if (i !== (layoutResult.lines.length - 1)) {\n bounds = new RectangleF(temparg3.x, result.bounds.y + layoutResult.lineHeight, temparg3.width, layoutResult.lineHeight);\n }\n else {\n var lineWidth = this.font.measureString(this.text, this.format).width;\n result = this.calculateResultBounds(result, lineWidth, temparg3.width, temparg3.x);\n }\n }\n }\n return result;\n }\n else {\n var lineSize = this.font.measureString(this.text, this.format);\n if (param.bounds.y <= param.page.graphics.clientSize.height) {\n result = this.layout(param);\n result = this.calculateResultBounds(result, lineSize.width, temparg3.width, temparg3.x);\n }\n return result;\n }\n }\n }\n };\n PdfTextElement.prototype.calculateResultBounds = function (result, lineWidth, maximumWidth, startPosition) {\n var shift = 0;\n if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === PdfTextAlignment.Center) {\n result.bounds.x = startPosition + (maximumWidth - lineWidth) / 2;\n result.bounds.width = lineWidth;\n }\n else if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === PdfTextAlignment.Right) {\n result.bounds.x = startPosition + (maximumWidth - lineWidth);\n result.bounds.width = lineWidth;\n }\n else if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === PdfTextAlignment.Justify) {\n result.bounds.x = startPosition;\n result.bounds.width = maximumWidth;\n }\n else {\n result.bounds.width = startPosition;\n result.bounds.width = lineWidth;\n }\n return result;\n };\n return PdfTextElement;\n}(PdfLayoutElement));\nexport { PdfTextElement };\n","import { PdfColor } from './../graphics/pdf-color';\nimport { RectangleF, PointF } from './../drawing/pdf-drawing';\nimport { PdfDictionary, SaveAnnotationEventHandler } from './../primitives/pdf-dictionary';\nimport { PdfArray } from './../primitives/pdf-array';\nimport { PdfNumber } from './../primitives/pdf-number';\nimport { PdfReferenceHolder } from './../primitives/pdf-reference';\nimport { PdfString } from './../primitives/pdf-string';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\nimport { PdfName } from './../primitives/pdf-name';\nimport { PdfSolidBrush } from './../graphics/brushes/pdf-solid-brush';\nimport { PdfStandardFont } from './../graphics/fonts/pdf-standard-font';\nimport { PdfFontFamily } from './../graphics/fonts/enum';\nimport { PdfStringFormat } from './../graphics/fonts/pdf-string-format';\nimport { PdfTextAlignment } from './../graphics/enum';\n/**\n * `PdfAnnotation` class represents the base class for annotation objects.\n * @private\n */\nvar PdfAnnotation = /** @class */ (function () {\n function PdfAnnotation(arg1) {\n // Fields\n /**\n * Specifies the Internal variable to store fields of `PdfDictionaryProperties`.\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n /**\n * `Color` of the annotation\n * @private\n */\n this.pdfColor = new PdfColor(255, 255, 255);\n /**\n * `Bounds` of the annotation.\n * @private\n */\n this.rectangle = new RectangleF(0, 0, 0, 0);\n /**\n * Parent `page` of the annotation.\n * @private\n */\n this.pdfPage = null;\n /**\n * `Brush of the text` of the annotation.\n * @default new PdfSolidBrush(new PdfColor(0, 0, 0))\n * @private\n */\n this.textBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n /**\n * `Font of the text` of the annotation.\n * @default new PdfStandardFont(PdfFontFamily.TimesRoman, 10)\n * @private\n */\n this.textFont = new PdfStandardFont(PdfFontFamily.TimesRoman, 10);\n /**\n * `StringFormat of the text` of the annotation.\n * @default new PdfStringFormat(PdfTextAlignment.Left)\n * @private\n */\n this.format = new PdfStringFormat(PdfTextAlignment.Left);\n /**\n * `Text` of the annotation.\n * @private\n */\n this.content = '';\n /**\n * Internal variable to store `dictionary`.\n * @private\n */\n this.pdfDictionary = new PdfDictionary();\n /**\n * To specifying the `Inner color` with which to fill the annotation\n * @private\n */\n this.internalColor = new PdfColor();\n /**\n * `opacity or darkness` of the annotation.\n * @private\n * @default 1.0\n */\n this.darkness = 1.0;\n if (typeof arg1 === 'undefined') {\n this.initialize();\n }\n else {\n this.initialize();\n this.bounds = arg1;\n }\n }\n Object.defineProperty(PdfAnnotation.prototype, \"color\", {\n // Properties\n /**\n * `Color` of the annotation\n * @private\n */\n get: function () {\n return this.pdfColor;\n },\n set: function (value) {\n this.pdfColor = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAnnotation.prototype, \"innerColor\", {\n /**\n * To specifying the `Inner color` with which to fill the annotation\n * @private\n */\n get: function () {\n return this.internalColor;\n },\n set: function (value) {\n this.internalColor = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAnnotation.prototype, \"bounds\", {\n /**\n * `bounds` of the annotation.\n * @private\n */\n get: function () {\n return this.rectangle;\n },\n set: function (value) {\n this.rectangle = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAnnotation.prototype, \"page\", {\n /**\n * Parent `page` of the annotation.\n * @private\n */\n get: function () {\n return this.pdfPage;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAnnotation.prototype, \"font\", {\n /**\n * To specifying the `Font of the text` in the annotation.\n * @private\n */\n get: function () {\n return this.textFont;\n },\n set: function (value) {\n this.textFont = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAnnotation.prototype, \"stringFormat\", {\n /**\n * To specifying the `StringFormat of the text` in the annotation.\n * @private\n */\n get: function () {\n return this.format;\n },\n set: function (value) {\n this.format = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAnnotation.prototype, \"brush\", {\n /**\n * To specifying the `Brush of the text` in the annotation.\n * @private\n */\n get: function () {\n return this.textBrush;\n },\n set: function (value) {\n this.textBrush = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAnnotation.prototype, \"text\", {\n /**\n * `Text` of the annotation.\n * @private\n */\n get: function () {\n return this.content;\n },\n set: function (value) {\n this.content = value;\n this.dictionary.items.setValue(this.dictionaryProperties.contents, new PdfString(this.content));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAnnotation.prototype, \"dictionary\", {\n /**\n * Internal variable to store `dictionary`.\n * @hidden\n */\n get: function () {\n return this.pdfDictionary;\n },\n set: function (value) {\n this.pdfDictionary = value;\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * `Initialize` the annotation event handler and specifies the type of the annotation.\n * @private\n */\n PdfAnnotation.prototype.initialize = function () {\n this.pdfDictionary.annotationBeginSave = new SaveAnnotationEventHandler(this);\n this.pdfDictionary.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.annot));\n };\n /**\n * Sets related `page` of the annotation.\n * @private\n */\n PdfAnnotation.prototype.setPage = function (page) {\n this.pdfPage = page;\n this.pdfDictionary.items.setValue(this.dictionaryProperties.p, new PdfReferenceHolder(this.pdfPage));\n };\n /**\n * Handles the `BeginSave` event of the Dictionary.\n * @private\n */\n PdfAnnotation.prototype.beginSave = function () {\n this.save();\n };\n /**\n * `Saves` an annotation.\n * @private\n */\n /* tslint:disable */\n PdfAnnotation.prototype.save = function () {\n var nativeRectangle = new RectangleF(this.rectangle.x, this.rectangle.y, this.rectangle.width, this.rectangle.height);\n var section = this.pdfPage.section;\n var initialHeight = nativeRectangle.height;\n var tempLoacation = section.pointToNativePdf(this.page, new PointF(nativeRectangle.x, nativeRectangle.y));\n nativeRectangle.x = tempLoacation.x;\n nativeRectangle.width = tempLoacation.x + nativeRectangle.width;\n nativeRectangle.y = (tempLoacation.y - this.page.document.pageSettings.margins.top);\n nativeRectangle.height = nativeRectangle.y - initialHeight;\n this.pdfDictionary.items.setValue(this.dictionaryProperties.rect, PdfArray.fromRectangle(nativeRectangle));\n this.dictionary.items.setValue(this.dictionaryProperties.ca, new PdfNumber(this.darkness));\n };\n Object.defineProperty(PdfAnnotation.prototype, \"element\", {\n /* tslint:enable */\n // IPdfWrapper Members\n /**\n * Gets the `element`.\n * @private\n */\n get: function () {\n return this.pdfDictionary;\n },\n enumerable: true,\n configurable: true\n });\n return PdfAnnotation;\n}());\nexport { PdfAnnotation };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfAnnotation } from './annotation';\nimport { PdfName } from './../primitives/pdf-name';\n/**\n * `PdfLinkAnnotation` class represents the ink annotation class.\n * @private\n */\nvar PdfLinkAnnotation = /** @class */ (function (_super) {\n __extends(PdfLinkAnnotation, _super);\n function PdfLinkAnnotation(rectangle) {\n return _super.call(this, rectangle) || this;\n }\n // Implementation\n /**\n * `Initializes` annotation object.\n * @private\n */\n PdfLinkAnnotation.prototype.initialize = function () {\n _super.prototype.initialize.call(this);\n this.dictionary.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.link));\n };\n return PdfLinkAnnotation;\n}(PdfAnnotation));\nexport { PdfLinkAnnotation };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfLinkAnnotation } from './link-annotation';\n/**\n * Represents base class for `link annotations` with associated action.\n * @private\n */\nvar PdfActionLinkAnnotation = /** @class */ (function (_super) {\n __extends(PdfActionLinkAnnotation, _super);\n // Constructors\n /**\n * Specifies the constructor for `ActionLinkAnnotation`.\n * @private\n */\n function PdfActionLinkAnnotation(rectangle) {\n var _this = _super.call(this, rectangle) || this;\n // Fields\n /**\n * Internal variable to store annotation's `action`.\n * @default null\n * @private\n */\n _this.pdfAction = null;\n return _this;\n }\n //Public method\n /**\n * get and set the `action`.\n * @hidden\n */\n PdfActionLinkAnnotation.prototype.getSetAction = function (value) {\n if (typeof value === 'undefined') {\n return this.pdfAction;\n }\n else {\n this.pdfAction = value;\n }\n };\n return PdfActionLinkAnnotation;\n}(PdfLinkAnnotation));\nexport { PdfActionLinkAnnotation };\n","import { PdfDictionary } from './../primitives/pdf-dictionary';\nimport { PdfReferenceHolder } from './../primitives/pdf-reference';\nimport { PdfName } from './../primitives/pdf-name';\nimport { DictionaryProperties } from './../input-output/pdf-dictionary-properties';\n/**\n * `PdfAction` class represents base class for all action types.\n * @private\n */\nvar PdfAction = /** @class */ (function () {\n // Constructors\n /**\n * Initialize instance for `Action` class.\n * @private\n */\n function PdfAction() {\n /**\n * Specifies the Next `action` to perform.\n * @private\n */\n this.action = null;\n /**\n * Specifies the Internal variable to store `dictionary properties`.\n * @private\n */\n this.dictionaryProperties = new DictionaryProperties();\n // super(); -> Object()\n this.initialize();\n }\n Object.defineProperty(PdfAction.prototype, \"next\", {\n // Properties\n /**\n * Gets and Sets the `Next` action to perform.\n * @private\n */\n get: function () {\n return this.action;\n },\n set: function (value) {\n // if (this.action !== value) {\n this.action = value;\n this.dictionary.items.setValue(this.dictionaryProperties.next, new PdfReferenceHolder(this.action));\n // }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfAction.prototype, \"dictionary\", {\n /**\n * Gets and Sets the instance of PdfDictionary class for `Dictionary`.\n * @private\n */\n get: function () {\n if (typeof this.pdfDictionary === 'undefined') {\n this.pdfDictionary = new PdfDictionary();\n }\n return this.pdfDictionary;\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * `Initialize` the action type.\n * @private\n */\n PdfAction.prototype.initialize = function () {\n this.dictionary.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.action));\n };\n Object.defineProperty(PdfAction.prototype, \"element\", {\n // IPdfWrapper Members\n /**\n * Gets the `Element` as IPdfPrimitive class.\n * @private\n */\n get: function () {\n return this.dictionary;\n },\n enumerable: true,\n configurable: true\n });\n return PdfAction;\n}());\nexport { PdfAction };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfAction } from './action';\nimport { PdfString } from './../primitives/pdf-string';\nimport { PdfName } from './../primitives/pdf-name';\n/**\n * `PdfUriAction` class for initialize the uri related internals.\n * @private\n */\nvar PdfUriAction = /** @class */ (function (_super) {\n __extends(PdfUriAction, _super);\n function PdfUriAction(uri) {\n var _this = _super.call(this) || this;\n // Fields\n /**\n * Specifies the `uri` string.\n * @default ''.\n * @private\n */\n _this.uniformResourceIdentifier = '';\n return _this;\n }\n Object.defineProperty(PdfUriAction.prototype, \"uri\", {\n // Properties\n /**\n * Gets and Sets the value of `Uri`.\n * @private\n */\n get: function () {\n return this.uniformResourceIdentifier;\n },\n set: function (value) {\n this.uniformResourceIdentifier = value;\n this.dictionary.items.setValue(this.dictionaryProperties.uri, new PdfString(this.uniformResourceIdentifier));\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * `Initialize` the internals.\n * @private\n */\n PdfUriAction.prototype.initialize = function () {\n _super.prototype.initialize.call(this);\n this.dictionary.items.setValue(this.dictionaryProperties.s, new PdfName(this.dictionaryProperties.uri));\n };\n return PdfUriAction;\n}(PdfAction));\nexport { PdfUriAction };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfActionLinkAnnotation } from './action-link-annotation';\nimport { PdfName } from './../primitives/pdf-name';\nimport { PdfUriAction } from './../actions/uri-action';\n/**\n * `PdfUriAnnotation` class represents the Uri annotation.\n * @private\n */\nvar PdfUriAnnotation = /** @class */ (function (_super) {\n __extends(PdfUriAnnotation, _super);\n function PdfUriAnnotation(rectangle, uri) {\n var _this = _super.call(this, rectangle) || this;\n if (typeof uri !== 'undefined') {\n _this.uri = uri;\n }\n return _this;\n }\n Object.defineProperty(PdfUriAnnotation.prototype, \"uriAction\", {\n /**\n * Get `action` of the annotation.\n * @private\n */\n get: function () {\n if (typeof this.pdfUriAction === 'undefined') {\n this.pdfUriAction = new PdfUriAction();\n }\n return this.pdfUriAction;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfUriAnnotation.prototype, \"uri\", {\n // Properties\n /**\n * Gets or sets the `Uri` address.\n * @private\n */\n get: function () {\n return this.uriAction.uri;\n },\n set: function (value) {\n if (this.uriAction.uri !== value) {\n this.uriAction.uri = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfUriAnnotation.prototype, \"action\", {\n /**\n * Gets or sets the `action`.\n * @private\n */\n get: function () {\n return this.getSetAction();\n },\n set: function (value) {\n this.getSetAction(value);\n this.uriAction.next = value;\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * `Initializes` annotation object.\n * @private\n */\n PdfUriAnnotation.prototype.initialize = function () {\n _super.prototype.initialize.call(this);\n this.dictionary.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.link));\n var tempPrimitive = this.uriAction.element;\n this.dictionary.items.setValue(this.dictionaryProperties.a, this.uriAction.element);\n };\n return PdfUriAnnotation;\n}(PdfActionLinkAnnotation));\nexport { PdfUriAnnotation };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfPage } from './../pages/pdf-page';\nimport { PointF, RectangleF, SizeF } from './../drawing/pdf-drawing';\nimport { PdfTextElement } from './../graphics/figures/text-element';\nimport { PdfUriAnnotation } from './uri-annotation';\nimport { PdfStringLayouter } from './../graphics/fonts/string-layouter';\nimport { PdfFontStyle } from './../graphics/fonts/enum';\nimport { PdfTextAlignment } from './../graphics/enum';\nimport { PdfArray } from './../primitives/pdf-array';\nimport { PdfNumber } from './../primitives/pdf-number';\n/**\n * `PdfTextWebLink` class represents the class for text web link annotation.\n * ```typescript\n * // create a new PDF document.\n * let document : PdfDocument = new PdfDocument();\n * // add a page to the document.\n * let page1 : PdfPage = document.pages.add();\n * // create the font\n * let font : PdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12);\n * //\n * // create the Text Web Link\n * let textLink : PdfTextWebLink = new PdfTextWebLink();\n * // set the hyperlink\n * textLink.url = 'http://www.google.com';\n * // set the link text\n * textLink.text = 'Google';\n * // set the font\n * textLink.font = font;\n * // draw the hyperlink in PDF page\n * textLink.draw(page1, new PointF(10, 40));\n * //\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\nvar PdfTextWebLink = /** @class */ (function (_super) {\n __extends(PdfTextWebLink, _super);\n // Constructors\n /**\n * Initializes a new instance of the `PdfTextWebLink` class.\n * @private\n */\n function PdfTextWebLink() {\n var _this = _super.call(this) || this;\n // Fields\n /**\n * Internal variable to store `Url`.\n * @default ''\n * @private\n */\n _this.uniformResourceLocator = '';\n /**\n * Internal variable to store `Uri Annotation` object.\n * @default null\n * @private\n */\n _this.uriAnnotation = null;\n /**\n * Checks whether the drawTextWebLink method with `PointF` overload is called or not.\n * If it set as true, then the start position of each lines excluding firest line is changed as (0, Y).\n * @private\n * @hidden\n */\n _this.recalculateBounds = false;\n _this.defaultBorder = new PdfArray();\n for (var i = 0; i < 3; i++) {\n _this.defaultBorder.add(new PdfNumber(0));\n }\n return _this;\n }\n Object.defineProperty(PdfTextWebLink.prototype, \"url\", {\n // Properties\n /**\n * Gets or sets the `Uri address`.\n * ```typescript\n * // create a new PDF document.\n * let document : PdfDocument = new PdfDocument();\n * // add a page to the document.\n * let page1 : PdfPage = document.pages.add();\n * // create the font\n * let font : PdfFont = new PdfStandardFont(PdfFontFamily.Helvetica, 12);\n * // create the Text Web Link\n * let textLink : PdfTextWebLink = new PdfTextWebLink();\n * //\n * // set the hyperlink\n * textLink.url = 'http://www.google.com';\n * //\n * // set the link text\n * textLink.text = 'Google';\n * // set the font\n * textLink.font = font;\n * // draw the hyperlink in PDF page\n * textLink.draw(page1, new PointF(10, 40));\n * // save the document.\n * document.save('output.pdf');\n * // destroy the document\n * document.destroy();\n * ```\n */\n get: function () {\n return this.uniformResourceLocator;\n },\n set: function (value) {\n if (value.length === 0) {\n throw new Error('ArgumentException : Url - string can not be empty');\n }\n this.uniformResourceLocator = value;\n },\n enumerable: true,\n configurable: true\n });\n PdfTextWebLink.prototype.draw = function (arg1, arg2) {\n if (arg1 instanceof PdfPage) {\n var layout = new PdfStringLayouter();\n var previousFontStyle = this.font.style;\n if (arg2 instanceof PointF) {\n this.recalculateBounds = true;\n this.font.style = PdfFontStyle.Underline;\n var layoutResult = layout.layout(this.value, this.font, this.stringFormat, new SizeF((arg1.graphics.clientSize.width - arg2.x), 0), true, arg1.graphics.clientSize);\n if (layoutResult.lines.length === 1) {\n var textSize = this.font.measureString(this.value);\n var rect = new RectangleF(arg2, textSize);\n rect = this.calculateBounds(rect, textSize.width, arg1.graphics.clientSize.width, arg2.x);\n this.uriAnnotation = new PdfUriAnnotation(rect, this.url);\n this.uriAnnotation.dictionary.items.setValue('Border', this.defaultBorder);\n arg1.annotations.add(this.uriAnnotation);\n var result = this.drawText(arg1, arg2);\n this.font.style = previousFontStyle;\n return result;\n }\n else {\n var result = this.drawMultipleLineWithPoint(layoutResult, arg1, arg2);\n this.font.style = previousFontStyle;\n return result;\n }\n }\n else {\n var layoutResult = layout.layout(this.value, this.font, this.stringFormat, new SizeF(arg2.width, 0), false, new SizeF(0, 0));\n this.font.style = PdfFontStyle.Underline;\n if (layoutResult.lines.length === 1) {\n var textSize = this.font.measureString(this.value);\n var rect = new RectangleF(new PointF(arg2.x, arg2.y), textSize);\n rect = this.calculateBounds(rect, textSize.width, arg2.width, arg2.x);\n this.uriAnnotation = new PdfUriAnnotation(rect, this.url);\n this.uriAnnotation.dictionary.items.setValue('Border', this.defaultBorder);\n arg1.annotations.add(this.uriAnnotation);\n var returnValue = this.drawText(arg1, arg2);\n this.font.style = previousFontStyle;\n return returnValue;\n }\n else {\n var returnValue = this.drawMultipleLineWithBounds(layoutResult, arg1, arg2);\n this.font.style = previousFontStyle;\n return returnValue;\n }\n }\n }\n else {\n var page = new PdfPage();\n page = arg1.page;\n return this.draw(page, arg2);\n }\n };\n /* tslint:enable */\n //Private methods\n /**\n * Helper method `Draw` a Multiple Line Text Web Link on the Graphics with the specified location.\n * @private\n */\n PdfTextWebLink.prototype.drawMultipleLineWithPoint = function (result, page, location) {\n var layoutResult;\n for (var i = 0; i < result.layoutLines.length; i++) {\n var size = this.font.measureString(result.lines[i].text);\n var bounds = new RectangleF(location, size);\n if (i !== 0) {\n bounds.x = 0;\n }\n this.text = result.lines[i].text;\n if (bounds.y + size.height > page.graphics.clientSize.height) {\n if (i !== 0) {\n page = page.graphics.getNextPage();\n bounds = new RectangleF(0, 0, page.graphics.clientSize.width, size.height);\n location.y = 0;\n }\n else {\n break;\n }\n }\n bounds = this.calculateBounds(bounds, size.width, page.graphics.clientSize.width, bounds.x);\n this.uriAnnotation = new PdfUriAnnotation(bounds, this.url);\n this.uriAnnotation.dictionary.items.setValue('Border', this.defaultBorder);\n page.annotations.add(this.uriAnnotation);\n if (i !== 0) {\n layoutResult = this.drawText(page, new PointF(0, bounds.y));\n }\n else {\n layoutResult = this.drawText(page, bounds.x, bounds.y);\n }\n location.y += size.height;\n }\n return layoutResult;\n };\n /**\n * Helper method `Draw` a Multiple Line Text Web Link on the Graphics with the specified bounds.\n * @private\n */\n PdfTextWebLink.prototype.drawMultipleLineWithBounds = function (result, page, bounds) {\n var layoutResult;\n for (var i = 0; i < result.layoutLines.length; i++) {\n var size = this.font.measureString(result.lines[i].text);\n var internalBounds = new RectangleF(new PointF(bounds.x, bounds.y), size);\n internalBounds = this.calculateBounds(internalBounds, size.width, bounds.width, bounds.x);\n this.text = result.lines[i].text;\n if (bounds.y + size.height > page.graphics.clientSize.height) {\n if (i !== 0) {\n page = page.graphics.getNextPage();\n bounds = new RectangleF(bounds.x, 0, bounds.width, size.height);\n internalBounds.y = 0;\n }\n else {\n break;\n }\n }\n this.uriAnnotation = new PdfUriAnnotation(internalBounds, this.url);\n this.uriAnnotation.dictionary.items.setValue('Border', this.defaultBorder);\n page.annotations.add(this.uriAnnotation);\n layoutResult = this.drawText(page, bounds);\n bounds.y += size.height;\n }\n return layoutResult;\n };\n /* tslint:disable */\n PdfTextWebLink.prototype.calculateBounds = function (currentBounds, lineWidth, maximumWidth, startPosition) {\n var shift = 0;\n if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === PdfTextAlignment.Center) {\n currentBounds.x = startPosition + (maximumWidth - lineWidth) / 2;\n currentBounds.width = lineWidth;\n }\n else if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === PdfTextAlignment.Right) {\n currentBounds.x = startPosition + (maximumWidth - lineWidth);\n currentBounds.width = lineWidth;\n }\n else if (this.stringFormat != null && typeof this.stringFormat !== 'undefined' && this.stringFormat.alignment === PdfTextAlignment.Justify) {\n currentBounds.x = startPosition;\n currentBounds.width = maximumWidth;\n }\n else {\n currentBounds.width = startPosition;\n currentBounds.width = lineWidth;\n }\n return currentBounds;\n };\n return PdfTextWebLink;\n}(PdfTextElement));\nexport { PdfTextWebLink };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfGrid } from '../pdf-grid';\nimport { PdfStringFormat } from './../../../graphics/fonts/pdf-string-format';\nimport { SizeF, RectangleF, PointF } from './../../../drawing/pdf-drawing';\nimport { PdfBorders } from '../styles/pdf-borders';\nimport { PdfLayoutType, PdfLayoutBreakType } from './../../../graphics/figures/enum';\nimport { PdfLayoutResult, PdfLayoutFormat, ElementLayouter } from './../../../graphics/figures/base/element-layouter';\nimport { PdfHorizontalOverflowType } from '../styles/style';\nimport { TemporaryDictionary } from './../../../collections/object-object-pair/dictionary';\n/**\n * Class `lay outing the text`.\n *\n */\nvar PdfGridLayouter = /** @class */ (function (_super) {\n __extends(PdfGridLayouter, _super);\n //constructor\n /**\n * Initialize a new instance for `PdfGrid` class.\n * @private\n */\n function PdfGridLayouter(baseFormat) {\n var _this = _super.call(this, baseFormat) || this;\n /**\n * @hidden\n * @private\n */\n _this.gridInitialWidth = 0;\n /**\n * @hidden\n * @private\n */\n _this.gridSize = new SizeF(0, 0);\n _this.parentCellIndex = 0;\n _this.tempWidth = 0;\n _this.childheight = 0;\n /**\n * Check weather it is `child grid or not`.\n * @private\n */\n _this.isChildGrid = false;\n /**\n * @hidden\n * @private\n */\n _this.hasRowSpanSpan = false;\n /**\n * @hidden\n * @private\n */\n _this.isRearranged = false;\n /**\n * @hidden\n * @private\n */\n _this.pageBounds = new RectangleF();\n /**\n * @hidden\n * @private\n */\n _this.listOfNavigatePages = [];\n /**\n * @hidden\n * @private\n */\n _this.flag = true;\n /**\n * @hidden\n * @private\n */\n _this.columnRanges = [];\n /**\n * @hidden\n * @private\n */\n _this.currentLocation = new PointF(0, 0);\n /**\n * @hidden\n * @private\n */\n _this.breakRow = true;\n /**\n * Checks whether the x co-ordinate is need to set as client size or not.\n * @hidden\n * @private\n */\n _this.isOverloadWithPosition = false;\n return _this;\n }\n Object.defineProperty(PdfGridLayouter.prototype, \"Grid\", {\n //Properties\n get: function () {\n return this.elements;\n },\n enumerable: true,\n configurable: true\n });\n // Constructors\n /**\n * Initializes a new instance of the `StringLayouter` class.\n * @private\n */\n //Public methods\n /**\n * `Layouts` the text.\n * @private\n */\n /**\n * `Layouts` the specified graphics.\n * @private\n */\n /**\n * `Layouts` the specified graphics.\n * @private\n */\n /*public layout(graphics : PdfLayoutParams) : PdfLayoutResult\n public layout(graphics : PdfGraphics, bounds : RectangleF) : void\n public layout(graphics : PdfGraphics, bounds : PointF) : void\n public layout(graphics ?: PdfGraphics | PdfLayoutParams, bounds ?: PointF | RectangleF) : void | PdfLayoutResult {\n if (graphics instanceof PdfGraphics) {\n if (bounds instanceof PointF) {\n if (bounds.x === 0) {\n bounds.x = PdfBorders.default.right.width / 2;\n }\n if (bounds.y === 0) {\n bounds.y = PdfBorders.default.top.width / 2;\n }\n let boundaries : RectangleF = new RectangleF(bounds, new SizeF(0, 0));\n this.layout(graphics, boundaries);\n } else {\n let width : number = graphics.clientSize.width;\n let parameter : PdfLayoutParams = new PdfLayoutParams();\n parameter.bounds = bounds;\n this.currentGraphics = graphics;\n if (graphics.layer != null) {\n let index : number = 0;\n if (this.currentGraphics.page instanceof PdfPage) {\n index = (this.currentGraphics.page as PdfPage).section.indexOf(this.currentGraphics.page as PdfPage);\n } else {\n index = (this.currentGraphics.page as PdfPageBase).defaultLayerIndex;\n }\n } else {\n this.layoutInternal(parameter);\n }\n }\n }\n }*/\n /**\n * Gets the `format`.\n * @private\n */\n PdfGridLayouter.prototype.getFormat = function (format) {\n var f = format;\n return f;\n };\n /**\n * `Layouts` the element.\n * @private\n */\n PdfGridLayouter.prototype.layoutInternal = function (param) {\n var format = this.getFormat(param.format);\n this.gridLayoutFormat = this.getFormat(param.format);\n this.currentPage = param.page;\n if (this.currentPage !== null) {\n var pageHeight = this.currentPage.getClientSize().height;\n var pageWidth = this.currentPage.getClientSize().width;\n this.currentPageBounds = this.currentPage.getClientSize();\n }\n else {\n throw Error('Can not set page as null');\n //this.currentPageBounds = this.currentGraphics.clientSize;\n }\n this.currentGraphics = this.currentPage.graphics;\n //this.currentGraphics = (this.currentPage != null ) ? this.currentPage.graphics : this.currentGraphics;\n // if (this.currentGraphics.layer !== null) {\n // let index : number = 0;\n // if (this.currentGraphics.page instanceof PdfPage) {\n // index = (this.currentGraphics.page as PdfPage).section.indexOf(this.currentGraphics.page as PdfPage);\n // } else {\n // index = (this.currentGraphics.page as PdfPageBase).defaultLayerIndex;\n // }\n // this.listOfNavigatePages.push(index);\n // }\n var index = 0;\n index = this.currentGraphics.page.section.indexOf(this.currentGraphics.page);\n this.listOfNavigatePages.push(index);\n if (format != null && format.break === PdfLayoutBreakType.FitColumnsToPage) {\n this.currentBounds = new RectangleF(new PointF(param.bounds.x, param.bounds.y), new SizeF(this.Grid.columns.width, this.currentGraphics.clientSize.height));\n }\n else {\n this.currentBounds = new RectangleF(new PointF(param.bounds.x, param.bounds.y), this.currentGraphics.clientSize);\n }\n //this.currentBounds = new RectangleF(new PointF(param.bounds.x, param.bounds.y), this.currentGraphics.clientSize);\n if (this.Grid.rows.count !== 0) {\n this.currentBounds.width = (param.bounds.width > 0) ? param.bounds.width :\n (this.currentBounds.width - this.Grid.rows.getRow(0).cells.getCell(0).style.borders.left.width / 2);\n }\n else if (this.Grid.headers.count !== 0) {\n // this.currentBounds.width = (param.bounds.width > 0) ? param.bounds.width : (this.currentBounds.width -\n // this.Grid.headers.getHeader(0).cells.getCell(0).style.borders.left.width / 2);\n this.currentBounds.width = param.bounds.width;\n }\n else {\n throw Error('Please add row or header into grid');\n }\n this.startLocation = new PointF(param.bounds.x, param.bounds.y);\n // if (this.Grid.style.allowHorizontalOverflow && this.currentBounds.width > this.currentGraphics.clientSize.width) {\n // this.currentBounds.width = this.currentGraphics.clientSize.width;\n // this.currentBounds.width -= this.currentBounds.x;\n // }\n // if (this.Grid.isChildGrid) {\n // this.childheight = param.bounds.height;\n // }\n // if (param.format !== null && param.format.usePaginateBounds) {\n // if (param.format.paginateBounds.height > 0) {\n // this.currentBounds.height = param.format.paginateBounds.height;\n // }\n //} else \n if (param.bounds.height > 0 && !this.Grid.isChildGrid) {\n this.currentBounds.height = param.bounds.height;\n }\n if (!this.Grid.isChildGrid) {\n this.hType = this.Grid.style.horizontalOverflowType;\n }\n if (!this.Grid.style.allowHorizontalOverflow) {\n this.columnRanges = [];\n this.Grid.measureColumnsWidth(this.currentBounds);\n this.columnRanges.push([0, this.Grid.columns.count - 1]);\n }\n else {\n this.Grid.measureColumnsWidth();\n this.determineColumnDrawRanges();\n }\n if (this.Grid.hasRowSpanSpan) {\n for (var i = 0; i < this.Grid.rows.count; i++) {\n if (this.Grid.rows.getRow(i).height !== -1 && !this.Grid.rows.getRow(i).isRowHeightSet) {\n this.Grid.rows.getRow(i).isRowHeightSet = true;\n }\n }\n }\n var result = this.layoutOnPage(param);\n return result;\n };\n // /* tslint:enable */\n /**\n * `Determines the column draw ranges`.\n * @private\n */\n PdfGridLayouter.prototype.determineColumnDrawRanges = function () {\n var startColumn = 0;\n var endColumn = 0;\n var cellWidths = 0;\n var availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x;\n for (var i = 0; i < this.Grid.columns.count; i++) {\n cellWidths += this.Grid.columns.getColumn(i).width;\n if (cellWidths >= availableWidth) {\n var subWidths = 0;\n for (var j = startColumn; j <= i; j++) {\n subWidths += this.Grid.columns.getColumn(j).width;\n if (subWidths > availableWidth) {\n break;\n }\n endColumn = j;\n }\n this.columnRanges.push([startColumn, endColumn]);\n startColumn = endColumn + 1;\n endColumn = startColumn;\n cellWidths = (endColumn <= i) ? this.Grid.columns.getColumn(i).width : 0;\n }\n }\n // if (startColumn !== this.columns.Count) {\n this.columnRanges.push([startColumn, this.Grid.columns.count - 1]);\n // }\n };\n /**\n * `Layouts the on page`.\n * @private\n */\n PdfGridLayouter.prototype.layoutOnPage = function (param) {\n /* tslint:disable */\n this.pageBounds.x = param.bounds.x;\n this.pageBounds.y = param.bounds.y;\n this.pageBounds.height = param.bounds.height;\n var format = this.getFormat(param.format);\n var endArgs = null;\n var result = null;\n var layoutedPages = new TemporaryDictionary();\n var startPage = param.page;\n var isParentCell = false;\n var cellBounds = [];\n for (var index = 0; index < this.columnRanges.length; index++) {\n var range = this.columnRanges[index];\n this.cellStartIndex = range[0];\n this.cellEndIndex = range[1];\n var returnObject = this.raiseBeforePageLayout(this.currentPage, this.currentBounds, this.currentRowIndex);\n this.currentBounds = returnObject.currentBounds;\n this.currentRowIndex = returnObject.currentRowIndex;\n // if (returnObject.returnValue) {\n // result = new PdfGridLayoutResult(this.currentPage, this.currentBounds);\n // break;\n // }\n //Draw Headers.\n var drawHeader = void 0;\n for (var i_1 = 0; i_1 < this.Grid.headers.count; i_1++) {\n var row = this.Grid.headers.getHeader(i_1);\n var headerHeight = this.currentBounds.y;\n // RowLayoutResult\n var headerResult = this.drawRow(row);\n // if (headerHeight === this.currentBounds.y) {\n // drawHeader = true;\n // if (PdfGrid.repeatRowIndex === -1) {\n // PdfGrid.repeatRowIndex = this.rows.getRow.indexOf(row);\n // }\n // } else {\n drawHeader = false;\n // }\n }\n var i = 0;\n var length_1 = this.Grid.rows.count;\n var repeatRow = void 0;\n var startingHeight = 0;\n var flag = true;\n //Here is to draw parent Grid and Cells\n cellBounds = [];\n //Draw row by row with the specified cell range.\n for (var j = 0; j < this.Grid.rows.count; j++) {\n var row = this.Grid.rows.getRow(j);\n i++;\n this.currentRowIndex = i - 1;\n var originalHeight = this.currentBounds.y;\n startPage = this.currentPage;\n PdfGridLayouter.repeatRowIndex = -1;\n if (flag && row.grid.isChildGrid) {\n startingHeight = originalHeight;\n flag = false;\n }\n var rowResult = null;\n ///rowResult = this.drawRow(row);\n /*if(!row.isrowFinish) {\n if(!row.grid.isgridSplit){\n rowResult = this.drawRow(row);\n row.isrowFinish = true;\n row.isrowDraw = true;\n } else {\n if(!row.isrowDraw){\n rowResult = this.drawRow(row);\n row.isrowFinish = true;\n row.isrowDraw = true;\n row.grid.isgridSplit = false;\n } else {\n rowResult = null;\n break;\n }\n }\n }\n else {\n //row.isrowFinish = false;\n //rowResult = this.drawRow(row);\n rowResult = null;\n break;\n \n } */\n if (this.Grid.splitChildRowIndex == -1) {\n rowResult = this.drawRow(row);\n row.isrowFinish = true;\n }\n else {\n if (row.grid.ParentCell.row.grid.isGridSplit && this.Grid.splitChildRowIndex <= row.rowIndex) {\n rowResult = this.drawRow(row);\n row.isrowFinish = true;\n }\n else if (row.isrowFinish) {\n continue;\n }\n else {\n break;\n }\n }\n //rowResult = this.drawRow(row);\n cellBounds.push(rowResult.bounds.width);\n /*if (row.isRowBreaksNextPage)\n {\n let x : number = 0;\n for (let l : number = 0; l < row.cells.count; l++)\n {\n let isNestedRowBreak : boolean = false;\n if (row.height == row.cells.getCell(l).height)\n {\n let n : number;\n let grid : PdfGrid = row.cells.getCell(l).value as PdfGrid;\n for (let m : number = grid.rows.count; 0 < m; m--)\n {\n if ((grid.rows.getRow(m - 1).rowBreakHeight > 0))\n {\n isNestedRowBreak = true;\n break;\n }\n if (grid.rows.getRow(m - 1).isRowBreaksNextPage)\n {\n row.rowBreakHeightValue = grid.rows.getRow(m - 1).rowBreakHeightValue;\n break;\n }\n row.rowBreakHeightValue += grid.rows.getRow(m - 1).height;\n }\n }\n if (isNestedRowBreak)\n break;\n }\n for (let j : number = 0; j < row.cells.count; j++)\n {\n\n if (row.height > row.cells.getCell(j).height)\n {\n row.cells.getCell(j).value = \" \";\n let rect : RectangleF ;\n let page : PdfPage = this.getNextPage(this.currentPage);\n let section : PdfSection = this.currentPage.section;\n let index : number = section.indexOf(page);\n for (let k : number = 0; k < (section.count - 1) - index; k++)\n {\n rect = new RectangleF(x, 0, row.grid.columns.getColumn(j).width, page.getClientSize().height);\n PdfGridLayouter.repeatRowIndex = -1;\n row.cells.getCell(j).draw(page.graphics, rect, false);\n page = this.getNextPage(page);\n }\n rect = new RectangleF(x, 0, row.grid.columns.getColumn(j).width, row.rowBreakHeightValue);\n\n row.cells.getCell(j).draw(page.graphics, rect, false);\n }\n x += row.grid.columns.getColumn(j).width;\n }\n }*/\n //if height remains same, it is understood that row is not drawn in the page\n if (originalHeight === this.currentBounds.y) {\n repeatRow = true;\n PdfGridLayouter.repeatRowIndex = this.Grid.rows.rowCollection.indexOf(row);\n }\n else {\n repeatRow = false;\n PdfGridLayouter.repeatRowIndex = -1;\n }\n while (!rowResult.isFinish && startPage != null) {\n var tempResult = this.getLayoutResult();\n /*if (startPage != this.currentPage)\n {\n if (row.grid.isChildGrid && row.grid.ParentCell != null)\n {\n let bounds : RectangleF= new RectangleF(new PointF(format.paginateBounds.x,format.paginateBounds.y), new SizeF(param.bounds.width, tempResult.bounds.height));\n bounds.x += param.bounds.x;\n if (row.grid.ParentCell.row.grid.style.cellPadding != null)\n {\n bounds.y += row.grid.ParentCell.row.grid.style.cellPadding.top;\n if (bounds.height > this.currentPageBounds.height)\n {\n bounds.height = this.currentPageBounds.height - bounds.y;\n bounds.height -= (row.grid.ParentCell.row.grid.style.cellPadding.bottom);\n }\n }\n // Draw border for cells in the nested grid cell's row.\n for (let c : number = 0; c < row.cells.count; c++)\n {\n let cell : PdfGridCell = row.cells.getCell(c);\n let cellWidth : number= 0;\n if (cell.columnSpan > 1)\n {\n for (; c < cell.columnSpan; c++)\n cellWidth += row.grid.columns.getColumn(c).width;\n }\n else\n cellWidth = Math.max(cell.width, row.grid.columns.getColumn(c).width);\n cell.drawCellBorders(this.currentGraphics, new RectangleF(new PointF(bounds.x,bounds.y), new SizeF(cellWidth, bounds.height)));\n bounds.x += cellWidth;\n c += (cell.columnSpan - 1);\n }\n }\n }\n */\n endArgs = this.raisePageLayouted(tempResult);\n if (endArgs.cancel || repeatRow)\n break;\n else if (this.Grid.allowRowBreakAcrossPages) {\n //If there is no space in the current page, add new page and then draw the remaining row.\n this.currentPage = this.getNextPageformat(format);\n originalHeight = this.currentBounds.y;\n var location_1 = new PointF(PdfBorders.default.right.width / 2, PdfBorders.default.top.width / 2);\n if ((format.paginateBounds.x === 0 && format.paginateBounds.y === 0 && format.paginateBounds.width === 0 &&\n format.paginateBounds.height === 0) && (this.startLocation.x === location_1.x && this.startLocation.y === location_1.y)) {\n this.currentBounds.x += this.startLocation.x;\n this.currentBounds.y += this.startLocation.y;\n }\n if (this.Grid.isChildGrid && row.grid.ParentCell != null) {\n if (this.Grid.ParentCell.row.grid.style.cellPadding != null) {\n if (row.rowBreakHeight + this.Grid.ParentCell.row.grid.style.cellPadding.top < this.currentBounds.height) {\n this.currentBounds.y = this.Grid.ParentCell.row.grid.style.cellPadding.top;\n }\n }\n }\n if (row.grid.ParentCell != null) {\n row.grid.ParentCell.row.isRowBreaksNextPage = true;\n row.grid.ParentCell.row.rowBreakHeightValue = row.rowBreakHeight + this.Grid.ParentCell.row.grid.style.cellPadding.top + this.Grid.ParentCell.row.grid.style.cellPadding.bottom;\n for (var i_2 = row.rowIndex + 1; i_2 < row.grid.rows.count; i_2++) {\n row.grid.ParentCell.row.rowBreakHeightValue += row.grid.rows.getRow(i_2).height;\n }\n //row.rowBreakHeight = row.grid.ParentCell.row.rowBreakHeightValue;\n }\n /*if (row.noOfPageCount > 1)\n {\n let temp : number = row.rowBreakHeightValue;\n for (let j : number = 1; j < row.noOfPageCount; j++)\n {\n row.rowBreakHeightValue = 0;\n row.height = ((row.noOfPageCount - 1) * this.currentPage.getClientSize().height);\n this.drawRow(row);\n this.currentPage = this.getNextPageformat(format);\n startPage = this.currentPage;\n }\n row.rowBreakHeightValue = temp;\n row.noOfPageCount = 1;\n rowResult = this.drawRow(row);\n } else {\n rowResult = this.drawRow(row);\n }\n /*if(row.grid.isChildGrid){\n row.isrowFinish = false;\n row.isrowDraw = false;\n row.grid.isgridSplit = true;\n row.grid.ParentCell.row.grid.isgridSplit = true;\n //rowResult.isFinish = false;\n break;\n }*/\n if (row.grid.isChildGrid) {\n //row.grid.isgridSplit = true;\n row.isrowFinish = false;\n //row.grid.ParentCell.row.grid.isgridSplit = true;\n row.grid.splitChildRowIndex = row.rowIndex;\n row.grid.ParentCell.row.grid.splitChildRowIndex = row.grid.ParentCell.row.rowIndex;\n if (row.grid.ParentCell.row.grid.isGridSplit) {\n row.grid.ParentCell.row.noOfPageCount += 1;\n row.grid.ParentCell.row.grid.isGridSplit = false;\n }\n break;\n }\n if (row.noOfPageCount < 1) {\n if (row.grid.splitChildRowIndex != -1) {\n row.grid.isGridSplit = true;\n }\n if (row.style.border != null && ((row.style.border.left != null && row.style.border.left.width !== 1)\n || (row.style.border.top != null && row.style.border.top.width !== 1))) {\n var x = row.style.border.left.width / 2;\n var y = row.style.border.top.width / 2;\n if (this.currentBounds.x === PdfBorders.default.right.width / 2 && this.currentBounds.y === PdfBorders.default.right.width / 2) {\n var newBound = new RectangleF(x, y, this.currentBounds.width, this.currentBounds.height);\n this.currentBounds = newBound;\n }\n }\n if (this.Grid.repeatHeader) {\n for (var j_1 = 0; j_1 < this.Grid.headers.count; j_1++) {\n var headerRepeat = this.Grid.headers.getHeader(j_1);\n this.drawRow(headerRepeat);\n }\n }\n rowResult = this.drawRow(row);\n if (row.noOfPageCount >= 1) {\n var temp = row.rowBreakHeightValue;\n for (var j_2 = 0; j_2 < row.noOfPageCount; j_2++) {\n //this.currentPage.section.add();\n var tempResult1 = this.getLayoutResult();\n endArgs = this.raisePageLayouted(tempResult1);\n this.currentPage = this.getNextPageformat(format);\n originalHeight = this.currentBounds.y;\n //row.rowBreakHeightValue = 0;\n if (row.grid.splitChildRowIndex != -1) {\n row.grid.isGridSplit = true;\n }\n this.currentBounds.y = 0.5;\n if (this.Grid.repeatHeader) {\n for (var i_3 = 0; i_3 < this.Grid.headers.count; i_3++) {\n var header = this.Grid.headers.getHeader(i_3);\n this.drawRow(header);\n }\n }\n //row.height = ((row.noOfPageCount - 1) * this.currentPage.getClientSize().height);\n this.drawRow(row);\n }\n // row.rowBreakHeight = temp;\n // row.noOfPageCount = 1;\n // rowResult = this.drawRow(row);\n }\n row.grid.splitChildRowIndex = -1;\n row.grid.isGridSplit = false;\n rowResult.isFinish = true;\n //row.NestedGridLayoutResult.bounds.height = row.rowBreakHeightValue;\n //this.currentBounds.y = rowResult.bounds.y;\n for (var i_4 = 0; i_4 < row.cells.count; i_4++) {\n if (row.cells.getCell(i_4).value instanceof PdfGrid) {\n row.cells.getCell(i_4).value.splitChildRowIndex = -1;\n }\n }\n }\n }\n // else if (!this.Grid.allowRowBreakAcrossPages && i < length)\n // {\n // this.currentPage = this.getNextPageformat(format);\n // break;\n // }\n // else if (i >= length)\n // break;\n }\n if (!rowResult.isFinish && startPage !== null && format.layout !== PdfLayoutType.OnePage && repeatRow) {\n // During pagination, cell position is maintained here.\n this.startLocation.x = this.currentBounds.x;\n var isAddNextPage = false;\n this.currentPage = this.getNextPageformat(format);\n /*if (!this.Grid.isSingleGrid)\n {\n for ( let j : number= 0; j < this.Grid.rows.count; j++)\n {\n let isWidthGreaterthanParent : boolean = false;\n for (let k : number = 0; k < this.Grid.rows.getRow(j).cells.count; k++)\n {\n if (this.Grid.rows.getRow(j).cells.getCell(k).width > this.currentPageBounds.width)\n isWidthGreaterthanParent = true;\n }\n if (isWidthGreaterthanParent && this.Grid.rows.getRow(j).cells.getCell(this.rowBreakPageHeightCellIndex).pageCount > 0)\n {\n isAddNextPage = true;\n }\n }\n }\n if (!this.Grid.isRearranged && isAddNextPage)\n {\n let section : PdfSection = this.currentPage.section;\n \n //this.currentPage = section.add();\n \n this.currentGraphics = this.currentPage.graphics;\n this.currentBounds = new RectangleF(new PointF(0,0), this.currentPage.getClientSize());\n \n let pageindex : number = (this.currentGraphics.page as PdfPage).section.indexOf(this.currentGraphics.page as PdfPage);\n }\n else\n {\n this.currentPage = this.getNextPageformat(format);\n }\n if (format.paginateBounds.y == 0)\n this.currentBounds.y = PdfBorders.default.top.width/2;\n else\n {\n this.currentBounds.y = format == null ? 0 : format.paginateBounds.y;\n \n }\n if (this.raiseBeforePageLayout(this.currentPage, this.currentBounds, this.currentRowIndex))\n break;*/\n if ((param.format !== null) && !param.format.usePaginateBounds && param.bounds !== null &&\n param.bounds.height > 0 && !this.Grid.isChildGrid) {\n this.currentBounds.height = param.bounds.height;\n }\n if ((param.format !== null) && !param.format.usePaginateBounds && param.bounds !== null &&\n param.bounds.y > 0 && !this.Grid.isChildGrid) {\n this.currentBounds.y = param.bounds.y;\n }\n this.startLocation.y = this.currentBounds.y;\n if ((format.paginateBounds.x === format.paginateBounds.y) &&\n (format.paginateBounds.y === format.paginateBounds.height) &&\n (format.paginateBounds.height === format.paginateBounds.width) && (format.paginateBounds.width === 0)) {\n this.currentBounds.x += this.startLocation.x;\n }\n if (this.currentBounds.x === PdfBorders.default.left.width / 2) {\n this.currentBounds.y += this.startLocation.x;\n }\n if (this.Grid.repeatHeader) {\n for (var i_5 = 0; i_5 < this.Grid.headers.count; i_5++) {\n var header = this.Grid.headers.getHeader(i_5);\n this.drawRow(header);\n }\n }\n this.drawRow(row);\n if (this.currentPage !== null && !layoutedPages.containsKey(this.currentPage)) {\n layoutedPages.add(this.currentPage, range);\n }\n }\n if (row.NestedGridLayoutResult != null) {\n // Position for next row in the grid.\n this.currentPage = row.NestedGridLayoutResult.page;\n this.currentGraphics = this.currentPage.graphics; //If not, next row will not be drawn in the layouted page.\n this.startLocation = new PointF(row.NestedGridLayoutResult.bounds.x, row.NestedGridLayoutResult.bounds.y);\n var recalHeight = this.ReCalculateHeight(row, row.NestedGridLayoutResult.bounds.height);\n this.currentBounds.y = recalHeight;\n //this.currentBounds.y = row.NestedGridLayoutResult.bounds.height;\n if (startPage != this.currentPage) {\n var secion = this.currentPage.section;\n var startIndex = secion.indexOf(startPage) + 1;\n var endIndex = secion.indexOf(this.currentPage);\n for (var page = startIndex; page < endIndex + 1; page++) {\n var pageGraphics = this.currentPage.graphics;\n var location_2 = new PointF(format.paginateBounds.x, format.paginateBounds.y);\n var height = page == endIndex ? (row.NestedGridLayoutResult.bounds.height - param.bounds.y) :\n (this.currentBounds.height - location_2.y);\n if (height <= pageGraphics.clientSize.height)\n height += param.bounds.y;\n // if (row.grid.isChildGrid && row.grid.ParentCell != null)\n // location.x += param.bounds.x;\n location_2.y = format == null ? 0.5 : format.paginateBounds.y;\n // Draw border for last paginated row containing nested grid.\n for (var c = 0; c < row.cells.count; c++) {\n var cell = row.cells.getCell(c);\n var cellWidth = 0;\n var totalwidth = 0;\n if (cell.value instanceof PdfGrid) {\n for (var i_6 = 0; i_6 < cell.value.columns.count; i_6++) {\n totalwidth += cell.value.columns.getColumn(i_6).columnWidth;\n }\n }\n else {\n totalwidth = cell.width;\n }\n // if (cell.columnSpan > 1)\n // {\n // for (; c < cell.columnSpan; c++)\n // cellWidth += row.grid.columns.getColumn(c).width;\n // }\n // else\n cellWidth = Math.max(totalwidth, row.grid.columns.getColumn(c).width);\n cell.drawCellBorders(pageGraphics, new RectangleF(location_2, new SizeF(cellWidth, height)));\n location_2.x += cellWidth;\n c += (cell.columnSpan - 1);\n }\n }\n // So, nested grid drawing is completed for the current row. Update page.\n // Otherwise, the next nested grid of the parent will draw borders from start.\n startPage = this.currentPage;\n }\n }\n }\n var isPdfGrid = false;\n var maximumCellBoundsWidth = 0;\n if (cellBounds.length > 0) {\n maximumCellBoundsWidth = cellBounds[0];\n }\n var largeNavigatePage = [[1, 2]];\n for (var c = 0; c < this.Grid.rows.count; c++) {\n if (this.cellEndIndex != -1 && this.Grid.rows.getRow(c).cells.getCell(this.cellEndIndex).value instanceof PdfGrid) {\n var grid = this.Grid.rows.getRow(c).cells.getCell(this.cellEndIndex).value;\n this.rowLayoutBoundsWidth = grid.rowLayoutBoundsWidth;\n isPdfGrid = true;\n // if (largeNavigatePage[0][0] < grid.listOfNavigatePages.length)\n // {\n // largeNavigatePage[0][0] = grid.listOfNavigatePages.length;\n // largeNavigatePage[0][1] = cellBounds[c];\n // }\n // else if ((largeNavigatePage[0][0] == grid.listOfNavigatePages.length) && (largeNavigatePage[0][1] < cellBounds[c]))\n // {\n // largeNavigatePage[0][1] = cellBounds[c];\n // }\n }\n }\n if (!isPdfGrid && cellBounds.length > 0) {\n for (var c = 0; c < i - 1; c++) {\n if (maximumCellBoundsWidth < cellBounds[c]) {\n maximumCellBoundsWidth = cellBounds[c];\n }\n }\n this.rowLayoutBoundsWidth = maximumCellBoundsWidth;\n }\n else {\n this.rowLayoutBoundsWidth = largeNavigatePage[0][1];\n }\n if (this.columnRanges.indexOf(range) < this.columnRanges.length - 1\n && startPage != null && format.layout != PdfLayoutType.OnePage) {\n isParentCell = this.Grid.isChildGrid;\n if (largeNavigatePage[0][0] != 0) {\n var section = this.currentPage.section;\n var pageIndex = section.indexOf(this.currentPage);\n this.currentGraphics = this.currentPage.graphics;\n this.currentBounds = new RectangleF(new PointF(0, 0), this.currentPage.getClientSize());\n var pageindex = this.currentGraphics.page.section.indexOf(this.currentGraphics.page);\n }\n else {\n this.currentPage = this.getNextPageformat(format);\n }\n // let locationGrid : PointF= new PointF(PdfBorders.default.right.width / 2, PdfBorders.default.top.width / 2);\n // if (format.paginateBounds == new RectangleF(0,0,0,0) && this.startLocation == locationGrid)\n // {\n // this.currentBounds.x += this.startLocation.x;\n // this.currentBounds.y += this.startLocation.y;\n // }\n }\n if (this.columnRanges.length - 1 !== index && this.columnRanges.length > 1 && format.layout !== PdfLayoutType.OnePage) {\n this.currentPage = this.getNextPageformat(format);\n if ((format.paginateBounds.x === format.paginateBounds.y) && (format.paginateBounds.y === format.paginateBounds.height)\n && (format.paginateBounds.height === format.paginateBounds.width) && (format.paginateBounds.width === 0)) {\n this.currentBounds.x += this.startLocation.x;\n this.currentBounds.y += this.startLocation.y;\n //this.currentBounds.height = this.pageBounds.height;\n }\n }\n }\n result = this.getLayoutResult();\n if (this.Grid.style.allowHorizontalOverflow && this.Grid.style.horizontalOverflowType == PdfHorizontalOverflowType.NextPage) {\n this.reArrangePages(layoutedPages);\n }\n this.raisePageLayouted(result);\n return result;\n };\n /* tslint:enable */\n /**\n * Gets the `next page`.\n * @private\n */\n PdfGridLayouter.prototype.getNextPageformat = function (format) {\n var section = this.currentPage.section;\n var nextPage = null;\n var index = section.indexOf(this.currentPage);\n this.flag = false;\n if (index === section.count - 1) {\n nextPage = section.add();\n }\n else {\n nextPage = section.getPages()[index + 1];\n }\n this.currentGraphics = nextPage.graphics;\n var pageindex = this.currentGraphics.page.section.indexOf(this.currentGraphics.page);\n if (!(this.listOfNavigatePages.indexOf(pageindex) !== -1)) {\n this.listOfNavigatePages.push(pageindex);\n }\n this.currentBounds = new RectangleF(new PointF(0, 0), nextPage.getClientSize());\n // if ((format.paginateBounds.x !== format.paginateBounds.y) && (format.paginateBounds.y !== format.paginateBounds.height)\n // && (format.paginateBounds.height !== format.paginateBounds.width) && (format.paginateBounds.width !== 0)) {\n // this.currentBounds.x = format.paginateBounds.x;\n // this.currentBounds.y = format.paginateBounds.y;\n // this.currentBounds.height = format.paginateBounds.height;\n // }\n return nextPage;\n };\n PdfGridLayouter.prototype.CheckIfDefaultFormat = function (format) {\n var defaultFormat = new PdfStringFormat();\n return (format.alignment === defaultFormat.alignment && format.characterSpacing === defaultFormat.characterSpacing &&\n format.clipPath === defaultFormat.clipPath && format.firstLineIndent === defaultFormat.firstLineIndent &&\n format.horizontalScalingFactor === defaultFormat.horizontalScalingFactor &&\n format.lineAlignment === defaultFormat.lineAlignment\n && format.lineLimit === defaultFormat.lineLimit && format.lineSpacing === defaultFormat.lineSpacing &&\n format.measureTrailingSpaces === defaultFormat.measureTrailingSpaces && format.noClip === defaultFormat.noClip &&\n format.paragraphIndent === defaultFormat.paragraphIndent && format.rightToLeft === defaultFormat.rightToLeft &&\n format.subSuperScript === defaultFormat.subSuperScript && format.wordSpacing === defaultFormat.wordSpacing &&\n format.wordWrap === defaultFormat.wordWrap);\n };\n /**\n * `Raises BeforeCellDraw event`.\n * @private\n */\n PdfGridLayouter.prototype.RaiseBeforeCellDraw = function (graphics, rowIndex, cellIndex, bounds, value, style) {\n var args = null;\n if (this.Grid.raiseBeginCellDraw) {\n args = new PdfGridBeginCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, style);\n this.Grid.onBeginCellDraw(args);\n style = args.style;\n }\n return style;\n };\n /**\n * `Raises AfterCellDraw event`.\n * @private\n */\n PdfGridLayouter.prototype.raiseAfterCellDraw = function (graphics, rowIndex, cellIndex, bounds, value, cellstyle) {\n var args = null;\n if (this.Grid.raiseEndCellDraw) {\n args = new PdfGridEndCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, cellstyle);\n this.Grid.onEndCellDraw(args);\n }\n };\n PdfGridLayouter.prototype.reArrangePages = function (layoutedPages) {\n var document = this.currentPage.document;\n var pages = [];\n var keys = layoutedPages.keys();\n var values = layoutedPages.values();\n for (var i = 0; i < keys.length; i++) {\n var page = keys[i];\n page.section = null;\n pages.push(page);\n document.pages.remove(page);\n }\n /* tslint:disable */\n for (var i = 0; i < layoutedPages.size(); i++) {\n var count = 0;\n for (var j = i, count_1 = (layoutedPages.size() / this.columnRanges.length); j < layoutedPages.size(); j += count_1) {\n var page = pages[j];\n if (document.pages.indexOf(page) === -1) {\n document.pages.add(page);\n }\n }\n }\n /* tslint:enable */\n };\n /**\n * Gets the `layout result`.\n * @private\n */\n PdfGridLayouter.prototype.getLayoutResult = function () {\n if (this.Grid.isChildGrid && this.Grid.allowRowBreakAcrossPages) {\n for (var i = 0; i < this.Grid.rows.count; i++) {\n var row = this.Grid.rows.getRow(i);\n if (row.rowBreakHeight > 0 && row.repeatFlag) {\n this.startLocation.y = this.currentPage.origin.y;\n }\n }\n }\n var bounds;\n if (!this.isChanged) {\n bounds = new RectangleF(this.startLocation, new SizeF(this.currentBounds.width, this.currentBounds.y -\n this.startLocation.y));\n }\n // else {\n // bounds = new RectangleF(this.currentLocation, new SizeF(this.currentBounds.width, this.currentBounds.y -\n // this.currentLocation.y));\n // }\n /* tslint:enable */\n return new PdfGridLayoutResult(this.currentPage, bounds);\n };\n /**\n * `Recalculate row height` for the split cell to be drawn.\n * @private\n */\n PdfGridLayouter.prototype.ReCalculateHeight = function (row, height) {\n var newHeight = 0.0;\n for (var i = this.cellStartIndex; i <= this.cellEndIndex; i++) {\n if (!(row.cells.getCell(i).remainingString === null || row.cells.getCell(i).remainingString === '' ||\n typeof row.cells.getCell(i).remainingString === 'undefined')) {\n newHeight = Math.max(newHeight, row.cells.getCell(i).measureHeight());\n }\n }\n return Math.max(height, newHeight);\n };\n /**\n * `Raises BeforePageLayout event`.\n * @private\n */\n PdfGridLayouter.prototype.raiseBeforePageLayout = function (currentPage, currentBounds, currentRow) {\n var cancel = false;\n if (this.Grid.raiseBeginPageLayout) {\n var args = new PdfGridBeginPageLayoutEventArgs(currentBounds, currentPage, currentRow);\n this.Grid.onBeginPageLayout(args);\n // if (currentBounds !== args.Bounds) {\n // this.isChanged = true;\n // this.currentLocation = new PointF(args.Bounds.x, args.Bounds.y);\n // this.measureColumnsWidth(new RectangleF(new PointF(args.Bounds.x, args.Bounds.y) ,\n // new SizeF(args.Bounds.width + args.Bounds.x ,\n // args.Bounds.height)));\n // }\n cancel = args.cancel;\n currentBounds = args.bounds;\n currentRow = args.startRowIndex;\n }\n return { returnValue: cancel, currentBounds: currentBounds, currentRowIndex: currentRow };\n };\n /**\n * `Raises PageLayout event` if needed.\n * @private\n */\n PdfGridLayouter.prototype.raisePageLayouted = function (result) {\n var args = new PdfGridEndPageLayoutEventArgs(result);\n if (this.Grid.raiseEndPageLayout) {\n this.Grid.onEndPageLayout(args);\n }\n return args;\n };\n PdfGridLayouter.prototype.drawRow = function (row, result, height) {\n if (typeof result === 'undefined') {\n //.. Check if required space available.\n //.....If the row conains spans which falls through more than one page, then draw the row to next page. \n var result_1 = new RowLayoutResult();\n var rowHeightWithSpan = 0;\n var location_3 = new PointF(0, 0);\n var size = new SizeF(0, 0);\n var isHeader = false;\n if (row.rowSpanExists) {\n var maxSpan = 0;\n var currRowIndex = this.Grid.rows.rowCollection.indexOf(row);\n if (currRowIndex === -1) {\n currRowIndex = this.Grid.headers.indexOf(row);\n if (currRowIndex !== -1) {\n isHeader = true;\n }\n }\n for (var i = 0; i < row.cells.count; i++) {\n var cell = row.cells.getCell(i);\n maxSpan = Math.max(maxSpan, cell.rowSpan);\n }\n for (var i = currRowIndex; i < currRowIndex + maxSpan; i++) {\n rowHeightWithSpan += (isHeader ? this.Grid.headers.getHeader(i).height : this.Grid.rows.getRow(i).height);\n }\n // let rowMaxHeight : number = rowHeightWithSpan;\n // for (let i : number = 0; i < row.cells.count; i++ ) {\n // rowMaxHeight = rowMaxHeight > row.cells.getCell(i).height ? rowMaxHeight : row.cells.getCell(i).height;\n // }\n // let flag : boolean = true;\n // let nextRow : PdfGridRow = this.Grid.headers.getHeader(this.Grid.headers.indexOf(row) + 1);\n // for (let i : number = 0; i < nextRow.cells.count; i++ ) {\n // if (nextRow.cells.getCell(i).value !== '' && nextRow.cells.getCell(i).value !== undefined) {\n // flag = false;\n // break;\n // }\n // }\n // if ((rowMaxHeight > rowHeightWithSpan) && flag) {\n // row.height += (rowMaxHeight - rowHeightWithSpan);\n // } \n }\n var calculatedHeight = row.rowBreakHeight > 0.0 ? row.rowBreakHeight : row.height;\n if (this.Grid.isChildGrid && this.Grid.ParentCell != null) {\n //Split row only if row height exceeds page height and AllowRowBreakAcrossPages is true.\n // if (calculatedHeight + this.Grid.ParentCell.row.grid.style.cellPadding.bottom +\n // this.Grid.ParentCell.row.grid.style.cellPadding.top > this.currentPageBounds.height) {\n // if (this.Grid.allowRowBreakAcrossPages) {\n // result.isFinish = true;\n // if ( this.Grid.isChildGrid && row.rowBreakHeight > 0 ) {\n // if (this.Grid.ParentCell.row.grid.style.cellPadding !== null) {\n // this.currentBounds.y += this.Grid.ParentCell.row.grid.style.cellPadding.top;\n // }\n // this.currentBounds.x = this.startLocation.x;\n // }\n // result.bounds = this.currentBounds ;\n // this.drawRowWithBreak(result, row, calculatedHeight);\n // } else {\n // //If AllowRowBreakAcrossPages is not true, draw the row till it fits the page. \n // if (this.Grid.ParentCell.row.grid.style.cellPadding != null) {\n // this.currentBounds.y += this.Grid.ParentCell.row.grid.style.cellPadding.top;\n // calculatedHeight = this.currentBounds.height - this.currentBounds.y -\n // this.Grid.ParentCell.row.grid.style.cellPadding.bottom;\n // }\n // result.isFinish = false;\n // this.drawRow( row, result, calculatedHeight);\n // }\n // } else\n if (this.currentBounds.y + this.Grid.ParentCell.row.grid.style.cellPadding.bottom + calculatedHeight >\n this.currentPageBounds.height || this.currentBounds.y + this.Grid.ParentCell.row.grid.style.cellPadding.bottom\n + calculatedHeight > this.currentBounds.height || this.currentBounds.y +\n this.Grid.ParentCell.row.grid.style.cellPadding.bottom + rowHeightWithSpan > this.currentPageBounds.height) {\n //If a row is repeated and still cannot fit in page, proceed draw.\n if (this.Grid.ParentCell.row.grid.LayoutFormat.break === PdfLayoutBreakType.FitPage) {\n PdfGridLayouter.repeatRowIndex = this.Grid.rows.rowCollection.indexOf(row);\n this.Grid.splitChildRowIndex = this.Grid.rows.rowCollection.indexOf(row);\n }\n if (PdfGridLayouter.repeatRowIndex > -1 && PdfGridLayouter.repeatRowIndex === row.rowIndex) {\n if (this.Grid.allowRowBreakAcrossPages) {\n result_1.isFinish = true;\n // if (this.Grid.isChildGrid && row.rowBreakHeightValue > 0) {\n // // if (this.Grid.ParentCell.row.grid.style.cellPadding != null) {\n // // this.currentBounds.y += this.Grid.ParentCell.row.grid.style.cellPadding.top;\n // // }\n // this.currentBounds.x = this.startLocation.x;\n // }\n result_1.bounds = this.currentBounds;\n this.drawRowWithBreak(result_1, row, calculatedHeight);\n row.repeatFlag = true;\n row.repeatRowNumber = PdfGridLayouter.repeatRowIndex;\n }\n // else {\n // result.isFinish = false;\n // row.repeatFlag = false;\n // this.drawRow( row, result, calculatedHeight);\n // }\n }\n // else {\n // result.isFinish = false;\n // }\n }\n else {\n result_1.isFinish = true;\n if (row.grid.ParentCell.row.rowBreakHeightValue > 0) {\n row.repeatFlag = true;\n }\n else {\n row.repeatFlag = false;\n calculatedHeight = row.height;\n }\n if (this.Grid.isChildGrid && row.rowBreakHeight > 0) {\n if (this.Grid.ParentCell.row.grid.style.cellPadding != null) {\n calculatedHeight += this.Grid.ParentCell.row.grid.style.cellPadding.bottom;\n }\n }\n this.drawRow(row, result_1, calculatedHeight);\n }\n }\n else {\n //Split row only if row height exceeds page height and AllowRowBreakAcrossPages is true.\n if (calculatedHeight > this.currentPageBounds.height) {\n if (this.Grid.allowRowBreakAcrossPages) {\n result_1.isFinish = true;\n //result.bounds = this.currentBounds;\n this.drawRowWithBreak(result_1, row, calculatedHeight);\n row.isrowFinish = true;\n row.repeatFlag = true;\n if (row.grid.splitChildRowIndex !== -1) {\n result_1.isFinish = false;\n }\n }\n // else {\n // //If AllowRowBreakAcrossPages is not true, draw the row till it fits the page.\n // result.isFinish = false;\n // this.drawRow( row, result, calculatedHeight);\n // }\n }\n else if (this.currentBounds.y + calculatedHeight > this.currentPageBounds.height ||\n this.currentBounds.y + calculatedHeight > (this.currentBounds.height + this.startLocation.y) ||\n this.currentBounds.y + rowHeightWithSpan > this.currentPageBounds.height) {\n // If a row is repeated and still cannot fit in page, proceed draw.\n if (this.Grid.LayoutFormat.break === PdfLayoutBreakType.FitPage) {\n PdfGridLayouter.repeatRowIndex = this.Grid.rows.rowCollection.indexOf(row);\n }\n if (PdfGridLayouter.repeatRowIndex > -1 && PdfGridLayouter.repeatRowIndex === row.rowIndex) {\n if (this.Grid.allowRowBreakAcrossPages) {\n result_1.isFinish = true;\n this.drawRowWithBreak(result_1, row, calculatedHeight);\n row.repeatFlag = true;\n row.repeatRowNumber = PdfGridLayouter.repeatRowIndex;\n if (row.grid.splitChildRowIndex !== -1) {\n result_1.isFinish = false;\n }\n }\n // else {\n // result.isFinish = false;\n // this.drawRow(row, result, calculatedHeight);\n // }\n }\n else {\n result_1.isFinish = false;\n }\n }\n else {\n result_1.isFinish = true;\n this.drawRow(row, result_1, calculatedHeight);\n row.repeatFlag = false;\n }\n }\n return result_1;\n }\n else {\n var skipcell = false;\n var location_4 = new PointF(this.currentBounds.x, this.currentBounds.y);\n // if (row.grid.isChildGrid && row.grid.allowRowBreakAcrossPages && this.startLocation.x !== this.currentBounds.x && row.width <\n // this.currentPage.getClientSize().width) {\n // location.x = this.startLocation.x;\n // }\n result.bounds = new RectangleF(location_4, new SizeF(0, 0));\n height = this.ReCalculateHeight(row, height);\n for (var i = this.cellStartIndex; i <= this.cellEndIndex; i++) {\n var cancelSpans = ((i > this.cellEndIndex + 1) && (row.cells.getCell(i).columnSpan > 1));\n // let cancelSpans : boolean = false;\n if (!cancelSpans) {\n for (var j = 1; j < row.cells.getCell(i).columnSpan; j++) {\n row.cells.getCell(i + j).isCellMergeContinue = true;\n }\n }\n var size = new SizeF(this.Grid.columns.getColumn(i).width, height);\n // if (size.width > this.currentGraphics.clientSize.width) {\n // size.width = this.currentGraphics.clientSize.width;\n // }\n // if (this.Grid.isChildGrid && this.Grid.style.allowHorizontalOverflow) {\n // if (size.width >= this.currentGraphics.clientSize.width) {\n // size.width -= 2 * this.currentBounds.x;\n // }\n // }\n /* tslint:disable */\n if (!this.CheckIfDefaultFormat(this.Grid.columns.getColumn(i).format) &&\n this.CheckIfDefaultFormat(row.cells.getCell(i).stringFormat)) {\n row.cells.getCell(i).stringFormat = this.Grid.columns.getColumn(i).format;\n }\n var cellstyle = row.cells.getCell(i).style;\n var tempValue = ((typeof row.cells.getCell(i).value === 'string' &&\n row.cells.getCell(i).value !== null) ? row.cells.getCell(i).value : '');\n row.cells.getCell(i).style = this.RaiseBeforeCellDraw(this.currentGraphics, this.currentRowIndex, i, new RectangleF(location_4, size), tempValue, cellstyle);\n //row.cells.getCell(i).style = cellstyle;\n if (!skipcell) {\n if (row.cells.getCell(i).value instanceof PdfGrid) {\n var grid = row.cells.getCell(i).value;\n grid.parentCellIndex = i;\n }\n var stringResult = row.cells.getCell(i).draw(this.currentGraphics, new RectangleF(location_4, size), cancelSpans);\n if (row.grid.style.allowHorizontalOverflow && (row.cells.getCell(i).columnSpan > this.cellEndIndex ||\n i + row.cells.getCell(i).columnSpan > this.cellEndIndex + 1) && this.cellEndIndex < row.cells.count - 1) {\n row.rowOverflowIndex = this.cellEndIndex;\n }\n if (row.grid.style.allowHorizontalOverflow && (row.rowOverflowIndex > 0 && (row.cells.getCell(i).columnSpan >\n this.cellEndIndex || i + row.cells.getCell(i).columnSpan > this.cellEndIndex + 1)) &&\n row.cells.getCell(i).columnSpan - this.cellEndIndex + i - 1 > 0) {\n row.cells.getCell(row.rowOverflowIndex + 1).value = stringResult !== null ? (stringResult.remainder !== undefined) ?\n stringResult.remainder : '' : '';\n row.cells.getCell(row.rowOverflowIndex + 1).stringFormat = row.cells.getCell(i).stringFormat;\n row.cells.getCell(row.rowOverflowIndex + 1).style = row.cells.getCell(i).style;\n row.cells.getCell(row.rowOverflowIndex + 1).columnSpan = row.cells.getCell(i).columnSpan - this.cellEndIndex + i - 1;\n }\n }\n /* tslint:enable */\n tempValue = ((typeof row.cells.getCell(i).value === 'string' &&\n row.cells.getCell(i).value !== null) ? row.cells.getCell(i).value : '');\n if (!cancelSpans) {\n this.raiseAfterCellDraw(this.currentGraphics, this.currentRowIndex, i, new RectangleF(location_4, size), tempValue, row.cells.getCell(i).style);\n }\n if (row.cells.getCell(i).value instanceof PdfGrid) {\n var grid = row.cells.getCell(i).value;\n if (this.Grid.columns.getColumn(i).width >= this.currentGraphics.clientSize.width) {\n location_4.x = grid.rowLayoutBoundsWidth;\n location_4.x += grid.style.cellSpacing;\n }\n else {\n location_4.x += this.Grid.columns.getColumn(i).width;\n }\n }\n else {\n location_4.x += this.Grid.columns.getColumn(i).width;\n }\n }\n if (!row.rowMergeComplete || row.isRowHeightSet) {\n this.currentBounds.y += height;\n }\n result.bounds = new RectangleF(new PointF(result.bounds.x, result.bounds.y), new SizeF(location_4.x, location_4.y));\n }\n };\n PdfGridLayouter.prototype.drawRowWithBreak = function (result, row, calculateHeight) {\n var location = new PointF(this.currentBounds.x, this.currentBounds.y);\n if (row.grid.isChildGrid && row.grid.allowRowBreakAcrossPages && this.startLocation.x !== this.currentBounds.x) {\n location.x = this.startLocation.x;\n }\n result.bounds = new RectangleF(location, new SizeF(0, 0));\n this.gridHeight = row.rowBreakHeight > 0 ? this.currentPageBounds.height : 0;\n // Calculate the remaining height.\n if (row.grid.style.cellPadding.top + this.currentBounds.y + row.grid.style.cellPadding.bottom < this.currentPageBounds.height) {\n row.rowBreakHeight = this.currentBounds.y + calculateHeight - this.currentPageBounds.height;\n }\n // else {\n // row.rowBreakHeight = calculateHeight;\n // result.isFinish = false;\n // return;\n // }\n // No need to explicit break if the row height is equal to grid height.\n for (var i = 0; i < row.cells.count; i++) {\n var cell = row.cells.getCell(i);\n var cellHeight = cell.measureHeight();\n if (cellHeight === calculateHeight && cell.value instanceof PdfGrid) {\n row.rowBreakHeight = 0;\n }\n // else if (cellHeight === calculateHeight && (cell.value as PdfGrid) === null) {\n // row.rowBreakHeight = this.currentBounds.y + calculateHeight - this.currentPageBounds.height;\n // }\n }\n for (var i = this.cellStartIndex; i <= this.cellEndIndex; i++) {\n var cancelSpans = ((row.cells.getCell(i).columnSpan + i > this.cellEndIndex + 1) &&\n (row.cells.getCell(i).columnSpan > 1));\n // if (!cancelSpans) {\n // for (let k : number = 1; k < row.cells.getCell(i).columnSpan; k++) {\n // row.cells.getCell(i + k).isCellMergeContinue = true;\n // }\n //}\n var size = new SizeF(this.Grid.columns.getColumn(i).width, this.gridHeight > 0.0 ? this.gridHeight :\n this.currentPageBounds.height);\n // if (size.width === 0) {\n // size = new SizeF(row.cells.getCell(i).width, size.height);\n // }\n // if (!this.CheckIfDefaultFormat(this.Grid.columns.getColumn(i).format) &&\n // this.CheckIfDefaultFormat((row.cells.getCell(i).stringFormat))) {\n // row.cells.getCell(i).stringFormat = this.Grid.columns.getColumn(i).format;\n // }\n var cellstyle1 = row.cells.getCell(i).style;\n row.cells.getCell(i).style = cellstyle1;\n var skipcell = false;\n var stringResult = null;\n if (!skipcell) {\n stringResult = row.cells.getCell(i).draw(this.currentGraphics, new RectangleF(location, size), cancelSpans);\n }\n //If still row is to be drawn, set cell finished drawing cell as false and update the text to be drawn.\n if (row.rowBreakHeight > 0.0) {\n if (stringResult != null) {\n row.cells.getCell(i).FinishedDrawingCell = false;\n row.cells.getCell(i).remainingString = stringResult.remainder == null ? ' ' : stringResult.remainder;\n if (row.grid.isChildGrid) {\n row.rowBreakHeight = calculateHeight - stringResult.actualSize.height;\n }\n }\n }\n result.isFinish = (!result.isFinish) ? result.isFinish : row.cells.getCell(i).FinishedDrawingCell;\n // let tempValue : string = ((typeof row.cells.getCell(i).value === 'string' &&\n //row.cells.getCell(i).value !== null) ? row.cells.getCell(i).value : '') as string;\n // if (!cancelSpans) {\n // // this.raiseAfterCellDraw(this.currentGraphics, this.currentRowIndex, i,\n // // new RectangleF(location, size), tempValue, row.cells.getCell(i).style); \n // this.raiseAfterCellDraw(this.currentGraphics, this.currentRowIndex, i, new RectangleF(location, size),\n // (row.cells.getCell(i).value as string) ? row.cells.getCell(i).value.toString() : ' ',\n // row.cells.getCell(i).style);\n // } \n if (row.cells.getCell(i).value instanceof PdfGrid) {\n var grid = row.cells.getCell(i).value;\n this.rowBreakPageHeightCellIndex = i;\n // row.cells.getCell(i).pageCount = grid.listOfNavigatePages.length;\n // for (let j : number = 0;j= this.currentGraphics.clientSize.width) {\n location.x = this.rowLayoutBoundsWidth;\n location.x += grid.style.cellSpacing;\n }\n else {\n location.x += this.Grid.columns.getColumn(i).width;\n }\n }\n else {\n location.x += this.Grid.columns.getColumn(i).width;\n }\n }\n this.currentBounds.y += this.gridHeight > 0.0 ? this.gridHeight : calculateHeight;\n result.bounds = new RectangleF(new PointF(result.bounds.x, result.bounds.y), new SizeF(location.x, location.y));\n };\n /**\n * @hidden\n * @private\n */\n PdfGridLayouter.repeatRowIndex = -1;\n return PdfGridLayouter;\n}(ElementLayouter));\nexport { PdfGridLayouter };\n// recalculateBounds : boolean, clientSize : SizeF\n//Implementation\n/**\n * `Initializes` internal data.\n * @private\n */\n//Internal declaration\nvar PdfGridLayoutResult = /** @class */ (function (_super) {\n __extends(PdfGridLayoutResult, _super);\n /**\n * Constructor\n * @private\n */\n function PdfGridLayoutResult(page, bounds) {\n return _super.call(this, page, bounds) || this;\n }\n return PdfGridLayoutResult;\n}(PdfLayoutResult));\nexport { PdfGridLayoutResult };\n/**\n * `PdfGridLayoutFormat` class represents a flexible grid that consists of columns and rows.\n */\nvar PdfGridLayoutFormat = /** @class */ (function (_super) {\n __extends(PdfGridLayoutFormat, _super);\n /**\n * Initializes a new instance of the `PdfGridLayoutFormat` class.\n * @private\n */\n function PdfGridLayoutFormat(baseFormat) {\n return _super.call(this, baseFormat) || this;\n }\n return PdfGridLayoutFormat;\n}(PdfLayoutFormat));\nexport { PdfGridLayoutFormat };\nvar GridCellEventArgs = /** @class */ (function () {\n // Constructors\n /**\n * Initialize a new instance for `GridCellEventArgs` class.\n * @private\n */\n function GridCellEventArgs(graphics, rowIndex, cellIndex, bounds, value) {\n this.gridRowIndex = rowIndex;\n this.gridCellIndex = cellIndex;\n this.internalValue = value;\n this.gridBounds = bounds;\n this.pdfGraphics = graphics;\n }\n Object.defineProperty(GridCellEventArgs.prototype, \"rowIndex\", {\n // Properties\n /**\n * Gets the value of current `row index`.\n * @private\n */\n get: function () {\n return this.gridRowIndex;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GridCellEventArgs.prototype, \"cellIndex\", {\n /**\n * Gets the value of current `cell index`.\n * @private\n */\n get: function () {\n return this.gridCellIndex;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GridCellEventArgs.prototype, \"value\", {\n /**\n * Gets the actual `value` of current cell.\n * @private\n */\n get: function () {\n return this.internalValue;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GridCellEventArgs.prototype, \"bounds\", {\n /**\n * Gets the `bounds` of current cell.\n * @private\n */\n get: function () {\n return this.gridBounds;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GridCellEventArgs.prototype, \"graphics\", {\n /**\n * Gets the instance of `current graphics`.\n * @private\n */\n get: function () {\n return this.pdfGraphics;\n },\n enumerable: true,\n configurable: true\n });\n return GridCellEventArgs;\n}());\nexport { GridCellEventArgs };\nvar PdfGridBeginCellDrawEventArgs = /** @class */ (function (_super) {\n __extends(PdfGridBeginCellDrawEventArgs, _super);\n // Constructors\n /**\n * Initializes a new instance of the `StartCellLayoutEventArgs` class.\n * @private\n */\n function PdfGridBeginCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, style) {\n var _this = _super.call(this, graphics, rowIndex, cellIndex, bounds, value) || this;\n _this.style = style;\n return _this;\n }\n Object.defineProperty(PdfGridBeginCellDrawEventArgs.prototype, \"skip\", {\n // Properties\n /**\n * Gets or sets a value indicating whether the value of this cell should be `skipped`.\n * @private\n */\n get: function () {\n return this.bSkip;\n },\n set: function (value) {\n this.bSkip = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridBeginCellDrawEventArgs.prototype, \"style\", {\n /**\n * Gets or sets a `style` value of the cell.\n * @private\n */\n get: function () {\n return this.cellStyle;\n },\n set: function (value) {\n this.cellStyle = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGridBeginCellDrawEventArgs;\n}(GridCellEventArgs));\nexport { PdfGridBeginCellDrawEventArgs };\nvar PdfGridEndCellDrawEventArgs = /** @class */ (function (_super) {\n __extends(PdfGridEndCellDrawEventArgs, _super);\n // Constructors\n /**\n * Initializes a new instance of the `PdfGridEndCellLayoutEventArgs` class.\n * @private\n */\n function PdfGridEndCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, style) {\n var _this = _super.call(this, graphics, rowIndex, cellIndex, bounds, value) || this;\n _this.cellStyle = style;\n return _this;\n }\n Object.defineProperty(PdfGridEndCellDrawEventArgs.prototype, \"style\", {\n // Propertise\n /**\n * Get the `PdfGridCellStyle`.\n * @private\n */\n get: function () {\n return this.cellStyle;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGridEndCellDrawEventArgs;\n}(GridCellEventArgs));\nexport { PdfGridEndCellDrawEventArgs };\nvar PdfCancelEventArgs = /** @class */ (function () {\n function PdfCancelEventArgs() {\n }\n Object.defineProperty(PdfCancelEventArgs.prototype, \"cancel\", {\n // Properties\n /**\n * Gets and Sets the value of `cancel`.\n * @private\n */\n get: function () {\n return this.isCancel;\n },\n set: function (value) {\n this.isCancel = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfCancelEventArgs;\n}());\nexport { PdfCancelEventArgs };\nvar BeginPageLayoutEventArgs = /** @class */ (function (_super) {\n __extends(BeginPageLayoutEventArgs, _super);\n // Constructors\n /**\n * Initializes a new instance of the `BeginPageLayoutEventArgs` class with the specified rectangle and page.\n * @private\n */\n function BeginPageLayoutEventArgs(bounds, page) {\n var _this = _super.call(this) || this;\n _this.bounds = bounds;\n _this.pdfPage = page;\n return _this;\n }\n Object.defineProperty(BeginPageLayoutEventArgs.prototype, \"bounds\", {\n // Properties\n /**\n * Gets or sets value that indicates the lay outing `bounds` on the page.\n * @private\n */\n get: function () {\n return this.cellBounds;\n },\n set: function (value) {\n this.cellBounds = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BeginPageLayoutEventArgs.prototype, \"page\", {\n /**\n * Gets the `page` where the lay outing should start.\n * @private\n */\n get: function () {\n return this.pdfPage;\n },\n enumerable: true,\n configurable: true\n });\n return BeginPageLayoutEventArgs;\n}(PdfCancelEventArgs));\nexport { BeginPageLayoutEventArgs };\n/**\n * `EndPageLayoutEventArgs` class is alternate for end page layout events.\n */\nvar EndPageLayoutEventArgs = /** @class */ (function (_super) {\n __extends(EndPageLayoutEventArgs, _super);\n // Constructors\n /**\n * Initializes a new instance of the `EndPageLayoutEventArgs` class. with the specified 'PdfLayoutResult'.\n * @private\n */\n function EndPageLayoutEventArgs(result) {\n var _this = _super.call(this) || this;\n _this.layoutResult = result;\n return _this;\n }\n Object.defineProperty(EndPageLayoutEventArgs.prototype, \"result\", {\n // Properties\n /**\n * Gets the lay outing `result` of the page.\n * @private\n */\n get: function () {\n return this.layoutResult;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EndPageLayoutEventArgs.prototype, \"nextPage\", {\n /**\n * Gets or sets a value indicating the `next page` where the element should be layout.\n * @private\n */\n get: function () {\n return this.nextPdfPage;\n },\n set: function (value) {\n this.nextPdfPage = value;\n },\n enumerable: true,\n configurable: true\n });\n return EndPageLayoutEventArgs;\n}(PdfCancelEventArgs));\nexport { EndPageLayoutEventArgs };\n/**\n * `PdfGridBeginPageLayoutEventArgs` class is alternate for begin page layout events.\n */\nvar PdfGridBeginPageLayoutEventArgs = /** @class */ (function (_super) {\n __extends(PdfGridBeginPageLayoutEventArgs, _super);\n // Constructors\n /**\n * Initialize a new instance of `PdfGridBeginPageLayoutEventArgs` class.\n * @private\n */\n function PdfGridBeginPageLayoutEventArgs(bounds, page, startRow) {\n var _this = _super.call(this, bounds, page) || this;\n _this.startRow = startRow;\n return _this;\n }\n Object.defineProperty(PdfGridBeginPageLayoutEventArgs.prototype, \"startRowIndex\", {\n // Properties\n /**\n * Gets the `start row index`.\n * @private\n */\n get: function () {\n return this.startRow;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGridBeginPageLayoutEventArgs;\n}(BeginPageLayoutEventArgs));\nexport { PdfGridBeginPageLayoutEventArgs };\n/**\n * `PdfGridEndPageLayoutEventArgs` class is alternate for begin page layout events.\n */\nvar PdfGridEndPageLayoutEventArgs = /** @class */ (function (_super) {\n __extends(PdfGridEndPageLayoutEventArgs, _super);\n // Constructors\n /**\n * Initialize a new instance of `PdfGridEndPageLayoutEventArgs` class.\n * @private\n */\n function PdfGridEndPageLayoutEventArgs(result) {\n return _super.call(this, result) || this;\n }\n return PdfGridEndPageLayoutEventArgs;\n}(EndPageLayoutEventArgs));\nexport { PdfGridEndPageLayoutEventArgs };\nvar RowLayoutResult = /** @class */ (function () {\n //Constructors\n /**\n * Initializes a new instance of the `RowLayoutResult` class.\n * @private\n */\n function RowLayoutResult() {\n this.layoutedBounds = new RectangleF(0, 0, 0, 0);\n }\n Object.defineProperty(RowLayoutResult.prototype, \"isFinish\", {\n /**\n * Gets or sets a value indicating whether this instance `is finish`.\n * @private\n */\n get: function () {\n return this.bIsFinished;\n },\n set: function (value) {\n this.bIsFinished = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RowLayoutResult.prototype, \"bounds\", {\n /**\n * Gets or sets the `bounds`.\n * @private\n */\n get: function () {\n return this.layoutedBounds;\n },\n set: function (value) {\n this.layoutedBounds = value;\n },\n enumerable: true,\n configurable: true\n });\n return RowLayoutResult;\n}());\nexport { RowLayoutResult };\n","import { PdfGrid } from './pdf-grid';\nimport { PdfGridCellStyle } from './styles/style';\nimport { PdfStringLayouter } from './../../graphics/fonts/string-layouter';\nimport { PdfDocument } from './../../document/pdf-document';\nimport { PdfStringFormat } from './../../graphics/fonts/pdf-string-format';\nimport { RectangleF, PointF, SizeF } from './../../drawing/pdf-drawing';\nimport { PdfDashStyle, PdfLineCap } from './../../graphics/enum';\nimport { PdfBorderOverlapStyle } from './../tables/light-tables/enum';\nimport { PdfSolidBrush } from './../../graphics/brushes/pdf-solid-brush';\nimport { PdfColor } from './../../graphics/pdf-color';\nimport { PdfImage } from './../../graphics/images/pdf-image';\nimport { PdfBitmap } from './../../graphics/images/pdf-bitmap';\nimport { PdfTextWebLink } from './../../annotations/pdf-text-web-link';\nimport { PdfLayoutType } from './../../graphics/figures/enum';\nimport { PdfGridLayouter, PdfGridLayoutFormat } from './../../structured-elements/grid/layout/grid-layouter';\nimport { PdfLayoutParams } from '../../../implementation/graphics/figures/base/element-layouter';\n/**\n * `PdfGridCell` class represents the schema of a cell in a 'PdfGrid'.\n */\nvar PdfGridCell = /** @class */ (function () {\n function PdfGridCell(row) {\n /**\n * `Width` of the cell.\n * @default 0\n * @private\n */\n this.cellWidth = 0;\n /**\n * `Height` of the cell.\n * @default 0\n * @private\n */\n this.cellHeight = 0;\n /**\n * `tempval`to stores current width .\n * @default 0\n * @private\n */\n this.tempval = 0;\n this.fontSpilt = false;\n /**\n * Specifies weather the `cell is drawn`.\n * @default true\n * @private\n */\n this.finsh = true;\n /**\n * The `remaining height` of row span.\n * @default 0\n * @private\n */\n this.rowSpanRemainingHeight = 0;\n this.hasRowSpan = false;\n this.hasColSpan = false;\n /**\n * the 'isFinish' is set to page finish\n */\n this.isFinish = true;\n /**\n * The `present' to store the current cell.\n * @default false\n * @private\n */\n this.present = false;\n this.gridRowSpan = 1;\n this.colSpan = 1;\n if (typeof row !== 'undefined') {\n this.gridRow = row;\n }\n }\n Object.defineProperty(PdfGridCell.prototype, \"isCellMergeContinue\", {\n //Properties\n get: function () {\n return this.internalIsCellMergeContinue;\n },\n set: function (value) {\n this.internalIsCellMergeContinue = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"isRowMergeContinue\", {\n get: function () {\n return this.internalIsRowMergeContinue;\n },\n set: function (value) {\n this.internalIsRowMergeContinue = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"isCellMergeStart\", {\n get: function () {\n return this.internalIsCellMergeStart;\n },\n set: function (value) {\n this.internalIsCellMergeStart = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"isRowMergeStart\", {\n get: function () {\n return this.internalIsRowMergeStart;\n },\n set: function (value) {\n this.internalIsRowMergeStart = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"remainingString\", {\n /**\n * Gets or sets the `remaining string` after the row split between pages.\n * @private\n */\n get: function () {\n return this.remaining;\n },\n set: function (value) {\n this.remaining = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"FinishedDrawingCell\", {\n /**\n * Gets or sets the `FinishedDrawingCell` .\n * @private\n */\n get: function () {\n return this.isFinish;\n },\n set: function (value) {\n this.isFinish = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"stringFormat\", {\n /**\n * Gets or sets the `string format`.\n * @private\n */\n get: function () {\n if (this.format == null) {\n this.format = new PdfStringFormat();\n }\n return this.format;\n },\n set: function (value) {\n this.format = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"row\", {\n /**\n * Gets or sets the parent `row`.\n * @private\n */\n get: function () {\n return this.gridRow;\n },\n set: function (value) {\n this.gridRow = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"value\", {\n /**\n * Gets or sets the `value` of the cell.\n * @private\n */\n get: function () {\n return this.objectValue;\n },\n set: function (value) {\n this.objectValue = value;\n if (this.objectValue instanceof PdfGrid) {\n this.row.grid.isSingleGrid = false;\n var grid = this.objectValue;\n grid.ParentCell = this;\n this.objectValue.isChildGrid = true;\n var rowCount = this.row.grid.rows.count;\n for (var i = 0; i < rowCount; i++) {\n var row = this.row.grid.rows.getRow(i);\n var colCount = row.cells.count;\n for (var j = 0; j < colCount; j++) {\n var cell = row.cells.getCell(j);\n cell.parent = this;\n }\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"rowSpan\", {\n /**\n * Gets or sets a value that indicates the total number of rows that cell `spans` within a PdfGrid.\n * @private\n */\n get: function () {\n return this.gridRowSpan;\n },\n set: function (value) {\n if (value < 1) {\n throw new Error('ArgumentException : Invalid span specified, must be greater than or equal to 1');\n }\n else {\n this.gridRowSpan = value;\n this.row.rowSpanExists = true;\n this.row.grid.hasRowSpanSpan = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"style\", {\n /**\n * Gets or sets the cell `style`.\n * @private\n */\n get: function () {\n if (this.cellStyle == null) {\n this.cellStyle = new PdfGridCellStyle();\n }\n return this.cellStyle;\n },\n set: function (value) {\n this.cellStyle = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"height\", {\n /**\n * Gets the `height` of the PdfGrid cell.[Read-Only].\n * @private\n */\n get: function () {\n if (this.cellHeight === 0) {\n this.cellHeight = this.measureHeight();\n }\n return this.cellHeight;\n },\n set: function (value) {\n this.cellHeight = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"columnSpan\", {\n /**\n * Gets or sets a value that indicates the total number of columns that cell `spans` within a PdfGrid.\n * @private\n */\n get: function () {\n return this.colSpan;\n },\n set: function (value) {\n if (value < 1) {\n throw Error('Invalid span specified, must be greater than or equal to 1');\n }\n else {\n this.colSpan = value;\n this.row.columnSpanExists = true;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridCell.prototype, \"width\", {\n /**\n * Gets the `width` of the PdfGrid cell.[Read-Only].\n * @private\n */\n get: function () {\n if (this.cellWidth === 0 || this.row.grid.isComplete) {\n this.cellWidth = this.measureWidth();\n }\n return Math.round(this.cellWidth);\n },\n set: function (value) {\n this.cellWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n //Implementation\n /**\n * `Calculates the width`.\n * @private\n */\n PdfGridCell.prototype.measureWidth = function () {\n // .. Calculate the cell text width.\n // .....Add border widths, cell spacings and paddings to the width.\n var width = 0;\n var layouter = new PdfStringLayouter();\n if (typeof this.objectValue === 'string') {\n /* tslint:disable */\n var slr = layouter.layout(this.objectValue, this.getTextFont(), this.stringFormat, new SizeF(Number.MAX_VALUE, Number.MAX_VALUE), false, new SizeF(0, 0));\n width += slr.actualSize.width;\n width += (this.style.borders.left.width + this.style.borders.right.width) * 2;\n }\n else if (this.objectValue instanceof PdfGrid) {\n width = this.objectValue.size.width;\n //width += this.objectValue.style.cellSpacing;\n }\n else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) {\n width += this.objectValue.width;\n }\n else if (this.objectValue instanceof PdfTextWebLink) {\n var webLink = this.objectValue;\n var result = layouter.layout(webLink.text, webLink.font, webLink.stringFormat, new SizeF(0, 0), false, new SizeF(0, 0));\n /* tslint:enable */\n width += result.actualSize.width;\n width += (this.style.borders.left.width + this.style.borders.right.width) * 2;\n }\n if (!(this.objectValue instanceof PdfGrid)) {\n if (this.style.cellPadding != null) {\n width += (this.style.cellPadding.left + this.style.cellPadding.right);\n }\n else {\n width += (this.row.grid.style.cellPadding.left + this.row.grid.style.cellPadding.right);\n }\n }\n else {\n if (this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined') {\n if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {\n width += this.style.cellPadding.left;\n }\n if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {\n width += this.style.cellPadding.right;\n }\n }\n else {\n if (typeof this.row.grid.style.cellPadding.left !== 'undefined' && this.row.grid.style.cellPadding.hasLeftPad) {\n width += this.row.grid.style.cellPadding.left;\n }\n if (typeof this.row.grid.style.cellPadding.right !== 'undefined' && this.row.grid.style.cellPadding.hasRightPad) {\n width += this.row.grid.style.cellPadding.right;\n }\n }\n }\n width += this.row.grid.style.cellSpacing;\n return width;\n };\n /**\n * Draw the `cell background`.\n * @private\n */\n PdfGridCell.prototype.drawCellBackground = function (graphics, bounds) {\n var backgroundBrush = this.getBackgroundBrush();\n //graphics.isTemplateGraphics = true;\n if (backgroundBrush != null) {\n graphics.save();\n graphics.drawRectangle(backgroundBrush, bounds.x, bounds.y, bounds.width, bounds.height);\n graphics.restore();\n }\n if (this.style.backgroundImage != null) {\n var image = this.getBackgroundImage();\n graphics.drawImage(this.style.backgroundImage, bounds.x, bounds.y, bounds.width, bounds.height);\n }\n };\n /**\n * `Adjusts the text layout area`.\n * @private\n */\n /* tslint:disable */\n PdfGridCell.prototype.adjustContentLayoutArea = function (bounds) {\n //Add Padding value to its Cell Bounds\n var returnBounds = new RectangleF(bounds.x, bounds.y, bounds.width, bounds.height);\n if (!(this.objectValue instanceof PdfGrid)) {\n if (typeof this.style.cellPadding === 'undefined' || this.style.cellPadding == null) {\n returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;\n returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;\n returnBounds.width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);\n returnBounds.height -= (this.gridRow.grid.style.cellPadding.bottom + this.gridRow.grid.style.cellPadding.top);\n returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);\n }\n else {\n returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width;\n returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width;\n returnBounds.width -= (this.style.cellPadding.right + this.style.cellPadding.left);\n returnBounds.width -= (this.cellStyle.borders.left.width + this.cellStyle.borders.right.width);\n returnBounds.height -= (this.style.cellPadding.bottom + this.style.cellPadding.top);\n returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);\n if (this.rowSpan === 1) {\n returnBounds.width -= (this.style.borders.left.width);\n }\n }\n }\n else {\n if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {\n if (typeof this.gridRow.grid.style.cellPadding.left !== 'undefined' && this.gridRow.grid.style.cellPadding.hasLeftPad) {\n returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;\n returnBounds.width -= this.gridRow.grid.style.cellPadding.left;\n }\n if (typeof this.gridRow.grid.style.cellPadding.top !== 'undefined' && this.gridRow.grid.style.cellPadding.hasTopPad) {\n returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;\n returnBounds.height -= this.gridRow.grid.style.cellPadding.top;\n }\n if (typeof this.gridRow.grid.style.cellPadding.right !== 'undefined' && this.gridRow.grid.style.cellPadding.hasRightPad) {\n returnBounds.width -= this.gridRow.grid.style.cellPadding.right;\n }\n if (typeof this.gridRow.grid.style.cellPadding.bottom !== 'undefined' && this.gridRow.grid.style.cellPadding.hasBottomPad) {\n returnBounds.height -= this.gridRow.grid.style.cellPadding.bottom;\n }\n }\n else {\n if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {\n returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width;\n returnBounds.width -= this.style.cellPadding.left;\n }\n if (typeof this.style.cellPadding.top !== 'undefined' && this.style.cellPadding.hasTopPad) {\n returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width;\n returnBounds.height -= this.style.cellPadding.top;\n }\n if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {\n returnBounds.width -= this.style.cellPadding.right;\n }\n if (typeof this.style.cellPadding.bottom !== 'undefined' && this.style.cellPadding.hasBottomPad) {\n returnBounds.height -= this.style.cellPadding.bottom;\n }\n }\n returnBounds.width -= (this.cellStyle.borders.left.width + this.cellStyle.borders.right.width);\n returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);\n }\n return returnBounds;\n };\n /**\n * `Draws` the specified graphics.\n * @private\n */\n PdfGridCell.prototype.draw = function (graphics, bounds, cancelSubsequentSpans) {\n var isrowbreak = false;\n /*if (!this.row.grid.isSingleGrid)\n {\n //Check whether the Grid Span to Nextpage\n if ((this.remainingString != null) || (PdfGridLayouter.repeatRowIndex != -1))\n {\n this.DrawParentCells(graphics, bounds, true);\n }\n else if (this.row.grid.rows.count > 1)\n {\n for (let i : number = 0; i < this.row.grid.rows.count; i++)\n {\n if (this.row == this.row.grid.rows.getRow(i))\n {\n if (this.row.grid.rows.getRow(i).rowBreakHeight > 0)\n isrowbreak = true;\n if ((i > 0) && (isrowbreak))\n this.DrawParentCells(graphics, bounds, false);\n }\n }\n }\n } */\n var result = null;\n /*if (cancelSubsequentSpans)\n {\n //..Cancel all subsequent cell spans, if no space exists.\n let currentCellIndex : number = this.row.cells.indexOf(this);\n for (let i : number = currentCellIndex + 1; i <= currentCellIndex + this.colSpan; i++)\n {\n this.row.cells.getCell(i).isCellMergeContinue = false;\n this.row.cells.getCell(i).isRowMergeContinue = false;\n }\n this.colSpan = 1;\n }*/\n //..Skip cells which were already covered by spanmap.\n if (this.internalIsCellMergeContinue || this.internalIsRowMergeContinue) {\n if (this.internalIsCellMergeContinue && this.row.grid.style.allowHorizontalOverflow) {\n if ((this.row.rowOverflowIndex > 0 && (this.row.cells.indexOf(this) != this.row.rowOverflowIndex + 1)) || (this.row.rowOverflowIndex == 0 && this.internalIsCellMergeContinue)) {\n return result;\n }\n }\n else {\n return result;\n }\n }\n //Adjust bounds with Row and Column Spacing\n bounds = this.adjustOuterLayoutArea(bounds, graphics);\n this.drawCellBackground(graphics, bounds);\n var textPen = this.getTextPen();\n var textBrush = this.getTextBrush();\n if (typeof textPen === 'undefined' && typeof textBrush === 'undefined') {\n textBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n }\n var font = this.getTextFont();\n var strFormat = this.getStringFormat();\n var innerLayoutArea = bounds;\n if (innerLayoutArea.height >= graphics.clientSize.height) {\n // If to break row to next page.\n if (this.row.grid.allowRowBreakAcrossPages) {\n innerLayoutArea.height -= innerLayoutArea.y;\n //bounds.height -= bounds.y;\n // if(this.row.grid.isChildGrid)\n // {\n // innerLayoutArea.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;\n // }\n }\n // if user choose to cut the row whose height is more than page height.\n // else\n // {\n // innerLayoutArea.height = graphics.clientSize.height;\n // bounds.height = graphics.clientSize.height;\n // }\n }\n innerLayoutArea = this.adjustContentLayoutArea(innerLayoutArea);\n if (typeof this.objectValue === 'string' || typeof this.remaining === 'string') {\n var temp = void 0;\n var layoutRectangle = void 0;\n if (innerLayoutArea.height < font.height)\n layoutRectangle = new RectangleF(innerLayoutArea.x, innerLayoutArea.y, innerLayoutArea.width, font.height);\n else\n layoutRectangle = innerLayoutArea;\n if (innerLayoutArea.height < font.height && this.row.grid.isChildGrid && this.row.grid.ParentCell != null) {\n var height = layoutRectangle.height - this.row.grid.ParentCell.row.grid.style.cellPadding.bottom - this.row.grid.style.cellPadding.bottom;\n if (this.row.grid.splitChildRowIndex != -1) {\n this.fontSpilt = true;\n this.row.rowFontSplit = true;\n }\n if (height > 0 && height < font.height)\n layoutRectangle.height = height;\n // else if (height + this.row.grid.style.cellPadding.bottom > 0 && height + this.row.grid.style.cellPadding.bottom < font.height)\n // layoutRectangle.height = height + this.row.grid.style.cellPadding.bottom;\n // else if (bounds.height < font.height)\n // layoutRectangle.height = bounds.height;\n // else if (bounds.height - this.row.grid.ParentCell.row.grid.style.cellPadding.bottom < font.height)\n // layoutRectangle.height = bounds.height - this.row.grid.ParentCell.row.grid.style.cellPadding.bottom; \n }\n if (this.gridRow.grid.style.cellSpacing != 0) {\n layoutRectangle.width -= this.gridRow.grid.style.cellSpacing;\n bounds.width -= this.gridRow.grid.style.cellSpacing;\n }\n if (this.isFinish) {\n // if (this.row.grid.splitChildRowIndex != -1 && !this.row.grid.isChildGrid && typeof this.remaining === 'undefined'){\n // this.remaining = '';\n // graphics.drawString(this.remaining, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);\n // } else {\n temp = this.remaining === '' ? this.remaining : this.objectValue;\n graphics.drawString(temp, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);\n if (this.row.grid.splitChildRowIndex != -1 && !this.row.grid.isChildGrid && typeof this.remaining === 'undefined') {\n this.remaining = '';\n //graphics.drawString(this.remaining, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);\n }\n }\n else {\n if (typeof this.remaining == 'undefined' || this.remaining === null) {\n this.remaining = '';\n }\n if (this.row.repeatFlag) {\n graphics.drawString(this.remaining, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);\n }\n // else {\n // if(this.row.grid.ParentCell.row.repeatFlag) {\n // graphics.drawString((this.remaining as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat); \n // } else {\n // layoutRectangle.height = this.row.height;\n // graphics.drawString((this.objectValue as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);\n // bounds.height = this.row.height;\n // }\n // }\n this.isFinish = true;\n //graphics.drawString((this.remaining as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);\n }\n result = graphics.stringLayoutResult;\n // if(this.row.grid.isChildGrid && this.row.rowBreakHeight > 0 && result !=null) {\n // bounds.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;\n // }\n }\n else if (this.objectValue instanceof PdfGrid) {\n var childGrid = this.objectValue;\n childGrid.isChildGrid = true;\n childGrid.ParentCell = this;\n var layoutRect = void 0;\n layoutRect = innerLayoutArea;\n if (this.gridRow.grid.style.cellSpacing != 0) {\n bounds.width -= this.gridRow.grid.style.cellSpacing;\n }\n // layoutRect = bounds;\n // if (this.style.cellPadding != null){\n // layoutRect = bounds; \n // } else if((this.row.grid.style.cellPadding != null) && (childGrid.style.cellPadding.bottom === 0.5) && (childGrid.style.cellPadding.top === 0.5)\n // && (childGrid.style.cellPadding.left === 5.76) && (childGrid.style.cellPadding.right === 5.76)\n // && (this.gridRow.grid.style.cellSpacing === 0) && (childGrid.style.cellSpacing === 0)) {\n // layoutRect = innerLayoutArea;\n // }\n // if(this.objectValue.style.cellPadding != null && typeof this.objectValue.style.cellPadding !== 'undefined'){\n // layoutRect = bounds;\n // } \n var layouter = new PdfGridLayouter(childGrid);\n var format = new PdfGridLayoutFormat();\n if (this.row.grid.LayoutFormat != null)\n format = this.row.grid.LayoutFormat;\n else\n format.layout = PdfLayoutType.Paginate;\n var param = new PdfLayoutParams();\n if (graphics.layer != null) {\n // Define layout parameters.\n param.page = graphics.page;\n param.bounds = layoutRect;\n param.format = format;\n //Set the span \n childGrid.setSpan();\n childGrid.checkSpan();\n // Draw the child grid.\n var childGridResult = layouter.Layouter(param);\n //let childGridResult : PdfLayoutResult = layouter.innerLayout(param);\n this.value = childGrid;\n if (this.row.grid.splitChildRowIndex !== -1) {\n this.height = this.row.rowBreakHeightValue;\n }\n if (param.page != childGridResult.page) //&& (isWidthGreaterthanParent != true))\n {\n childGridResult.bounds.height = this.row.rowBreakHeightValue;\n if (this.row.rowBreakHeight == 0)\n this.row.NestedGridLayoutResult = childGridResult;\n else\n this.row.rowBreakHeight = this.row.rowBreakHeightValue;\n //bounds.height = this.row.rowBreakHeight;\n //After drawing paginated nested grid, the bounds of the parent grid in start page should be corrected for borders.\n //bounds.height = graphics.clientSize.height - bounds.y;\n }\n }\n }\n else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) {\n var imageBounds = void 0;\n if (this.objectValue.width <= innerLayoutArea.width) {\n imageBounds = new RectangleF(innerLayoutArea.x, innerLayoutArea.y, this.objectValue.width, innerLayoutArea.height);\n }\n else {\n imageBounds = innerLayoutArea;\n }\n graphics.drawImage(this.objectValue, imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height);\n }\n else if (this.objectValue instanceof PdfTextWebLink) {\n this.objectValue.draw(graphics.currentPage, innerLayoutArea);\n }\n else if (typeof this.objectValue === 'undefined') {\n this.objectValue = \"\";\n graphics.drawString(this.objectValue, font, textPen, textBrush, innerLayoutArea.x, innerLayoutArea.y, innerLayoutArea.width, innerLayoutArea.height, strFormat);\n if (this.style.cellPadding != null && this.style.cellPadding.bottom == 0 && this.style.cellPadding.left == 0 && this.style.cellPadding.right == 0 && this.style.cellPadding.top == 0) {\n bounds.width -= (this.style.borders.left.width + this.style.borders.right.width);\n }\n if (this.gridRow.grid.style.cellSpacing != 0) {\n bounds.width -= this.gridRow.grid.style.cellSpacing;\n }\n }\n if (this.style.borders != null) {\n if (!this.fontSpilt)\n this.drawCellBorders(graphics, bounds);\n else {\n if (this.row.grid.ParentCell.row.grid.splitChildRowIndex != -1) {\n this.row.rowFontSplit = false;\n this.drawCellBorders(graphics, bounds);\n }\n }\n }\n return result;\n };\n /* tslint:enable */\n /**\n * Draws the `cell border` constructed by drawing lines.\n * @private\n */\n PdfGridCell.prototype.drawCellBorders = function (graphics, bounds) {\n if (this.row.grid.style.borderOverlapStyle === PdfBorderOverlapStyle.Inside) {\n bounds.x += this.style.borders.left.width;\n bounds.y += this.style.borders.top.width;\n bounds.width -= this.style.borders.right.width;\n bounds.height -= this.style.borders.bottom.width;\n }\n var p1 = new PointF(bounds.x, bounds.y + bounds.height);\n var p2 = new PointF(bounds.x, bounds.y);\n var pen = this.cellStyle.borders.left;\n if (this.cellStyle.borders.left.dashStyle === PdfDashStyle.Solid) {\n pen.lineCap = PdfLineCap.Square;\n }\n // SetTransparency(ref graphics, pen);\n if (pen.width !== 0) {\n graphics.drawLine(pen, p1, p2);\n }\n p1 = new PointF(bounds.x + bounds.width, bounds.y);\n p2 = new PointF(bounds.x + bounds.width, bounds.y + bounds.height);\n pen = this.cellStyle.borders.right;\n if ((bounds.x + bounds.width) > (graphics.clientSize.width - (pen.width / 2))) {\n p1 = new PointF(graphics.clientSize.width - (pen.width / 2), bounds.y);\n p2 = new PointF(graphics.clientSize.width - (pen.width / 2), bounds.y + bounds.height);\n }\n if (this.cellStyle.borders.right.dashStyle === PdfDashStyle.Solid) {\n pen.lineCap = PdfLineCap.Square;\n }\n if (pen.width !== 0) {\n graphics.drawLine(pen, p1, p2);\n }\n p1 = new PointF(bounds.x, bounds.y);\n p2 = new PointF(bounds.x + bounds.width, bounds.y);\n pen = this.cellStyle.borders.top;\n if (this.cellStyle.borders.top.dashStyle === PdfDashStyle.Solid) {\n pen.lineCap = PdfLineCap.Square;\n }\n if (pen.width !== 0) {\n graphics.drawLine(pen, p1, p2);\n }\n p1 = new PointF(bounds.x + bounds.width, bounds.y + bounds.height);\n p2 = new PointF(bounds.x, bounds.y + bounds.height);\n pen = this.cellStyle.borders.bottom;\n if ((bounds.y + bounds.height) > (graphics.clientSize.height - (pen.width / 2))) {\n p1 = new PointF((bounds.x + bounds.width), (graphics.clientSize.height - (pen.width / 2)));\n p2 = new PointF(bounds.x, (graphics.clientSize.height - (pen.width / 2)));\n }\n if (this.cellStyle.borders.bottom.dashStyle === PdfDashStyle.Solid) {\n pen.lineCap = PdfLineCap.Square;\n }\n if (pen.width !== 0) {\n graphics.drawLine(pen, p1, p2);\n }\n };\n // private setTransparency(graphics : PdfGraphics, pen : PdfPen) : void {\n // let alpha : number = (pen.color.a / 255)as number;\n // graphics.save();\n // graphics.setTransparency(alpha);\n // }\n /**\n * `Adjusts the outer layout area`.\n * @private\n */\n /* tslint:disable */\n PdfGridCell.prototype.adjustOuterLayoutArea = function (bounds, g) {\n var isHeader = false;\n var cellSpacing = this.row.grid.style.cellSpacing;\n if (cellSpacing > 0) {\n bounds = new RectangleF(bounds.x + cellSpacing, bounds.y + cellSpacing, bounds.width - cellSpacing, bounds.height - cellSpacing);\n }\n var currentColIndex = this.row.cells.indexOf(this);\n if (this.columnSpan > 1 || (this.row.rowOverflowIndex > 0 && (currentColIndex == this.row.rowOverflowIndex + 1) && this.isCellMergeContinue)) {\n var span = this.columnSpan;\n if (span == 1 && this.isCellMergeContinue) {\n for (var j = currentColIndex + 1; j < this.row.grid.columns.count; j++) {\n if (this.row.cells.getCell(j).isCellMergeContinue)\n span++;\n else\n break;\n }\n }\n var totalWidth = 0;\n for (var i = currentColIndex; i < currentColIndex + span; i++) {\n if (this.row.grid.style.allowHorizontalOverflow) {\n var width = void 0;\n var compWidth = this.row.grid.size.width < g.clientSize.width ? this.row.grid.size.width : g.clientSize.width;\n if (this.row.grid.size.width > g.clientSize.width) {\n width = bounds.x + totalWidth + this.row.grid.columns.getColumn(i).width;\n }\n else {\n width = totalWidth + this.row.grid.columns.getColumn(i).width;\n }\n if (width > compWidth) {\n break;\n }\n }\n totalWidth += this.row.grid.columns.getColumn(i).width;\n }\n totalWidth -= this.row.grid.style.cellSpacing;\n bounds.width = totalWidth;\n }\n if (this.rowSpan > 1 || this.row.rowSpanExists) {\n var span = this.rowSpan;\n var currentRowIndex = this.row.grid.rows.rowCollection.indexOf(this.row);\n if (currentRowIndex == -1) {\n currentRowIndex = this.row.grid.headers.indexOf(this.row);\n if (currentRowIndex != -1) {\n isHeader = true;\n }\n }\n // if (span == 1 && this.isCellMergeContinue) {\n // for (let j : number = currentRowIndex + 1; j < this.row.grid.rows.count; j++)\n // {\n // let flag : boolean = (isHeader ? this.row.grid.headers.getHeader(j).cells.getCell(currentColIndex).isCellMergeContinue : this.row.grid.rows.getRow(j).cells.getCell(currentColIndex).isCellMergeContinue);\n // if (flag)\n // span++;\n // else\n // break;\n // }\n // }\n var totalHeight = 0;\n var max = 0;\n for (var i = currentRowIndex; i < currentRowIndex + span; i++) {\n totalHeight += (isHeader ? this.row.grid.headers.getHeader(i).height : this.row.grid.rows.getRow(i).height);\n var row = this.row.grid.rows.getRow(i);\n var rowIndex = this.row.grid.rows.rowCollection.indexOf(row);\n /*if (this.rowSpan > 1)\n {\n for (let k : number = 0; k < this.row.cells.count; k++) {\n let cell : PdfGridCell = this.row.cells.getCell(k);\n if(cell.rowSpan>1)\n {\n let tempHeight : number =0;\n \n for (let j :number = i; j < i +cell.rowSpan; j++)\n {\n if (!this.row.grid.rows.getRow(j).isRowSpanRowHeightSet)\n this.row.grid.rows.getRow(j).isRowHeightSet = false;\n tempHeight += this.row.grid.rows.getRow(j).height;\n if (!this.row.grid.rows.getRow(j).isRowSpanRowHeightSet)\n this.row.grid.rows.getRow(j).isRowHeightSet = true;\n }\n //To check the Row spanned cell height is greater than the total spanned row height.\n if(cell.height>tempHeight)\n {\n if (max < (cell.height - tempHeight))\n {\n max = cell.height - tempHeight;\n if (this.rowSpanRemainingHeight != 0 && max > this.rowSpanRemainingHeight)\n {\n max += this.rowSpanRemainingHeight;\n }\n let index :number = row.cells.indexOf(cell);\n //set the m_rowspanRemainingHeight to last rowspanned row.\n this.row.grid.rows.getRow((rowIndex +cell.rowSpan) - 1).cells.getCell(index).rowSpanRemainingHeight = max;\n this.rowSpanRemainingHeight = this.row.grid.rows.getRow((rowIndex + cell.rowSpan) - 1).cells.getCell(index).rowSpanRemainingHeight;\n }\n }\n }\n }\n }\n if (!this.row.grid.rows.getRow(i).isRowSpanRowHeightSet)\n this.row.grid.rows.getRow(i).isRowHeightSet = true;*/\n }\n var cellIndex = this.row.cells.indexOf(this);\n totalHeight -= this.row.grid.style.cellSpacing;\n // if (this.row.cells.getCell(cellIndex).height > totalHeight && (!this.row.grid.rows.getRow((currentRowIndex + span) - 1).isRowHeightSet)) {\n // this.row.grid.rows.getRow((currentRowIndex + span) - 1).cells.getCell(cellIndex).rowSpanRemainingHeight = this.row.cells.getCell(cellIndex).height - totalHeight;\n // totalHeight = this.row.cells.getCell(cellIndex).height;\n // bounds.height = totalHeight;\n // } else {\n bounds.height = totalHeight;\n // }\n if (!this.row.rowMergeComplete) {\n bounds.height = totalHeight;\n }\n }\n return bounds;\n };\n /* tslint:enable */\n /**\n * Gets the `text font`.\n * @private\n */\n PdfGridCell.prototype.getTextFont = function () {\n if (typeof this.style.font !== 'undefined' && this.style.font != null) {\n return this.style.font;\n }\n else if (typeof this.row.style.font !== 'undefined' && this.row.style.font != null) {\n return this.row.style.font;\n }\n else if (typeof this.row.grid.style.font !== 'undefined' && this.row.grid.style.font != null) {\n return this.row.grid.style.font;\n }\n else {\n return PdfDocument.defaultFont;\n }\n };\n /**\n * Gets the `text brush`.\n * @private\n */\n PdfGridCell.prototype.getTextBrush = function () {\n if (typeof this.style.textBrush !== 'undefined' && this.style.textBrush != null) {\n return this.style.textBrush;\n }\n else if (typeof this.row.style.textBrush !== 'undefined' && this.row.style.textBrush != null) {\n return this.row.style.textBrush;\n }\n else {\n return this.row.grid.style.textBrush;\n }\n };\n /**\n * Gets the `text pen`.\n * @private\n */\n PdfGridCell.prototype.getTextPen = function () {\n if (typeof this.style.textPen !== 'undefined' && this.style.textPen != null) {\n return this.style.textPen;\n }\n else if (typeof this.row.style.textPen !== 'undefined' && this.row.style.textPen != null) {\n return this.row.style.textPen;\n }\n else {\n return this.row.grid.style.textPen;\n }\n };\n /**\n * Gets the `background brush`.\n * @private\n */\n PdfGridCell.prototype.getBackgroundBrush = function () {\n if (typeof this.style.backgroundBrush !== 'undefined' && this.style.backgroundBrush != null) {\n return this.style.backgroundBrush;\n }\n else if (typeof this.row.style.backgroundBrush !== 'undefined' && this.row.style.backgroundBrush != null) {\n return this.row.style.backgroundBrush;\n }\n else {\n return this.row.grid.style.backgroundBrush;\n }\n };\n /**\n * Gets the `background image`.\n * @private\n */\n PdfGridCell.prototype.getBackgroundImage = function () {\n if (typeof this.style.backgroundImage !== 'undefined' && this.style.backgroundImage != null) {\n return this.style.backgroundImage;\n }\n else if (typeof this.row.style.backgroundImage !== 'undefined' && this.row.style.backgroundImage != null) {\n return this.row.style.backgroundImage;\n }\n else {\n return this.row.grid.style.backgroundImage;\n }\n };\n /**\n * Gets the current `StringFormat`.\n * @private\n */\n PdfGridCell.prototype.getStringFormat = function () {\n if (typeof this.style.stringFormat !== 'undefined' && this.style.stringFormat != null) {\n return this.style.stringFormat;\n }\n else {\n return this.stringFormat;\n }\n };\n /**\n * Calculates the `height`.\n * @private\n */\n PdfGridCell.prototype.measureHeight = function () {\n // .. Calculate the cell text height.\n // .....Add border widths, cell spacings and paddings to the height.\n var width = this.calculateWidth();\n // //check whether the Current PdfGridCell has padding\n if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {\n width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);\n //width -= (this.style.borders.left.width + this.style.borders.right.width);\n }\n else {\n width -= (this.style.cellPadding.right + this.style.cellPadding.left);\n width -= (this.style.borders.left.width + this.style.borders.right.width);\n }\n var height = 0;\n var layouter = new PdfStringLayouter();\n if (typeof this.objectValue === 'string' || typeof this.remaining === 'string') {\n var currentValue = this.objectValue;\n /* tslint:disable */\n if (!this.isFinish)\n currentValue = !(this.remaining === null || this.remaining === '' ||\n typeof this.remaining === 'undefined') ? this.remaining : this.objectValue;\n var slr = null;\n var cellIndex = this.row.cells.indexOf(this);\n if (this.gridRow.grid.style.cellSpacing != 0) {\n width -= this.gridRow.grid.style.cellSpacing * 2;\n }\n if (!this.row.cells.getCell(cellIndex).hasColSpan && !this.row.cells.getCell(cellIndex).hasRowSpan) {\n if (this.gridRow.grid.isChildGrid) {\n if (width < 0) {\n this.tempval = width;\n if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {\n this.tempval += (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);\n }\n else {\n this.tempval += (this.style.cellPadding.right + this.style.cellPadding.left);\n this.tempval += (this.style.borders.left.width + this.style.borders.right.width);\n }\n }\n else {\n this.tempval = width;\n }\n slr = layouter.layout(currentValue, this.getTextFont(), this.stringFormat, new SizeF(this.tempval, 0), false, new SizeF(0, 0));\n height += slr.actualSize.height;\n }\n else {\n slr = layouter.layout(currentValue, this.getTextFont(), this.stringFormat, new SizeF(width, 0), false, new SizeF(0, 0));\n height += slr.actualSize.height;\n }\n }\n /* tslint:enable */\n height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;\n }\n else if (this.objectValue instanceof PdfGrid) {\n var cellIndex = this.row.cells.indexOf(this);\n var internalWidth = 0;\n if ((this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined')) {\n internalWidth = this.calculateWidth();\n if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {\n internalWidth -= this.style.cellPadding.left;\n }\n if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {\n internalWidth -= this.style.cellPadding.right;\n }\n }\n else if ((this.row.grid.style.cellPadding != null || typeof this.row.grid.style.cellPadding !== 'undefined')) {\n internalWidth = this.calculateWidth();\n if (typeof this.row.grid.style.cellPadding.left !== 'undefined' && this.row.grid.style.cellPadding.hasLeftPad) {\n internalWidth -= this.row.grid.style.cellPadding.left;\n }\n if (typeof this.row.grid.style.cellPadding.right !== 'undefined' && this.row.grid.style.cellPadding.hasRightPad) {\n internalWidth -= this.row.grid.style.cellPadding.right;\n }\n }\n else {\n internalWidth = this.calculateWidth();\n }\n this.objectValue.tempWidth = internalWidth;\n if (!this.row.cells.getCell(cellIndex).hasColSpan && !this.row.cells.getCell(cellIndex).hasRowSpan) {\n height = this.objectValue.size.height;\n }\n else {\n height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;\n }\n if (this.gridRow.grid.style.cellSpacing !== 0) {\n width -= this.gridRow.grid.style.cellSpacing * 2;\n //height += (this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom);\n }\n if (this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined') {\n if (typeof this.row.grid.style.cellPadding.top !== 'undefined' && this.row.grid.style.cellPadding.hasTopPad) {\n height += this.row.grid.style.cellPadding.top;\n }\n if (this.row.grid.style.cellPadding.hasBottomPad && typeof this.row.grid.style.cellPadding.bottom !== 'undefined') {\n height += this.row.grid.style.cellPadding.bottom;\n }\n }\n height += this.objectValue.style.cellSpacing;\n }\n else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) {\n height += this.objectValue.height;\n }\n else if (this.objectValue instanceof PdfTextWebLink) {\n var webLink = this.objectValue;\n /* tslint:disable */\n var slr = layouter.layout(webLink.text, webLink.font, webLink.stringFormat, new SizeF(width, 0), false, new SizeF(0, 0));\n /* tslint:enable */\n height += slr.actualSize.height;\n height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;\n }\n else if (typeof this.objectValue === 'undefined') {\n if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {\n width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);\n }\n else {\n width -= (this.style.cellPadding.right + this.style.cellPadding.left);\n width -= (this.style.borders.left.width + this.style.borders.right.width);\n }\n height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;\n }\n //Add padding top and bottom value to height\n if (!(this.objectValue instanceof PdfGrid)) {\n if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {\n height += (this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom);\n }\n else {\n height += (this.style.cellPadding.top + this.style.cellPadding.bottom);\n }\n }\n else {\n if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {\n if (typeof this.row.grid.style.cellPadding.top !== 'undefined' && this.row.grid.style.cellPadding.hasTopPad) {\n height += this.row.grid.style.cellPadding.top;\n }\n if (typeof this.row.grid.style.cellPadding.bottom !== 'undefined' && this.row.grid.style.cellPadding.hasBottomPad) {\n height += this.row.grid.style.cellPadding.bottom;\n }\n }\n else {\n if (typeof this.style.cellPadding.top !== 'undefined' && this.style.cellPadding.hasTopPad) {\n height += this.style.cellPadding.top;\n }\n if (typeof this.style.cellPadding.bottom !== 'undefined' && this.style.cellPadding.hasBottomPad) {\n height += this.style.cellPadding.bottom;\n }\n }\n }\n height += this.row.grid.style.cellSpacing;\n return height;\n };\n /**\n * return the calculated `width` of the cell.\n * @private\n */\n PdfGridCell.prototype.calculateWidth = function () {\n var cellIndex = this.row.cells.indexOf(this);\n var rowindex = this.row.grid.rows.rowCollection.indexOf(this.row);\n var columnSpan = this.columnSpan;\n var width = 0;\n if (columnSpan === 1) {\n for (var i = 0; i < columnSpan; i++) {\n width += this.row.grid.columns.getColumn(cellIndex + i).width;\n }\n }\n else if (columnSpan > 1) {\n for (var i = 0; i < columnSpan; i++) {\n width += this.row.grid.columns.getColumn(cellIndex + i).width;\n if ((i + 1) < columnSpan) {\n this.row.cells.getCell(cellIndex + i + 1).hasColSpan = true;\n }\n }\n }\n if (this.parent != null && this.parent.row.width > 0) {\n if ((this.row.grid.isChildGrid) && this.parent != null && (this.row.width > this.parent.row.width)) {\n width = 0;\n for (var j = 0; j < this.parent.columnSpan; j++) {\n width += this.parent.row.grid.columns.getColumn(j).width;\n }\n width = width / this.row.cells.count;\n }\n }\n return width;\n };\n return PdfGridCell;\n}());\nexport { PdfGridCell };\n/**\n * `PdfGridCellCollection` class provides access to an ordered,\n * strongly typed collection of 'PdfGridCell' objects.\n * @private\n */\nvar PdfGridCellCollection = /** @class */ (function () {\n //Constructor\n /**\n * Initializes a new instance of the `PdfGridCellCollection` class with the row.\n * @private\n */\n function PdfGridCellCollection(row) {\n /**\n * @hidden\n * @private\n */\n this.cells = [];\n this.gridRow = row;\n }\n //Properties\n /**\n * Gets the current `cell`.\n * @private\n */\n PdfGridCellCollection.prototype.getCell = function (index) {\n if (index < 0 || index >= this.count) {\n throw new Error('IndexOutOfRangeException');\n }\n return this.cells[index];\n };\n Object.defineProperty(PdfGridCellCollection.prototype, \"count\", {\n /**\n * Gets the cells `count`.[Read-Only].\n * @private\n */\n get: function () {\n return this.cells.length;\n },\n enumerable: true,\n configurable: true\n });\n PdfGridCellCollection.prototype.add = function (cell) {\n if (typeof cell === 'undefined') {\n var tempcell = new PdfGridCell();\n this.add(tempcell);\n return cell;\n }\n else {\n cell.row = this.gridRow;\n this.cells.push(cell);\n }\n };\n /**\n * Returns the `index of` a particular cell in the collection.\n * @private\n */\n PdfGridCellCollection.prototype.indexOf = function (cell) {\n return this.cells.indexOf(cell);\n };\n return PdfGridCellCollection;\n}());\nexport { PdfGridCellCollection };\n","import { PdfGridCell } from './pdf-grid-cell';\nimport { PdfStringFormat } from './../../graphics/fonts/pdf-string-format';\n/**\n * `PdfGridColumn` class represents the schema of a column in a 'PdfGrid'.\n */\nvar PdfGridColumn = /** @class */ (function () {\n //Constructors\n /**\n * Initializes a new instance of the `PdfGridColumn` class with the parent grid.\n * @private\n */\n function PdfGridColumn(grid) {\n /**\n * The `width` of the column.\n * @default 0\n * @private\n */\n this.columnWidth = 0;\n this.grid = grid;\n }\n Object.defineProperty(PdfGridColumn.prototype, \"width\", {\n /**\n * Gets or sets the `width` of the 'PdfGridColumn'.\n * @private\n */\n get: function () {\n return this.columnWidth;\n },\n set: function (value) {\n this.isCustomWidth = true;\n this.columnWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridColumn.prototype, \"format\", {\n /**\n * Gets or sets the information about the text `formatting`.\n * @private\n */\n get: function () {\n if (this.stringFormat == null) {\n this.stringFormat = new PdfStringFormat(); //GetDefaultFormat();\n }\n return this.stringFormat;\n },\n set: function (value) {\n this.stringFormat = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfGridColumn;\n}());\nexport { PdfGridColumn };\n/**\n * `PdfGridColumnCollection` class provides access to an ordered,\n * strongly typed collection of 'PdfGridColumn' objects.\n * @private\n */\nvar PdfGridColumnCollection = /** @class */ (function () {\n //properties\n //Constructors\n /**\n * Initializes a new instance of the `PdfGridColumnCollection` class with the parent grid.\n * @private\n */\n function PdfGridColumnCollection(grid) {\n /**\n * @hidden\n * @private\n */\n this.internalColumns = [];\n /**\n * @hidden\n * @private\n */\n this.columnWidth = 0;\n this.grid = grid;\n this.internalColumns = [];\n }\n //Iplementation\n /**\n * `Add` a new column to the 'PdfGrid'.\n * @private\n */\n PdfGridColumnCollection.prototype.add = function (count) {\n // public add(column : PdfGridColumn) : void\n // public add(arg : number|PdfGridColumn) : void {\n // if (typeof arg === 'number') {\n for (var i = 0; i < count; i++) {\n this.internalColumns.push(new PdfGridColumn(this.grid));\n for (var index = 0; index < this.grid.rows.count; index++) {\n var row = this.grid.rows.getRow(index);\n var cell = new PdfGridCell();\n cell.value = '';\n row.cells.add(cell);\n }\n }\n // } else {\n // let column : PdfGridColumn = new PdfGridColumn(this.grid);\n // this.columns.push(column);\n // return column;\n // }\n };\n Object.defineProperty(PdfGridColumnCollection.prototype, \"count\", {\n /**\n * Gets the `number of columns` in the 'PdfGrid'.[Read-Only].\n * @private\n */\n get: function () {\n return this.internalColumns.length;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridColumnCollection.prototype, \"width\", {\n /**\n * Gets the `widths`.\n * @private\n */\n get: function () {\n if (this.columnWidth === 0) {\n this.columnWidth = this.measureColumnsWidth();\n }\n if (this.grid.initialWidth !== 0 && this.columnWidth !== this.grid.initialWidth && !this.grid.style.allowHorizontalOverflow) {\n this.columnWidth = this.grid.initialWidth;\n this.grid.isPageWidth = true;\n }\n return this.columnWidth;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridColumnCollection.prototype, \"columns\", {\n /**\n * Gets the `array of PdfGridColumn`.[Read-Only]\n * @private\n */\n get: function () {\n return this.internalColumns;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the `PdfGridColumn` from the specified index.[Read-Only]\n * @private\n */\n PdfGridColumnCollection.prototype.getColumn = function (index) {\n if (index >= 0 && index <= this.columns.length) {\n return this.columns[index];\n }\n else {\n throw Error('can not get the column from the index: ' + index);\n }\n };\n //Implementation\n /**\n * `Calculates the column widths`.\n * @private\n */\n PdfGridColumnCollection.prototype.measureColumnsWidth = function () {\n var totalWidth = 0;\n this.grid.measureColumnsWidth();\n for (var i = 0, count = this.internalColumns.length; i < count; i++) {\n totalWidth += this.internalColumns[i].width;\n }\n return totalWidth;\n };\n /**\n * Gets the `widths of the columns`.\n * @private\n */\n PdfGridColumnCollection.prototype.getDefaultWidths = function (totalWidth) {\n var widths = [];\n var summ = 0.0;\n var subFactor = this.count;\n for (var i = 0; i < this.count; i++) {\n if (this.grid.isPageWidth && totalWidth >= 0 && !this.internalColumns[i].isCustomWidth) {\n this.internalColumns[i].width = 0;\n }\n else {\n widths[i] = this.internalColumns[i].width;\n if (this.internalColumns[i].width > 0 && this.internalColumns[i].isCustomWidth) {\n totalWidth -= this.internalColumns[i].width;\n subFactor--;\n }\n else {\n widths[i] = 0;\n }\n }\n }\n for (var i = 0; i < this.count; i++) {\n var width = totalWidth / subFactor;\n if (widths[i] <= 0) {\n widths[i] = width;\n }\n }\n return widths;\n };\n return PdfGridColumnCollection;\n}());\nexport { PdfGridColumnCollection };\n","import { PdfGridCell, PdfGridCellCollection } from './pdf-grid-cell';\nimport { PdfGridRowStyle } from './styles/style';\n/**\n * `PdfGridRow` class provides customization of the settings for the particular row.\n */\nvar PdfGridRow = /** @class */ (function () {\n //Constructor\n /**\n * Initializes a new instance of the `PdfGridRow` class with the parent grid.\n * @private\n */\n function PdfGridRow(grid) {\n /**\n * Stores the index of the overflowing row.\n * @private\n */\n this.gridRowOverflowIndex = 0;\n /**\n * The `height` of the row.\n * @private\n */\n this.rowHeight = 0;\n /**\n * The `width` of the row.\n * @private\n */\n this.rowWidth = 0;\n /**\n * The `isFinish` of the row.\n * @private\n */\n this.isrowFinish = false;\n /**\n * Check whether the Row span row height `is set explicitly`.\n * @default false\n * @public\n */\n this.isRowSpanRowHeightSet = false;\n /**\n * The `page count` of the row.\n * @public\n */\n this.noOfPageCount = 0;\n /**\n * Check whether the row height `is set explicitly`.\n * @default false\n * @private\n */\n this.isRowHeightSet = false;\n this.isPageBreakRowSpanApplied = false;\n /**\n * Check weather the row merge `is completed` or not.\n * @default true\n * @private\n */\n this.isRowMergeComplete = true;\n this.repeatFlag = false;\n this.rowFontSplit = false;\n this.pdfGrid = grid;\n }\n Object.defineProperty(PdfGridRow.prototype, \"rowSpanExists\", {\n //Properties\n /**\n * Gets or sets a value indicating [`row span exists`].\n * @private\n */\n get: function () {\n return this.bRowSpanExists;\n },\n set: function (value) {\n this.bRowSpanExists = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"cells\", {\n /**\n * Gets the `cells` from the selected row.[Read-Only].\n * @private\n */\n get: function () {\n if (this.gridCells == null) {\n this.gridCells = new PdfGridCellCollection(this);\n }\n return this.gridCells;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"grid\", {\n /**\n * Gets or sets the parent `grid`.\n * @private\n */\n get: function () {\n return this.pdfGrid;\n },\n set: function (value) {\n this.pdfGrid = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"style\", {\n /**\n * Gets or sets the row `style`.\n * @private\n */\n get: function () {\n if (typeof this.rowStyle === 'undefined') {\n this.rowStyle = new PdfGridRowStyle();\n this.rowStyle.setParent(this);\n }\n return this.rowStyle;\n },\n set: function (value) {\n this.rowStyle = value;\n for (var i = 0; i < this.cells.count; i++) {\n this.cells.getCell(i).style.borders = value.border;\n if (typeof value.font !== 'undefined') {\n this.cells.getCell(i).style.font = value.font;\n }\n if (typeof value.backgroundBrush !== 'undefined') {\n this.cells.getCell(i).style.backgroundBrush = value.backgroundBrush;\n }\n if (typeof value.backgroundImage !== 'undefined') {\n this.cells.getCell(i).style.backgroundImage = value.backgroundImage;\n }\n if (typeof value.textBrush !== 'undefined') {\n this.cells.getCell(i).style.textBrush = value.textBrush;\n }\n if (typeof value.textPen !== 'undefined') {\n this.cells.getCell(i).style.textPen = value.textPen;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"rowBreakHeight\", {\n /**\n * `Height` of the row yet to be drawn after split.\n * @private\n */\n get: function () {\n if (typeof this.gridRowBreakHeight === 'undefined') {\n this.gridRowBreakHeight = 0;\n }\n return this.gridRowBreakHeight;\n },\n set: function (value) {\n this.gridRowBreakHeight = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"rowOverflowIndex\", {\n /**\n * `over flow index` of the row.\n * @private\n */\n get: function () {\n return this.gridRowOverflowIndex;\n },\n set: function (value) {\n this.gridRowOverflowIndex = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"height\", {\n /**\n * Gets or sets the `height` of the row.\n * @private\n */\n get: function () {\n if (!this.isRowHeightSet) {\n this.rowHeight = this.measureHeight();\n }\n return this.rowHeight;\n },\n set: function (value) {\n this.rowHeight = value;\n this.isRowHeightSet = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"width\", {\n /**\n * Gets or sets the `width` of the row.\n * @private\n */\n get: function () {\n if (this.rowWidth === 0 || typeof this.rowWidth === 'undefined') {\n this.rowWidth = this.measureWidth();\n }\n return this.rowWidth;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"NestedGridLayoutResult\", {\n /**\n * Gets or sets the row `Nested grid Layout Result`.\n * @private\n */\n get: function () {\n return this.gridResult;\n },\n set: function (value) {\n this.gridResult = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"columnSpanExists\", {\n /**\n * Gets or sets a value indicating [`column span exists`].\n * @private\n */\n get: function () {\n return this.bColumnSpanExists;\n },\n set: function (value) {\n this.bColumnSpanExists = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"rowMergeComplete\", {\n /**\n * Check whether the Row `has row span or row merge continue`.\n * @private\n */\n get: function () {\n return this.isRowMergeComplete;\n },\n set: function (value) {\n this.isRowMergeComplete = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRow.prototype, \"rowIndex\", {\n /**\n * Returns `index` of the row.\n * @private\n */\n get: function () {\n return this.grid.rows.rowCollection.indexOf(this);\n },\n enumerable: true,\n configurable: true\n });\n //Implementation\n /**\n * `Calculates the height`.\n * @private\n */\n PdfGridRow.prototype.measureHeight = function () {\n var rowSpanRemainingHeight = 0;\n var rowHeight;\n var maxHeight = 0;\n if (this.cells.getCell(0).rowSpan > 1) {\n rowHeight = 0;\n }\n else {\n rowHeight = this.cells.getCell(0).height;\n }\n for (var i = 0; i < this.cells.count; i++) {\n var cell = this.cells.getCell(i);\n //get the maximum rowspan remaining height.\n if (cell.rowSpanRemainingHeight > rowSpanRemainingHeight) {\n rowSpanRemainingHeight = cell.rowSpanRemainingHeight;\n }\n //skip the cell if row spanned.\n // if (cell.isRowMergeContinue) {\n // continue;\n // }\n // if (!cell.isRowMergeContinue) {\n // this.rowMergeComplete = false;\n // }\n this.rowMergeComplete = false;\n if (cell.rowSpan > 1) {\n var cellIn = i;\n var rowin = this.grid.rows.rowCollection.indexOf(this);\n for (var j = 0; j < cell.rowSpan; j++) {\n if ((j + 1) < cell.rowSpan) {\n this.grid.rows.getRow(rowin + j + 1).cells.getCell(cellIn).hasRowSpan = true;\n }\n }\n if (maxHeight < cell.height) {\n maxHeight = cell.height;\n }\n continue;\n }\n rowHeight = Math.max(rowHeight, cell.height);\n }\n if (maxHeight > rowHeight) {\n rowHeight = maxHeight;\n }\n if (rowHeight === 0) {\n rowHeight = maxHeight;\n }\n else if (rowSpanRemainingHeight > 0) {\n rowHeight += rowSpanRemainingHeight;\n }\n return rowHeight;\n };\n PdfGridRow.prototype.measureWidth = function () {\n var rowWid = 0;\n for (var i = 0; i < this.grid.columns.count; i++) {\n var column = this.grid.columns.getColumn(i);\n rowWid += column.width;\n }\n return rowWid;\n };\n return PdfGridRow;\n}());\nexport { PdfGridRow };\n/**\n * `PdfGridRowCollection` class provides access to an ordered, strongly typed collection of 'PdfGridRow' objects.\n * @private\n */\nvar PdfGridRowCollection = /** @class */ (function () {\n // Constructor\n /**\n * Initializes a new instance of the `PdfGridRowCollection` class with the parent grid.\n * @private\n */\n function PdfGridRowCollection(grid) {\n this.rows = [];\n this.grid = grid;\n }\n Object.defineProperty(PdfGridRowCollection.prototype, \"count\", {\n //Properties\n /**\n * Gets the number of header in the `PdfGrid`.[Read-Only].\n * @private\n */\n get: function () {\n return this.rows.length;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGridRowCollection.prototype, \"rowCollection\", {\n //Implementation\n /**\n * Return the row collection of the `grid`.\n * @private\n */\n get: function () {\n return this.rows;\n },\n enumerable: true,\n configurable: true\n });\n PdfGridRowCollection.prototype.addRow = function (arg) {\n if (typeof arg === 'undefined') {\n var temprow = new PdfGridRow(this.grid);\n this.addRow(temprow);\n return temprow;\n }\n else {\n arg.style.setBackgroundBrush(this.grid.style.backgroundBrush);\n arg.style.setFont(this.grid.style.font);\n arg.style.setTextBrush(this.grid.style.textBrush);\n arg.style.setTextPen(this.grid.style.textPen);\n if (arg.cells.count === 0) {\n for (var i = 0; i < this.grid.columns.count; i++) {\n arg.cells.add(new PdfGridCell());\n }\n }\n this.rows.push(arg);\n }\n };\n /**\n * Return the row by index.\n * @private\n */\n PdfGridRowCollection.prototype.getRow = function (index) {\n return this.rows[index];\n };\n return PdfGridRowCollection;\n}());\nexport { PdfGridRowCollection };\n/**\n * `PdfGridHeaderCollection` class provides customization of the settings for the header.\n * @private\n */\nvar PdfGridHeaderCollection = /** @class */ (function () {\n //constructor\n /**\n * Initializes a new instance of the `PdfGridHeaderCollection` class with the parent grid.\n * @private\n */\n function PdfGridHeaderCollection(grid) {\n /**\n * The array to store the `rows` of the grid header.\n * @private\n */\n this.rows = [];\n this.grid = grid;\n this.rows = [];\n }\n //Properties\n /**\n * Gets a 'PdfGridRow' object that represents the `header` row in a 'PdfGridHeaderCollection' control.[Read-Only].\n * @private\n */\n PdfGridHeaderCollection.prototype.getHeader = function (index) {\n // if (index < 0 || index >= Count) {\n // throw new IndexOutOfRangeException();\n // }\n return (this.rows[index]);\n };\n Object.defineProperty(PdfGridHeaderCollection.prototype, \"count\", {\n /**\n * Gets the `number of header` in the 'PdfGrid'.[Read-Only]\n * @private\n */\n get: function () {\n return this.rows.length;\n },\n enumerable: true,\n configurable: true\n });\n PdfGridHeaderCollection.prototype.add = function (arg) {\n if (typeof arg === 'number') {\n var row = void 0;\n for (var i = 0; i < arg; i++) {\n row = new PdfGridRow(this.grid);\n for (var j = 0; j < this.grid.columns.count; j++) {\n row.cells.add(new PdfGridCell());\n }\n this.rows.push(row);\n }\n return this.rows;\n }\n else {\n this.rows.push(arg);\n }\n };\n PdfGridHeaderCollection.prototype.indexOf = function (row) {\n return this.rows.indexOf(row);\n };\n return PdfGridHeaderCollection;\n}());\nexport { PdfGridHeaderCollection };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfGrid.ts class for EJ2-PDF\n */\nimport { PdfGridColumnCollection } from './pdf-grid-column';\nimport { PdfGridRowCollection, PdfGridHeaderCollection } from './pdf-grid-row';\nimport { RectangleF, SizeF, PointF } from './../../drawing/pdf-drawing';\nimport { PdfLayoutElement } from './../../graphics/figures/layout-element';\nimport { PdfLayoutFormat } from './../../graphics/figures/base/element-layouter';\nimport { PdfGridStyle } from './styles/style';\nimport { PdfBorders } from './styles/pdf-borders';\nimport { PdfGridLayouter } from './../../structured-elements/grid/layout/grid-layouter';\nvar PdfGrid = /** @class */ (function (_super) {\n __extends(PdfGrid, _super);\n //constructor\n /**\n * Initialize a new instance for `PdfGrid` class.\n * @private\n */\n function PdfGrid() {\n var _this = _super.call(this) || this;\n /**\n * @hidden\n * @private\n */\n _this.gridSize = new SizeF(0, 0);\n /**\n * Check the child grid is ' split or not'\n */\n _this.isGridSplit = false;\n /**\n * @hidden\n * @private\n */\n _this.isRearranged = false;\n /**\n * @hidden\n * @private\n */\n _this.pageBounds = new RectangleF();\n /**\n * @hidden\n * @private\n */\n _this.listOfNavigatePages = [];\n /**\n * @hidden\n * @private\n */\n _this.parentCellIndex = 0;\n _this.tempWidth = 0;\n /**\n * @hidden\n * @private\n */\n _this.breakRow = true;\n _this.splitChildRowIndex = -1;\n /**\n * The event raised on `begin cell lay outing`.\n * @event\n * @private\n */\n //public beginPageLayout : Function;\n /**\n * The event raised on `end cell lay outing`.\n * @event\n * @private\n */\n //public endPageLayout : Function;\n _this.hasRowSpanSpan = false;\n _this.hasColumnSpan = false;\n _this.isSingleGrid = true;\n return _this;\n }\n Object.defineProperty(PdfGrid.prototype, \"raiseBeginCellDraw\", {\n //Properties\n /**\n * Gets a value indicating whether the `start cell layout event` should be raised.\n * @private\n */\n get: function () {\n return (typeof this.beginCellDraw !== 'undefined' && typeof this.beginCellDraw !== null);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"raiseEndCellDraw\", {\n /**\n * Gets a value indicating whether the `end cell layout event` should be raised.\n * @private\n */\n get: function () {\n return (typeof this.endCellDraw !== 'undefined' && typeof this.endCellDraw !== null);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"repeatHeader\", {\n /**\n * Gets or sets a value indicating whether to `repeat header`.\n * @private\n */\n get: function () {\n if (this.bRepeatHeader == null || typeof this.bRepeatHeader === 'undefined') {\n this.bRepeatHeader = false;\n }\n return this.bRepeatHeader;\n },\n set: function (value) {\n this.bRepeatHeader = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"allowRowBreakAcrossPages\", {\n /**\n * Gets or sets a value indicating whether to split or cut rows that `overflow a page`.\n * @private\n */\n get: function () {\n return this.breakRow;\n },\n set: function (value) {\n this.breakRow = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"columns\", {\n /**\n * Gets the `column` collection of the PdfGrid.[Read-Only]\n * @private\n */\n get: function () {\n if (this.gridColumns == null || typeof this.gridColumns === 'undefined') {\n this.gridColumns = new PdfGridColumnCollection(this);\n }\n return this.gridColumns;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"rows\", {\n /**\n * Gets the `row` collection from the PdfGrid.[Read-Only]\n * @private\n */\n get: function () {\n if (this.gridRows == null) {\n this.gridRows = new PdfGridRowCollection(this);\n }\n return this.gridRows;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"headers\", {\n /**\n * Gets the `headers` collection from the PdfGrid.[Read-Only]\n * @private\n */\n get: function () {\n if (this.gridHeaders == null || typeof this.gridHeaders === 'undefined') {\n this.gridHeaders = new PdfGridHeaderCollection(this);\n }\n return this.gridHeaders;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"initialWidth\", {\n /**\n * Indicating `initial width` of the page.\n * @private\n */\n get: function () {\n return this.gridInitialWidth;\n },\n set: function (value) {\n this.gridInitialWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"style\", {\n /**\n * Gets or sets the `grid style`.\n * @private\n */\n get: function () {\n if (this.gridStyle == null) {\n this.gridStyle = new PdfGridStyle();\n }\n return this.gridStyle;\n },\n set: function (value) {\n if (this.gridStyle == null) {\n this.gridStyle = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"isPageWidth\", {\n /**\n * Gets a value indicating whether the grid column width is considered to be `page width`.\n * @private\n */\n get: function () {\n return this.ispageWidth;\n },\n set: function (value) {\n this.ispageWidth = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"isChildGrid\", {\n /**\n * Gets or set if grid `is nested grid`.\n * @private\n */\n get: function () {\n return this.ischildGrid;\n },\n set: function (value) {\n this.ischildGrid = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"size\", {\n /**\n * Gets or set if grid ' is split or not'\n * @public\n */\n // public get isGridSplit() : boolean {\n // return this.isgridSplit;\n // }\n // public set isGridSplit(value : boolean) {\n // this.isgridSplit = value;\n // }public get isGridSplit() : boolean {\n // return this.isgridSplit;\n // }\n // public set isGridSplit(value : boolean) {\n // this.isgridSplit = value;\n // }\n /**\n * Gets the `size`.\n * @private\n */\n get: function () {\n if ((this.gridSize.width === 0 || typeof this.gridSize.width === 'undefined') && this.gridSize.height === 0) {\n this.gridSize = this.measure();\n }\n return this.gridSize;\n // } else {\n // return this.gridSize;\n // }\n },\n set: function (value) {\n this.gridSize = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"ParentCell\", {\n get: function () {\n return this.parentCell;\n },\n set: function (value) {\n this.parentCell = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfGrid.prototype, \"LayoutFormat\", {\n get: function () {\n return this.layoutFormat;\n },\n enumerable: true,\n configurable: true\n });\n PdfGrid.prototype.draw = function (arg1, arg2, arg3, arg4) {\n if (arg2 instanceof PointF && typeof arg2.width === 'undefined' && typeof arg3 === 'undefined') {\n return this.drawHelper(arg1, arg2.x, arg2.y);\n }\n else if (typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'undefined') {\n return this.drawHelper(arg1, arg2, arg3, null);\n }\n else if (arg2 instanceof RectangleF && typeof arg2.width !== 'undefined' && typeof arg3 === 'undefined') {\n return this.drawHelper(arg1, arg2, null);\n }\n else if (arg2 instanceof PointF && typeof arg2.width === 'undefined' && arg3 instanceof PdfLayoutFormat) {\n return this.drawHelper(arg1, arg2.x, arg2.y, arg3);\n }\n else if (typeof arg2 === 'number' && typeof arg3 === 'number' && (arg4 instanceof PdfLayoutFormat || arg4 == null)) {\n var width = (arg1.graphics.clientSize.width - arg2);\n var layoutRectangle = new RectangleF(arg2, arg3, width, 0);\n return this.drawHelper(arg1, layoutRectangle, arg4);\n }\n else if (arg2 instanceof RectangleF && typeof arg2.width !== 'undefined' && typeof arg3 === 'boolean') {\n return this.drawHelper(arg1, arg2, null);\n }\n else {\n return this.drawHelper(arg1, arg2, arg3);\n }\n };\n /**\n * `measures` this instance.\n * @private\n */\n PdfGrid.prototype.measure = function () {\n var height = 0;\n var width = this.columns.width;\n for (var i = 0; i < this.headers.count; i++) {\n var row = this.headers.getHeader(i);\n height += row.height;\n }\n for (var i = 0; i < this.rows.count; i++) {\n var row = this.rows.getRow(i);\n height += row.height;\n }\n return new SizeF(width, height);\n };\n PdfGrid.prototype.onBeginCellDraw = function (args) {\n if (this.raiseBeginCellDraw) {\n this.beginCellDraw(this, args);\n }\n };\n PdfGrid.prototype.onEndCellDraw = function (args) {\n if (this.raiseEndCellDraw) {\n this.endCellDraw(this, args);\n }\n };\n /**\n * `Layouts` the specified graphics.\n * @private\n */\n PdfGrid.prototype.layout = function (param) {\n if (this.rows.count !== 0) {\n var currentRow = this.rows.getRow(0).cells.getCell(0).style;\n if (currentRow.borders != null && ((currentRow.borders.left != null && currentRow.borders.left.width !== 1) ||\n (currentRow.borders.top != null && currentRow.borders.top.width !== 1))) {\n var x = currentRow.borders.left.width / 2;\n var y = currentRow.borders.top.width / 2;\n if (param.bounds.x === PdfBorders.default.right.width / 2 && param.bounds.y === PdfBorders.default.right.width / 2) {\n var newBound = new RectangleF(x, y, this.gridSize.width, this.gridSize.height);\n param.bounds = newBound;\n }\n }\n }\n this.setSpan();\n this.checkSpan();\n this.layoutFormat = param.format;\n this.gridLocation = param.bounds;\n var layouter = new PdfGridLayouter(this);\n var result = (layouter.Layouter(param));\n return result;\n };\n PdfGrid.prototype.setSpan = function () {\n var colSpan = 1;\n var rowSpan = 1;\n var currentCellIndex = 0;\n var currentRowIndex = 0;\n var maxSpan = 0;\n var rowCount = this.headers.count;\n for (var i = 0; i < rowCount; i++) {\n var row = this.headers.getHeader(i);\n maxSpan = 0;\n var colCount = row.cells.count;\n for (var j = 0; j < colCount; j++) {\n var cell = row.cells.getCell(j);\n maxSpan = Math.max(maxSpan, cell.rowSpan);\n //Skip setting span map for already coverted rows/columns.\n if (!cell.isCellMergeContinue && !cell.isRowMergeContinue && (cell.columnSpan > 1 || cell.rowSpan > 1)) {\n if (cell.columnSpan + j > row.cells.count) {\n throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());\n }\n if (cell.rowSpan + i > this.headers.count) {\n throw new Error('Invalid span specified at Header ' + j.toString() + ' column ' + i.toString());\n }\n // if (this.rows.count !== 0 && cell.rowSpan + i > this.rows.count) {\n // throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());\n // }\n if (cell.columnSpan > 1 && cell.rowSpan > 1) {\n colSpan = cell.columnSpan;\n rowSpan = cell.rowSpan;\n currentCellIndex = j;\n currentRowIndex = i;\n cell.isCellMergeStart = true;\n cell.isRowMergeStart = true;\n //Set Column merges for first row\n while (colSpan > 1) {\n currentCellIndex++;\n row.cells.getCell(currentCellIndex).isCellMergeContinue = true;\n row.cells.getCell(currentCellIndex).isRowMergeContinue = true;\n row.cells.getCell(currentCellIndex).rowSpan = rowSpan;\n colSpan--;\n }\n currentCellIndex = j;\n colSpan = cell.columnSpan;\n //Set Row Merges and column merges foreach subsequent rows.\n while (rowSpan > 1) {\n currentRowIndex++;\n this.headers.getHeader(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;\n this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;\n rowSpan--;\n while (colSpan > 1) {\n currentCellIndex++;\n this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isCellMergeContinue = true;\n this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;\n colSpan--;\n }\n colSpan = cell.columnSpan;\n currentCellIndex = j;\n }\n }\n else if (cell.columnSpan > 1 && cell.rowSpan === 1) {\n colSpan = cell.columnSpan;\n currentCellIndex = j;\n cell.isCellMergeStart = true;\n //Set Column merges.\n while (colSpan > 1) {\n currentCellIndex++;\n row.cells.getCell(currentCellIndex).isCellMergeContinue = true;\n colSpan--;\n }\n }\n else if (cell.columnSpan === 1 && cell.rowSpan > 1) {\n rowSpan = cell.rowSpan;\n currentRowIndex = i;\n //Set row Merges.\n while (rowSpan > 1) {\n currentRowIndex++;\n this.headers.getHeader(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;\n rowSpan--;\n }\n }\n }\n }\n row.maximumRowSpan = maxSpan;\n }\n };\n PdfGrid.prototype.checkSpan = function () {\n var cellcolSpan;\n var cellrowSpan = 1;\n var cellmaxSpan = 0;\n var currentCellIndex;\n var currentRowIndex = 0;\n cellcolSpan = cellrowSpan = 1;\n currentCellIndex = currentRowIndex = 0;\n if (this.hasRowSpanSpan || this.hasColumnSpan) {\n var rowCount = this.rows.count;\n for (var i = 0; i < rowCount; i++) {\n var row = this.rows.getRow(i);\n cellmaxSpan = 0;\n var colCount = row.cells.count;\n for (var j = 0; j < colCount; j++) {\n var cell = row.cells.getCell(j);\n cellmaxSpan = Math.max(cellmaxSpan, cell.rowSpan);\n //Skip setting span map for already coverted rows/columns.\n if (!cell.isCellMergeContinue && !cell.isRowMergeContinue\n && (cell.columnSpan > 1 || cell.rowSpan > 1)) {\n if (cell.columnSpan + j > row.cells.count) {\n throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());\n }\n if (cell.rowSpan + i > this.rows.count) {\n throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());\n }\n if (cell.columnSpan > 1 && cell.rowSpan > 1) {\n cellcolSpan = cell.columnSpan;\n cellrowSpan = cell.rowSpan;\n currentCellIndex = j;\n currentRowIndex = i;\n cell.isCellMergeStart = true;\n cell.isRowMergeStart = true;\n //Set Column merges for first row\n while (cellcolSpan > 1) {\n currentCellIndex++;\n row.cells.getCell(currentCellIndex).isCellMergeContinue = true;\n row.cells.getCell(currentCellIndex).isRowMergeContinue = true;\n cellcolSpan--;\n }\n currentCellIndex = j;\n cellcolSpan = cell.columnSpan;\n //Set Row Merges and column merges foreach subsequent rows.\n while (cellrowSpan > 1) {\n currentRowIndex++;\n this.rows.getRow(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;\n this.rows.getRow(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;\n cellrowSpan--;\n while (cellcolSpan > 1) {\n currentCellIndex++;\n this.rows.getRow(currentRowIndex).cells.getCell(currentCellIndex).isCellMergeContinue = true;\n this.rows.getRow(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;\n cellcolSpan--;\n }\n cellcolSpan = cell.columnSpan;\n currentCellIndex = j;\n }\n }\n else if (cell.columnSpan > 1 && cell.rowSpan === 1) {\n cellcolSpan = cell.columnSpan;\n currentCellIndex = j;\n cell.isCellMergeStart = true;\n //Set Column merges.\n while (cellcolSpan > 1) {\n currentCellIndex++;\n row.cells.getCell(currentCellIndex).isCellMergeContinue = true;\n cellcolSpan--;\n }\n }\n else if (cell.columnSpan === 1 && cell.rowSpan > 1) {\n cellrowSpan = cell.rowSpan;\n currentRowIndex = i;\n //Set row Merges.\n while (cellrowSpan > 1) {\n currentRowIndex++;\n this.rows.getRow(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;\n cellrowSpan--;\n }\n }\n }\n }\n row.maximumRowSpan = cellmaxSpan;\n }\n }\n };\n PdfGrid.prototype.measureColumnsWidth = function (bounds) {\n if (typeof bounds !== 'undefined') {\n this.isPageWidth = false;\n var widths = this.columns.getDefaultWidths(bounds.width - bounds.x);\n //let tempWidth : number = this.columns.getColumn(0).width;\n for (var i = 0, count = this.columns.count; i < count; i++) {\n // if (this.columns.getColumn(i).width < 0)\n // this.columns.getColumn(i).columnWidth = widths[i];\n // else if (this.columns.getColumn(i).width > 0 && !this.columns.getColumn(i).isCustomWidth && widths[i]>0 && this.isComplete)\n this.columns.getColumn(i).columnWidth = widths[i];\n this.tempWidth = widths[i];\n }\n if (this.ParentCell != null && this.style.allowHorizontalOverflow == false && this.ParentCell.row.grid.style.allowHorizontalOverflow == false) {\n var padding = 0;\n var columnWidth = 0;\n var columnCount = this.columns.count;\n var childGridColumnWidth = 0;\n if (this.ParentCell.style.cellPadding != null || typeof this.ParentCell.style.cellPadding !== 'undefined') {\n if (typeof this.ParentCell.style.cellPadding.left != 'undefined' && this.ParentCell.style.cellPadding.hasLeftPad) {\n padding += this.ParentCell.style.cellPadding.left;\n }\n if (typeof this.ParentCell.style.cellPadding.right != 'undefined' && this.ParentCell.style.cellPadding.hasRightPad) {\n padding += this.ParentCell.style.cellPadding.right;\n }\n }\n for (var i = 0; i < this.ParentCell.columnSpan; i++) {\n columnWidth += this.ParentCell.row.grid.columns.getColumn(this.parentCellIndex + i).width;\n }\n for (var j = 0; j < this.columns.count; j++) {\n if (this.gridColumns.getColumn(j).width > 0 && this.gridColumns.getColumn(j).isCustomWidth) {\n columnWidth -= this.gridColumns.getColumn(j).width;\n columnCount--;\n }\n }\n if ((this.ParentCell.row.grid.style.cellPadding != null || typeof this.ParentCell.row.grid.style.cellPadding != 'undefined')) {\n if (typeof this.ParentCell.row.grid.style.cellPadding.top != 'undefined' && this.ParentCell.row.grid.style.cellPadding.hasTopPad) {\n padding += this.ParentCell.row.grid.style.cellPadding.top;\n }\n if (typeof this.ParentCell.row.grid.style.cellPadding.bottom != 'undefined' && this.ParentCell.row.grid.style.cellPadding.hasBottomPad) {\n padding += this.ParentCell.row.grid.style.cellPadding.bottom;\n }\n }\n if (this.ParentCell.row.grid.style.cellSpacing != 0) {\n columnWidth -= this.ParentCell.row.grid.style.cellSpacing * 2;\n }\n if (columnWidth > padding) {\n childGridColumnWidth = (columnWidth - padding) / columnCount;\n this.tempWidth = childGridColumnWidth;\n if (this.ParentCell != null) {\n for (var j = 0; j < this.columns.count; j++) {\n if (!this.columns.getColumn(j).isCustomWidth)\n this.columns.getColumn(j).columnWidth = childGridColumnWidth;\n }\n }\n }\n }\n // if (this.ParentCell != null && this.ParentCell.row.width > 0)\n // {\n // if (this.isChildGrid && this.gridSize.width > this.ParentCell.row.width)\n // {\n // widths = this.columns.getDefaultWidths(bounds.width);\n // for (let i : number = 0; i < this.columns.count; i++)\n // {\n // this.columns.getColumn(i).width = widths[i];\n // }\n // }\n // }\n }\n else {\n var widths = [this.columns.count];\n for (var n = 0; n < this.columns.count; n++) {\n widths[n] = 0;\n }\n var cellWidth = 0;\n var cellWidths = 0;\n if ((typeof this.isChildGrid === 'undefined' && typeof this.gridLocation !== 'undefined') || (this.isChildGrid === null && typeof this.gridLocation !== 'undefined')) {\n this.initialWidth = this.gridLocation.width;\n }\n if (this.headers.count > 0) {\n var colCount_1 = this.headers.getHeader(0).cells.count;\n var rowCount = this.headers.count;\n for (var i = 0; i < colCount_1; i++) {\n cellWidth = 0;\n for (var j = 0; j < rowCount; j++) {\n var rowWidth = Math.min(this.initialWidth, this.headers.getHeader(j).cells.getCell(i).width);\n cellWidth = Math.max(cellWidth, rowWidth);\n }\n widths[i] = cellWidth;\n }\n }\n // else {\n // let colCount : number = this.rows.getRow(0).cells.count;\n // let rowCount : number = this.rows.count;\n // for (let i : number = 0; i < colCount; i++) {\n // cellWidth = 0;\n // for (let j : number = 0; j < rowCount; j++) {\n // let rowWidth : number = Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width);\n // cellWidth = Math.max(cellWidth, rowWidth);\n // }\n // widths[i] = cellWidth;\n // }\n // }\n cellWidth = 0;\n for (var i = 0, colCount_2 = this.columns.count; i < colCount_2; i++) {\n for (var j = 0, rowCount = this.rows.count; j < rowCount; j++) {\n if ((this.rows.getRow(j).cells.getCell(i).columnSpan == 1 && !this.rows.getRow(j).cells.getCell(i).isCellMergeContinue) || this.rows.getRow(j).cells.getCell(i).value != null) {\n if (this.rows.getRow(j).cells.getCell(i).value != null && !this.rows.getRow(j).grid.style.allowHorizontalOverflow) {\n var value = this.rows.getRow(j).grid.style.cellPadding.right +\n this.rows.getRow(j).grid.style.cellPadding.left\n + this.rows.getRow(j).cells.getCell(i).style.borders.left.width / 2;\n // if (this.initialWidth != 0 )\n // (this.rows.getRow(j).cells.getCell(i).value as PdfGrid).initialWidth = this.initialWidth - value;\n }\n var rowWidth = 0;\n rowWidth = this.initialWidth > 0.0 ? Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width) : this.rows.getRow(j).cells.getCell(i).width;\n // let internalWidth : number = this.rows.getRow(j).cells.getCell(i).width;\n // internalWidth += this.rows.getRow(j).cells.getCell(i).style.borders.left.width;\n // internalWidth += this.rows.getRow(j).cells.getCell(i).style.borders.right.width;\n // let internalHeight : number = this.rows.getRow(j).cells.getCell(i).height;\n // internalHeight += (this.rows.getRow(j).cells.getCell(i).style.borders.top.width);\n // internalHeight += (this.rows.getRow(j).cells.getCell(i).style.borders.bottom.width);\n // let isCorrectWidth : boolean = (internalWidth + this.gridLocation.x) > this.currentGraphics.clientSize.width;\n // let isCorrectHeight : boolean = (internalHeight + this.gridLocation.y) > this.currentGraphics.clientSize.height;\n // if (isCorrectWidth || isCorrectHeight) {\n // throw Error('Image size exceeds client size of the page. Can not insert this image');\n // }\n // rowWidth = Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width);\n cellWidth = Math.max(widths[i], Math.max(cellWidth, rowWidth));\n cellWidth = Math.max(this.columns.getColumn(i).width, cellWidth);\n }\n }\n if (this.rows.count != 0)\n widths[i] = cellWidth;\n cellWidth = 0;\n }\n for (var i = 0, RowCount = this.rows.count; i < RowCount; i++) {\n for (var j = 0, ColCount = this.columns.count; j < ColCount; j++) {\n if (this.rows.getRow(i).cells.getCell(j).columnSpan > 1) {\n var total = widths[j];\n for (var k = 1; k < this.rows.getRow(i).cells.getCell(j).columnSpan; k++) {\n total += widths[j + k];\n }\n // if (this.rows.getRow(i).cells.getCell(j).width > total)\n // {\n // let extendedWidth : number = this.rows.getRow(i).cells.getCell(j).width - total;\n // extendedWidth = extendedWidth / this.rows.getRow(i).cells.getCell(j).columnSpan;\n // for (let k : number = j; k < j + this.rows.getRow(i).cells.getCell(j).columnSpan; k++)\n // widths[k] += extendedWidth;\n // }\n }\n }\n }\n // if (this.isChildGrid && this.initialWidth != 0)\n // {\n // widths = this.columns.getDefaultWidths(this.initialWidth);\n // }\n for (var i = 0, count = this.columns.count; i < count; i++) {\n if (this.columns.getColumn(i).width <= 0)\n this.columns.getColumn(i).columnWidth = widths[i];\n else if (this.columns.getColumn(i).width > 0 && !this.columns.getColumn(i).isCustomWidth)\n this.columns.getColumn(i).columnWidth = widths[i];\n }\n var padding = 0;\n var colWidth = 0;\n var colCount = this.columns.count;\n var childGridColWidth = 0;\n colWidth = this.tempWidth;\n for (var j = 0; j < this.columns.count; j++) {\n if (this.gridColumns.getColumn(j).width > 0 && this.gridColumns.getColumn(j).isCustomWidth) {\n colWidth -= this.gridColumns.getColumn(j).width;\n colCount--;\n }\n }\n // if (this.style.cellSpacing != 0){\n // colWidth -= this.style.cellSpacing * 2;\n // }\n if (colWidth > 0) {\n if (this.ParentCell.row.grid.style.cellSpacing != 0) {\n colWidth -= this.ParentCell.row.grid.style.cellSpacing * 2;\n }\n }\n if (colWidth > padding) {\n childGridColWidth = (colWidth) / colCount;\n if (this.ParentCell != null) {\n for (var j = 0; j < this.columns.count; j++) {\n if (!this.columns.getColumn(j).isCustomWidth)\n this.columns.getColumn(j).columnWidth = childGridColWidth;\n }\n }\n }\n }\n };\n return PdfGrid;\n}(PdfLayoutElement));\nexport { PdfGrid };\n","/**\n * PdfPageTemplateElement.ts class for EJ2-Pdf\n */\nimport { PdfDockStyle, PdfAlignmentStyle, TemplateType } from './enum';\nimport { PointF, SizeF } from './../drawing/pdf-drawing';\nimport { PdfTemplate } from './../graphics/figures/pdf-template';\nimport { PdfPage } from './pdf-page';\nimport { RectangleF } from './../drawing/pdf-drawing';\n/**\n * Describes a `page template` object that can be used as header/footer, watermark or stamp.\n */\nvar PdfPageTemplateElement = /** @class */ (function () {\n /* tslint:disable */\n function PdfPageTemplateElement(arg1, arg2, arg3, arg4, arg5) {\n if (arg1 instanceof RectangleF && typeof arg2 === 'undefined') {\n this.InitiateBounds(arg1.x, arg1.y, arg1.width, arg1.height, null);\n }\n else if (arg1 instanceof RectangleF && arg2 instanceof PdfPage && typeof arg3 === 'undefined') {\n this.InitiateBounds(arg1.x, arg1.y, arg1.width, arg1.height, arg2);\n }\n else if (arg1 instanceof PointF && arg2 instanceof SizeF && typeof arg3 === 'undefined') {\n this.InitiateBounds(arg1.x, arg1.y, arg2.width, arg2.height, null);\n }\n else if (arg1 instanceof PointF && arg2 instanceof SizeF && arg3 instanceof PdfPage && typeof arg4 === 'undefined') {\n this.InitiateBounds(arg1.x, arg1.y, arg2.width, arg2.height, arg3);\n }\n else if (arg1 instanceof SizeF && typeof arg2 === 'undefined') {\n this.InitiateBounds(0, 0, arg1.width, arg1.height, null);\n }\n else if (typeof arg1 === 'number' && typeof arg2 === 'number' && typeof arg3 === 'undefined') {\n this.InitiateBounds(0, 0, arg1, arg2, null);\n }\n else if (typeof arg1 === 'number' && typeof arg2 === 'number' && arg3 instanceof PdfPage && typeof arg4 === 'undefined') {\n this.InitiateBounds(0, 0, arg1, arg2, arg3);\n }\n else if (typeof arg1 === 'number' && typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'number' && typeof arg5 === 'undefined') {\n this.InitiateBounds(arg1, arg2, arg3, arg4, null);\n }\n else {\n this.InitiateBounds(arg1, arg2, arg3, arg4, null);\n // this.graphics.colorSpace = this.page.document.colorSpace;\n }\n /* tslint:enable */\n }\n Object.defineProperty(PdfPageTemplateElement.prototype, \"dock\", {\n // Properties\n /**\n * Gets or sets the `dock style` of the page template element.\n * @private\n */\n get: function () {\n return this.dockStyle;\n },\n set: function (value) {\n // if (this.dockStyle !== value && this.Type === TemplateType.None) {\n this.dockStyle = value;\n // Reset alignment.\n this.resetAlignment();\n // }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"alignment\", {\n /**\n * Gets or sets `alignment` of the page template element.\n * @private\n */\n get: function () {\n return this.alignmentStyle;\n },\n set: function (value) {\n // if (this.alignmentStyle !== value) {\n this.setAlignment(value);\n // }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"foreground\", {\n /**\n * Indicates whether the page template is located `in front of the page layers or behind of it`.\n * @private\n */\n get: function () {\n return this.isForeground;\n },\n set: function (value) {\n // if (this.foreground !== value) {\n this.isForeground = value;\n // }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"background\", {\n /**\n * Indicates whether the page template is located `behind of the page layers or in front of it`.\n * @private\n */\n get: function () {\n return !this.isForeground;\n },\n set: function (value) {\n this.isForeground = !value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"location\", {\n /**\n * Gets or sets `location` of the page template element.\n * @private\n */\n get: function () {\n return this.currentLocation;\n },\n set: function (value) {\n if (this.type === TemplateType.None) {\n this.currentLocation = value;\n }\n else {\n //\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"x\", {\n /**\n * Gets or sets `X` co-ordinate of the template element on the page.\n * @private\n */\n get: function () {\n var value = (typeof this.currentLocation !== 'undefined') ? this.currentLocation.x : 0;\n return value;\n },\n set: function (value) {\n if (this.type === TemplateType.None) {\n this.currentLocation.x = value;\n }\n else {\n //\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"y\", {\n /**\n * Gets or sets `Y` co-ordinate of the template element on the page.\n * @private\n */\n get: function () {\n var value = (typeof this.currentLocation !== 'undefined') ? this.currentLocation.y : 0;\n return value;\n },\n set: function (value) {\n if (this.type === TemplateType.None) {\n this.currentLocation.y = value;\n }\n else {\n //\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"size\", {\n /**\n * Gets or sets `size` of the page template element.\n * @private\n */\n get: function () {\n return this.template.size;\n },\n set: function (value) {\n if (this.type === TemplateType.None) {\n this.template.reset(value);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"width\", {\n /**\n * Gets or sets `width` of the page template element.\n * @private\n */\n get: function () {\n return this.template.width;\n },\n set: function (value) {\n if (this.template.width !== value && this.type === TemplateType.None) {\n var size = this.template.size;\n size.width = value;\n this.template.reset(size);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"height\", {\n /**\n * Gets or sets `height` of the page template element.\n * @private\n */\n get: function () {\n return this.template.height;\n },\n set: function (value) {\n if (this.template.height !== value && this.type === TemplateType.None) {\n var size = this.template.size;\n size.height = value;\n this.template.reset(size);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"graphics\", {\n /**\n * Gets `graphics` context of the page template element.\n * @private\n */\n get: function () {\n return this.template.graphics;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"template\", {\n /**\n * Gets Pdf `template` object.\n * @private\n */\n get: function () {\n // if (typeof this.pdfTemplate === 'undefined' || this.pdfTemplate == null) {\n // this.pdfTemplate = new PdfTemplate(this.size);\n // }\n return this.pdfTemplate;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"type\", {\n /**\n * Gets or sets `type` of the usage of this page template.\n * @private\n */\n get: function () {\n return this.templateType;\n },\n set: function (value) {\n this.updateDocking(value);\n this.templateType = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfPageTemplateElement.prototype, \"bounds\", {\n /**\n * Gets or sets `bounds` of the page template.\n * @public\n */\n get: function () {\n return new RectangleF(new PointF(this.x, this.y), this.size);\n },\n set: function (value) {\n if (this.type === TemplateType.None) {\n this.location = new PointF(value.x, value.y);\n this.size = new SizeF(value.width, value.height);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\n * `Initialize Bounds` Initialize the bounds value of the template.\n * @private\n */\n PdfPageTemplateElement.prototype.InitiateBounds = function (arg1, arg2, arg3, arg4, arg5) {\n this.x = arg1;\n this.y = arg2;\n this.pdfTemplate = new PdfTemplate(arg3, arg4);\n // this.graphics.colorSpace = this.page.document.colorSpace;\n };\n /**\n * `Updates Dock` property if template is used as header/footer.\n * @private\n */\n PdfPageTemplateElement.prototype.updateDocking = function (type) {\n if (type !== TemplateType.None) {\n switch (type) {\n case TemplateType.Top:\n this.dock = PdfDockStyle.Top;\n break;\n case TemplateType.Bottom:\n this.dock = PdfDockStyle.Bottom;\n break;\n case TemplateType.Left:\n this.dock = PdfDockStyle.Left;\n break;\n case TemplateType.Right:\n this.dock = PdfDockStyle.Right;\n break;\n }\n this.resetAlignment();\n }\n };\n /**\n * `Resets alignment` of the template.\n * @private\n */\n PdfPageTemplateElement.prototype.resetAlignment = function () {\n this.alignment = PdfAlignmentStyle.None;\n };\n /**\n * `Sets alignment` of the template.\n * @private\n */\n PdfPageTemplateElement.prototype.setAlignment = function (alignment) {\n if (this.dock === PdfDockStyle.None) {\n this.alignmentStyle = alignment;\n }\n else {\n // Template is docked and alignment has been changed.\n var canBeSet = false;\n switch (this.dock) {\n case PdfDockStyle.Left:\n canBeSet = (alignment === PdfAlignmentStyle.TopLeft || alignment === PdfAlignmentStyle.MiddleLeft ||\n alignment === PdfAlignmentStyle.BottomLeft || alignment === PdfAlignmentStyle.None);\n break;\n case PdfDockStyle.Top:\n canBeSet = (alignment === PdfAlignmentStyle.TopLeft || alignment === PdfAlignmentStyle.TopCenter ||\n alignment === PdfAlignmentStyle.TopRight || alignment === PdfAlignmentStyle.None);\n break;\n case PdfDockStyle.Right:\n canBeSet = (alignment === PdfAlignmentStyle.TopRight || alignment === PdfAlignmentStyle.MiddleRight ||\n alignment === PdfAlignmentStyle.BottomRight || alignment === PdfAlignmentStyle.None);\n break;\n case PdfDockStyle.Bottom:\n canBeSet = (alignment === PdfAlignmentStyle.BottomLeft || alignment === PdfAlignmentStyle.BottomCenter\n || alignment === PdfAlignmentStyle.BottomRight || alignment === PdfAlignmentStyle.None);\n break;\n case PdfDockStyle.Fill:\n canBeSet = (alignment === PdfAlignmentStyle.MiddleCenter || alignment === PdfAlignmentStyle.None);\n break;\n }\n if (canBeSet) {\n this.alignmentStyle = alignment;\n }\n }\n };\n /**\n * Draws the template.\n * @private\n */\n PdfPageTemplateElement.prototype.draw = function (layer, document) {\n var page = layer.page;\n var bounds = this.calculateBounds(page, document);\n if (bounds.x === -0) {\n bounds.x = 0;\n }\n layer.graphics.drawPdfTemplate(this.template, new PointF(bounds.x, bounds.y), new SizeF(bounds.width, bounds.height));\n };\n /**\n * Calculates bounds of the page template.\n * @private\n */\n PdfPageTemplateElement.prototype.calculateBounds = function (page, document) {\n var result = this.bounds;\n if (this.alignmentStyle !== PdfAlignmentStyle.None) {\n result = this.getAlignmentBounds(page, document);\n }\n else if (this.dockStyle !== PdfDockStyle.None) {\n result = this.getDockBounds(page, document);\n }\n return result;\n };\n /**\n * Calculates bounds according to the alignment.\n * @private\n */\n PdfPageTemplateElement.prototype.getAlignmentBounds = function (page, document) {\n var result = this.bounds;\n if (this.type === TemplateType.None) {\n result = this.getSimpleAlignmentBounds(page, document);\n }\n else {\n result = this.getTemplateAlignmentBounds(page, document);\n }\n return result;\n };\n /**\n * Calculates bounds according to the alignment.\n * @private\n */\n PdfPageTemplateElement.prototype.getSimpleAlignmentBounds = function (page, document) {\n var bounds = this.bounds;\n var pdfSection = page.section;\n var actualBounds = pdfSection.getActualBounds(document, page, false);\n var x = this.x;\n var y = this.y;\n switch (this.alignmentStyle) {\n case PdfAlignmentStyle.TopLeft:\n x = 0;\n y = 0;\n break;\n case PdfAlignmentStyle.TopCenter:\n x = (actualBounds.width - this.width) / 2;\n y = 0;\n break;\n case PdfAlignmentStyle.TopRight:\n x = actualBounds.width - this.width;\n y = 0;\n break;\n case PdfAlignmentStyle.MiddleLeft:\n x = 0;\n y = (actualBounds.height - this.height) / 2;\n break;\n case PdfAlignmentStyle.MiddleCenter:\n x = (actualBounds.width - this.width) / 2;\n y = (actualBounds.height - this.height) / 2;\n break;\n case PdfAlignmentStyle.MiddleRight:\n x = actualBounds.width - this.width;\n y = (actualBounds.height - this.height) / 2;\n break;\n case PdfAlignmentStyle.BottomLeft:\n x = 0;\n y = actualBounds.height - this.height;\n break;\n case PdfAlignmentStyle.BottomCenter:\n x = (actualBounds.width - this.width) / 2;\n y = actualBounds.height - this.height;\n break;\n case PdfAlignmentStyle.BottomRight:\n x = actualBounds.width - this.width;\n y = actualBounds.height - this.height;\n break;\n }\n bounds.x = x;\n bounds.y = y;\n return bounds;\n };\n /**\n * Calculates bounds according to the alignment.\n * @private\n */\n PdfPageTemplateElement.prototype.getTemplateAlignmentBounds = function (page, document) {\n var result = this.bounds;\n var section = page.section;\n var actualBounds = section.getActualBounds(document, page, false);\n var x = this.x;\n var y = this.y;\n switch (this.alignmentStyle) {\n case PdfAlignmentStyle.TopLeft:\n if (this.type === TemplateType.Left) {\n x = -actualBounds.x;\n y = 0;\n }\n else if (this.type === TemplateType.Top) {\n x = -actualBounds.x;\n y = -actualBounds.y;\n }\n break;\n case PdfAlignmentStyle.TopCenter:\n x = (actualBounds.width - this.width) / 2;\n y = -actualBounds.y;\n break;\n case PdfAlignmentStyle.TopRight:\n if (this.type === TemplateType.Right) {\n x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;\n y = 0;\n }\n else if (this.type === TemplateType.Top) {\n x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;\n y = -actualBounds.y;\n }\n break;\n case PdfAlignmentStyle.MiddleLeft:\n x = -actualBounds.x;\n y = (actualBounds.height - this.height) / 2;\n break;\n case PdfAlignmentStyle.MiddleCenter:\n x = (actualBounds.width - this.width) / 2;\n y = (actualBounds.height - this.height) / 2;\n break;\n case PdfAlignmentStyle.MiddleRight:\n x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;\n y = (actualBounds.height - this.height) / 2;\n break;\n case PdfAlignmentStyle.BottomLeft:\n if (this.type === TemplateType.Left) {\n x = -actualBounds.x;\n y = actualBounds.height - this.height;\n }\n else if (this.type === TemplateType.Bottom) {\n x = -actualBounds.x;\n y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;\n }\n break;\n case PdfAlignmentStyle.BottomCenter:\n x = (actualBounds.width - this.width) / 2;\n y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;\n break;\n case PdfAlignmentStyle.BottomRight:\n if (this.type === TemplateType.Right) {\n x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;\n y = actualBounds.height - this.height;\n }\n else if (this.type === TemplateType.Bottom) {\n x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;\n y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;\n }\n break;\n }\n result.x = x;\n result.y = y;\n return result;\n };\n /**\n * Calculates bounds according to the docking.\n * @private\n */\n PdfPageTemplateElement.prototype.getDockBounds = function (page, document) {\n var result = this.bounds;\n if (this.type === TemplateType.None) {\n result = this.getSimpleDockBounds(page, document);\n }\n else {\n result = this.getTemplateDockBounds(page, document);\n }\n return result;\n };\n /**\n * Calculates bounds according to the docking.\n * @private\n */\n PdfPageTemplateElement.prototype.getSimpleDockBounds = function (page, document) {\n var result = this.bounds;\n var section = page.section;\n var actualBounds = section.getActualBounds(document, page, false);\n var x = this.x;\n var y = this.y;\n var width = this.width;\n var height = this.height;\n switch (this.dockStyle) {\n case PdfDockStyle.Left:\n x = 0;\n y = 0;\n width = this.width;\n height = actualBounds.height;\n break;\n case PdfDockStyle.Top:\n x = 0;\n y = 0;\n width = actualBounds.width;\n height = this.height;\n break;\n case PdfDockStyle.Right:\n x = actualBounds.width - this.width;\n y = 0;\n width = this.width;\n height = actualBounds.height;\n break;\n case PdfDockStyle.Bottom:\n x = 0;\n y = actualBounds.height - this.height;\n width = actualBounds.width;\n height = this.height;\n break;\n case PdfDockStyle.Fill:\n x = 0;\n x = 0;\n width = actualBounds.width;\n height = actualBounds.height;\n break;\n }\n result = new RectangleF(x, y, width, height);\n return result;\n };\n /**\n * Calculates template bounds basing on docking if template is a page template.\n * @private\n */\n PdfPageTemplateElement.prototype.getTemplateDockBounds = function (page, document) {\n var result = this.bounds;\n var section = page.section;\n var actualBounds = section.getActualBounds(document, page, false);\n var actualSize = section.pageSettings.getActualSize();\n var x = this.x;\n var y = this.y;\n var width = this.width;\n var height = this.height;\n switch (this.dockStyle) {\n case PdfDockStyle.Left:\n x = -actualBounds.x;\n y = 0;\n width = this.width;\n height = actualBounds.height;\n break;\n case PdfDockStyle.Top:\n x = -actualBounds.x;\n y = -actualBounds.y;\n width = actualSize.width;\n height = this.height;\n if (actualBounds.height < 0) {\n y = -actualBounds.y + actualSize.height;\n }\n break;\n case PdfDockStyle.Right:\n x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;\n y = 0;\n width = this.width;\n height = actualBounds.height;\n break;\n case PdfDockStyle.Bottom:\n x = -actualBounds.x;\n y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;\n width = actualSize.width;\n height = this.height;\n if (actualBounds.height < 0) {\n y -= actualSize.height;\n }\n break;\n case PdfDockStyle.Fill:\n x = 0;\n x = 0;\n width = actualBounds.width;\n height = actualBounds.height;\n break;\n }\n result = new RectangleF(x, y, width, height);\n return result;\n };\n return PdfPageTemplateElement;\n}());\nexport { PdfPageTemplateElement };\n","/**\n * PdfNumbersConvertor.ts class for EJ2-PDF\n * @private\n */\nimport { PdfNumberStyle } from './../../pages/enum';\n/**\n * `PdfNumbersConvertor` for convert page number into numbers, roman letters, etc.,\n * @private\n */\nvar PdfNumbersConvertor = /** @class */ (function () {\n function PdfNumbersConvertor() {\n }\n // Static methods\n /**\n * Convert string value from page number with correct format.\n * @private\n */\n PdfNumbersConvertor.convert = function (intArabic, numberStyle) {\n var result = '';\n switch (numberStyle) {\n case PdfNumberStyle.None:\n result = '';\n break;\n case PdfNumberStyle.Numeric:\n result = intArabic.toString();\n break;\n case PdfNumberStyle.LowerLatin:\n result = this.arabicToLetter(intArabic).toLowerCase();\n break;\n case PdfNumberStyle.LowerRoman:\n result = this.arabicToRoman(intArabic).toLowerCase();\n break;\n case PdfNumberStyle.UpperLatin:\n result = this.arabicToLetter(intArabic);\n break;\n case PdfNumberStyle.UpperRoman:\n result = this.arabicToRoman(intArabic);\n break;\n }\n return result;\n };\n /**\n * Converts `arabic to roman` letters.\n * @private\n */\n PdfNumbersConvertor.arabicToRoman = function (intArabic) {\n var retval = '';\n var retvalM = this.generateNumber(intArabic, 1000, 'M');\n retval += retvalM.returnValue;\n intArabic = retvalM.intArabic;\n var retvalCM = this.generateNumber(intArabic, 900, 'CM');\n retval += retvalCM.returnValue;\n intArabic = retvalCM.intArabic;\n var retvalD = this.generateNumber(intArabic, 500, 'D');\n retval += retvalD.returnValue;\n intArabic = retvalD.intArabic;\n var retvalCD = this.generateNumber(intArabic, 400, 'CD');\n retval += retvalCD.returnValue;\n intArabic = retvalCD.intArabic;\n var retvalC = this.generateNumber(intArabic, 100, 'C');\n retval += retvalC.returnValue;\n intArabic = retvalC.intArabic;\n var retvalXC = this.generateNumber(intArabic, 90, 'XC');\n retval += retvalXC.returnValue;\n intArabic = retvalXC.intArabic;\n var retvalL = this.generateNumber(intArabic, 50, 'L');\n retval += retvalL.returnValue;\n intArabic = retvalL.intArabic;\n var retvalXL = this.generateNumber(intArabic, 40, 'XL');\n retval += retvalXL.returnValue;\n intArabic = retvalXL.intArabic;\n var retvalX = this.generateNumber(intArabic, 10, 'X');\n retval += retvalX.returnValue;\n intArabic = retvalX.intArabic;\n var retvalIX = this.generateNumber(intArabic, 9, 'IX');\n retval += retvalIX.returnValue;\n intArabic = retvalIX.intArabic;\n var retvalV = this.generateNumber(intArabic, 5, 'V');\n retval += retvalV.returnValue;\n intArabic = retvalV.intArabic;\n var retvalIV = this.generateNumber(intArabic, 4, 'IV');\n retval += retvalIV.returnValue;\n intArabic = retvalIV.intArabic;\n var retvalI = this.generateNumber(intArabic, 1, 'I');\n retval += retvalI.returnValue;\n intArabic = retvalI.intArabic;\n return retval.toString();\n };\n /**\n * Converts `arabic to normal letters`.\n * @private\n */\n PdfNumbersConvertor.arabicToLetter = function (arabic) {\n var stack = this.convertToLetter(arabic);\n var result = '';\n while (stack.length > 0) {\n var num = stack.pop();\n result = this.appendChar(result, num);\n }\n return result.toString();\n };\n /**\n * Generate a string value of an input number.\n * @private\n */\n PdfNumbersConvertor.generateNumber = function (value, magnitude, letter) {\n var numberstring = '';\n while (value >= magnitude) {\n value -= magnitude;\n numberstring += letter;\n }\n return { returnValue: numberstring.toString(), intArabic: value };\n };\n /**\n * Convert a input number into letters.\n * @private\n */\n PdfNumbersConvertor.convertToLetter = function (arabic) {\n if (arabic <= 0) {\n throw Error('ArgumentOutOfRangeException-arabic, Value can not be less 0');\n }\n var stack = [];\n while (arabic > this.letterLimit) {\n var remainder = arabic % this.letterLimit;\n if (remainder === 0.0) {\n arabic = arabic / this.letterLimit - 1;\n remainder = this.letterLimit;\n }\n else {\n arabic /= this.letterLimit;\n }\n stack.push(remainder);\n }\n stack.push(arabic);\n return stack;\n };\n /**\n * Convert number to actual string value.\n * @private\n */\n PdfNumbersConvertor.appendChar = function (builder, value) {\n var letter = String.fromCharCode(PdfNumbersConvertor.acsiiStartIndex + value);\n builder += letter;\n return builder;\n };\n // Fields\n /**\n * numbers of letters in english [readonly].\n * @default = 26.0\n * @private\n */\n PdfNumbersConvertor.letterLimit = 26.0;\n /**\n * Resturns `acsii start index` value.\n * @default 64\n * @private\n */\n PdfNumbersConvertor.acsiiStartIndex = (65 - 1);\n return PdfNumbersConvertor;\n}());\nexport { PdfNumbersConvertor };\n","/**\n * Represent class to store information about `template and value pairs`.\n * @private\n */\nvar PdfTemplateValuePair = /** @class */ (function () {\n function PdfTemplateValuePair(template, value) {\n // Fields\n /**\n * Internal variable to store template.\n * @default null\n * @private\n */\n this.pdfTemplate = null;\n /**\n * Intenal variable to store value.\n * @private\n */\n this.content = '';\n if (typeof template === 'undefined') {\n //\n }\n else {\n this.template = template;\n this.value = value;\n }\n }\n Object.defineProperty(PdfTemplateValuePair.prototype, \"template\", {\n // Properties\n /**\n * Gets or sets the template.\n * @private\n */\n get: function () {\n return this.pdfTemplate;\n },\n set: function (value) {\n this.pdfTemplate = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfTemplateValuePair.prototype, \"value\", {\n /**\n * Gets or sets the value.\n * @private\n */\n get: function () {\n return this.content;\n },\n set: function (value) {\n this.content = value;\n },\n enumerable: true,\n configurable: true\n });\n return PdfTemplateValuePair;\n}());\nexport { PdfTemplateValuePair };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfAutomaticField.ts class for EJ2-PDF\n */\nimport { PdfAutomaticField } from './automatic-field';\nimport { TemporaryDictionary } from './../../collections/object-object-pair/dictionary';\nimport { PdfTemplateValuePair } from './pdf-template-value-pair';\nimport { SizeF, PointF } from './../../drawing/pdf-drawing';\nimport { PdfTemplate } from './../../graphics/figures/pdf-template';\n/**\n * Represents automatic field which has the same value within the `PdfGraphics`.\n */\nvar PdfMultipleValueField = /** @class */ (function (_super) {\n __extends(PdfMultipleValueField, _super);\n function PdfMultipleValueField() {\n var _this = _super.call(this) || this;\n // Fields\n /**\n * Stores the instance of dictionary values of `graphics and template value pair`.\n * @private\n */\n _this.list = new TemporaryDictionary();\n return _this;\n }\n // Implementation\n /* tslint:disable */\n PdfMultipleValueField.prototype.performDraw = function (graphics, location, scalingX, scalingY) {\n _super.prototype.performDrawHelper.call(this, graphics, location, scalingX, scalingY);\n var value = this.getValue(graphics);\n var template = new PdfTemplate(this.getSize());\n this.list.setValue(graphics, new PdfTemplateValuePair(template, value));\n var g = template.graphics;\n var size = this.getSize();\n template.graphics.drawString(value, this.getFont(), this.pen, this.getBrush(), 0, 0, size.width, size.height, this.stringFormat);\n var drawLocation = new PointF(location.x + this.location.x, location.y + this.location.y);\n graphics.drawPdfTemplate(template, drawLocation, new SizeF(template.width * scalingX, template.height * scalingY));\n };\n return PdfMultipleValueField;\n}(PdfAutomaticField));\nexport { PdfMultipleValueField };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PdfBrush } from './../../graphics/brushes/pdf-brush';\nimport { PdfNumberStyle } from './../../pages/enum';\nimport { PdfNumbersConvertor } from './pdf-numbers-convertor';\nimport { PdfMultipleValueField } from './multiple-value-field';\n/**\n * Represents PDF document `page number field`.\n * @public\n */\nvar PdfPageNumberField = /** @class */ (function (_super) {\n __extends(PdfPageNumberField, _super);\n function PdfPageNumberField(font, arg2) {\n var _this = _super.call(this) || this;\n // Fields\n /**\n * Stores the number style of the page number field.\n * @private\n */\n _this.internalNumberStyle = PdfNumberStyle.Numeric;\n if (typeof arg2 === 'undefined') {\n _this.font = font;\n }\n else if (arg2 instanceof PdfBrush) {\n _this.font = font;\n _this.brush = arg2;\n }\n else {\n _this.font = font;\n _this.bounds = arg2;\n }\n return _this;\n }\n Object.defineProperty(PdfPageNumberField.prototype, \"numberStyle\", {\n // Properties\n /**\n * Gets and sets the number style of the page number field.\n * @private\n */\n get: function () {\n return this.internalNumberStyle;\n },\n set: function (value) {\n this.internalNumberStyle = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Return the `string` value of page number field.\n * @public\n */\n PdfPageNumberField.prototype.getValue = function (graphics) {\n var result = null;\n var page = this.getPageFromGraphics(graphics);\n result = this.internalGetValue(page);\n return result;\n };\n /**\n * Internal method to `get actual value of page number`.\n * @private\n */\n PdfPageNumberField.prototype.internalGetValue = function (page) {\n var document = page.document;\n var pageIndex = document.pages.indexOf(page) + 1;\n return PdfNumbersConvertor.convert(pageIndex, this.numberStyle);\n };\n return PdfPageNumberField;\n}(PdfMultipleValueField));\nexport { PdfPageNumberField };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfCompositeField.ts class for EJ2-PDF\n */\nimport { PdfMultipleValueField } from './multiple-value-field';\n/**\n * Represents class which can concatenate multiple automatic fields into single string.\n */\nvar PdfCompositeField = /** @class */ (function (_super) {\n __extends(PdfCompositeField, _super);\n // Constructor\n /**\n * Initialize a new instance of `PdfCompositeField` class.\n * @param font Font of the field.\n * @param brush Color of the field.\n * @param text Content of the field.\n * @param list List of the automatic fields in specific order based on the text content.\n */\n function PdfCompositeField(font, brush, text) {\n var list = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n list[_i - 3] = arguments[_i];\n }\n var _this = _super.call(this) || this;\n // Fields\n /**\n * Stores the array of automatic fields.\n * @private\n */\n _this.internalAutomaticFields = null;\n /**\n * Stores the text value of the field.\n * @private\n */\n _this.internalText = '';\n _this.font = font;\n _this.brush = brush;\n _this.text = text;\n _this.automaticFields = list;\n return _this;\n }\n Object.defineProperty(PdfCompositeField.prototype, \"text\", {\n // Properties\n /**\n * Gets and sets the content of the field.\n * @public\n */\n get: function () {\n return this.internalText;\n },\n set: function (value) {\n this.internalText = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PdfCompositeField.prototype, \"automaticFields\", {\n /**\n * Gets and sets the list of the field to drawn.\n * @public\n */\n get: function () {\n return this.internalAutomaticFields;\n },\n set: function (value) {\n this.internalAutomaticFields = value;\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * Return the actual value generated from the list of automatic fields.\n * @public\n */\n PdfCompositeField.prototype.getValue = function (graphics) {\n var values = [];\n var text = this.text.toString();\n if (typeof this.automaticFields !== 'undefined' && this.automaticFields != null && this.automaticFields.length > 0) {\n for (var i = 0; i < this.automaticFields.length; i++) {\n var automaticField = this.automaticFields[i];\n text = text.replace('{' + i + '}', automaticField.getValue(graphics));\n }\n }\n return text;\n };\n return PdfCompositeField;\n}(PdfMultipleValueField));\nexport { PdfCompositeField };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfSingleValueField.ts class for EJ2-PDF\n */\nimport { PdfAutomaticField } from './automatic-field';\nimport { TemporaryDictionary } from './../../collections/object-object-pair/dictionary';\nimport { PdfTemplateValuePair } from './pdf-template-value-pair';\nimport { PointF, SizeF } from './../../drawing/pdf-drawing';\nimport { PdfTemplate } from './../../graphics/figures/pdf-template';\n/**\n * Represents automatic field which has the same value in the whole document.\n */\nvar PdfSingleValueField = /** @class */ (function (_super) {\n __extends(PdfSingleValueField, _super);\n // Constructors\n function PdfSingleValueField() {\n var _this = _super.call(this) || this;\n // Fields\n /* tslint:disable */\n _this.list = new TemporaryDictionary();\n /* tslint:enable */\n _this.painterGraphics = [];\n return _this;\n }\n PdfSingleValueField.prototype.performDraw = function (graphics, location, scalingX, scalingY) {\n _super.prototype.performDrawHelper.call(this, graphics, location, scalingX, scalingY);\n var page = this.getPageFromGraphics(graphics);\n var document = page.document;\n var textValue = this.getValue(graphics);\n /* tslint:disable */\n if (this.list.containsKey(document)) {\n var pair = this.list.getValue(document);\n var drawLocation = new PointF(location.x + this.location.x, location.y + this.location.y);\n graphics.drawPdfTemplate(pair.template, drawLocation, new SizeF(pair.template.width * scalingX, pair.template.height * scalingY));\n this.painterGraphics.push(graphics);\n }\n else {\n var size = this.getSize();\n var template = new PdfTemplate(size);\n this.list.setValue(document, new PdfTemplateValuePair(template, textValue));\n template.graphics.drawString(textValue, this.getFont(), this.pen, this.getBrush(), 0, 0, size.width, size.height, this.stringFormat);\n var drawLocation = new PointF(location.x + this.location.x, location.y + this.location.y);\n graphics.drawPdfTemplate(template, drawLocation, new SizeF(template.width * scalingX, template.height * scalingY));\n this.painterGraphics.push(graphics);\n }\n /* tslint:enable */\n };\n return PdfSingleValueField;\n}(PdfAutomaticField));\nexport { PdfSingleValueField };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfPageCountField.ts class for EJ2-PDF\n */\nimport { PdfSingleValueField } from './single-value-field';\nimport { PdfNumberStyle } from './../../pages/enum';\nimport { PdfBrush } from './../../graphics/brushes/pdf-brush';\nimport { PdfNumbersConvertor } from './pdf-numbers-convertor';\n/**\n * Represents total PDF document page count automatic field.\n */\nvar PdfPageCountField = /** @class */ (function (_super) {\n __extends(PdfPageCountField, _super);\n function PdfPageCountField(font, arg2) {\n var _this = _super.call(this) || this;\n // Fields\n /**\n * Stores the number style of the field.\n * @private\n */\n _this.internalNumberStyle = PdfNumberStyle.Numeric;\n if (typeof arg2 === 'undefined') {\n _this.font = font;\n }\n else if (arg2 instanceof PdfBrush) {\n _this.font = font;\n _this.brush = arg2;\n }\n else {\n _this.font = font;\n _this.bounds = arg2;\n }\n return _this;\n }\n Object.defineProperty(PdfPageCountField.prototype, \"numberStyle\", {\n // Properties\n /**\n * Gets and sets the number style of the field.\n * @public\n */\n get: function () {\n return this.internalNumberStyle;\n },\n set: function (value) {\n this.internalNumberStyle = value;\n },\n enumerable: true,\n configurable: true\n });\n // Implementation\n /**\n * Return the actual value of the content to drawn.\n * @public\n */\n PdfPageCountField.prototype.getValue = function (graphics) {\n var result = null;\n var page = this.getPageFromGraphics(graphics);\n var document = page.section.parent.document;\n var count = document.pages.count;\n result = PdfNumbersConvertor.convert(count, this.numberStyle);\n return result;\n };\n return PdfPageCountField;\n}(PdfSingleValueField));\nexport { PdfPageCountField };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * PdfTrueTypeFont.ts class for EJ2-PDF\n */\nimport { UnicodeTrueTypeFont } from './unicode-true-type-font';\nimport { PdfFont } from './pdf-font';\nimport { PdfFontStyle } from './enum';\nimport { PdfDocument } from './../../document/pdf-document';\nimport { PdfTextDirection } from './../enum';\nimport { RtlRenderer } from './rtl-renderer';\n//https://www.giftofspeed.com/base64-encoder/\nvar PdfTrueTypeFont = /** @class */ (function (_super) {\n __extends(PdfTrueTypeFont, _super);\n function PdfTrueTypeFont(base64String, size, style) {\n var _this = _super.call(this, size) || this;\n /**\n * Indicates whether the font is embedded or not.\n * @private\n */\n _this.isEmbedFont = false;\n /**\n * Indicates whether the font is unicoded or not.\n * @private\n */\n _this.isUnicode = true;\n if (style !== undefined) {\n _this.createFontInternal(base64String, style);\n }\n else {\n _this.createFontInternal(base64String, PdfFontStyle.Regular);\n }\n return _this;\n }\n PdfTrueTypeFont.prototype.equalsToFont = function (font) {\n var result = false;\n //let result : boolean = this.fontInternal.equalsToFont(font);\n return result;\n };\n PdfTrueTypeFont.prototype.getLineWidth = function (line, format) {\n var width = 0;\n if (format !== null && typeof format !== 'undefined' && format.textDirection !== PdfTextDirection.None) {\n var returnValue = this.getUnicodeLineWidth(line, /*out*/ width, format);\n width = returnValue.width;\n }\n else {\n width = this.fontInternal.getLineWidth(line);\n }\n var size = this.metrics.getSize(format);\n width *= (PdfFont.charSizeMultiplier * size);\n width = this.applyFormatSettings(line, format, width);\n return width;\n };\n /**\n * Returns width of the char.\n */\n PdfTrueTypeFont.prototype.getCharWidth = function (charCode, format) {\n var codeWidth = this.fontInternal.getCharWidth(charCode);\n var size = this.metrics.getSize(format);\n codeWidth *= (0.001 * size);\n return codeWidth;\n };\n //Implementation\n PdfTrueTypeFont.prototype.createFontInternal = function (base64String, style) {\n this.fontInternal = new UnicodeTrueTypeFont(base64String, this.size);\n this.calculateStyle(style);\n this.initializeInternals();\n };\n PdfTrueTypeFont.prototype.calculateStyle = function (style) {\n var iStyle = this.fontInternal.ttfMetrics.macStyle;\n if ((style & PdfFontStyle.Underline) !== 0) {\n iStyle |= PdfFontStyle.Underline;\n }\n if ((style & PdfFontStyle.Strikeout) !== 0) {\n iStyle |= PdfFontStyle.Strikeout;\n }\n this.setStyle(iStyle);\n };\n PdfTrueTypeFont.prototype.initializeInternals = function () {\n var equalFont = null;\n if (PdfDocument.enableCache) {\n // Search for the similar fonts.\n equalFont = PdfDocument.cache.search(this);\n }\n var internals = null;\n // There is not equal font in the cache.\n if (equalFont !== null && equalFont !== undefined) {\n // Get the settings from the cached font.\n internals = equalFont.getInternals();\n var metrics = equalFont.metrics;\n metrics = metrics.clone();\n metrics.size = this.size;\n this.metrics = metrics;\n this.fontInternal = equalFont.fontInternal;\n }\n else {\n if (equalFont == null) {\n if (this.fontInternal instanceof UnicodeTrueTypeFont) {\n this.fontInternal.isEmbed = this.isEmbedFont;\n }\n this.fontInternal.createInternals();\n internals = this.fontInternal.getInternals();\n this.metrics = this.fontInternal.metrics;\n }\n }\n this.metrics.isUnicodeFont = true;\n this.setInternals(internals);\n //this.ttfReader = (this.fontInternal as UnicodeTrueTypeFont).ttfReader;\n };\n /**\n * Stores used symbols.\n */\n PdfTrueTypeFont.prototype.setSymbols = function (text) {\n var internalFont = this.fontInternal;\n if (internalFont != null) {\n internalFont.setSymbols(text);\n }\n };\n Object.defineProperty(PdfTrueTypeFont.prototype, \"Unicode\", {\n /**\n * Property\n *\n */\n get: function () {\n return this.isUnicode;\n },\n enumerable: true,\n configurable: true\n });\n // public get Font() : UnicodeTrueTypeFont {\n // return this.fontInternal as UnicodeTrueTypeFont;\n // }\n PdfTrueTypeFont.prototype.getUnicodeLineWidth = function (line, /*out*/ width, format) {\n // if (line == null) {\n // throw new Error('ArgumentNullException : line');\n // }\n width = 0;\n var glyphIndices = null;\n var rtlRender = new RtlRenderer();\n /* tslint:disable-next-line:max-line-length */\n var result = rtlRender.getGlyphIndex(line, this, (format.textDirection === PdfTextDirection.RightToLeft) ? true : false, /*out*/ glyphIndices, true);\n var resultGlyph = result.success;\n glyphIndices = result.glyphs;\n if (resultGlyph && glyphIndices !== null) {\n var ttfReader = this.fontInternal.ttfReader;\n for (var i = 0, len = glyphIndices.length; i < len; i++) {\n var glyphIndex = glyphIndices[i];\n var glyph = ttfReader.getGlyph(glyphIndex);\n if (glyph !== null && typeof glyph !== 'undefined') {\n width += glyph.width;\n }\n }\n }\n return { success: resultGlyph, width: width };\n };\n return PdfTrueTypeFont;\n}(PdfFont));\nexport { PdfTrueTypeFont };\n","import * as events from '../base/constant';\nimport { PdfDocument, PdfGrid, PdfBorders, PdfPen, PdfPaddings } from '@syncfusion/ej2-pdf-export';\nimport { PdfStandardFont, PdfFontFamily, PdfFontStyle, PdfBitmap } from '@syncfusion/ej2-pdf-export';\nimport { PdfStringFormat, PdfTextAlignment, PdfColor, PdfSolidBrush, PdfTextWebLink } from '@syncfusion/ej2-pdf-export';\nimport { PdfVerticalAlignment, RectangleF, PdfPageTemplateElement } from '@syncfusion/ej2-pdf-export';\nimport { PointF, PdfPageNumberField, PdfCompositeField } from '@syncfusion/ej2-pdf-export';\nimport { PdfPageCountField, SizeF, PdfPageSettings, PdfPageOrientation } from '@syncfusion/ej2-pdf-export';\nimport { PdfTrueTypeFont } from '@syncfusion/ej2-pdf-export';\nimport { ExportHelper, ExportValueFormatter } from './export-helper';\nimport { Data } from '../actions/data';\nimport { SummaryModelGenerator, GroupSummaryModelGenerator, CaptionSummaryModelGenerator } from '../services/summary-model-generator';\nimport { compile, getEnumValue, isNullOrUndefined, detach, isBlazor } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport { DataManager, Query } from '@syncfusion/ej2-data';\nimport { getValue } from '@syncfusion/ej2-base';\nimport { getUid, getPrintGridModel, measureColumnDepth, isExportColumns, updateColumnTypeForExportColumns, prepareColumns } from '../base/util';\n/**\n * `PDF Export` module is used to handle the exportToPDF action.\n * @hidden\n */\nvar PdfExport = /** @class */ (function () {\n /**\n * Constructor for the Grid PDF Export module\n * @hidden\n */\n function PdfExport(parent) {\n this.hideColumnInclude = false;\n this.currentViewData = false;\n this.customDataSource = false;\n this.isGrouping = false;\n this.headerOnPages = [];\n this.drawPosition = { xPosition: 0, yPosition: 0 };\n this.parent = parent;\n this.helper = new ExportHelper(parent);\n this.gridPool = {};\n }\n /**\n * For internal use only - Get the module name.\n */\n PdfExport.prototype.getModuleName = function () {\n return 'PdfExport';\n };\n PdfExport.prototype.init = function (parent) {\n this.exportValueFormatter = new ExportValueFormatter(parent.locale);\n this.pdfDocument = undefined;\n this.hideColumnInclude = false;\n this.currentViewData = false;\n this.parent = parent;\n this.isGrouping = false;\n this.isExporting = true;\n parent.id = getUid('main-grid');\n this.gridPool[parent.id] = false;\n this.pdfPageSettings = new PdfPageSettings();\n };\n PdfExport.prototype.exportWithData = function (parent, pdfDoc, resolve, returnType, pdfExportProperties, isMultipleExport, reject) {\n var _this = this;\n this.init(parent);\n if (!isNullOrUndefined(pdfDoc)) {\n this.pdfDocument = pdfDoc;\n }\n else {\n this.pdfDocument = new PdfDocument();\n }\n this.processExport(parent, returnType, pdfExportProperties, isMultipleExport).then(function () {\n _this.isExporting = false;\n parent.trigger(events.pdfExportComplete, _this.isBlob ? { promise: _this.blobPromise } : {});\n _this.parent.log('exporting_complete', _this.getModuleName());\n resolve(_this.pdfDocument);\n }).catch(function (e) {\n reject(_this.pdfDocument);\n _this.parent.trigger(events.actionFailure, e);\n });\n };\n /**\n * Used to map the input data\n * @return {void}\n */\n PdfExport.prototype.Map = function (parent, pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {\n var _this = this;\n this.data = new Data(this.parent);\n this.isBlob = isBlob;\n this.gridPool = {};\n var query = new Query();\n if (parent.childGrid && !(!isNullOrUndefined(pdfExportProperties) && pdfExportProperties.hierarchyExportMode === 'None')) {\n parent.expandedRows = getPrintGridModel(parent).expandedRows;\n }\n var args = {\n requestType: 'beforePdfExport', cancel: false,\n headerPageNumbers: [], gridDrawPosition: { xPosition: 0, yPosition: 0 }, generateQuery: false\n };\n if (!isBlazor()) {\n var gridObject = 'gridObject';\n args[gridObject] = parent;\n }\n var can = 'cancel';\n var generateQuery = 'generateQuery';\n var header = 'headerPageNumbers';\n var drawPos = 'gridDrawPosition';\n parent.trigger(events.beforePdfExport, args);\n if (args[can] === true) {\n return new Promise(function (resolve, reject) {\n return resolve();\n });\n }\n if (isExportColumns(pdfExportProperties)) {\n updateColumnTypeForExportColumns(pdfExportProperties, parent);\n }\n if (args[generateQuery]) {\n query = ExportHelper.getQuery(parent, this.data);\n }\n this.headerOnPages = args[header];\n this.drawPosition = args[drawPos];\n this.parent.log('exporting_begin', this.getModuleName());\n if (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.dataSource)\n && pdfExportProperties.dataSource instanceof DataManager) {\n return new Promise(function (resolve, reject) {\n pdfExportProperties.dataSource.executeQuery(query).then(function (returnType) {\n _this.exportWithData(parent, pdfDoc, resolve, returnType, pdfExportProperties, isMultipleExport, reject);\n });\n });\n }\n else if (!isNullOrUndefined(pdfExportProperties) && pdfExportProperties.exportType === 'CurrentPage') {\n return new Promise(function (resolve, reject) {\n _this.exportWithData(parent, pdfDoc, resolve, _this.parent.getCurrentViewRecords(), pdfExportProperties, isMultipleExport, reject);\n });\n }\n else {\n var allPromise_1 = [];\n allPromise_1.push(this.data.getData({}, ExportHelper.getQuery(parent, this.data)));\n allPromise_1.push(this.helper.getColumnData(parent));\n return new Promise(function (resolve, reject) {\n Promise.all(allPromise_1).then(function (e) {\n _this.init(parent);\n if (!isNullOrUndefined(pdfDoc)) {\n _this.pdfDocument = pdfDoc;\n }\n else {\n _this.pdfDocument = new PdfDocument();\n }\n _this.processExport(parent, e[0], pdfExportProperties, isMultipleExport).then(function () {\n _this.isExporting = false;\n parent.trigger(events.pdfExportComplete, _this.isBlob ? { promise: _this.blobPromise } : {});\n _this.parent.log('exporting_complete', _this.getModuleName());\n resolve(_this.pdfDocument);\n }).catch(function (e) {\n reject(_this.pdfDocument);\n _this.parent.trigger(events.actionFailure, e);\n });\n });\n });\n }\n };\n PdfExport.prototype.processExport = function (gObj, returnType, pdfExportProperties, isMultipleExport) {\n var _this = this;\n var section = this.pdfDocument.sections.add();\n var pdfGrid;\n this.processSectionExportProperties(section, pdfExportProperties);\n var pdfPage = section.pages.add();\n return new Promise(function (resolve, reject) {\n pdfGrid = _this.processGridExport(gObj, returnType, pdfExportProperties);\n _this.globalResolve = resolve;\n _this.gridPool[gObj.id] = true;\n _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);\n }).then(function () {\n // draw the grid\n var xPosition = 'xPosition';\n var yPosition = 'yPosition';\n pdfGrid.draw(pdfPage, _this.drawPosition[xPosition], _this.drawPosition[yPosition]);\n _this.drawHeader(pdfExportProperties);\n if (!isMultipleExport) {\n // save the PDF\n if (!_this.isBlob) {\n if (!isNullOrUndefined(pdfExportProperties) && pdfExportProperties.fileName) {\n _this.pdfDocument.save(pdfExportProperties.fileName);\n }\n else {\n _this.pdfDocument.save('Export.pdf');\n }\n }\n else {\n _this.blobPromise = _this.pdfDocument.save();\n }\n _this.pdfDocument.destroy();\n delete gObj.expandedRows;\n }\n return _this.pdfDocument;\n });\n };\n PdfExport.prototype.processSectionExportProperties = function (section, pdfExportProperties) {\n if (!isNullOrUndefined(pdfExportProperties) && (!isNullOrUndefined(pdfExportProperties.pageOrientation)\n || !isNullOrUndefined(pdfExportProperties.pageSize))) {\n this.pdfPageSettings.orientation = (pdfExportProperties.pageOrientation === 'Landscape') ?\n PdfPageOrientation.Landscape : PdfPageOrientation.Portrait;\n this.pdfPageSettings.size = this.getPageSize(pdfExportProperties.pageSize);\n section.setPageSettings(this.pdfPageSettings);\n }\n return section;\n };\n PdfExport.prototype.processGridExport = function (gObj, returnType, pdfExportProperties) {\n var allowHorizontalOverflow = true;\n var isFrozen = this.parent.isFrozenGrid() && !this.parent.getFrozenColumns();\n if (!isNullOrUndefined(pdfExportProperties)) {\n this.gridTheme = pdfExportProperties.theme;\n if (isBlazor() && !isNullOrUndefined(this.gridTheme)) {\n this.getGridPdfFont(this.gridTheme);\n }\n allowHorizontalOverflow = isNullOrUndefined(pdfExportProperties.allowHorizontalOverflow) ?\n true : pdfExportProperties.allowHorizontalOverflow;\n }\n var helper = new ExportHelper(gObj);\n var dataSource = this.processExportProperties(pdfExportProperties, returnType.result);\n var columns = isExportColumns(pdfExportProperties) ?\n prepareColumns(pdfExportProperties.columns, gObj.enableColumnVirtualization) :\n helper.getGridExportColumns(isFrozen ? gObj.getColumns() : gObj.columns);\n columns = columns.filter(function (columns) { return isNullOrUndefined(columns.commands); });\n var isGrouping = false;\n if (gObj.groupSettings.columns.length) {\n isGrouping = true;\n }\n if (gObj.childGrid && !isNullOrUndefined(pdfExportProperties)) {\n gObj.hierarchyPrintMode = pdfExportProperties.hierarchyExportMode || 'Expanded';\n }\n // create a grid\n var pdfGrid = new PdfGrid();\n // get header theme style\n var headerThemeStyle = this.getHeaderThemeStyle();\n var border = headerThemeStyle.border;\n var headerFont = headerThemeStyle.font;\n var headerBrush = headerThemeStyle.brush;\n var returnValue = helper.getHeaders(columns, this.hideColumnInclude);\n // Column collection with respect to the records in the grid\n var gridColumns = returnValue.columns;\n // process grid header content\n pdfGrid = this.processGridHeaders(gObj.groupSettings.columns.length, pdfGrid, returnValue.rows, gridColumns, border, headerFont, headerBrush, gObj, allowHorizontalOverflow, columns);\n // set alignment, width and type of the values of the column\n this.setColumnProperties(gridColumns, pdfGrid, helper, gObj, allowHorizontalOverflow);\n var captionThemeStyle = this.getSummaryCaptionThemeStyle();\n if (!isNullOrUndefined(dataSource) && dataSource.length) {\n if (isGrouping) {\n if (!isNullOrUndefined(captionThemeStyle.border)) {\n border = captionThemeStyle.border;\n }\n this.processGroupedRecords(pdfGrid, dataSource, gridColumns, gObj, border, 0, captionThemeStyle.font, captionThemeStyle.\n brush, captionThemeStyle.backgroundBrush, returnType, pdfExportProperties, helper, 0);\n }\n else {\n this.processRecord(border, gridColumns, gObj, dataSource, pdfGrid, 0, pdfExportProperties, helper, 0);\n }\n if (!isNullOrUndefined(returnType.aggregates)) {\n var summaryModel = new SummaryModelGenerator(gObj);\n var sRows = void 0;\n var column = summaryModel.getColumns();\n column = column.filter(function (col) { return isNullOrUndefined(col.commands) && col.type !== 'checkbox'; });\n if (gObj.aggregates.length && this.parent !== gObj) {\n gObj.aggregateModule.prepareSummaryInfo();\n }\n if (this.customDataSource) {\n sRows = summaryModel.generateRows(dataSource, returnType.aggregates);\n }\n else if (this.currentViewData) {\n sRows = summaryModel.generateRows(this.parent.getCurrentViewRecords(), returnType.aggregates);\n }\n else if (isGrouping) {\n sRows = summaryModel.generateRows(dataSource.records, returnType.aggregates);\n }\n else {\n sRows = summaryModel.generateRows(returnType.result, returnType.aggregates, null, null, column);\n }\n this.processAggregates(sRows, pdfGrid, border, captionThemeStyle.font, captionThemeStyle.brush, captionThemeStyle.backgroundBrush, false);\n }\n }\n else {\n var row = pdfGrid.rows.addRow();\n row.style.setBorder(border);\n }\n return pdfGrid;\n };\n PdfExport.prototype.getSummaryCaptionThemeStyle = function () {\n if (!isNullOrUndefined(this.gridTheme) && !isNullOrUndefined(this.gridTheme.caption)) {\n var fontSize = !isNullOrUndefined(this.gridTheme.caption.fontSize) ? this.gridTheme.caption.fontSize : 9.75;\n var fontFamily = !isNullOrUndefined(this.gridTheme.caption.fontName) ?\n this.getFontFamily(this.gridTheme.caption.fontName) : PdfFontFamily.Helvetica;\n var fontStyle = this.getFontStyle(this.gridTheme.caption);\n var pdfColor = new PdfColor(0, 0, 0);\n if (!isNullOrUndefined(this.gridTheme.caption.fontColor)) {\n var penBrushColor = this.hexToRgb(this.gridTheme.caption.fontColor);\n pdfColor = new PdfColor(penBrushColor.r, penBrushColor.g, penBrushColor.b);\n }\n var borderCaption = this.gridTheme.caption.border ? this.getBorderStyle(this.gridTheme.caption.border) : null;\n var font = new PdfStandardFont(fontFamily, fontSize, fontStyle);\n if (!isNullOrUndefined(this.gridTheme.caption.font)) {\n font = this.gridTheme.caption.font;\n }\n return { font: font, brush: new PdfSolidBrush(pdfColor), backgroundBrush: new PdfSolidBrush(new PdfColor(246, 246, 246)),\n border: borderCaption };\n }\n else {\n //Material theme\n return { font: new PdfStandardFont(PdfFontFamily.Helvetica, 9.75), brush: new PdfSolidBrush(new PdfColor(0, 0, 0)),\n backgroundBrush: new PdfSolidBrush(new PdfColor(246, 246, 246)) };\n }\n };\n PdfExport.prototype.getGridPdfFont = function (args) {\n var fontFamily = 'fontFamily';\n var fontSize = 'fontSize';\n var fontStyle = 'fontStyle';\n var isTrueType = 'isTrueType';\n var style = 0;\n if (args.header && args.header.font) {\n var headerFont = args.header.font[fontFamily];\n var headerSize = args.header.font[fontSize];\n var headerStyle = args.header.font[fontStyle];\n style = (isNullOrUndefined(PdfFontStyle[headerStyle]) ? 0 : PdfFontStyle[headerStyle]);\n if (args.header.font[isTrueType]) {\n args.header.font = new PdfTrueTypeFont(headerFont, headerSize, style);\n }\n else {\n var fontFamily_1 = !isNullOrUndefined(headerFont) ?\n this.getFontFamily(headerFont) : PdfFontFamily.Helvetica;\n args.header.font = new PdfStandardFont(fontFamily_1, headerSize, style);\n }\n }\n if (args.caption && args.caption.font) {\n var captionFont = args.caption.font[fontFamily];\n var captionSize = args.caption.font[fontSize];\n var captionStyle = args.caption.font[fontStyle];\n style = (isNullOrUndefined(PdfFontStyle[captionStyle]) ? 0 : PdfFontStyle[captionStyle]);\n if (args.caption.font[isTrueType]) {\n args.caption.font = new PdfTrueTypeFont(captionFont, captionSize, style);\n }\n else {\n var fontFamily_2 = !isNullOrUndefined(captionFont) ?\n this.getFontFamily(captionFont) : PdfFontFamily.Helvetica;\n args.caption.font = new PdfStandardFont(fontFamily_2, captionSize, style);\n }\n }\n if (args.record && args.record.font) {\n var recordFont = args.record.font[fontFamily];\n var recordSize = args.record.font[fontSize];\n var recordStyle = args.record.font[fontStyle];\n style = (isNullOrUndefined(PdfFontStyle[recordStyle]) ? 0 : PdfFontStyle[recordStyle]);\n if (args.record.font[isTrueType]) {\n args.record.font = new PdfTrueTypeFont(recordFont, recordSize, style);\n }\n else {\n var fontFamily_3 = !isNullOrUndefined(recordFont) ?\n this.getFontFamily(recordFont) : PdfFontFamily.Helvetica;\n args.record.font = new PdfStandardFont(fontFamily_3, recordSize, style);\n }\n }\n };\n PdfExport.prototype.getHeaderThemeStyle = function () {\n var border = new PdfBorders();\n if (!isNullOrUndefined(this.gridTheme) && !isNullOrUndefined(this.gridTheme.header)) {\n var fontFamily = !isNullOrUndefined(this.gridTheme.header.fontName) ?\n this.getFontFamily(this.gridTheme.header.fontName) : PdfFontFamily.Helvetica;\n var fontStyle = this.getFontStyle(this.gridTheme.header);\n var fontSize = !isNullOrUndefined(this.gridTheme.header.fontSize) ? this.gridTheme.header.fontSize : 10.5;\n var pdfColor = new PdfColor();\n if (!isNullOrUndefined(this.gridTheme.header.fontColor)) {\n var penBrushColor = this.hexToRgb(this.gridTheme.header.fontColor);\n pdfColor = new PdfColor(penBrushColor.r, penBrushColor.g, penBrushColor.b);\n }\n var font = new PdfStandardFont(fontFamily, fontSize, fontStyle);\n if (!isNullOrUndefined(this.gridTheme.header.font)) {\n font = this.gridTheme.header.font;\n }\n return { border: this.getBorderStyle(this.gridTheme.header.border), font: font, brush: new PdfSolidBrush(pdfColor) };\n }\n else {\n //Material theme\n border.all = new PdfPen(new PdfColor(234, 234, 234));\n return { border: border, font: new PdfStandardFont(PdfFontFamily.Helvetica, 10.5),\n brush: new PdfSolidBrush(new PdfColor(102, 102, 102)) };\n }\n };\n /* tslint:disable-next-line:no-any */\n PdfExport.prototype.processGroupedRecords = function (pdfGrid, dataSource, gridColumns, gObj, border, level, font, brush, backgroundBrush, returnType, pdfExportProperties, helper, index) {\n var _this = this;\n var groupIndex = level;\n var _loop_1 = function (dataSourceItems) {\n var row = pdfGrid.rows.addRow();\n var col = gObj.getColumnByField(dataSourceItems.field);\n /* tslint:disable-next-line:no-any */\n var args = {\n value: dataSourceItems.key,\n column: col,\n style: undefined,\n isForeignKey: col.isForeignColumn(),\n };\n /* tslint:disable-next-line:max-line-length */\n var value = this_1.parent.getColumnByField(dataSourceItems.field).headerText + ': ' + (!col.enableGroupByFormat ? this_1.exportValueFormatter.formatCellValue(args) : dataSourceItems.key) + ' - ' + dataSourceItems.count + (dataSource.count > 1 ? ' items' : ' item');\n var cArgs = { captionText: value, type: 'PDF' };\n this_1.parent.trigger(events.exportGroupCaption, cArgs, function (cArgs) {\n row.cells.getCell(groupIndex).value = cArgs.captionText;\n row.cells.getCell(groupIndex + 1).style.stringFormat = new PdfStringFormat(PdfTextAlignment.Left);\n row.style.setBorder(border);\n row.style.setFont(font);\n row.style.setTextBrush(brush);\n row.style.setBackgroundBrush(backgroundBrush);\n var sRows;\n var captionSummaryModel = new CaptionSummaryModelGenerator(gObj);\n if (!isNullOrUndefined(dataSourceItems.items.records)) {\n sRows = captionSummaryModel.generateRows(dataSourceItems.items.records, dataSourceItems);\n }\n else {\n sRows = captionSummaryModel.generateRows(dataSourceItems.items, dataSourceItems);\n }\n if (!isNullOrUndefined(sRows) && sRows.length === 0) {\n row.cells.getCell(groupIndex + 1).columnSpan = pdfGrid.columns.count - (groupIndex + 1);\n }\n if (!isNullOrUndefined(dataSource.childLevels) && dataSource.childLevels > 0) {\n _this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, true, row, groupIndex);\n _this.processGroupedRecords(pdfGrid, dataSourceItems.items, gridColumns, gObj, border, (groupIndex + 1), font, brush, backgroundBrush, returnType, pdfExportProperties, helper, index);\n var groupSummaryModel = new GroupSummaryModelGenerator(gObj);\n sRows = groupSummaryModel.generateRows(dataSourceItems.items.records, dataSourceItems);\n _this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, false);\n }\n else {\n _this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, true, row, groupIndex);\n index = _this.processRecord(border, gridColumns, gObj, dataSourceItems.items, pdfGrid, (groupIndex + 1), pdfExportProperties, helper, index);\n var groupSummaryModel = new GroupSummaryModelGenerator(gObj);\n sRows = groupSummaryModel.generateRows(dataSourceItems.items, dataSourceItems);\n var isGroupedFooter = true;\n _this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, false, null, null, isGroupedFooter);\n }\n });\n };\n var this_1 = this;\n for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {\n var dataSourceItems = dataSource_1[_i];\n _loop_1(dataSourceItems);\n }\n };\n PdfExport.prototype.processGridHeaders = function (childLevels, pdfGrid, rows, gridColumn, border, headerFont, headerBrush, grid, allowHorizontalOverflow, eCols) {\n var _this = this;\n var columnCount = gridColumn.length + childLevels;\n var depth = measureColumnDepth(eCols);\n var cols = eCols;\n var index = 0;\n if (this.parent.allowGrouping) {\n index = this.parent.groupSettings.columns.length;\n }\n pdfGrid.columns.add(columnCount);\n pdfGrid.headers.add(rows.length);\n var applyTextAndSpan = function (rowIdx, colIdx, col, rowSpan, colSpan) {\n var gridHeader = pdfGrid.headers.getHeader(rowIdx);\n var pdfCell = gridHeader.cells.getCell(colIdx);\n var cell = rows[rowIdx].cells[colIdx];\n if (!isNullOrUndefined(col.headerTextAlign)) {\n pdfCell.style.stringFormat = _this.getHorizontalAlignment(col.headerTextAlign);\n }\n if (rowSpan > 0) {\n pdfCell.rowSpan = rowSpan;\n pdfCell.style.stringFormat = _this.getVerticalAlignment('Bottom', pdfCell.style.stringFormat, col.textAlign);\n }\n if (colSpan > 0) {\n pdfCell.columnSpan = colSpan;\n }\n gridHeader.style.setBorder(border);\n gridHeader.style.setFont(headerFont);\n gridHeader.style.setTextBrush(headerBrush);\n pdfCell.value = col.headerText;\n if (!isNullOrUndefined(cell) && (cell.cellType === CellType.HeaderIndent || cell.cellType === CellType.DetailHeader)) {\n pdfCell.value = '';\n pdfCell.width = 20;\n }\n var args = {\n cell: pdfCell,\n gridCell: cell,\n style: pdfCell.style\n };\n _this.parent.trigger(events.pdfHeaderQueryCellInfo, args);\n };\n var recuHeader = function (cols, depth, spanCnt, colIndex, rowIndex, isRoot) {\n var cidx = 0;\n for (var i = 0; i < cols.length; i++) {\n if (isRoot) {\n cidx = cidx + spanCnt + (i === 0 ? 0 : -1);\n colIndex = cidx;\n spanCnt = 0;\n }\n if (cols[i].columns && cols[i].columns.length) {\n var newSpanCnt = recuHeader(cols[i].columns, depth - 1, 0, i + colIndex, rowIndex + 1, false);\n applyTextAndSpan(rowIndex, i + colIndex, cols[i], 0, newSpanCnt);\n spanCnt = spanCnt + newSpanCnt;\n colIndex = colIndex + newSpanCnt - 1;\n }\n else if (cols[i].visible || _this.hideColumnInclude) {\n spanCnt++;\n applyTextAndSpan(rowIndex, i + colIndex + index, cols[i], depth, 0);\n }\n }\n return spanCnt;\n };\n recuHeader(cols, depth, 0, 0, 0, true);\n if (pdfGrid.columns.count >= 6 && allowHorizontalOverflow) {\n pdfGrid.style.allowHorizontalOverflow = true;\n }\n return pdfGrid;\n };\n PdfExport.prototype.processExportProperties = function (pdfExportProperties, dataSource) {\n if (!isNullOrUndefined(pdfExportProperties)) {\n if (!isNullOrUndefined(pdfExportProperties.theme)) {\n this.gridTheme = pdfExportProperties.theme;\n }\n var clientSize = this.pdfPageSettings.size;\n this.drawHeader(pdfExportProperties);\n if (!isNullOrUndefined(pdfExportProperties.footer)) {\n /* tslint:disable-next-line:no-any */\n var footer = pdfExportProperties.footer;\n var position = new PointF(0, ((clientSize.width - 80) - (footer.fromBottom * 0.75)));\n var size = new SizeF((clientSize.width - 80), (footer.height * 0.75));\n var bounds = new RectangleF(position, size);\n this.pdfDocument.template.bottom = this.drawPageTemplate(new PdfPageTemplateElement(bounds), footer);\n }\n if (!isNullOrUndefined(pdfExportProperties.includeHiddenColumn) && !this.isGrouping) {\n this.hideColumnInclude = pdfExportProperties.includeHiddenColumn;\n }\n if (!isNullOrUndefined(pdfExportProperties.dataSource)) {\n if (!(pdfExportProperties.dataSource instanceof DataManager)) {\n dataSource = pdfExportProperties.dataSource;\n }\n this.customDataSource = true;\n this.currentViewData = false;\n }\n else if (!isNullOrUndefined(pdfExportProperties.exportType)) {\n if (pdfExportProperties.exportType === 'CurrentPage') {\n dataSource = this.parent.currentViewData;\n this.currentViewData = true;\n this.customDataSource = false;\n }\n else {\n this.currentViewData = false;\n this.customDataSource = false;\n }\n }\n else {\n this.currentViewData = false;\n this.customDataSource = false;\n }\n }\n else {\n this.currentViewData = false;\n this.customDataSource = false;\n }\n return dataSource;\n };\n PdfExport.prototype.drawHeader = function (pdfExportProperties) {\n var _this = this;\n var clientSize = this.pdfPageSettings.size;\n if (!isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.header)) {\n /* tslint:disable-next-line:no-any */\n var header = pdfExportProperties.header;\n var position = new PointF(0, header.fromTop);\n var size = new SizeF((clientSize.width - 80), (header.height * 0.75));\n var bounds = new RectangleF(position, size);\n if (!this.headerOnPages.length) {\n this.pdfDocument.template.top = this.drawPageTemplate(new PdfPageTemplateElement(bounds), header);\n }\n else {\n var headerTemplate_1 = this.drawPageTemplate(new PdfPageTemplateElement(bounds), header);\n this.headerOnPages.filter(function (index) {\n if (index - 1 >= 0 && index - 1 < _this.pdfDocument.pages.count - 1) {\n _this.pdfDocument.pages.getPageByIndex(index - 1).graphics\n .drawPdfTemplate(headerTemplate_1.template, new PointF(0, 0));\n }\n });\n }\n }\n };\n PdfExport.prototype.drawPageTemplate = function (template, element) {\n for (var _i = 0, _a = element.contents; _i < _a.length; _i++) {\n var content = _a[_i];\n this.processContentValidation(content);\n switch (content.type) {\n case 'Text':\n /* tslint:disable-next-line:max-line-length */\n if (content.value === '' || content.value === undefined || content.value === null || typeof content.value !== 'string') {\n throw new Error('please enter the valid input value in text content...');\n }\n this.drawText(template, content);\n break;\n case 'PageNumber':\n this.drawPageNumber(template, content);\n break;\n case 'Image':\n if (content.src === undefined || content.src === null || content.src === '') {\n throw new Error('please enter the valid base64 string in image content...');\n }\n this.drawImage(template, content);\n break;\n case 'Line':\n this.drawLine(template, content);\n break;\n default:\n throw new Error('Please set valid content type...');\n }\n }\n return template;\n };\n PdfExport.prototype.processContentValidation = function (content) {\n if (content.type === undefined || content.type === null) {\n throw new Error('please set valid content type...');\n }\n else {\n if (content.type === 'Line') {\n if (content.points === undefined || content.points === null) {\n throw new Error('please enter valid points in ' + content.type + ' content...');\n }\n else {\n if (content.points.x1 === undefined || content.points.x1 === null || typeof content.points.x1 !== 'number') {\n throw new Error('please enter valid x1 co-ordinate in ' + content.type + ' points...');\n }\n if (content.points.y1 === undefined || content.points.y1 === null || typeof content.points.y1 !== 'number') {\n throw new Error('please enter valid y1 co-ordinate in ' + content.type + ' points...');\n }\n if (content.points.x2 === undefined || content.points.x2 === null || typeof content.points.x2 !== 'number') {\n throw new Error('please enter valid x2 co-ordinate in ' + content.type + ' points...');\n }\n if (content.points.y2 === undefined || content.points.y2 === null || typeof content.points.y2 !== 'number') {\n throw new Error('please enter valid y2 co-ordinate in ' + content.type + ' points...');\n }\n }\n }\n else {\n if (content.position === undefined || content.position === null) {\n throw new Error('please enter valid position in ' + content.type + ' content...');\n }\n else {\n if (content.position.x === undefined || content.position.x === null || typeof content.position.x !== 'number') {\n throw new Error('please enter valid x co-ordinate in ' + content.type + ' position...');\n }\n if (content.position.y === undefined || content.position.y === null || typeof content.position.y !== 'number') {\n throw new Error('please enter valid y co-ordinate in ' + content.type + ' position...');\n }\n }\n }\n }\n };\n /* tslint:disable-next-line:no-any */\n PdfExport.prototype.drawText = function (pageTemplate, content) {\n var font = this.getFont(content);\n var brush = this.getBrushFromContent(content);\n var pen = null;\n if (!isNullOrUndefined(content.style.textPenColor)) {\n var penColor = this.hexToRgb(content.style.textPenColor);\n pen = new PdfPen(new PdfColor(penColor.r, penColor.g, penColor.b));\n }\n if (brush == null && pen == null) {\n brush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n }\n var value = content.value.toString();\n var x = content.position.x * 0.75;\n var y = content.position.y * 0.75;\n var format = new PdfStringFormat();\n var result = this.setContentFormat(content, format);\n if (result !== null && !isNullOrUndefined(result.format) && !isNullOrUndefined(result.size)) {\n pageTemplate.graphics.drawString(value, font, pen, brush, x, y, result.size.width, result.size.height, result.format);\n }\n else {\n pageTemplate.graphics.drawString(value, font, pen, brush, x, y, format);\n }\n };\n /* tslint:disable-next-line:no-any */\n PdfExport.prototype.drawPageNumber = function (documentHeader, content) {\n var font = this.getFont(content);\n var brush = null;\n if (!isNullOrUndefined(content.style.textBrushColor)) {\n /* tslint:disable-next-line:max-line-length */\n var brushColor = this.hexToRgb(content.style.textBrushColor);\n brush = new PdfSolidBrush(new PdfColor(brushColor.r, brushColor.g, brushColor.b));\n }\n else {\n brush = new PdfSolidBrush(new PdfColor(0, 0, 0));\n }\n var pageNumber = new PdfPageNumberField(font, brush);\n pageNumber.numberStyle = this.getPageNumberStyle(content.pageNumberType);\n var compositeField;\n var format;\n if (!isNullOrUndefined(content.format)) {\n if (content.format.indexOf('$total') !== -1 && content.format.indexOf('$current') !== -1) {\n var pageCount = new PdfPageCountField(font);\n pageCount.numberStyle = this.getPageNumberStyle(content.pageNumberType);\n if (content.format.indexOf('$total') > content.format.indexOf('$current')) {\n format = content.format.replace('$current', '0');\n format = format.replace('$total', '1');\n }\n else {\n format = content.format.replace('$current', '1');\n format = format.replace('$total', '0');\n }\n compositeField = new PdfCompositeField(font, brush, format, pageNumber, pageCount);\n }\n else if (content.format.indexOf('$current') !== -1 && content.format.indexOf('$total') === -1) {\n format = content.format.replace('$current', '0');\n compositeField = new PdfCompositeField(font, brush, format, pageNumber);\n }\n else {\n var pageCount = new PdfPageCountField(font);\n format = content.format.replace('$total', '0');\n compositeField = new PdfCompositeField(font, brush, format, pageCount);\n }\n }\n else {\n format = '{0}';\n compositeField = new PdfCompositeField(font, brush, format, pageNumber);\n }\n var x = content.position.x * 0.75;\n var y = content.position.y * 0.75;\n var result = this.setContentFormat(content, compositeField.stringFormat);\n if (result !== null && !isNullOrUndefined(result.format) && !isNullOrUndefined(result.size)) {\n compositeField.stringFormat = result.format;\n compositeField.bounds = new RectangleF(x, y, result.size.width, result.size.height);\n }\n compositeField.draw(documentHeader.graphics, x, y);\n };\n /* tslint:disable-next-line:no-any */\n PdfExport.prototype.drawImage = function (documentHeader, content) {\n var x = content.position.x * 0.75;\n var y = content.position.y * 0.75;\n var width = (!isNullOrUndefined(content.size)) ? (content.size.width * 0.75) : undefined;\n var height = (!isNullOrUndefined(content.size)) ? (content.size.height * 0.75) : undefined;\n var image = new PdfBitmap(content.src);\n if (!isNullOrUndefined(width)) {\n documentHeader.graphics.drawImage(image, x, y, width, height);\n }\n else {\n documentHeader.graphics.drawImage(image, x, y);\n }\n };\n /* tslint:disable-next-line:no-any */\n PdfExport.prototype.drawLine = function (documentHeader, content) {\n var x1 = content.points.x1 * 0.75;\n var y1 = content.points.y1 * 0.75;\n var x2 = content.points.x2 * 0.75;\n var y2 = content.points.y2 * 0.75;\n var pen = this.getPenFromContent(content);\n if (!isNullOrUndefined(content.style) && content.style !== null) {\n if (!isNullOrUndefined(content.style.penSize) && content.style.penSize !== null && typeof content.style.penSize === 'number') {\n pen.width = content.style.penSize * 0.75;\n }\n pen.dashStyle = this.getDashStyle(content.style.dashStyle);\n }\n documentHeader.graphics.drawLine(pen, x1, y1, x2, y2);\n };\n /* tslint:disable-next-line:no-any */ /* tslint:disable-next-line:max-line-length */ /* tslint:disable-next-line:max-func-body-length */\n PdfExport.prototype.processAggregates = function (sRows, pdfGrid, border, font, brush, backgroundBrush, isCaption, captionRow, groupIndex, isGroupedFooter) {\n for (var _i = 0, sRows_1 = sRows; _i < sRows_1.length; _i++) {\n var row = sRows_1[_i];\n var startIndex = 0;\n var leastCaptionSummaryIndex = -1;\n var index = 0;\n var isEmpty = true;\n /* tslint:disable-next-line:no-any */\n var value = [];\n for (var i = 0; i < pdfGrid.columns.count; i++) {\n var cell = row.cells[index];\n if (cell.cellType === CellType.DetailFooterIntent) {\n i--;\n index++;\n continue;\n }\n if (!this.hideColumnInclude) {\n while (cell.visible === undefined) {\n if (cell.cellType === CellType.DetailFooterIntent) {\n continue;\n }\n if (!isNullOrUndefined(captionRow)) {\n if (!isNullOrUndefined(captionRow.cells.getCell(i).value)) {\n /* tslint:disable-next-line:max-line-length */\n var args = { row: row, type: 'GroupCaption', style: captionRow.cells };\n this.parent.trigger(events.pdfAggregateQueryCellInfo, args);\n value.push('');\n value.push(captionRow.cells.getCell(i).value);\n isEmpty = false;\n if (!isCaption) {\n i += 1;\n }\n }\n else {\n value.push('');\n }\n }\n else {\n value.push('');\n }\n i += 1;\n index = index + 1;\n cell = row.cells[index];\n }\n while (!isNullOrUndefined(cell.visible) && !cell.visible) {\n index = index + 1;\n cell = row.cells[index];\n }\n }\n if (cell.isDataCell) {\n var templateFn = {};\n /* tslint:disable-next-line:max-line-length */\n if (!isNullOrUndefined(cell.column.footerTemplate) || !isNullOrUndefined(cell.column.groupCaptionTemplate) || !isNullOrUndefined(cell.column.groupFooterTemplate)) {\n /* tslint:disable-next-line:no-any */\n var result = this.getTemplateFunction(templateFn, i, leastCaptionSummaryIndex, cell);\n templateFn = result.templateFunction;\n leastCaptionSummaryIndex = result.leastCaptionSummaryIndex;\n var txt = void 0;\n var data = row.data[cell.column.field ? cell.column.field : cell.column.columnName];\n if (this.parent.isReact || this.parent.isVue) {\n txt = (templateFn[getEnumValue(CellType, cell.cellType)](data, this.parent));\n if (this.parent.isReact) {\n this.parent.renderTemplates();\n }\n }\n else {\n txt = (templateFn[getEnumValue(CellType, cell.cellType)](data));\n }\n value.push(txt[0].textContent);\n isEmpty = false;\n }\n else {\n /* tslint:disable-next-line:no-any */\n var result = this.getSummaryWithoutTemplate(row.data[cell.column.field]);\n if (!isNullOrUndefined(result)) {\n value.push(result);\n }\n }\n }\n else {\n value.push('');\n }\n if (isEmpty && value[i] !== '' && !isNullOrUndefined(value[i]) && value[i] !== null) {\n isEmpty = false;\n }\n index += 1;\n }\n if (isCaption) {\n for (var i = (this.parent.groupSettings.columns.length) + 1; i < value.length - 1; i++) {\n value[i] = value[i + 1];\n }\n }\n if (!isEmpty) {\n if (!isCaption) {\n var gridRow = pdfGrid.rows.addRow();\n gridRow.style.setBorder(border);\n gridRow.style.setFont(font);\n gridRow.style.setTextBrush(brush);\n gridRow.style.setBackgroundBrush(backgroundBrush);\n /* tslint:disable-next-line:max-line-length */\n var args = { row: row, type: isGroupedFooter ? 'GroupFooter' : 'Footer', style: gridRow.cells };\n this.parent.trigger(events.pdfAggregateQueryCellInfo, args);\n for (var i = 0; i < pdfGrid.columns.count; i++) {\n gridRow.cells.getCell(i).value = value[i].toString();\n }\n }\n else {\n for (var i = 0; i < pdfGrid.columns.count; i++) {\n captionRow.cells.getCell(i).value = value[i].toString();\n if (i === (groupIndex + 1) && leastCaptionSummaryIndex !== -1 && leastCaptionSummaryIndex !== 1) {\n captionRow.cells.getCell(i).columnSpan = leastCaptionSummaryIndex - (groupIndex + 1);\n }\n else if (i === (groupIndex + 1) && leastCaptionSummaryIndex === -1) {\n captionRow.cells.getCell(i).columnSpan = pdfGrid.columns.count - (groupIndex + 1);\n }\n }\n }\n }\n }\n };\n /* tslint:disable-next-line:no-any */\n PdfExport.prototype.getTemplateFunction = function (templateFn, index, leastCaptionSummaryIndex, cell) {\n if (!isNullOrUndefined(cell.column.footerTemplate) && cell.cellType === CellType.Summary) {\n templateFn[getEnumValue(CellType, CellType.Summary)] = compile(cell.column.footerTemplate);\n }\n else if (!isNullOrUndefined(cell.column.groupCaptionTemplate)) {\n if (leastCaptionSummaryIndex === -1) {\n leastCaptionSummaryIndex = index;\n }\n templateFn[getEnumValue(CellType, CellType.CaptionSummary)] = compile(cell.column.groupCaptionTemplate);\n }\n else {\n templateFn[getEnumValue(CellType, CellType.GroupSummary)] = compile(cell.column.groupFooterTemplate);\n }\n return { templateFunction: templateFn, leastCaptionSummaryIndex: leastCaptionSummaryIndex };\n };\n /* tslint:disable-next-line:no-any */\n PdfExport.prototype.getSummaryWithoutTemplate = function (data) {\n if (!isNullOrUndefined(data.Sum)) {\n return data.Sum;\n }\n else if (!isNullOrUndefined(data.Average)) {\n return data.Average;\n }\n else if (!isNullOrUndefined(data.Max)) {\n return data.Max;\n }\n else if (!isNullOrUndefined(data.Min)) {\n return data.Min;\n }\n else if (!isNullOrUndefined(data.Count)) {\n return data.Count;\n }\n else if (!isNullOrUndefined(data.TrueCount)) {\n return data.TrueCount;\n }\n else if (!isNullOrUndefined(data.FalseCount)) {\n return data.FalseCount;\n }\n else if (!isNullOrUndefined(data.Custom)) {\n return data.Custom;\n }\n };\n /**\n * Set alignment, width and type of the values of the column\n */\n PdfExport.prototype.setColumnProperties = function (gridColumns, pdfGrid, helper, gObj, allowHorizontalOverflow) {\n var startIndex = gObj.groupSettings.columns.length;\n for (var i = 0; i < startIndex; i++) {\n pdfGrid.columns.getColumn(i).width = 20;\n }\n for (var i = 0; i < gridColumns.length; i++) {\n if (!isNullOrUndefined(gridColumns[i].textAlign)) {\n pdfGrid.columns.getColumn(i + startIndex).format = this.getHorizontalAlignment(gridColumns[i].textAlign);\n }\n // Need to add width consideration with % value\n if (pdfGrid.style.allowHorizontalOverflow && !isNullOrUndefined(gridColumns[i].width) && allowHorizontalOverflow) {\n pdfGrid.columns.getColumn(i + startIndex).width = typeof gridColumns[i].width === 'number' ?\n gridColumns[i].width * 0.75 : helper.getConvertedWidth(gridColumns[i].width) * 0.75;\n }\n }\n };\n /**\n * set default style properties of each rows in exporting grid\n * @private\n */\n PdfExport.prototype.setRecordThemeStyle = function (row, border) {\n if (!isNullOrUndefined(this.gridTheme) && !isNullOrUndefined(this.gridTheme.record)) {\n var fontFamily = !isNullOrUndefined(this.gridTheme.record.fontName) ?\n this.getFontFamily(this.gridTheme.record.fontName) : PdfFontFamily.Helvetica;\n var fontSize = !isNullOrUndefined(this.gridTheme.record.fontSize) ? this.gridTheme.record.fontSize : 9.75;\n var fontStyle = this.getFontStyle(this.gridTheme.record);\n var font = new PdfStandardFont(fontFamily, fontSize, fontStyle);\n if (!isNullOrUndefined(this.gridTheme.record.font)) {\n font = this.gridTheme.record.font;\n }\n row.style.setFont(font);\n var pdfColor = new PdfColor();\n if (!isNullOrUndefined(this.gridTheme.record.fontColor)) {\n var penBrushColor = this.hexToRgb(this.gridTheme.record.fontColor);\n pdfColor = new PdfColor(penBrushColor.r, penBrushColor.g, penBrushColor.b);\n }\n row.style.setTextBrush(new PdfSolidBrush(pdfColor));\n }\n else {\n row.style.setTextBrush(new PdfSolidBrush(new PdfColor(0, 0, 0)));\n }\n var borderRecord = this.gridTheme && this.gridTheme.record &&\n this.gridTheme.record.border ? this.getBorderStyle(this.gridTheme.record.border) : border;\n row.style.setBorder(borderRecord);\n return row;\n };\n /**\n * generate the formatted cell values\n * @private\n */\n PdfExport.prototype.processRecord = function (border, columns, gObj, dataSource, pdfGrid, startIndex, pdfExportProperties, helper, rowIndex) {\n var rows = helper.getGridRowModel(columns, dataSource, gObj, rowIndex);\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n rowIndex++;\n // create a new row and set default style properties\n var gridRow = this.setRecordThemeStyle(pdfGrid.rows.addRow(), border);\n var cellLength = row.cells.length;\n for (var j = 0; j < cellLength; j++) {\n var gridCell = row.cells[j];\n if (gridCell.cellType !== CellType.Data) {\n continue;\n }\n var column = gridCell.column;\n var field = column.field;\n var cellValue = !isNullOrUndefined(field) ? column.valueAccessor(field, row.data, column) : '';\n var value = !isNullOrUndefined(cellValue) ? cellValue : '';\n var foreignKeyData = void 0;\n if (column.isForeignColumn && column.isForeignColumn()) {\n foreignKeyData = helper.getFData(value, column);\n value = getValue(column.foreignKeyValue, foreignKeyData);\n }\n var data = row.data;\n var cell = gridRow.cells.getCell(j);\n var args = {\n data: data,\n value: value,\n column: column,\n style: undefined,\n colSpan: 1,\n cell: cell\n };\n args.value = this.exportValueFormatter.formatCellValue(args, gObj.isServerRendered);\n this.parent.trigger(events.pdfQueryCellInfo, args);\n if (!isNullOrUndefined(args.image)) {\n args.value = new PdfBitmap(args.image.base64);\n }\n cell.value = args.value;\n if (!isNullOrUndefined(args.hyperLink)) {\n // create the Text Web Link\n var textLink = new PdfTextWebLink();\n // set the hyperlink\n textLink.url = args.hyperLink.target;\n // set the link text\n textLink.text = args.hyperLink.displayText || args.hyperLink.target;\n // set the font\n textLink.font = new PdfStandardFont(PdfFontFamily.Helvetica, 9.75);\n // set the brush and pen for the text color\n textLink.brush = new PdfSolidBrush(new PdfColor(51, 102, 187));\n cell.value = textLink;\n }\n if (!isNullOrUndefined(args.style)) {\n this.processCellStyle(cell, args);\n }\n if (args.colSpan > 1) {\n if ((j + 1 + args.colSpan) > gridRow.cells.count) {\n args.colSpan = gridRow.cells.count - (j + 1);\n }\n cell.columnSpan = args.colSpan;\n for (var i = 1; i < cell.columnSpan; i++) {\n var spanCell = gridRow.cells.getCell(j + i);\n spanCell.value = '';\n }\n j += (args.colSpan - 1);\n }\n }\n if (row.isExpand) {\n var gridRow_1 = this.setRecordThemeStyle(pdfGrid.rows.addRow(), border);\n var cell = gridRow_1.cells.getCell(startIndex);\n cell.columnSpan = gridRow_1.cells.count - (startIndex);\n cell.style.cellPadding = new PdfPaddings(10, 10, 10, 10);\n gObj.isPrinting = true;\n var exportType = (!isNullOrUndefined(pdfExportProperties) && pdfExportProperties.exportType) ?\n pdfExportProperties.exportType : 'AllPages';\n var returnValue = this.helper.createChildGrid(gObj, row, exportType, this.gridPool);\n var childGridObj = returnValue.childGrid;\n var element = returnValue.element;\n childGridObj.actionFailure =\n helper.failureHandler(this.gridPool, childGridObj, this.globalResolve);\n var args = { childGrid: childGridObj, row: row, cell: cell, exportProperties: pdfExportProperties };\n this.parent.trigger(events.exportDetailDataBound, args);\n childGridObj.beforeDataBound = this.childGridCell(cell, childGridObj, pdfExportProperties);\n childGridObj.appendTo(element);\n }\n this.parent.notify(events.exportRowDataBound, { type: 'pdf', rowObj: row });\n }\n return rowIndex;\n };\n PdfExport.prototype.childGridCell = function (cell, childGridObj, pdfExportProperties) {\n var _this = this;\n return function (result) {\n childGridObj.beforeDataBound = null;\n result.cancel = true;\n cell.value = _this.processGridExport(childGridObj, result, pdfExportProperties);\n childGridObj.destroy();\n detach(childGridObj.element);\n _this.gridPool[childGridObj.id] = true;\n _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);\n return cell;\n };\n };\n PdfExport.prototype.processCellStyle = function (cell, args) {\n if (!isNullOrUndefined(args.style.backgroundColor)) {\n var backColor = this.hexToRgb(args.style.backgroundColor);\n cell.style.backgroundBrush = new PdfSolidBrush(new PdfColor(backColor.r, backColor.g, backColor.b));\n }\n if (!isNullOrUndefined(args.style.textAlignment)) {\n cell.style.stringFormat = this.getHorizontalAlignment(args.style.textAlignment);\n }\n if (!isNullOrUndefined(args.style.cellPadding)) {\n cell.style.cellPadding = args.style.cellPadding;\n }\n if (!isNullOrUndefined(args.style.verticalAlignment)) {\n cell.style.stringFormat = this.getVerticalAlignment(args.style.verticalAlignment, cell.style.stringFormat);\n }\n if (!isNullOrUndefined(args.style.textBrushColor)) {\n var textBrushColor = this.hexToRgb(args.style.textBrushColor);\n cell.style.textBrush = new PdfSolidBrush(new PdfColor(textBrushColor.r, textBrushColor.g, textBrushColor.b));\n }\n if (!isNullOrUndefined(args.style.textPenColor)) {\n var textPenColor = this.hexToRgb(args.style.textPenColor);\n cell.style.textPen = new PdfPen(new PdfColor(textPenColor.r, textPenColor.g, textPenColor.b));\n }\n if (!isNullOrUndefined(args.style.fontFamily) || !isNullOrUndefined(args.style.fontSize) || !isNullOrUndefined(args.style.bold) ||\n !isNullOrUndefined(args.style.italic) || !isNullOrUndefined(args.style.underline) || !isNullOrUndefined(args.style.strikeout)) {\n cell.style.font = this.getFont(args);\n }\n if (!isNullOrUndefined(args.style.border)) {\n var border = new PdfBorders();\n var borderWidth = args.style.border.width;\n // set border width\n var width = (!isNullOrUndefined(borderWidth) && typeof borderWidth === 'number') ? (borderWidth * 0.75) : (undefined);\n // set border color\n var color = new PdfColor(196, 196, 196);\n if (!isNullOrUndefined(args.style.border.color)) {\n var borderColor = this.hexToRgb(args.style.border.color);\n color = new PdfColor(borderColor.r, borderColor.g, borderColor.b);\n }\n var pen = new PdfPen(color, width);\n // set border dashStyle 'Solid , Dash, Dot, DashDot, DashDotDot'\n if (!isNullOrUndefined(args.style.border.dashStyle)) {\n pen.dashStyle = this.getDashStyle(args.style.border.dashStyle);\n }\n border.all = pen;\n cell.style.borders = border;\n }\n if (!isNullOrUndefined(args.style.paragraphIndent)) {\n cell.style.stringFormat = new PdfStringFormat();\n cell.style.stringFormat.paragraphIndent = args.style.paragraphIndent;\n }\n };\n /**\n * set text alignment of each columns in exporting grid\n * @private\n */\n PdfExport.prototype.getHorizontalAlignment = function (textAlign, format) {\n if (format === undefined) {\n format = new PdfStringFormat();\n }\n switch (textAlign) {\n case 'Right':\n format.alignment = PdfTextAlignment.Right;\n break;\n case 'Center':\n format.alignment = PdfTextAlignment.Center;\n break;\n case 'Justify':\n format.alignment = PdfTextAlignment.Justify;\n break;\n case 'Left':\n format.alignment = PdfTextAlignment.Left;\n break;\n }\n return format;\n };\n /**\n * set vertical alignment of each columns in exporting grid\n * @private\n */\n PdfExport.prototype.getVerticalAlignment = function (verticalAlign, format, textAlign) {\n if (format === undefined) {\n format = new PdfStringFormat();\n format = this.getHorizontalAlignment(textAlign, format);\n }\n switch (verticalAlign) {\n case 'Bottom':\n format.lineAlignment = PdfVerticalAlignment.Bottom;\n break;\n case 'Middle':\n format.lineAlignment = PdfVerticalAlignment.Middle;\n break;\n case 'Top':\n format.lineAlignment = PdfVerticalAlignment.Top;\n break;\n }\n return format;\n };\n PdfExport.prototype.getFontFamily = function (fontFamily) {\n switch (fontFamily) {\n case 'TimesRoman':\n return 2;\n case 'Courier':\n return 1;\n case 'Symbol':\n return 3;\n case 'ZapfDingbats':\n return 4;\n default:\n return 0;\n }\n };\n /* tslint:disable-next-line:no-any */\n PdfExport.prototype.getFont = function (content) {\n if (content.font) {\n return content.font;\n }\n var fontSize = (!isNullOrUndefined(content.style.fontSize)) ? (content.style.fontSize * 0.75) : 9.75;\n var fontFamily = (!isNullOrUndefined(content.style.fontFamily)) ?\n (this.getFontFamily(content.style.fontFamily)) : PdfFontFamily.TimesRoman;\n var fontStyle = PdfFontStyle.Regular;\n if (!isNullOrUndefined(content.style.bold) && content.style.bold) {\n fontStyle |= PdfFontStyle.Bold;\n }\n if (!isNullOrUndefined(content.style.italic) && content.style.italic) {\n fontStyle |= PdfFontStyle.Italic;\n }\n if (!isNullOrUndefined(content.style.underline) && content.style.underline) {\n fontStyle |= PdfFontStyle.Underline;\n }\n if (!isNullOrUndefined(content.style.strikeout) && content.style.strikeout) {\n fontStyle |= PdfFontStyle.Strikeout;\n }\n return new PdfStandardFont(fontFamily, fontSize, fontStyle);\n };\n PdfExport.prototype.getPageNumberStyle = function (pageNumberType) {\n switch (pageNumberType) {\n case 'LowerLatin':\n return 2;\n case 'LowerRoman':\n return 3;\n case 'UpperLatin':\n return 4;\n case 'UpperRoman':\n return 5;\n default:\n return 1;\n }\n };\n PdfExport.prototype.setContentFormat = function (content, format) {\n if (!isNullOrUndefined(content.size)) {\n var width = content.size.width * 0.75;\n var height = content.size.height * 0.75;\n format = new PdfStringFormat(PdfTextAlignment.Left, PdfVerticalAlignment.Middle);\n if (!isNullOrUndefined(content.style.hAlign)) {\n switch (content.style.hAlign) {\n case 'Right':\n format.alignment = PdfTextAlignment.Right;\n break;\n case 'Center':\n format.alignment = PdfTextAlignment.Center;\n break;\n case 'Justify':\n format.alignment = PdfTextAlignment.Justify;\n break;\n default:\n format.alignment = PdfTextAlignment.Left;\n }\n }\n if (!isNullOrUndefined(content.style.vAlign)) {\n format = this.getVerticalAlignment(content.style.vAlign, format);\n }\n return { format: format, size: new SizeF(width, height) };\n }\n return null;\n };\n PdfExport.prototype.getPageSize = function (pageSize) {\n switch (pageSize) {\n case 'Letter':\n return new SizeF(612, 792);\n case 'Note':\n return new SizeF(540, 720);\n case 'Legal':\n return new SizeF(612, 1008);\n case 'A0':\n return new SizeF(2380, 3368);\n case 'A1':\n return new SizeF(1684, 2380);\n case 'A2':\n return new SizeF(1190, 1684);\n case 'A3':\n return new SizeF(842, 1190);\n case 'A5':\n return new SizeF(421, 595);\n case 'A6':\n return new SizeF(297, 421);\n case 'A7':\n return new SizeF(210, 297);\n case 'A8':\n return new SizeF(148, 210);\n case 'A9':\n return new SizeF(105, 148);\n // case 'A10':\n // return new SizeF(74, 105);\n case 'B0':\n return new SizeF(2836, 4008);\n case 'B1':\n return new SizeF(2004, 2836);\n case 'B2':\n return new SizeF(1418, 2004);\n case 'B3':\n return new SizeF(1002, 1418);\n case 'B4':\n return new SizeF(709, 1002);\n case 'B5':\n return new SizeF(501, 709);\n case 'Archa':\n return new SizeF(648, 864);\n case 'Archb':\n return new SizeF(864, 1296);\n case 'Archc':\n return new SizeF(1296, 1728);\n case 'Archd':\n return new SizeF(1728, 2592);\n case 'Arche':\n return new SizeF(2592, 3456);\n case 'Flsa':\n return new SizeF(612, 936);\n case 'HalfLetter':\n return new SizeF(396, 612);\n case 'Letter11x17':\n return new SizeF(792, 1224);\n case 'Ledger':\n return new SizeF(1224, 792);\n default:\n return new SizeF(595, 842);\n }\n };\n PdfExport.prototype.getDashStyle = function (dashStyle) {\n switch (dashStyle) {\n case 'Dash':\n return 1;\n case 'Dot':\n return 2;\n case 'DashDot':\n return 3;\n case 'DashDotDot':\n return 4;\n default:\n return 0;\n }\n };\n PdfExport.prototype.getPenFromContent = function (content) {\n var pen = new PdfPen(new PdfColor(0, 0, 0));\n if (!isNullOrUndefined(content.style) && content.style !== null && !isNullOrUndefined(content.style.penColor)) {\n var penColor = this.hexToRgb(content.style.penColor);\n pen = new PdfPen(new PdfColor(penColor.r, penColor.g, penColor.b));\n }\n return pen;\n };\n PdfExport.prototype.getBrushFromContent = function (content) {\n var brush = null;\n if (!isNullOrUndefined(content.style.textBrushColor)) {\n /* tslint:disable-next-line:max-line-length */\n var brushColor = this.hexToRgb(content.style.textBrushColor);\n brush = new PdfSolidBrush(new PdfColor(brushColor.r, brushColor.g, brushColor.b));\n }\n return brush;\n };\n PdfExport.prototype.hexToRgb = function (hex) {\n if (hex === null || hex === '' || hex.length !== 7) {\n throw new Error('please set valid hex value for color...');\n }\n hex = hex.substring(1);\n var bigint = parseInt(hex, 16);\n var r = (bigint >> 16) & 255;\n var g = (bigint >> 8) & 255;\n var b = bigint & 255;\n return { r: r, g: g, b: b };\n };\n PdfExport.prototype.getFontStyle = function (theme) {\n var fontStyle = PdfFontStyle.Regular;\n if (!isNullOrUndefined(theme) && theme.bold) {\n fontStyle |= PdfFontStyle.Bold;\n }\n if (!isNullOrUndefined(theme) && theme.italic) {\n fontStyle |= PdfFontStyle.Italic;\n }\n if (!isNullOrUndefined(theme) && theme.underline) {\n fontStyle |= PdfFontStyle.Underline;\n }\n if (!isNullOrUndefined(theme) && theme.strikeout) {\n fontStyle |= PdfFontStyle.Strikeout;\n }\n return fontStyle;\n };\n PdfExport.prototype.getBorderStyle = function (border) {\n var borders = new PdfBorders();\n if (!isNullOrUndefined(border)) {\n var borderWidth = border.width;\n // set border width\n var width = (!isNullOrUndefined(borderWidth) && typeof borderWidth === 'number') ? borderWidth * 0.75 : undefined;\n // set border color\n var color = new PdfColor(196, 196, 196);\n if (!isNullOrUndefined(border.color)) {\n var borderColor = this.hexToRgb(border.color);\n color = new PdfColor(borderColor.r, borderColor.g, borderColor.b);\n }\n var pen = new PdfPen(color, width);\n // set border dashStyle 'Solid , Dash, Dot, DashDot, DashDotDot'\n if (!isNullOrUndefined(border.dashStyle)) {\n pen.dashStyle = this.getDashStyle(border.dashStyle);\n }\n borders.all = pen;\n }\n else {\n borders.all = new PdfPen(new PdfColor(234, 234, 234));\n }\n return borders;\n };\n /**\n * To destroy the pdf export\n * @return {void}\n * @hidden\n */\n PdfExport.prototype.destroy = function () {\n //destroy for exporting\n };\n return PdfExport;\n}());\nexport { PdfExport };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EventHandler, getValue, closest, isNullOrUndefined, isBlazor } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, extend, Browser } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport * as event from '../base/constant';\nimport { Row } from '../models/row';\nimport { RowModelGenerator } from './row-model-generator';\nimport { parentsUntil } from '../base/util';\n/**\n * FocusStrategy class\n * @hidden\n */\nvar FocusStrategy = /** @class */ (function () {\n function FocusStrategy(parent) {\n this.currentInfo = {};\n this.oneTime = true;\n this.swap = {};\n this.forget = false;\n this.skipFocus = true;\n this.focusByClick = false;\n this.prevIndexes = {};\n this.refMatrix = this.refreshMatrix(true);\n this.actions = ['downArrow', 'upArrow'];\n this.isVirtualScroll = false;\n this.parent = parent;\n this.rowModelGen = new RowModelGenerator(this.parent);\n this.addEventListener();\n }\n FocusStrategy.prototype.focusCheck = function (e) {\n var target = e.target;\n this.focusByClick = true;\n this.skipFocus = target.classList.contains('e-grid');\n };\n FocusStrategy.prototype.onFocus = function () {\n if (this.parent.isDestroyed || Browser.isDevice || this.parent.enableVirtualization) {\n return;\n }\n this.setActive(!this.parent.enableHeaderFocus && this.parent.frozenRows === 0, this.parent.isFrozenGrid());\n var added = 'addedRecords';\n if (!this.parent.enableHeaderFocus && !this.parent.getCurrentViewRecords().length && ((this.parent.editSettings.mode !== 'Batch')\n || (this.parent.editSettings.mode === 'Batch' && !this.parent.editModule.getBatchChanges()[added].length))) {\n this.getContent().matrix.\n generate(this.rowModelGen.generateRows({ rows: [new Row({ isDataRow: true })] }), this.getContent().selector, false);\n }\n var current = this.getContent().matrix.get(0, -1, [0, 1], null, this.getContent().validator());\n this.getContent().matrix.select(current[0], current[1]);\n if (this.skipFocus) {\n this.focus();\n this.skipFocus = false;\n }\n };\n FocusStrategy.prototype.passiveFocus = function (e) {\n if (this.parent.isDestroyed) {\n return;\n }\n if (e.target && e.target.classList.contains('e-detailcell')) {\n this.currentInfo.skipAction = false;\n addClass([this.currentInfo.element], ['e-focused', 'e-focus']);\n }\n };\n FocusStrategy.prototype.onBlur = function (e) {\n if ((this.parent.isEdit || e && (!e.relatedTarget || closest(e.relatedTarget, '.e-grid')))) {\n return;\n }\n this.removeFocus();\n this.skipFocus = false;\n this.currentInfo.skipAction = false;\n if (this.getContent().getFocusInfo().elementToFocus) {\n this.getContent().getFocusInfo().elementToFocus.tabIndex = 0;\n }\n };\n FocusStrategy.prototype.onClick = function (e, force) {\n if (parentsUntil(e.target, 'e-filterbarcell') &&\n e.target.classList.contains('e-input-group-icon')) {\n return;\n }\n var isContent = !isNullOrUndefined(closest(e.target, '.e-gridcontent'));\n var isHeader = !isNullOrUndefined(closest(e.target, '.e-gridheader'));\n isContent = isContent && isHeader ? !isContent : isContent;\n var isFrozen = !isNullOrUndefined(closest(e.target, '.e-frozencontent')) ||\n !isNullOrUndefined(closest(e.target, '.e-frozenheader'));\n var isFrozenRight = false;\n if (this.parent.getFrozenMode() === 'Left-Right') {\n isFrozenRight = !isNullOrUndefined(closest(e.target, '.e-frozen-right-content')) ||\n !isNullOrUndefined(closest(e.target, '.e-frozen-right-header'));\n isFrozen = isFrozen && !isFrozenRight;\n }\n if (!isContent && isNullOrUndefined(closest(e.target, '.e-gridheader')) ||\n e.target.classList.contains('e-content') ||\n !isNullOrUndefined(closest(e.target, '.e-unboundcell'))) {\n return;\n }\n this.setActive(isContent, isFrozen, isFrozenRight);\n if (!isContent && isNullOrUndefined(closest(e.target, '.e-gridheader'))) {\n this.clearOutline();\n return;\n }\n var beforeArgs = { cancel: false, byKey: false, byClick: !isNullOrUndefined(e.target), clickArgs: e };\n this.parent.notify(event.beforeCellFocused, beforeArgs);\n if (beforeArgs.cancel || closest(e.target, '.e-inline-edit')) {\n return;\n }\n this.setActive(isContent, isFrozen, isFrozenRight);\n if (this.getContent()) {\n var returnVal = this.getContent().onClick(e, force);\n if (returnVal === false) {\n return;\n }\n this.focus();\n }\n };\n FocusStrategy.prototype.onKeyPress = function (e) {\n if (this.skipOn(e)) {\n return;\n }\n this.activeKey = e.action;\n var beforeArgs = { cancel: false, byKey: true, byClick: false, keyArgs: e };\n this.parent.notify(event.beforeCellFocused, beforeArgs);\n if (beforeArgs.cancel) {\n return;\n }\n var bValue = this.getContent().matrix.current;\n this.currentInfo.outline = true;\n var swapInfo = this.getContent().jump(e.action, bValue);\n this.swap = swapInfo;\n if (swapInfo.swap) {\n this.setActive(!swapInfo.toHeader, swapInfo.toFrozen, swapInfo.toFrozenRight);\n this.getContent().matrix.current = this.getContent().getNextCurrent(bValue, swapInfo, this.active, e.action);\n this.prevIndexes = {};\n }\n this.setActiveByKey(e.action, this.getContent());\n var returnVal = this.content.lastIdxCell ? false : this.getContent().onKeyPress(e);\n if (returnVal === false) {\n this.clearIndicator();\n return;\n }\n e.preventDefault();\n this.focus(e);\n };\n FocusStrategy.prototype.skipOn = function (e) {\n var target = e.target;\n if (!target) {\n return false;\n }\n if (this.currentInfo.skipAction) {\n this.clearIndicator();\n return true;\n }\n if (['pageUp', 'pageDown', 'altDownArrow'].indexOf(e.action) > -1) {\n this.clearIndicator();\n return true;\n }\n var th = closest(target, 'th') && !closest(target, 'th').tabIndex;\n if (e.target.classList.contains('e-filterbaroperator') && (e.keyCode === 13 || e.keyCode === 27)) {\n var inputTarget = closest(e.target, '.e-filterbarcell');\n inputTarget.querySelector('input').focus();\n }\n if (th && closest(document.activeElement, '.e-filterbarcell') !== null) {\n this.removeFocus();\n }\n var filterCell = closest(document.activeElement, '.e-filterbarcell') !== null;\n if (this.parent.enableHeaderFocus && filterCell) {\n var matrix = this.active.matrix;\n var current = matrix.current;\n filterCell = matrix.matrix[current[0]].lastIndexOf(1) !== current[1];\n }\n return (e.action === 'delete'\n || (this.parent.editSettings.mode !== 'Batch' && (this.parent.isEdit || ['insert', 'f2'].indexOf(e.action) > -1))\n || (filterCell ||\n closest(document.activeElement, '#' + this.parent.element.id + '_searchbar') !== null\n && ['enter', 'leftArrow', 'rightArrow',\n 'shiftLeft', 'shiftRight', 'ctrlPlusA'].indexOf(e.action) > -1)\n || (closest(target, '.e-gridcontent') === null && closest(target, '.e-gridheader') === null)\n || (e.action === 'space' && (!target.classList.contains('e-gridchkbox') && closest(target, '.e-gridchkbox') === null\n && closest(target, '.e-headerchkcelldiv') === null))) || closest(target, '.e-filter-popup') !== null;\n };\n FocusStrategy.prototype.focusVirtualElement = function (e) {\n var _this = this;\n if (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling) {\n var data = { virtualData: {}, isAdd: false, isCancel: false };\n this.parent.notify(event.getVirtualData, data);\n var isKeyFocus = this.actions.some(function (value) { return value === _this.activeKey; });\n var isSelected = this.parent.contentModule ?\n this.parent.contentModule.selectedRowIndex > -1 : false;\n if (data.isAdd || Object.keys(data.virtualData).length || isKeyFocus || data.isCancel || isSelected) {\n data.isCancel = false;\n this.parent.contentModule.selectedRowIndex = -1;\n if (isKeyFocus) {\n this.activeKey = this.empty;\n this.parent.notify('virtaul-key-handler', e);\n }\n // tslint:disable-next-line:no-any\n this.currentInfo.elementToFocus.focus({ preventScroll: true });\n }\n else {\n if (this.isVirtualScroll) {\n // tslint:disable-next-line:no-any\n this.currentInfo.elementToFocus.focus({ preventScroll: true });\n }\n else {\n this.currentInfo.elementToFocus.focus();\n }\n }\n }\n this.isVirtualScroll = false;\n };\n FocusStrategy.prototype.getFocusedElement = function () {\n return this.currentInfo.elementToFocus;\n };\n FocusStrategy.prototype.getContent = function () {\n return this.active || this.content;\n };\n FocusStrategy.prototype.setActive = function (content, isFrozen, isFrozenRight) {\n this.active = content ? isFrozen ? this.fContent : isFrozenRight ? this.frContent : this.content :\n isFrozen ? this.fHeader : isFrozenRight ? this.frHeader : this.header;\n };\n FocusStrategy.prototype.setFocusedElement = function (element, e) {\n var _this = this;\n this.currentInfo.elementToFocus = element;\n setTimeout(function () {\n if (!isNullOrUndefined(_this.currentInfo.elementToFocus)) {\n if (_this.parent.enableVirtualization || _this.parent.enableInfiniteScrolling) {\n _this.focusVirtualElement(e);\n }\n else {\n _this.currentInfo.elementToFocus.focus();\n }\n }\n }, 0);\n };\n FocusStrategy.prototype.focus = function (e) {\n this.parent.notify(event.virtaulCellFocus, e);\n this.removeFocus();\n this.addFocus(this.getContent().getFocusInfo(), e);\n };\n FocusStrategy.prototype.removeFocus = function (e) {\n if (!this.currentInfo.element) {\n return;\n }\n removeClass([this.currentInfo.element, this.currentInfo.elementToFocus], ['e-focused', 'e-focus']);\n this.currentInfo.element.tabIndex = -1;\n };\n /** @hidden */\n FocusStrategy.prototype.addOutline = function () {\n var info = this.getContent().getFocusInfo();\n if (info.element) {\n addClass([info.element], ['e-focused']);\n addClass([info.elementToFocus], ['e-focus']);\n }\n };\n /** @hidden */\n FocusStrategy.prototype.focusHeader = function () {\n this.setActive(false, this.parent.isFrozenGrid());\n this.resetFocus();\n };\n /** @hidden */\n FocusStrategy.prototype.focusContent = function () {\n this.setActive(true, this.parent.isFrozenGrid());\n this.resetFocus();\n };\n FocusStrategy.prototype.resetFocus = function () {\n var current = this.getContent().matrix.get(0, -1, [0, 1], null, this.getContent().validator());\n this.getContent().matrix.select(current[0], current[1]);\n this.focus();\n };\n FocusStrategy.prototype.addFocus = function (info, e) {\n this.currentInfo = info;\n this.currentInfo.outline = info.outline && !isNullOrUndefined(e);\n if (!info.element) {\n return;\n }\n var isFocused = info.elementToFocus.classList.contains('e-focus');\n if (isFocused) {\n return;\n }\n if (this.currentInfo.outline) {\n addClass([info.element], ['e-focused']);\n }\n addClass([info.elementToFocus], ['e-focus']);\n info.element.tabIndex = 0;\n if (!isFocused) {\n this.setFocusedElement(info.elementToFocus, e);\n }\n this.parent.notify(event.cellFocused, {\n element: info.elementToFocus,\n parent: info.element,\n indexes: this.getContent().matrix.current,\n byKey: !isNullOrUndefined(e),\n byClick: isNullOrUndefined(e),\n keyArgs: e,\n isJump: this.swap.swap,\n container: this.getContent().getInfo(e),\n outline: !isNullOrUndefined(e),\n swapInfo: this.swap\n });\n var _a = this.getContent().matrix.current, rowIndex = _a[0], cellIndex = _a[1];\n this.prevIndexes = { rowIndex: rowIndex, cellIndex: cellIndex };\n this.focusedColumnUid = this.parent.getColumnByIndex(cellIndex).uid;\n this.focusByClick = false;\n };\n FocusStrategy.prototype.refreshMatrix = function (content) {\n var _this = this;\n return function (e) {\n if (content && (e.args && e.args.isFrozen) && !_this.fContent) {\n _this.fContent = new FixedContentFocus(_this.parent);\n }\n else if (content && !_this.frContent && (e.args && e.args.renderFrozenRightContent)) {\n _this.frContent = new FixedRightContentFocus(_this.parent);\n }\n else if (content && !_this.content) {\n _this.content = new ContentFocus(_this.parent);\n }\n if (!content && (e.args && e.args.isFrozen) && !_this.fHeader) {\n _this.fHeader = new FixedHeaderFocus(_this.parent);\n }\n else if (!content && (e.args && e.args.renderFrozenRightContent) && !_this.frHeader) {\n _this.frHeader = new FixedRightHeaderFocus(_this.parent);\n }\n else if (!content && !_this.header) {\n _this.header = new HeaderFocus(_this.parent);\n }\n var cFocus = content ? (e.args && e.args.isFrozen) ? _this.fContent : (e.args && e.args.renderFrozenRightContent)\n ? _this.frContent : _this.content : (e.args && e.args.isFrozen) ? _this.fHeader : (e.args && e.args.renderFrozenRightContent)\n ? _this.frHeader : _this.header;\n var rows = content ? e.rows.slice(_this.parent.frozenRows) : e.rows;\n var updateRow = content ? e.rows.slice(0, _this.parent.frozenRows) : e.rows;\n if (_this.parent.isCollapseStateEnabled() && content) {\n rows = rows.filter(function (x) { return x.visible !== false; });\n }\n var isRowTemplate = !isNullOrUndefined(_this.parent.rowTemplate);\n var matrix = cFocus.matrix.generate(updateRow, cFocus.selector, isRowTemplate);\n if (e.name === 'batchAdd' && _this.parent.isFrozenGrid()) {\n var mRows = _this.parent.getMovableRowsObject();\n var newMovableRows = mRows.map(function (row) { return row.clone(); });\n var newFrozenRows = rows.map(function (row) { return row.clone(); });\n _this.fContent.matrix.generate(newFrozenRows, _this.fContent.selector, isRowTemplate);\n _this.content.matrix.generate(newMovableRows, _this.content.selector, isRowTemplate);\n if (_this.parent.getFrozenMode() === 'Left-Right') {\n var frRows = _this.parent.getFrozenRightRowsObject();\n var newfrRows = frRows.map(function (row) { return row.clone(); });\n _this.frContent.matrix.generate(newfrRows, _this.frContent.selector, isRowTemplate);\n }\n }\n else {\n cFocus.matrix.generate(rows, cFocus.selector, isRowTemplate);\n }\n cFocus.generateRows(updateRow, {\n matrix: matrix, handlerInstance: (e.args && e.args.isFrozen) ? _this.fHeader\n : (e.args && e.args.renderFrozenRightContent) ? _this.frHeader : _this.header\n });\n if (!Browser.isDevice && e && e.args) {\n if (!_this.focusByClick && e.args.requestType === 'paging') {\n _this.skipFocus = false;\n _this.parent.element.focus();\n }\n if (e.args.requestType === 'grouping') {\n _this.skipFocus = true;\n }\n }\n if (e && e.args && e.args.requestType === 'virtualscroll') {\n if (_this.currentInfo.uid) {\n var index_1;\n var bool = e.rows.some(function (row, i) {\n index_1 = i;\n return row.uid === _this.currentInfo.uid;\n });\n if (bool) {\n _this.content.matrix.current[0] = index_1;\n _this.content.matrix.current[1] = _this.parent.getColumnIndexByUid(_this.focusedColumnUid) || 0;\n var focusElement = _this.getContent().getFocusInfo().elementToFocus;\n if (focusElement) {\n var cellPosition = focusElement.getBoundingClientRect();\n var gridPosition = _this.parent.element.getBoundingClientRect();\n if (cellPosition.top >= 0 && cellPosition.left >= 0 &&\n cellPosition.right <= Math.min(gridPosition.right, window.innerWidth ||\n document.documentElement.clientWidth) &&\n cellPosition.bottom <= Math.min(gridPosition.bottom, window.innerHeight ||\n document.documentElement.clientHeight)) {\n _this.isVirtualScroll = true;\n _this.focus();\n }\n }\n }\n }\n else if (e.args.focusElement && e.args.focusElement.classList.contains('e-filtertext')) {\n var focusElement = _this.parent.element.querySelector('#' + e.args.focusElement.id);\n if (focusElement) {\n focusElement.focus();\n }\n }\n }\n };\n };\n FocusStrategy.prototype.addEventListener = function () {\n var _this = this;\n if (this.parent.isDestroyed) {\n return;\n }\n EventHandler.add(this.parent.element, 'mousedown', this.focusCheck, this);\n EventHandler.add(this.parent.element, 'focus', this.onFocus, this);\n this.parent.element.addEventListener('focus', this.passiveHandler = function (e) { return _this.passiveFocus(e); }, true);\n EventHandler.add(this.parent.element, 'focusout', this.onBlur, this);\n this.parent.on(event.keyPressed, this.onKeyPress, this);\n this.parent.on(event.click, this.onClick, this);\n this.parent.on(event.contentReady, this.refMatrix, this);\n this.parent.on(event.partialRefresh, this.refMatrix, this);\n this.parent.on(event.refreshExpandandCollapse, this.refMatrix, this);\n this.parent.on(event.headerRefreshed, this.refreshMatrix(), this);\n this.parent.on('close-edit', this.restoreFocus, this);\n this.parent.on('restore-Focus', this.restoreFocus, this);\n var evts = ['start-edit', 'start-add'];\n for (var i = 0; i < evts.length; i++) {\n this.parent.on(evts[i], this.clearIndicator, this);\n }\n this.parent.on('sorting-complete', this.restoreFocus, this);\n this.parent.on('filtering-complete', this.filterfocus, this);\n var actionsG = ['grouping', 'ungrouping'];\n for (var k = 0; k < actionsG.length; k++) {\n this.parent.on(actionsG[k] + \"-complete\", this.restoreFocusWithAction, this);\n }\n this.parent.on(event.batchAdd, this.refMatrix, this);\n this.parent.on(event.batchCancel, this.refMatrix, this);\n this.parent.on(event.batchDelete, this.refMatrix, this);\n this.parent.on(event.detailDataBound, this.refMatrix, this);\n this.parent.on(event.onEmpty, this.refMatrix, this);\n this.parent.on(event.cellFocused, this.internalCellFocus, this);\n };\n FocusStrategy.prototype.filterfocus = function () {\n if (this.parent.filterSettings.type !== 'FilterBar') {\n this.restoreFocus();\n }\n };\n FocusStrategy.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n EventHandler.remove(this.parent.element, 'mousedown', this.focusCheck);\n EventHandler.remove(this.parent.element, 'focus', this.onFocus);\n EventHandler.remove(this.parent.element, 'focusout', this.onBlur);\n this.parent.element.removeEventListener('focus', this.passiveHandler, true);\n this.parent.off(event.keyPressed, this.onKeyPress);\n this.parent.off(event.click, this.onClick);\n this.parent.off(event.contentReady, this.refMatrix);\n this.parent.off(event.partialRefresh, this.refMatrix);\n this.parent.off(event.refreshExpandandCollapse, this.refMatrix);\n this.parent.off(event.headerRefreshed, this.refreshMatrix());\n this.parent.off('close-edit', this.restoreFocus);\n this.parent.off('restore-focus', this.restoreFocus);\n var evts = ['start-edit', 'start-add'];\n for (var i = 0; i < evts.length; i++) {\n this.parent.off(evts[i], this.clearOutline);\n }\n this.parent.off('sorting-complete', this.restoreFocus);\n this.parent.off('filtering-complete', this.filterfocus);\n var actionsG = ['grouping', 'ungrouping'];\n for (var k = 0; k < actionsG.length; k++) {\n this.parent.on(actionsG[k] + \"-complete\", this.restoreFocusWithAction);\n }\n this.parent.off(event.batchAdd, this.refMatrix);\n this.parent.off(event.batchDelete, this.refMatrix);\n this.parent.off(event.batchCancel, this.refMatrix);\n this.parent.off(event.detailDataBound, this.refMatrix);\n this.parent.off(event.onEmpty, this.refMatrix);\n this.parent.off(event.cellFocused, this.internalCellFocus);\n };\n FocusStrategy.prototype.destroy = function () {\n this.removeEventListener();\n };\n FocusStrategy.prototype.restoreFocus = function () {\n this.addFocus(this.getContent().getFocusInfo());\n };\n FocusStrategy.prototype.restoreFocusWithAction = function (e) {\n if (!this.parent.enableInfiniteScrolling) {\n var matrix = this.getContent().matrix;\n var current = matrix.current;\n switch (e.requestType) {\n case 'grouping':\n case 'ungrouping':\n current[1] = current.length &&\n !this.parent.groupSettings.showGroupedColumn && !isNullOrUndefined(matrix.matrix[current[0]]) ?\n matrix.matrix[current[0]].indexOf(1) : e.requestType === 'grouping' ? current[1] + 1 : current[1] - 1;\n break;\n }\n this.getContent().matrix.current = current;\n this.addFocus(this.getContent().getFocusInfo());\n }\n };\n FocusStrategy.prototype.clearOutline = function () {\n this.getContent().matrix.current = this.getContent().matrix.get(0, -1, [0, 1], 'downArrow', this.getContent().validator());\n this.clearIndicator();\n };\n FocusStrategy.prototype.clearIndicator = function () {\n if (!this.currentInfo.element || !this.currentInfo.elementToFocus) {\n return;\n }\n removeClass([this.currentInfo.element, this.currentInfo.elementToFocus], ['e-focus', 'e-focused']);\n };\n FocusStrategy.prototype.getPrevIndexes = function () {\n var forget = this.forget;\n this.forget = false;\n return forget || !Object.keys(this.prevIndexes).length ? { rowIndex: null, cellIndex: null } : this.prevIndexes;\n };\n FocusStrategy.prototype.forgetPrevious = function () {\n this.forget = true;\n };\n FocusStrategy.prototype.setActiveByKey = function (action, active) {\n var _this = this;\n if (!this.parent.isFrozenGrid() && this.parent.frozenRows === 0) {\n return;\n }\n var info;\n var actions = {\n 'home': function () { return ({ toHeader: !info.isContent, toFrozen: true }); },\n 'end': function () { return ({ toHeader: !info.isContent, toFrozen: false }); },\n 'ctrlHome': function () { return ({ toHeader: true, toFrozen: _this.parent.isFrozenGrid() }); },\n 'ctrlEnd': function () { return ({ toHeader: false, toFrozen: false }); }\n };\n if (!(action in actions)) {\n return;\n }\n info = active.getInfo();\n var swap = actions[action]();\n this.setActive(!swap.toHeader, swap.toFrozen);\n this.getContent().matrix.current = active.matrix.current;\n };\n FocusStrategy.prototype.internalCellFocus = function (e) {\n if (!(e.byKey && e.container.isContent && e.keyArgs.action === 'enter'\n && (e.parent.classList.contains('e-detailcell') ||\n e.parent.classList.contains('e-unboundcell') || e.parent.classList.contains('e-templatecell')))) {\n return;\n }\n this.clearIndicator();\n var focusEle = this.getContent().getFocusable(this.getFocusedElement());\n this.setFocusedElement(focusEle);\n this.currentInfo.skipAction = true;\n };\n return FocusStrategy;\n}());\nexport { FocusStrategy };\n/**\n * Create matrix from row collection which act as mental model for cell navigation\n * @hidden\n */\nvar Matrix = /** @class */ (function () {\n function Matrix() {\n this.matrix = [];\n this.current = [];\n }\n Matrix.prototype.set = function (rowIndex, columnIndex, allow) {\n rowIndex = Math.max(0, Math.min(rowIndex, this.rows));\n columnIndex = Math.max(0, Math.min(columnIndex, this.columns));\n this.matrix[rowIndex] = this.matrix[rowIndex] || [];\n this.matrix[rowIndex][columnIndex] = allow ? 1 : 0;\n };\n Matrix.prototype.get = function (rowIndex, columnIndex, navigator, action, validator) {\n var tmp = columnIndex;\n if (rowIndex + navigator[0] < 0) {\n return [rowIndex, columnIndex];\n }\n rowIndex = Math.max(0, Math.min(rowIndex + navigator[0], this.rows));\n var emptyTable = true;\n if (isNullOrUndefined(this.matrix[rowIndex])) {\n return null;\n }\n columnIndex = Math.max(0, Math.min(columnIndex + navigator[1], this.matrix[rowIndex].length - 1));\n if (tmp + navigator[1] > this.matrix[rowIndex].length - 1 && validator(rowIndex, columnIndex, action)) {\n return [rowIndex, tmp];\n }\n var first = this.first(this.matrix[rowIndex], columnIndex, navigator, true, action);\n columnIndex = first === null ? tmp : first;\n var val = getValue(rowIndex + \".\" + columnIndex, this.matrix);\n if (rowIndex === this.rows && (action === 'downArrow' || action === 'enter')) {\n navigator[0] = -1;\n }\n if (first === null) {\n for (var i = 0; i < this.rows; i++) {\n if (this.matrix[i].some(function (v) { return v === 1; })) {\n emptyTable = false;\n break;\n }\n }\n if (emptyTable) {\n rowIndex = this.current[0];\n return [rowIndex, columnIndex];\n }\n }\n return this.inValid(val) || !validator(rowIndex, columnIndex, action) ?\n this.get(rowIndex, tmp, navigator, action, validator) : [rowIndex, columnIndex];\n };\n Matrix.prototype.first = function (vector, index, navigator, moveTo, action) {\n if (((index < 0 || index === vector.length) && this.inValid(vector[index])\n && (action !== 'upArrow' && action !== 'downArrow')) || !vector.some(function (v) { return v === 1; })) {\n return null;\n }\n return !this.inValid(vector[index]) ? index :\n this.first(vector, (['upArrow', 'downArrow', 'shiftUp', 'shiftDown'].indexOf(action) !== -1) ? moveTo ? 0 : ++index : index + navigator[1], navigator, false, action);\n };\n Matrix.prototype.select = function (rowIndex, columnIndex) {\n rowIndex = Math.max(0, Math.min(rowIndex, this.rows));\n columnIndex = Math.max(0, Math.min(columnIndex, this.matrix[rowIndex].length - 1));\n this.current = [rowIndex, columnIndex];\n };\n Matrix.prototype.generate = function (rows, selector, isRowTemplate) {\n this.rows = rows.length - 1;\n this.matrix = [];\n for (var i = 0; i < rows.length; i++) {\n var cells = rows[i].cells.filter(function (c) { return c.isSpanned !== true; });\n this.columns = Math.max(cells.length - 1, this.columns | 0);\n for (var j = 0; j < cells.length; j++) {\n this.set(i, j, rows[i].visible === false ? false : selector(rows[i], cells[j], isRowTemplate));\n }\n }\n return this.matrix;\n };\n Matrix.prototype.inValid = function (value) {\n return value === 0 || value === undefined;\n };\n return Matrix;\n}());\nexport { Matrix };\n/**\n * @hidden\n */\nvar ContentFocus = /** @class */ (function () {\n function ContentFocus(parent) {\n var _this = this;\n this.matrix = new Matrix();\n this.lastIdxCell = false;\n this.parent = parent;\n this.keyActions = {\n 'rightArrow': [0, 1],\n 'tab': [0, 1],\n 'leftArrow': [0, -1],\n 'shiftTab': [0, -1],\n 'upArrow': [-1, 0],\n 'downArrow': [1, 0],\n 'shiftUp': [-1, 0],\n 'shiftDown': [1, 0],\n 'shiftRight': [0, 1],\n 'shiftLeft': [0, -1],\n 'enter': [1, 0],\n 'shiftEnter': [-1, 0]\n };\n this.indexesByKey = function (action) {\n var opt = {\n 'home': [_this.matrix.current[0], -1, 0, 1],\n 'end': [_this.matrix.current[0], _this.matrix.columns + 1, 0, -1],\n 'ctrlHome': [0, -1, 0, 1],\n 'ctrlEnd': [_this.matrix.rows, _this.matrix.columns + 1, 0, -1]\n };\n return opt[action] || null;\n };\n }\n ContentFocus.prototype.getTable = function () {\n return (this.parent.isFrozenGrid() ?\n this.parent.getContent().querySelector('.e-movablecontent .e-table') :\n this.parent.getContentTable());\n };\n ContentFocus.prototype.onKeyPress = function (e) {\n var navigator = this.keyActions[e.action];\n var current = this.getCurrentFromAction(e.action, navigator, e.action in this.keyActions, e);\n if (!current) {\n return;\n }\n if ((['tab', 'shiftTab'].indexOf(e.action) > -1 && this.matrix.current || []).toString() === current.toString()) {\n if (current.toString() === [this.matrix.rows, this.matrix.columns].toString() ||\n current.toString() === [0, 0].toString() || (this.matrix.current[0] === this.matrix.rows &&\n this.matrix.current.toString() === current.toString())) {\n return false;\n }\n else {\n current = this.editNextRow(current[0], current[1], e.action);\n }\n }\n this.matrix.select(current[0], current[1]);\n };\n ContentFocus.prototype.editNextRow = function (rowIndex, cellIndex, action) {\n var gObj = this.parent;\n var editNextRow = gObj.editSettings.allowNextRowEdit && (gObj.isEdit || gObj.isLastCellPrimaryKey);\n var visibleIndex = gObj.getColumnIndexByField(gObj.getVisibleColumns()[0].field);\n var cell = this.getTable().rows[rowIndex].cells[cellIndex];\n if (action === 'tab' && editNextRow) {\n rowIndex++;\n var index = (this.getTable().rows[rowIndex].querySelectorAll('.e-indentcell').length +\n this.getTable().rows[rowIndex].querySelectorAll('.e-detailrowcollapse').length);\n cellIndex = visibleIndex + index;\n }\n if (action === 'shiftTab' && editNextRow) {\n rowIndex--;\n cellIndex = gObj.getColumnIndexByField(gObj.getVisibleColumns()[gObj.getVisibleColumns().length - 1].field);\n }\n return !cell.classList.contains('e-rowcell') && !cell.classList.contains('e-headercell') &&\n !cell.classList.contains('e-groupcaption') ?\n this.editNextRow(rowIndex, cellIndex, action) : [rowIndex, cellIndex];\n };\n ContentFocus.prototype.getCurrentFromAction = function (action, navigator, isPresent, e) {\n if (navigator === void 0) { navigator = [0, 0]; }\n if (!isPresent && !this.indexesByKey(action) || (this.matrix.current.length === 0)) {\n return null;\n }\n if (!this.shouldFocusChange(e)) {\n return this.matrix.current;\n }\n var _a = this.indexesByKey(action) || this.matrix.current.concat(navigator), rowIndex = _a[0], cellIndex = _a[1], rN = _a[2], cN = _a[3];\n var current = this.matrix.get(rowIndex, cellIndex, [rN, cN], action, this.validator());\n return current;\n };\n ContentFocus.prototype.onClick = function (e, force) {\n var target = e.target;\n target = (target.classList.contains('e-rowcell') ? target : closest(target, 'td'));\n target = target ? target : closest(e.target, 'td.e-detailrowcollapse')\n || closest(e.target, 'td.e-detailrowexpand');\n target = closest(e.target, 'td.e-detailcell') ?\n isNullOrUndefined(closest(closest(e.target, '.e-grid'), 'td.e-detailcell')) ? null : target : target;\n target = target && closest(target, 'table').classList.contains('e-table') ? target : null;\n if (!target) {\n return false;\n }\n var _a = [target.parentElement.rowIndex, target.cellIndex], rowIndex = _a[0], cellIndex = _a[1];\n var _b = this.matrix.current, oRowIndex = _b[0], oCellIndex = _b[1];\n var val = getValue(rowIndex + \".\" + cellIndex, this.matrix.matrix);\n if (this.matrix.inValid(val) || (!force && oRowIndex === rowIndex && oCellIndex === cellIndex) ||\n (!parentsUntil(e.target, 'e-rowcell') && !parentsUntil(e.target, 'e-groupcaption'))) {\n return false;\n }\n this.matrix.select(rowIndex, cellIndex);\n };\n ContentFocus.prototype.getFocusInfo = function () {\n var info = {};\n var _a = this.matrix.current, _b = _a[0], rowIndex = _b === void 0 ? 0 : _b, _c = _a[1], cellIndex = _c === void 0 ? 0 : _c;\n this.matrix.current = [rowIndex, cellIndex];\n info.element = !isNullOrUndefined(this.getTable().rows[rowIndex]) ? this.getTable().rows[rowIndex].cells[cellIndex] : null;\n if (!info.element) {\n return info;\n }\n info.elementToFocus = !info.element.classList.contains('e-unboundcell') && !info.element.classList.contains('e-detailcell')\n ? this.getFocusable(info.element) : info.element;\n info.outline = true;\n info.uid = info.element.parentElement.getAttribute('data-uid');\n return info;\n };\n ContentFocus.prototype.getFocusable = function (element) {\n var query = 'button, [href], input:not([type=\"hidden\"]), select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n if (this.parent.isEdit) {\n query = 'input:not([type=\"hidden\"]), select:not([aria-hidden=\"true\"]), textarea';\n }\n var child = [].slice.call(element.querySelectorAll(query));\n /* Select the first focusable child element\n * if no child found then select the cell itself.\n * if Grid is in editable state, check for editable control inside child.\n */\n return child.length ? child[0] : element;\n };\n ContentFocus.prototype.selector = function (row, cell, isRowTemplate) {\n var types = [CellType.Expand, CellType.GroupCaption, CellType.CaptionSummary, CellType.GroupSummary];\n return ((row.isDataRow && cell.visible && (cell.isDataCell || cell.isTemplate))\n || (row.isDataRow && cell.cellType === CellType.DetailExpand && isNullOrUndefined(cell.visible))\n || (!row.isDataRow && types.indexOf(cell.cellType) > -1)\n || (cell.column && cell.column.type === 'checkbox')\n || (cell.cellType === CellType.CommandColumn)\n || (row.isDataRow && isRowTemplate))\n && !(row.edit === 'delete' && row.isDirty);\n };\n ContentFocus.prototype.nextRowFocusValidate = function (index) {\n var lastIndex = index;\n for (var i = index, len = this.matrix.rows; i < len; i++) {\n if (this.matrix.matrix[index].indexOf(1) === -1) {\n index = index + 1;\n }\n else {\n return index;\n }\n }\n this.lastIdxCell = true;\n return lastIndex;\n };\n ContentFocus.prototype.previousRowFocusValidate = function (index) {\n var firstIndex = index;\n for (var i = index, len = 0; i >= len; i--) {\n if (this.matrix.matrix[index].indexOf(1) === -1) {\n index = index - 1;\n if (index < 0) {\n this.lastIdxCell = true;\n return firstIndex;\n }\n }\n else {\n return index;\n }\n }\n return firstIndex;\n };\n ContentFocus.prototype.jump = function (action, current) {\n var frozenSwap = this.parent.getFrozenLeftCount() &&\n ((action === 'leftArrow' || action === 'shiftTab') && current[1] === 0);\n var right = ((action === 'rightArrow' || action === 'tab') && current[1] === this.matrix.columns);\n var frSwap = this.parent.getFrozenMode() === 'Left-Right' && right;\n if (this.parent.getFrozenMode() === 'Right') {\n frozenSwap = right;\n }\n this.lastIdxCell = false;\n var enterFrozen = this.parent.frozenRows !== 0 && action === 'shiftEnter';\n if (action === 'tab' && !this.parent.isEdit &&\n current[1] === this.matrix.matrix[current[0]].lastIndexOf(1) && this.matrix.matrix.length - 1 !== current[0]) {\n this.matrix.current[0] = this.nextRowFocusValidate(this.matrix.current[0] + 1);\n this.matrix.current[1] = -1;\n frozenSwap = this.parent.isFrozenGrid();\n }\n if (action === 'shiftTab' && !this.parent.isEdit &&\n current[0] !== 0 && this.matrix.matrix[current[0]].indexOf(1) === current[1]) {\n this.matrix.current[0] = this.previousRowFocusValidate(this.matrix.current[0] - 1);\n this.matrix.current[1] = this.matrix.matrix[current[0]].length;\n }\n var isHeaderFocus = false;\n var row = document.activeElement.parentElement;\n if ((this.parent.enableVirtualization || this.parent.infiniteScrollSettings.enableCache)\n && row.classList.contains('e-row')) {\n var rowIndex = parseInt(row.getAttribute('aria-rowindex'), 10);\n isHeaderFocus = rowIndex > 0;\n }\n var info = {\n swap: !isHeaderFocus ? ((action === 'upArrow' || enterFrozen) && current[0] === 0) || frozenSwap || frSwap : false,\n toHeader: (action === 'upArrow' || enterFrozen) && current[0] === 0,\n toFrozen: frozenSwap,\n toFrozenRight: frSwap\n };\n return info;\n };\n ContentFocus.prototype.getNextCurrent = function (previous, swap, active, action) {\n if (previous === void 0) { previous = []; }\n var current = [];\n if (this.parent.getFrozenMode() === 'Right' || this.parent.getFrozenMode() === 'Left-Right') {\n if (action === 'leftArrow' || action === 'shiftTab') {\n current[0] = previous[0];\n current[1] = active.matrix.columns + 1;\n }\n if (this.parent.getFrozenMode() === 'Left-Right' && (action === 'rightArrow' || action === 'tab')) {\n current[0] = previous[0];\n current[1] = -1;\n }\n }\n else if (action === 'rightArrow' || action === 'tab') {\n current[0] = previous[0];\n current[1] = -1;\n }\n if (action === 'downArrow' || action === 'enter') {\n current[0] = -1;\n current[1] = previous[1];\n }\n return current;\n };\n ContentFocus.prototype.generateRows = function (rows, optionals) {\n var _a;\n var matrix = optionals.matrix, handlerInstance = optionals.handlerInstance;\n var len = handlerInstance.matrix.matrix.length;\n var defaultLen = this.parent.allowFiltering && this.parent.filterSettings.type === 'FilterBar' ? len + 1 : len;\n handlerInstance.matrix.matrix = handlerInstance.matrix.matrix.slice(0, defaultLen); //Header matrix update.\n handlerInstance.matrix.rows = defaultLen;\n (_a = handlerInstance.matrix.matrix).push.apply(_a, matrix);\n handlerInstance.matrix.rows += matrix.length;\n };\n ContentFocus.prototype.getInfo = function (e) {\n var info = this.getFocusInfo();\n var _a = this.matrix.current, rIndex = _a[0], cIndex = _a[1];\n var isData = info.element.classList.contains('e-rowcell');\n var isSelectable = isData || (e && e.action !== 'enter' && (info.element.classList.contains('e-detailrowcollapse')\n || info.element.classList.contains('e-detailrowexpand')));\n var _b = [Math.min(parseInt(info.element.parentElement.getAttribute('aria-rowindex'), 10), rIndex),\n Math.min(parseInt(info.element.getAttribute('aria-colindex'), 10), cIndex)], rowIndex = _b[0], cellIndex = _b[1];\n return { isContent: true, isDataCell: isData, indexes: [rowIndex, cellIndex], isSelectable: isSelectable };\n };\n ContentFocus.prototype.validator = function () {\n var table = this.getTable();\n return function (rowIndex, cellIndex, action) {\n if (!isNullOrUndefined(table.rows[rowIndex])) {\n var cell = void 0;\n cellIndex = table.querySelector('.e-emptyrow') ? 0 : cellIndex;\n if (table.rows[rowIndex].cells[0].classList.contains('e-editcell')) {\n cell = table.rows[rowIndex].cells[0].querySelectorAll('td')[cellIndex];\n }\n else {\n cell = table.rows[rowIndex].cells[cellIndex];\n }\n var isCellWidth = cell.getBoundingClientRect().width !== 0;\n if (action === 'enter' || action === 'shiftEnter') {\n return isCellWidth && cell.classList.contains('e-rowcell');\n }\n if ((action === 'shiftUp' || action === 'shiftDown') && cell.classList.contains('e-rowcell')) {\n return isCellWidth;\n }\n else if (action !== 'shiftUp' && action !== 'shiftDown') {\n return isCellWidth;\n }\n }\n return false;\n };\n };\n ContentFocus.prototype.shouldFocusChange = function (e) {\n var _a = this.matrix.current, _b = _a[0], rIndex = _b === void 0 ? -1 : _b, _c = _a[1], cIndex = _c === void 0 ? -1 : _c;\n if (rIndex < 0 || cIndex < 0) {\n return true;\n }\n var cell = getValue(rIndex + \".cells.\" + cIndex, this.getTable().rows);\n if (!cell) {\n return true;\n }\n return e.action === 'enter' || e.action === 'shiftEnter' ?\n cell.classList.contains('e-rowcell') && !cell.classList.contains('e-unboundcell')\n && (!cell.classList.contains('e-templatecell') || cell.classList.contains('e-editedbatchcell'))\n && !cell.classList.contains('e-detailcell') : true;\n };\n ContentFocus.prototype.getGridSeletion = function () {\n return !isBlazor() && this.parent.allowSelection && this.parent.selectionSettings.allowColumnSelection;\n };\n return ContentFocus;\n}());\nexport { ContentFocus };\n/**\n * @hidden\n */\nvar HeaderFocus = /** @class */ (function (_super) {\n __extends(HeaderFocus, _super);\n function HeaderFocus(parent) {\n return _super.call(this, parent) || this;\n }\n HeaderFocus.prototype.getTable = function () {\n return (this.parent.isFrozenGrid() ?\n this.parent.getHeaderContent().querySelector('.e-movableheader .e-table') :\n this.parent.getHeaderTable());\n };\n HeaderFocus.prototype.onClick = function (e) {\n var target = e.target;\n target = (target.classList.contains('e-headercell') ? target : closest(target, 'th'));\n if (!target && this.parent.frozenRows !== 0) {\n target = (e.target.classList.contains('e-rowcell') ? e.target :\n closest(e.target, 'td'));\n }\n if (e.target.classList.contains('e-columnheader') ||\n e.target.querySelector('.e-stackedheadercell')) {\n return false;\n }\n if (!target) {\n return;\n }\n var _a = [target.parentElement.rowIndex, target.cellIndex], rowIndex = _a[0], cellIndex = _a[1];\n var val = getValue(rowIndex + \".\" + cellIndex, this.matrix.matrix);\n if (this.matrix.inValid(val)) {\n return false;\n }\n this.matrix.select(target.parentElement.rowIndex, target.cellIndex);\n };\n HeaderFocus.prototype.getFocusInfo = function () {\n var info = {};\n var _a = this.matrix.current, _b = _a[0], rowIndex = _b === void 0 ? 0 : _b, _c = _a[1], cellIndex = _c === void 0 ? 0 : _c;\n info.element = this.getTable().rows[rowIndex].cells[cellIndex];\n if (!isNullOrUndefined(info.element)) {\n info.elementToFocus = this.getFocusable(info.element);\n info.outline = !info.element.classList.contains('e-filterbarcell');\n }\n return info;\n };\n HeaderFocus.prototype.selector = function (row, cell) {\n return (cell.visible && (cell.column.field !== undefined || cell.isTemplate || !isNullOrUndefined(cell.column.template))) ||\n cell.column.type === 'checkbox' || cell.cellType === CellType.StackedHeader;\n };\n HeaderFocus.prototype.jump = function (action, current) {\n var frozenSwap = this.parent.getFrozenLeftCount() &&\n (action === 'leftArrow' || (action === 'shiftLeft' && this.getGridSeletion()) || action === 'shiftTab') && current[1] === 0;\n var right = (action === 'rightArrow' || (action === 'shiftRight' && this.getGridSeletion())\n || action === 'tab') && current[1] === this.matrix.columns;\n var frSwap = this.parent.getFrozenMode() === 'Left-Right' && right;\n if (this.parent.getFrozenMode() === 'Right') {\n frozenSwap = right;\n }\n var enterFrozen = this.parent.frozenRows !== 0 && action === 'enter';\n var isLastCell;\n var lastRow;\n var headerSwap = frozenSwap || frSwap;\n var fMatrix = this.parent.focusModule.fHeader && this.parent.focusModule.fHeader.matrix.matrix;\n var isPresent = fMatrix && !isNullOrUndefined(fMatrix[current[0]]);\n if (this.parent.enableHeaderFocus && action === 'tab') {\n lastRow = this.matrix.matrix.length - 1 === current[0];\n isLastCell = current[1] === this.matrix.matrix[current[0]].lastIndexOf(1);\n if (isLastCell) {\n if (!lastRow) {\n this.matrix.current[0] = this.matrix.current[0] + 1;\n }\n else {\n this.matrix.current[0] = 0;\n }\n this.matrix.current[1] = -1;\n }\n if (this.parent.isFrozenGrid() && lastRow && isLastCell) {\n frozenSwap = true;\n headerSwap = false;\n }\n }\n return {\n swap: ((action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1) ||\n (isPresent && (frozenSwap || frSwap)) || (action === 'tab' && lastRow && isLastCell),\n toHeader: headerSwap,\n toFrozen: frozenSwap,\n toFrozenRight: frSwap\n };\n };\n HeaderFocus.prototype.getNextCurrent = function (previous, swap, active, action) {\n if (previous === void 0) { previous = []; }\n var current1 = [];\n if (this.parent.getFrozenMode() === 'Right' || this.parent.getFrozenMode() === 'Left-Right') {\n if (action === 'leftArrow' || (action === 'shiftLeft' && this.getGridSeletion()) || action === 'shiftTab') {\n current1[0] = previous[0];\n current1[1] = active.matrix.columns + 1;\n }\n if (this.parent.getFrozenMode() === 'Left-Right'\n && (action === 'rightArrow' || (action === 'shiftRight' && this.getGridSeletion()) || action === 'tab')) {\n current1[0] = previous[0];\n current1[1] = -1;\n }\n }\n else if (action === 'rightArrow' || (action === 'shiftRight' && this.getGridSeletion()) || action === 'tab') {\n current1[0] = previous[0];\n current1[1] = -1;\n }\n if (action === 'upArrow' || action === 'shiftEnter') {\n current1[0] = this.matrix.matrix.length;\n current1[1] = previous[1];\n }\n return current1;\n };\n HeaderFocus.prototype.generateRows = function (rows) {\n var length = this.matrix.matrix.length;\n if (this.parent.allowFiltering && this.parent.filterSettings.type === 'FilterBar') {\n this.matrix.rows = ++this.matrix.rows;\n var cells = rows[0].cells;\n for (var i = 0; i < cells.length; i++) {\n this.matrix.set(length, i, cells[i].visible && cells[i].column.allowFiltering !== false);\n }\n }\n };\n HeaderFocus.prototype.getInfo = function (e) {\n return extend(_super.prototype.getInfo.call(this, e), { isContent: false, isHeader: true });\n };\n HeaderFocus.prototype.validator = function () {\n return function () { return true; };\n };\n HeaderFocus.prototype.shouldFocusChange = function (e) {\n var _a = this.matrix.current, rowIndex = _a[0], columnIndex = _a[1];\n if (rowIndex < 0 || columnIndex < 0) {\n return true;\n }\n var cell = getValue(rowIndex + \".cells.\" + columnIndex, this.getTable().rows);\n if (!cell) {\n return true;\n }\n return e.action === 'enter' || e.action === 'altDownArrow' ? !cell.classList.contains('e-headercell') : true;\n };\n return HeaderFocus;\n}(ContentFocus));\nexport { HeaderFocus };\nvar FixedContentFocus = /** @class */ (function (_super) {\n __extends(FixedContentFocus, _super);\n function FixedContentFocus() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FixedContentFocus.prototype.getTable = function () {\n return this.parent.getContent().querySelector('.e-frozencontent .e-table');\n };\n FixedContentFocus.prototype.jump = function (action, current) {\n var enterFrozen = this.parent.frozenRows !== 0 && action === 'shiftEnter';\n var toHeader = (action === 'upArrow' || enterFrozen) && current[0] === 0;\n if (this.parent.getFrozenMode() === 'Right') {\n var swap = toHeader || ((action === 'shiftTab' || action === 'leftArrow') && current[1] === 0);\n return { swap: swap, toHeader: toHeader, toFrozen: toHeader };\n }\n return {\n swap: toHeader || ((action === 'tab' || action === 'rightArrow') && current[1] === this.matrix.columns),\n toHeader: toHeader,\n toFrozen: toHeader\n };\n };\n FixedContentFocus.prototype.getNextCurrent = function (previous, swap, active, action) {\n if (previous === void 0) { previous = []; }\n var current2 = [];\n if (this.parent.getFrozenMode() === 'Right') {\n if (action === 'rightArrow' || action === 'tab') {\n current2[0] = previous[0];\n current2[1] = -1;\n }\n }\n else {\n if (action === 'tab' && this.parent.enableHeaderFocus) {\n current2[0] = previous[0];\n current2[1] = -1;\n }\n if (action === 'leftArrow' || action === 'shiftTab') {\n current2[0] = previous[0];\n current2[1] = active.matrix.columns + 1;\n }\n }\n if (action === 'downArrow' || action === 'enter') {\n current2[0] = -1;\n current2[1] = previous[1];\n }\n return current2;\n };\n return FixedContentFocus;\n}(ContentFocus));\nexport { FixedContentFocus };\nvar FixedHeaderFocus = /** @class */ (function (_super) {\n __extends(FixedHeaderFocus, _super);\n function FixedHeaderFocus() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FixedHeaderFocus.prototype.jump = function (action, current) {\n var enterFrozen = this.parent.frozenRows !== 0 && action === 'enter';\n var hMatrix = this.parent.focusModule.header && this.parent.focusModule.header.matrix.matrix;\n var isPresent = hMatrix && !isNullOrUndefined(hMatrix[current[0]]);\n if (this.parent.getFrozenMode() === 'Right') {\n var frSwap = (action === 'leftArrow' || (action === 'shiftLeft' && this.getGridSeletion())\n || action === 'shiftTab') && current[1] === 0;\n var swap = ((action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1) ||\n (isPresent && frSwap);\n var toFrozen = (action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1;\n return { swap: swap, toHeader: frSwap, toFrozen: toFrozen };\n }\n return {\n swap: (action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1 || ((action === 'rightArrow' ||\n (action === 'shiftRight' && this.getGridSeletion()) || action === 'tab') &&\n current[1] === this.matrix.columns && isPresent),\n toHeader: (action === 'rightArrow' || (action === 'shiftRight' && this.getGridSeletion()) || action === 'tab') &&\n current[1] === this.matrix.columns,\n toFrozen: (action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1\n };\n };\n FixedHeaderFocus.prototype.getTable = function () {\n return (this.parent.getHeaderContent().querySelector('.e-frozenheader .e-table'));\n };\n FixedHeaderFocus.prototype.getNextCurrent = function (previous, swap, active, action) {\n if (previous === void 0) { previous = []; }\n var current3 = [];\n if (this.parent.getFrozenMode() === 'Right') {\n if (action === 'rightArrow' || (action === 'shiftRight' && this.getGridSeletion()) || action === 'tab') {\n current3[0] = previous[0];\n current3[1] = -1;\n }\n }\n else {\n if (action === 'leftArrow' || (action === 'shiftLeft' && this.getGridSeletion()) || action === 'shiftTab') {\n current3[0] = previous[0];\n current3[1] = active.matrix.columns + 1;\n }\n }\n if (action === 'upArrow' || action === 'shiftEnter') {\n current3[0] = this.matrix.matrix.length;\n current3[1] = previous[1];\n }\n return current3;\n };\n return FixedHeaderFocus;\n}(HeaderFocus));\nexport { FixedHeaderFocus };\n/** @hidden */\nvar SearchBox = /** @class */ (function () {\n function SearchBox(searchBox) {\n this.searchBox = searchBox;\n }\n /** @hidden */\n SearchBox.prototype.searchFocus = function (args) {\n args.target.parentElement.classList.add('e-input-focus');\n };\n SearchBox.prototype.searchBlur = function (args) {\n args.target.parentElement.classList.remove('e-input-focus');\n };\n SearchBox.prototype.wireEvent = function () {\n if (this.searchBox) {\n EventHandler.add(this.searchBox, 'focus', this.searchFocus, this);\n EventHandler.add(this.searchBox, 'blur', this.searchBlur, this);\n }\n };\n SearchBox.prototype.unWireEvent = function () {\n if (this.searchBox) {\n EventHandler.remove(this.searchBox, 'focus', this.searchFocus);\n EventHandler.remove(this.searchBox, 'blur', this.searchBlur);\n }\n };\n return SearchBox;\n}());\nexport { SearchBox };\nvar FixedRightContentFocus = /** @class */ (function (_super) {\n __extends(FixedRightContentFocus, _super);\n function FixedRightContentFocus() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FixedRightContentFocus.prototype.getTable = function () {\n return this.parent.getContent().querySelector('.e-frozen-right-content .e-table');\n };\n FixedRightContentFocus.prototype.jump = function (action, current) {\n var enterFrozen = this.parent.frozenRows !== 0 && action === 'shiftEnter';\n var toHeader = (action === 'upArrow' || enterFrozen) && current[0] === 0;\n return {\n swap: toHeader || ((action === 'shiftTab' || action === 'leftArrow') && current[1] === 0),\n toHeader: toHeader,\n toFrozenRight: toHeader\n };\n };\n FixedRightContentFocus.prototype.getNextCurrent = function (previous, swap, active, action) {\n if (previous === void 0) { previous = []; }\n var current2 = [];\n if (action === 'rightArrow' || action === 'tab') {\n current2[0] = previous[0];\n current2[1] = -1;\n }\n if (action === 'downArrow' || action === 'enter') {\n current2[0] = -1;\n current2[1] = previous[1];\n }\n return current2;\n };\n return FixedRightContentFocus;\n}(ContentFocus));\nexport { FixedRightContentFocus };\nvar FixedRightHeaderFocus = /** @class */ (function (_super) {\n __extends(FixedRightHeaderFocus, _super);\n function FixedRightHeaderFocus() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FixedRightHeaderFocus.prototype.jump = function (action, current) {\n var headerMat = this.parent.focusModule.header && this.parent.focusModule.header.matrix.matrix;\n var isPresent = headerMat && !isNullOrUndefined(headerMat[current[0]]);\n var enterFrozen = this.parent.frozenRows !== 0 && action === 'enter';\n var frozenSwap = (action === 'leftArrow' || (action === 'shiftLeft' && this.getGridSeletion())\n || action === 'shiftTab') && current[1] === 0;\n var swap = ((action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1) ||\n (isPresent && frozenSwap);\n var toFrozen = (action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1;\n return { swap: swap, toHeader: frozenSwap, toFrozenRight: toFrozen };\n };\n FixedRightHeaderFocus.prototype.getTable = function () {\n return (this.parent.getHeaderContent().querySelector('.e-frozen-right-header .e-table'));\n };\n FixedRightHeaderFocus.prototype.getNextCurrent = function (previous, swap, active, action) {\n if (previous === void 0) { previous = []; }\n var current3 = [];\n if (action === 'rightArrow' || (action === 'shiftRight' && this.getGridSeletion()) || action === 'tab') {\n current3[0] = previous[0];\n current3[1] = 0;\n }\n if (action === 'upArrow' || action === 'shiftEnter') {\n current3[0] = this.matrix.matrix.length;\n current3[1] = previous[1];\n }\n return current3;\n };\n return FixedRightHeaderFocus;\n}(HeaderFocus));\nexport { FixedRightHeaderFocus };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { setStyleAttribute, addClass, removeClass, ChildProperty, Complex } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, formatUnit } from '@syncfusion/ej2-base';\nimport { Browser } from '@syncfusion/ej2-base';\nimport { calculatePosition, calculateRelativeBasedPosition } from '../common/position';\nimport { Animation, Property, Event, Component } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges } from '@syncfusion/ej2-base';\nimport { EventHandler } from '@syncfusion/ej2-base';\nimport { flip, fit, isCollide } from '../common/collision';\n/**\n * Specifies the offset position values.\n */\nvar PositionData = /** @class */ (function (_super) {\n __extends(PositionData, _super);\n function PositionData() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('left')\n ], PositionData.prototype, \"X\", void 0);\n __decorate([\n Property('top')\n ], PositionData.prototype, \"Y\", void 0);\n return PositionData;\n}(ChildProperty));\nexport { PositionData };\n// don't use space in classNames\nvar CLASSNAMES = {\n ROOT: 'e-popup',\n RTL: 'e-rtl',\n OPEN: 'e-popup-open',\n CLOSE: 'e-popup-close'\n};\n/**\n * Represents the Popup Component\n * ```html\n *
\n *
Popup Content
\n * ```\n * ```typescript\n * \n * ```\n */\nvar Popup = /** @class */ (function (_super) {\n __extends(Popup, _super);\n function Popup(element, options) {\n return _super.call(this, options, element) || this;\n }\n /**\n * Called internally if any of the property value changed.\n * @private\n */\n Popup.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'width':\n setStyleAttribute(this.element, { 'width': formatUnit(newProp.width) });\n break;\n case 'height':\n setStyleAttribute(this.element, { 'height': formatUnit(newProp.height) });\n break;\n case 'zIndex':\n setStyleAttribute(this.element, { 'zIndex': newProp.zIndex });\n break;\n case 'enableRtl':\n this.setEnableRtl();\n break;\n case 'position':\n case 'relateTo':\n this.refreshPosition();\n break;\n case 'offsetX':\n var x = newProp.offsetX - oldProp.offsetX;\n this.element.style.left = (parseInt(this.element.style.left, 10) + (x)).toString() + 'px';\n break;\n case 'offsetY':\n var y = newProp.offsetY - oldProp.offsetY;\n this.element.style.top = (parseInt(this.element.style.top, 10) + (y)).toString() + 'px';\n break;\n case 'content':\n this.setContent();\n break;\n case 'actionOnScroll':\n if (newProp.actionOnScroll !== 'none') {\n this.wireScrollEvents();\n }\n else {\n this.unwireScrollEvents();\n }\n break;\n }\n }\n };\n /**\n * gets the Component module name.\n * @private\n */\n Popup.prototype.getModuleName = function () {\n return 'popup';\n };\n /**\n * To resolve if any collision occurs.\n */\n Popup.prototype.resolveCollision = function () {\n this.checkCollision();\n };\n /**\n * gets the persisted state properties of the Component.\n */\n Popup.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n /**\n * To destroy the control.\n */\n Popup.prototype.destroy = function () {\n this.element.classList.remove(CLASSNAMES.ROOT, CLASSNAMES.RTL, CLASSNAMES.OPEN, CLASSNAMES.CLOSE);\n this.unwireEvents();\n _super.prototype.destroy.call(this);\n };\n /**\n * To Initialize the control rendering\n * @private\n */\n Popup.prototype.render = function () {\n this.element.classList.add(CLASSNAMES.ROOT);\n var styles = {};\n if (this.zIndex !== 1000) {\n styles.zIndex = this.zIndex;\n }\n if (this.width !== 'auto') {\n styles.width = formatUnit(this.width);\n }\n if (this.height !== 'auto') {\n styles.height = formatUnit(this.height);\n }\n setStyleAttribute(this.element, styles);\n this.fixedParent = false;\n this.setEnableRtl();\n this.setContent();\n };\n Popup.prototype.wireEvents = function () {\n if (Browser.isDevice) {\n EventHandler.add(window, 'orientationchange', this.orientationOnChange, this);\n }\n if (this.actionOnScroll !== 'none') {\n this.wireScrollEvents();\n }\n };\n Popup.prototype.wireScrollEvents = function () {\n if (this.getRelateToElement()) {\n for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {\n var parent_1 = _a[_i];\n EventHandler.add(parent_1, 'scroll', this.scrollRefresh, this);\n }\n }\n };\n Popup.prototype.unwireEvents = function () {\n if (Browser.isDevice) {\n EventHandler.remove(window, 'orientationchange', this.orientationOnChange);\n }\n if (this.actionOnScroll !== 'none') {\n this.unwireScrollEvents();\n }\n };\n Popup.prototype.unwireScrollEvents = function () {\n if (this.getRelateToElement()) {\n for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {\n var parent_2 = _a[_i];\n EventHandler.remove(parent_2, 'scroll', this.scrollRefresh);\n }\n }\n };\n Popup.prototype.getRelateToElement = function () {\n var relateToElement = this.relateTo === '' || isNullOrUndefined(this.relateTo) ?\n document.body : this.relateTo;\n this.setProperties({ relateTo: relateToElement }, true);\n return ((typeof this.relateTo) === 'string') ?\n document.querySelector(this.relateTo) : this.relateTo;\n };\n Popup.prototype.scrollRefresh = function (e) {\n if (this.actionOnScroll === 'reposition') {\n if (!(this.element.offsetParent === e.target ||\n (this.element.offsetParent && this.element.offsetParent.tagName === 'BODY' &&\n e.target.parentElement == null))) {\n this.refreshPosition();\n }\n }\n else if (this.actionOnScroll === 'hide') {\n this.hide();\n }\n if (this.actionOnScroll !== 'none') {\n if (this.getRelateToElement()) {\n var targetVisible = this.isElementOnViewport(this.getRelateToElement(), e.target);\n if (!targetVisible && !this.targetInvisibleStatus) {\n this.trigger('targetExitViewport');\n this.targetInvisibleStatus = true;\n }\n else if (targetVisible) {\n this.targetInvisibleStatus = false;\n }\n }\n }\n };\n /**\n * This method is to get the element visibility on viewport when scroll\n * the page. This method will returns true even though 1 px of element\n * part is in visible.\n */\n Popup.prototype.isElementOnViewport = function (relateToElement, scrollElement) {\n var scrollParents = this.getScrollableParent(relateToElement);\n for (var parent_3 = 0; parent_3 < scrollParents.length; parent_3++) {\n if (this.isElementVisible(relateToElement, scrollParents[parent_3])) {\n continue;\n }\n else {\n return false;\n }\n }\n return true;\n };\n Popup.prototype.isElementVisible = function (relateToElement, scrollElement) {\n var rect = this.checkGetBoundingClientRect(relateToElement);\n if (!rect.height || !rect.width) {\n return false;\n }\n if (!isNullOrUndefined(this.checkGetBoundingClientRect(scrollElement))) {\n var parent_4 = scrollElement.getBoundingClientRect();\n return !(rect.bottom < parent_4.top) &&\n (!(rect.bottom > parent_4.bottom) &&\n (!(rect.right > parent_4.right) &&\n !(rect.left < parent_4.left)));\n }\n else {\n var win = window;\n var windowView = {\n top: win.scrollY,\n left: win.scrollX,\n right: win.scrollX + win.outerWidth,\n bottom: win.scrollY + win.outerHeight\n };\n var off = calculatePosition(relateToElement);\n var ele = {\n top: off.top,\n left: off.left,\n right: off.left + rect.width,\n bottom: off.top + rect.height\n };\n var elementView = {\n top: windowView.bottom - ele.top,\n left: windowView.right - ele.left,\n bottom: ele.bottom - windowView.top,\n right: ele.right - windowView.left\n };\n return elementView.top > 0\n && elementView.left > 0\n && elementView.right > 0\n && elementView.bottom > 0;\n }\n };\n /**\n * Initialize the event handler\n * @private\n */\n Popup.prototype.preRender = function () {\n //There is no event handler\n };\n Popup.prototype.setEnableRtl = function () {\n this.reposition();\n this.enableRtl ? this.element.classList.add(CLASSNAMES.RTL) : this.element.classList.remove(CLASSNAMES.RTL);\n };\n Popup.prototype.setContent = function () {\n if (!isNullOrUndefined(this.content)) {\n this.element.innerHTML = '';\n if (typeof (this.content) === 'string') {\n this.element.textContent = this.content;\n }\n else {\n this.element.appendChild(this.content);\n }\n }\n };\n Popup.prototype.orientationOnChange = function () {\n var _this = this;\n setTimeout(function () {\n _this.refreshPosition();\n }, 200);\n };\n /**\n * Based on the `relative` element and `offset` values, `Popup` element position will refreshed.\n */\n Popup.prototype.refreshPosition = function (target, collision) {\n if (!isNullOrUndefined(target)) {\n this.checkFixedParent(target);\n }\n this.reposition();\n if (!collision) {\n this.checkCollision();\n }\n };\n Popup.prototype.reposition = function () {\n var pos;\n var position;\n var relateToElement = this.getRelateToElement();\n if (typeof this.position.X === 'number' && typeof this.position.Y === 'number') {\n pos = { left: this.position.X, top: this.position.Y };\n }\n else if ((typeof this.position.X === 'string' && typeof this.position.Y === 'number') ||\n (typeof this.position.X === 'number' && typeof this.position.Y === 'string')) {\n var display = this.element.style.display;\n var parentDisplay = void 0;\n this.element.style.display = 'block';\n if (this.element.classList.contains('e-dlg-modal')) {\n parentDisplay = this.element.parentElement.style.display;\n this.element.parentElement.style.display = 'block';\n }\n position = this.getAnchorPosition(relateToElement, this.element, this.position, this.offsetX, this.offsetY);\n if (typeof this.position.X === 'string') {\n pos = { left: position.left, top: this.position.Y };\n }\n else {\n pos = { left: this.position.X, top: position.top };\n }\n this.element.style.display = display;\n if (this.element.classList.contains('e-dlg-modal')) {\n this.element.parentElement.style.display = parentDisplay;\n }\n }\n else if (relateToElement) {\n var display = this.element.style.display;\n this.element.style.display = 'block';\n pos = this.getAnchorPosition(relateToElement, this.element, this.position, this.offsetX, this.offsetY);\n this.element.style.display = display;\n }\n else {\n pos = { left: 0, top: 0 };\n }\n if (!isNullOrUndefined(pos)) {\n this.element.style.left = pos.left + 'px';\n this.element.style.top = pos.top + 'px';\n }\n };\n Popup.prototype.checkGetBoundingClientRect = function (ele) {\n var eleRect;\n try {\n eleRect = ele.getBoundingClientRect();\n return eleRect;\n }\n catch (error) {\n return null;\n }\n };\n Popup.prototype.getAnchorPosition = function (anchorEle, ele, position, offsetX, offsetY) {\n var eleRect = this.checkGetBoundingClientRect(ele);\n var anchorRect = this.checkGetBoundingClientRect(anchorEle);\n if (isNullOrUndefined(eleRect) || isNullOrUndefined(anchorRect)) {\n return null;\n }\n var anchor = anchorEle;\n var anchorPos = { left: 0, top: 0 };\n if (ele.offsetParent && ele.offsetParent.tagName === 'BODY' && anchorEle.tagName === 'BODY') {\n anchorPos = calculatePosition(anchorEle);\n }\n else {\n if ((ele.classList.contains('e-dlg-modal') && anchor.tagName !== 'BODY')) {\n ele = ele.parentElement;\n }\n anchorPos = calculateRelativeBasedPosition(anchor, ele);\n }\n switch (position.X) {\n default:\n case 'left':\n break;\n case 'center':\n if ((ele.classList.contains('e-dlg-modal') && anchor.tagName === 'BODY' && this.targetType === 'container')) {\n anchorPos.left += (window.innerWidth / 2 - eleRect.width / 2);\n }\n else if (this.targetType === 'container') {\n anchorPos.left += (anchorRect.width / 2 - eleRect.width / 2);\n }\n else {\n anchorPos.left += (anchorRect.width / 2);\n }\n break;\n case 'right':\n if ((ele.classList.contains('e-dlg-modal') && anchor.tagName === 'BODY' && this.targetType === 'container')) {\n anchorPos.left += (window.innerWidth - eleRect.width);\n }\n else if (this.targetType === 'container') {\n anchorPos.left += (anchorRect.width - eleRect.width);\n }\n else {\n anchorPos.left += (anchorRect.width);\n }\n break;\n }\n switch (position.Y) {\n default:\n case 'top':\n break;\n case 'center':\n if ((ele.classList.contains('e-dlg-modal') && anchor.tagName === 'BODY' && this.targetType === 'container')) {\n anchorPos.top += (window.innerHeight / 2 - eleRect.height / 2);\n }\n else if (this.targetType === 'container') {\n anchorPos.top += (anchorRect.height / 2 - eleRect.height / 2);\n }\n else {\n anchorPos.top += (anchorRect.height / 2);\n }\n break;\n case 'bottom':\n if ((ele.classList.contains('e-dlg-modal') && anchor.tagName === 'BODY' && this.targetType === 'container')) {\n anchorPos.top += (window.innerHeight - eleRect.height);\n }\n else if (this.targetType === 'container') {\n anchorPos.top += (anchorRect.height - eleRect.height);\n }\n else {\n anchorPos.top += (anchorRect.height);\n }\n break;\n }\n anchorPos.left += offsetX;\n anchorPos.top += offsetY;\n return anchorPos;\n };\n Popup.prototype.callFlip = function (param) {\n var relateToElement = this.getRelateToElement();\n flip(this.element, relateToElement, this.offsetX, this.offsetY, this.position.X, this.position.Y, this.viewPortElement, param, this.fixedParent);\n };\n Popup.prototype.callFit = function (param) {\n if (isCollide(this.element, this.viewPortElement).length !== 0) {\n if (isNullOrUndefined(this.viewPortElement)) {\n var data = fit(this.element, this.viewPortElement, param);\n if (param.X) {\n this.element.style.left = data.left + 'px';\n }\n if (param.Y) {\n this.element.style.top = data.top + 'px';\n }\n }\n else {\n var elementRect = this.checkGetBoundingClientRect(this.element);\n var viewPortRect = this.checkGetBoundingClientRect(this.viewPortElement);\n if (isNullOrUndefined(elementRect) || isNullOrUndefined(viewPortRect)) {\n return null;\n }\n if (param && param.Y === true) {\n if (viewPortRect.top > elementRect.top) {\n this.element.style.top = '0px';\n }\n else if (viewPortRect.bottom < elementRect.bottom) {\n this.element.style.top = parseInt(this.element.style.top, 10) - (elementRect.bottom - viewPortRect.bottom) + 'px';\n }\n }\n if (param && param.X === true) {\n if (viewPortRect.right < elementRect.right) {\n this.element.style.left = parseInt(this.element.style.left, 10) - (elementRect.right - viewPortRect.right) + 'px';\n }\n else if (viewPortRect.left > elementRect.left) {\n this.element.style.left = parseInt(this.element.style.left, 10) + (viewPortRect.left - elementRect.left) + 'px';\n }\n }\n }\n }\n };\n Popup.prototype.checkCollision = function () {\n var horz = this.collision.X;\n var vert = this.collision.Y;\n if (horz === 'none' && vert === 'none') {\n return;\n }\n if (horz === 'flip' && vert === 'flip') {\n this.callFlip({ X: true, Y: true });\n }\n else if (horz === 'fit' && vert === 'fit') {\n this.callFit({ X: true, Y: true });\n }\n else {\n if (horz === 'flip') {\n this.callFlip({ X: true, Y: false });\n }\n else if (vert === 'flip') {\n this.callFlip({ Y: true, X: false });\n }\n if (horz === 'fit') {\n this.callFit({ X: true, Y: false });\n }\n else if (vert === 'fit') {\n this.callFit({ X: false, Y: true });\n }\n }\n };\n /**\n * Shows the popup element from screen.\n * @param { AnimationModel | Function } collisionOrAnimationOptions? - To pass animation options or collision function.\n * @param { Function } collision? - To pass the collision function.\n * @param { HTMLElement } relativeElement? - To calculate the zIndex value dynamically.\n */\n Popup.prototype.show = function (animationOptions, relativeElement) {\n var _this = this;\n this.wireEvents();\n if (this.zIndex === 1000 || !isNullOrUndefined(relativeElement)) {\n var zIndexElement = (isNullOrUndefined(relativeElement)) ? this.element : relativeElement;\n this.zIndex = getZindexPartial(zIndexElement);\n setStyleAttribute(this.element, { 'zIndex': this.zIndex });\n }\n animationOptions = (!isNullOrUndefined(animationOptions) && typeof animationOptions === 'object') ?\n animationOptions : this.showAnimation;\n if (this.collision.X !== 'none' || this.collision.Y !== 'none') {\n removeClass([this.element], CLASSNAMES.CLOSE);\n addClass([this.element], CLASSNAMES.OPEN);\n this.checkCollision();\n removeClass([this.element], CLASSNAMES.OPEN);\n addClass([this.element], CLASSNAMES.CLOSE);\n }\n if (!isNullOrUndefined(animationOptions)) {\n animationOptions.begin = function () {\n if (!_this.isDestroyed) {\n removeClass([_this.element], CLASSNAMES.CLOSE);\n addClass([_this.element], CLASSNAMES.OPEN);\n }\n };\n animationOptions.end = function () {\n if (!_this.isDestroyed) {\n _this.trigger('open');\n }\n };\n new Animation(animationOptions).animate(this.element);\n }\n else {\n removeClass([this.element], CLASSNAMES.CLOSE);\n addClass([this.element], CLASSNAMES.OPEN);\n this.trigger('open');\n }\n };\n /**\n * Hides the popup element from screen.\n * @param { AnimationModel } animationOptions? - To give the animation options.\n */\n Popup.prototype.hide = function (animationOptions) {\n var _this = this;\n animationOptions = (!isNullOrUndefined(animationOptions) && typeof animationOptions === 'object') ?\n animationOptions : this.hideAnimation;\n if (!isNullOrUndefined(animationOptions)) {\n animationOptions.end = function () {\n if (!_this.isDestroyed) {\n removeClass([_this.element], CLASSNAMES.OPEN);\n addClass([_this.element], CLASSNAMES.CLOSE);\n _this.trigger('close');\n }\n };\n new Animation(animationOptions).animate(this.element);\n }\n else {\n removeClass([this.element], CLASSNAMES.OPEN);\n addClass([this.element], CLASSNAMES.CLOSE);\n this.trigger('close');\n }\n this.unwireEvents();\n };\n /**\n * Gets scrollable parent elements for the given element.\n * @param { HTMLElement } element - Specify the element to get the scrollable parents of it.\n */\n Popup.prototype.getScrollableParent = function (element) {\n this.checkFixedParent(element);\n return getScrollableParent(element, this.fixedParent);\n };\n Popup.prototype.checkFixedParent = function (element) {\n var parent = element.parentElement;\n while (parent && parent.tagName !== 'HTML') {\n var parentStyle = getComputedStyle(parent);\n if (parentStyle.position === 'fixed' && this.element.offsetParent && this.element.offsetParent.tagName === 'BODY') {\n this.element.style.position = 'fixed';\n this.fixedParent = true;\n }\n parent = parent.parentElement;\n if (isNullOrUndefined(this.element.offsetParent) && parentStyle.position === 'fixed'\n && this.element.style.position === 'fixed') {\n this.fixedParent = true;\n }\n }\n };\n __decorate([\n Property('auto')\n ], Popup.prototype, \"height\", void 0);\n __decorate([\n Property('auto')\n ], Popup.prototype, \"width\", void 0);\n __decorate([\n Property(null)\n ], Popup.prototype, \"content\", void 0);\n __decorate([\n Property('container')\n ], Popup.prototype, \"targetType\", void 0);\n __decorate([\n Property(null)\n ], Popup.prototype, \"viewPortElement\", void 0);\n __decorate([\n Property({ X: 'none', Y: 'none' })\n ], Popup.prototype, \"collision\", void 0);\n __decorate([\n Property('')\n ], Popup.prototype, \"relateTo\", void 0);\n __decorate([\n Complex({}, PositionData)\n ], Popup.prototype, \"position\", void 0);\n __decorate([\n Property(0)\n ], Popup.prototype, \"offsetX\", void 0);\n __decorate([\n Property(0)\n ], Popup.prototype, \"offsetY\", void 0);\n __decorate([\n Property(1000)\n ], Popup.prototype, \"zIndex\", void 0);\n __decorate([\n Property(false)\n ], Popup.prototype, \"enableRtl\", void 0);\n __decorate([\n Property('reposition')\n ], Popup.prototype, \"actionOnScroll\", void 0);\n __decorate([\n Property(null)\n ], Popup.prototype, \"showAnimation\", void 0);\n __decorate([\n Property(null)\n ], Popup.prototype, \"hideAnimation\", void 0);\n __decorate([\n Event()\n ], Popup.prototype, \"open\", void 0);\n __decorate([\n Event()\n ], Popup.prototype, \"close\", void 0);\n __decorate([\n Event()\n ], Popup.prototype, \"targetExitViewport\", void 0);\n Popup = __decorate([\n NotifyPropertyChanges\n ], Popup);\n return Popup;\n}(Component));\nexport { Popup };\n/**\n * Gets scrollable parent elements for the given element.\n * @param { HTMLElement } element - Specify the element to get the scrollable parents of it.\n * @private\n */\nexport function getScrollableParent(element, fixedParent) {\n var eleStyle = getComputedStyle(element);\n var scrollParents = [];\n var overflowRegex = /(auto|scroll)/;\n var parent = element.parentElement;\n while (parent && parent.tagName !== 'HTML') {\n var parentStyle = getComputedStyle(parent);\n if (!(eleStyle.position === 'absolute' && parentStyle.position === 'static')\n && overflowRegex.test(parentStyle.overflow + parentStyle.overflowY + parentStyle.overflowX)) {\n scrollParents.push(parent);\n }\n parent = parent.parentElement;\n }\n if (!fixedParent) {\n scrollParents.push(document);\n }\n return scrollParents;\n}\n/**\n * Gets the maximum z-index of the given element.\n * @param { HTMLElement } element - Specify the element to get the maximum z-index of it.\n * @private\n */\nexport function getZindexPartial(element) {\n // upto body traversal\n var parent = element.parentElement;\n var parentZindex = [];\n while (parent) {\n if (parent.tagName !== 'BODY') {\n var index = document.defaultView.getComputedStyle(parent, null).getPropertyValue('z-index');\n var position = document.defaultView.getComputedStyle(parent, null).getPropertyValue('position');\n if (index !== 'auto' && position !== 'static') {\n parentZindex.push(index);\n }\n parent = parent.parentElement;\n }\n else {\n break;\n }\n }\n //Body direct children element traversal\n var childrenZindex = [];\n for (var i = 0; i < document.body.children.length; i++) {\n if (!element.isEqualNode(document.body.children[i])) {\n var index = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('z-index');\n var position = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('position');\n if (index !== 'auto' && position !== 'static') {\n childrenZindex.push(index);\n }\n }\n }\n childrenZindex.push('999');\n var siblingsZindex = [];\n if (!isNullOrUndefined(element.parentElement) && element.parentElement.tagName !== 'BODY') {\n var childNodes = [].slice.call(element.parentElement.children);\n for (var i = 0; i < childNodes.length; i++) {\n var index = document.defaultView.getComputedStyle(childNodes[i], null).getPropertyValue('z-index');\n var position = document.defaultView.getComputedStyle(childNodes[i], null).getPropertyValue('position');\n if (index !== 'auto' && position !== 'static') {\n siblingsZindex.push(index);\n }\n }\n }\n var finalValue = parentZindex.concat(childrenZindex, siblingsZindex);\n var currentZindexValue = Math.max.apply(Math, finalValue) + 1;\n // Checking the max-zindex value\n return currentZindexValue > 2147483647 ? 2147483647 : currentZindexValue;\n}\n/**\n * Gets the maximum z-index of the page.\n * @param { HTMLElement } tagName - Specify the tagName to get the maximum z-index of it.\n * @private\n */\nexport function getMaxZindex(tagName) {\n if (tagName === void 0) { tagName = ['*']; }\n var maxZindex = [];\n for (var i = 0; i < tagName.length; i++) {\n var elements = document.getElementsByTagName(tagName[i]);\n for (var i_1 = 0; i_1 < elements.length; i_1++) {\n var index = document.defaultView.getComputedStyle(elements[i_1], null).getPropertyValue('z-index');\n var position = document.defaultView.getComputedStyle(elements[i_1], null).getPropertyValue('position');\n if (index !== 'auto' && position !== 'static') {\n maxZindex.push(index);\n }\n }\n }\n var currentZindexValue = Math.max.apply(Math, maxZindex) + 1;\n return currentZindexValue > 2147483647 ? 2147483647 : currentZindexValue;\n}\n","/** @hidden */\nexport var created = 'create';\n/** @hidden */\nexport var destroyed = 'destroy';\n/** @hidden */\nexport var load = 'load';\n/** @hidden */\nexport var rowDataBound = 'rowDataBound';\n/** @hidden */\nexport var queryCellInfo = 'queryCellInfo';\n/** @hidden */\nexport var headerCellInfo = 'headerCellInfo';\n/** @hidden */\nexport var actionBegin = 'actionBegin';\n/** @hidden */\nexport var actionComplete = 'actionComplete';\n/** @hidden */\nexport var actionFailure = 'actionFailure';\n/** @hidden */\nexport var dataBound = 'dataBound';\n/** @hidden */\nexport var rowSelecting = 'rowSelecting';\n/** @hidden */\nexport var rowSelected = 'rowSelected';\n/** @hidden */\nexport var rowDeselecting = 'rowDeselecting';\n/** @hidden */\nexport var rowDeselected = 'rowDeselected';\n/** @hidden */\nexport var cellSelecting = 'cellSelecting';\n/** @hidden */\nexport var cellSelected = 'cellSelected';\n/** @hidden */\nexport var cellDeselecting = 'cellDeselecting';\n/** @hidden */\nexport var cellDeselected = 'cellDeselected';\n/** @hidden */\nexport var columnSelecting = 'columnSelecting';\n/** @hidden */\nexport var columnSelected = 'columnSelected';\n/** @hidden */\nexport var columnDeselecting = 'columnDeselecting';\n/** @hidden */\nexport var columnDeselected = 'columnDeselected';\n/** @hidden */\nexport var columnDragStart = 'columnDragStart';\n/** @hidden */\nexport var columnDrag = 'columnDrag';\n/** @hidden */\nexport var columnDrop = 'columnDrop';\n/** @hidden */\nexport var rowDragStartHelper = 'rowDragStartHelper';\n/** @hidden */\nexport var rowDragStart = 'rowDragStart';\n/** @hidden */\nexport var rowDrag = 'rowDrag';\n/** @hidden */\nexport var rowDrop = 'rowDrop';\n/** @hidden */\nexport var beforePrint = 'beforePrint';\n/** @hidden */\nexport var printComplete = 'printComplete';\n/** @hidden */\nexport var detailDataBound = 'detailDataBound';\n/** @hidden */\nexport var toolbarClick = 'toolbarClick';\n/** @hidden */\nexport var batchAdd = 'batchAdd';\n/** @hidden */\nexport var batchCancel = 'batchCancel';\n/** @hidden */\nexport var batchDelete = 'batchDelete';\n/** @hidden */\nexport var beforeBatchAdd = 'beforeBatchAdd';\n/** @hidden */\nexport var beforeBatchDelete = 'beforeBatchDelete';\n/** @hidden */\nexport var beforeBatchSave = 'beforeBatchSave';\n/** @hidden */\nexport var beginEdit = 'beginEdit';\n/** @hidden */\nexport var cellEdit = 'cellEdit';\n/** @hidden */\nexport var cellSave = 'cellSave';\n/** @hidden */\nexport var cellSaved = 'cellSaved';\n/** @hidden */\nexport var endAdd = 'endAdd';\n/** @hidden */\nexport var endDelete = 'endDelete';\n/** @hidden */\nexport var endEdit = 'endEdit';\n/** @hidden */\nexport var recordDoubleClick = 'recordDoubleClick';\n/** @hidden */\nexport var recordClick = 'recordClick';\n/** @hidden */\nexport var beforeDataBound = 'beforeDataBound';\n/** @hidden */\nexport var beforeOpenColumnChooser = 'beforeOpenColumnChooser';\n/** @hidden */\nexport var resizeStart = 'resizeStart';\n/** @hidden */\nexport var onResize = 'resizing';\n/** @hidden */\nexport var resizeStop = 'resizeStop';\n/** @hidden */\nexport var checkBoxChange = 'checkBoxChange';\n/** @hidden */\nexport var beforeCopy = 'beforeCopy';\n/** @hidden */\nexport var beforePaste = 'beforePaste';\n/** @hidden */\nexport var beforeAutoFill = 'beforeAutoFill';\n/** @hidden */\nexport var filterChoiceRequest = 'filterchoicerequest';\n/** @hidden */\nexport var filterAfterOpen = 'filterafteropen';\n/** @hidden */\nexport var filterBeforeOpen = 'filterbeforeopen';\n/** @hidden */\nexport var filterSearchBegin = 'filtersearchbegin';\n/** @hidden */\nexport var commandClick = 'commandClick';\n/** @hidden */\nexport var exportGroupCaption = 'exportGroupCaption';\n/** @hidden */\nexport var lazyLoadGroupExpand = 'lazyLoadGroupExpand';\n/** @hidden */\nexport var lazyLoadGroupCollapse = 'lazyLoadGroupCollapse';\n/**\n * Specifies grid internal events\n */\n/** @hidden */\nexport var initialLoad = 'initial-load';\n/** @hidden */\nexport var initialEnd = 'initial-end';\n/** @hidden */\nexport var dataReady = 'data-ready';\n/** @hidden */\nexport var contentReady = 'content-ready';\n/** @hidden */\nexport var uiUpdate = 'ui-update';\n/** @hidden */\nexport var onEmpty = 'on-empty';\n/** @hidden */\nexport var inBoundModelChanged = 'inbound-model-changed';\n/** @hidden */\nexport var modelChanged = 'model-changed';\n/** @hidden */\nexport var colGroupRefresh = 'colgroup-refresh';\n/** @hidden */\nexport var headerRefreshed = 'header-refreshed';\n/** @hidden */\nexport var pageBegin = 'paging-begin';\n/** @hidden */\nexport var pageComplete = 'paging-complete';\n/** @hidden */\nexport var sortBegin = 'sorting-begin';\n/** @hidden */\nexport var sortComplete = 'sorting-complete';\n/** @hidden */\nexport var filterBegin = 'filtering-begin';\n/** @hidden */\nexport var filterComplete = 'filtering-complete';\n/** @hidden */\nexport var searchBegin = 'searching-begin';\n/** @hidden */\nexport var searchComplete = 'searching-complete';\n/** @hidden */\nexport var reorderBegin = 'reorder-begin';\n/** @hidden */\nexport var reorderComplete = 'reorder-complete';\n/** @hidden */\nexport var rowDragAndDropBegin = 'rowdraganddrop-begin';\n/** @hidden */\nexport var rowDragAndDropComplete = 'rowdraganddrop-complete';\n/** @hidden */\nexport var groupBegin = 'grouping-begin';\n/** @hidden */\nexport var groupComplete = 'grouping-complete';\n/** @hidden */\nexport var ungroupBegin = 'ungrouping-begin';\n/** @hidden */\nexport var ungroupComplete = 'ungrouping-complete';\n/** @hidden */\nexport var groupAggregates = 'group-aggregates';\n/** @hidden */\nexport var refreshFooterRenderer = 'refresh-footer-rendered';\n/** @hidden */\nexport var refreshAggregateCell = 'refresh-aggregate-cell';\n/** @hidden */\nexport var refreshAggregates = 'refresh-aggregates';\n/** @hidden */\nexport var rowSelectionBegin = 'rowselecting';\n/** @hidden */\nexport var rowSelectionComplete = 'rowselected';\n/** @hidden */\nexport var columnSelectionBegin = 'columnselecting';\n/** @hidden */\nexport var columnSelectionComplete = 'columnselected';\n/** @hidden */\nexport var cellSelectionBegin = 'cellselecting';\n/** @hidden */\nexport var cellSelectionComplete = 'cellselected';\n/** @hidden */\nexport var beforeCellFocused = 'beforecellfocused';\n/** @hidden */\nexport var cellFocused = 'cellfocused';\n/** @hidden */\nexport var keyPressed = 'key-pressed';\n/** @hidden */\nexport var click = 'click';\n/** @hidden */\nexport var destroy = 'destroy';\n/** @hidden */\nexport var columnVisibilityChanged = 'column-visible-changed';\n/** @hidden */\nexport var scroll = 'scroll';\n/** @hidden */\nexport var columnWidthChanged = 'column-width-changed';\n/** @hidden */\nexport var columnPositionChanged = 'column-position-changed';\n/** @hidden */\nexport var rowDragAndDrop = 'row-drag-and-drop';\n/** @hidden */\nexport var rowsAdded = 'rows-added';\n/** @hidden */\nexport var rowsRemoved = 'rows-removed';\n/** @hidden */\nexport var columnDragStop = 'column-drag-stop';\n/** @hidden */\nexport var headerDrop = 'header-drop';\n/** @hidden */\nexport var dataSourceModified = 'datasource-modified';\n/** @hidden */\nexport var refreshComplete = 'refresh-complete';\n/** @hidden */\nexport var refreshVirtualBlock = 'refresh-virtual-block';\n/** @hidden */\nexport var dblclick = 'dblclick';\n/** @hidden */\nexport var toolbarRefresh = 'toolbar-refresh';\n/** @hidden */\nexport var bulkSave = 'bulk-save';\n/** @hidden */\nexport var autoCol = 'auto-col';\n/** @hidden */\nexport var tooltipDestroy = 'tooltip-destroy';\n/** @hidden */\nexport var updateData = 'update-data';\n/** @hidden */\nexport var editBegin = 'edit-begin';\n/** @hidden */\nexport var editComplete = 'edit-complete';\n/** @hidden */\nexport var addBegin = 'add-begin';\n/** @hidden */\nexport var addComplete = 'add-complete';\n/** @hidden */\nexport var saveComplete = 'save-complete';\n/** @hidden */\nexport var deleteBegin = 'delete-begin';\n/** @hidden */\nexport var deleteComplete = 'delete-complete';\n/** @hidden */\nexport var preventBatch = 'prevent-batch';\n/** @hidden */\nexport var dialogDestroy = 'dialog-destroy';\n/** @hidden */\nexport var crudAction = 'crud-Action';\n/** @hidden */\nexport var addDeleteAction = 'add-delete-Action';\n/** @hidden */\nexport var destroyForm = 'destroy-form';\n/** @hidden */\nexport var doubleTap = 'double-tap';\n/** @hidden */\nexport var beforeExcelExport = 'beforeExcelExport';\n/** @hidden */\nexport var excelExportComplete = 'excelExportComplete';\n/** @hidden */\nexport var excelQueryCellInfo = 'excelQueryCellInfo';\n/** @hidden */\nexport var excelHeaderQueryCellInfo = 'excelHeaderQueryCellInfo';\n/** @hidden */\nexport var exportDetailDataBound = 'exportdetaildatabound';\n/** @hidden */\nexport var beforePdfExport = 'beforePdfExport';\n/** @hidden */\nexport var pdfExportComplete = 'pdfExportComplete';\n/** @hidden */\nexport var pdfQueryCellInfo = 'pdfQueryCellInfo';\n/** @hidden */\nexport var pdfHeaderQueryCellInfo = 'pdfHeaderQueryCellInfo';\n/** @hidden */\nexport var accessPredicate = 'access-predicate';\n/** @hidden */\nexport var contextMenuClick = 'contextMenuClick';\n/** @hidden */\nexport var freezeRender = 'freezerender';\n/** @hidden */\nexport var freezeRefresh = 'freezerefresh';\n/** @hidden */\nexport var contextMenuOpen = 'contextMenuOpen';\n/** @hidden */\nexport var columnMenuClick = 'columnMenuClick';\n/** @hidden */\nexport var columnMenuOpen = 'columnMenuOpen';\n/** @hidden */\nexport var filterOpen = 'filterOpen';\n/** @hidden */\nexport var filterDialogCreated = 'filterDialogCreated';\n/** @hidden */\nexport var filterMenuClose = 'filter-menu-close';\n/** @hidden */\nexport var initForeignKeyColumn = 'initForeignKeyColumn';\n/** @hidden */\nexport var getForeignKeyData = 'getForeignKeyData';\n/** @hidden */\nexport var generateQuery = 'generateQuery';\n/** @hidden */\nexport var showEmptyGrid = 'showEmptyGrid';\n/** @hidden */\nexport var foreignKeyData = 'foreignKeyData';\n/** @hidden */\nexport var columnDataStateChange = 'columnDataStateChange';\n/** @hidden */\nexport var dataStateChange = 'dataStateChange';\n/** @hidden */\nexport var dataSourceChanged = 'dataSourceChanged';\n/** @hidden */\nexport var rtlUpdated = 'rtl-updated';\n/** @hidden */\nexport var beforeFragAppend = 'beforeFragAppend';\n/** @hidden */\nexport var frozenHeight = 'frozenHeight';\n/** @hidden */\nexport var textWrapRefresh = 'textWrapRefresh';\n/** @hidden */\nexport var recordAdded = 'recordAdded';\n/** @hidden */\nexport var cancelBegin = 'cancel-Begin';\n/** @hidden */\nexport var editNextValCell = 'editNextValCell';\n/** @hidden */\nexport var hierarchyPrint = 'hierarchyprint';\n/** @hidden */\nexport var expandChildGrid = 'expandchildgrid';\n/** @hidden */\nexport var printGridInit = 'printGrid-Init';\n/** @hidden */\nexport var exportRowDataBound = 'export-RowDataBound';\n/** @hidden */\nexport var exportDataBound = 'export-DataBound';\n/** @hidden */\nexport var rowPositionChanged = 'row-position-changed';\n/** @hidden */\nexport var columnChooserOpened = 'columnChooserOpened';\n/** @hidden */\nexport var batchForm = 'batchedit-form';\n/** @hidden */\nexport var beforeStartEdit = 'edit-form';\n/** @hidden */\nexport var beforeBatchCancel = 'before-batch-cancel';\n/** @hidden */\nexport var batchEditFormRendered = 'batcheditform-rendered';\n/** @hidden */\nexport var partialRefresh = 'partial-refresh';\n/** @hidden */\nexport var beforeCustomFilterOpen = 'beforeCustomFilterOpen';\n/** @hidden */\nexport var selectVirtualRow = 'select-virtual-Row';\n/** @hidden */\nexport var columnsPrepared = 'columns-prepared';\n/** @hidden */\nexport var cBoxFltrBegin = 'cbox-filter-begin';\n/** @hidden */\nexport var cBoxFltrComplete = 'cbox-filter-complete';\n/** @hidden */\nexport var fltrPrevent = 'filter-Prevent';\n/** @hidden */\nexport var beforeFltrcMenuOpen = 'before-filter-cmenu-open';\n/** @hidden */\nexport var valCustomPlacement = 'validation-custom-placement';\n/** @hidden */\nexport var filterCboxValue = 'filter-cbox-value';\n/** @hidden */\nexport var componentRendered = 'component-rendered';\n/** @hidden */\nexport var restoreFocus = 'restore-Focus';\n/** @hidden */\nexport var detailStateChange = 'detail-state-change';\n/** @hidden */\nexport var detailIndentCellInfo = 'detail-indentcell-info';\n/** @hidden */\nexport var virtaulKeyHandler = 'virtaul-key-handler';\n/** @hidden */\nexport var virtaulCellFocus = 'virtaul-cell-focus';\n/** @hidden */\nexport var virtualScrollEditActionBegin = 'virtual-scroll-edit-action-begin';\n/** @hidden */\nexport var virtualScrollEditSuccess = 'virtual-scroll-edit-success';\n/** @hidden */\nexport var virtualScrollEditCancel = 'virtual-scroll-edit-cancel';\n/** @hidden */\nexport var virtualScrollEdit = 'virtual-scroll-edit';\n/** @hidden */\nexport var refreshVirtualCache = 'refresh-virtual-cache';\n/** @hidden */\nexport var editReset = 'edit-reset';\n/** @hidden */\nexport var virtualScrollAddActionBegin = 'virtual-scroll-add-action-begin';\n/** @hidden */\nexport var getVirtualData = 'get-virtual-data';\n/** @hidden */\nexport var refreshInfiniteModeBlocks = 'refresh-infinite-mode-blocks';\n/** @hidden */\nexport var resetInfiniteBlocks = 'reset-infinite-blocks';\n/** @hidden */\nexport var infiniteScrollHandler = 'infinite-scroll-handler';\n/** @hidden */\nexport var infinitePageQuery = 'infinite-page-query';\n/** @hidden */\nexport var infiniteShowHide = 'infinite-show-hide';\n/** @hidden */\nexport var appendInfiniteContent = 'append-infinite-content';\n/** @hidden */\nexport var removeInfiniteRows = 'remove-infinite-rows';\n/** @hidden */\nexport var setInfiniteCache = 'set-infinite-cache';\n/** @hidden */\nexport var infiniteEditHandler = 'infinite-edit-handler';\n/** @hidden */\nexport var initialCollapse = 'initial-collapse';\n/** @hidden */\nexport var getAggregateQuery = 'get-aggregate-query';\n/** @hidden */\nexport var closeFilterDialog = 'close-filter-dialog';\n/** @hidden */\nexport var columnChooserCancelBtnClick = 'columnChooserCancelBtnClick';\n/** @hidden */\nexport var getFilterBarOperator = 'get-filterbar-operator';\n/** @hidden */\nexport var resetColumns = 'reset-columns';\n/** @hidden */\nexport var pdfAggregateQueryCellInfo = 'pdfAggregateQueryCellInfo';\n/** @hidden */\nexport var excelAggregateQueryCellInfo = 'excelAggregateQueryCellInfo';\n/** @hidden */\nexport var setGroupCache = 'group-cache';\n/** @hidden */\nexport var lazyLoadScrollHandler = 'lazy-load-scroll-handler';\n/** @hidden */\nexport var groupCollapse = 'group-collapse';\n/** @hidden */\nexport var beforeCheckboxRenderer = 'beforeCheckboxRenderer';\n/** @hidden */\nexport var refreshHandlers = 'refreshResizeHandlers';\n/** @hidden */\nexport var refreshFrozenColumns = 'refresh-frozen-columns';\n/** @hidden */\nexport var setReorderDestinationElement = 'set-reorder-destination-element';\n/** @hidden */\nexport var refreshVirtualFrozenHeight = 'refresh-virtual-frozen-height';\n/** @hidden */\nexport var setFreezeSelection = 'set-freeze-selection';\n/** @hidden */\nexport var setInfiniteFrozenHeight = 'set-infinite-frozen-height';\n/** @hidden */\nexport var setInfiniteColFrozenHeight = 'set-infinite-col-frozen-height';\n/** @hidden */\nexport var beforeRefreshOnDataChange = 'before-refresh-on-data-change';\n/** @hidden */\nexport var immutableBatchCancel = 'immutable-batch-cancel';\n/** @hidden */\nexport var refreshVirtualFrozenRows = 'refresh-virtual-frozenrows';\n/** @hidden */\nexport var checkScrollReset = 'check-scroll-reset';\n/** @hidden */\nexport var refreshFrozenHeight = 'refresh-frozen-height';\n/** @hidden */\nexport var setHeightToFrozenElement = 'set-height-to-frozen-element';\n/** @hidden */\nexport var preventFrozenScrollRefresh = 'prevent-frozen-scroll-refresh';\n/** @hidden */\nexport var nextCellIndex = 'next-cell-index';\n/** @hidden */\nexport var refreshInfiniteCurrentViewData = 'refresh-infinite-current-view-data';\n/** @hidden */\nexport var infiniteCrudCancel = 'infinite-crud-cancel';\n/** @hidden */\nexport var filterDialogClose = 'filter-dialog-close';\n/** @hidden */\nexport var setCustomFilterHeader = 'set-custom-filter-header';\n/** @hidden */\nexport var refreshCustomFilterOkBtn = 'refresh-cutsom-filter-ok-button';\n/** @hidden */\nexport var refreshCustomFilterClearBtn = 'refresh-cutsom-filter-clear-button';\n/** @hidden */\nexport var renderResponsiveCmenu = 'render-responsive-cmenu';\n/** @hidden */\nexport var filterCmenuSelect = 'filter-cmenu-select';\n/** @hidden */\nexport var customFilterClose = 'custom-filter-close';\n/** @hidden */\nexport var setFullScreenDialog = 'set-fullscreen-dialog';\n/** @hidden */\nexport var refreshVirtualCacheOnRowDD = 'refresh-Virtual-Cache-On-RowDD';\n/** @hidden */\nexport var refreshExpandandCollapse = 'refresh-Expand-and-Collapse';\n/** @hidden */\nexport var rowModeChange = 'row-mode-change';\n/** @hidden */\nexport var enterKeyHandler = 'enter-key-handler';\n/** @hidden */\nexport var refreshVirtualMaxPage = 'refresh-virtual-max-page';\n","import { Droppable, isBlazor, addClass } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { setStyleAttribute, remove, updateBlazorTemplate, removeClass } from '@syncfusion/ej2-base';\nimport { getUpdateUsingRaf, appendChildren } from '../base/util';\nimport * as events from '../base/constant';\nimport { Row } from '../models/row';\nimport { RowRenderer } from './row-renderer';\nimport { CellMergeRender } from './cell-merge-renderer';\nimport { RowModelGenerator } from '../services/row-model-generator';\nimport { GroupModelGenerator } from '../services/group-model-generator';\nimport { getScrollBarWidth, isGroupAdaptive } from '../base/util';\n/**\n * Content module is used to render grid content\n * @hidden\n */\nvar ContentRender = /** @class */ (function () {\n /**\n * Constructor for content renderer module\n */\n function ContentRender(parent, serviceLocator) {\n var _this = this;\n this.rows = [];\n this.freezeRows = [];\n this.movableRows = [];\n this.freezeRowElements = [];\n /** @hidden */\n this.currentInfo = {};\n /** @hidden */\n this.prevCurrentView = [];\n this.isLoaded = true;\n this.viewColIndexes = [];\n this.drop = function (e) {\n _this.parent.notify(events.columnDrop, { target: e.target, droppedElement: e.droppedElement });\n remove(e.droppedElement);\n };\n this.infiniteCache = {};\n this.isRemove = false;\n this.visibleRows = [];\n this.visibleFrozenRows = [];\n this.rightFreezeRows = [];\n this.isAddRows = false;\n this.isInfiniteFreeze = false;\n this.useGroupCache = false;\n this.mutableData = false;\n this.rafCallback = function (args) {\n var arg = args;\n return function () {\n if (_this.parent.isFrozenGrid() && _this.parent.enableVirtualization) {\n var mContentRows = [].slice.call(_this.parent.getMovableVirtualContent().querySelectorAll('.e-row'));\n var fContentRows = [].slice.call(_this.parent.getFrozenVirtualContent().querySelectorAll('.e-row'));\n _this.isLoaded = !mContentRows ? false : mContentRows.length === fContentRows.length;\n if (_this.parent.enableColumnVirtualization && args.requestType === 'virtualscroll' && _this.isLoaded) {\n var mHdr = [].slice.call(_this.parent.getMovableVirtualHeader().querySelectorAll('.e-row'));\n var fHdr = [].slice.call(_this.parent.getFrozenVirtualHeader().querySelectorAll('.e-row'));\n _this.isLoaded = mHdr.length === fHdr.length;\n }\n }\n _this.ariaService.setBusy(_this.getPanel().querySelector('.e-content'), false);\n if (_this.parent.isDestroyed) {\n return;\n }\n var rows = _this.rows.slice(0);\n if (_this.parent.isFrozenGrid()) {\n rows = args.isFrozen ? _this.freezeRows : args.renderFrozenRightContent ? _this.parent.getFrozenRightRowsObject()\n : _this.movableRows;\n }\n _this.parent.notify(events.contentReady, { rows: rows, args: arg });\n if (_this.isLoaded) {\n _this.parent.trigger(events.dataBound, {}, function () {\n if (_this.parent.allowTextWrap) {\n _this.parent.notify(events.freezeRender, { case: 'textwrap' });\n }\n });\n }\n if (arg) {\n var action = (arg.requestType || '').toLowerCase() + '-complete';\n _this.parent.notify(action, arg);\n if (args.requestType === 'batchsave') {\n args.cancel = false;\n _this.parent.trigger(events.actionComplete, args);\n }\n }\n if (_this.isLoaded) {\n _this.parent.hideSpinner();\n }\n };\n };\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.ariaService = this.serviceLocator.getService('ariaService');\n this.mutableData = this.parent.getDataModule().isRemote();\n this.generator = this.getModelGenerator();\n if (this.parent.isDestroyed) {\n return;\n }\n if (!this.parent.enableColumnVirtualization && !this.parent.enableVirtualization\n && !this.parent.groupSettings.enableLazyLoading) {\n this.parent.on(events.columnVisibilityChanged, this.setVisible, this);\n }\n this.parent.on(events.colGroupRefresh, this.colGroupRefresh, this);\n this.parent.on(events.uiUpdate, this.enableAfterRender, this);\n this.parent.on(events.refreshInfiniteModeBlocks, this.refreshContentRows, this);\n this.parent.on(events.beforeCellFocused, this.beforeCellFocused, this);\n this.parent.on(events.destroy, this.droppableDestroy, this);\n }\n ContentRender.prototype.beforeCellFocused = function (e) {\n if (e.byKey && (e.keyArgs.action === 'upArrow' || e.keyArgs.action === 'downArrow')) {\n this.pressedKey = e.keyArgs.action;\n }\n else {\n this.pressedKey = undefined;\n }\n };\n /**\n * The function is used to render grid content div\n */\n ContentRender.prototype.renderPanel = function () {\n var gObj = this.parent;\n var div = this.parent.element.querySelector('.e-gridcontent');\n if (div) {\n this.ariaService.setOptions(this.parent.element.querySelector('.e-content'), { busy: false });\n this.setPanel(div);\n return;\n }\n div = this.parent.createElement('div', { className: 'e-gridcontent' });\n var innerDiv = this.parent.createElement('div', {\n className: 'e-content'\n });\n this.ariaService.setOptions(innerDiv, { busy: false });\n div.appendChild(innerDiv);\n this.setPanel(div);\n gObj.element.appendChild(div);\n };\n /**\n * The function is used to render grid content table\n */\n ContentRender.prototype.renderTable = function () {\n var contentDiv = this.getPanel();\n var virtualTable = contentDiv.querySelector('.e-virtualtable');\n var virtualTrack = contentDiv.querySelector('.e-virtualtrack');\n if (this.parent.enableVirtualization && !isNullOrUndefined(virtualTable) && !isNullOrUndefined(virtualTrack)\n && (!isBlazor() || (isBlazor() && !this.parent.isServerRendered))) {\n remove(virtualTable);\n remove(virtualTrack);\n }\n contentDiv.appendChild(this.createContentTable('_content_table'));\n this.setTable(contentDiv.querySelector('.e-table'));\n this.ariaService.setOptions(this.getTable(), {\n multiselectable: this.parent.selectionSettings.type === 'Multiple'\n });\n this.initializeContentDrop();\n if (this.parent.frozenRows) {\n this.parent.getHeaderContent().classList.add('e-frozenhdrcont');\n }\n };\n /**\n * The function is used to create content table elements\n * @return {Element}\n * @hidden\n */\n ContentRender.prototype.createContentTable = function (id) {\n var innerDiv = this.getPanel().firstElementChild;\n if (!isBlazor()) {\n if (this.getTable()) {\n remove(this.getTable());\n }\n }\n var table = innerDiv.querySelector('.e-table') ? innerDiv.querySelector('.e-table') :\n this.parent.createElement('table', { className: 'e-table', attrs: {\n cellspacing: '0.25px', role: 'grid',\n id: this.parent.element.id + id\n }\n });\n this.setColGroup(this.parent.getHeaderTable().querySelector('colgroup').cloneNode(true));\n table.appendChild(this.getColGroup());\n table.appendChild(this.parent.createElement('tbody'));\n innerDiv.appendChild(table);\n return innerDiv;\n };\n /**\n * Refresh the content of the Grid.\n * @return {void}\n */\n // tslint:disable-next-line:max-func-body-length\n ContentRender.prototype.refreshContentRows = function (args) {\n var _this = this;\n if (args === void 0) { args = {}; }\n var gObj = this.parent;\n if (gObj.currentViewData.length === 0) {\n return;\n }\n var dataSource = this.currentMovableRows || gObj.currentViewData;\n var contentModule = this.parent.contentModule;\n var isReact = gObj.isReact && !isNullOrUndefined(gObj.rowTemplate);\n var frag = isReact ? gObj.createElement('tbody') : document.createDocumentFragment();\n if (!this.initialPageRecords) {\n this.initialPageRecords = extend([], dataSource);\n }\n var hdrfrag = isReact ? gObj.createElement('tbody') : document.createDocumentFragment();\n var columns = gObj.getColumns();\n var tr;\n var hdrTbody;\n var frzCols = gObj.getFrozenColumns();\n var isFrozenGrid = this.parent.isFrozenGrid();\n var trElement;\n var row = new RowRenderer(this.serviceLocator, null, this.parent);\n var isInfiniteScroll = this.parent.enableInfiniteScrolling\n && args.requestType === 'infiniteScroll';\n this.rowElements = [];\n this.rows = [];\n var fCont = this.getPanel().querySelector('.e-frozencontent');\n var mCont = this.getPanel().querySelector('.e-movablecontent');\n var cont = this.getPanel().querySelector('.e-content');\n var tbdy;\n var tableName;\n if (isGroupAdaptive(gObj)) {\n if (['sorting', 'filtering', 'searching', 'grouping', 'ungrouping', 'reorder']\n .some(function (value) { return args.requestType === value; })) {\n this.emptyVcRows();\n }\n }\n var modelData;\n var isServerRendered = 'isServerRendered';\n if (isBlazor() && this.parent[isServerRendered]) {\n modelData = this.generator.generateRows(dataSource, args);\n if (this.parent.enableVirtualization) {\n this.prevInfo = this.prevInfo ? this.prevInfo : args.virtualInfo;\n this.prevInfo = args.virtualInfo.sentinelInfo && args.virtualInfo.sentinelInfo.axis === 'Y' && this.currentInfo.page &&\n this.currentInfo.page !== args.virtualInfo.page ? this.currentInfo : args.virtualInfo;\n }\n this.rows = modelData;\n this.freezeRows = modelData;\n this.rowElements = [].slice.call(this.getTable().querySelectorAll('tr.e-row[data-uid]'));\n if (frzCols) {\n this.movableRows = modelData.map(function (mRow) {\n var sRow = new Row(mRow);\n sRow.cells = mRow.cells.slice(frzCols, mRow.cells.length);\n mRow.cells = mRow.cells.slice(0, frzCols);\n return sRow;\n });\n this.freezeRowElements = this.rowElements;\n }\n this.isLoaded = true;\n this.parent.hideSpinner();\n args.isFrozen = this.parent.getFrozenColumns() !== 0 && !args.isFrozen;\n var arg = extend({ rows: this.rows }, args);\n if (this.getTable().querySelector('.e-emptyrow')) {\n remove(this.getTable().querySelector('.e-emptyrow'));\n if (!isNullOrUndefined(this.getTable().querySelectorAll('.e-table > tbody')[1])) {\n remove(this.getTable().querySelectorAll('.e-table > tbody')[1]);\n }\n }\n this.parent.notify('contentcolgroup', {});\n this.rafCallback(arg)();\n if (frzCols) {\n cont.style.overflowY = 'hidden';\n fCont.style.height = ((mCont.offsetHeight) - getScrollBarWidth()) + 'px';\n mCont.style.overflowY = this.parent.height !== 'auto' ? 'scroll' : 'auto';\n fCont.style.borderRightWidth = '1px';\n this.parent.notify(events.contentReady, { rows: this.movableRows, args: extend({}, arg, { isFrozen: false }) });\n }\n if (!(this.parent.isCheckBoxSelection || this.parent.selectionSettings.type === 'Multiple')\n || (!this.parent.isPersistSelection && !this.parent.enableVirtualization)) {\n var rowIndex = 'editRowIndex';\n if (this.parent.editSettings.mode === 'Normal' && !isNullOrUndefined(args[rowIndex])) {\n this.parent.selectRow(args[rowIndex]);\n }\n }\n if (this.parent.enableVirtualization && !this.parent.getHeaderContent().querySelectorAll('.e-check').length) {\n var removeClassByUid = this.parent.getRows().filter(function (x) { return x.getAttribute('aria-selected'); })\n .map(function (y) { return y.getAttribute('data-uid'); });\n var addClassByUid = this.parent.getRows().filter(function (x) { return x.getAttribute('aria-selected') === null; })\n .map(function (y) { return y.getAttribute('data-uid'); });\n for (var i = 0; i < removeClassByUid.length; i++) {\n if (!isNullOrUndefined(this.parent.getRowObjectFromUID(removeClassByUid[i])) &&\n !this.parent.getRowObjectFromUID(removeClassByUid[i]).isSelected) {\n this.parent.getRowElementByUID(removeClassByUid[i]).removeAttribute('aria-selected');\n if (!isNullOrUndefined(this.parent.getRowElementByUID(removeClassByUid[i]).querySelector('.e-check'))) {\n removeClass([this.parent.getRowElementByUID(removeClassByUid[i]).querySelector('.e-check')], ['e-check']);\n }\n for (var j = 0; j < this.parent.getRowElementByUID(removeClassByUid[i]).children.length; j++) {\n this.parent.getRowElementByUID(removeClassByUid[i])\n .children[j].classList.remove('e-selectionbackground', 'e-active');\n }\n }\n }\n for (var i = 0; i < addClassByUid.length; i++) {\n if (!isNullOrUndefined(this.parent.getRowObjectFromUID(addClassByUid[i]))\n && this.parent.getRowObjectFromUID(addClassByUid[i]).isSelected) {\n this.parent.getRowElementByUID(addClassByUid[i]).setAttribute('aria-selected', 'true');\n if (!isNullOrUndefined(this.parent.getRowElementByUID(addClassByUid[i]).querySelector('.e-frame'))) {\n addClass([this.parent.getRowElementByUID(addClassByUid[i]).querySelector('.e-frame')], ['e-check']);\n }\n for (var j = 0; j < this.parent.getRowElementByUID(addClassByUid[i]).children.length; j++) {\n this.parent.getRowElementByUID(addClassByUid[i])\n .children[j].classList.add('e-selectionbackground', 'e-active');\n }\n }\n }\n }\n return;\n }\n if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {\n if (this.parent.enableColumnVirtualization && args.requestType === 'virtualscroll'\n && args.virtualInfo.sentinelInfo.axis === 'X') {\n modelData = this.parent.contentModule.generateRows(dataSource, args);\n args.renderMovableContent = true;\n }\n modelData = this.parent.contentModule.generateRows(dataSource, args);\n }\n else {\n modelData = this.checkCache(modelData, args);\n if (!this.isAddRows && !this.useGroupCache) {\n modelData = this.generator.generateRows(dataSource, args);\n }\n }\n this.setGroupCache(modelData, args);\n this.parent.notify(events.setInfiniteCache, { isInfiniteScroll: isInfiniteScroll, modelData: modelData, args: args });\n var idx = modelData[0].cells[0].index;\n if (isFrozenGrid) {\n tableName = contentModule.setTbody(modelData, args);\n tbdy = contentModule.getTbody(tableName);\n }\n var isFrozenLeft = this.parent.getFrozenMode() === 'Left-Right' && tableName === 'frozen-right';\n /* tslint:disable:no-any */\n if (args.requestType !== 'infiniteScroll' && this.parent.registeredTemplate\n && this.parent.registeredTemplate.template && !args.isFrozen && !isFrozenLeft) {\n var templatetoclear = [];\n for (var i = 0; i < this.parent.registeredTemplate.template.length; i++) {\n for (var j = 0; j < this.parent.registeredTemplate.template[i].rootNodes.length; j++) {\n if (isNullOrUndefined(this.parent.registeredTemplate.template[i].rootNodes[j].parentNode)) {\n templatetoclear.push(this.parent.registeredTemplate.template[i]);\n /* tslint:enable:no-any */\n }\n }\n }\n this.parent.destroyTemplate(['template'], templatetoclear);\n }\n if (this.parent.isReact && args.requestType !== 'infiniteScroll' && !args.isFrozen) {\n this.parent.destroyTemplate(['columnTemplate', 'rowTemplate', 'detailTemplate', 'captionTemplate', 'commandsTemplate']);\n this.parent.renderTemplates();\n }\n if (this.parent.enableColumnVirtualization) {\n var cellMerge = new CellMergeRender(this.serviceLocator, this.parent);\n cellMerge.updateVirtualCells(modelData);\n }\n if (!isFrozenGrid) {\n this.tbody = this.getTable().querySelector('tbody');\n }\n var startIndex = 0;\n var blockLoad = true;\n if (isGroupAdaptive(gObj) && gObj.vcRows.length) {\n var top_1 = 'top';\n var scrollTop = !isNullOrUndefined(args.virtualInfo.offsets) ? args.virtualInfo.offsets.top :\n (!isNullOrUndefined(args.scrollTop) ? args.scrollTop[top_1] : 0);\n if (scrollTop !== 0) {\n var offsets_1 = gObj.vGroupOffsets;\n var bSize = gObj.pageSettings.pageSize / 2;\n var values = Object.keys(offsets_1).map(function (key) { return offsets_1[key]; });\n for (var m = 0; m < values.length; m++) {\n if (scrollTop < values[m]) {\n if (!isNullOrUndefined(args.virtualInfo) && args.virtualInfo.direction === 'up') {\n args.virtualInfo.blockIndexes = m === 0 || m === 1 ? [1, 2] : [m, m + 1];\n startIndex = m === 0 || m === 1 ? 0 : (m * bSize);\n break;\n }\n else {\n args.virtualInfo.blockIndexes = m === 0 || m === 1 ? [1, 2] : [m, m + 1];\n startIndex = m === 0 || m === 1 ? 0 : (m) * bSize;\n break;\n }\n }\n }\n if (Math.round(scrollTop + this.contentPanel.firstElementChild.offsetHeight) >=\n this.contentPanel.firstElementChild.scrollHeight && !args.rowObject) {\n blockLoad = false;\n }\n }\n }\n var isVFFrozenOnly = gObj.frozenRows && !gObj.isFrozenGrid() && this.parent.enableVirtualization\n && args.requestType === 'reorder';\n if ((gObj.frozenRows && args.requestType === 'virtualscroll' && args.virtualInfo.sentinelInfo.axis === 'X') || isVFFrozenOnly) {\n var bIndex = args.virtualInfo.blockIndexes;\n var page = args.virtualInfo.page;\n args.virtualInfo.blockIndexes = [1, 2];\n if (isVFFrozenOnly) {\n args.virtualInfo.page = 1;\n }\n var data = isVFFrozenOnly ? this.initialPageRecords : dataSource;\n var mhdrData = this.vgenerator\n .generateRows(data, args);\n mhdrData.splice(this.parent.frozenRows);\n for (var i = 0; i < this.parent.frozenRows; i++) {\n mhdrData[i].cells.splice(0, this.parent.getFrozenColumns());\n tr = row.render(mhdrData[i], columns);\n hdrfrag.appendChild(tr);\n }\n args.virtualInfo.blockIndexes = bIndex;\n args.virtualInfo.page = page;\n if (isVFFrozenOnly && args.virtualInfo.page === 1) {\n modelData.splice(0, this.parent.frozenRows);\n }\n }\n this.virtualFrozenHdrRefresh(hdrfrag, modelData, row, args, dataSource, columns);\n for (var i = startIndex, len = modelData.length; i < len; i++) {\n this.rows.push(modelData[i]);\n if (this.parent.groupSettings.enableLazyLoading && !this.useGroupCache && this.parent.groupSettings.columns.length) {\n this.setRowsInLazyGroup(modelData[i], i);\n if (isNullOrUndefined(modelData[i].indent)) {\n continue;\n }\n }\n this.setInfiniteVisibleRows(args, modelData[i], tableName);\n if (isGroupAdaptive(gObj) && this.rows.length >= (gObj.pageSettings.pageSize) && blockLoad) {\n break;\n }\n if (!gObj.rowTemplate) {\n tr = row.render(modelData[i], columns);\n var isVFreorder = this.ensureFrozenHeaderRender(args);\n if (gObj.frozenRows && i < gObj.frozenRows && !isInfiniteScroll && args.requestType !== 'virtualscroll' && isVFreorder\n && this.ensureVirtualFrozenHeaderRender(args)) {\n hdrfrag.appendChild(tr);\n }\n else {\n frag.appendChild(tr);\n }\n if (modelData[i].isExpand) {\n gObj.notify(events.expandChildGrid, tr.cells[gObj.groupSettings.columns.length]);\n }\n }\n else {\n var rowTemplateID = gObj.element.id + 'rowTemplate';\n var elements = void 0;\n if (gObj.isReact) {\n var isHeader = gObj.frozenRows && i < gObj.frozenRows;\n var copied = extend({ index: i }, dataSource[i]);\n gObj.getRowTemplate()(copied, gObj, 'rowTemplate', rowTemplateID, null, null, isHeader ? hdrfrag : frag);\n gObj.renderTemplates();\n }\n else {\n elements = gObj.getRowTemplate()(extend({ index: i }, dataSource[i]), gObj, 'rowTemplate', rowTemplateID);\n }\n if (!gObj.isReact && elements[0].tagName === 'TBODY') {\n for (var j = 0; j < elements.length; j++) {\n var isTR = elements[j].nodeName.toLowerCase() === 'tr';\n if (isTR || (elements[j].querySelectorAll && elements[j].querySelectorAll('tr').length)) {\n tr = isTR ? elements[j] : elements[j].querySelector('tr');\n }\n }\n if (gObj.frozenRows && i < gObj.frozenRows) {\n hdrfrag.appendChild(tr);\n }\n else {\n frag.appendChild(tr);\n }\n }\n else {\n if (gObj.frozenRows && i < gObj.frozenRows) {\n tr = !gObj.isReact ? appendChildren(hdrfrag, elements) : hdrfrag.lastElementChild;\n }\n else {\n // frag.appendChild(tr);\n if (!gObj.isReact) {\n tr = appendChildren(frag, elements);\n }\n trElement = gObj.isReact ? frag.lastElementChild : tr.lastElementChild;\n }\n }\n var arg = { data: modelData[i].data, row: trElement ? trElement : tr };\n this.parent.trigger(events.rowDataBound, arg);\n }\n if (modelData[i].isDataRow) {\n this.rowElements.push(tr);\n }\n this.ariaService.setOptions(this.getTable(), { colcount: gObj.getColumns().length.toString() });\n }\n if (isFrozenGrid) {\n contentModule.splitRows(tableName);\n }\n if ((gObj.frozenRows && args.requestType !== 'virtualscroll' && !isInfiniteScroll && this.ensureVirtualFrozenHeaderRender(args))\n || (args.requestType === 'virtualscroll' && args.virtualInfo.sentinelInfo && args.virtualInfo.sentinelInfo.axis === 'X')) {\n hdrTbody = isFrozenGrid ? contentModule.getFrozenHeader(tableName) : gObj.getHeaderTable().querySelector('tbody');\n if (isReact) {\n var parentTable = hdrTbody.parentElement;\n remove(hdrTbody);\n parentTable.appendChild(hdrfrag);\n }\n else {\n hdrTbody.innerHTML = '';\n hdrTbody.appendChild(hdrfrag);\n }\n }\n if (!gObj.enableVirtualization && gObj.frozenRows && idx === 0 && cont.offsetHeight === Number(gObj.height)) {\n cont.style.height = (cont.offsetHeight - hdrTbody.offsetHeight) + 'px';\n }\n if (!isBlazor() || this.parent.isJsComponent) {\n args.rows = this.rows.slice(0);\n }\n if (isFrozenGrid) {\n contentModule.setIsFrozen(args, tableName);\n }\n this.index = idx;\n getUpdateUsingRaf(function () {\n _this.parent.notify(events.beforeFragAppend, args);\n var isVFTable = _this.parent.enableVirtualization && _this.parent.isFrozenGrid();\n if (!_this.parent.enableVirtualization && !isInfiniteScroll) {\n if (_this.parent.isFrozenGrid()) {\n remove(tbdy);\n tbdy = _this.parent.createElement('tbody');\n }\n else {\n remove(_this.tbody);\n _this.tbody = _this.parent.createElement('tbody');\n }\n }\n if (isFrozenGrid && !isVFTable && !_this.parent.enableInfiniteScrolling) {\n _this.appendContent(tbdy, frag, args, tableName);\n }\n else {\n if (gObj.rowTemplate) {\n updateBlazorTemplate(gObj.element.id + 'rowTemplate', 'RowTemplate', gObj);\n }\n if (isVFTable) {\n if (args.renderFrozenRightContent) {\n var frCont = gObj.getContent().querySelector('.e-frozen-right-content').querySelector('tbody');\n _this.appendContent(frCont, frag, args);\n }\n else if (!args.renderMovableContent) {\n _this.appendContent(fCont.querySelector('tbody'), frag, args);\n }\n else {\n _this.appendContent(mCont.querySelector('tbody'), frag, args);\n args.renderMovableContent = false;\n }\n if (!_this.parent.getFrozenColumns()) {\n contentModule.renderNextFrozentPart(args, tableName);\n }\n }\n else {\n if (!isNullOrUndefined(_this.parent.infiniteScrollModule) && _this.parent.enableInfiniteScrolling) {\n _this.isAddRows = false;\n _this.parent.notify(events.removeInfiniteRows, { args: args });\n _this.parent.notify(events.appendInfiniteContent, {\n tbody: tbdy ? tbdy : _this.tbody, frag: frag, args: args, rows: _this.rows,\n rowElements: _this.rowElements, visibleRows: _this.visibleRows,\n tableName: tableName\n });\n if (!frzCols && isFrozenGrid) {\n if ((gObj.getFrozenMode() !== 'Left-Right'\n && (tableName === 'frozen-left' || tableName === 'frozen-right'))\n || (gObj.getFrozenMode() === 'Left-Right'\n && (tableName === 'frozen-left' || tableName === 'movable'))) {\n _this.refreshContentRows(extend({}, args));\n }\n }\n }\n else {\n _this.useGroupCache = false;\n _this.appendContent(_this.tbody, frag, args);\n }\n }\n }\n if (frzCols) {\n contentModule.renderNextFrozentPart(args, tableName);\n }\n frag = null;\n }, this.rafCallback(extend({}, args)));\n };\n ContentRender.prototype.emptyVcRows = function () {\n this.parent.vcRows = [];\n this.parent.vRows = [];\n };\n ContentRender.prototype.appendContent = function (tbody, frag, args, tableName) {\n var isReact = this.parent.isReact && !isNullOrUndefined(this.parent.rowTemplate);\n if (isReact) {\n this.getTable().appendChild(frag);\n }\n else {\n tbody.appendChild(frag);\n this.getTable().appendChild(tbody);\n }\n };\n ContentRender.prototype.setRowsInLazyGroup = function (row, index) {\n if (this.parent.groupSettings.enableLazyLoading && !this.useGroupCache && this.parent.groupSettings.columns.length) {\n this.parent.contentModule.maintainRows(row, index);\n }\n };\n ContentRender.prototype.setGroupCache = function (data, args) {\n if (!this.useGroupCache && this.parent.groupSettings.enableLazyLoading) {\n this.parent.notify(events.setGroupCache, { args: args, data: data });\n }\n };\n ContentRender.prototype.ensureFrozenHeaderRender = function (args) {\n return !((this.parent.enableVirtualization\n && (args.requestType === 'reorder' || args.requestType === 'refresh')) || (this.parent.infiniteScrollSettings.enableCache\n && this.parent.frozenRows && this.parent.infiniteScrollModule.requestType === 'delete'\n && this.parent.pageSettings.currentPage !== 1));\n };\n ContentRender.prototype.ensureVirtualFrozenHeaderRender = function (args) {\n return !(this.parent.enableVirtualization && args.requestType === 'delete');\n };\n ContentRender.prototype.checkCache = function (modelData, args) {\n if (this.parent.infiniteScrollSettings.enableCache && args.requestType === 'infiniteScroll') {\n var index = args.isFrozen ? 1 : 0;\n var frozenCols = this.parent.isFrozenGrid();\n this.isAddRows = !isNullOrUndefined(this.infiniteCache[this.parent.pageSettings.currentPage]);\n if (frozenCols && !isNullOrUndefined(this.infiniteCache[this.parent.pageSettings.currentPage])) {\n this.isAddRows = this.infiniteCache[this.parent.pageSettings.currentPage][index].length !== 0;\n }\n if (this.isAddRows) {\n var data = !frozenCols ? this.infiniteCache[this.parent.pageSettings.currentPage]\n : this.infiniteCache[this.parent.pageSettings.currentPage][index];\n modelData = this.parent.pageSettings.currentPage === 1 ? data.slice(this.parent.frozenRows) : data;\n }\n return modelData;\n }\n if (this.parent.groupSettings.enableLazyLoading && this.parent.groupSettings.columns.length &&\n (args.requestType === 'paging' || args.requestType === 'columnstate' || args.requestType === 'reorder')\n && this.parent.contentModule.getGroupCache()[this.parent.pageSettings.currentPage]) {\n this.useGroupCache = true;\n return this.parent.contentModule.initialGroupRows(args.requestType === 'reorder');\n }\n return null;\n };\n ContentRender.prototype.setInfiniteVisibleRows = function (args, data, tableName) {\n var frozenCols = this.parent.isFrozenGrid();\n if (this.parent.enableInfiniteScrolling && !this.parent.infiniteScrollSettings.enableCache) {\n if (frozenCols) {\n if (tableName === 'frozen-left' || (this.parent.getFrozenMode() === 'Right' && tableName === 'frozen-right')) {\n this.visibleFrozenRows.push(data);\n }\n else if (tableName === 'movable') {\n this.visibleRows.push(data);\n }\n else {\n this.rightFreezeRows.push(data);\n }\n }\n else if (!this.parent.infiniteScrollSettings.enableCache) {\n this.visibleRows.push(data);\n }\n }\n };\n ContentRender.prototype.getCurrentBlockInfiniteRecords = function (isFreeze) {\n var data = [];\n if (this.parent.infiniteScrollSettings.enableCache) {\n if (!Object.keys(this.infiniteCache).length) {\n return [];\n }\n var frozenCols = this.parent.isFrozenGrid();\n var rows = this.parent.getRows();\n var index = parseInt(rows[this.parent.frozenRows].getAttribute('aria-rowindex'), 10);\n var first = Math.ceil((index + 1) / this.parent.pageSettings.pageSize);\n index = parseInt(rows[rows.length - 1].getAttribute('aria-rowindex'), 10);\n var last = Math.ceil(index / this.parent.pageSettings.pageSize);\n if (frozenCols) {\n var idx = isFreeze ? 0 : 1;\n for (var i = first; i <= last; i++) {\n data = !data.length ? this.infiniteCache[i][idx]\n : data.concat(this.infiniteCache[i][idx]);\n }\n if (this.parent.frozenRows && this.parent.pageSettings.currentPage > 1) {\n data = this.infiniteCache[1][idx].slice(0, this.parent.frozenRows).concat(data);\n }\n }\n else {\n for (var i = first; i <= last; i++) {\n data = !data.length ? this.infiniteCache[i] : data.concat(this.infiniteCache[i]);\n }\n if (this.parent.frozenRows && this.parent.pageSettings.currentPage > 1) {\n data = this.infiniteCache[1].slice(0, this.parent.frozenRows).concat(data);\n }\n }\n }\n return data;\n };\n ContentRender.prototype.getReorderedVFRows = function (args) {\n return this.parent.contentModule.getReorderedFrozenRows(args);\n };\n ContentRender.prototype.getReorderedRows = function (args) {\n return this.parent.contentModule.getReorderedFrozenRows(args);\n };\n ContentRender.prototype.virtualFrozenHdrRefresh = function (hdrfrag, modelData, row, args, dataSource, columns) {\n if (this.parent.frozenRows && this.parent.enableVirtualization\n && (args.requestType === 'reorder' || args.requestType === 'refresh')) {\n var tr = void 0;\n var fhdrData = [];\n if (this.parent.isFrozenGrid()) {\n this.currentMovableRows = dataSource;\n fhdrData = this.getReorderedVFRows(args);\n }\n else {\n fhdrData = this.getReorderedRows(args);\n }\n for (var i = 0; i < fhdrData.length; i++) {\n tr = row.render(fhdrData[i], columns);\n hdrfrag.appendChild(tr);\n }\n if (args.virtualInfo.page === 1) {\n modelData.splice(0, this.parent.frozenRows);\n }\n if (args.renderMovableContent) {\n this.parent.currentViewData = this.currentMovableRows;\n this.currentMovableRows = null;\n }\n }\n };\n ContentRender.prototype.getInfiniteRows = function () {\n var rows = [];\n var frozenCols = this.parent.isFrozenGrid();\n if (this.parent.enableInfiniteScrolling) {\n if (this.parent.infiniteScrollSettings.enableCache) {\n var keys = Object.keys(this.infiniteCache);\n for (var i = 0; i < keys.length; i++) {\n rows = !frozenCols ? rows.concat(this.infiniteCache[keys[i]]) : rows.concat(this.infiniteCache[keys[i]][0]);\n }\n }\n else {\n rows = frozenCols ? this.visibleFrozenRows : this.visibleRows;\n }\n }\n return rows;\n };\n ContentRender.prototype.getInfiniteMovableRows = function () {\n var infiniteCacheRows = this.getCurrentBlockInfiniteRecords();\n var infiniteRows = this.parent.enableInfiniteScrolling ? infiniteCacheRows.length ? infiniteCacheRows\n : this.visibleRows : [];\n return infiniteRows;\n };\n /**\n * Get the content div element of grid\n * @return {Element}\n */\n ContentRender.prototype.getPanel = function () {\n return this.contentPanel;\n };\n /**\n * Set the content div element of grid\n * @param {Element} panel\n */\n ContentRender.prototype.setPanel = function (panel) {\n this.contentPanel = panel;\n };\n /**\n * Get the content table element of grid\n * @return {Element}\n */\n ContentRender.prototype.getTable = function () {\n return this.contentTable;\n };\n /**\n * Set the content table element of grid\n * @param {Element} table\n */\n ContentRender.prototype.setTable = function (table) {\n this.contentTable = table;\n };\n /**\n * Get the Row collection in the Grid.\n * @returns {Row[] | HTMLCollectionOf}\n */\n ContentRender.prototype.getRows = function () {\n var infiniteRows = this.getInfiniteRows();\n return infiniteRows.length ? infiniteRows : this.parent.getFrozenColumns() ? this.freezeRows : this.rows;\n };\n /**\n * Get the Movable Row collection in the Freeze pane Grid.\n * @returns {Row[] | HTMLCollectionOf}\n */\n ContentRender.prototype.getMovableRows = function () {\n var infiniteRows = this.getInfiniteMovableRows();\n return infiniteRows.length ? infiniteRows : this.movableRows;\n };\n /**\n * Get the content table data row elements\n * @return {Element}\n */\n ContentRender.prototype.getRowElements = function () {\n return this.parent.getFrozenColumns() ? this.freezeRowElements : this.rowElements;\n };\n /**\n * Get the Freeze pane movable content table data row elements\n * @return {Element}\n */\n ContentRender.prototype.getMovableRowElements = function () {\n return this.rowElements;\n };\n /**\n * Get the content table data row elements\n * @return {Element}\n */\n ContentRender.prototype.setRowElements = function (elements) {\n this.rowElements = elements;\n };\n /**\n * Get the header colgroup element\n * @returns {Element}\n */\n ContentRender.prototype.getColGroup = function () {\n return this.colgroup;\n };\n /**\n * Set the header colgroup element\n * @param {Element} colgroup\n * @returns {Element}\n */\n ContentRender.prototype.setColGroup = function (colGroup) {\n if (!isNullOrUndefined(colGroup)) {\n colGroup.id = 'content-' + colGroup.id;\n }\n return this.colgroup = colGroup;\n };\n /**\n * Function to hide content table column based on visible property\n * @param {Column[]} columns?\n */\n ContentRender.prototype.setVisible = function (columns) {\n var gObj = this.parent;\n if (isBlazor() && gObj.isServerRendered) {\n this.parent.notify('setvisibility', columns);\n }\n var isFrozenGrid = this.parent.isFrozenGrid();\n var frzCols = gObj.getFrozenColumns();\n var rows = [];\n if (isFrozenGrid) {\n var fRows = this.freezeRows;\n var mRows = this.movableRows;\n var rowLen = fRows.length;\n var cellLen = void 0;\n var rightRows = [];\n if (gObj.getFrozenMode() === 'Left-Right') {\n rightRows = gObj.getFrozenRightRowsObject();\n }\n for (var i = 0, row = void 0; i < rowLen; i++) {\n cellLen = mRows[i].cells.length;\n var rightLen = rightRows.length ? rightRows[i].cells.length : 0;\n row = fRows[i].clone();\n for (var j = 0; j < cellLen; j++) {\n row.cells.push(mRows[i].cells[j]);\n }\n for (var k = 0; k < rightLen; k++) {\n row.cells.push(rightRows[i].cells[k]);\n }\n rows.push(row);\n }\n }\n else {\n rows = this.getRows();\n }\n var element;\n var testRow;\n rows.some(function (r) { if (r.isDataRow) {\n testRow = r;\n } return r.isDataRow; });\n var tasks = [];\n var needFullRefresh = true;\n if (!gObj.groupSettings.columns.length && testRow) {\n needFullRefresh = false;\n }\n var tr = gObj.getDataRows();\n var args = {};\n var infiniteData = this.infiniteRowVisibility();\n var contentrows = infiniteData ? infiniteData\n : this.rows.filter(function (row) { return !row.isDetailRow; });\n for (var c = 0, clen = columns.length; c < clen; c++) {\n var column = columns[c];\n var idx = this.parent.getNormalizedColumnIndex(column.uid);\n var colIdx = this.parent.getColumnIndexByUid(column.uid);\n var displayVal = column.visible === true ? '' : 'none';\n if (idx !== -1 && testRow && idx < testRow.cells.length) {\n if (isFrozenGrid) {\n if (column.getFreezeTableName() !== 'movable') {\n if (column.getFreezeTableName() === 'frozen-right') {\n var left = this.parent.getFrozenLeftColumnsCount();\n var movable = this.parent.getMovableColumnsCount();\n colIdx = idx = idx - (left + movable);\n var colG = this.parent.getContent().querySelector('.e-frozen-right-content').querySelector('colgroup');\n setStyleAttribute(colG.childNodes[idx], { 'display': displayVal });\n contentrows = gObj.getFrozenRightRowsObject();\n tr = gObj.getFrozenRightDataRows();\n }\n else {\n setStyleAttribute(this.getColGroup().childNodes[idx], { 'display': displayVal });\n var infiniteFreezeData = this.infiniteRowVisibility(true);\n contentrows = infiniteFreezeData ? infiniteFreezeData : this.freezeRows;\n tr = gObj.getDataRows();\n }\n }\n else {\n var mTable = gObj.getContent().querySelector('.e-movablecontent').querySelector('colgroup');\n colIdx = idx = idx - frzCols - this.parent.getFrozenLeftColumnsCount();\n setStyleAttribute(mTable.childNodes[idx], { 'display': displayVal });\n tr = gObj.getMovableDataRows();\n var infiniteMovableData = this.infiniteRowVisibility();\n contentrows = infiniteMovableData ? infiniteMovableData : this.movableRows;\n }\n }\n else {\n setStyleAttribute(this.getColGroup().childNodes[idx], { 'display': displayVal });\n }\n }\n if (!needFullRefresh) {\n this.setDisplayNone(tr, colIdx, displayVal, contentrows);\n }\n if (!this.parent.invokedFromMedia && column.hideAtMedia) {\n this.parent.updateMediaColumns(column);\n }\n this.parent.invokedFromMedia = false;\n }\n if (needFullRefresh) {\n this.refreshContentRows({ requestType: 'refresh' });\n }\n else {\n if (!this.parent.getFrozenColumns()) {\n this.parent.notify(events.partialRefresh, { rows: contentrows, args: args });\n }\n else {\n this.parent.notify(events.partialRefresh, { rows: this.freezeRows, args: { isFrozen: true, rows: this.freezeRows } });\n this.parent.notify(events.partialRefresh, { rows: this.movableRows, args: { isFrozen: false, rows: this.movableRows } });\n }\n }\n };\n /**\n * @hidden\n */\n ContentRender.prototype.setDisplayNone = function (tr, idx, displayVal, rows) {\n var trs = Object.keys(tr);\n for (var i = 0; i < trs.length; i++) {\n var td = tr[trs[i]].querySelectorAll('td.e-rowcell')[idx];\n if (tr[trs[i]].querySelectorAll('td.e-rowcell').length && td) {\n setStyleAttribute(tr[trs[i]].querySelectorAll('td.e-rowcell')[idx], { 'display': displayVal });\n if (tr[trs[i]].querySelectorAll('td.e-rowcell')[idx].classList.contains('e-hide')) {\n removeClass([tr[trs[i]].querySelectorAll('td.e-rowcell')[idx]], ['e-hide']);\n }\n if (this.parent.isRowDragable()) {\n var index = this.parent.getFrozenColumns() ? idx : idx + 1;\n rows[trs[i]].cells[index].visible = displayVal === '' ? true : false;\n }\n else {\n rows[trs[i]].cells[idx].visible = displayVal === '' ? true : false;\n }\n }\n }\n this.parent.notify(events.infiniteShowHide, { visible: displayVal, index: idx, isFreeze: this.isInfiniteFreeze });\n };\n ContentRender.prototype.infiniteRowVisibility = function (isFreeze) {\n var infiniteData;\n if (this.parent.enableInfiniteScrolling) {\n this.isInfiniteFreeze = isFreeze;\n if (this.parent.infiniteScrollSettings.enableCache) {\n infiniteData = isFreeze ? this.getCurrentBlockInfiniteRecords(true) : this.getCurrentBlockInfiniteRecords();\n }\n else {\n infiniteData = isFreeze ? this.visibleFrozenRows : this.visibleRows;\n }\n }\n return infiniteData;\n };\n ContentRender.prototype.colGroupRefresh = function () {\n if (this.getColGroup()) {\n var colGroup = void 0;\n if (this.parent.enableColumnVirtualization && this.parent.getFrozenColumns()\n && this.parent.contentModule.isXaxis()) {\n colGroup = this.parent.getMovableVirtualHeader().querySelector('colgroup').cloneNode(true);\n }\n else {\n colGroup = this.getHeaderColGroup();\n }\n this.getTable().replaceChild(colGroup, this.getColGroup());\n this.setColGroup(colGroup);\n }\n };\n ContentRender.prototype.getHeaderColGroup = function () {\n return isBlazor() ? this.parent.getHeaderTable().querySelector('colgroup').cloneNode(true) :\n this.parent.element.querySelector('.e-gridheader').querySelector('colgroup').cloneNode(true);\n };\n ContentRender.prototype.initializeContentDrop = function () {\n var gObj = this.parent;\n this.droppable = new Droppable(gObj.element, {\n accept: '.e-dragclone',\n drop: this.drop\n });\n };\n ContentRender.prototype.droppableDestroy = function () {\n if (this.droppable && !this.droppable.isDestroyed) {\n this.droppable.destroy();\n }\n };\n ContentRender.prototype.canSkip = function (column, row, index) {\n /**\n * Skip the toggle visiblity operation when one of the following success\n * 1. Grid has empty records\n * 2. column visible property is unchanged\n * 3. cell`s isVisible property is same as column`s visible property.\n */\n return isNullOrUndefined(row) || //(1)\n isNullOrUndefined(column.visible) || //(2) \n row.cells[index].visible === column.visible; //(3)\n };\n ContentRender.prototype.getModelGenerator = function () {\n return this.generator = this.parent.allowGrouping ? new GroupModelGenerator(this.parent) : new RowModelGenerator(this.parent);\n };\n ContentRender.prototype.renderEmpty = function (tbody) {\n if (isBlazor() && !this.parent.isJsComponent && this.parent.frozenRows) {\n return;\n }\n this.getTable().appendChild(tbody);\n if (this.parent.frozenRows) {\n this.parent.getHeaderContent().querySelector('tbody').innerHTML = '';\n }\n };\n ContentRender.prototype.setSelection = function (uid, set, clearAll) {\n this.parent.notify(events.setFreezeSelection, { uid: uid, set: set, clearAll: clearAll });\n var isFrozen = this.parent.isFrozenGrid();\n if (isFrozen && this.parent.enableVirtualization) {\n return;\n }\n if (isFrozen) {\n var rows = this.getMovableRows().filter(function (row) { return clearAll || uid === row.uid; });\n for (var i = 0; i < rows.length; i++) {\n rows[i].isSelected = set;\n }\n }\n var row = this.getRows().filter(function (row) { return clearAll || uid === row.uid; });\n for (var j = 0; j < row.length; j++) {\n row[j].isSelected = set;\n var cells = row[j].cells;\n for (var k = 0; k < cells.length; k++) {\n cells[k].isSelected = set;\n }\n }\n };\n ContentRender.prototype.getRowByIndex = function (index) {\n index = this.getInfiniteRowIndex(index);\n return this.parent.getDataRows()[index];\n };\n ContentRender.prototype.getInfiniteRowIndex = function (index) {\n if (this.parent.infiniteScrollSettings.enableCache) {\n var fRows = this.parent.frozenRows;\n var idx = fRows > index ? 0 : fRows;\n var firstRowIndex = parseInt(this.parent.getRows()[idx].getAttribute('aria-rowindex'), 10);\n index = fRows > index ? index : (index - firstRowIndex) + fRows;\n }\n return index;\n };\n ContentRender.prototype.getVirtualRowIndex = function (index) {\n return index;\n };\n ContentRender.prototype.getMovableRowByIndex = function (index) {\n index = this.getInfiniteRowIndex(index);\n return this.parent.getMovableDataRows()[index];\n };\n ContentRender.prototype.enableAfterRender = function (e) {\n if (e.module === 'group' && e.enable) {\n this.generator = this.getModelGenerator();\n }\n };\n ContentRender.prototype.setRowObjects = function (rows) {\n this.rows = rows;\n };\n /** @hidden */\n ContentRender.prototype.immutableModeRendering = function (args) {\n var _this = this;\n if (args === void 0) { args = {}; }\n var gObj = this.parent;\n gObj.hideSpinner();\n var key = gObj.getPrimaryKeyFieldNames()[0];\n var oldKeys = {};\n var newKeys = {};\n var newRowObjs = [];\n var oldIndexes = {};\n var oldRowObjs = gObj.getRowsObject().slice();\n var batchChangeKeys = this.getBatchEditedRecords(key, oldRowObjs);\n var newIndexes = {};\n var hasBatch = Object.keys(batchChangeKeys).length !== 0;\n if (gObj.getContent().querySelector('.e-emptyrow') || args.requestType === 'reorder'\n || this.parent.groupSettings.columns.length) {\n this.refreshContentRows(args);\n }\n else {\n if (gObj.currentViewData.length === 0) {\n return;\n }\n var oldRowElements = {};\n var tbody = gObj.createElement('tbody');\n var dataSource = gObj.currentViewData;\n var trs = [].slice.call(this.getTable().querySelector('tbody').children);\n if (this.prevCurrentView.length) {\n var prevLen = this.prevCurrentView.length;\n var currentLen = dataSource.length;\n if (prevLen === currentLen) {\n for (var i = 0; i < currentLen; i++) {\n if (this.parent.editSettings.mode === 'Batch'\n && trs[i].classList.contains('e-insertedrow')) {\n trs.splice(i, 1);\n --i;\n continue;\n }\n newKeys[dataSource[i][key]] = oldKeys[this.prevCurrentView[i][key]] = i;\n newIndexes[i] = dataSource[i][key];\n oldRowElements[oldRowObjs[i].uid] = trs[i];\n oldIndexes[i] = this.prevCurrentView[i][key];\n }\n }\n else {\n for (var i = 0; i < currentLen; i++) {\n newKeys[dataSource[i][key]] = i;\n newIndexes[i] = dataSource[i][key];\n }\n for (var i = 0; i < prevLen; i++) {\n if (this.parent.editSettings.mode === 'Batch'\n && trs[i].classList.contains('e-insertedrow')) {\n trs.splice(i, 1);\n --i;\n continue;\n }\n oldRowElements[oldRowObjs[i].uid] = trs[i];\n oldKeys[this.prevCurrentView[i][key]] = i;\n oldIndexes[i] = this.prevCurrentView[i][key];\n }\n }\n }\n for (var i = 0; i < dataSource.length; i++) {\n var oldIndex = oldKeys[dataSource[i][key]];\n if (!isNullOrUndefined(oldIndex)) {\n var isEqual = false;\n if (this.mutableData) {\n isEqual = this.objectEqualityChecker(this.prevCurrentView[i], dataSource[i]);\n }\n var tr = oldRowElements[oldRowObjs[oldIndex].uid];\n newRowObjs.push(oldRowObjs[oldIndex]);\n if (this.rowElements[i] && this.rowElements[i].getAttribute('data-uid') === newRowObjs[i].uid\n && ((hasBatch && isNullOrUndefined(batchChangeKeys[newIndexes[i]]))\n || (!hasBatch && (isEqual || this.prevCurrentView[i] === dataSource[i])))) {\n if (oldIndex !== i) {\n this.refreshImmutableContent(i, tr, newRowObjs[i]);\n }\n tbody.appendChild(tr);\n continue;\n }\n if ((hasBatch && !isNullOrUndefined(batchChangeKeys[newIndexes[i]]))\n || (!this.mutableData && dataSource[i] !== this.prevCurrentView[oldIndex])\n || (this.mutableData && !isEqual)) {\n oldRowObjs[oldIndex].setRowValue(dataSource[i]);\n }\n tbody.appendChild(tr);\n this.refreshImmutableContent(i, tr, newRowObjs[i]);\n }\n else {\n var row = new RowRenderer(this.serviceLocator, null, gObj);\n var modelData = this.generator.generateRows([dataSource[i]]);\n newRowObjs.push(modelData[0]);\n var tr = row.render(modelData[0], gObj.getColumns());\n tbody.appendChild(tr);\n this.refreshImmutableContent(i, tr, newRowObjs[i]);\n }\n }\n this.rows = newRowObjs;\n this.rowElements = [].slice.call(tbody.children);\n remove(this.getTable().querySelector('tbody'));\n this.getTable().appendChild(tbody);\n this.parent.trigger(events.dataBound, {}, function () {\n if (_this.parent.allowTextWrap) {\n _this.parent.notify(events.freezeRender, { case: 'textwrap' });\n }\n });\n if (args) {\n var action = (args.requestType || '').toLowerCase() + '-complete';\n this.parent.notify(action, args);\n }\n }\n };\n /** @hidden */\n ContentRender.prototype.objectEqualityChecker = function (old, next) {\n var keys = Object.keys(old);\n var isEqual = true;\n for (var i = 0; i < keys.length; i++) {\n if (old[keys[i]] !== next[keys[i]]) {\n isEqual = false;\n break;\n }\n }\n return isEqual;\n };\n ContentRender.prototype.getBatchEditedRecords = function (primaryKey, rows) {\n var keys = {};\n var changes = this.parent.getBatchChanges();\n var changedRecords = [];\n var addedRecords = [];\n if (Object.keys(changes).length) {\n changedRecords = changes.changedRecords;\n addedRecords = changes.addedRecords;\n }\n var args = { cancel: false };\n this.parent.notify(events.immutableBatchCancel, { rows: rows, args: args });\n if (addedRecords.length) {\n if (this.parent.editSettings.newRowPosition === 'Bottom') {\n rows.splice(rows.length - 1, addedRecords.length);\n }\n else {\n if (!args.cancel) {\n rows.splice(0, addedRecords.length);\n }\n }\n }\n for (var i = 0; i < changedRecords.length; i++) {\n keys[changedRecords[i][primaryKey]] = i;\n }\n return keys;\n };\n ContentRender.prototype.refreshImmutableContent = function (index, tr, row) {\n row.isAltRow = this.parent.enableAltRow ? index % 2 !== 0 : false;\n row.isAltRow ? tr.classList.add('e-altrow') : tr.classList.remove('e-altrow');\n row.index = index;\n row.edit = undefined;\n row.isDirty = false;\n tr.setAttribute('aria-rowindex', index.toString());\n this.updateCellIndex(tr, index);\n };\n ContentRender.prototype.updateCellIndex = function (rowEle, index) {\n for (var i = 0; i < rowEle.cells.length; i++) {\n rowEle.cells[i].setAttribute('index', index.toString());\n }\n };\n return ContentRender;\n}());\nexport { ContentRender };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Row } from '../models/row';\nimport { isNullOrUndefined, extend, setValue, isBlazor } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport { RowModelGenerator } from '../services/row-model-generator';\nimport { GroupSummaryModelGenerator, CaptionSummaryModelGenerator } from '../services/summary-model-generator';\nimport { getForeignData, getUid } from '../../grid/base/util';\n/**\n * GroupModelGenerator is used to generate group caption rows and data rows.\n * @hidden\n */\nvar GroupModelGenerator = /** @class */ (function (_super) {\n __extends(GroupModelGenerator, _super);\n function GroupModelGenerator(parent) {\n var _this = _super.call(this, parent) || this;\n _this.rows = [];\n /** @hidden */\n _this.index = 0;\n _this.parent = parent;\n _this.summaryModelGen = new GroupSummaryModelGenerator(parent);\n _this.captionModelGen = new CaptionSummaryModelGenerator(parent);\n return _this;\n }\n GroupModelGenerator.prototype.generateRows = function (data, args) {\n if (this.parent.groupSettings.columns.length === 0) {\n return _super.prototype.generateRows.call(this, data, args);\n }\n this.isInfiniteScroll = (args.requestType === 'infiniteScroll');\n this.rows = [];\n this.index = this.parent.enableVirtualization || this.isInfiniteScroll ? args.startIndex : 0;\n for (var i = 0, len = data.length; i < len; i++) {\n this.getGroupedRecords(0, data[i], data.level, i, undefined, this.rows.length);\n }\n this.index = 0;\n if (this.parent.isCollapseStateEnabled()) {\n this.ensureRowVisibility();\n }\n return this.rows;\n };\n GroupModelGenerator.prototype.getGroupedRecords = function (index, data, raw, parentid, childId, tIndex, parentUid) {\n var _a;\n var isRenderCaption = this.isInfiniteScroll && this.prevKey === data.key;\n var level = raw;\n if (isNullOrUndefined(data.items)) {\n if (isNullOrUndefined(data.GroupGuid)) {\n this.rows = this.rows.concat(this.generateDataRows(data, index, parentid, this.rows.length, parentUid));\n }\n else {\n for (var j = 0, len = data.length; j < len; j++) {\n this.getGroupedRecords(index, data[j], data.level, parentid, index, this.rows.length, parentUid);\n }\n }\n }\n else {\n var captionRow = this.generateCaptionRow(data, index, parentid, childId, tIndex, parentUid);\n if (!isRenderCaption) {\n this.rows = this.rows.concat(captionRow);\n }\n if (data.items && data.items.length) {\n this.getGroupedRecords(index + 1, data.items, data.items.level, parentid, index + 1, this.rows.length, captionRow.uid);\n }\n if (this.parent.aggregates.length) {\n var rowCnt = this.rows.length;\n (_a = this.rows).push.apply(_a, this.summaryModelGen.generateRows(data, { level: level, parentUid: captionRow.uid }));\n for (var i = rowCnt - 1; i >= 0; i--) {\n if (this.rows[i].isCaptionRow) {\n this.rows[i].aggregatesCount = this.rows.length - rowCnt;\n }\n else if (!this.rows[i].isCaptionRow && !this.rows[i].isDataRow) {\n break;\n }\n }\n }\n }\n this.prevKey = data.key;\n };\n GroupModelGenerator.prototype.getCaptionRowCells = function (field, indent, data) {\n var cells = [];\n var visibles = [];\n var column = this.parent.getColumnByField(field);\n var indexes = this.parent.getColumnIndexesInView();\n if (this.parent.enableColumnVirtualization) {\n column = this.parent.columns.filter(function (c) { return c.field === field; })[0];\n }\n var groupedLen = this.parent.groupSettings.columns.length;\n var gObj = this.parent;\n if (!this.parent.enableColumnVirtualization || indexes.indexOf(indent) !== -1) {\n for (var i = 0; i < indent; i++) {\n cells.push(this.generateIndentCell());\n }\n cells.push(this.generateCell({}, null, CellType.Expand));\n }\n indent = this.parent.enableColumnVirtualization ? 1 :\n (this.parent.getVisibleColumns().length + groupedLen + (gObj.detailTemplate || gObj.childGrid ? 1 : 0) -\n indent + (this.parent.getVisibleColumns().length ? -1 : 0));\n //Captionsummary cells will be added here. \n if (this.parent.aggregates.length && !this.captionModelGen.isEmpty()) {\n var captionCells = this.captionModelGen.generateRows(data)[0];\n extend(data, captionCells.data);\n var cIndex_1 = 0;\n captionCells.cells.some(function (cell, index) { cIndex_1 = index; return cell.visible && cell.isDataCell; });\n visibles = captionCells.cells.slice(cIndex_1).filter(function (cell) { return cell.visible; });\n if (captionCells.visible && visibles[0].column.field === this.parent.getVisibleColumns()[0].field) {\n visibles = visibles.slice(1);\n }\n if (this.parent.getVisibleColumns().length === 1) {\n visibles = [];\n }\n indent = indent - visibles.length;\n }\n var cols = (!this.parent.enableColumnVirtualization ? [column] : this.parent.getColumns());\n var wFlag = true;\n for (var j = 0; j < cols.length; j++) {\n var tmpFlag = wFlag && indexes.indexOf(indent) !== -1;\n if (tmpFlag) {\n wFlag = false;\n }\n var cellType = !this.parent.enableColumnVirtualization || tmpFlag ?\n CellType.GroupCaption : CellType.GroupCaptionEmpty;\n indent = this.parent.enableColumnVirtualization && cellType === CellType.GroupCaption ? indent + groupedLen : indent;\n if (gObj.isRowDragable()) {\n indent++;\n }\n cells.push(this.generateCell(column, null, cellType, indent));\n }\n cells.push.apply(cells, visibles);\n return cells;\n };\n /** @hidden */\n GroupModelGenerator.prototype.generateCaptionRow = function (data, indent, parentID, childID, tIndex, parentUid) {\n var options = {};\n var tmp = [];\n var records = 'records';\n var col = this.parent.getColumnByField(data.field);\n options.data = extend({}, data);\n if (col) {\n options.data.field = data.field;\n }\n options.isDataRow = false;\n options.isExpand = !this.parent.groupSettings.enableLazyLoading && !this.parent.isCollapseStateEnabled();\n options.parentGid = parentID;\n options.childGid = childID;\n options.tIndex = tIndex;\n options.isCaptionRow = true;\n options.parentUid = parentUid;\n options.gSummary = !isNullOrUndefined(data.items[records]) ? data.items[records].length : data.items.length;\n options.uid = isBlazor() && this.parent.isServerRendered ? this.parent.getRowUid('grid-row') : getUid('grid-row');\n var row = new Row(options);\n row.indent = indent;\n this.getForeignKeyData(row);\n row.cells = this.getCaptionRowCells(data.field, indent, row.data);\n return row;\n };\n GroupModelGenerator.prototype.getForeignKeyData = function (row) {\n var data = row.data;\n var col = this.parent.getColumnByField(data.field);\n if (col && col.isForeignColumn && col.isForeignColumn()) {\n var fkValue = (isNullOrUndefined(data.key) ? '' : col.valueAccessor(col.foreignKeyValue, getForeignData(col, {}, data.key)[0], col));\n setValue('foreignKey', fkValue, row.data);\n }\n };\n /** @hidden */\n GroupModelGenerator.prototype.generateDataRows = function (data, indent, childID, tIndex, parentUid) {\n var rows = [];\n var indexes = this.parent.getColumnIndexesInView();\n for (var i = 0, len = data.length; i < len; i++, tIndex++) {\n rows[i] = this.generateRow(data[i], this.index, i ? undefined : 'e-firstchildrow', indent, childID, tIndex, parentUid);\n for (var j = 0; j < indent; j++) {\n if (this.parent.enableColumnVirtualization && indexes.indexOf(indent) === -1) {\n continue;\n }\n rows[i].cells.unshift(this.generateIndentCell());\n }\n this.index++;\n }\n return rows;\n };\n GroupModelGenerator.prototype.generateIndentCell = function () {\n return this.generateCell({}, null, CellType.Indent);\n };\n GroupModelGenerator.prototype.refreshRows = function (input) {\n var indexes = this.parent.getColumnIndexesInView();\n for (var i = 0; i < input.length; i++) {\n if (input[i].isDataRow) {\n input[i].cells = this.generateCells(input[i]);\n for (var j = 0; j < input[i].indent; j++) {\n if (this.parent.enableColumnVirtualization && indexes.indexOf(input[i].indent) === -1) {\n continue;\n }\n input[i].cells.unshift(this.generateIndentCell());\n }\n }\n else {\n var cRow = this.generateCaptionRow(input[i].data, input[i].indent);\n input[i].cells = cRow.cells;\n }\n }\n return input;\n };\n GroupModelGenerator.prototype.ensureRowVisibility = function () {\n for (var i = 0; i < this.rows.length; i++) {\n var row = this.rows[i];\n if (!row.isCaptionRow) {\n continue;\n }\n for (var j = i + 1; j < this.rows.length; j++) {\n var childRow = this.rows[j];\n if (row.uid === childRow.parentUid) {\n this.rows[j].visible = row.isExpand;\n }\n }\n }\n };\n return GroupModelGenerator;\n}(RowModelGenerator));\nexport { GroupModelGenerator };\n","/**\n * Resize library\n */\nimport { isNullOrUndefined as isNOU, createElement, EventHandler, detach, Browser } from '@syncfusion/ej2-base';\nvar elementClass = ['north-west', 'north', 'north-east', 'west', 'east', 'south-west', 'south', 'south-east'];\nvar targetElement;\nvar selectedHandler;\nvar originalWidth = 0;\nvar originalHeight = 0;\nvar originalX = 0;\nvar originalY = 0;\nvar originalMouseX = 0;\nvar originalMouseY = 0;\nvar RESIZE_HANDLER = 'e-resize-handle';\nvar FOCUSED_HANDLER = 'e-focused-handle';\nvar RESTRICT_LEFT = ['e-restrict-left'];\nvar RESIZE_WITHIN_VIEWPORT = 'e-resize-viewport';\nvar minHeight;\nvar maxHeight;\nvar minWidth;\nvar maxWidth;\nvar containerElement;\nvar resizeStart = null;\nvar resize = null;\nvar resizeEnd = null;\nvar resizeWestWidth;\nvar setLeft = true;\nvar previousWidth = 0;\nvar setWidth = true;\n// tslint:disable-next-line\nvar proxy;\nvar dialogBorderResize = ['north', 'west', 'east', 'south'];\nexport function createResize(args) {\n resizeStart = args.resizeBegin;\n resize = args.resizing;\n resizeEnd = args.resizeComplete;\n targetElement = getDOMElement(args.element);\n containerElement = getDOMElement(args.boundary);\n var directions = args.direction.split(' ');\n for (var i = 0; i < directions.length; i++) {\n if (dialogBorderResize.indexOf(directions[i]) >= 0 && directions[i]) {\n setBorderResizeElm(directions[i]);\n }\n else if (directions[i].trim() !== '') {\n var resizeHandler = createElement('div', { className: 'e-icons ' + RESIZE_HANDLER + ' ' + 'e-' + directions[i] });\n targetElement.appendChild(resizeHandler);\n }\n }\n minHeight = args.minHeight;\n minWidth = args.minWidth;\n maxWidth = args.maxWidth;\n maxHeight = args.maxHeight;\n if (args.proxy && args.proxy.element && args.proxy.element.classList.contains('e-dialog')) {\n wireEvents(args.proxy);\n }\n else {\n wireEvents();\n }\n}\nfunction setBorderResizeElm(direction) {\n calculateValues();\n var borderBottom = createElement('span', {\n attrs: {\n 'unselectable': 'on', 'contenteditable': 'false'\n }\n });\n borderBottom.setAttribute('class', 'e-dialog-border-resize e-' + direction);\n if (direction === 'south') {\n borderBottom.style.height = '2px';\n borderBottom.style.width = '100%';\n borderBottom.style.bottom = '0px';\n borderBottom.style.left = '0px';\n }\n if (direction === 'north') {\n borderBottom.style.height = '2px';\n borderBottom.style.width = '100%';\n borderBottom.style.top = '0px';\n borderBottom.style.left = '0px';\n }\n if (direction === 'east') {\n borderBottom.style.height = '100%';\n borderBottom.style.width = '2px';\n borderBottom.style.right = '0px';\n borderBottom.style.top = '0px';\n }\n if (direction === 'west') {\n borderBottom.style.height = '100%';\n borderBottom.style.width = '2px';\n borderBottom.style.left = '0px';\n borderBottom.style.top = '0px';\n }\n targetElement.appendChild(borderBottom);\n}\nfunction getDOMElement(element) {\n var domElement;\n if (!isNOU(element)) {\n if (typeof (element) === 'string') {\n domElement = document.querySelector(element);\n }\n else {\n domElement = element;\n }\n }\n return domElement;\n}\n// tslint:disable-next-line\nfunction wireEvents(args) {\n if (isNOU(args)) {\n args = this;\n }\n var resizers = targetElement.querySelectorAll('.' + RESIZE_HANDLER);\n for (var i = 0; i < resizers.length; i++) {\n selectedHandler = resizers[i];\n EventHandler.add(selectedHandler, 'mousedown', onMouseDown, args);\n var eventName = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';\n EventHandler.add(selectedHandler, eventName, onTouchStart, args);\n }\n var borderResizers = targetElement.querySelectorAll('.e-dialog-border-resize');\n if (!isNOU(borderResizers)) {\n for (var i = 0; i < borderResizers.length; i++) {\n selectedHandler = borderResizers[i];\n EventHandler.add(selectedHandler, 'mousedown', onMouseDown, args);\n var eventName = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';\n EventHandler.add(selectedHandler, eventName, onTouchStart, args);\n }\n }\n}\n/* istanbul ignore next */\nfunction getEventType(e) {\n return (e.indexOf('mouse') > -1) ? 'mouse' : 'touch';\n}\n/* istanbul ignore next */\nfunction onMouseDown(e) {\n e.preventDefault();\n targetElement = e.target.parentElement;\n calculateValues();\n originalMouseX = e.pageX;\n originalMouseY = e.pageY;\n e.target.classList.add(FOCUSED_HANDLER);\n if (!isNOU(resizeStart)) {\n proxy = this;\n if (resizeStart(e, proxy) === true) {\n return;\n }\n }\n var target = (isNOU(containerElement)) ? document : containerElement;\n EventHandler.add(target, 'mousemove', onMouseMove, this);\n EventHandler.add(document, 'mouseup', onMouseUp, this);\n for (var i = 0; i < RESTRICT_LEFT.length; i++) {\n if (targetElement.classList.contains(RESTRICT_LEFT[i])) {\n setLeft = false;\n }\n else {\n setLeft = true;\n }\n }\n}\n/* istanbul ignore next */\nfunction onMouseUp(e) {\n var touchMoveEvent = (Browser.info.name === 'msie') ? 'pointermove' : 'touchmove';\n var touchEndEvent = (Browser.info.name === 'msie') ? 'pointerup' : 'touchend';\n var target = (isNOU(containerElement)) ? document : containerElement;\n EventHandler.remove(target, 'mousemove', onMouseMove);\n EventHandler.remove(target, touchMoveEvent, onMouseMove);\n var eventName = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';\n EventHandler.remove(target, eventName, onMouseMove);\n if (!isNOU(document.body.querySelector('.' + FOCUSED_HANDLER))) {\n document.body.querySelector('.' + FOCUSED_HANDLER).classList.remove(FOCUSED_HANDLER);\n }\n if (!isNOU(resizeEnd)) {\n proxy = this;\n resizeEnd(e, proxy);\n }\n EventHandler.remove(document, 'mouseup', onMouseUp);\n EventHandler.remove(document, touchEndEvent, onMouseUp);\n}\n/* istanbul ignore next */\nfunction calculateValues() {\n originalWidth = parseFloat(getComputedStyle(targetElement, null).getPropertyValue('width').replace('px', ''));\n originalHeight = parseFloat(getComputedStyle(targetElement, null).getPropertyValue('height').replace('px', ''));\n originalX = targetElement.getBoundingClientRect().left;\n originalY = targetElement.getBoundingClientRect().top;\n}\n/* istanbul ignore next */\nfunction onTouchStart(e) {\n targetElement = e.target.parentElement;\n calculateValues();\n var coordinates = e.touches ? e.changedTouches[0] : e;\n originalMouseX = coordinates.pageX;\n originalMouseY = coordinates.pageY;\n if (!isNOU(resizeStart)) {\n proxy = this;\n if (resizeStart(e, proxy) === true) {\n return;\n }\n }\n var touchMoveEvent = (Browser.info.name === 'msie') ? 'pointermove' : 'touchmove';\n var touchEndEvent = (Browser.info.name === 'msie') ? 'pointerup' : 'touchend';\n var target = (isNOU(containerElement)) ? document : containerElement;\n EventHandler.add(target, touchMoveEvent, onMouseMove, this);\n EventHandler.add(document, touchEndEvent, onMouseUp);\n}\n/* istanbul ignore next */\nfunction onMouseMove(e) {\n if (e.target.classList.contains(RESIZE_HANDLER) && e.target.classList.contains(FOCUSED_HANDLER)) {\n selectedHandler = e.target;\n }\n else if (!isNOU(document.body.querySelector('.' + FOCUSED_HANDLER))) {\n selectedHandler = document.body.querySelector('.' + FOCUSED_HANDLER);\n }\n if (!isNOU(selectedHandler)) {\n var resizeTowards = '';\n for (var i = 0; i < elementClass.length; i++) {\n if (selectedHandler.classList.contains('e-' + elementClass[i])) {\n resizeTowards = elementClass[i];\n }\n }\n if (!isNOU(resize)) {\n proxy = this;\n resize(e, proxy);\n }\n switch (resizeTowards) {\n case 'south':\n resizeSouth(e);\n break;\n case 'north':\n resizeNorth(e);\n break;\n case 'west':\n resizeWest(e);\n break;\n case 'east':\n resizeEast(e);\n break;\n case 'south-east':\n resizeSouth(e);\n resizeEast(e);\n break;\n case 'south-west':\n resizeSouth(e);\n resizeWest(e);\n break;\n case 'north-east':\n resizeNorth(e);\n resizeEast(e);\n break;\n case 'north-west':\n resizeNorth(e);\n resizeWest(e);\n break;\n default: break;\n }\n }\n}\n/* istanbul ignore next */\nfunction getClientRectValues(element) {\n return element.getBoundingClientRect();\n}\n/* istanbul ignore next */\n// tslint:disable-next-line\nfunction resizeSouth(e) {\n var documentHeight = document.documentElement.clientHeight;\n var calculateValue = false;\n var containerRectValues;\n var coordinates = e.touches ? e.changedTouches[0] : e;\n var currentpageY = coordinates.pageY;\n var targetRectValues = getClientRectValues(targetElement);\n if (!isNOU(containerElement)) {\n containerRectValues = getClientRectValues(containerElement);\n }\n if (!isNOU(containerElement)) {\n calculateValue = true;\n }\n else if (isNOU(containerElement) && ((documentHeight - currentpageY) >= 0 || (targetRectValues.top < 0))) {\n calculateValue = true;\n }\n var calculatedHeight = originalHeight + (currentpageY - originalMouseY);\n calculatedHeight = (calculatedHeight > minHeight) ? calculatedHeight : minHeight;\n var containerTop = 0;\n if (!isNOU(containerElement)) {\n containerTop = containerRectValues.top;\n }\n var borderValue = isNOU(containerElement) ? 0 : containerElement.offsetHeight - containerElement.clientHeight;\n var topWithoutborder = (targetRectValues.top - containerTop) - (borderValue / 2);\n topWithoutborder = (topWithoutborder < 0) ? 0 : topWithoutborder;\n if (targetRectValues.top > 0 && (topWithoutborder + calculatedHeight) > maxHeight) {\n calculateValue = false;\n if (targetElement.classList.contains(RESIZE_WITHIN_VIEWPORT)) {\n return;\n }\n targetElement.style.height = (maxHeight - parseInt(topWithoutborder.toString(), 10)) + 'px';\n return;\n }\n var targetTop = 0;\n if (calculateValue) {\n if (targetRectValues.top < 0 && (documentHeight + (targetRectValues.height + targetRectValues.top) > 0)) {\n targetTop = targetRectValues.top;\n if ((calculatedHeight + targetTop) <= 30) {\n calculatedHeight = (targetRectValues.height - (targetRectValues.height + targetRectValues.top)) + 30;\n }\n }\n if (((calculatedHeight + targetRectValues.top) >= maxHeight)) {\n targetElement.style.height = targetRectValues.height +\n (documentHeight - (targetRectValues.height + targetRectValues.top)) + 'px';\n }\n var calculatedTop = (isNOU(containerElement)) ? targetTop : topWithoutborder;\n if (calculatedHeight >= minHeight && ((calculatedHeight + calculatedTop) <= maxHeight)) {\n targetElement.style.height = calculatedHeight + 'px';\n }\n }\n}\n/* istanbul ignore next */\n// tslint:disable-next-line\nfunction resizeNorth(e) {\n var calculateValue = false;\n var boundaryRectValues;\n var pageY = (getEventType(e.type) === 'mouse') ? e.pageY : e.touches[0].pageY;\n var targetRectValues = getClientRectValues(targetElement);\n if (!isNOU(containerElement)) {\n boundaryRectValues = getClientRectValues(containerElement);\n }\n if (!isNOU(containerElement) && (targetRectValues.top - boundaryRectValues.top) > 0) {\n calculateValue = true;\n }\n else if (isNOU(containerElement) && pageY > 0) {\n calculateValue = true;\n }\n var currentHeight = originalHeight - (pageY - originalMouseY);\n if (calculateValue) {\n if (currentHeight >= minHeight && currentHeight <= maxHeight) {\n var containerTop = 0;\n if (!isNOU(containerElement)) {\n containerTop = boundaryRectValues.top;\n }\n var top_1 = (originalY - containerTop) + (pageY - originalMouseY);\n top_1 = top_1 > 0 ? top_1 : 1;\n targetElement.style.height = currentHeight + 'px';\n targetElement.style.top = top_1 + 'px';\n }\n }\n}\n/* istanbul ignore next */\n// tslint:disable-next-line\nfunction resizeWest(e) {\n var documentWidth = document.documentElement.clientWidth;\n var calculateValue = false;\n var rectValues;\n if (!isNOU(containerElement)) {\n rectValues = getClientRectValues(containerElement);\n }\n var pageX = (getEventType(e.type) === 'mouse') ? e.pageX : e.touches[0].pageX;\n var targetRectValues = getClientRectValues(targetElement);\n var borderValue = isNOU(containerElement) ? 0 : containerElement.offsetWidth - containerElement.clientWidth;\n var left = isNOU(containerElement) ? 0 : rectValues.left;\n var containerWidth = isNOU(containerElement) ? 0 : rectValues.width;\n if (isNOU(resizeWestWidth)) {\n if (!isNOU(containerElement)) {\n resizeWestWidth = (((targetRectValues.left - left) - borderValue / 2)) + targetRectValues.width;\n resizeWestWidth = resizeWestWidth + (containerWidth - borderValue - resizeWestWidth);\n }\n else {\n resizeWestWidth = documentWidth;\n }\n }\n if (!isNOU(containerElement) &&\n (Math.floor((targetRectValues.left - rectValues.left) + targetRectValues.width +\n (rectValues.right - targetRectValues.right)) - borderValue) <= maxWidth) {\n calculateValue = true;\n }\n else if (isNOU(containerElement) && pageX >= 0) {\n calculateValue = true;\n }\n var calculatedWidth = originalWidth - (pageX - originalMouseX);\n if (setLeft) {\n calculatedWidth = (calculatedWidth > resizeWestWidth) ? resizeWestWidth : calculatedWidth;\n }\n if (calculateValue) {\n if (calculatedWidth >= minWidth && calculatedWidth <= maxWidth) {\n var containerLeft = 0;\n if (!isNOU(containerElement)) {\n containerLeft = rectValues.left;\n }\n var left_1 = (originalX - containerLeft) + (pageX - originalMouseX);\n left_1 = (left_1 > 0) ? left_1 : 1;\n if (calculatedWidth !== previousWidth && setWidth) {\n targetElement.style.width = calculatedWidth + 'px';\n }\n if (setLeft) {\n targetElement.style.left = left_1 + 'px';\n if (left_1 === 1) {\n setWidth = false;\n }\n else {\n setWidth = true;\n }\n }\n }\n }\n previousWidth = calculatedWidth;\n}\n/* istanbul ignore next */\n// tslint:disable-next-line\nfunction resizeEast(e) {\n var documentWidth = document.documentElement.clientWidth;\n var calculateValue = false;\n var containerRectValues;\n if (!isNOU(containerElement)) {\n containerRectValues = getClientRectValues(containerElement);\n }\n var coordinates = e.touches ? e.changedTouches[0] : e;\n var pageX = coordinates.pageX;\n var targetRectValues = getClientRectValues(targetElement);\n if (!isNOU(containerElement) && (((targetRectValues.left - containerRectValues.left) + targetRectValues.width) < maxWidth\n || (targetRectValues.right - containerRectValues.left) > targetRectValues.width)) {\n calculateValue = true;\n }\n else if (isNOU(containerElement) && (documentWidth - pageX) > 0) {\n calculateValue = true;\n }\n var calculatedWidth = originalWidth + (pageX - originalMouseX);\n var containerLeft = 0;\n if (!isNOU(containerElement)) {\n containerLeft = containerRectValues.left;\n }\n if (((targetRectValues.left - containerLeft) + calculatedWidth) > maxWidth) {\n calculateValue = false;\n if (targetElement.classList.contains(RESIZE_WITHIN_VIEWPORT)) {\n return;\n }\n targetElement.style.width = maxWidth - (targetRectValues.left - containerLeft) + 'px';\n }\n if (calculateValue) {\n if (calculatedWidth >= minWidth && calculatedWidth <= maxWidth) {\n targetElement.style.width = calculatedWidth + 'px';\n }\n }\n}\n/* istanbul ignore next */\nexport function setMinHeight(minimumHeight) {\n minHeight = minimumHeight;\n}\nexport function setMaxWidth(value) {\n maxWidth = value;\n}\nexport function setMaxHeight(value) {\n maxHeight = value;\n}\nexport function removeResize() {\n var handlers = targetElement.querySelectorAll('.' + RESIZE_HANDLER);\n for (var i = 0; i < handlers.length; i++) {\n detach(handlers[i]);\n }\n var borderResizers = targetElement.querySelectorAll('.e-dialog-border-resize');\n if (!isNOU(borderResizers)) {\n for (var i = 0; i < borderResizers.length; i++) {\n detach(borderResizers[i]);\n }\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, Property, Event, Collection, L10n, Complex, compile, createElement } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, detach, attributes, prepend, setStyleAttribute } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, ChildProperty, isBlazor } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, formatUnit, append, EventHandler, Draggable, extend } from '@syncfusion/ej2-base';\nimport { SanitizeHtmlHelper, Browser } from '@syncfusion/ej2-base';\nimport { Button } from '@syncfusion/ej2-buttons';\nimport { Popup, PositionData, getZindexPartial } from '../popup/popup';\nimport { createResize, removeResize, setMinHeight, setMaxWidth, setMaxHeight } from '../common/resize';\nvar ButtonProps = /** @class */ (function (_super) {\n __extends(ButtonProps, _super);\n function ButtonProps() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property()\n ], ButtonProps.prototype, \"buttonModel\", void 0);\n __decorate([\n Property('Button')\n ], ButtonProps.prototype, \"type\", void 0);\n __decorate([\n Event()\n ], ButtonProps.prototype, \"click\", void 0);\n return ButtonProps;\n}(ChildProperty));\nexport { ButtonProps };\n/**\n * Configures the animation properties for both open and close the dialog.\n */\nvar AnimationSettings = /** @class */ (function (_super) {\n __extends(AnimationSettings, _super);\n function AnimationSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Fade')\n ], AnimationSettings.prototype, \"effect\", void 0);\n __decorate([\n Property(400)\n ], AnimationSettings.prototype, \"duration\", void 0);\n __decorate([\n Property(0)\n ], AnimationSettings.prototype, \"delay\", void 0);\n return AnimationSettings;\n}(ChildProperty));\nexport { AnimationSettings };\nvar ROOT = 'e-dialog';\nvar RTL = 'e-rtl';\nvar DLG_HEADER_CONTENT = 'e-dlg-header-content';\nvar DLG_HEADER = 'e-dlg-header';\nvar DLG_FOOTER_CONTENT = 'e-footer-content';\nvar MODAL_DLG = 'e-dlg-modal';\nvar DLG_CONTENT = 'e-dlg-content';\nvar DLG_CLOSE_ICON = 'e-icon-dlg-close';\nvar DLG_OVERLAY = 'e-dlg-overlay';\nvar DLG_TARGET = 'e-dlg-target';\nvar DLG_CONTAINER = 'e-dlg-container';\nvar SCROLL_DISABLED = 'e-scroll-disabled';\nvar DLG_PRIMARY_BUTTON = 'e-primary';\nvar ICON = 'e-icons';\nvar POPUP_ROOT = 'e-popup';\nvar DEVICE = 'e-device';\nvar FULLSCREEN = 'e-dlg-fullscreen';\nvar DLG_CLOSE_ICON_BTN = 'e-dlg-closeicon-btn';\nvar DLG_HIDE = 'e-popup-close';\nvar DLG_SHOW = 'e-popup-open';\nvar DLG_UTIL_DEFAULT_TITLE = 'Information';\nvar DLG_UTIL_ROOT = 'e-scroll-disabled';\nvar DLG_UTIL_ALERT = 'e-alert-dialog';\nvar DLG_UTIL_CONFIRM = 'e-confirm-dialog';\nvar DLG_RESIZABLE = 'e-dlg-resizable';\nvar DLG_RESTRICT_LEFT_VALUE = 'e-restrict-left';\nvar DLG_RESTRICT_WIDTH_VALUE = 'e-resize-viewport';\nvar DLG_REF_ELEMENT = 'e-dlg-ref-element';\n/**\n * Represents the dialog component that displays the information and get input from the user.\n * Two types of dialog components are `Modal and Modeless (non-modal)` depending on its interaction with parent application.\n * ```html\n *
\n * ```\n * ```typescript\n * \n * ```\n */\nvar Dialog = /** @class */ (function (_super) {\n __extends(Dialog, _super);\n /**\n * Constructor for creating the widget\n * @hidden\n */\n function Dialog(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * Initialize the control rendering\n * @private\n */\n Dialog.prototype.render = function () {\n this.initialize();\n this.initRender();\n this.wireEvents();\n if (this.width === '100%') {\n this.element.style.width = '';\n }\n if (this.minHeight !== '') {\n this.element.style.minHeight = this.minHeight.toString();\n }\n if (this.enableResize) {\n this.setResize();\n if (this.animationSettings.effect === 'None') {\n this.getMinHeight();\n }\n }\n this.renderComplete();\n };\n /**\n * Initialize the event handler\n * @private\n */\n Dialog.prototype.preRender = function () {\n var _this = this;\n this.headerContent = null;\n this.allowMaxHeight = true;\n this.preventVisibility = true;\n this.clonedEle = this.element.cloneNode(true);\n this.closeIconClickEventHandler = function (event) {\n _this.hide(event);\n };\n this.dlgOverlayClickEventHandler = function (event) {\n event.preventFocus = false;\n _this.trigger('overlayClick', event, function (overlayClickEventArgs) {\n if (!overlayClickEventArgs.preventFocus) {\n _this.focusContent();\n }\n });\n };\n var localeText = { close: 'Close' };\n this.l10n = new L10n('dialog', localeText, this.locale);\n this.checkPositionData();\n if (isNullOrUndefined(this.target)) {\n var prevOnChange = this.isProtectedOnChange;\n this.isProtectedOnChange = true;\n this.target = document.body;\n this.isProtectedOnChange = prevOnChange;\n }\n };\n ;\n Dialog.prototype.isNumberValue = function (value) {\n var isNumber = /^[-+]?\\d*\\.?\\d+$/.test(value);\n return isNumber;\n };\n Dialog.prototype.checkPositionData = function () {\n if (!isNullOrUndefined(this.position)) {\n if (!isNullOrUndefined(this.position.X) && (typeof (this.position.X) !== 'number')) {\n var isNumber = this.isNumberValue(this.position.X);\n if (isNumber) {\n var prevOnChange = this.isProtectedOnChange;\n this.isProtectedOnChange = true;\n this.position.X = parseFloat(this.position.X);\n this.isProtectedOnChange = prevOnChange;\n }\n }\n if (!isNullOrUndefined(this.position.Y) && (typeof (this.position.Y) !== 'number')) {\n var isNumber = this.isNumberValue(this.position.Y);\n if (isNumber) {\n var prevOnChange = this.isProtectedOnChange;\n this.isProtectedOnChange = true;\n this.position.Y = parseFloat(this.position.Y);\n this.isProtectedOnChange = prevOnChange;\n }\n }\n }\n };\n Dialog.prototype.getEle = function (list, selector) {\n var element = undefined;\n for (var i = 0; i < list.length; i++) {\n if (list[i].classList.contains(selector)) {\n element = list[i];\n break;\n }\n }\n return element;\n };\n /* istanbul ignore next */\n Dialog.prototype.getMinHeight = function () {\n var computedHeaderHeight = '0px';\n var computedFooterHeight = '0px';\n if (!isNullOrUndefined(this.element.querySelector('.' + DLG_HEADER_CONTENT))) {\n computedHeaderHeight = getComputedStyle(this.headerContent).height;\n }\n var footerEle = this.getEle(this.element.children, DLG_FOOTER_CONTENT);\n if (!isNullOrUndefined(footerEle)) {\n computedFooterHeight = getComputedStyle(footerEle).height;\n }\n var headerHeight = parseInt(computedHeaderHeight.slice(0, computedHeaderHeight.indexOf('p')), 10);\n var footerHeight = parseInt(computedFooterHeight.slice(0, computedFooterHeight.indexOf('p')), 10);\n setMinHeight(headerHeight + 30 + (isNaN(footerHeight) ? 0 : footerHeight));\n return (headerHeight + 30 + footerHeight);\n };\n Dialog.prototype.onResizeStart = function (args, dialogObj) {\n dialogObj.trigger('resizeStart', args);\n return args.cancel;\n };\n Dialog.prototype.onResizing = function (args, dialogObj) {\n dialogObj.trigger('resizing', args);\n };\n Dialog.prototype.onResizeComplete = function (args, dialogObj) {\n dialogObj.trigger('resizeStop', args);\n };\n Dialog.prototype.setResize = function () {\n if (this.enableResize) {\n if (this.isBlazorServerRender() && !isNullOrUndefined(this.element.querySelector('.e-icons.e-resize-handle'))) {\n return;\n }\n this.element.classList.add(DLG_RESIZABLE);\n var computedHeight = getComputedStyle(this.element).minHeight;\n var computedWidth = getComputedStyle(this.element).minWidth;\n var direction = '';\n for (var i = 0; i < this.resizeHandles.length; i++) {\n if (this.resizeHandles[i] === 'All') {\n direction = 'south north east west north-east north-west south-east south-west';\n break;\n }\n else {\n var directionValue = '';\n switch (this.resizeHandles[i].toString()) {\n case 'SouthEast':\n directionValue = 'south-east';\n break;\n case 'SouthWest':\n directionValue = 'south-west';\n break;\n case 'NorthEast':\n directionValue = 'north-east';\n break;\n case 'NorthWest':\n directionValue = 'north-west';\n break;\n default:\n directionValue = this.resizeHandles[i].toString();\n break;\n }\n direction += directionValue.toLocaleLowerCase() + ' ';\n }\n }\n if (this.enableRtl && direction.trim() === 'south-east') {\n direction = 'south-west';\n }\n else if (this.enableRtl && direction.trim() === 'south-west') {\n direction = 'south-east';\n }\n if (this.isModal && this.enableRtl) {\n this.element.classList.add(DLG_RESTRICT_LEFT_VALUE);\n }\n else if (this.isModal && this.target === document.body) {\n this.element.classList.add(DLG_RESTRICT_WIDTH_VALUE);\n }\n createResize({\n element: this.element,\n direction: direction,\n minHeight: parseInt(computedHeight.slice(0, computedWidth.indexOf('p')), 10),\n maxHeight: this.targetEle.clientHeight,\n minWidth: parseInt(computedWidth.slice(0, computedWidth.indexOf('p')), 10),\n maxWidth: this.targetEle.clientWidth,\n boundary: this.target === document.body ? null : this.targetEle,\n resizeBegin: this.onResizeStart.bind(this),\n resizeComplete: this.onResizeComplete.bind(this),\n resizing: this.onResizing.bind(this),\n proxy: this\n });\n this.wireWindowResizeEvent();\n }\n else {\n removeResize();\n this.unWireWindowResizeEvent();\n if (this.isModal) {\n this.element.classList.remove(DLG_RESTRICT_LEFT_VALUE);\n }\n else {\n this.element.classList.remove(DLG_RESTRICT_WIDTH_VALUE);\n }\n this.element.classList.remove(DLG_RESIZABLE);\n }\n };\n Dialog.prototype.getFocusElement = function (target) {\n var value = 'input,select,textarea,button:enabled,a,[contenteditable=\"true\"],[tabindex]';\n var items = target.querySelectorAll(value);\n return { element: items[items.length - 1] };\n };\n /* istanbul ignore next */\n Dialog.prototype.keyDown = function (event) {\n var _this = this;\n if (event.keyCode === 9) {\n if (this.isModal) {\n var buttonObj = void 0;\n if (!isNullOrUndefined(this.btnObj)) {\n buttonObj = this.btnObj[this.btnObj.length - 1];\n }\n if ((isNullOrUndefined(this.btnObj)) && (!isNullOrUndefined(this.ftrTemplateContent))) {\n buttonObj = this.getFocusElement(this.ftrTemplateContent);\n }\n if (isNullOrUndefined(this.btnObj) && isNullOrUndefined(this.ftrTemplateContent) && !isNullOrUndefined(this.contentEle)) {\n buttonObj = this.getFocusElement(this.contentEle);\n }\n if (!isNullOrUndefined(buttonObj) && document.activeElement === buttonObj.element && !event.shiftKey) {\n event.preventDefault();\n this.focusableElements(this.element).focus();\n }\n if (document.activeElement === this.focusableElements(this.element) && event.shiftKey) {\n event.preventDefault();\n if (!isNullOrUndefined(buttonObj)) {\n buttonObj.element.focus();\n }\n }\n }\n }\n var element = document.activeElement;\n var isTagName = (['input', 'textarea'].indexOf(element.tagName.toLowerCase()) > -1);\n var isContentEdit = false;\n if (!isTagName) {\n isContentEdit = element.hasAttribute('contenteditable') && element.getAttribute('contenteditable') === 'true';\n }\n if (event.keyCode === 27 && this.closeOnEscape) {\n this.hide(event);\n }\n if ((event.keyCode === 13 && !event.ctrlKey && element.tagName.toLowerCase() !== 'textarea' &&\n isTagName && !isNullOrUndefined(this.primaryButtonEle)) ||\n (event.keyCode === 13 && event.ctrlKey && (element.tagName.toLowerCase() === 'textarea' ||\n isContentEdit)) && !isNullOrUndefined(this.primaryButtonEle)) {\n var buttonIndex_1;\n var firstPrimary = this.buttons.some(function (data, index) {\n buttonIndex_1 = index;\n var buttonModel = data.buttonModel;\n return !isNullOrUndefined(buttonModel) && buttonModel.isPrimary === true;\n });\n if (firstPrimary && typeof (this.buttons[buttonIndex_1].click) === 'function') {\n setTimeout(function () {\n _this.buttons[buttonIndex_1].click.call(_this, event);\n });\n }\n }\n };\n /**\n * Initialize the control rendering\n * @private\n */\n Dialog.prototype.initialize = function () {\n if (!isNullOrUndefined(this.target)) {\n this.targetEle = ((typeof this.target) === 'string') ?\n document.querySelector(this.target) : this.target;\n }\n if (!this.isBlazorServerRender()) {\n addClass([this.element], ROOT);\n }\n if (Browser.isDevice) {\n addClass([this.element], DEVICE);\n }\n if (!this.isBlazorServerRender()) {\n this.setCSSClass();\n }\n this.setMaxHeight();\n };\n /**\n * Initialize the rendering\n * @private\n */\n Dialog.prototype.initRender = function () {\n var _this = this;\n this.initialRender = true;\n if (!this.isBlazorServerRender()) {\n attributes(this.element, { role: 'dialog' });\n }\n if (this.zIndex === 1000) {\n this.setzIndex(this.element, false);\n this.calculatezIndex = true;\n }\n else {\n this.calculatezIndex = false;\n }\n if (this.isBlazorServerRender() && isNullOrUndefined(this.headerContent)) {\n this.headerContent = this.element.getElementsByClassName('e-dlg-header-content')[0];\n }\n if (this.isBlazorServerRender() && isNullOrUndefined(this.contentEle)) {\n this.contentEle = this.element.querySelector('#' + this.element.id + '_dialog-content');\n }\n if (!this.isBlazorServerRender()) {\n this.setTargetContent();\n if (this.header !== '' && !isNullOrUndefined(this.header)) {\n this.setHeader();\n }\n if (this.showCloseIcon) {\n this.renderCloseIcon();\n }\n this.setContent();\n if (this.footerTemplate !== '' && !isNullOrUndefined(this.footerTemplate)) {\n this.setFooterTemplate();\n }\n else if (!isNullOrUndefined(this.buttons[0].buttonModel)) {\n this.setButton();\n }\n }\n if (this.isBlazorServerRender()) {\n if (!isNullOrUndefined(this.buttons[0].buttonModel) && this.footerTemplate === '') {\n this.setButton();\n }\n }\n if (this.allowDragging && (!isNullOrUndefined(this.headerContent))) {\n this.setAllowDragging();\n }\n if (!this.isBlazorServerRender()) {\n attributes(this.element, { 'aria-modal': (this.isModal ? 'true' : 'false') });\n if (this.isModal) {\n this.setIsModal();\n }\n }\n if (this.isBlazorServerRender() && isNullOrUndefined(this.dlgContainer)) {\n this.dlgContainer = this.element.parentElement;\n for (var i = 0, childNodes = this.dlgContainer.children; i < childNodes.length; i++) {\n if (childNodes[i].classList.contains('e-dlg-overlay')) {\n this.dlgOverlay = childNodes[i];\n }\n }\n }\n if (this.element.classList.contains(DLG_UTIL_ALERT) !== true && this.element.classList.contains(DLG_UTIL_CONFIRM) !== true\n && !isNullOrUndefined(this.element.parentElement)) {\n var parentEle = this.isModal ? this.dlgContainer.parentElement : this.element.parentElement;\n this.refElement = this.createElement('div', { className: DLG_REF_ELEMENT });\n parentEle.insertBefore(this.refElement, (this.isModal ? this.dlgContainer : this.element));\n }\n if (!isNullOrUndefined(this.targetEle)) {\n this.isModal ? this.targetEle.appendChild(this.dlgContainer) : this.targetEle.appendChild(this.element);\n }\n this.popupObj = new Popup(this.element, {\n height: this.height,\n width: this.width,\n zIndex: this.zIndex,\n relateTo: this.target,\n actionOnScroll: 'none',\n enableRtl: this.enableRtl,\n open: function (event) {\n var eventArgs = {\n container: _this.isModal ? _this.dlgContainer : _this.element,\n element: _this.element,\n target: _this.target,\n preventFocus: false\n };\n if (_this.enableResize) {\n _this.resetResizeIcon();\n }\n _this.trigger('open', eventArgs, function (openEventArgs) {\n if (!openEventArgs.preventFocus) {\n _this.focusContent();\n }\n });\n },\n close: function (event) {\n if (_this.isModal) {\n addClass([_this.dlgOverlay], 'e-fade');\n }\n _this.unBindEvent(_this.element);\n if (_this.isModal) {\n _this.dlgContainer.style.display = 'none';\n }\n _this.trigger('close', _this.closeArgs);\n var activeEle = document.activeElement;\n if (!isNullOrUndefined(activeEle) && !isNullOrUndefined((activeEle).blur)) {\n activeEle.blur();\n }\n if (!isNullOrUndefined(_this.storeActiveElement) && !isNullOrUndefined(_this.storeActiveElement.focus)) {\n _this.storeActiveElement.focus();\n }\n }\n });\n this.positionChange();\n this.setEnableRTL();\n if (!this.isBlazorServerRender()) {\n addClass([this.element], DLG_HIDE);\n if (this.isModal) {\n this.setOverlayZindex();\n }\n }\n if (this.visible) {\n this.show();\n }\n else {\n if (this.isModal) {\n this.dlgOverlay.style.display = 'none';\n }\n }\n this.initialRender = false;\n };\n Dialog.prototype.resetResizeIcon = function () {\n var dialogConHeight = this.getMinHeight();\n if (this.targetEle.offsetHeight < dialogConHeight) {\n var className = this.enableRtl ? 'e-south-west' : 'e-south-east';\n var resizeIcon = this.element.querySelector('.' + className);\n if (!isNullOrUndefined(resizeIcon)) {\n resizeIcon.style.bottom = '-' + dialogConHeight.toString() + 'px';\n }\n }\n };\n Dialog.prototype.setOverlayZindex = function (zIndexValue) {\n var zIndex;\n if (isNullOrUndefined(zIndexValue)) {\n zIndex = parseInt(this.element.style.zIndex, 10) ? parseInt(this.element.style.zIndex, 10) : this.zIndex;\n }\n else {\n zIndex = zIndexValue;\n }\n this.dlgOverlay.style.zIndex = (zIndex - 1).toString();\n this.dlgContainer.style.zIndex = zIndex.toString();\n };\n Dialog.prototype.positionChange = function () {\n if (this.isModal) {\n if (!isNaN(parseFloat(this.position.X)) && !isNaN(parseFloat(this.position.Y))) {\n this.setPopupPosition();\n }\n else if ((!isNaN(parseFloat(this.position.X)) && isNaN(parseFloat(this.position.Y)))\n || (isNaN(parseFloat(this.position.X)) && !isNaN(parseFloat(this.position.Y)))) {\n this.setPopupPosition();\n }\n else {\n this.element.style.top = '0px';\n this.element.style.left = '0px';\n this.dlgContainer.classList.add('e-dlg-' + this.position.X + '-' + this.position.Y);\n }\n }\n else {\n this.setPopupPosition();\n }\n };\n Dialog.prototype.setPopupPosition = function () {\n this.popupObj.setProperties({\n position: {\n X: this.position.X, Y: this.position.Y\n }\n });\n };\n Dialog.prototype.setAllowDragging = function () {\n var _this = this;\n var handleContent = '.' + DLG_HEADER_CONTENT;\n this.dragObj = new Draggable(this.element, {\n clone: false,\n isDragScroll: true,\n abort: '.e-dlg-closeicon-btn',\n handle: handleContent,\n dragStart: function (event) {\n _this.trigger('dragStart', event, function (dragEventArgs) {\n if (isBlazor()) {\n dragEventArgs.bindEvents(event.dragElement);\n }\n });\n },\n dragStop: function (event) {\n if (_this.isModal) {\n if (!isNullOrUndefined(_this.position)) {\n _this.dlgContainer.classList.remove('e-dlg-' + _this.position.X + '-' + _this.position.Y);\n }\n // Reset the dialog position after drag completion.\n _this.element.style.position = 'relative';\n }\n _this.trigger('dragStop', event);\n _this.element.classList.remove(DLG_RESTRICT_LEFT_VALUE);\n },\n drag: function (event) {\n _this.trigger('drag', event);\n }\n });\n if (!isNullOrUndefined(this.targetEle)) {\n this.dragObj.dragArea = this.targetEle;\n }\n };\n Dialog.prototype.setButton = function () {\n if (!this.isBlazorServerRender()) {\n this.buttonContent = [];\n this.btnObj = [];\n var primaryBtnFlag = true;\n for (var i = 0; i < this.buttons.length; i++) {\n var buttonType = !isNullOrUndefined(this.buttons[i].type) ? this.buttons[i].type.toLowerCase() : 'button';\n var btn = this.createElement('button', { attrs: { type: buttonType } });\n this.buttonContent.push(btn.outerHTML);\n }\n this.setFooterTemplate();\n }\n var footerBtn;\n for (var i = 0, childNodes = this.element.children; i < childNodes.length; i++) {\n if (childNodes[i].classList.contains(DLG_FOOTER_CONTENT)) {\n footerBtn = childNodes[i].querySelectorAll('button');\n }\n }\n for (var i = 0; i < this.buttons.length; i++) {\n if (!this.isBlazorServerRender()) {\n this.btnObj[i] = new Button(this.buttons[i].buttonModel);\n }\n if (this.isBlazorServerRender()) {\n this.ftrTemplateContent = this.element.querySelector('.' + DLG_FOOTER_CONTENT);\n }\n if (!isNullOrUndefined(this.ftrTemplateContent) && typeof (this.buttons[i].click) === 'function' && footerBtn.length > 0) {\n EventHandler.add(footerBtn[i], 'click', this.buttons[i].click, this);\n }\n if (!this.isBlazorServerRender() && !isNullOrUndefined(this.ftrTemplateContent)) {\n this.btnObj[i].appendTo(this.ftrTemplateContent.children[i]);\n this.btnObj[i].element.classList.add('e-flat');\n this.primaryButtonEle = this.element.getElementsByClassName('e-primary')[0];\n }\n }\n };\n Dialog.prototype.setContent = function () {\n attributes(this.element, { 'aria-describedby': this.element.id + '_dialog-content' });\n this.contentEle = this.createElement('div', { className: DLG_CONTENT, id: this.element.id + '_dialog-content' });\n if (this.innerContentElement) {\n this.contentEle.appendChild(this.innerContentElement);\n }\n else if (!isNullOrUndefined(this.content) && this.content !== '' || !this.initialRender) {\n var blazorContain = Object.keys(window);\n if (typeof (this.content) === 'string' && !isBlazor()) {\n this.contentEle.innerHTML = this.sanitizeHelper(this.content);\n }\n else if (this.content instanceof HTMLElement) {\n this.contentEle.appendChild(this.content);\n }\n else {\n this.setTemplate(this.content, this.contentEle, 'content');\n }\n }\n if (!isNullOrUndefined(this.headerContent)) {\n this.element.insertBefore(this.contentEle, this.element.children[1]);\n }\n else {\n this.element.insertBefore(this.contentEle, this.element.children[0]);\n }\n if (this.height === 'auto') {\n if (!this.isBlazorServerRender() && Browser.isIE && this.element.style.width === '' && !isNullOrUndefined(this.width)) {\n this.element.style.width = formatUnit(this.width);\n }\n this.setMaxHeight();\n }\n };\n Dialog.prototype.setTemplate = function (template, toElement, prop) {\n var templateFn;\n var templateProps;\n var blazorContain = Object.keys(window);\n if (toElement.classList.contains(DLG_HEADER)) {\n templateProps = this.element.id + 'header';\n }\n else if (toElement.classList.contains(DLG_FOOTER_CONTENT)) {\n templateProps = this.element.id + 'footerTemplate';\n }\n else {\n templateProps = this.element.id + 'content';\n }\n var templateValue;\n if (!isNullOrUndefined(template.outerHTML)) {\n toElement.appendChild(template);\n }\n else if ((typeof template !== 'string') || (isBlazor() && !this.isStringTemplate)) {\n templateFn = compile(template);\n templateValue = template;\n }\n else {\n toElement.innerHTML = this.sanitizeHelper(template);\n }\n var fromElements = [];\n if (!isNullOrUndefined(templateFn)) {\n var isString = (isBlazor() &&\n !this.isStringTemplate && (templateValue).indexOf('
Blazor') === 0) ?\n this.isStringTemplate : true;\n for (var _i = 0, _a = templateFn({}, this, prop, templateProps, isString); _i < _a.length; _i++) {\n var item = _a[_i];\n fromElements.push(item);\n }\n append([].slice.call(fromElements), toElement);\n }\n };\n /**\n * @hidden\n */\n Dialog.prototype.sanitizeHelper = function (value) {\n if (this.enableHtmlSanitizer) {\n var dialogItem = SanitizeHtmlHelper.beforeSanitize();\n var beforeEvent = {\n cancel: false,\n helper: null\n };\n extend(dialogItem, dialogItem, beforeEvent);\n this.trigger('beforeSanitizeHtml', dialogItem);\n if (dialogItem.cancel && !isNullOrUndefined(dialogItem.helper)) {\n value = dialogItem.helper(value);\n }\n else if (!dialogItem.cancel) {\n value = SanitizeHtmlHelper.serializeValue(dialogItem, value);\n }\n }\n return value;\n };\n Dialog.prototype.setMaxHeight = function () {\n if (!this.allowMaxHeight) {\n return;\n }\n var display = this.element.style.display;\n this.element.style.display = 'none';\n this.element.style.maxHeight = (!isNullOrUndefined(this.target)) && (this.targetEle.offsetHeight < window.innerHeight) ?\n (this.targetEle.offsetHeight - 20) + 'px' : (window.innerHeight - 20) + 'px';\n this.element.style.display = display;\n if (Browser.isIE && this.height === 'auto' && !isNullOrUndefined(this.contentEle)\n && this.element.offsetHeight < this.contentEle.offsetHeight) {\n this.element.style.height = 'inherit';\n }\n };\n Dialog.prototype.setEnableRTL = function () {\n if (!this.isBlazorServerRender()) {\n this.enableRtl ? addClass([this.element], RTL) : removeClass([this.element], RTL);\n }\n if (!isNullOrUndefined(this.element.querySelector('.e-resize-handle'))) {\n removeResize();\n this.setResize();\n }\n };\n Dialog.prototype.setTargetContent = function () {\n var _this = this;\n if (isNullOrUndefined(this.content) || this.content === '') {\n var isContent = this.element.innerHTML.replace(/\\s|<(\\/?|\\!?)(!--!--)>/g, '') !== '';\n if (this.element.children.length > 0 || isContent) {\n this.innerContentElement = document.createDocumentFragment();\n [].slice.call(this.element.childNodes).forEach(function (el) {\n if (el.nodeType !== 8) {\n _this.innerContentElement.appendChild(el);\n }\n });\n }\n }\n };\n Dialog.prototype.setHeader = function () {\n if (this.headerEle) {\n this.headerEle.innerHTML = '';\n }\n else {\n this.headerEle = this.createElement('div', { id: this.element.id + '_title', className: DLG_HEADER });\n }\n this.createHeaderContent();\n this.headerContent.appendChild(this.headerEle);\n this.setTemplate(this.header, this.headerEle, 'header');\n attributes(this.element, { 'aria-labelledby': this.element.id + '_title' });\n this.element.insertBefore(this.headerContent, this.element.children[0]);\n };\n Dialog.prototype.setFooterTemplate = function () {\n if (this.ftrTemplateContent) {\n this.ftrTemplateContent.innerHTML = '';\n }\n else {\n this.ftrTemplateContent = this.createElement('div', {\n className: DLG_FOOTER_CONTENT\n });\n }\n if (this.footerTemplate !== '' && !isNullOrUndefined(this.footerTemplate)) {\n this.setTemplate(this.footerTemplate, this.ftrTemplateContent, 'footerTemplate');\n }\n else {\n this.ftrTemplateContent.innerHTML = this.buttonContent.join('');\n }\n this.element.appendChild(this.ftrTemplateContent);\n };\n Dialog.prototype.createHeaderContent = function () {\n if (isNullOrUndefined(this.headerContent)) {\n this.headerContent = this.createElement('div', { id: this.element.id + '_dialog-header', className: DLG_HEADER_CONTENT });\n }\n };\n Dialog.prototype.renderCloseIcon = function () {\n this.closeIcon = this.createElement('button', { className: DLG_CLOSE_ICON_BTN, attrs: { type: 'button' } });\n this.closeIconBtnObj = new Button({ cssClass: 'e-flat', iconCss: DLG_CLOSE_ICON + ' ' + ICON });\n this.closeIconTitle();\n if (!isNullOrUndefined(this.headerContent)) {\n prepend([this.closeIcon], this.headerContent);\n }\n else {\n this.createHeaderContent();\n prepend([this.closeIcon], this.headerContent);\n this.element.insertBefore(this.headerContent, this.element.children[0]);\n }\n this.closeIconBtnObj.appendTo(this.closeIcon);\n };\n Dialog.prototype.closeIconTitle = function () {\n this.l10n.setLocale(this.locale);\n var closeIconTitle = this.l10n.getConstant('close');\n this.closeIcon.setAttribute('title', closeIconTitle);\n this.closeIcon.setAttribute('aria-label', closeIconTitle);\n };\n Dialog.prototype.setCSSClass = function (oldCSSClass) {\n if (this.cssClass) {\n addClass([this.element], this.cssClass.split(' '));\n }\n if (oldCSSClass) {\n removeClass([this.element], oldCSSClass.split(' '));\n }\n };\n Dialog.prototype.setIsModal = function () {\n this.dlgContainer = this.createElement('div', { className: DLG_CONTAINER });\n this.element.classList.remove(DLG_SHOW);\n this.element.parentNode.insertBefore(this.dlgContainer, this.element);\n this.dlgContainer.appendChild(this.element);\n addClass([this.element], MODAL_DLG);\n this.dlgOverlay = this.createElement('div', { className: DLG_OVERLAY });\n this.dlgOverlay.style.zIndex = (this.zIndex - 1).toString();\n this.dlgContainer.appendChild(this.dlgOverlay);\n };\n Dialog.prototype.getValidFocusNode = function (items) {\n var node;\n for (var u = 0; u < items.length; u++) {\n node = items[u];\n if ((node.clientHeight > 0 || (node.tagName.toLowerCase() === 'a' && node.hasAttribute('href'))) && node.tabIndex > -1 &&\n !node.disabled && !this.disableElement(node, '[disabled],[aria-disabled=\"true\"],[type=\"hidden\"]')) {\n return node;\n }\n else {\n node = null;\n }\n }\n return node;\n };\n Dialog.prototype.focusableElements = function (content) {\n if (!isNullOrUndefined(content)) {\n var value = 'input,select,textarea,button,a,[contenteditable=\"true\"],[tabindex]';\n var items = content.querySelectorAll(value);\n return this.getValidFocusNode(items);\n }\n return null;\n };\n Dialog.prototype.getAutoFocusNode = function (container) {\n var node = container.querySelector('.' + DLG_CLOSE_ICON_BTN);\n var value = '[autofocus]';\n var items = container.querySelectorAll(value);\n var validNode = this.getValidFocusNode(items);\n if (isBlazor()) {\n this.primaryButtonEle = this.element.getElementsByClassName('e-primary')[0];\n }\n if (!isNullOrUndefined(validNode)) {\n node = validNode;\n }\n else {\n validNode = this.focusableElements(this.contentEle);\n if (!isNullOrUndefined(validNode)) {\n return node = validNode;\n }\n else if (!isNullOrUndefined(this.primaryButtonEle)) {\n return this.element.querySelector('.' + DLG_PRIMARY_BUTTON);\n }\n }\n return node;\n };\n Dialog.prototype.disableElement = function (element, t) {\n var elementMatch = element ? element.matches || element.webkitMatchesSelector || element.msMatchesSelector : null;\n if (elementMatch) {\n for (; element; element = element.parentNode) {\n if (element instanceof Element && elementMatch.call(element, t)) {\n /* istanbul ignore next */\n return element;\n }\n }\n }\n return null;\n };\n Dialog.prototype.focusContent = function () {\n var element = this.getAutoFocusNode(this.element);\n var node = !isNullOrUndefined(element) ? element : this.element;\n var userAgent = Browser.userAgent;\n if (userAgent.indexOf('MSIE ') > 0 || userAgent.indexOf('Trident/') > 0) {\n this.element.focus();\n }\n node.focus();\n this.bindEvent(this.element);\n };\n Dialog.prototype.bindEvent = function (element) {\n EventHandler.add(element, 'keydown', this.keyDown, this);\n };\n Dialog.prototype.unBindEvent = function (element) {\n EventHandler.remove(element, 'keydown', this.keyDown);\n };\n Dialog.prototype.updateSanitizeContent = function () {\n if (!this.isBlazorServerRender()) {\n this.contentEle.innerHTML = this.sanitizeHelper(this.content);\n }\n };\n Dialog.prototype.isBlazorServerRender = function () {\n return isBlazor() && this.isServerRendered;\n };\n /**\n * Module required function\n * @private\n */\n Dialog.prototype.getModuleName = function () {\n return 'dialog';\n };\n /**\n * Called internally if any of the property value changed\n * @private\n */\n Dialog.prototype.onPropertyChanged = function (newProp, oldProp) {\n if (!this.element.classList.contains(ROOT)) {\n return;\n }\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'content':\n if (!isNullOrUndefined(this.content) && this.content !== '') {\n if (this.isBlazorServerRender()) {\n this.contentEle = this.element.querySelector('.e-dlg-content');\n }\n if (!isNullOrUndefined(this.contentEle) && this.contentEle.getAttribute('role') !== 'dialog') {\n if (!this.isBlazorServerRender()) {\n this.contentEle.innerHTML = '';\n }\n if (typeof (this.content) === 'function') {\n this.clearTemplate(['content']);\n detach(this.contentEle);\n this.contentEle = null;\n this.setContent();\n }\n else {\n typeof (this.content) === 'string' ? (this.isBlazorServerRender() && (this.contentEle.innerText === '')) ?\n this.contentEle.insertAdjacentHTML('beforeend', this.sanitizeHelper(this.content)) :\n this.updateSanitizeContent() : this.contentEle.appendChild(this.content);\n }\n this.setMaxHeight();\n }\n else {\n if (!this.isBlazorServerRender() ||\n isNullOrUndefined(this.element.querySelector('.e-dlg-content'))) {\n this.setContent();\n }\n }\n }\n else if (!isNullOrUndefined(this.contentEle)) {\n detach(this.contentEle);\n this.contentEle = null;\n }\n break;\n case 'header':\n if (this.header === '' || isNullOrUndefined(this.header)) {\n if (this.headerEle) {\n detach(this.headerEle);\n this.headerEle = null;\n }\n }\n else {\n if (!this.isBlazorServerRender() ||\n isNullOrUndefined(this.element.querySelector('.e-dlg-header-content'))) {\n this.setHeader();\n }\n }\n break;\n case 'footerTemplate':\n if (this.footerTemplate === '' || isNullOrUndefined(this.footerTemplate)) {\n if (!this.ftrTemplateContent) {\n return;\n }\n detach(this.ftrTemplateContent);\n this.ftrTemplateContent = null;\n this.buttons = [{}];\n }\n else {\n if (!this.isBlazorServerRender() ||\n isNullOrUndefined(this.element.querySelector('.e-footer-content'))) {\n this.setFooterTemplate();\n }\n this.buttons = [{}];\n }\n break;\n case 'showCloseIcon':\n if (this.element.getElementsByClassName(DLG_CLOSE_ICON).length > 0) {\n if (!this.showCloseIcon && (this.header === '' || isNullOrUndefined(this.header))) {\n detach(this.headerContent);\n this.headerContent = null;\n }\n else if (!this.showCloseIcon) {\n detach(this.closeIcon);\n }\n else {\n if (this.isBlazorServerRender()) {\n this.wireEvents();\n }\n }\n }\n else {\n if (!this.isBlazorServerRender()) {\n this.renderCloseIcon();\n }\n this.wireEvents();\n }\n break;\n case 'locale':\n if (this.showCloseIcon) {\n this.closeIconTitle();\n }\n break;\n case 'visible':\n this.visible ? this.show() : this.hide();\n break;\n case 'isModal':\n this.updateIsModal();\n break;\n case 'height':\n setStyleAttribute(this.element, { 'height': formatUnit(newProp.height) });\n break;\n case 'width':\n setStyleAttribute(this.element, { 'width': formatUnit(newProp.width) });\n break;\n case 'zIndex':\n this.popupObj.zIndex = this.zIndex;\n if (this.isModal) {\n this.setOverlayZindex(this.zIndex);\n }\n if (this.element.style.zIndex !== this.zIndex.toString()) {\n this.calculatezIndex = false;\n }\n break;\n case 'cssClass':\n this.setCSSClass(oldProp.cssClass);\n break;\n case 'buttons':\n var buttonCount = this.buttons.length;\n if (!isNullOrUndefined(this.ftrTemplateContent) && !this.isBlazorServerRender()) {\n detach(this.ftrTemplateContent);\n this.ftrTemplateContent = null;\n }\n for (var i = 0; i < buttonCount; i++) {\n if (!isNullOrUndefined(this.buttons[i].buttonModel)) {\n this.footerTemplate = '';\n this.setButton();\n }\n }\n break;\n case 'allowDragging':\n if (this.allowDragging && (!isNullOrUndefined(this.headerContent))) {\n this.setAllowDragging();\n }\n else {\n this.dragObj.destroy();\n }\n break;\n case 'target':\n this.setTarget(newProp.target);\n break;\n case 'position':\n this.checkPositionData();\n if (this.isModal) {\n var positionX = isNullOrUndefined(oldProp.position.X) ? this.position.X : oldProp.position.X;\n var positionY = isNullOrUndefined(oldProp.position.Y) ? this.position.Y : oldProp.position.Y;\n if (this.dlgContainer.classList.contains('e-dlg-' + positionX + '-' + positionY)) {\n this.dlgContainer.classList.remove('e-dlg-' + positionX + '-' + positionY);\n }\n }\n this.positionChange();\n break;\n case 'enableRtl':\n this.setEnableRTL();\n break;\n case 'enableResize':\n this.setResize();\n break;\n }\n }\n };\n Dialog.prototype.setTarget = function (target) {\n this.popupObj.relateTo = target;\n this.target = target;\n this.targetEle = ((typeof this.target) === 'string') ?\n document.querySelector(this.target) : this.target;\n if (this.dragObj) {\n this.dragObj.dragArea = this.targetEle;\n }\n this.setMaxHeight();\n if (this.isModal) {\n this.updateIsModal();\n }\n if (this.enableResize) {\n this.setResize();\n }\n };\n Dialog.prototype.updateIsModal = function () {\n this.element.setAttribute('aria-modal', this.isModal ? 'true' : 'false');\n if (this.isModal) {\n this.setIsModal();\n this.element.style.top = '0px';\n this.element.style.left = '0px';\n if (!isNullOrUndefined(this.targetEle)) {\n this.targetEle.appendChild(this.dlgContainer);\n }\n }\n else {\n removeClass([this.element], MODAL_DLG);\n removeClass([document.body], [DLG_TARGET, SCROLL_DISABLED]);\n detach(this.dlgOverlay);\n while (this.dlgContainer.firstChild) {\n this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild, this.dlgContainer);\n }\n this.dlgContainer.parentElement.removeChild(this.dlgContainer);\n }\n if (this.visible) {\n this.show();\n }\n this.positionChange();\n if (this.isModal && this.dlgOverlay) {\n EventHandler.add(this.dlgOverlay, 'click', this.dlgOverlayClickEventHandler, this);\n }\n };\n Dialog.prototype.setzIndex = function (zIndexElement, setPopupZindex) {\n var prevOnChange = this.isProtectedOnChange;\n this.isProtectedOnChange = true;\n this.zIndex = getZindexPartial(zIndexElement);\n this.isProtectedOnChange = prevOnChange;\n if (setPopupZindex) {\n this.popupObj.zIndex = this.zIndex;\n }\n };\n Dialog.prototype.windowResizeHandler = function () {\n setMaxWidth(this.targetEle.clientWidth);\n setMaxHeight(this.targetEle.clientHeight);\n this.setMaxHeight();\n };\n /**\n * Get the properties to be maintained in the persisted state.\n * @private\n */\n Dialog.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n /**\n * To destroy the widget\n * @method destroy\n * @return {void}\n * @memberof dialog\n */\n Dialog.prototype.destroy = function () {\n if (this.isDestroyed) {\n return;\n }\n var classArray = [RTL, MODAL_DLG, DLG_RESIZABLE, DLG_RESTRICT_LEFT_VALUE, FULLSCREEN, DEVICE];\n var attrs = ['role', 'aria-modal', 'aria-labelledby', 'aria-describedby', 'aria-grabbed', 'tabindex', 'style'];\n removeClass([this.targetEle], [DLG_TARGET, SCROLL_DISABLED]);\n if (!isNullOrUndefined(this.element) && this.element.classList.contains(FULLSCREEN)) {\n removeClass([document.body], [DLG_TARGET, SCROLL_DISABLED]);\n }\n if (this.isModal) {\n removeClass([(!isNullOrUndefined(this.targetEle) ? this.targetEle : document.body)], SCROLL_DISABLED);\n }\n this.unWireEvents();\n if (!isNullOrUndefined(this.btnObj)) {\n for (var i = 0; i < this.btnObj.length; i++) {\n this.btnObj[i].destroy();\n }\n }\n if (!isNullOrUndefined(this.dragObj)) {\n this.dragObj.destroy();\n }\n if (!isNullOrUndefined(this.popupObj.element) && this.popupObj.element.classList.contains(POPUP_ROOT)) {\n this.popupObj.destroy();\n }\n removeClass([this.element], classArray);\n if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {\n removeClass([this.element], this.cssClass.split(' '));\n }\n if (!isNullOrUndefined(this.refElement) && !isNullOrUndefined(this.refElement.parentElement)) {\n this.refElement.parentElement.insertBefore((this.isModal ? this.dlgContainer : this.element), this.refElement);\n detach(this.refElement);\n this.refElement = undefined;\n }\n if (this.isModal && !this.isBlazorServerRender()) {\n detach(this.dlgOverlay);\n this.dlgContainer.parentNode.insertBefore(this.element, this.dlgContainer);\n detach(this.dlgContainer);\n }\n if (!this.isBlazorServerRender()) {\n this.element.innerHTML = this.clonedEle.innerHTML;\n }\n if (this.isBlazorServerRender()) {\n if (!isNullOrUndefined(this.element.children)) {\n for (var i = 0; i <= this.element.children.length; i++) {\n i = i - i;\n detach(this.element.children[i]);\n }\n }\n }\n for (var i = 0; i < attrs.length; i++) {\n this.element.removeAttribute(attrs[i]);\n }\n if (!this.isBlazorServerRender()) {\n _super.prototype.destroy.call(this);\n }\n else {\n this.isDestroyed = true;\n }\n // tslint:disable-next-line:no-any\n if (this.isReact) {\n this.clearTemplate();\n }\n };\n Dialog.prototype.wireWindowResizeEvent = function () {\n window.addEventListener('resize', this.windowResizeHandler.bind(this));\n };\n Dialog.prototype.unWireWindowResizeEvent = function () {\n window.removeEventListener('resize', this.windowResizeHandler.bind(this));\n };\n /**\n * Binding event to the element while widget creation\n * @hidden\n */\n Dialog.prototype.wireEvents = function () {\n if (this.isBlazorServerRender() && this.showCloseIcon) {\n this.closeIcon = this.element.getElementsByClassName('e-dlg-closeicon-btn')[0];\n }\n if (this.showCloseIcon) {\n EventHandler.add(this.closeIcon, 'click', this.closeIconClickEventHandler, this);\n }\n if (this.isModal && this.dlgOverlay) {\n EventHandler.add(this.dlgOverlay, 'click', this.dlgOverlayClickEventHandler, this);\n }\n };\n /**\n * Unbinding event to the element while widget destroy\n * @hidden\n */\n Dialog.prototype.unWireEvents = function () {\n if (this.showCloseIcon) {\n EventHandler.remove(this.closeIcon, 'click', this.closeIconClickEventHandler);\n }\n if (this.isModal) {\n EventHandler.remove(this.dlgOverlay, 'click', this.dlgOverlayClickEventHandler);\n }\n if (this.buttons.length > 0 && !isNullOrUndefined(this.buttons[0].buttonModel) && this.footerTemplate === '') {\n for (var i = 0; i < this.buttons.length; i++) {\n if (typeof (this.buttons[i].click) === 'function') {\n EventHandler.remove(this.ftrTemplateContent.children[i], 'click', this.buttons[i].click);\n }\n }\n }\n };\n /**\n * Refreshes the dialog's position when the user changes its header and footer height/width dynamically.\n * @return {void}\n */\n Dialog.prototype.refreshPosition = function () {\n this.popupObj.refreshPosition();\n };\n /**\n * Opens the dialog if it is in hidden state.\n * To open the dialog with full screen width, set the parameter to true.\n * @param { boolean } isFullScreen - Enable the fullScreen Dialog.\n * @return {void}\n */\n Dialog.prototype.show = function (isFullScreen) {\n var _this = this;\n if (!this.element.classList.contains(ROOT)) {\n return;\n }\n if (!this.element.classList.contains(DLG_SHOW) || (!isNullOrUndefined(isFullScreen))) {\n if (!isNullOrUndefined(isFullScreen)) {\n this.fullScreen(isFullScreen);\n }\n var eventArgs_1 = isBlazor() ? {\n cancel: false,\n element: this.element,\n container: this.isModal ? this.dlgContainer : this.element,\n maxHeight: this.element.style.maxHeight\n } : {\n cancel: false,\n element: this.element,\n container: this.isModal ? this.dlgContainer : this.element,\n target: this.target,\n maxHeight: this.element.style.maxHeight\n };\n this.trigger('beforeOpen', eventArgs_1, function (beforeOpenArgs) {\n if (!beforeOpenArgs.cancel) {\n if (_this.element.style.maxHeight !== eventArgs_1.maxHeight) {\n _this.allowMaxHeight = false;\n _this.element.style.maxHeight = eventArgs_1.maxHeight;\n }\n _this.storeActiveElement = document.activeElement;\n _this.element.tabIndex = -1;\n if (_this.isModal && (!isNullOrUndefined(_this.dlgOverlay))) {\n _this.dlgOverlay.style.display = 'block';\n _this.dlgContainer.style.display = 'flex';\n removeClass([_this.dlgOverlay], 'e-fade');\n if (!isNullOrUndefined(_this.targetEle)) {\n if (_this.targetEle === document.body) {\n _this.dlgContainer.style.position = 'fixed';\n }\n else {\n _this.dlgContainer.style.position = 'absolute';\n }\n _this.dlgOverlay.style.position = 'absolute';\n _this.element.style.position = 'relative';\n addClass([_this.targetEle], [DLG_TARGET, SCROLL_DISABLED]);\n }\n else {\n addClass([document.body], [DLG_TARGET, SCROLL_DISABLED]);\n }\n }\n var openAnimation = {\n name: _this.animationSettings.effect + 'In',\n duration: _this.animationSettings.duration,\n delay: _this.animationSettings.delay\n };\n var zIndexElement = (_this.isModal) ? _this.element.parentElement : _this.element;\n if (_this.calculatezIndex) {\n _this.setzIndex(zIndexElement, true);\n setStyleAttribute(_this.element, { 'zIndex': _this.zIndex });\n if (_this.isModal) {\n _this.setOverlayZindex(_this.zIndex);\n }\n }\n _this.animationSettings.effect === 'None' ? _this.popupObj.show() : _this.popupObj.show(openAnimation);\n _this.dialogOpen = true;\n var prevOnChange = _this.isProtectedOnChange;\n _this.isProtectedOnChange = true;\n _this.visible = true;\n _this.preventVisibility = true;\n _this.isProtectedOnChange = prevOnChange;\n }\n });\n }\n // tslint:disable-next-line:no-any\n if (this.isReact) {\n this.renderReactTemplates();\n }\n };\n /**\n * Closes the dialog if it is in visible state.\n * @return {void}\n */\n Dialog.prototype.hide = function (event) {\n var _this = this;\n if (!this.element.classList.contains(ROOT)) {\n return;\n }\n if (this.preventVisibility) {\n var eventArgs = isBlazor() ? {\n cancel: false,\n isInteracted: event ? true : false,\n element: this.element,\n container: this.isModal ? this.dlgContainer : this.element,\n event: event\n } : {\n cancel: false,\n isInteracted: event ? true : false,\n element: this.element,\n target: this.target,\n container: this.isModal ? this.dlgContainer : this.element,\n event: event\n };\n this.closeArgs = eventArgs;\n this.trigger('beforeClose', eventArgs, function (beforeCloseArgs) {\n if (!beforeCloseArgs.cancel) {\n if (_this.isModal) {\n !isNullOrUndefined(_this.targetEle) ? removeClass([_this.targetEle], [DLG_TARGET, SCROLL_DISABLED]) :\n removeClass([document.body], [DLG_TARGET, SCROLL_DISABLED]);\n }\n var closeAnimation = {\n name: _this.animationSettings.effect + 'Out',\n duration: _this.animationSettings.duration,\n delay: _this.animationSettings.delay\n };\n _this.animationSettings.effect === 'None' ? _this.popupObj.hide() : _this.popupObj.hide(closeAnimation);\n _this.dialogOpen = false;\n var prevOnChange = _this.isProtectedOnChange;\n _this.isProtectedOnChange = true;\n _this.visible = false;\n _this.preventVisibility = false;\n _this.isProtectedOnChange = prevOnChange;\n }\n });\n }\n };\n /**\n * Specifies to view the Full screen Dialog.\n * @private\n */\n Dialog.prototype.fullScreen = function (args) {\n var top = this.element.offsetTop;\n var left = this.element.offsetLeft;\n if (args) {\n addClass([this.element], FULLSCREEN);\n var display = this.element.style.display;\n this.element.style.display = 'none';\n this.element.style.maxHeight = (!isNullOrUndefined(this.target)) ?\n (this.targetEle.offsetHeight) + 'px' : (window.innerHeight) + 'px';\n this.element.style.display = display;\n addClass([document.body], [DLG_TARGET, SCROLL_DISABLED]);\n if (this.allowDragging && !isNullOrUndefined(this.dragObj)) {\n this.dragObj.destroy();\n }\n }\n else {\n removeClass([this.element], FULLSCREEN);\n removeClass([document.body], [DLG_TARGET, SCROLL_DISABLED]);\n if (this.allowDragging && (!isNullOrUndefined(this.headerContent))) {\n this.setAllowDragging();\n }\n }\n return args;\n };\n /**\n * Returns the dialog button instances.\n * Based on that, you can dynamically change the button states.\n * @param { number } index - Index of the button.\n * @return {Button}\n */\n Dialog.prototype.getButtons = function (index) {\n if (!isNullOrUndefined(index)) {\n return this.btnObj[index];\n }\n return this.btnObj;\n };\n __decorate([\n Property('')\n ], Dialog.prototype, \"content\", void 0);\n __decorate([\n Property(true)\n ], Dialog.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property(false)\n ], Dialog.prototype, \"showCloseIcon\", void 0);\n __decorate([\n Property(false)\n ], Dialog.prototype, \"isModal\", void 0);\n __decorate([\n Property('')\n ], Dialog.prototype, \"header\", void 0);\n __decorate([\n Property(true)\n ], Dialog.prototype, \"visible\", void 0);\n __decorate([\n Property(false)\n ], Dialog.prototype, \"enableResize\", void 0);\n __decorate([\n Property(['South-East'])\n ], Dialog.prototype, \"resizeHandles\", void 0);\n __decorate([\n Property('auto')\n ], Dialog.prototype, \"height\", void 0);\n __decorate([\n Property('')\n ], Dialog.prototype, \"minHeight\", void 0);\n __decorate([\n Property('100%')\n ], Dialog.prototype, \"width\", void 0);\n __decorate([\n Property('')\n ], Dialog.prototype, \"cssClass\", void 0);\n __decorate([\n Property(1000)\n ], Dialog.prototype, \"zIndex\", void 0);\n __decorate([\n Property(null)\n ], Dialog.prototype, \"target\", void 0);\n __decorate([\n Property('')\n ], Dialog.prototype, \"footerTemplate\", void 0);\n __decorate([\n Property(false)\n ], Dialog.prototype, \"allowDragging\", void 0);\n __decorate([\n Collection([{}], ButtonProps)\n ], Dialog.prototype, \"buttons\", void 0);\n __decorate([\n Property(true)\n ], Dialog.prototype, \"closeOnEscape\", void 0);\n __decorate([\n Complex({}, AnimationSettings)\n ], Dialog.prototype, \"animationSettings\", void 0);\n __decorate([\n Complex({ X: 'center', Y: 'center' }, PositionData)\n ], Dialog.prototype, \"position\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"open\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"beforeSanitizeHtml\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"beforeOpen\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"close\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"beforeClose\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"dragStart\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"dragStop\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"drag\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"overlayClick\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"resizeStart\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"resizing\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"resizeStop\", void 0);\n __decorate([\n Event()\n ], Dialog.prototype, \"destroyed\", void 0);\n Dialog = __decorate([\n NotifyPropertyChanges\n ], Dialog);\n return Dialog;\n}(Component));\nexport { Dialog };\n/**\n * Base for creating Alert and Confirmation Dialog through util method.\n */\nexport var DialogUtility;\n(function (DialogUtility) {\n /**\n * An alert dialog box is used to display warning like messages to the users.\n * ```\n * Eg : DialogUtility.alert('Alert message');\n *\n * ```\n */\n /* istanbul ignore next */\n function alert(args) {\n var dialogComponent;\n var dialogElement = createElement('div', { 'className': DLG_UTIL_ALERT });\n document.body.appendChild(dialogElement);\n var alertDialogObj;\n var okButtonModel = [{\n buttonModel: { isPrimary: true, content: 'OK' },\n click: function () {\n this.hide();\n }\n }];\n if (typeof (args) === 'string') {\n alertDialogObj = createDialog({ content: args,\n position: { X: 'center', Y: 'top' },\n isModal: true, header: DLG_UTIL_DEFAULT_TITLE,\n buttons: okButtonModel }, dialogElement);\n }\n else {\n alertDialogObj = createDialog(alertOptions(args), dialogElement);\n }\n alertDialogObj.close = function () {\n if (args && args.close) {\n args.close.apply(alertDialogObj);\n }\n alertDialogObj.destroy();\n if (alertDialogObj.element.classList.contains('e-dlg-modal')) {\n alertDialogObj.element.parentElement.remove();\n alertDialogObj.target.classList.remove(DLG_UTIL_ROOT);\n }\n else {\n alertDialogObj.element.remove();\n }\n };\n return alertDialogObj;\n }\n DialogUtility.alert = alert;\n /**\n * A confirm dialog displays a specified message along with ‘OK’ and ‘Cancel’ button.\n * ```\n * Eg : DialogUtility.confirm('Confirm dialog message');\n *\n * ```\n */\n /* istanbul ignore next */\n function confirm(args) {\n var dialogComponent;\n var dialogElement = createElement('div', { 'className': DLG_UTIL_CONFIRM });\n document.body.appendChild(dialogElement);\n var confirmDialogObj;\n var okCancelButtonModel = [{\n buttonModel: { isPrimary: true, content: 'OK' },\n click: function () {\n this.hide();\n }\n }, {\n buttonModel: { content: 'Cancel' },\n click: function () {\n this.hide();\n }\n }];\n if (typeof (args) === 'string') {\n confirmDialogObj = createDialog({ position: { X: 'center', Y: 'top' }, content: args, isModal: true,\n header: DLG_UTIL_DEFAULT_TITLE, buttons: okCancelButtonModel\n }, dialogElement);\n }\n else {\n confirmDialogObj = createDialog(confirmOptions(args), dialogElement);\n }\n confirmDialogObj.close = function () {\n if (args && args.close) {\n args.close.apply(confirmDialogObj);\n }\n confirmDialogObj.destroy();\n if (confirmDialogObj.element.classList.contains('e-dlg-modal')) {\n confirmDialogObj.element.parentElement.remove();\n confirmDialogObj.target.classList.remove(DLG_UTIL_ROOT);\n }\n else {\n confirmDialogObj.element.remove();\n }\n };\n return confirmDialogObj;\n }\n DialogUtility.confirm = confirm;\n function createDialog(options, element) {\n var dialogObject = new Dialog(options);\n dialogObject.appendTo(element);\n return dialogObject;\n }\n function alertOptions(option) {\n var options = {};\n options.buttons = [];\n options = formOptions(options, option);\n options = setAlertButtonModel(options, option);\n return options;\n }\n function confirmOptions(option) {\n var options = {};\n options.buttons = [];\n options = formOptions(options, option);\n options = setConfirmButtonModel(options, option);\n return options;\n }\n function formOptions(options, option) {\n options.header = !isNullOrUndefined(option.title) ? option.title : DLG_UTIL_DEFAULT_TITLE;\n options.content = !isNullOrUndefined(option.content) ? option.content : '';\n options.isModal = !isNullOrUndefined(option.isModal) ? option.isModal : true;\n options.showCloseIcon = !isNullOrUndefined(option.showCloseIcon) ? option.showCloseIcon : false;\n options.allowDragging = !isNullOrUndefined(option.isDraggable) ? option.isDraggable : false;\n options.closeOnEscape = !isNullOrUndefined(option.closeOnEscape) ? option.closeOnEscape : false;\n options.position = !isNullOrUndefined(option.position) ? option.position : { X: 'center', Y: 'top' };\n options.animationSettings = !isNullOrUndefined(option.animationSettings) ? option.animationSettings :\n { effect: 'Fade', duration: 400, delay: 0 };\n options.cssClass = !isNullOrUndefined(option.cssClass) ? option.cssClass : '';\n options.zIndex = !isNullOrUndefined(option.zIndex) ? option.zIndex : 1000;\n options.open = !isNullOrUndefined(option.open) ? option.open : null;\n return options;\n }\n function setAlertButtonModel(options, option) {\n var alertButtonModel = [{\n buttonModel: { isPrimary: true, content: 'OK' },\n click: function () {\n this.hide();\n }\n }];\n if (!isNullOrUndefined(option.okButton)) {\n options.buttons[0] = formButtonModel(options.buttons[0], option.okButton, alertButtonModel[0]);\n }\n else {\n options.buttons = alertButtonModel;\n }\n return options;\n }\n function setConfirmButtonModel(options, option) {\n var okButtonModel = {\n buttonModel: { isPrimary: true, content: 'OK' },\n click: function () {\n this.hide();\n }\n };\n var cancelButtonModel = {\n buttonModel: { content: 'Cancel' },\n click: function () {\n this.hide();\n }\n };\n if (!isNullOrUndefined(option.okButton)) {\n options.buttons[0] = formButtonModel(options.buttons[0], option.okButton, okButtonModel);\n }\n else {\n options.buttons[0] = okButtonModel;\n }\n if (!isNullOrUndefined(option.cancelButton)) {\n options.buttons[1] = formButtonModel(options.buttons[1], option.cancelButton, cancelButtonModel);\n }\n else {\n options.buttons[1] = cancelButtonModel;\n }\n return options;\n }\n function formButtonModel(buttonModel, option, buttonPropModel) {\n var buttonProps = buttonPropModel;\n if (!isNullOrUndefined(option.text)) {\n buttonProps.buttonModel.content = option.text;\n }\n if (!isNullOrUndefined(option.icon)) {\n buttonProps.buttonModel.iconCss = option.icon;\n }\n if (!isNullOrUndefined(option.cssClass)) {\n buttonProps.buttonModel.cssClass = option.cssClass;\n }\n if (!isNullOrUndefined(option.click)) {\n buttonProps.click = option.click;\n }\n return buttonProps;\n }\n})(DialogUtility || (DialogUtility = {}));\n","import { ChildProperty, compile as baseTemplateComplier, setValue, Internationalization, isUndefined, closest } from '@syncfusion/ej2-base';\nimport { extend as baseExtend, isNullOrUndefined, getValue, classList } from '@syncfusion/ej2-base';\nimport { setStyleAttribute, addClass, attributes, remove, createElement, removeClass } from '@syncfusion/ej2-base';\nimport { isObject, isBlazor, Browser, select, selectAll } from '@syncfusion/ej2-base';\nimport { DataUtil, Query, DataManager, Predicate, UrlAdaptor, Deferred } from '@syncfusion/ej2-data';\nimport { Column } from '../models/column';\nimport { calculateRelativeBasedPosition } from '@syncfusion/ej2-popups';\nimport { Print } from '../actions/print';\n//https://typescript.codeplex.com/discussions/401501\n/**\n * Function to check whether target object implement specific interface\n * @param {Object} target\n * @param {string} checkFor\n * @returns no\n * @hidden\n */\nexport function doesImplementInterface(target, checkFor) {\n /* tslint:disable:no-any */\n return target.prototype && checkFor in target.prototype;\n}\n/**\n * Function to get value from provided data\n * @param {string} field\n * @param {Object} data\n * @param {IColumn} column\n * @hidden\n */\nexport function valueAccessor(field, data, column) {\n return (isNullOrUndefined(field) || field === '') ? '' : DataUtil.getObject(field, data);\n}\n/**\n * Defines the method used to apply custom header cell values from external function and display this on each header cell rendered.\n * @param {string} field\n * @param {IColumn} column\n * @hidden\n */\nexport function headerValueAccessor(field, column) {\n return (isNullOrUndefined(field) || field === '') ? '' : DataUtil.getObject(field, column);\n}\n/**\n * The function used to update Dom using requestAnimationFrame.\n * @param {Function} fn - Function that contains the actual action\n * @return {Promise}\n * @hidden\n */\nexport function getUpdateUsingRaf(updateFunction, callBack) {\n requestAnimationFrame(function () {\n try {\n callBack(null, updateFunction());\n }\n catch (e) {\n callBack(e);\n }\n });\n}\n/**\n * @hidden\n */\nexport function isExportColumns(exportProperties) {\n return !isNullOrUndefined(exportProperties) &&\n !isNullOrUndefined(exportProperties.columns) && exportProperties.columns.length > 0;\n}\n/**\n * @hidden\n */\nexport function updateColumnTypeForExportColumns(exportProperties, gObj) {\n var exportColumns = exportProperties.columns;\n var gridColumns = gObj.columns;\n for (var i = 0; i < exportColumns.length; i++) {\n if (gridColumns.length - 1 >= i) {\n if (gridColumns[i].columns) {\n for (var j = 0; j < gridColumns[i].columns.length; j++) {\n exportColumns[i].columns[j].type = gridColumns[i].columns[j].type;\n }\n }\n else {\n exportColumns[i].type = gridColumns[i].type;\n }\n }\n }\n}\n/**\n * @hidden\n */\nexport function updatecloneRow(grid) {\n var nRows = [];\n var actualRows = grid.vRows;\n for (var i = 0; i < actualRows.length; i++) {\n if (actualRows[i].isDataRow) {\n nRows.push(actualRows[i]);\n }\n else if (!actualRows[i].isDataRow) {\n nRows.push(actualRows[i]);\n if (!actualRows[i].isExpand && actualRows[i].isCaptionRow) {\n i += getCollapsedRowsCount(actualRows[i], grid);\n }\n }\n }\n grid.vcRows = nRows;\n}\n/**\n * @hidden\n */\nvar count = 0;\nexport function getCollapsedRowsCount(val, grid) {\n count = 0;\n var gSummary = 'gSummary';\n var total = 'count';\n var gLen = grid.groupSettings.columns.length;\n var records = 'records';\n var items = 'items';\n var value = val[gSummary];\n var dataRowCnt = 0;\n var agrCnt = 'aggregatesCount';\n if (value === val.data[total]) {\n if (grid.groupSettings.columns.length && !isNullOrUndefined(val[agrCnt]) && val[agrCnt]) {\n if (grid.groupSettings.columns.length !== 1) {\n count += (val.indent !== 0 && (value) < 2) ? (val[gSummary] * ((gLen - val.indent) + (gLen - val.indent) * val[agrCnt])) :\n (val[gSummary] * ((gLen - val.indent) + (gLen - val.indent - 1) * val[agrCnt])) + val[agrCnt];\n }\n else if (grid.groupSettings.columns.length === 1) {\n count += (val[gSummary] * (gLen - val.indent)) + val[agrCnt];\n }\n }\n else if (grid.groupSettings.columns.length) {\n if (grid.groupSettings.columns.length !== 1) {\n count += val[gSummary] * (grid.groupSettings.columns.length - val.indent);\n }\n else {\n count += val[gSummary];\n }\n }\n return count;\n }\n else {\n for (var i = 0, len = val.data[items].length; i < len; i++) {\n var gLevel = val.data[items][i];\n count += gLevel[items].length + ((gLen !== grid.columns.length) &&\n !isNullOrUndefined(gLevel[items][records]) ? gLevel[items][records].length : 0);\n dataRowCnt += (!isNullOrUndefined(gLevel[items][records]) && !isNullOrUndefined(val[agrCnt])) ? gLevel[items][records].length :\n gLevel[items].length;\n if (gLevel[items].GroupGuid && gLevel[items].childLevels !== 0) {\n recursive(gLevel);\n }\n }\n count += val.data[items].length;\n if (!isNullOrUndefined(val[agrCnt])) {\n if (val[agrCnt] && count && dataRowCnt !== 0) {\n count += ((count - dataRowCnt) * val[agrCnt]) + val[agrCnt];\n }\n }\n }\n return count;\n}\n/**\n * @hidden\n */\nexport function recursive(row) {\n var items = 'items';\n var rCount = 'count';\n for (var j = 0, length_1 = row[items].length; j < length_1; j++) {\n var nLevel = row[items][j];\n count += nLevel[rCount];\n if (nLevel[items].childLevels !== 0) {\n recursive(nLevel);\n }\n }\n}\n/**\n * @hidden\n */\nexport function iterateArrayOrObject(collection, predicate) {\n var result = [];\n for (var i = 0, len = collection.length; i < len; i++) {\n var pred = predicate(collection[i], i);\n if (!isNullOrUndefined(pred)) {\n result.push(pred);\n }\n }\n return result;\n}\n/** @hidden */\nexport function iterateExtend(array) {\n var obj = [];\n for (var i = 0; i < array.length; i++) {\n obj.push(baseExtend({}, getActualProperties(array[i]), {}, true));\n }\n return obj;\n}\n/** @hidden */\nexport function templateCompiler(template) {\n if (template) {\n var e = void 0;\n try {\n if (document.querySelectorAll(template).length) {\n return baseTemplateComplier(document.querySelector(template).innerHTML.trim());\n }\n }\n catch (e) {\n return baseTemplateComplier(template);\n }\n }\n return undefined;\n}\n/** @hidden */\nexport function setStyleAndAttributes(node, customAttributes) {\n var copyAttr = {};\n var literals = ['style', 'class'];\n //Dont touch the original object - make a copy\n baseExtend(copyAttr, customAttributes, {});\n if ('style' in copyAttr) {\n setStyleAttribute(node, copyAttr[literals[0]]);\n delete copyAttr[literals[0]];\n }\n if ('class' in copyAttr) {\n addClass([node], copyAttr[literals[1]]);\n delete copyAttr[literals[1]];\n }\n attributes(node, copyAttr);\n}\n/** @hidden */\nexport function extend(copied, first, second, exclude) {\n var moved = baseExtend(copied, first, second);\n var values = Object.keys(moved);\n for (var i = 0; i < values.length; i++) {\n if (exclude && exclude.indexOf(values[i]) !== -1) {\n delete moved[values[i]];\n }\n }\n return moved;\n}\n/** @hidden */\nexport function setColumnIndex(columnModel, ind) {\n if (ind === void 0) { ind = 0; }\n for (var i = 0, len = columnModel.length; i < len; i++) {\n if (columnModel[i].columns) {\n columnModel[i].index = isNullOrUndefined(columnModel[i].index) ? ind : columnModel[i].index;\n ind++;\n ind = setColumnIndex(columnModel[i].columns, ind);\n }\n else {\n columnModel[i].index = isNullOrUndefined(columnModel[i].index) ? ind : columnModel[i].index;\n ind++;\n }\n }\n return ind;\n}\n/** @hidden */\nexport function prepareColumns(columns, autoWidth, gObj) {\n for (var c = 0, len = columns.length; c < len; c++) {\n var column = void 0;\n if (typeof columns[c] === 'string') {\n column = new Column({ field: columns[c] }, gObj);\n }\n else if (!(columns[c] instanceof Column)) {\n if (!columns[c].columns) {\n column = new Column(columns[c], gObj);\n }\n else {\n columns[c].columns = prepareColumns(columns[c].columns, null, gObj);\n column = new Column(columns[c], gObj);\n }\n }\n else {\n column = columns[c];\n }\n if (column.type && column.type.toLowerCase() === 'checkbox') {\n column.allowReordering = false;\n }\n column.headerText = isNullOrUndefined(column.headerText) ? column.foreignKeyValue || column.field || '' : column.headerText;\n column.foreignKeyField = column.foreignKeyField || column.field;\n column.valueAccessor = (typeof column.valueAccessor === 'string' ? getValue(column.valueAccessor, window)\n : column.valueAccessor) || valueAccessor;\n column.width = autoWidth && isNullOrUndefined(column.width) ? 200 : column.width;\n if (isNullOrUndefined(column.visible)) {\n column.visible = true;\n }\n columns[c] = column;\n }\n return columns;\n}\n/** @hidden */\nexport function setCssInGridPopUp(popUp, e, className) {\n var popUpSpan = popUp.querySelector('span');\n var position = popUp.parentElement.getBoundingClientRect();\n var targetPosition = e.target.getBoundingClientRect();\n var isBottomTail;\n popUpSpan.className = className;\n popUp.style.display = '';\n isBottomTail = (isNullOrUndefined(e.clientY) ? e.changedTouches[0].clientY :\n e.clientY) > popUp.offsetHeight + 10;\n popUp.style.top = targetPosition.top - position.top +\n (isBottomTail ? -(popUp.offsetHeight + 10) : popUp.offsetHeight + 10) + 'px'; //10px for tail element\n popUp.style.left = getPopupLeftPosition(popUp, e, targetPosition, position.left) + 'px';\n if (isBottomTail) {\n popUp.querySelector('.e-downtail').style.display = '';\n popUp.querySelector('.e-uptail').style.display = 'none';\n }\n else {\n popUp.querySelector('.e-downtail').style.display = 'none';\n popUp.querySelector('.e-uptail').style.display = '';\n }\n}\n/** @hidden */\nfunction getPopupLeftPosition(popup, e, targetPosition, left) {\n var width = popup.offsetWidth / 2;\n var x = getPosition(e).x;\n if (x - targetPosition.left < width) {\n return targetPosition.left - left;\n }\n else if (targetPosition.right - x < width) {\n return targetPosition.right - left - width * 2;\n }\n else {\n return x - left - width;\n }\n}\n/** @hidden */\nexport function getActualProperties(obj) {\n if (obj instanceof ChildProperty) {\n return getValue('properties', obj);\n }\n else {\n return obj;\n }\n}\n/** @hidden */\nexport function parentsUntil(elem, selector, isID) {\n var parent = elem;\n while (parent) {\n if (isID ? parent.id === selector : parent.classList.contains(selector)) {\n break;\n }\n parent = parent.parentElement;\n }\n return parent;\n}\n/** @hidden */\nexport function getElementIndex(element, elements) {\n var index = -1;\n for (var i = 0, len = elements.length; i < len; i++) {\n if (elements[i].isEqualNode(element)) {\n index = i;\n break;\n }\n }\n return index;\n}\n/** @hidden */\nexport function inArray(value, collection) {\n for (var i = 0, len = collection.length; i < len; i++) {\n if (collection[i] === value) {\n return i;\n }\n }\n return -1;\n}\n/** @hidden */\nexport function getActualPropFromColl(collection) {\n var coll = [];\n for (var i = 0, len = collection.length; i < len; i++) {\n if (collection[i].hasOwnProperty('properties')) {\n coll.push(collection[i].properties);\n }\n else {\n coll.push(collection[i]);\n }\n }\n return coll;\n}\n/** @hidden */\nexport function removeElement(target, selector) {\n var elements = [].slice.call(target.querySelectorAll(selector));\n for (var i = 0; i < elements.length; i++) {\n remove(elements[i]);\n }\n}\n/** @hidden */\nexport function getPosition(e) {\n var position = {};\n position.x = (isNullOrUndefined(e.clientX) ? e.changedTouches[0].clientX :\n e.clientX);\n position.y = (isNullOrUndefined(e.clientY) ? e.changedTouches[0].clientY :\n e.clientY);\n return position;\n}\nvar uid = 0;\n/** @hidden */\nexport function getUid(prefix) {\n return prefix + uid++;\n}\n/** @hidden */\nexport function appendChildren(elem, children) {\n for (var i = 0, len = children.length; i < len; i++) {\n if (len === children.length) {\n elem.appendChild(children[i]);\n }\n else {\n elem.appendChild(children[0]);\n }\n }\n return elem;\n}\n/** @hidden */\nexport function parents(elem, selector, isID) {\n var parent = elem;\n var parents = [];\n while (parent) {\n if (isID ? parent.id === selector : parent.classList.contains(selector)) {\n parents.push(parent);\n }\n parent = parent.parentElement;\n }\n return parents;\n}\n/** @hidden */\nexport function calculateAggregate(type, data, column, context) {\n if (type === 'Custom') {\n var temp = column.customAggregate;\n if (typeof temp === 'string') {\n temp = getValue(temp, window);\n }\n return temp ? temp.call(context, data, column) : '';\n }\n return (column.field in data || data instanceof Array) ? DataUtil.aggregates[type.toLowerCase()](data, column.field) : null;\n}\n/** @hidden */\nvar scrollWidth = null;\n/** @hidden */\nexport function getScrollBarWidth() {\n if (scrollWidth !== null) {\n return scrollWidth;\n }\n var divNode = document.createElement('div');\n var value = 0;\n divNode.style.cssText = 'width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;';\n document.body.appendChild(divNode);\n value = (divNode.offsetWidth - divNode.clientWidth) | 0;\n document.body.removeChild(divNode);\n return scrollWidth = value;\n}\n/** @hidden */\nvar rowHeight;\n/** @hidden */\nexport function getRowHeight(element) {\n if (rowHeight !== undefined) {\n return rowHeight;\n }\n var table = createElement('table', { className: 'e-table', styles: 'visibility: hidden' });\n table.innerHTML = 'A';\n element.appendChild(table);\n var rect = table.querySelector('td').getBoundingClientRect();\n element.removeChild(table);\n rowHeight = Math.ceil(rect.height);\n return rowHeight;\n}\n/** @hidden */\nvar actualRowHeight;\n/** @hidden */\nexport function getActualRowHeight(element) {\n if (actualRowHeight !== undefined) {\n return rowHeight;\n }\n var table = createElement('table', { className: 'e-table', styles: 'visibility: hidden' });\n table.innerHTML = 'A';\n element.appendChild(table);\n var rect = table.querySelector('tr').getBoundingClientRect();\n element.removeChild(table);\n return rect.height;\n}\n/** @hidden */\nexport function isComplexField(field) {\n return field.split('.').length > 1;\n}\n/** @hidden */\nexport function getComplexFieldID(field) {\n if (field === void 0) { field = ''; }\n return field.replace(/\\./g, '___');\n}\n/** @hidden */\nexport function setComplexFieldID(field) {\n if (field === void 0) { field = ''; }\n return field.replace(/___/g, '.');\n}\n/** @hidden */\nexport function isEditable(col, type, elem) {\n var row = parentsUntil(elem, 'e-row');\n var isOldRow = !row ? true : row && !row.classList.contains('e-insertedrow');\n if (type === 'beginEdit' && isOldRow) {\n if (col.isIdentity || col.isPrimaryKey || !col.allowEditing) {\n return false;\n }\n return true;\n }\n else if (type === 'add' && col.isIdentity) {\n return false;\n }\n else {\n if (isOldRow && !col.allowEditing && !col.isIdentity && !col.isPrimaryKey) {\n return false;\n }\n return true;\n }\n}\n/** @hidden */\nexport function isActionPrevent(inst) {\n var dlg = select('#' + inst.element.id + 'EditConfirm', inst.element);\n return inst.editSettings.mode === 'Batch' &&\n (selectAll('.e-updatedtd', inst.element).length) && inst.editSettings.showConfirmDialog &&\n (dlg ? dlg.classList.contains('e-popup-close') : true);\n}\n/** @hidden */\nexport function wrap(elem, action) {\n var clName = 'e-wrap';\n elem = elem instanceof Array ? elem : [elem];\n for (var i = 0; i < elem.length; i++) {\n action ? elem[i].classList.add(clName) : elem[i].classList.remove(clName);\n }\n}\n/** @hidden */\nexport function setFormatter(serviceLocator, column, isServerRendered) {\n var fmtr = serviceLocator.getService('valueFormatter');\n var format = 'format';\n var args;\n if (column.type === 'date' || column.type === 'datetime') {\n args = { type: column.type, skeleton: column.format };\n if (isBlazor() && isServerRendered) {\n var isServer = 'isServerRendered';\n args[isServer] = isServerRendered;\n }\n if ((typeof (column.format) === 'string') && column.format !== 'yMd') {\n args[format] = column.format;\n }\n }\n switch (column.type) {\n case 'date':\n column.setFormatter(fmtr.getFormatFunction(args));\n column.setParser(fmtr.getParserFunction(args));\n break;\n case 'datetime':\n column.setFormatter(fmtr.getFormatFunction(args));\n column.setParser(fmtr.getParserFunction(args));\n break;\n case 'number':\n column.setFormatter(fmtr.getFormatFunction({ format: column.format }));\n column.setParser(fmtr.getParserFunction({ format: column.format }));\n break;\n }\n}\n/** @hidden */\nexport function addRemoveActiveClasses(cells, add) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n for (var i = 0, len = cells.length; i < len; i++) {\n if (add) {\n classList(cells[i], args.slice(), []);\n cells[i].setAttribute('aria-selected', 'true');\n }\n else {\n classList(cells[i], [], args.slice());\n cells[i].removeAttribute('aria-selected');\n }\n }\n}\n/** @hidden */\nexport function distinctStringValues(result) {\n var temp = {};\n var res = [];\n for (var i = 0; i < result.length; i++) {\n if (!(result[i] in temp)) {\n res.push(result[i].toString());\n temp[result[i]] = 1;\n }\n }\n return res;\n}\n/** @hidden */\nexport function getFilterMenuPostion(target, dialogObj, grid) {\n var elementVisible = dialogObj.element.style.display;\n dialogObj.element.style.display = 'block';\n var dlgWidth = dialogObj.width;\n var newpos;\n newpos = calculateRelativeBasedPosition(target, dialogObj.element);\n dialogObj.element.style.display = elementVisible;\n dialogObj.element.style.top = (newpos.top + target.getBoundingClientRect().height) - 5 + 'px';\n var leftPos = ((newpos.left - dlgWidth) + target.clientWidth);\n if (leftPos < 1) {\n dialogObj.element.style.left = (dlgWidth + leftPos) - 16 + 'px'; // right calculation\n }\n else {\n dialogObj.element.style.left = leftPos + -4 + 'px';\n }\n}\n/** @hidden */\nexport function getZIndexCalcualtion(args, dialogObj) {\n args.popup.element.style.zIndex = (dialogObj.zIndex + 1).toString();\n}\n/** @hidden */\nexport function toogleCheckbox(elem) {\n var span = elem.querySelector('.e-frame');\n var input = span.previousSibling;\n if (span.classList.contains('e-check')) {\n input.checked = false;\n classList(span, ['e-uncheck'], ['e-check']);\n }\n else {\n input.checked = true;\n classList(span, ['e-check'], ['e-uncheck']);\n }\n}\n/** @hidden */\nexport function setChecked(elem, checked) {\n elem.checked = checked;\n}\n/** @hidden */\nexport function createCboxWithWrap(uid, elem, className) {\n var div = createElement('div', { className: className });\n div.appendChild(elem);\n div.setAttribute('uid', uid);\n return div;\n}\n/** @hidden */\nexport function removeAddCboxClasses(elem, checked) {\n removeClass([elem], ['e-check', 'e-stop', 'e-uncheck']);\n if (checked) {\n elem.classList.add('e-check');\n }\n else {\n elem.classList.add('e-uncheck');\n }\n}\n/**\n * Refresh the Row model's foreign data.\n * @param row - Grid Row model object.\n * @param columns - Foreign columns array.\n * @param data - Updated Row data.\n * @hidden\n */\nexport function refreshForeignData(row, columns, data) {\n for (var i = 0; i < columns.length; i++) {\n setValue(columns[i].field, getForeignData(columns[i], data), row.foreignKeyData);\n }\n var cells = row.cells;\n for (var i = 0; i < cells.length; i++) {\n if (cells[i].isForeignKey) {\n setValue('foreignKeyData', getValue(cells[i].column.field, row.foreignKeyData), cells[i]);\n }\n }\n}\n/**\n * Get the foreign data for the corresponding cell value.\n * @param column - Foreign Key column\n * @param data - Row data.\n * @param lValue - cell value.\n * @param foreignData - foreign data source.\n * @hidden\n */\nexport function getForeignData(column, data, lValue, foreignKeyData) {\n var fField = column.foreignKeyField;\n var key = (!isNullOrUndefined(lValue) ? lValue : valueAccessor(column.field, data, column));\n key = isNullOrUndefined(key) ? '' : key;\n var query = new Query();\n var fdata = foreignKeyData || ((column.dataSource instanceof DataManager) && column.dataSource.dataSource.json.length ?\n column.dataSource.dataSource.json : column.columnData);\n if (key.getDay) {\n query.where(getDatePredicate({ field: fField, operator: 'equal', value: key, matchCase: false }));\n }\n else {\n query.where(fField, '==', key, false);\n }\n return new DataManager(fdata).executeLocal(query);\n}\n/**\n * To use to get the column's object by the foreign key value.\n * @param foreignKeyValue - Defines ForeignKeyValue.\n * @param columns - Array of column object.\n * @hidden\n */\nexport function getColumnByForeignKeyValue(foreignKeyValue, columns) {\n var column;\n return columns.some(function (col) {\n column = col;\n return col.foreignKeyValue === foreignKeyValue;\n }) && column;\n}\n/**\n * @hidden\n * @param filterObject - Defines predicate model object\n */\nexport function getDatePredicate(filterObject, type) {\n var datePredicate;\n var prevDate;\n var nextDate;\n var prevObj = baseExtend({}, getActualProperties(filterObject));\n var nextObj = baseExtend({}, getActualProperties(filterObject));\n if (isNullOrUndefined(filterObject.value)) {\n datePredicate = new Predicate(prevObj.field, prevObj.operator, prevObj.value, false);\n return datePredicate;\n }\n var value = new Date(filterObject.value);\n if (filterObject.operator === 'equal' || filterObject.operator === 'notequal') {\n if (type === 'datetime') {\n prevDate = new Date(value.setSeconds(value.getSeconds() - 1));\n nextDate = new Date(value.setSeconds(value.getSeconds() + 2));\n filterObject.value = new Date(value.setSeconds(nextDate.getSeconds() - 1));\n }\n else {\n prevDate = new Date(value.setHours(0) - 1);\n nextDate = new Date(value.setHours(24));\n }\n prevObj.value = prevDate;\n nextObj.value = nextDate;\n if (filterObject.operator === 'equal') {\n prevObj.operator = 'greaterthan';\n nextObj.operator = 'lessthan';\n }\n else if (filterObject.operator === 'notequal') {\n prevObj.operator = 'lessthanorequal';\n nextObj.operator = 'greaterthanorequal';\n }\n var predicateSt = new Predicate(prevObj.field, prevObj.operator, prevObj.value, false);\n var predicateEnd = new Predicate(nextObj.field, nextObj.operator, nextObj.value, false);\n datePredicate = filterObject.operator === 'equal' ? predicateSt.and(predicateEnd) : predicateSt.or(predicateEnd);\n }\n else {\n if (typeof (prevObj.value) === 'string') {\n prevObj.value = new Date(prevObj.value);\n }\n var predicates = new Predicate(prevObj.field, prevObj.operator, prevObj.value, false);\n datePredicate = predicates;\n }\n if (filterObject.setProperties) {\n filterObject.setProperties({ ejpredicate: datePredicate }, true);\n }\n else {\n filterObject.ejpredicate = datePredicate;\n }\n return datePredicate;\n}\n/**\n * @hidden\n */\nexport function renderMovable(ele, frzCols, gObj) {\n frzCols = frzCols && gObj && gObj.isRowDragable() ? frzCols + 1 : frzCols;\n var mEle = ele.cloneNode(true);\n for (var i = 0; i < frzCols; i++) {\n mEle.removeChild(mEle.children[0]);\n }\n for (var i = frzCols, len = ele.childElementCount; i < len; i++) {\n ele.removeChild(ele.children[ele.childElementCount - 1]);\n }\n return mEle;\n}\n/**\n * @hidden\n */\nexport function isGroupAdaptive(grid) {\n return grid.enableVirtualization && grid.groupSettings.columns.length > 0 && grid.isVirtualAdaptive;\n}\n/**\n * @hidden\n */\nexport function getObject(field, object) {\n if (field === void 0) { field = ''; }\n if (field) {\n var value = object;\n var splits = field.split('.');\n for (var i = 0; i < splits.length && !isNullOrUndefined(value); i++) {\n value = value[splits[i]];\n }\n return value;\n }\n}\n/**\n * @hidden\n */\nexport function getCustomDateFormat(format, colType) {\n var intl = new Internationalization();\n var formatvalue;\n var formatter = 'format';\n var type = 'type';\n if (colType === 'date') {\n formatvalue = typeof (format) === 'object' ?\n intl.getDatePattern({ type: format[type] ? format[type] : 'date', format: format[formatter] }, false) :\n isBlazor() ? intl.getDatePattern({ type: 'dateTime', format: format }, false) :\n intl.getDatePattern({ type: 'dateTime', skeleton: format }, false);\n }\n else {\n formatvalue = typeof (format) === 'object' ?\n intl.getDatePattern({ type: format[type] ? format[type] : 'dateTime', format: format[formatter] }, false) :\n isBlazor() ? intl.getDatePattern({ type: 'dateTime', format: format }, false) :\n intl.getDatePattern({ type: 'dateTime', skeleton: format }, false);\n }\n return formatvalue;\n}\n/**\n * @hidden\n */\nexport function getExpandedState(gObj, hierarchyPrintMode) {\n var rows = gObj.getRowsObject();\n var obj = {};\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n if (row.isExpand && !row.isDetailRow) {\n var index = gObj.allowPaging && gObj.printMode === 'AllPages' ? row.index +\n (gObj.pageSettings.currentPage * gObj.pageSettings.pageSize) - gObj.pageSettings.pageSize : row.index;\n obj[index] = {};\n obj[index].isExpand = true;\n obj[index].gridModel = getPrintGridModel(row.childGrid, hierarchyPrintMode);\n obj[index].gridModel.query = gObj.childGrid.query;\n }\n }\n return obj;\n}\n/**\n * @hidden\n */\nexport function getPrintGridModel(gObj, hierarchyPrintMode) {\n if (hierarchyPrintMode === void 0) { hierarchyPrintMode = 'Expanded'; }\n var printGridModel = {};\n if (!gObj) {\n return printGridModel;\n }\n var isFrozen = gObj.isFrozenGrid() && !gObj.getFrozenColumns();\n for (var _i = 0, _a = Print.printGridProp; _i < _a.length; _i++) {\n var key = _a[_i];\n if (key === 'columns') {\n printGridModel[key] = getActualPropFromColl(isFrozen ? gObj.getColumns() : gObj[key]);\n }\n else if (key === 'allowPaging') {\n printGridModel[key] = gObj.printMode === 'CurrentPage';\n }\n else {\n printGridModel[key] = getActualProperties(gObj[key]);\n }\n }\n if (gObj.childGrid && hierarchyPrintMode !== 'None') {\n printGridModel.expandedRows = getExpandedState(gObj, hierarchyPrintMode);\n }\n return printGridModel;\n}\n/**\n * @hidden\n */\nexport function extendObjWithFn(copied, first, second, deep) {\n var res = copied || {};\n var len = arguments.length;\n if (deep) {\n len = len - 1;\n }\n for (var i = 1; i < len; i++) {\n if (!arguments[i]) {\n continue;\n }\n var obj1 = arguments[i];\n var keys = Object.keys(Object.getPrototypeOf(obj1)).length ?\n Object.keys(obj1).concat(getPrototypesOfObj(obj1)) : Object.keys(obj1);\n for (var i_1 = 0; i_1 < keys.length; i_1++) {\n var source = res[keys[i_1]];\n var cpy = obj1[keys[i_1]];\n var cln = void 0;\n if (deep && (isObject(cpy) || Array.isArray(cpy))) {\n if (isObject(cpy)) {\n cln = source ? source : {};\n res[keys[i_1]] = baseExtend({}, cln, cpy, deep);\n }\n else {\n cln = source ? source : [];\n res[keys[i_1]] = baseExtend([], cln, cpy, deep);\n }\n }\n else {\n res[keys[i_1]] = cpy;\n }\n }\n }\n return res;\n}\n/**\n * @hidden\n */\nfunction getPrototypesOfObj(obj) {\n var keys = [];\n while (Object.getPrototypeOf(obj) && Object.keys(Object.getPrototypeOf(obj)).length) {\n keys = keys.concat(Object.keys(Object.getPrototypeOf(obj)));\n obj = Object.getPrototypeOf(obj);\n }\n return keys;\n}\n/**\n * @hidden\n */\nexport function measureColumnDepth(column) {\n var max = 0;\n for (var i = 0; i < column.length; i++) {\n var depth = checkDepth(column[i], 0);\n if (max < depth) {\n max = depth;\n }\n }\n return max + 1;\n}\n/**\n * @hidden\n */\nexport function checkDepth(col, index) {\n var max = index;\n var indices = [];\n if (col.columns) {\n index++;\n for (var i = 0; i < col.columns.length; i++) {\n indices[i] = checkDepth(col.columns[i], index);\n }\n for (var j = 0; j < indices.length; j++) {\n if (max < indices[j]) {\n max = indices[j];\n }\n }\n index = max;\n }\n return index;\n}\n/**\n * @hidden\n */\nexport function refreshFilteredColsUid(gObj, filteredCols) {\n for (var i = 0; i < filteredCols.length; i++) {\n filteredCols[i].uid = filteredCols[i].isForeignKey ?\n getColumnByForeignKeyValue(filteredCols[i].field, gObj.getForeignKeyColumns()).uid\n : gObj.getColumnByField(filteredCols[i].field).uid;\n }\n}\n/** @hidden */\nexport var Global;\n(function (Global) {\n Global.timer = null;\n})(Global || (Global = {}));\n/**\n * @hidden\n */\nexport function getTransformValues(element) {\n var style = document.defaultView.getComputedStyle(element, null);\n var transformV = style.getPropertyValue('transform');\n var replacedTv = transformV.replace(/,/g, '');\n var translateX = parseFloat((replacedTv).split(' ')[4]);\n var translateY = parseFloat((replacedTv).split(' ')[5]);\n return { width: translateX, height: translateY };\n}\n/** @hidden */\nexport function applyBiggerTheme(rootElement, element) {\n if (rootElement.classList.contains('e-bigger')) {\n element.classList.add('e-bigger');\n }\n}\n/** @hidden */\nexport function alignFrozenEditForm(mTD, fTD) {\n if (mTD && fTD) {\n var mHeight = closest(mTD, '.e-row').getBoundingClientRect().height;\n var fHeight = closest(fTD, '.e-row').getBoundingClientRect().height;\n if (mHeight > fHeight) {\n fTD.style.height = mHeight + 'px';\n }\n else {\n mTD.style.height = fHeight + 'px';\n }\n }\n}\n/** @hidden */\nexport function ensureLastRow(row, gridObj) {\n var cntOffset = gridObj.getContent().firstElementChild.offsetHeight;\n return row && row.getBoundingClientRect().top > cntOffset;\n}\n/** @hidden */\nexport function ensureFirstRow(row, rowTop) {\n return row && row.getBoundingClientRect().top < rowTop;\n}\n/** @hidden */\nexport function isRowEnteredInGrid(index, gObj) {\n var rowHeight = gObj.getRowHeight();\n var startIndex = gObj.getContent().firstElementChild.scrollTop / rowHeight;\n var endIndex = startIndex + (gObj.getContent().firstElementChild.offsetHeight / rowHeight);\n return index < endIndex && index > startIndex;\n}\n/** @hidden */\nexport function getEditedDataIndex(gObj, data) {\n var keyField = gObj.getPrimaryKeyFieldNames()[0];\n var dataIndex;\n gObj.getCurrentViewRecords().filter(function (e, index) {\n if (e[keyField] === data[keyField]) {\n dataIndex = index;\n }\n });\n return dataIndex;\n}\n/** @hidden */\nexport function eventPromise(args, query) {\n var state;\n state = getStateEventArgument(query);\n var def = new Deferred();\n state.dataSource = def.resolve;\n state.action = args;\n return { state: state, deffered: def };\n}\n/** @hidden */\nexport function getStateEventArgument(query) {\n var adaptr = new UrlAdaptor();\n var dm = new DataManager({ url: '', adaptor: new UrlAdaptor });\n var state = adaptr.processQuery(dm, query);\n var data = JSON.parse(state.data);\n return data;\n}\n/** @hidden */\nexport function ispercentageWidth(gObj) {\n var columns = gObj.getVisibleColumns();\n var percentageCol = 0;\n var undefinedWidthCol = 0;\n for (var i = 0; i < columns.length; i++) {\n if (isUndefined(columns[i].width)) {\n undefinedWidthCol++;\n }\n else if (columns[i].width.toString().indexOf('%') !== -1) {\n percentageCol++;\n }\n }\n return (gObj.width === 'auto' || typeof (gObj.width) === 'string' && gObj.width.indexOf('%') !== -1) && Browser.info.name !== 'chrome'\n && !gObj.groupSettings.showGroupedColumn && gObj.groupSettings.columns.length\n && percentageCol && !undefinedWidthCol;\n}\n/** @hidden */\nexport function resetRowIndex(gObj, rows, rowElms, index) {\n var startIndex = index ? index : 0;\n for (var i = 0; i < rows.length; i++) {\n if (rows[i].isDataRow) {\n rows[i].index = startIndex;\n rows[i].isAltRow = gObj.enableAltRow ? startIndex % 2 !== 0 : false;\n rowElms[i].setAttribute('aria-rowindex', startIndex.toString());\n rows[i].isAltRow ? rowElms[i].classList.add('e-altrow') : rowElms[i].classList.remove('e-altrow');\n for (var j = 0; j < rowElms[i].cells.length; j++) {\n rowElms[i].cells[j].setAttribute('index', startIndex.toString());\n }\n startIndex++;\n }\n }\n if (!rows.length) {\n gObj.renderModule.emptyRow(true);\n }\n}\n/** @hidden */\nexport function resetRowObjectIndex(gObj, rows, index) {\n var startIndex = index ? index : 0;\n for (var i = 0; i < rows.length; i++) {\n rows[i].index = startIndex;\n startIndex++;\n }\n}\n/** @hidden */\nexport function compareChanges(gObj, changes, type, keyField) {\n var newArray = gObj.dataToBeUpdated[type].concat(changes[type]).reduce(function (r, o) {\n r[o[keyField]] = r[o[keyField]] === undefined ? o : Object.assign(r[o[keyField]], o);\n return r;\n }, {});\n gObj.dataToBeUpdated[type] = Object.keys(newArray).map(function (k) { return newArray[k]; });\n}\n/** @hidden */\nexport function setRowElements(gObj) {\n if (gObj.isFrozenGrid()) {\n (gObj).contentModule.rowElements =\n [].slice.call(gObj.element.querySelectorAll('.e-movableheader .e-row, .e-movablecontent .e-row'));\n var cls = gObj.getFrozenMode() === 'Left-Right' ? '.e-frozen-left-header .e-row, .e-frozen-left-content .e-row'\n : '.e-frozenheader .e-row, .e-frozencontent .e-row';\n (gObj).contentModule.freezeRowElements =\n [].slice.call(gObj.element.querySelectorAll(cls));\n if (gObj.getFrozenMode() === 'Left-Right') {\n gObj.contentModule.frozenRightRowElements =\n [].slice.call(gObj.element.querySelectorAll('.e-frozen-right-header .e-row, .e-frozen-right-content .e-row'));\n }\n }\n else {\n (gObj).contentModule.rowElements =\n [].slice.call(gObj.element.querySelectorAll('.e-row:not(.e-addedrow)'));\n }\n}\n/** @hidden */\nexport function splitFrozenRowObjectCells(gObj, cells, tableName) {\n var left = gObj.getFrozenLeftCount();\n var movable = gObj.getMovableColumnsCount();\n var right = gObj.getFrozenRightColumnsCount();\n var frozenMode = gObj.getFrozenMode();\n var drag = gObj.isRowDragable() ? 1 : 0;\n var rightIndex = frozenMode === 'Right' ? left + movable : left + movable + drag;\n var mvblIndex = frozenMode === 'Right' ? left : left + drag;\n var mvblEndIdx = frozenMode === 'Right' ? cells.length - right - drag\n : right ? cells.length - right : cells.length;\n if (tableName === 'frozen-left') {\n cells = cells.slice(0, left ? left + drag : cells.length);\n }\n else if (tableName === 'frozen-right') {\n cells = cells.slice(rightIndex, cells.length);\n }\n else if (tableName === 'movable') {\n cells = cells.slice(mvblIndex, mvblEndIdx);\n }\n return cells;\n}\n/** @hidden */\nexport function gridActionHandler(gObj, callBack, rows, force, rowObj) {\n if (rows[0].length || force) {\n rowObj ? callBack('frozen-left', rows[0], rowObj[0]) : callBack('frozen-left', rows[0]);\n }\n if (gObj.isFrozenGrid() && (rows[1].length || force)) {\n rowObj ? callBack('movable', rows[1], rowObj[1]) : callBack('movable', rows[1]);\n }\n if ((gObj.getFrozenMode() === 'Left-Right' || gObj.getFrozenMode() === 'Right') && (rows[2].length || force)) {\n rowObj ? callBack('frozen-right', rows[2], rowObj[2]) : callBack('frozen-right', rows[2]);\n }\n}\n/** @hidden */\nexport function getGridRowObjects(gObj) {\n return [gObj.getFrozenMode() !== 'Right' ? gObj.getRowsObject() : [], gObj.getMovableRowsObject(), gObj.getFrozenRightRowsObject()];\n}\n/** @hidden */\nexport function getGridRowElements(gObj) {\n return [\n gObj.getFrozenMode() !== 'Right' ? gObj.getAllDataRows(true) : [],\n gObj.getAllMovableDataRows(true), gObj.getAllFrozenRightDataRows(true)\n ];\n}\n/** @hidden */\nexport function sliceElements(row, start, end) {\n var cells = row.children;\n var len = cells.length;\n var k = 0;\n for (var i = 0; i < len; i++, k++) {\n if (i >= start && i < end) {\n continue;\n }\n row.removeChild(row.children[k]);\n k--;\n }\n}\n/** @hidden */\nexport function getCellsByTableName(gObj, col, rowIndex) {\n if (col.getFreezeTableName() === 'movable') {\n return [].slice.call(gObj.getMovableDataRows()[rowIndex].querySelectorAll('.e-rowcell'));\n }\n else if (col.getFreezeTableName() === 'frozen-right') {\n return [].slice.call(gObj.getFrozenRightDataRows()[rowIndex].querySelectorAll('.e-rowcell'));\n }\n else {\n return [].slice.call(gObj.getDataRows()[rowIndex].querySelectorAll('.e-rowcell'));\n }\n}\n/** @hidden */\nexport function getCellByColAndRowIndex(gObj, col, rowIndex, index) {\n var left = gObj.getFrozenLeftCount();\n var movable = gObj.getMovableColumnsCount();\n index = col.getFreezeTableName() === 'movable' ? index - left : col.getFreezeTableName() === 'frozen-right'\n ? index - (left + movable) : index;\n return getCellsByTableName(gObj, col, rowIndex)[index];\n}\n/** @hidden */\nexport function setValidationRuels(col, index, rules, mRules, frRules, len) {\n if (col.getFreezeTableName() === 'frozen-left' || (!index && col.getFreezeTableName() === 'frozen-right') || len === 1) {\n rules[getComplexFieldID(col.field)] = col.validationRules;\n }\n else if (col.getFreezeTableName() === 'movable' || !col.getFreezeTableName()) {\n mRules[getComplexFieldID(col.field)] = col.validationRules;\n }\n else if (col.getFreezeTableName() === 'frozen-right') {\n frRules[getComplexFieldID(col.field)] = col.validationRules;\n }\n}\n/** @hidden */\nexport function getMovableTbody(gObj) {\n var tbody;\n if (gObj.isFrozenGrid()) {\n tbody = gObj.frozenRows && gObj.editSettings.newRowPosition === 'Top' ? gObj.getMovableHeaderTbody()\n : gObj.getMovableContentTbody();\n }\n return tbody;\n}\n/** @hidden */\nexport function getFrozenRightTbody(gObj) {\n var tbody;\n if (gObj.getFrozenMode() === 'Left-Right') {\n tbody = gObj.frozenRows && gObj.editSettings.newRowPosition === 'Top' ? gObj.getFrozenRightHeaderTbody()\n : gObj.getFrozenRightContentTbody();\n }\n return tbody;\n}\nexport function setRowsInTbody(tbody, mTbody, frTbody, tr, mTr, frTr, callBack) {\n if (tbody && tr) {\n callBack(tbody, tr);\n }\n if (mTbody && mTr) {\n callBack(mTbody, mTr);\n }\n if (frTbody && frTr) {\n callBack(frTbody, frTr);\n }\n}\n/** @hidden */\nexport function getNumberFormat(numberFormat, type, isExcel) {\n var format;\n var intl = new Internationalization();\n if (type === 'number') {\n try {\n format = intl.getNumberPattern({ format: numberFormat, currency: this.currency, useGrouping: true }, true);\n }\n catch (error) {\n format = numberFormat;\n }\n }\n else if (type === 'date' || type === 'time' || type === 'datetime') {\n try {\n format = intl.getDatePattern({ skeleton: numberFormat, type: type }, isExcel);\n if (isNullOrUndefined(format)) {\n throw 'error';\n }\n }\n catch (error) {\n try {\n format = intl.getDatePattern({ format: numberFormat, type: type }, isExcel);\n }\n catch (error) {\n format = numberFormat;\n }\n }\n }\n else {\n format = numberFormat;\n }\n if (type !== 'number') {\n var patternRegex = /G|H|c|'| a|yy|y|EEEE|E/g;\n var mtch_1 = { 'G': '', 'H': 'h', 'c': 'd', '\\'': '\"', ' a': ' AM/PM', 'yy': 'yy', 'y': 'yyyy', 'EEEE': 'dddd', 'E': 'ddd' };\n format = format.replace(patternRegex, function (pattern) {\n return mtch_1[pattern];\n });\n }\n return format;\n}\n/** @hidden */\nexport function addBiggerDialog(gObj) {\n if (gObj.enableAdaptiveUI) {\n var dialogs = document.getElementsByClassName('e-responsive-dialog');\n for (var i = 0; i < dialogs.length; i++) {\n dialogs[i].classList.add('e-bigger');\n }\n }\n}\n/** @hidden */\nexport function performComplexDataOperation(value, mapObject) {\n var returnObj;\n var length = value.split('.').length;\n var splits = value.split('.');\n var duplicateMap = mapObject;\n for (var i = 0; i < length; i++) {\n returnObj = duplicateMap[splits[i]];\n duplicateMap = returnObj;\n }\n return returnObj;\n}\n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { DataManager } from './manager';\nimport { Query } from './query';\nvar consts = { GroupGuid: '{271bbba0-1ee7}' };\n/**\n * Data manager common utility methods.\n * @hidden\n */\nvar DataUtil = /** @class */ (function () {\n function DataUtil() {\n }\n /**\n * Returns the value by invoking the provided parameter function.\n * If the paramater is not of type function then it will be returned as it is.\n * @param {Function|string|string[]|number} value\n * @param {Object} inst?\n * @hidden\n */\n DataUtil.getValue = function (value, inst) {\n if (typeof value === 'function') {\n return value.call(inst || {});\n }\n return value;\n };\n /**\n * Returns true if the input string ends with given string.\n * @param {string} input\n * @param {string} substr\n */\n DataUtil.endsWith = function (input, substr) {\n return input.slice && input.slice(-substr.length) === substr;\n };\n /**\n * Returns true if the input string starts with given string.\n * @param {string} str\n * @param {string} startstr\n */\n DataUtil.startsWith = function (input, start) {\n return input.slice(0, start.length) === start;\n };\n /**\n * To return the sorting function based on the string.\n * @param {string} order\n * @hidden\n */\n DataUtil.fnSort = function (order) {\n order = order ? DataUtil.toLowerCase(order) : 'ascending';\n if (order === 'ascending') {\n return this.fnAscending;\n }\n return this.fnDescending;\n };\n /**\n * Comparer function which is used to sort the data in ascending order.\n * @param {string|number} x\n * @param {string|number} y\n * @returns number\n */\n DataUtil.fnAscending = function (x, y) {\n if (isNullOrUndefined(x) && isNullOrUndefined(y)) {\n return -1;\n }\n if (y === null || y === undefined) {\n return -1;\n }\n if (typeof x === 'string') {\n return x.localeCompare(y);\n }\n if (x === null || x === undefined) {\n return 1;\n }\n return x - y;\n };\n /**\n * Comparer function which is used to sort the data in descending order.\n * @param {string|number} x\n * @param {string|number} y\n * @returns number\n */\n DataUtil.fnDescending = function (x, y) {\n if (isNullOrUndefined(x) && isNullOrUndefined(y)) {\n return -1;\n }\n if (y === null || y === undefined) {\n return 1;\n }\n if (typeof x === 'string') {\n return x.localeCompare(y) * -1;\n }\n if (x === null || x === undefined) {\n return -1;\n }\n return y - x;\n };\n DataUtil.extractFields = function (obj, fields) {\n var newObj = {};\n for (var i = 0; i < fields.length; i++) {\n newObj = this.setValue(fields[i], this.getObject(fields[i], obj), newObj);\n }\n return newObj;\n };\n /**\n * Select objects by given fields from jsonArray.\n * @param {Object[]} jsonArray\n * @param {string[]} fields\n */\n DataUtil.select = function (jsonArray, fields) {\n var newData = [];\n for (var i = 0; i < jsonArray.length; i++) {\n newData.push(this.extractFields(jsonArray[i], fields));\n }\n return newData;\n };\n /**\n * Group the input data based on the field name.\n * It also performs aggregation of the grouped records based on the aggregates paramater.\n * @param {Object[]} jsonArray\n * @param {string} field?\n * @param {Object[]} agg?\n * @param {number} level?\n * @param {Object[]} groupDs?\n */\n DataUtil.group = function (jsonArray, field, aggregates, level, groupDs, format, isLazyLoad) {\n level = level || 1;\n var jsonData = jsonArray;\n var guid = 'GroupGuid';\n if (jsonData.GroupGuid === consts[guid]) {\n var _loop_1 = function (j) {\n if (!isNullOrUndefined(groupDs)) {\n var indx = -1;\n var temp = groupDs.filter(function (e) { return e.key === jsonData[j].key; });\n indx = groupDs.indexOf(temp[0]);\n jsonData[j].items = this_1.group(jsonData[j].items, field, aggregates, jsonData.level + 1, groupDs[indx].items, format, isLazyLoad);\n jsonData[j].count = groupDs[indx].count;\n }\n else {\n jsonData[j].items = this_1.group(jsonData[j].items, field, aggregates, jsonData.level + 1, null, format, isLazyLoad);\n jsonData[j].count = jsonData[j].items.length;\n }\n };\n var this_1 = this;\n for (var j = 0; j < jsonData.length; j++) {\n _loop_1(j);\n }\n jsonData.childLevels += 1;\n return jsonData;\n }\n var grouped = {};\n var groupedArray = [];\n groupedArray.GroupGuid = consts[guid];\n groupedArray.level = level;\n groupedArray.childLevels = 0;\n groupedArray.records = jsonData;\n var _loop_2 = function (i) {\n var val = this_2.getVal(jsonData, i, field);\n if (!isNullOrUndefined(format)) {\n val = format(val, field);\n }\n if (!grouped[val]) {\n grouped[val] = {\n key: val,\n count: 0,\n items: [],\n aggregates: {},\n field: field\n };\n groupedArray.push(grouped[val]);\n if (!isNullOrUndefined(groupDs)) {\n var tempObj = groupDs.filter(function (e) { return e.key === grouped[val].key; });\n grouped[val].count = tempObj[0].count;\n }\n }\n grouped[val].count = !isNullOrUndefined(groupDs) ? grouped[val].count : grouped[val].count += 1;\n if (!isLazyLoad || (isLazyLoad && aggregates.length)) {\n grouped[val].items.push(jsonData[i]);\n }\n };\n var this_2 = this;\n for (var i = 0; i < jsonData.length; i++) {\n _loop_2(i);\n }\n if (aggregates && aggregates.length) {\n var _loop_3 = function (i) {\n var res = {};\n var fn = void 0;\n var aggs = aggregates;\n for (var j = 0; j < aggregates.length; j++) {\n fn = DataUtil.aggregates[aggregates[j].type];\n if (!isNullOrUndefined(groupDs)) {\n var temp = groupDs.filter(function (e) { return e.key === groupedArray[i].key; });\n if (fn) {\n res[aggs[j].field + ' - ' + aggs[j].type] = fn(temp[0].items, aggs[j].field);\n }\n }\n else {\n if (fn) {\n res[aggs[j].field + ' - ' + aggs[j].type] = fn(groupedArray[i].items, aggs[j].field);\n }\n }\n }\n groupedArray[i].aggregates = res;\n };\n for (var i = 0; i < groupedArray.length; i++) {\n _loop_3(i);\n }\n }\n if (isLazyLoad && groupedArray.length && aggregates.length) {\n for (var i = 0; i < groupedArray.length; i++) {\n groupedArray[i].items = [];\n }\n }\n return jsonData.length && groupedArray || jsonData;\n };\n /**\n * It is used to categorize the multiple items based on a specific field in jsonArray.\n * The hierarchical queries are commonly required when you use foreign key binding.\n * @param {string} fKey\n * @param {string} from\n * @param {Object[]} source\n * @param {Group} lookup?\n * @param {string} pKey?\n * @hidden\n */\n DataUtil.buildHierarchy = function (fKey, from, source, lookup, pKey) {\n var i;\n var grp = {};\n var temp;\n if (lookup.result) {\n lookup = lookup.result;\n }\n if (lookup.GroupGuid) {\n this.throwError('DataManager: Do not have support Grouping in hierarchy');\n }\n for (i = 0; i < lookup.length; i++) {\n var fKeyData = this.getObject(fKey, lookup[i]);\n temp = grp[fKeyData] || (grp[fKeyData] = []);\n temp.push(lookup[i]);\n }\n for (i = 0; i < source.length; i++) {\n var fKeyData = this.getObject(pKey || fKey, source[i]);\n source[i][from] = grp[fKeyData];\n }\n };\n /**\n * The method used to get the field names which started with specified characters.\n * @param {Object} obj\n * @param {string[]} fields?\n * @param {string} prefix?\n * @hidden\n */\n DataUtil.getFieldList = function (obj, fields, prefix) {\n if (prefix === undefined) {\n prefix = '';\n }\n if (fields === undefined || fields === null) {\n return this.getFieldList(obj, [], prefix);\n }\n var copyObj = obj;\n var keys = Object.keys(obj);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var prop = keys_1[_i];\n if (typeof copyObj[prop] === 'object' && !(copyObj[prop] instanceof Array)) {\n this.getFieldList(copyObj[prop], fields, prefix + prop + '.');\n }\n else {\n fields.push(prefix + prop);\n }\n }\n return fields;\n };\n /**\n * Gets the value of the property in the given object.\n * The complex object can be accessed by providing the field names concatenated with dot(.).\n * @param {string} nameSpace - The name of the property to be accessed.\n * @param {Object} from - Defines the source object.\n */\n DataUtil.getObject = function (nameSpace, from) {\n if (!nameSpace) {\n return from;\n }\n if (!from) {\n return undefined;\n }\n if (nameSpace.indexOf('.') === -1) {\n return from[nameSpace];\n }\n var value = from;\n var splits = nameSpace.split('.');\n for (var i = 0; i < splits.length; i++) {\n if (value == null) {\n break;\n }\n value = value[splits[i]];\n }\n return value;\n };\n /**\n * To set value for the nameSpace in desired object.\n * @param {string} nameSpace - String value to the get the inner object.\n * @param {Object} value - Value that you need to set.\n * @param {Object} obj - Object to get the inner object value.\n * @return { [key: string]: Object; } | Object\n * @hidden\n */\n DataUtil.setValue = function (nameSpace, value, obj) {\n var keys = nameSpace.toString().split('.');\n var start = obj || {};\n var fromObj = start;\n var i;\n var length = keys.length;\n var key;\n for (i = 0; i < length; i++) {\n key = keys[i];\n if (i + 1 === length) {\n fromObj[key] = value === undefined ? undefined : value;\n }\n else if (isNullOrUndefined(fromObj[key])) {\n fromObj[key] = {};\n }\n fromObj = fromObj[key];\n }\n return start;\n };\n /**\n * Sort the given data based on the field and comparer.\n * @param {Object[]} ds - Defines the input data.\n * @param {string} field - Defines the field to be sorted.\n * @param {Function} comparer - Defines the comparer function used to sort the records.\n */\n DataUtil.sort = function (ds, field, comparer) {\n if (ds.length <= 1) {\n return ds;\n }\n var middle = parseInt((ds.length / 2).toString(), 10);\n var left = ds.slice(0, middle);\n var right = ds.slice(middle);\n left = this.sort(left, field, comparer);\n right = this.sort(right, field, comparer);\n return this.merge(left, right, field, comparer);\n };\n DataUtil.ignoreDiacritics = function (value) {\n if (typeof value !== 'string') {\n return value;\n }\n var result = value.split('');\n var newValue = result.map(function (temp) { return temp in DataUtil.diacritics ? DataUtil.diacritics[temp] : temp; });\n return newValue.join('');\n };\n DataUtil.merge = function (left, right, fieldName, comparer) {\n var result = [];\n var current;\n while (left.length > 0 || right.length > 0) {\n if (left.length > 0 && right.length > 0) {\n if (comparer) {\n current = comparer(this.getVal(left, 0, fieldName), this.getVal(right, 0, fieldName), left[0], right[0]) <= 0 ? left : right;\n }\n else {\n current = left[0][fieldName] < left[0][fieldName] ? left : right;\n }\n }\n else {\n current = left.length > 0 ? left : right;\n }\n result.push(current.shift());\n }\n return result;\n };\n DataUtil.getVal = function (array, index, field) {\n return field ? this.getObject(field, array[index]) : array[index];\n };\n DataUtil.toLowerCase = function (val) {\n return val ? typeof val === 'string' ? val.toLowerCase() : val.toString() : (val === 0 || val === false) ? val.toString() : '';\n };\n /**\n * To perform the filter operation with specified adaptor and returns the result.\n * @param {Object} adaptor\n * @param {string} fnName\n * @param {Object} param1?\n * @param {Object} param2?\n * @hidden\n */\n DataUtil.callAdaptorFunction = function (adaptor, fnName, param1, param2) {\n if (fnName in adaptor) {\n var res = adaptor[fnName](param1, param2);\n if (!isNullOrUndefined(res)) {\n param1 = res;\n }\n }\n return param1;\n };\n DataUtil.getAddParams = function (adp, dm, query) {\n var req = {};\n DataUtil.callAdaptorFunction(adp, 'addParams', {\n dm: dm,\n query: query,\n params: query.params,\n reqParams: req\n });\n return req;\n };\n /**\n * Checks wheather the given input is a plain object or not.\n * @param {Object|Object[]} obj\n */\n DataUtil.isPlainObject = function (obj) {\n return (!!obj) && (obj.constructor === Object);\n };\n /**\n * Returns true when the browser cross origin request.\n */\n DataUtil.isCors = function () {\n var xhr = null;\n var request = 'XMLHttpRequest';\n try {\n xhr = new window[request]();\n }\n catch (e) {\n // No exception handling\n }\n return !!xhr && ('withCredentials' in xhr);\n };\n /**\n * Generate random GUID value which will be prefixed with the given value.\n * @param {string} prefix\n */\n DataUtil.getGuid = function (prefix) {\n var hexs = '0123456789abcdef';\n var rand;\n return (prefix || '') + '00000000-0000-4000-0000-000000000000'.replace(/0/g, function (val, i) {\n if ('crypto' in window && 'getRandomValues' in crypto) {\n var arr = new Uint8Array(1);\n window.crypto.getRandomValues(arr);\n rand = arr[0] % 16 | 0;\n }\n else {\n rand = Math.random() * 16 | 0;\n }\n return hexs[i === 19 ? rand & 0x3 | 0x8 : rand];\n });\n };\n /**\n * Checks wheather the given value is null or not.\n * @param {string|Object} val\n * @returns boolean\n */\n DataUtil.isNull = function (val) {\n return val === undefined || val === null;\n };\n /**\n * To get the required items from collection of objects.\n * @param {Object[]} array\n * @param {string} field\n * @param {Function} comparer\n * @returns Object\n * @hidden\n */\n DataUtil.getItemFromComparer = function (array, field, comparer) {\n var keyVal;\n var current;\n var key;\n var i = 0;\n var castRequired = typeof DataUtil.getVal(array, 0, field) === 'string';\n if (array.length) {\n while (isNullOrUndefined(keyVal) && i < array.length) {\n keyVal = DataUtil.getVal(array, i, field);\n key = array[i++];\n }\n }\n for (; i < array.length; i++) {\n current = DataUtil.getVal(array, i, field);\n if (isNullOrUndefined(current)) {\n continue;\n }\n if (castRequired) {\n keyVal = +keyVal;\n current = +current;\n }\n if (comparer(keyVal, current) > 0) {\n keyVal = current;\n key = array[i];\n }\n }\n return key;\n };\n /**\n * To get distinct values of Array or Array of Objects.\n * @param {Object[]} json\n * @param {string} field\n * @param {boolean} requiresCompleteRecord\n * @returns Object[]\n * * distinct array of objects is return when requiresCompleteRecord set as true.\n * @hidden\n */\n DataUtil.distinct = function (json, fieldName, requiresCompleteRecord) {\n requiresCompleteRecord = isNullOrUndefined(requiresCompleteRecord) ? false : requiresCompleteRecord;\n var result = [];\n var val;\n var tmp = {};\n json.forEach(function (data, index) {\n val = typeof (json[index]) === 'object' ? DataUtil.getVal(json, index, fieldName) : json[index];\n if (!(val in tmp)) {\n result.push(!requiresCompleteRecord ? val : json[index]);\n tmp[val] = 1;\n }\n });\n return result;\n };\n /**\n * Specifies the value which will be used to adjust the date value to server timezone.\n * @default null\n */\n DataUtil.serverTimezoneOffset = null;\n /**\n * Species whether are not to be parsed with serverTimezoneOffset value.\n * @hidden\n */\n DataUtil.timeZoneHandling = true;\n /**\n * Throw error with the given string as message.\n * @param {string} er\n */\n DataUtil.throwError = function (error) {\n try {\n throw new Error(error);\n }\n catch (e) {\n throw e.message + '\\n' + e.stack;\n }\n };\n DataUtil.aggregates = {\n /**\n * Calculate sum of the given field in the data.\n * @param {Object[]} ds\n * @param {string} field\n */\n sum: function (ds, field) {\n var result = 0;\n var val;\n var castRequired = typeof DataUtil.getVal(ds, 0, field) !== 'number';\n for (var i = 0; i < ds.length; i++) {\n val = DataUtil.getVal(ds, i, field);\n if (!isNaN(val) && val !== null) {\n if (castRequired) {\n val = +val;\n }\n result += val;\n }\n }\n return result;\n },\n /**\n * Calculate average value of the given field in the data.\n * @param {Object[]} ds\n * @param {string} field\n */\n average: function (ds, field) {\n return DataUtil.aggregates.sum(ds, field) / ds.length;\n },\n /**\n * Returns the min value of the data based on the field.\n * @param {Object[]} ds\n * @param {string|Function} field\n */\n min: function (ds, field) {\n var comparer;\n if (typeof field === 'function') {\n comparer = field;\n field = null;\n }\n return DataUtil.getObject(field, DataUtil.getItemFromComparer(ds, field, comparer || DataUtil.fnAscending));\n },\n /**\n * Returns the max value of the data based on the field.\n * @param {Object[]} ds\n * @param {string} field\n * @returns number\n */\n max: function (ds, field) {\n var comparer;\n if (typeof field === 'function') {\n comparer = field;\n field = null;\n }\n return DataUtil.getObject(field, DataUtil.getItemFromComparer(ds, field, comparer || DataUtil.fnDescending));\n },\n /**\n * Returns the total number of true value present in the data based on the given boolean field name.\n * @param {Object[]} ds\n * @param {string} field\n */\n truecount: function (ds, field) {\n return new DataManager(ds).executeLocal(new Query().where(field, 'equal', true, true)).length;\n },\n /**\n * Returns the total number of false value present in the data based on the given boolean field name.\n * @param {Object[]} ds\n * @param {string} field\n */\n falsecount: function (ds, field) {\n return new DataManager(ds).executeLocal(new Query().where(field, 'equal', false, true)).length;\n },\n /**\n * Returns the length of the given data.\n * @param {Object[]} ds\n * @param {string} field?\n * @returns number\n */\n count: function (ds, field) {\n return ds.length;\n }\n };\n /**\n * Specifies the Object with filter operators.\n */\n DataUtil.operatorSymbols = {\n '<': 'lessthan',\n '>': 'greaterthan',\n '<=': 'lessthanorequal',\n '>=': 'greaterthanorequal',\n '==': 'equal',\n '!=': 'notequal',\n '*=': 'contains',\n '$=': 'endswith',\n '^=': 'startswith'\n };\n /**\n * Specifies the Object with filter operators which will be used for OData filter query generation.\n * * It will be used for date/number type filter query.\n */\n DataUtil.odBiOperator = {\n '<': ' lt ',\n '>': ' gt ',\n '<=': ' le ',\n '>=': ' ge ',\n '==': ' eq ',\n '!=': ' ne ',\n 'lessthan': ' lt ',\n 'lessthanorequal': ' le ',\n 'greaterthan': ' gt ',\n 'greaterthanorequal': ' ge ',\n 'equal': ' eq ',\n 'notequal': ' ne '\n };\n /**\n * Specifies the Object with filter operators which will be used for OData filter query generation.\n * It will be used for string type filter query.\n */\n DataUtil.odUniOperator = {\n '$=': 'endswith',\n '^=': 'startswith',\n '*=': 'substringof',\n 'endswith': 'endswith',\n 'startswith': 'startswith',\n 'contains': 'substringof'\n };\n /**\n * Specifies the Object with filter operators which will be used for ODataV4 filter query generation.\n * It will be used for string type filter query.\n */\n DataUtil.odv4UniOperator = {\n '$=': 'endswith',\n '^=': 'startswith',\n '*=': 'contains',\n 'endswith': 'endswith',\n 'startswith': 'startswith',\n 'contains': 'contains'\n };\n DataUtil.diacritics = {\n '\\u24B6': 'A',\n '\\uFF21': 'A',\n '\\u00C0': 'A',\n '\\u00C1': 'A',\n '\\u00C2': 'A',\n '\\u1EA6': 'A',\n '\\u1EA4': 'A',\n '\\u1EAA': 'A',\n '\\u1EA8': 'A',\n '\\u00C3': 'A',\n '\\u0100': 'A',\n '\\u0102': 'A',\n '\\u1EB0': 'A',\n '\\u1EAE': 'A',\n '\\u1EB4': 'A',\n '\\u1EB2': 'A',\n '\\u0226': 'A',\n '\\u01E0': 'A',\n '\\u00C4': 'A',\n '\\u01DE': 'A',\n '\\u1EA2': 'A',\n '\\u00C5': 'A',\n '\\u01FA': 'A',\n '\\u01CD': 'A',\n '\\u0200': 'A',\n '\\u0202': 'A',\n '\\u1EA0': 'A',\n '\\u1EAC': 'A',\n '\\u1EB6': 'A',\n '\\u1E00': 'A',\n '\\u0104': 'A',\n '\\u023A': 'A',\n '\\u2C6F': 'A',\n '\\uA732': 'AA',\n '\\u00C6': 'AE',\n '\\u01FC': 'AE',\n '\\u01E2': 'AE',\n '\\uA734': 'AO',\n '\\uA736': 'AU',\n '\\uA738': 'AV',\n '\\uA73A': 'AV',\n '\\uA73C': 'AY',\n '\\u24B7': 'B',\n '\\uFF22': 'B',\n '\\u1E02': 'B',\n '\\u1E04': 'B',\n '\\u1E06': 'B',\n '\\u0243': 'B',\n '\\u0182': 'B',\n '\\u0181': 'B',\n '\\u24B8': 'C',\n '\\uFF23': 'C',\n '\\u0106': 'C',\n '\\u0108': 'C',\n '\\u010A': 'C',\n '\\u010C': 'C',\n '\\u00C7': 'C',\n '\\u1E08': 'C',\n '\\u0187': 'C',\n '\\u023B': 'C',\n '\\uA73E': 'C',\n '\\u24B9': 'D',\n '\\uFF24': 'D',\n '\\u1E0A': 'D',\n '\\u010E': 'D',\n '\\u1E0C': 'D',\n '\\u1E10': 'D',\n '\\u1E12': 'D',\n '\\u1E0E': 'D',\n '\\u0110': 'D',\n '\\u018B': 'D',\n '\\u018A': 'D',\n '\\u0189': 'D',\n '\\uA779': 'D',\n '\\u01F1': 'DZ',\n '\\u01C4': 'DZ',\n '\\u01F2': 'Dz',\n '\\u01C5': 'Dz',\n '\\u24BA': 'E',\n '\\uFF25': 'E',\n '\\u00C8': 'E',\n '\\u00C9': 'E',\n '\\u00CA': 'E',\n '\\u1EC0': 'E',\n '\\u1EBE': 'E',\n '\\u1EC4': 'E',\n '\\u1EC2': 'E',\n '\\u1EBC': 'E',\n '\\u0112': 'E',\n '\\u1E14': 'E',\n '\\u1E16': 'E',\n '\\u0114': 'E',\n '\\u0116': 'E',\n '\\u00CB': 'E',\n '\\u1EBA': 'E',\n '\\u011A': 'E',\n '\\u0204': 'E',\n '\\u0206': 'E',\n '\\u1EB8': 'E',\n '\\u1EC6': 'E',\n '\\u0228': 'E',\n '\\u1E1C': 'E',\n '\\u0118': 'E',\n '\\u1E18': 'E',\n '\\u1E1A': 'E',\n '\\u0190': 'E',\n '\\u018E': 'E',\n '\\u24BB': 'F',\n '\\uFF26': 'F',\n '\\u1E1E': 'F',\n '\\u0191': 'F',\n '\\uA77B': 'F',\n '\\u24BC': 'G',\n '\\uFF27': 'G',\n '\\u01F4': 'G',\n '\\u011C': 'G',\n '\\u1E20': 'G',\n '\\u011E': 'G',\n '\\u0120': 'G',\n '\\u01E6': 'G',\n '\\u0122': 'G',\n '\\u01E4': 'G',\n '\\u0193': 'G',\n '\\uA7A0': 'G',\n '\\uA77D': 'G',\n '\\uA77E': 'G',\n '\\u24BD': 'H',\n '\\uFF28': 'H',\n '\\u0124': 'H',\n '\\u1E22': 'H',\n '\\u1E26': 'H',\n '\\u021E': 'H',\n '\\u1E24': 'H',\n '\\u1E28': 'H',\n '\\u1E2A': 'H',\n '\\u0126': 'H',\n '\\u2C67': 'H',\n '\\u2C75': 'H',\n '\\uA78D': 'H',\n '\\u24BE': 'I',\n '\\uFF29': 'I',\n '\\u00CC': 'I',\n '\\u00CD': 'I',\n '\\u00CE': 'I',\n '\\u0128': 'I',\n '\\u012A': 'I',\n '\\u012C': 'I',\n '\\u0130': 'I',\n '\\u00CF': 'I',\n '\\u1E2E': 'I',\n '\\u1EC8': 'I',\n '\\u01CF': 'I',\n '\\u0208': 'I',\n '\\u020A': 'I',\n '\\u1ECA': 'I',\n '\\u012E': 'I',\n '\\u1E2C': 'I',\n '\\u0197': 'I',\n '\\u24BF': 'J',\n '\\uFF2A': 'J',\n '\\u0134': 'J',\n '\\u0248': 'J',\n '\\u24C0': 'K',\n '\\uFF2B': 'K',\n '\\u1E30': 'K',\n '\\u01E8': 'K',\n '\\u1E32': 'K',\n '\\u0136': 'K',\n '\\u1E34': 'K',\n '\\u0198': 'K',\n '\\u2C69': 'K',\n '\\uA740': 'K',\n '\\uA742': 'K',\n '\\uA744': 'K',\n '\\uA7A2': 'K',\n '\\u24C1': 'L',\n '\\uFF2C': 'L',\n '\\u013F': 'L',\n '\\u0139': 'L',\n '\\u013D': 'L',\n '\\u1E36': 'L',\n '\\u1E38': 'L',\n '\\u013B': 'L',\n '\\u1E3C': 'L',\n '\\u1E3A': 'L',\n '\\u0141': 'L',\n '\\u023D': 'L',\n '\\u2C62': 'L',\n '\\u2C60': 'L',\n '\\uA748': 'L',\n '\\uA746': 'L',\n '\\uA780': 'L',\n '\\u01C7': 'LJ',\n '\\u01C8': 'Lj',\n '\\u24C2': 'M',\n '\\uFF2D': 'M',\n '\\u1E3E': 'M',\n '\\u1E40': 'M',\n '\\u1E42': 'M',\n '\\u2C6E': 'M',\n '\\u019C': 'M',\n '\\u24C3': 'N',\n '\\uFF2E': 'N',\n '\\u01F8': 'N',\n '\\u0143': 'N',\n '\\u00D1': 'N',\n '\\u1E44': 'N',\n '\\u0147': 'N',\n '\\u1E46': 'N',\n '\\u0145': 'N',\n '\\u1E4A': 'N',\n '\\u1E48': 'N',\n '\\u0220': 'N',\n '\\u019D': 'N',\n '\\uA790': 'N',\n '\\uA7A4': 'N',\n '\\u01CA': 'NJ',\n '\\u01CB': 'Nj',\n '\\u24C4': 'O',\n '\\uFF2F': 'O',\n '\\u00D2': 'O',\n '\\u00D3': 'O',\n '\\u00D4': 'O',\n '\\u1ED2': 'O',\n '\\u1ED0': 'O',\n '\\u1ED6': 'O',\n '\\u1ED4': 'O',\n '\\u00D5': 'O',\n '\\u1E4C': 'O',\n '\\u022C': 'O',\n '\\u1E4E': 'O',\n '\\u014C': 'O',\n '\\u1E50': 'O',\n '\\u1E52': 'O',\n '\\u014E': 'O',\n '\\u022E': 'O',\n '\\u0230': 'O',\n '\\u00D6': 'O',\n '\\u022A': 'O',\n '\\u1ECE': 'O',\n '\\u0150': 'O',\n '\\u01D1': 'O',\n '\\u020C': 'O',\n '\\u020E': 'O',\n '\\u01A0': 'O',\n '\\u1EDC': 'O',\n '\\u1EDA': 'O',\n '\\u1EE0': 'O',\n '\\u1EDE': 'O',\n '\\u1EE2': 'O',\n '\\u1ECC': 'O',\n '\\u1ED8': 'O',\n '\\u01EA': 'O',\n '\\u01EC': 'O',\n '\\u00D8': 'O',\n '\\u01FE': 'O',\n '\\u0186': 'O',\n '\\u019F': 'O',\n '\\uA74A': 'O',\n '\\uA74C': 'O',\n '\\u01A2': 'OI',\n '\\uA74E': 'OO',\n '\\u0222': 'OU',\n '\\u24C5': 'P',\n '\\uFF30': 'P',\n '\\u1E54': 'P',\n '\\u1E56': 'P',\n '\\u01A4': 'P',\n '\\u2C63': 'P',\n '\\uA750': 'P',\n '\\uA752': 'P',\n '\\uA754': 'P',\n '\\u24C6': 'Q',\n '\\uFF31': 'Q',\n '\\uA756': 'Q',\n '\\uA758': 'Q',\n '\\u024A': 'Q',\n '\\u24C7': 'R',\n '\\uFF32': 'R',\n '\\u0154': 'R',\n '\\u1E58': 'R',\n '\\u0158': 'R',\n '\\u0210': 'R',\n '\\u0212': 'R',\n '\\u1E5A': 'R',\n '\\u1E5C': 'R',\n '\\u0156': 'R',\n '\\u1E5E': 'R',\n '\\u024C': 'R',\n '\\u2C64': 'R',\n '\\uA75A': 'R',\n '\\uA7A6': 'R',\n '\\uA782': 'R',\n '\\u24C8': 'S',\n '\\uFF33': 'S',\n '\\u1E9E': 'S',\n '\\u015A': 'S',\n '\\u1E64': 'S',\n '\\u015C': 'S',\n '\\u1E60': 'S',\n '\\u0160': 'S',\n '\\u1E66': 'S',\n '\\u1E62': 'S',\n '\\u1E68': 'S',\n '\\u0218': 'S',\n '\\u015E': 'S',\n '\\u2C7E': 'S',\n '\\uA7A8': 'S',\n '\\uA784': 'S',\n '\\u24C9': 'T',\n '\\uFF34': 'T',\n '\\u1E6A': 'T',\n '\\u0164': 'T',\n '\\u1E6C': 'T',\n '\\u021A': 'T',\n '\\u0162': 'T',\n '\\u1E70': 'T',\n '\\u1E6E': 'T',\n '\\u0166': 'T',\n '\\u01AC': 'T',\n '\\u01AE': 'T',\n '\\u023E': 'T',\n '\\uA786': 'T',\n '\\uA728': 'TZ',\n '\\u24CA': 'U',\n '\\uFF35': 'U',\n '\\u00D9': 'U',\n '\\u00DA': 'U',\n '\\u00DB': 'U',\n '\\u0168': 'U',\n '\\u1E78': 'U',\n '\\u016A': 'U',\n '\\u1E7A': 'U',\n '\\u016C': 'U',\n '\\u00DC': 'U',\n '\\u01DB': 'U',\n '\\u01D7': 'U',\n '\\u01D5': 'U',\n '\\u01D9': 'U',\n '\\u1EE6': 'U',\n '\\u016E': 'U',\n '\\u0170': 'U',\n '\\u01D3': 'U',\n '\\u0214': 'U',\n '\\u0216': 'U',\n '\\u01AF': 'U',\n '\\u1EEA': 'U',\n '\\u1EE8': 'U',\n '\\u1EEE': 'U',\n '\\u1EEC': 'U',\n '\\u1EF0': 'U',\n '\\u1EE4': 'U',\n '\\u1E72': 'U',\n '\\u0172': 'U',\n '\\u1E76': 'U',\n '\\u1E74': 'U',\n '\\u0244': 'U',\n '\\u24CB': 'V',\n '\\uFF36': 'V',\n '\\u1E7C': 'V',\n '\\u1E7E': 'V',\n '\\u01B2': 'V',\n '\\uA75E': 'V',\n '\\u0245': 'V',\n '\\uA760': 'VY',\n '\\u24CC': 'W',\n '\\uFF37': 'W',\n '\\u1E80': 'W',\n '\\u1E82': 'W',\n '\\u0174': 'W',\n '\\u1E86': 'W',\n '\\u1E84': 'W',\n '\\u1E88': 'W',\n '\\u2C72': 'W',\n '\\u24CD': 'X',\n '\\uFF38': 'X',\n '\\u1E8A': 'X',\n '\\u1E8C': 'X',\n '\\u24CE': 'Y',\n '\\uFF39': 'Y',\n '\\u1EF2': 'Y',\n '\\u00DD': 'Y',\n '\\u0176': 'Y',\n '\\u1EF8': 'Y',\n '\\u0232': 'Y',\n '\\u1E8E': 'Y',\n '\\u0178': 'Y',\n '\\u1EF6': 'Y',\n '\\u1EF4': 'Y',\n '\\u01B3': 'Y',\n '\\u024E': 'Y',\n '\\u1EFE': 'Y',\n '\\u24CF': 'Z',\n '\\uFF3A': 'Z',\n '\\u0179': 'Z',\n '\\u1E90': 'Z',\n '\\u017B': 'Z',\n '\\u017D': 'Z',\n '\\u1E92': 'Z',\n '\\u1E94': 'Z',\n '\\u01B5': 'Z',\n '\\u0224': 'Z',\n '\\u2C7F': 'Z',\n '\\u2C6B': 'Z',\n '\\uA762': 'Z',\n '\\u24D0': 'a',\n '\\uFF41': 'a',\n '\\u1E9A': 'a',\n '\\u00E0': 'a',\n '\\u00E1': 'a',\n '\\u00E2': 'a',\n '\\u1EA7': 'a',\n '\\u1EA5': 'a',\n '\\u1EAB': 'a',\n '\\u1EA9': 'a',\n '\\u00E3': 'a',\n '\\u0101': 'a',\n '\\u0103': 'a',\n '\\u1EB1': 'a',\n '\\u1EAF': 'a',\n '\\u1EB5': 'a',\n '\\u1EB3': 'a',\n '\\u0227': 'a',\n '\\u01E1': 'a',\n '\\u00E4': 'a',\n '\\u01DF': 'a',\n '\\u1EA3': 'a',\n '\\u00E5': 'a',\n '\\u01FB': 'a',\n '\\u01CE': 'a',\n '\\u0201': 'a',\n '\\u0203': 'a',\n '\\u1EA1': 'a',\n '\\u1EAD': 'a',\n '\\u1EB7': 'a',\n '\\u1E01': 'a',\n '\\u0105': 'a',\n '\\u2C65': 'a',\n '\\u0250': 'a',\n '\\uA733': 'aa',\n '\\u00E6': 'ae',\n '\\u01FD': 'ae',\n '\\u01E3': 'ae',\n '\\uA735': 'ao',\n '\\uA737': 'au',\n '\\uA739': 'av',\n '\\uA73B': 'av',\n '\\uA73D': 'ay',\n '\\u24D1': 'b',\n '\\uFF42': 'b',\n '\\u1E03': 'b',\n '\\u1E05': 'b',\n '\\u1E07': 'b',\n '\\u0180': 'b',\n '\\u0183': 'b',\n '\\u0253': 'b',\n '\\u24D2': 'c',\n '\\uFF43': 'c',\n '\\u0107': 'c',\n '\\u0109': 'c',\n '\\u010B': 'c',\n '\\u010D': 'c',\n '\\u00E7': 'c',\n '\\u1E09': 'c',\n '\\u0188': 'c',\n '\\u023C': 'c',\n '\\uA73F': 'c',\n '\\u2184': 'c',\n '\\u24D3': 'd',\n '\\uFF44': 'd',\n '\\u1E0B': 'd',\n '\\u010F': 'd',\n '\\u1E0D': 'd',\n '\\u1E11': 'd',\n '\\u1E13': 'd',\n '\\u1E0F': 'd',\n '\\u0111': 'd',\n '\\u018C': 'd',\n '\\u0256': 'd',\n '\\u0257': 'd',\n '\\uA77A': 'd',\n '\\u01F3': 'dz',\n '\\u01C6': 'dz',\n '\\u24D4': 'e',\n '\\uFF45': 'e',\n '\\u00E8': 'e',\n '\\u00E9': 'e',\n '\\u00EA': 'e',\n '\\u1EC1': 'e',\n '\\u1EBF': 'e',\n '\\u1EC5': 'e',\n '\\u1EC3': 'e',\n '\\u1EBD': 'e',\n '\\u0113': 'e',\n '\\u1E15': 'e',\n '\\u1E17': 'e',\n '\\u0115': 'e',\n '\\u0117': 'e',\n '\\u00EB': 'e',\n '\\u1EBB': 'e',\n '\\u011B': 'e',\n '\\u0205': 'e',\n '\\u0207': 'e',\n '\\u1EB9': 'e',\n '\\u1EC7': 'e',\n '\\u0229': 'e',\n '\\u1E1D': 'e',\n '\\u0119': 'e',\n '\\u1E19': 'e',\n '\\u1E1B': 'e',\n '\\u0247': 'e',\n '\\u025B': 'e',\n '\\u01DD': 'e',\n '\\u24D5': 'f',\n '\\uFF46': 'f',\n '\\u1E1F': 'f',\n '\\u0192': 'f',\n '\\uA77C': 'f',\n '\\u24D6': 'g',\n '\\uFF47': 'g',\n '\\u01F5': 'g',\n '\\u011D': 'g',\n '\\u1E21': 'g',\n '\\u011F': 'g',\n '\\u0121': 'g',\n '\\u01E7': 'g',\n '\\u0123': 'g',\n '\\u01E5': 'g',\n '\\u0260': 'g',\n '\\uA7A1': 'g',\n '\\u1D79': 'g',\n '\\uA77F': 'g',\n '\\u24D7': 'h',\n '\\uFF48': 'h',\n '\\u0125': 'h',\n '\\u1E23': 'h',\n '\\u1E27': 'h',\n '\\u021F': 'h',\n '\\u1E25': 'h',\n '\\u1E29': 'h',\n '\\u1E2B': 'h',\n '\\u1E96': 'h',\n '\\u0127': 'h',\n '\\u2C68': 'h',\n '\\u2C76': 'h',\n '\\u0265': 'h',\n '\\u0195': 'hv',\n '\\u24D8': 'i',\n '\\uFF49': 'i',\n '\\u00EC': 'i',\n '\\u00ED': 'i',\n '\\u00EE': 'i',\n '\\u0129': 'i',\n '\\u012B': 'i',\n '\\u012D': 'i',\n '\\u00EF': 'i',\n '\\u1E2F': 'i',\n '\\u1EC9': 'i',\n '\\u01D0': 'i',\n '\\u0209': 'i',\n '\\u020B': 'i',\n '\\u1ECB': 'i',\n '\\u012F': 'i',\n '\\u1E2D': 'i',\n '\\u0268': 'i',\n '\\u0131': 'i',\n '\\u24D9': 'j',\n '\\uFF4A': 'j',\n '\\u0135': 'j',\n '\\u01F0': 'j',\n '\\u0249': 'j',\n '\\u24DA': 'k',\n '\\uFF4B': 'k',\n '\\u1E31': 'k',\n '\\u01E9': 'k',\n '\\u1E33': 'k',\n '\\u0137': 'k',\n '\\u1E35': 'k',\n '\\u0199': 'k',\n '\\u2C6A': 'k',\n '\\uA741': 'k',\n '\\uA743': 'k',\n '\\uA745': 'k',\n '\\uA7A3': 'k',\n '\\u24DB': 'l',\n '\\uFF4C': 'l',\n '\\u0140': 'l',\n '\\u013A': 'l',\n '\\u013E': 'l',\n '\\u1E37': 'l',\n '\\u1E39': 'l',\n '\\u013C': 'l',\n '\\u1E3D': 'l',\n '\\u1E3B': 'l',\n '\\u017F': 'l',\n '\\u0142': 'l',\n '\\u019A': 'l',\n '\\u026B': 'l',\n '\\u2C61': 'l',\n '\\uA749': 'l',\n '\\uA781': 'l',\n '\\uA747': 'l',\n '\\u01C9': 'lj',\n '\\u24DC': 'm',\n '\\uFF4D': 'm',\n '\\u1E3F': 'm',\n '\\u1E41': 'm',\n '\\u1E43': 'm',\n '\\u0271': 'm',\n '\\u026F': 'm',\n '\\u24DD': 'n',\n '\\uFF4E': 'n',\n '\\u01F9': 'n',\n '\\u0144': 'n',\n '\\u00F1': 'n',\n '\\u1E45': 'n',\n '\\u0148': 'n',\n '\\u1E47': 'n',\n '\\u0146': 'n',\n '\\u1E4B': 'n',\n '\\u1E49': 'n',\n '\\u019E': 'n',\n '\\u0272': 'n',\n '\\u0149': 'n',\n '\\uA791': 'n',\n '\\uA7A5': 'n',\n '\\u01CC': 'nj',\n '\\u24DE': 'o',\n '\\uFF4F': 'o',\n '\\u00F2': 'o',\n '\\u00F3': 'o',\n '\\u00F4': 'o',\n '\\u1ED3': 'o',\n '\\u1ED1': 'o',\n '\\u1ED7': 'o',\n '\\u1ED5': 'o',\n '\\u00F5': 'o',\n '\\u1E4D': 'o',\n '\\u022D': 'o',\n '\\u1E4F': 'o',\n '\\u014D': 'o',\n '\\u1E51': 'o',\n '\\u1E53': 'o',\n '\\u014F': 'o',\n '\\u022F': 'o',\n '\\u0231': 'o',\n '\\u00F6': 'o',\n '\\u022B': 'o',\n '\\u1ECF': 'o',\n '\\u0151': 'o',\n '\\u01D2': 'o',\n '\\u020D': 'o',\n '\\u020F': 'o',\n '\\u01A1': 'o',\n '\\u1EDD': 'o',\n '\\u1EDB': 'o',\n '\\u1EE1': 'o',\n '\\u1EDF': 'o',\n '\\u1EE3': 'o',\n '\\u1ECD': 'o',\n '\\u1ED9': 'o',\n '\\u01EB': 'o',\n '\\u01ED': 'o',\n '\\u00F8': 'o',\n '\\u01FF': 'o',\n '\\u0254': 'o',\n '\\uA74B': 'o',\n '\\uA74D': 'o',\n '\\u0275': 'o',\n '\\u01A3': 'oi',\n '\\u0223': 'ou',\n '\\uA74F': 'oo',\n '\\u24DF': 'p',\n '\\uFF50': 'p',\n '\\u1E55': 'p',\n '\\u1E57': 'p',\n '\\u01A5': 'p',\n '\\u1D7D': 'p',\n '\\uA751': 'p',\n '\\uA753': 'p',\n '\\uA755': 'p',\n '\\u24E0': 'q',\n '\\uFF51': 'q',\n '\\u024B': 'q',\n '\\uA757': 'q',\n '\\uA759': 'q',\n '\\u24E1': 'r',\n '\\uFF52': 'r',\n '\\u0155': 'r',\n '\\u1E59': 'r',\n '\\u0159': 'r',\n '\\u0211': 'r',\n '\\u0213': 'r',\n '\\u1E5B': 'r',\n '\\u1E5D': 'r',\n '\\u0157': 'r',\n '\\u1E5F': 'r',\n '\\u024D': 'r',\n '\\u027D': 'r',\n '\\uA75B': 'r',\n '\\uA7A7': 'r',\n '\\uA783': 'r',\n '\\u24E2': 's',\n '\\uFF53': 's',\n '\\u00DF': 's',\n '\\u015B': 's',\n '\\u1E65': 's',\n '\\u015D': 's',\n '\\u1E61': 's',\n '\\u0161': 's',\n '\\u1E67': 's',\n '\\u1E63': 's',\n '\\u1E69': 's',\n '\\u0219': 's',\n '\\u015F': 's',\n '\\u023F': 's',\n '\\uA7A9': 's',\n '\\uA785': 's',\n '\\u1E9B': 's',\n '\\u24E3': 't',\n '\\uFF54': 't',\n '\\u1E6B': 't',\n '\\u1E97': 't',\n '\\u0165': 't',\n '\\u1E6D': 't',\n '\\u021B': 't',\n '\\u0163': 't',\n '\\u1E71': 't',\n '\\u1E6F': 't',\n '\\u0167': 't',\n '\\u01AD': 't',\n '\\u0288': 't',\n '\\u2C66': 't',\n '\\uA787': 't',\n '\\uA729': 'tz',\n '\\u24E4': 'u',\n '\\uFF55': 'u',\n '\\u00F9': 'u',\n '\\u00FA': 'u',\n '\\u00FB': 'u',\n '\\u0169': 'u',\n '\\u1E79': 'u',\n '\\u016B': 'u',\n '\\u1E7B': 'u',\n '\\u016D': 'u',\n '\\u00FC': 'u',\n '\\u01DC': 'u',\n '\\u01D8': 'u',\n '\\u01D6': 'u',\n '\\u01DA': 'u',\n '\\u1EE7': 'u',\n '\\u016F': 'u',\n '\\u0171': 'u',\n '\\u01D4': 'u',\n '\\u0215': 'u',\n '\\u0217': 'u',\n '\\u01B0': 'u',\n '\\u1EEB': 'u',\n '\\u1EE9': 'u',\n '\\u1EEF': 'u',\n '\\u1EED': 'u',\n '\\u1EF1': 'u',\n '\\u1EE5': 'u',\n '\\u1E73': 'u',\n '\\u0173': 'u',\n '\\u1E77': 'u',\n '\\u1E75': 'u',\n '\\u0289': 'u',\n '\\u24E5': 'v',\n '\\uFF56': 'v',\n '\\u1E7D': 'v',\n '\\u1E7F': 'v',\n '\\u028B': 'v',\n '\\uA75F': 'v',\n '\\u028C': 'v',\n '\\uA761': 'vy',\n '\\u24E6': 'w',\n '\\uFF57': 'w',\n '\\u1E81': 'w',\n '\\u1E83': 'w',\n '\\u0175': 'w',\n '\\u1E87': 'w',\n '\\u1E85': 'w',\n '\\u1E98': 'w',\n '\\u1E89': 'w',\n '\\u2C73': 'w',\n '\\u24E7': 'x',\n '\\uFF58': 'x',\n '\\u1E8B': 'x',\n '\\u1E8D': 'x',\n '\\u24E8': 'y',\n '\\uFF59': 'y',\n '\\u1EF3': 'y',\n '\\u00FD': 'y',\n '\\u0177': 'y',\n '\\u1EF9': 'y',\n '\\u0233': 'y',\n '\\u1E8F': 'y',\n '\\u00FF': 'y',\n '\\u1EF7': 'y',\n '\\u1E99': 'y',\n '\\u1EF5': 'y',\n '\\u01B4': 'y',\n '\\u024F': 'y',\n '\\u1EFF': 'y',\n '\\u24E9': 'z',\n '\\uFF5A': 'z',\n '\\u017A': 'z',\n '\\u1E91': 'z',\n '\\u017C': 'z',\n '\\u017E': 'z',\n '\\u1E93': 'z',\n '\\u1E95': 'z',\n '\\u01B6': 'z',\n '\\u0225': 'z',\n '\\u0240': 'z',\n '\\u2C6C': 'z',\n '\\uA763': 'z',\n '\\u0386': '\\u0391',\n '\\u0388': '\\u0395',\n '\\u0389': '\\u0397',\n '\\u038A': '\\u0399',\n '\\u03AA': '\\u0399',\n '\\u038C': '\\u039F',\n '\\u038E': '\\u03A5',\n '\\u03AB': '\\u03A5',\n '\\u038F': '\\u03A9',\n '\\u03AC': '\\u03B1',\n '\\u03AD': '\\u03B5',\n '\\u03AE': '\\u03B7',\n '\\u03AF': '\\u03B9',\n '\\u03CA': '\\u03B9',\n '\\u0390': '\\u03B9',\n '\\u03CC': '\\u03BF',\n '\\u03CD': '\\u03C5',\n '\\u03CB': '\\u03C5',\n '\\u03B0': '\\u03C5',\n '\\u03C9': '\\u03C9',\n '\\u03C2': '\\u03C3'\n };\n DataUtil.fnOperators = {\n /**\n * Returns true when the actual input is equal to the given input.\n * @param {string|number|boolean} actual\n * @param {string|number|boolean} expected\n * @param {boolean} ignoreCase?\n * @param {boolean} ignoreAccent?\n */\n equal: function (actual, expected, ignoreCase, ignoreAccent) {\n if (ignoreAccent) {\n actual = DataUtil.ignoreDiacritics(actual);\n expected = DataUtil.ignoreDiacritics(expected);\n }\n if (ignoreCase) {\n return DataUtil.toLowerCase(actual) === DataUtil.toLowerCase(expected);\n }\n return actual === expected;\n },\n /**\n * Returns true when the actual input is not equal to the given input.\n * @param {string|number|boolean} actual\n * @param {string|number|boolean} expected\n * @param {boolean} ignoreCase?\n */\n notequal: function (actual, expected, ignoreCase, ignoreAccent) {\n if (ignoreAccent) {\n actual = DataUtil.ignoreDiacritics(actual);\n expected = DataUtil.ignoreDiacritics(expected);\n }\n return !DataUtil.fnOperators.equal(actual, expected, ignoreCase);\n },\n /**\n * Returns true when the actual input is less than to the given input.\n * @param {string|number|boolean} actual\n * @param {string|number|boolean} expected\n * @param {boolean} ignoreCase?\n */\n lessthan: function (actual, expected, ignoreCase) {\n if (ignoreCase) {\n return DataUtil.toLowerCase(actual) < DataUtil.toLowerCase(expected);\n }\n return actual < expected;\n },\n /**\n * Returns true when the actual input is greater than to the given input.\n * @param {string|number|boolean} actual\n * @param {string|number|boolean} expected\n * @param {boolean} ignoreCase?\n */\n greaterthan: function (actual, expected, ignoreCase) {\n if (ignoreCase) {\n return DataUtil.toLowerCase(actual) > DataUtil.toLowerCase(expected);\n }\n return actual > expected;\n },\n /**\n * Returns true when the actual input is less than or equal to the given input.\n * @param {string|number|boolean} actual\n * @param {string|number|boolean} expected\n * @param {boolean} ignoreCase?\n */\n lessthanorequal: function (actual, expected, ignoreCase) {\n if (ignoreCase) {\n return DataUtil.toLowerCase(actual) <= DataUtil.toLowerCase(expected);\n }\n return actual <= expected;\n },\n /**\n * Returns true when the actual input is greater than or equal to the given input.\n * @param {string|number|boolean} actual\n * @param {string|number|boolean} expected\n * @param {boolean} ignoreCase?\n */\n greaterthanorequal: function (actual, expected, ignoreCase) {\n if (ignoreCase) {\n return DataUtil.toLowerCase(actual) >= DataUtil.toLowerCase(expected);\n }\n return actual >= expected;\n },\n /**\n * Returns true when the actual input contains the given string.\n * @param {string|number} actual\n * @param {string|number} expected\n * @param {boolean} ignoreCase?\n */\n contains: function (actual, expected, ignoreCase, ignoreAccent) {\n if (ignoreAccent) {\n actual = DataUtil.ignoreDiacritics(actual);\n expected = DataUtil.ignoreDiacritics(expected);\n }\n if (ignoreCase) {\n return !isNullOrUndefined(actual) && !isNullOrUndefined(expected) &&\n DataUtil.toLowerCase(actual).indexOf(DataUtil.toLowerCase(expected)) !== -1;\n }\n return !isNullOrUndefined(actual) && !isNullOrUndefined(expected) &&\n actual.toString().indexOf(expected) !== -1;\n },\n /**\n * Returns true when the given input value is not null.\n * @param {string|number} actual\n * @returns boolean\n */\n notnull: function (actual) {\n return actual !== null;\n },\n /**\n * Returns true when the given input value is null.\n * @param {string|number} actual\n * @returns boolean\n */\n isnull: function (actual) {\n return actual === null;\n },\n /**\n * Returns true when the actual input starts with the given string\n * @param {string} actual\n * @param {string} expected\n * @param {boolean} ignoreCase?\n */\n startswith: function (actual, expected, ignoreCase, ignoreAccent) {\n if (ignoreAccent) {\n actual = DataUtil.ignoreDiacritics(actual);\n expected = DataUtil.ignoreDiacritics(expected);\n }\n if (ignoreCase) {\n return actual && expected && DataUtil.startsWith(DataUtil.toLowerCase(actual), DataUtil.toLowerCase(expected));\n }\n return actual && expected && DataUtil.startsWith(actual, expected);\n },\n /**\n * Returns true when the actual input ends with the given string.\n * @param {string} actual\n * @param {string} expected\n * @param {boolean} ignoreCase?\n */\n endswith: function (actual, expected, ignoreCase, ignoreAccent) {\n if (ignoreAccent) {\n actual = DataUtil.ignoreDiacritics(actual);\n expected = DataUtil.ignoreDiacritics(expected);\n }\n if (ignoreCase) {\n return actual && expected && DataUtil.endsWith(DataUtil.toLowerCase(actual), DataUtil.toLowerCase(expected));\n }\n return actual && expected && DataUtil.endsWith(actual, expected);\n },\n /**\n * It will return the filter operator based on the filter symbol.\n * @param {string} operator\n * @hidden\n */\n processSymbols: function (operator) {\n var fnName = DataUtil.operatorSymbols[operator];\n if (fnName) {\n var fn = DataUtil.fnOperators[fnName];\n return fn;\n }\n return DataUtil.throwError('Query - Process Operator : Invalid operator');\n },\n /**\n * It will return the valid filter operator based on the specified operators.\n * @param {string} operator\n * @hidden\n */\n processOperator: function (operator) {\n var fn = DataUtil.fnOperators[operator];\n if (fn) {\n return fn;\n }\n return DataUtil.fnOperators.processSymbols(operator);\n }\n };\n /**\n * To perform the parse operation on JSON data, like convert to string from JSON or convert to JSON from string.\n */\n DataUtil.parse = {\n /**\n * Parse the given string to the plain JavaScript object.\n * @param {string|Object|Object[]} jsonText\n */\n parseJson: function (jsonText) {\n if (typeof jsonText === 'string') {\n jsonText = JSON.parse(jsonText, DataUtil.parse.jsonReviver);\n }\n else if (jsonText instanceof Array) {\n DataUtil.parse.iterateAndReviveArray(jsonText);\n }\n else if (typeof jsonText === 'object' && jsonText !== null) {\n DataUtil.parse.iterateAndReviveJson(jsonText);\n }\n return jsonText;\n },\n /**\n * It will perform on array of values.\n * @param {string[]|Object[]} array\n * @hidden\n */\n iterateAndReviveArray: function (array) {\n for (var i = 0; i < array.length; i++) {\n if (typeof array[i] === 'object' && array[i] !== null) {\n DataUtil.parse.iterateAndReviveJson(array[i]);\n }\n else if (typeof array[i] === 'string' && !/^[\\s]*\\[|^[\\s]*\\{(.)+:|\\\"/g.test(array[i])) {\n array[i] = DataUtil.parse.jsonReviver('', array[i]);\n }\n else {\n array[i] = DataUtil.parse.parseJson(array[i]);\n }\n }\n },\n /**\n * It will perform on JSON values\n * @param {JSON} json\n * @hidden\n */\n iterateAndReviveJson: function (json) {\n var value;\n var keys = Object.keys(json);\n for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {\n var prop = keys_2[_i];\n if (DataUtil.startsWith(prop, '__')) {\n continue;\n }\n value = json[prop];\n if (typeof value === 'object') {\n if (value instanceof Array) {\n DataUtil.parse.iterateAndReviveArray(value);\n }\n else if (value) {\n DataUtil.parse.iterateAndReviveJson(value);\n }\n }\n else {\n json[prop] = DataUtil.parse.jsonReviver(json[prop], value);\n }\n }\n },\n /**\n * It will perform on JSON values\n * @param {string} field\n * @param {string|Date} value\n * @hidden\n */\n jsonReviver: function (field, value) {\n if (typeof value === 'string') {\n var ms = /^\\/Date\\(([+-]?[0-9]+)([+-][0-9]{4})?\\)\\/$/.exec(value);\n var offSet = DataUtil.timeZoneHandling ? DataUtil.serverTimezoneOffset : null;\n if (ms) {\n return DataUtil.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), offSet, true);\n }\n else if (/^(\\d{4}\\-\\d\\d\\-\\d\\d([tT][\\d:\\.]*){1})([zZ]|([+\\-])(\\d\\d):?(\\d\\d))?$/.test(value)) {\n var isUTC = value.indexOf('Z') > -1 || value.indexOf('z') > -1;\n var arr = value.split(/[^0-9.]/);\n if (isUTC) {\n value = DataUtil.dateParse\n .toTimeZone(new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5], 10)), DataUtil.serverTimezoneOffset, false);\n }\n else {\n var utcFormat = new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5], 10));\n var hrs = parseInt(arr[6], 10);\n var mins = parseInt(arr[7], 10);\n if (isNaN(hrs) && isNaN(mins)) {\n return utcFormat;\n }\n if (value.indexOf('+') > -1) {\n utcFormat.setHours(utcFormat.getHours() - hrs, utcFormat.getMinutes() - mins);\n }\n else {\n utcFormat.setHours(utcFormat.getHours() + hrs, utcFormat.getMinutes() + mins);\n }\n value = DataUtil.dateParse\n .toTimeZone(utcFormat, DataUtil.serverTimezoneOffset, false);\n }\n if (DataUtil.serverTimezoneOffset == null) {\n value = DataUtil.dateParse.addSelfOffset(value);\n }\n }\n }\n return value;\n },\n /**\n * Check wheather the given value is JSON or not.\n * @param {Object[]} jsonData\n */\n isJson: function (jsonData) {\n if (typeof jsonData[0] === 'string') {\n return jsonData;\n }\n return DataUtil.parse.parseJson(jsonData);\n },\n /**\n * Checks wheather the given value is GUID or not.\n * @param {string} value\n */\n isGuid: function (value) {\n var regex = /[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i;\n var match = regex.exec(value);\n return match != null;\n },\n /**\n * The method used to replace the value based on the type.\n * @param {Object} value\n * @param {boolean} stringify\n * @hidden\n */\n replacer: function (value, stringify) {\n if (DataUtil.isPlainObject(value)) {\n return DataUtil.parse.jsonReplacer(value, stringify);\n }\n if (value instanceof Array) {\n return DataUtil.parse.arrayReplacer(value);\n }\n if (value instanceof Date) {\n return DataUtil.parse.jsonReplacer({ val: value }, stringify).val;\n }\n return value;\n },\n /**\n * It will replace the JSON value.\n * @param {string} key\n * @param {Object} val\n * @hidden\n */\n jsonReplacer: function (val, stringify) {\n var value;\n var keys = Object.keys(val);\n for (var _i = 0, keys_3 = keys; _i < keys_3.length; _i++) {\n var prop = keys_3[_i];\n value = val[prop];\n if (!(value instanceof Date)) {\n continue;\n }\n var d = value;\n if (DataUtil.serverTimezoneOffset == null) {\n val[prop] = DataUtil.dateParse.toTimeZone(d, null).toJSON();\n }\n else {\n d = new Date(+d + DataUtil.serverTimezoneOffset * 3600000);\n val[prop] = DataUtil.dateParse.toTimeZone(DataUtil.dateParse.addSelfOffset(d), null).toJSON();\n }\n }\n return val;\n },\n /**\n * It will replace the Array of value.\n * @param {string} key\n * @param {Object[]} val\n * @hidden\n */\n arrayReplacer: function (val) {\n for (var i = 0; i < val.length; i++) {\n if (DataUtil.isPlainObject(val[i])) {\n val[i] = DataUtil.parse.jsonReplacer(val[i]);\n }\n else if (val[i] instanceof Date) {\n val[i] = DataUtil.parse.jsonReplacer({ date: val[i] }).date;\n }\n }\n return val;\n },\n /**\n * It will replace the Date object with respective to UTC format value.\n * @param {string} key\n * @param {any} value\n * @hidden\n */\n /* tslint:disable-next-line:no-any */\n jsonDateReplacer: function (key, value) {\n if (key === 'value' && value) {\n if (typeof value === 'string') {\n var ms = /^\\/Date\\(([+-]?[0-9]+)([+-][0-9]{4})?\\)\\/$/.exec(value);\n if (ms) {\n value = DataUtil.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), null, true);\n }\n else if (/^(\\d{4}\\-\\d\\d\\-\\d\\d([tT][\\d:\\.]*){1})([zZ]|([+\\-])(\\d\\d):?(\\d\\d))?$/.test(value)) {\n var arr = value.split(/[^0-9]/);\n value = DataUtil.dateParse\n .toTimeZone(new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5], 10)), null, true);\n }\n }\n if (value instanceof Date) {\n value = DataUtil.dateParse.addSelfOffset(value);\n if (DataUtil.serverTimezoneOffset === null) {\n return DataUtil.dateParse.toTimeZone(DataUtil.dateParse.addSelfOffset(value), null).toJSON();\n }\n else {\n value = DataUtil.dateParse.toTimeZone(value, (((value.getTimezoneOffset() / 60) * 2)\n - DataUtil.serverTimezoneOffset), false);\n return value.toJSON();\n }\n }\n }\n return value;\n }\n };\n /**\n * @hidden\n */\n DataUtil.dateParse = {\n addSelfOffset: function (input) {\n return new Date(+input - (input.getTimezoneOffset() * 60000));\n },\n toUTC: function (input) {\n return new Date(+input + (input.getTimezoneOffset() * 60000));\n },\n toTimeZone: function (input, offset, utc) {\n if (offset === null) {\n return input;\n }\n var unix = utc ? DataUtil.dateParse.toUTC(input) : input;\n return new Date(+unix - (offset * 3600000));\n },\n toLocalTime: function (input) {\n var datefn = input;\n var timeZone = -datefn.getTimezoneOffset();\n var differenceString = timeZone >= 0 ? '+' : '-';\n var localtimefn = function (num) {\n var norm = Math.floor(Math.abs(num));\n return (norm < 10 ? '0' : '') + norm;\n };\n var val = datefn.getFullYear() + '-' + localtimefn(datefn.getMonth() + 1) + '-' + localtimefn(datefn.getDate()) +\n 'T' + localtimefn(datefn.getHours()) +\n ':' + localtimefn(datefn.getMinutes()) +\n ':' + localtimefn(datefn.getSeconds()) +\n differenceString + localtimefn(timeZone / 60) +\n ':' + localtimefn(timeZone % 60);\n return val;\n }\n };\n return DataUtil;\n}());\nexport { DataUtil };\n","import { isNullOrUndefined, attributes } from '@syncfusion/ej2-base';\nimport { iterateArrayOrObject } from '../base/util';\nimport { CellType } from '../base/enum';\n/**\n * `CellMergeRender` module.\n * @hidden\n */\nvar CellMergeRender = /** @class */ (function () {\n function CellMergeRender(serviceLocator, parent) {\n this.serviceLocator = serviceLocator;\n this.parent = parent;\n }\n CellMergeRender.prototype.render = function (cellArgs, row, i, td) {\n var cellRendererFact = this.serviceLocator.getService('cellRendererFactory');\n var cellRenderer = cellRendererFact.getCellRenderer(row.cells[i].cellType || CellType.Data);\n var colSpan = row.cells[i].cellSpan ? row.cells[i].cellSpan :\n (cellArgs.colSpan + i) <= row.cells.length ? cellArgs.colSpan : row.cells.length - i;\n var rowSpan = cellArgs.rowSpan;\n var visible = 0;\n var spannedCell;\n if (row.index > 0) {\n var cells = this.parent.groupSettings.columns.length > 0 &&\n !this.parent.getRowsObject()[row.index - 1].isDataRow ? this.parent.getRowsObject()[row.index].cells :\n this.parent.getRowsObject()[row.index - 1].cells;\n var targetCell_1 = row.cells[i];\n var uid_1 = 'uid';\n spannedCell = cells.filter(function (cell) { return cell.column.uid === targetCell_1.column[uid_1]; })[0];\n }\n var colSpanLen = spannedCell && spannedCell.colSpanRange > 1 && spannedCell.rowSpanRange > 1 ?\n spannedCell.colSpanRange : colSpan;\n for (var j = i + 1; j < i + colSpanLen && j < row.cells.length; j++) {\n if (row.cells[j].visible === false) {\n visible++;\n }\n else {\n row.cells[j].isSpanned = true;\n }\n }\n if (visible > 0) {\n for (var j = i + colSpan; j < i + colSpan + visible && j < row.cells.length; j++) {\n row.cells[j].isSpanned = true;\n }\n if (i + colSpan + visible >= row.cells.length) {\n colSpan -= (i + colSpan + visible) - row.cells.length;\n }\n }\n if (row.cells[i].cellSpan) {\n row.data[cellArgs.column.field] = row.cells[i].spanText;\n td = cellRenderer.render(row.cells[i], row.data, { 'index': !isNullOrUndefined(row.index) ? row.index.toString() : '' });\n }\n if (colSpan > 1) {\n attributes(td, { 'colSpan': colSpan.toString(), 'aria-colSpan': colSpan.toString() });\n }\n if (rowSpan > 1) {\n attributes(td, { 'rowspan': rowSpan.toString(), 'aria-rowspan': rowSpan.toString() });\n row.cells[i].isRowSpanned = true;\n row.cells[i].rowSpanRange = Number(rowSpan);\n if (colSpan > 1) {\n row.cells[i].colSpanRange = Number(colSpan);\n }\n }\n if (row.index > 0 && (spannedCell.rowSpanRange > 1)) {\n row.cells[i].isSpanned = true;\n row.cells[i].rowSpanRange = Number(spannedCell.rowSpanRange - 1);\n row.cells[i].colSpanRange = spannedCell.rowSpanRange > 0 ? spannedCell.colSpanRange : 1;\n }\n if (this.parent.enableColumnVirtualization && !row.cells[i].cellSpan &&\n !this.containsKey(cellArgs.column.field, cellArgs.data[cellArgs.column.field])) {\n this.backupMergeCells(cellArgs.column.field, cellArgs.data[cellArgs.column.field], cellArgs.colSpan);\n }\n return td;\n };\n CellMergeRender.prototype.backupMergeCells = function (fName, data, span) {\n this.setMergeCells(this.generteKey(fName, data), span);\n };\n CellMergeRender.prototype.generteKey = function (fname, data) {\n return fname + '__' + data.toString();\n };\n CellMergeRender.prototype.splitKey = function (key) {\n return key.split('__');\n };\n CellMergeRender.prototype.containsKey = function (fname, data) {\n return this.getMergeCells().hasOwnProperty(this.generteKey(fname, data));\n };\n CellMergeRender.prototype.getMergeCells = function () {\n return this.parent.mergeCells;\n };\n CellMergeRender.prototype.setMergeCells = function (key, span) {\n this.parent.mergeCells[key] = span;\n };\n CellMergeRender.prototype.updateVirtualCells = function (rows) {\n var mCells = this.getMergeCells();\n for (var _i = 0, _a = Object.keys(mCells); _i < _a.length; _i++) {\n var key = _a[_i];\n var value = mCells[key];\n var merge = this.splitKey(key);\n var columnIndex = this.getIndexFromAllColumns(merge[0]);\n var vColumnIndices = this.parent.getColumnIndexesInView();\n var span = value - (vColumnIndices[0] - columnIndex);\n if (columnIndex < vColumnIndices[0] && span > 1) {\n for (var _b = 0, rows_1 = rows; _b < rows_1.length; _b++) {\n var row = rows_1[_b];\n if (row.data[merge[0]].toString() === merge[1].toString()) {\n row.cells[0].cellSpan = span;\n row.cells[0].spanText = merge[1];\n break;\n }\n }\n }\n }\n return rows;\n };\n CellMergeRender.prototype.getIndexFromAllColumns = function (field) {\n var index = iterateArrayOrObject(this.parent.getVisibleColumns(), function (item, index) {\n if (item.field === field) {\n return index;\n }\n return undefined;\n })[0];\n return index;\n };\n return CellMergeRender;\n}());\nexport { CellMergeRender };\n","import { Row } from './../models/row';\nimport { CellType } from '../base/enum';\nimport { isNullOrUndefined, Internationalization, getValue, createElement } from '@syncfusion/ej2-base';\nimport { Cell } from '../models/cell';\nimport { ValueFormatter } from './../services/value-formatter';\nimport { Query, DataManager } from '@syncfusion/ej2-data';\nimport { getForeignData, measureColumnDepth, getUid } from '../base/util';\nimport { Grid } from '../base/grid';\n/**\n * @hidden\n * `ExportHelper` for `PdfExport` & `ExcelExport`\n */\nvar ExportHelper = /** @class */ (function () {\n function ExportHelper(parent) {\n this.hideColumnInclude = false;\n this.foreignKeyData = {};\n this.parent = parent;\n }\n ExportHelper.getQuery = function (parent, data) {\n var query = data.generateQuery(true).requiresCount();\n if (data.isRemote()) {\n if (parent.groupSettings.enableLazyLoading && parent.groupSettings.columns.length) {\n query.lazyLoad = [];\n }\n else {\n query.take(parent.pageSettings.totalRecordsCount);\n }\n }\n return query;\n };\n ExportHelper.prototype.getFData = function (value, column) {\n var foreignKeyData = getForeignData(column, {}, value, this.foreignKeyData[column.field])[0];\n return foreignKeyData;\n };\n ExportHelper.prototype.getGridRowModel = function (columns, dataSource, gObj, startIndex) {\n if (startIndex === void 0) { startIndex = 0; }\n var rows = [];\n var length = dataSource.length;\n if (length) {\n for (var i = 0; i < length; i++, startIndex++) {\n var options = { isExpand: false };\n options.data = dataSource[i];\n options.index = startIndex;\n if (gObj.childGrid) {\n if (gObj.hierarchyPrintMode === 'All') {\n options.isExpand = true;\n }\n else if (gObj.hierarchyPrintMode === 'Expanded' &&\n this.parent.expandedRows && this.parent.expandedRows[startIndex]) {\n options.isExpand = gObj.expandedRows[startIndex].isExpand;\n }\n }\n var row = new Row(options);\n row.cells = this.generateCells(columns, gObj);\n rows.push(row);\n }\n this.processColumns(rows);\n }\n return rows;\n };\n ExportHelper.prototype.generateCells = function (columns, gObj) {\n var cells = [];\n if (gObj.childGridLevel) {\n var len = gObj.childGridLevel;\n for (var i = 0; len > i; i++) {\n cells.push(this.generateCell({}, CellType.Indent));\n }\n }\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var col = columns_1[_i];\n cells.push(this.generateCell(col, CellType.Data));\n }\n return cells;\n };\n ExportHelper.prototype.getColumnData = function (gridObj) {\n var _this = this;\n var columnPromise = [];\n var promise;\n var fColumns = gridObj.getForeignKeyColumns();\n if (fColumns.length) {\n for (var i = 0; i < fColumns.length; i++) {\n var colData = ('result' in fColumns[i].dataSource) ?\n new DataManager(fColumns[i].dataSource.result) :\n fColumns[i].dataSource;\n columnPromise.push(colData.executeQuery(new Query()));\n }\n promise = Promise.all(columnPromise).then(function (e) {\n for (var j = 0; j < fColumns.length; j++) {\n _this.foreignKeyData[fColumns[j].field] = e[j].result;\n }\n // tslint:disable-next-line:no-any\n });\n }\n return promise;\n };\n ExportHelper.prototype.getHeaders = function (columns, isHideColumnInclude) {\n if (isHideColumnInclude) {\n this.hideColumnInclude = true;\n }\n else {\n this.hideColumnInclude = false;\n }\n this.colDepth = measureColumnDepth(columns);\n var rows = [];\n for (var i = 0; i < this.colDepth; i++) {\n rows[i] = new Row({});\n rows[i].cells = [];\n }\n rows = this.processColumns(rows);\n rows = this.processHeaderCells(rows, columns);\n return { rows: rows, columns: this.generateActualColumns(columns) };\n };\n ExportHelper.prototype.getConvertedWidth = function (input) {\n var value = parseFloat(input);\n return (input.indexOf('%') !== -1) ? (this.parent.element.getBoundingClientRect().width * value / 100) : value;\n };\n ExportHelper.prototype.generateActualColumns = function (columns, actualColumns) {\n if (actualColumns === void 0) { actualColumns = []; }\n for (var _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {\n var column = columns_2[_i];\n if (column.commands) {\n continue;\n }\n if (!column.columns) {\n if (column.visible || this.hideColumnInclude) {\n actualColumns.push(column);\n }\n }\n else {\n if (column.visible || this.hideColumnInclude) {\n var colSpan = this.getCellCount(column, 0);\n if (colSpan !== 0) {\n this.generateActualColumns(column.columns, actualColumns);\n }\n }\n }\n }\n return actualColumns;\n };\n ExportHelper.prototype.processHeaderCells = function (rows, cols) {\n var columns = cols;\n for (var i = 0; i < columns.length; i++) {\n if (!columns[i].commands) {\n rows = this.appendGridCells(columns[i], rows, 0);\n }\n }\n return rows;\n };\n ExportHelper.prototype.appendGridCells = function (cols, gridRows, index) {\n if (!cols.columns && (cols.visible !== false || this.hideColumnInclude) && !cols.commands) {\n gridRows[index].cells.push(this.generateCell(cols, CellType.Header, this.colDepth - index, index));\n }\n else if (cols.columns) {\n var colSpan = this.getCellCount(cols, 0);\n if (colSpan) {\n gridRows[index].cells.push(new Cell({\n cellType: CellType.StackedHeader, column: cols, colSpan: colSpan\n }));\n }\n var isIgnoreFirstCell = void 0;\n for (var i = 0, len = cols.columns.length; i < len; i++) {\n if (cols.columns[i].visible && !isIgnoreFirstCell) {\n isIgnoreFirstCell = true;\n }\n gridRows = this.appendGridCells(cols.columns[i], gridRows, index + 1);\n }\n }\n return gridRows;\n };\n ExportHelper.prototype.generateCell = function (gridColumn, cellType, rowSpan, rowIndex) {\n var option = {\n 'visible': gridColumn.visible,\n 'isDataCell': cellType === CellType.Data,\n 'column': gridColumn,\n 'cellType': cellType,\n 'rowSpan': rowSpan,\n 'index': rowIndex\n };\n if (!option.rowSpan || option.rowSpan < 2) {\n delete option.rowSpan;\n }\n return new Cell(option);\n };\n ExportHelper.prototype.processColumns = function (rows) {\n //TODO: generate dummy column for group, detail, stacked row here; ensureColumns here\n var gridObj = this.parent;\n var columnIndexes = [];\n if (gridObj.enableColumnVirtualization) {\n columnIndexes = gridObj.getColumnIndexesInView();\n }\n for (var i = 0, len = rows.length; i < len; i++) {\n if (gridObj.allowGrouping) {\n for (var j = 0, len_1 = gridObj.groupSettings.columns.length; j < len_1; j++) {\n if (gridObj.enableColumnVirtualization && columnIndexes.indexOf(j) === -1) {\n continue;\n }\n rows[i].cells.splice(0, 0, this.generateCell({}, CellType.HeaderIndent));\n }\n }\n }\n return rows;\n };\n ExportHelper.prototype.getCellCount = function (column, count) {\n if (column.columns) {\n for (var i = 0; i < column.columns.length; i++) {\n count = this.getCellCount(column.columns[i], count);\n }\n }\n else {\n if (column.visible || this.hideColumnInclude) {\n count++;\n }\n }\n return count;\n };\n ExportHelper.prototype.checkAndExport = function (gridPool, globalResolve) {\n var bool = Object.keys(gridPool).some(function (key) {\n return !gridPool[key];\n });\n if (!bool) {\n globalResolve();\n }\n };\n ExportHelper.prototype.failureHandler = function (gridPool, childGridObj, resolve) {\n var _this = this;\n return function () {\n gridPool[childGridObj.id] = true;\n _this.checkAndExport(gridPool, resolve);\n };\n };\n // tslint:disable-next-line:no-any\n ExportHelper.prototype.createChildGrid = function (gObj, row, exportType, gridPool) {\n var childGridObj = new Grid(this.parent.detailRowModule.getGridModel(gObj, row, exportType));\n gObj.isPrinting = false;\n var parent = 'parentDetails';\n childGridObj[parent] = {\n parentID: gObj.element.id,\n parentPrimaryKeys: gObj.getPrimaryKeyFieldNames(),\n parentKeyField: gObj.childGrid.queryString,\n parentKeyFieldValue: getValue(childGridObj.queryString, row.data),\n parentRowData: row.data\n };\n var exportId = getUid('child-grid');\n var element = createElement('div', {\n id: exportId, styles: 'display: none'\n });\n document.body.appendChild(element);\n childGridObj.id = exportId;\n gridPool[exportId] = false;\n return { childGrid: childGridObj, element: element };\n };\n ExportHelper.prototype.getGridExportColumns = function (columns) {\n var actualGridColumns = [];\n for (var i = 0, gridColumns = columns; i < gridColumns.length; i++) {\n if (gridColumns[i].type !== 'checkbox') {\n actualGridColumns.push(gridColumns[i]);\n }\n }\n return actualGridColumns;\n };\n return ExportHelper;\n}());\nexport { ExportHelper };\n/**\n * @hidden\n * `ExportValueFormatter` for `PdfExport` & `ExcelExport`\n */\nvar ExportValueFormatter = /** @class */ (function () {\n function ExportValueFormatter(culture) {\n this.valueFormatter = new ValueFormatter(culture);\n this.internationalization = new Internationalization(culture);\n }\n /* tslint:disable-next-line:no-any */\n ExportValueFormatter.prototype.returnFormattedValue = function (args, customFormat) {\n if (!isNullOrUndefined(args.value) && args.value) {\n return this.valueFormatter.getFormatFunction(customFormat)(args.value);\n }\n else {\n return '';\n }\n };\n /* tslint:disable-next-line:no-any */\n ExportValueFormatter.prototype.formatCellValue = function (args, isServerBlaz) {\n if (args.isForeignKey) {\n args.value = getValue(args.column.foreignKeyValue, getForeignData(args.column, {}, args.value)[0]);\n }\n if (args.column.type === 'number' && args.column.format !== undefined && args.column.format !== '') {\n return args.value || args.value === 0 ?\n this.internationalization.getNumberFormat({ format: args.column.format })(args.value) : '';\n }\n else if (args.column.type === 'boolean' && args.value !== '') {\n return args.value ? 'true' : 'false';\n /* tslint:disable-next-line:max-line-length */\n }\n else if ((args.column.type === 'date' || args.column.type === 'datetime' || args.column.type === 'time') && args.column.format !== undefined) {\n if (typeof args.value === 'string') {\n args.value = new Date(args.value);\n }\n if (typeof args.column.format === 'string') {\n var format = void 0;\n var cFormat = args.column.format;\n if (args.column.type === 'date') {\n format = isServerBlaz ? { type: 'date', format: cFormat } : { type: 'date', skeleton: cFormat };\n }\n else if (args.column.type === 'time') {\n format = isServerBlaz ? { type: 'time', format: cFormat } : { type: 'time', skeleton: cFormat };\n }\n else {\n format = isServerBlaz ? { type: 'dateTime', format: cFormat } : { type: 'dateTime', skeleton: cFormat };\n }\n return this.returnFormattedValue(args, format);\n }\n else {\n if (args.column.format instanceof Object && args.column.format.type === undefined) {\n return (args.value.toString());\n }\n else {\n /* tslint:disable-next-line:max-line-length */\n var customFormat = void 0;\n if (args.column.type === 'date') {\n /* tslint:disable-next-line:max-line-length */\n customFormat = { type: args.column.format.type, format: args.column.format.format, skeleton: args.column.format.skeleton };\n }\n else if (args.column.type === 'time') {\n customFormat = { type: 'time', format: args.column.format.format, skeleton: args.column.format.skeleton };\n }\n else {\n customFormat = { type: 'dateTime', format: args.column.format.format, skeleton: args.column.format.skeleton };\n }\n return this.returnFormattedValue(args, customFormat);\n }\n }\n }\n else {\n if ((!isNullOrUndefined(args.column.type) && !isNullOrUndefined(args.value)) || !isNullOrUndefined(args.value)) {\n return (args.value).toString();\n }\n else {\n return '';\n }\n }\n };\n return ExportValueFormatter;\n}());\nexport { ExportValueFormatter };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Touch, Component, EventHandler, selectAll, getUniqueID } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, Property, Browser, detach } from '@syncfusion/ej2-base';\nimport { classList, isNullOrUndefined } from '@syncfusion/ej2-base';\nvar CLS_ROOT = 'e-hscroll';\nvar CLS_RTL = 'e-rtl';\nvar CLS_DISABLE = 'e-overlay';\nvar CLS_HSCROLLBAR = 'e-hscroll-bar';\nvar CLS_HSCROLLCON = 'e-hscroll-content';\nvar CLS_NAVARROW = 'e-nav-arrow';\nvar CLS_NAVRIGHTARROW = 'e-nav-right-arrow';\nvar CLS_NAVLEFTARROW = 'e-nav-left-arrow';\nvar CLS_HSCROLLNAV = 'e-scroll-nav';\nvar CLS_HSCROLLNAVRIGHT = 'e-scroll-right-nav';\nvar CLS_HSCROLLNAVLEFT = 'e-scroll-left-nav';\nvar CLS_DEVICE = 'e-scroll-device';\nvar CLS_OVERLAY = 'e-scroll-overlay';\nvar CLS_RIGHTOVERLAY = 'e-scroll-right-overlay';\nvar CLS_LEFTOVERLAY = 'e-scroll-left-overlay';\nvar OVERLAY_MAXWID = 40;\n/**\n * HScroll module is introduces horizontal scroller when content exceeds the current viewing area.\n * It can be useful for the components like Toolbar, Tab which needs horizontal scrolling alone.\n * Hidden content can be view by touch moving or icon click.\n * ```html\n *
\n * \n * ```\n */\nvar HScroll = /** @class */ (function (_super) {\n __extends(HScroll, _super);\n /**\n * Initializes a new instance of the HScroll class.\n * @param options - Specifies HScroll model properties as options.\n * @param element - Specifies the element for which horizontal scrolling applies.\n */\n function HScroll(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * Initialize the event handler\n * @private\n */\n HScroll.prototype.preRender = function () {\n this.browser = Browser.info.name;\n this.browserCheck = this.browser === 'mozilla';\n this.isDevice = Browser.isDevice;\n this.customStep = true;\n var element = this.element;\n this.ieCheck = this.browser === 'edge' || this.browser === 'msie';\n this.initialize();\n if (element.id === '') {\n element.id = getUniqueID('hscroll');\n this.uniqueId = true;\n }\n element.style.display = 'block';\n if (this.enableRtl) {\n element.classList.add(CLS_RTL);\n }\n };\n /**\n * To Initialize the horizontal scroll rendering\n * @private\n */\n HScroll.prototype.render = function () {\n this.touchModule = new Touch(this.element, { scroll: this.touchHandler.bind(this), swipe: this.swipeHandler.bind(this) });\n EventHandler.add(this.scrollEle, 'scroll', this.scrollHandler, this);\n if (!this.isDevice) {\n this.createNavIcon(this.element);\n }\n else {\n this.element.classList.add(CLS_DEVICE);\n this.createOverlay(this.element);\n }\n this.setScrollState();\n };\n HScroll.prototype.setScrollState = function () {\n if (isNullOrUndefined(this.scrollStep) || this.scrollStep < 0) {\n this.scrollStep = this.scrollEle.offsetWidth;\n this.customStep = false;\n }\n else {\n this.customStep = true;\n }\n };\n HScroll.prototype.initialize = function () {\n var scrollEle = this.createElement('div', { className: CLS_HSCROLLCON });\n var scrollDiv = this.createElement('div', { className: CLS_HSCROLLBAR });\n scrollDiv.setAttribute('tabindex', '-1');\n var ele = this.element;\n var innerEle = [].slice.call(ele.children);\n for (var _i = 0, innerEle_1 = innerEle; _i < innerEle_1.length; _i++) {\n var ele_1 = innerEle_1[_i];\n scrollEle.appendChild(ele_1);\n }\n scrollDiv.appendChild(scrollEle);\n ele.appendChild(scrollDiv);\n scrollDiv.style.overflowX = 'hidden';\n this.scrollEle = scrollDiv;\n this.scrollItems = scrollEle;\n };\n HScroll.prototype.getPersistData = function () {\n var keyEntity = ['scrollStep'];\n return this.addOnPersist(keyEntity);\n };\n /**\n * Returns the current module name.\n * @returns string\n * @private\n */\n HScroll.prototype.getModuleName = function () {\n return 'hScroll';\n };\n /**\n * Removes the control from the DOM and also removes all its related events.\n * @returns void\n */\n HScroll.prototype.destroy = function () {\n var ele = this.element;\n ele.style.display = '';\n ele.classList.remove(CLS_ROOT);\n ele.classList.remove(CLS_DEVICE);\n var nav = selectAll('.e-' + ele.id + '_nav.' + CLS_HSCROLLNAV, ele);\n var overlay = selectAll('.' + CLS_OVERLAY, ele);\n [].slice.call(overlay).forEach(function (ele) {\n detach(ele);\n });\n for (var _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {\n var elem = _a[_i];\n ele.appendChild(elem);\n }\n if (this.uniqueId) {\n this.element.removeAttribute('id');\n }\n detach(this.scrollEle);\n if (nav.length > 0) {\n detach(nav[0]);\n if (!isNullOrUndefined(nav[1])) {\n detach(nav[1]);\n }\n }\n EventHandler.remove(this.scrollEle, 'scroll', this.scrollHandler);\n this.touchModule.destroy();\n this.touchModule = null;\n _super.prototype.destroy.call(this);\n };\n /**\n * Specifies the value to disable/enable the HScroll component.\n * When set to `true` , the component will be disabled.\n * @param {boolean} value - Based on this Boolean value, HScroll will be enabled (false) or disabled (true).\n * @returns void.\n */\n HScroll.prototype.disable = function (value) {\n var navEles = selectAll('.e-scroll-nav:not(.' + CLS_DISABLE + ')', this.element);\n value ? this.element.classList.add(CLS_DISABLE) : this.element.classList.remove(CLS_DISABLE);\n [].slice.call(navEles).forEach(function (el) {\n el.setAttribute('tabindex', !value ? '0' : '-1');\n });\n };\n HScroll.prototype.createOverlay = function (element) {\n var id = element.id.concat('_nav');\n var rightOverlayEle = this.createElement('div', { className: CLS_OVERLAY + ' ' + CLS_RIGHTOVERLAY });\n var clsRight = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVRIGHT);\n var rightEle = this.createElement('div', { id: id.concat('_right'), className: clsRight });\n var navItem = this.createElement('div', { className: CLS_NAVRIGHTARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n rightEle.appendChild(navItem);\n var leftEle = this.createElement('div', { className: CLS_OVERLAY + ' ' + CLS_LEFTOVERLAY });\n if (this.ieCheck) {\n rightEle.classList.add('e-ie-align');\n }\n element.appendChild(rightOverlayEle);\n element.appendChild(rightEle);\n element.insertBefore(leftEle, element.firstChild);\n this.eventBinding([rightEle]);\n };\n HScroll.prototype.createNavIcon = function (element) {\n var id = element.id.concat('_nav');\n var clsRight = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVRIGHT);\n var nav = this.createElement('div', { id: id.concat('_right'), className: clsRight });\n nav.setAttribute('aria-disabled', 'false');\n var navItem = this.createElement('div', { className: CLS_NAVRIGHTARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n var clsLeft = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVLEFT);\n var navEle = this.createElement('div', { id: id.concat('_left'), className: clsLeft + ' ' + CLS_DISABLE });\n navEle.setAttribute('aria-disabled', 'true');\n var navLeftItem = this.createElement('div', { className: CLS_NAVLEFTARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n navEle.appendChild(navLeftItem);\n nav.appendChild(navItem);\n element.appendChild(nav);\n element.insertBefore(navEle, element.firstChild);\n if (this.ieCheck) {\n nav.classList.add('e-ie-align');\n navEle.classList.add('e-ie-align');\n }\n this.eventBinding([nav, navEle]);\n };\n HScroll.prototype.onKeyPress = function (e) {\n var _this = this;\n if (e.key === 'Enter') {\n var timeoutFun_1 = function () {\n _this.keyTimeout = true;\n _this.eleScrolling(10, e.target, true);\n };\n this.keyTimer = window.setTimeout(function () {\n timeoutFun_1();\n }, 100);\n }\n };\n HScroll.prototype.onKeyUp = function (e) {\n if (e.key !== 'Enter') {\n return;\n }\n if (this.keyTimeout) {\n this.keyTimeout = false;\n }\n else {\n e.target.click();\n }\n clearTimeout(this.keyTimer);\n };\n HScroll.prototype.eventBinding = function (ele) {\n var _this = this;\n [].slice.call(ele).forEach(function (el) {\n new Touch(el, { tapHold: _this.tabHoldHandler.bind(_this), tapHoldThreshold: 500 });\n el.addEventListener('keydown', _this.onKeyPress.bind(_this));\n el.addEventListener('keyup', _this.onKeyUp.bind(_this));\n el.addEventListener('mouseup', _this.repeatScroll.bind(_this));\n el.addEventListener('touchend', _this.repeatScroll.bind(_this));\n el.addEventListener('contextmenu', function (e) {\n e.preventDefault();\n });\n EventHandler.add(el, 'click', _this.clickEventHandler, _this);\n });\n };\n HScroll.prototype.repeatScroll = function () {\n clearInterval(this.timeout);\n };\n HScroll.prototype.tabHoldHandler = function (e) {\n var _this = this;\n var trgt = e.originalEvent.target;\n trgt = this.contains(trgt, CLS_HSCROLLNAV) ? trgt.firstElementChild : trgt;\n var scrollDis = 10;\n var timeoutFun = function () {\n _this.eleScrolling(scrollDis, trgt, true);\n };\n this.timeout = window.setInterval(function () {\n timeoutFun();\n }, 50);\n };\n HScroll.prototype.contains = function (ele, className) {\n return ele.classList.contains(className);\n };\n HScroll.prototype.eleScrolling = function (scrollDis, trgt, isContinuous) {\n var element = this.scrollEle;\n var rootEle = this.element;\n var classList = trgt.classList;\n if (classList.contains(CLS_HSCROLLNAV)) {\n classList = trgt.querySelector('.' + CLS_NAVARROW).classList;\n }\n if (this.contains(rootEle, CLS_RTL) && this.browserCheck) {\n scrollDis = -scrollDis;\n }\n var scrlLeft = element.scrollLeft;\n if ((!this.contains(rootEle, CLS_RTL) || this.browserCheck) || this.ieCheck) {\n if (classList.contains(CLS_NAVRIGHTARROW)) {\n this.frameScrollRequest(scrollDis, 'add', isContinuous);\n }\n else {\n this.frameScrollRequest(scrollDis, '', isContinuous);\n }\n }\n else {\n if (classList.contains(CLS_NAVLEFTARROW)) {\n this.frameScrollRequest(scrollDis, 'add', isContinuous);\n }\n else {\n this.frameScrollRequest(scrollDis, '', isContinuous);\n }\n }\n };\n HScroll.prototype.clickEventHandler = function (e) {\n this.eleScrolling(this.scrollStep, e.target, false);\n };\n HScroll.prototype.swipeHandler = function (e) {\n var swipeEle = this.scrollEle;\n var distance;\n if (e.velocity <= 1) {\n distance = e.distanceX / (e.velocity * 10);\n }\n else {\n distance = e.distanceX / e.velocity;\n }\n var start = 0.5;\n var animate = function () {\n var step = Math.sin(start);\n if (step <= 0) {\n window.cancelAnimationFrame(step);\n }\n else {\n if (e.swipeDirection === 'Left') {\n swipeEle.scrollLeft += distance * step;\n }\n else if (e.swipeDirection === 'Right') {\n swipeEle.scrollLeft -= distance * step;\n }\n start -= 0.5;\n window.requestAnimationFrame(animate);\n }\n };\n animate();\n };\n HScroll.prototype.scrollUpdating = function (scrollVal, action) {\n if (action === 'add') {\n this.scrollEle.scrollLeft += scrollVal;\n }\n else {\n this.scrollEle.scrollLeft -= scrollVal;\n }\n };\n HScroll.prototype.frameScrollRequest = function (scrollVal, action, isContinuous) {\n var _this = this;\n var step = 10;\n if (isContinuous) {\n this.scrollUpdating(scrollVal, action);\n return;\n }\n if (!this.customStep) {\n [].slice.call(selectAll('.' + CLS_OVERLAY, this.element)).forEach(function (el) {\n scrollVal -= el.offsetWidth;\n });\n }\n var animate = function () {\n var scrollValue;\n var scrollStep;\n if (_this.contains(_this.element, CLS_RTL) && _this.browserCheck) {\n scrollValue = -scrollVal;\n scrollStep = -step;\n }\n else {\n scrollValue = scrollVal;\n scrollStep = step;\n }\n if (scrollValue < step) {\n window.cancelAnimationFrame(scrollStep);\n }\n else {\n _this.scrollUpdating(scrollStep, action);\n scrollVal -= scrollStep;\n window.requestAnimationFrame(animate);\n }\n };\n animate();\n };\n HScroll.prototype.touchHandler = function (e) {\n var ele = this.scrollEle;\n var distance;\n distance = e.distanceX;\n if ((this.ieCheck) && this.contains(this.element, CLS_RTL)) {\n distance = -distance;\n }\n if (e.scrollDirection === 'Left') {\n ele.scrollLeft = ele.scrollLeft + distance;\n }\n else if (e.scrollDirection === 'Right') {\n ele.scrollLeft = ele.scrollLeft - distance;\n }\n };\n HScroll.prototype.arrowDisabling = function (addDisable, removeDisable) {\n if (this.isDevice) {\n var arrowEle = isNullOrUndefined(addDisable) ? removeDisable : addDisable;\n var arrowIcon = arrowEle.querySelector('.' + CLS_NAVARROW);\n if (isNullOrUndefined(addDisable)) {\n classList(arrowIcon, [CLS_NAVRIGHTARROW], [CLS_NAVLEFTARROW]);\n }\n else {\n classList(arrowIcon, [CLS_NAVLEFTARROW], [CLS_NAVRIGHTARROW]);\n }\n }\n else {\n addDisable.classList.add(CLS_DISABLE);\n addDisable.setAttribute('aria-disabled', 'true');\n addDisable.removeAttribute('tabindex');\n removeDisable.classList.remove(CLS_DISABLE);\n removeDisable.setAttribute('aria-disabled', 'false');\n removeDisable.setAttribute('tabindex', '0');\n }\n this.repeatScroll();\n };\n HScroll.prototype.scrollHandler = function (e) {\n var target = e.target;\n var width = target.offsetWidth;\n var rootEle = this.element;\n var navLeftEle = this.element.querySelector('.' + CLS_HSCROLLNAVLEFT);\n var navRightEle = this.element.querySelector('.' + CLS_HSCROLLNAVRIGHT);\n var leftOverlay = this.element.querySelector('.' + CLS_LEFTOVERLAY);\n var rightOverlay = this.element.querySelector('.' + CLS_RIGHTOVERLAY);\n var scrollLeft = target.scrollLeft;\n if (scrollLeft <= 0) {\n scrollLeft = -scrollLeft;\n }\n if (this.isDevice) {\n if (this.enableRtl && !(this.browserCheck || this.ieCheck)) {\n leftOverlay = this.element.querySelector('.' + CLS_RIGHTOVERLAY);\n rightOverlay = this.element.querySelector('.' + CLS_LEFTOVERLAY);\n }\n if (scrollLeft < OVERLAY_MAXWID) {\n leftOverlay.style.width = scrollLeft + 'px';\n }\n else {\n leftOverlay.style.width = '40px';\n }\n if ((target.scrollWidth - Math.ceil(width + scrollLeft)) < OVERLAY_MAXWID) {\n rightOverlay.style.width = (target.scrollWidth - Math.ceil(width + scrollLeft)) + 'px';\n }\n else {\n rightOverlay.style.width = '40px';\n }\n }\n if (scrollLeft === 0) {\n if ((!this.contains(rootEle, CLS_RTL) || this.browserCheck) || this.ieCheck) {\n this.arrowDisabling(navLeftEle, navRightEle);\n }\n else {\n this.arrowDisabling(navRightEle, navLeftEle);\n }\n }\n else if (Math.ceil(width + scrollLeft + .1) >= target.scrollWidth) {\n if ((!this.contains(rootEle, CLS_RTL) || this.browserCheck) || this.ieCheck) {\n this.arrowDisabling(navRightEle, navLeftEle);\n }\n else {\n this.arrowDisabling(navLeftEle, navRightEle);\n }\n }\n else {\n var disEle = this.element.querySelector('.' + CLS_HSCROLLNAV + '.' + CLS_DISABLE);\n if (disEle) {\n disEle.classList.remove(CLS_DISABLE);\n disEle.setAttribute('aria-disabled', 'false');\n disEle.setAttribute('tabindex', '0');\n }\n }\n };\n /**\n * Gets called when the model property changes.The data that describes the old and new values of property that changed.\n * @param {HScrollModel} newProp\n * @param {HScrollModel} oldProp\n * @returns void\n * @private\n */\n HScroll.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'scrollStep':\n this.setScrollState();\n break;\n case 'enableRtl':\n newProp.enableRtl ? this.element.classList.add(CLS_RTL) : this.element.classList.remove(CLS_RTL);\n break;\n }\n }\n };\n __decorate([\n Property(null)\n ], HScroll.prototype, \"scrollStep\", void 0);\n HScroll = __decorate([\n NotifyPropertyChanges\n ], HScroll);\n return HScroll;\n}(Component));\nexport { HScroll };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Touch, Component, EventHandler, selectAll, getUniqueID, removeClass } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, Property, Browser, detach, createElement as buildTag } from '@syncfusion/ej2-base';\nimport { classList, isNullOrUndefined } from '@syncfusion/ej2-base';\nvar CLS_ROOT = 'e-vscroll';\nvar CLS_RTL = 'e-rtl';\nvar CLS_DISABLE = 'e-overlay';\nvar CLS_VSCROLLBAR = 'e-vscroll-bar';\nvar CLS_VSCROLLCON = 'e-vscroll-content';\nvar CLS_NAVARROW = 'e-nav-arrow';\nvar CLS_NAVUPARROW = 'e-nav-up-arrow';\nvar CLS_NAVDOWNARROW = 'e-nav-down-arrow';\nvar CLS_VSCROLLNAV = 'e-scroll-nav';\nvar CLS_VSCROLLNAVUP = 'e-scroll-up-nav';\nvar CLS_VSCROLLNAVDOWN = 'e-scroll-down-nav';\nvar CLS_DEVICE = 'e-scroll-device';\nvar CLS_OVERLAY = 'e-scroll-overlay';\nvar CLS_UPOVERLAY = 'e-scroll-up-overlay';\nvar CLS_DOWNOVERLAY = 'e-scroll-down-overlay';\nvar OVERLAY_MAXWID = 40;\n/**\n * VScroll module is introduces vertical scroller when content exceeds the current viewing area.\n * It can be useful for the components like Toolbar, Tab which needs vertical scrolling alone.\n * Hidden content can be view by touch moving or icon click.\n * ```html\n *
\n * \n * ```\n */\nvar VScroll = /** @class */ (function (_super) {\n __extends(VScroll, _super);\n /**\n * Initializes a new instance of the VScroll class.\n * @param options - Specifies VScroll model properties as options.\n * @param element - Specifies the element for which vertical scrolling applies.\n */\n function VScroll(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * Initialize the event handler\n * @private\n */\n VScroll.prototype.preRender = function () {\n this.browser = Browser.info.name;\n this.browserCheck = this.browser === 'mozilla';\n this.isDevice = Browser.isDevice;\n this.customStep = true;\n var ele = this.element;\n this.ieCheck = this.browser === 'edge' || this.browser === 'msie';\n this.initialize();\n if (ele.id === '') {\n ele.id = getUniqueID('vscroll');\n this.uniqueId = true;\n }\n ele.style.display = 'block';\n if (this.enableRtl) {\n ele.classList.add(CLS_RTL);\n }\n };\n /**\n * To Initialize the vertical scroll rendering\n * @private\n */\n VScroll.prototype.render = function () {\n this.touchModule = new Touch(this.element, { scroll: this.touchHandler.bind(this), swipe: this.swipeHandler.bind(this) });\n EventHandler.add(this.scrollEle, 'scroll', this.scrollEventHandler, this);\n if (!this.isDevice) {\n this.createNavIcon(this.element);\n }\n else {\n this.element.classList.add(CLS_DEVICE);\n this.createOverlayElement(this.element);\n }\n this.setScrollState();\n EventHandler.add(this.element, 'wheel', this.wheelEventHandler, this);\n };\n VScroll.prototype.setScrollState = function () {\n if (isNullOrUndefined(this.scrollStep) || this.scrollStep < 0) {\n this.scrollStep = this.scrollEle.offsetHeight;\n this.customStep = false;\n }\n else {\n this.customStep = true;\n }\n };\n VScroll.prototype.initialize = function () {\n var scrollCnt = buildTag('div', { className: CLS_VSCROLLCON });\n var scrollBar = buildTag('div', { className: CLS_VSCROLLBAR });\n scrollBar.setAttribute('tabindex', '-1');\n var ele = this.element;\n var innerEle = [].slice.call(ele.children);\n for (var _i = 0, innerEle_1 = innerEle; _i < innerEle_1.length; _i++) {\n var ele_1 = innerEle_1[_i];\n scrollCnt.appendChild(ele_1);\n }\n scrollBar.appendChild(scrollCnt);\n ele.appendChild(scrollBar);\n scrollBar.style.overflowY = 'hidden';\n this.scrollEle = scrollBar;\n this.scrollItems = scrollCnt;\n };\n VScroll.prototype.getPersistData = function () {\n var keyEntity = ['scrollStep'];\n return this.addOnPersist(keyEntity);\n };\n /**\n * Returns the current module name.\n * @returns string\n * @private\n */\n VScroll.prototype.getModuleName = function () {\n return 'vScroll';\n };\n /**\n * Removes the control from the DOM and also removes all its related events.\n * @returns void\n */\n VScroll.prototype.destroy = function () {\n var el = this.element;\n el.style.display = '';\n removeClass([this.element], [CLS_ROOT, CLS_DEVICE]);\n var navs = selectAll('.e-' + el.id + '_nav.' + CLS_VSCROLLNAV, el);\n var overlays = selectAll('.' + CLS_OVERLAY, el);\n [].slice.call(overlays).forEach(function (ele) {\n detach(ele);\n });\n for (var _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {\n var elem = _a[_i];\n el.appendChild(elem);\n }\n if (this.uniqueId) {\n this.element.removeAttribute('id');\n }\n detach(this.scrollEle);\n if (navs.length > 0) {\n detach(navs[0]);\n if (!isNullOrUndefined(navs[1])) {\n detach(navs[1]);\n }\n }\n EventHandler.remove(this.scrollEle, 'scroll', this.scrollEventHandler);\n this.touchModule.destroy();\n this.touchModule = null;\n _super.prototype.destroy.call(this);\n };\n /**\n * Specifies the value to disable/enable the VScroll component.\n * When set to `true` , the component will be disabled.\n * @param {boolean} value - Based on this Boolean value, VScroll will be enabled (false) or disabled (true).\n * @returns void.\n */\n VScroll.prototype.disable = function (value) {\n var navEle = selectAll('.e-scroll-nav:not(.' + CLS_DISABLE + ')', this.element);\n value ? this.element.classList.add(CLS_DISABLE) : this.element.classList.remove(CLS_DISABLE);\n [].slice.call(navEle).forEach(function (el) {\n el.setAttribute('tabindex', !value ? '0' : '-1');\n });\n };\n VScroll.prototype.createOverlayElement = function (element) {\n var id = element.id.concat('_nav');\n var downOverlayEle = buildTag('div', { className: CLS_OVERLAY + ' ' + CLS_DOWNOVERLAY });\n var clsDown = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVDOWN);\n var downEle = buildTag('div', { id: id.concat('down'), className: clsDown });\n var navItem = buildTag('div', { className: CLS_NAVDOWNARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n downEle.appendChild(navItem);\n var upEle = buildTag('div', { className: CLS_OVERLAY + ' ' + CLS_UPOVERLAY });\n if (this.ieCheck) {\n downEle.classList.add('e-ie-align');\n }\n element.appendChild(downOverlayEle);\n element.appendChild(downEle);\n element.insertBefore(upEle, element.firstChild);\n this.eventBinding([downEle]);\n };\n VScroll.prototype.createNavIcon = function (element) {\n var id = element.id.concat('_nav');\n var clsDown = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVDOWN);\n var nav = buildTag('div', { id: id.concat('_down'), className: clsDown });\n nav.setAttribute('aria-disabled', 'false');\n var navItem = buildTag('div', { className: CLS_NAVDOWNARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n var clsUp = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVUP);\n var navElement = buildTag('div', { id: id.concat('_up'), className: clsUp + ' ' + CLS_DISABLE });\n navElement.setAttribute('aria-disabled', 'true');\n var navUpItem = buildTag('div', { className: CLS_NAVUPARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n navElement.appendChild(navUpItem);\n nav.appendChild(navItem);\n nav.setAttribute('tabindex', '0');\n element.appendChild(nav);\n element.insertBefore(navElement, element.firstChild);\n if (this.ieCheck) {\n nav.classList.add('e-ie-align');\n navElement.classList.add('e-ie-align');\n }\n this.eventBinding([nav, navElement]);\n };\n VScroll.prototype.onKeyPress = function (ev) {\n var _this = this;\n if (ev.key === 'Enter') {\n var timeoutFun_1 = function () {\n _this.keyTimeout = true;\n _this.eleScrolling(10, ev.target, true);\n };\n this.keyTimer = window.setTimeout(function () { timeoutFun_1(); }, 100);\n }\n };\n VScroll.prototype.onKeyUp = function (ev) {\n if (ev.key !== 'Enter') {\n return;\n }\n if (this.keyTimeout) {\n this.keyTimeout = false;\n }\n else {\n ev.target.click();\n }\n clearTimeout(this.keyTimer);\n };\n VScroll.prototype.eventBinding = function (element) {\n var _this = this;\n [].slice.call(element).forEach(function (ele) {\n new Touch(ele, { tapHold: _this.tabHoldHandler.bind(_this), tapHoldThreshold: 500 });\n ele.addEventListener('keydown', _this.onKeyPress.bind(_this));\n ele.addEventListener('keyup', _this.onKeyUp.bind(_this));\n ele.addEventListener('mouseup', _this.repeatScroll.bind(_this));\n ele.addEventListener('touchend', _this.repeatScroll.bind(_this));\n ele.addEventListener('contextmenu', function (e) {\n e.preventDefault();\n });\n EventHandler.add(ele, 'click', _this.clickEventHandler, _this);\n });\n };\n VScroll.prototype.repeatScroll = function () {\n clearInterval(this.timeout);\n };\n VScroll.prototype.tabHoldHandler = function (ev) {\n var _this = this;\n var trgt = ev.originalEvent.target;\n trgt = this.contains(trgt, CLS_VSCROLLNAV) ? trgt.firstElementChild : trgt;\n var scrollDistance = 10;\n var timeoutFun = function () {\n _this.eleScrolling(scrollDistance, trgt, true);\n };\n this.timeout = window.setInterval(function () { timeoutFun(); }, 50);\n };\n VScroll.prototype.contains = function (element, className) {\n return element.classList.contains(className);\n };\n VScroll.prototype.eleScrolling = function (scrollDis, trgt, isContinuous) {\n var rootElement = this.element;\n var classList = trgt.classList;\n if (classList.contains(CLS_VSCROLLNAV)) {\n classList = trgt.querySelector('.' + CLS_NAVARROW).classList;\n }\n if (classList.contains(CLS_NAVDOWNARROW)) {\n this.frameScrollRequest(scrollDis, 'add', isContinuous);\n }\n else if (classList.contains(CLS_NAVUPARROW)) {\n this.frameScrollRequest(scrollDis, '', isContinuous);\n }\n };\n VScroll.prototype.clickEventHandler = function (event) {\n this.eleScrolling(this.scrollStep, event.target, false);\n };\n VScroll.prototype.wheelEventHandler = function (e) {\n e.preventDefault();\n this.frameScrollRequest(this.scrollStep, (e.deltaY > 0 ? 'add' : ''), false);\n };\n VScroll.prototype.swipeHandler = function (e) {\n var swipeElement = this.scrollEle;\n var distance;\n if (e.velocity <= 1) {\n distance = e.distanceY / (e.velocity * 10);\n }\n else {\n distance = e.distanceY / e.velocity;\n }\n var start = 0.5;\n var animate = function () {\n var step = Math.sin(start);\n if (step <= 0) {\n window.cancelAnimationFrame(step);\n }\n else {\n if (e.swipeDirection === 'Up') {\n swipeElement.scrollTop += distance * step;\n }\n else if (e.swipeDirection === 'Down') {\n swipeElement.scrollTop -= distance * step;\n }\n start -= 0.02;\n window.requestAnimationFrame(animate);\n }\n };\n animate();\n };\n VScroll.prototype.scrollUpdating = function (scrollVal, action) {\n if (action === 'add') {\n this.scrollEle.scrollTop += scrollVal;\n }\n else {\n this.scrollEle.scrollTop -= scrollVal;\n }\n };\n VScroll.prototype.frameScrollRequest = function (scrollValue, action, isContinuous) {\n var _this = this;\n var step = 10;\n if (isContinuous) {\n this.scrollUpdating(scrollValue, action);\n return;\n }\n if (!this.customStep) {\n [].slice.call(selectAll('.' + CLS_OVERLAY, this.element)).forEach(function (el) {\n scrollValue -= el.offsetHeight;\n });\n }\n var animate = function () {\n if (scrollValue < step) {\n window.cancelAnimationFrame(step);\n }\n else {\n _this.scrollUpdating(step, action);\n scrollValue -= step;\n window.requestAnimationFrame(animate);\n }\n };\n animate();\n };\n VScroll.prototype.touchHandler = function (e) {\n var el = this.scrollEle;\n var distance;\n distance = e.distanceY;\n if (e.scrollDirection === 'Up') {\n el.scrollTop = el.scrollTop + distance;\n }\n else if (e.scrollDirection === 'Down') {\n el.scrollTop = el.scrollTop - distance;\n }\n };\n VScroll.prototype.arrowDisabling = function (addDisableCls, removeDisableCls) {\n if (this.isDevice) {\n var arrowEle = isNullOrUndefined(addDisableCls) ? removeDisableCls : addDisableCls;\n var arrowIcon = arrowEle.querySelector('.' + CLS_NAVARROW);\n if (isNullOrUndefined(addDisableCls)) {\n classList(arrowIcon, [CLS_NAVDOWNARROW], [CLS_NAVUPARROW]);\n }\n else {\n classList(arrowIcon, [CLS_NAVUPARROW], [CLS_NAVDOWNARROW]);\n }\n }\n else {\n addDisableCls.classList.add(CLS_DISABLE);\n addDisableCls.setAttribute('aria-disabled', 'true');\n addDisableCls.removeAttribute('tabindex');\n removeDisableCls.classList.remove(CLS_DISABLE);\n removeDisableCls.setAttribute('aria-disabled', 'false');\n removeDisableCls.setAttribute('tabindex', '0');\n }\n this.repeatScroll();\n };\n VScroll.prototype.scrollEventHandler = function (e) {\n var target = e.target;\n var height = target.offsetHeight;\n var rootEle = this.element;\n var navUpEle = this.element.querySelector('.' + CLS_VSCROLLNAVUP);\n var navDownEle = this.element.querySelector('.' + CLS_VSCROLLNAVDOWN);\n var upOverlay = this.element.querySelector('.' + CLS_UPOVERLAY);\n var downOverlay = this.element.querySelector('.' + CLS_DOWNOVERLAY);\n var scrollTop = target.scrollTop;\n if (scrollTop <= 0) {\n scrollTop = -scrollTop;\n }\n if (this.isDevice) {\n if (scrollTop < OVERLAY_MAXWID) {\n upOverlay.style.height = scrollTop + 'px';\n }\n else {\n upOverlay.style.height = '40px';\n }\n if ((target.scrollHeight - Math.ceil(height + scrollTop)) < OVERLAY_MAXWID) {\n downOverlay.style.height = (target.scrollHeight - Math.ceil(height + scrollTop)) + 'px';\n }\n else {\n downOverlay.style.height = '40px';\n }\n }\n if (scrollTop === 0) {\n this.arrowDisabling(navUpEle, navDownEle);\n }\n else if (Math.ceil(height + scrollTop + .1) >= target.scrollHeight) {\n this.arrowDisabling(navDownEle, navUpEle);\n }\n else {\n var disEle = this.element.querySelector('.' + CLS_VSCROLLNAV + '.' + CLS_DISABLE);\n if (disEle) {\n disEle.classList.remove(CLS_DISABLE);\n disEle.setAttribute('aria-disabled', 'false');\n disEle.setAttribute('tabindex', '0');\n }\n }\n };\n /**\n * Gets called when the model property changes.The data that describes the old and new values of property that changed.\n * @param {VScrollModel} newProp\n * @param {VScrollModel} oldProp\n * @returns void\n * @private\n */\n VScroll.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'scrollStep':\n this.setScrollState();\n break;\n case 'enableRtl':\n newProp.enableRtl ? this.element.classList.add(CLS_RTL) : this.element.classList.remove(CLS_RTL);\n break;\n }\n }\n };\n __decorate([\n Property(null)\n ], VScroll.prototype, \"scrollStep\", void 0);\n VScroll = __decorate([\n NotifyPropertyChanges\n ], VScroll);\n return VScroll;\n}(Component));\nexport { VScroll };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, EventHandler, Property, Event } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';\nimport { selectAll, setStyleAttribute as setStyle } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, ChildProperty, Browser, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { Popup } from '@syncfusion/ej2-popups';\nimport { calculatePosition } from '@syncfusion/ej2-popups';\nimport { Button } from '@syncfusion/ej2-buttons';\nimport { HScroll } from '../common/h-scroll';\nimport { VScroll } from '../common/v-scroll';\nvar CLS_VERTICAL = 'e-vertical';\nvar CLS_ITEMS = 'e-toolbar-items';\nvar CLS_ITEM = 'e-toolbar-item';\nvar CLS_RTL = 'e-rtl';\nvar CLS_SEPARATOR = 'e-separator';\nvar CLS_POPUPICON = 'e-popup-up-icon';\nvar CLS_POPUPDOWN = 'e-popup-down-icon';\nvar CLS_POPUPOPEN = 'e-popup-open';\nvar CLS_TEMPLATE = 'e-template';\nvar CLS_DISABLE = 'e-overlay';\nvar CLS_POPUPTEXT = 'e-toolbar-text';\nvar CLS_TBARTEXT = 'e-popup-text';\nvar CLS_TBAROVERFLOW = 'e-overflow-show';\nvar CLS_POPOVERFLOW = 'e-overflow-hide';\nvar CLS_TBARBTN = 'e-tbar-btn';\nvar CLS_TBARNAV = 'e-hor-nav';\nvar CLS_TBARSCRLNAV = 'e-scroll-nav';\nvar CLS_TBARRIGHT = 'e-toolbar-right';\nvar CLS_TBARLEFT = 'e-toolbar-left';\nvar CLS_TBARCENTER = 'e-toolbar-center';\nvar CLS_TBARPOS = 'e-tbar-pos';\nvar CLS_HSCROLLCNT = 'e-hscroll-content';\nvar CLS_VSCROLLCNT = 'e-vscroll-content';\nvar CLS_HSCROLLBAR = 'e-hscroll-bar';\nvar CLS_POPUPNAV = 'e-hor-nav';\nvar CLS_POPUPCLASS = 'e-toolbar-pop';\nvar CLS_POPUP = 'e-toolbar-popup';\nvar CLS_TBARBTNTEXT = 'e-tbar-btn-text';\nvar CLS_TBARNAVACT = 'e-nav-active';\nvar CLS_TBARIGNORE = 'e-ignore';\nvar CLS_POPPRI = 'e-popup-alone';\nvar CLS_HIDDEN = 'e-hidden';\nvar CLS_MULTIROW = 'e-toolbar-multirow';\nvar CLS_MULTIROWPOS = 'e-multirow-pos';\nvar CLS_MULTIROW_SEPARATOR = 'e-multirow-separator';\nvar CLS_EXTENDABLE_SEPARATOR = 'e-extended-separator';\nvar CLS_EXTEANDABLE_TOOLBAR = 'e-extended-toolbar';\nvar CLS_EXTENDABLECLASS = 'e-toolbar-extended';\nvar CLS_EXTENDPOPUP = 'e-expended-nav';\nvar CLS_EXTENDEDPOPOPEN = 'e-tbar-extended';\n/**\n * An item object that is used to configure Toolbar commands.\n */\nvar Item = /** @class */ (function (_super) {\n __extends(Item, _super);\n function Item() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('')\n ], Item.prototype, \"id\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"text\", void 0);\n __decorate([\n Property('auto')\n ], Item.prototype, \"width\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], Item.prototype, \"showAlwaysInPopup\", void 0);\n __decorate([\n Property(false)\n ], Item.prototype, \"disabled\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"prefixIcon\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"suffixIcon\", void 0);\n __decorate([\n Property(true)\n ], Item.prototype, \"visible\", void 0);\n __decorate([\n Property('None')\n ], Item.prototype, \"overflow\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"template\", void 0);\n __decorate([\n Property('Button')\n ], Item.prototype, \"type\", void 0);\n __decorate([\n Property('Both')\n ], Item.prototype, \"showTextOn\", void 0);\n __decorate([\n Property(null)\n ], Item.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"tooltipText\", void 0);\n __decorate([\n Property('Left')\n ], Item.prototype, \"align\", void 0);\n __decorate([\n Event()\n ], Item.prototype, \"click\", void 0);\n return Item;\n}(ChildProperty));\nexport { Item };\n/**\n * The Toolbar control contains a group of commands that are aligned horizontally.\n * ```html\n *
\n * \n * ```\n */\nvar Toolbar = /** @class */ (function (_super) {\n __extends(Toolbar, _super);\n /**\n * Initializes a new instance of the Toolbar class.\n * @param options - Specifies Toolbar model properties as options.\n * @param element - Specifies the element that is rendered as a Toolbar.\n */\n function Toolbar(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.resizeContext = _this.resize.bind(_this);\n /**\n * Contains the keyboard configuration of the Toolbar.\n */\n _this.keyConfigs = {\n moveLeft: 'leftarrow',\n moveRight: 'rightarrow',\n moveUp: 'uparrow',\n moveDown: 'downarrow',\n popupOpen: 'enter',\n popupClose: 'escape',\n tab: 'tab',\n home: 'home',\n end: 'end',\n };\n return _this;\n }\n /**\n * Removes the control from the DOM and also removes all its related events.\n * @returns void.\n */\n Toolbar.prototype.destroy = function () {\n var _this = this;\n // tslint:disable-next-line:no-any\n if (this.isReact) {\n this.clearTemplate();\n }\n _super.prototype.destroy.call(this);\n this.unwireEvents();\n this.tempId.forEach(function (ele) {\n if (!isNOU(_this.element.querySelector(ele))) {\n document.body.appendChild(_this.element.querySelector(ele)).style.display = 'none';\n }\n });\n while (this.element.lastElementChild) {\n this.element.removeChild(this.element.lastElementChild);\n }\n if (this.trgtEle) {\n this.element.appendChild(this.ctrlTem);\n }\n this.clearProperty();\n this.popObj = null;\n this.tbarAlign = null;\n this.remove(this.element, 'e-toolpop');\n if (this.cssClass) {\n removeClass([this.element], this.cssClass.split(' '));\n }\n this.element.removeAttribute('style');\n ['aria-disabled', 'aria-orientation', 'aria-haspopup', 'role'].forEach(function (attrb) {\n return _this.element.removeAttribute(attrb);\n });\n };\n /**\n * Initialize the event handler\n * @private\n */\n Toolbar.prototype.preRender = function () {\n var eventArgs = { enableCollision: this.enableCollision, scrollStep: this.scrollStep };\n this.trigger('beforeCreate', eventArgs);\n this.enableCollision = eventArgs.enableCollision;\n this.scrollStep = eventArgs.scrollStep;\n this.scrollModule = null;\n this.popObj = null;\n this.tempId = [];\n this.tbarItemsCol = this.items;\n this.isVertical = this.element.classList.contains(CLS_VERTICAL) ? true : false;\n this.isExtendedOpen = false;\n this.popupPriCount = 0;\n if (this.enableRtl) {\n this.add(this.element, CLS_RTL);\n }\n };\n Toolbar.prototype.wireEvents = function () {\n EventHandler.add(this.element, 'click', this.clickHandler, this);\n window.addEventListener('resize', this.resizeContext);\n if (this.allowKeyboard) {\n this.wireKeyboardEvent();\n }\n };\n Toolbar.prototype.wireKeyboardEvent = function () {\n this.keyModule = new KeyboardEvents(this.element, {\n keyAction: this.keyActionHandler.bind(this),\n keyConfigs: this.keyConfigs\n });\n EventHandler.add(this.element, 'keydown', this.docKeyDown, this);\n this.element.setAttribute('tabIndex', '0');\n };\n Toolbar.prototype.unwireKeyboardEvent = function () {\n if (this.keyModule) {\n EventHandler.remove(this.element, 'keydown', this.docKeyDown);\n this.keyModule.destroy();\n this.keyModule = null;\n }\n };\n Toolbar.prototype.docKeyDown = function (e) {\n if (e.target.tagName === 'INPUT') {\n return;\n }\n var popCheck = !isNOU(this.popObj) && isVisible(this.popObj.element) && this.overflowMode !== 'Extended';\n if (e.keyCode === 9 && e.target.classList.contains('e-hor-nav') === true && popCheck) {\n this.popObj.hide({ name: 'FadeOut', duration: 100 });\n }\n var keyCheck = (e.keyCode === 40 || e.keyCode === 38 || e.keyCode === 35 || e.keyCode === 36);\n if (keyCheck) {\n e.preventDefault();\n }\n };\n Toolbar.prototype.unwireEvents = function () {\n EventHandler.remove(this.element, 'click', this.clickHandler);\n this.destroyScroll();\n this.unwireKeyboardEvent();\n window.removeEventListener('resize', this.resizeContext);\n EventHandler.remove(document, 'scroll', this.docEvent);\n EventHandler.remove(document, 'click', this.docEvent);\n };\n Toolbar.prototype.clearProperty = function () {\n this.tbarEle = [];\n this.tbarAlgEle = { lefts: [], centers: [], rights: [] };\n };\n Toolbar.prototype.docEvent = function (e) {\n var popEle = closest(e.target, '.e-popup');\n if (this.popObj && isVisible(this.popObj.element) && !popEle && this.overflowMode === 'Popup') {\n this.popObj.hide({ name: 'FadeOut', duration: 100 });\n }\n };\n Toolbar.prototype.destroyScroll = function () {\n if (this.scrollModule) {\n if (this.tbarAlign) {\n this.add(this.scrollModule.element, CLS_TBARPOS);\n }\n this.scrollModule.destroy();\n this.scrollModule = null;\n }\n };\n Toolbar.prototype.destroyItems = function () {\n if (this.element) {\n [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) {\n detach(el);\n });\n }\n var tbarItems = this.element.querySelector('.' + CLS_ITEMS);\n if (this.tbarAlign) {\n [].slice.call(tbarItems.children).forEach(function (el) {\n detach(el);\n });\n this.tbarAlign = false;\n this.remove(tbarItems, CLS_TBARPOS);\n }\n this.clearProperty();\n };\n Toolbar.prototype.destroyMode = function () {\n if (this.scrollModule) {\n this.remove(this.scrollModule.element, CLS_RTL);\n this.destroyScroll();\n }\n this.remove(this.element, CLS_EXTENDEDPOPOPEN);\n this.remove(this.element, CLS_EXTEANDABLE_TOOLBAR);\n var tempEle = this.element.querySelector('.e-toolbar-multirow');\n if (tempEle) {\n this.remove(tempEle, CLS_MULTIROW);\n }\n if (this.popObj) {\n this.popupRefresh(this.popObj.element, true);\n }\n };\n Toolbar.prototype.add = function (ele, val) {\n ele.classList.add(val);\n };\n Toolbar.prototype.remove = function (ele, val) {\n ele.classList.remove(val);\n };\n Toolbar.prototype.elementFocus = function (ele) {\n var fChild = ele.firstElementChild;\n if (fChild) {\n fChild.focus();\n this.activeEleSwitch(ele);\n }\n else {\n ele.focus();\n }\n };\n Toolbar.prototype.clstElement = function (tbrNavChk, trgt) {\n var clst;\n if (tbrNavChk && this.popObj && isVisible(this.popObj.element)) {\n clst = this.popObj.element.querySelector('.' + CLS_ITEM);\n }\n else if (this.element === trgt || tbrNavChk) {\n // tslint:disable-next-line:max-line-length\n clst = this.element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_DISABLE + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');\n }\n else {\n clst = closest(trgt, '.' + CLS_ITEM);\n }\n return clst;\n };\n Toolbar.prototype.keyHandling = function (clst, e, trgt, navChk, scrollChk) {\n var popObj = this.popObj;\n var rootEle = this.element;\n var popAnimate = { name: 'FadeOut', duration: 100 };\n switch (e.action) {\n case 'moveRight':\n if (this.isVertical) {\n return;\n }\n if (rootEle === trgt) {\n this.elementFocus(clst);\n }\n else if (!navChk) {\n this.eleFocus(clst, 'next');\n }\n break;\n case 'moveLeft':\n if (this.isVertical) {\n return;\n }\n if (!navChk) {\n this.eleFocus(clst, 'previous');\n }\n break;\n case 'home':\n case 'end':\n var ele = void 0;\n var nodes = void 0;\n if (clst) {\n var popupCheck = closest(clst, '.e-popup');\n if (popupCheck) {\n if (isVisible(this.popObj.element)) {\n nodes = [].slice.call(popupCheck.children);\n if (e.action === 'home') {\n ele = nodes[0];\n }\n else {\n ele = nodes[nodes.length - 1];\n }\n }\n }\n else {\n nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM);\n if (e.action === 'home') {\n ele = nodes[0];\n }\n else {\n ele = nodes[nodes.length - 1];\n }\n }\n if (ele) {\n this.elementFocus(ele);\n }\n }\n break;\n case 'moveUp':\n case 'moveDown':\n var value = e.action === 'moveUp' ? 'previous' : 'next';\n if (!this.isVertical) {\n if (popObj && closest(trgt, '.e-popup')) {\n var popEle = popObj.element;\n var popFrstEle = popEle.firstElementChild;\n if ((value === 'previous' && popFrstEle === clst) || (value === 'next' && popEle.lastElementChild === clst)) {\n return;\n }\n else {\n this.eleFocus(clst, value);\n }\n }\n else if (e.action === 'moveDown' && popObj && isVisible(popObj.element)) {\n this.elementFocus(clst);\n }\n }\n else {\n if (e.action === 'moveUp') {\n this.eleFocus(clst, 'previous');\n }\n else {\n this.eleFocus(clst, 'next');\n }\n }\n break;\n case 'tab':\n if (!scrollChk && !navChk) {\n var ele_1 = clst.firstElementChild;\n if (rootEle === trgt) {\n if (this.activeEle) {\n this.activeEle.focus();\n }\n else {\n this.activeEleRemove(ele_1);\n ele_1.focus();\n }\n this.element.removeAttribute('tabindex');\n }\n }\n break;\n case 'popupClose':\n if (popObj && this.overflowMode !== 'Extended') {\n popObj.hide(popAnimate);\n }\n break;\n case 'popupOpen':\n if (!navChk) {\n return;\n }\n if (popObj && !isVisible(popObj.element)) {\n popObj.element.style.top = rootEle.offsetHeight + 'px';\n popObj.show({ name: 'FadeIn', duration: 100 });\n }\n else {\n popObj.hide(popAnimate);\n }\n break;\n }\n };\n Toolbar.prototype.keyActionHandler = function (e) {\n var trgt = e.target;\n if (trgt.tagName === 'INPUT' || trgt.tagName === 'TEXTAREA' || this.element.classList.contains(CLS_DISABLE)) {\n return;\n }\n e.preventDefault();\n var clst;\n var tbrNavChk = trgt.classList.contains(CLS_TBARNAV);\n var tbarScrollChk = trgt.classList.contains(CLS_TBARSCRLNAV);\n clst = this.clstElement(tbrNavChk, trgt);\n if (clst || tbarScrollChk) {\n this.keyHandling(clst, e, trgt, tbrNavChk, tbarScrollChk);\n }\n };\n /**\n * Specifies the value to disable/enable the Toolbar component.\n * When set to `true`, the component will be disabled.\n * @param {boolean} value - Based on this Boolean value, Toolbar will be enabled (false) or disabled (true).\n * @returns void.\n */\n Toolbar.prototype.disable = function (value) {\n var rootEle = this.element;\n value ? rootEle.classList.add(CLS_DISABLE) : rootEle.classList.remove(CLS_DISABLE);\n rootEle.setAttribute('tabindex', !value ? '0' : '-1');\n if (this.activeEle) {\n this.activeEle.setAttribute('tabindex', !value ? '0' : '-1');\n }\n if (this.scrollModule) {\n this.scrollModule.disable(value);\n }\n if (this.popObj) {\n if (isVisible(this.popObj.element) && this.overflowMode !== 'Extended') {\n this.popObj.hide();\n }\n rootEle.querySelector('#' + rootEle.id + '_nav').setAttribute('tabindex', !value ? '0' : '-1');\n }\n };\n Toolbar.prototype.eleContains = function (el) {\n // tslint:disable-next-line:max-line-length\n return el.classList.contains(CLS_SEPARATOR) || el.classList.contains(CLS_DISABLE) || el.getAttribute('disabled') || el.classList.contains(CLS_HIDDEN) || !isVisible(el);\n // tslint:enable-next-line:max-line-length\n };\n Toolbar.prototype.eleFocus = function (closest, pos) {\n var sib = Object(closest)[pos + 'ElementSibling'];\n if (sib) {\n var skipEle = this.eleContains(sib);\n if (skipEle) {\n this.eleFocus(sib, pos);\n return;\n }\n this.elementFocus(sib);\n }\n else if (this.tbarAlign) {\n var elem = Object(closest.parentElement)[pos + 'ElementSibling'];\n if (!isNOU(elem) && elem.children.length === 0) {\n elem = Object(elem)[pos + 'ElementSibling'];\n }\n if (!isNOU(elem) && elem.children.length > 0) {\n if (pos === 'next') {\n var el = elem.querySelector('.' + CLS_ITEM);\n if (this.eleContains(el)) {\n this.eleFocus(el, pos);\n }\n else {\n el.firstElementChild.focus();\n this.activeEleSwitch(el);\n }\n }\n else {\n var el = elem.lastElementChild;\n if (this.eleContains(el)) {\n this.eleFocus(el, pos);\n }\n else {\n this.elementFocus(el);\n }\n }\n }\n }\n };\n Toolbar.prototype.clickHandler = function (e) {\n var _this = this;\n var trgt = e.target;\n var clsList = trgt.classList;\n var ele = this.element;\n var isPopupElement = !isNOU(closest(trgt, '.' + CLS_POPUPCLASS));\n var popupNav = closest(trgt, ('.' + CLS_TBARNAV));\n if (!popupNav) {\n popupNav = trgt;\n }\n if (!ele.children[0].classList.contains('e-hscroll') && !ele.children[0].classList.contains('e-vscroll')\n && (clsList.contains(CLS_TBARNAV))) {\n clsList = trgt.querySelector('.e-icons').classList;\n }\n if (clsList.contains(CLS_POPUPICON) || clsList.contains(CLS_POPUPDOWN)) {\n this.popupClickHandler(ele, popupNav, CLS_RTL);\n }\n var itemObj;\n var clst = closest(e.target, '.' + CLS_ITEM);\n if ((isNOU(clst) || clst.classList.contains(CLS_DISABLE)) && !popupNav.classList.contains(CLS_TBARNAV)) {\n return;\n }\n if (clst) {\n var tempItem = this.items[this.tbarEle.indexOf(clst)];\n itemObj = tempItem;\n }\n var eventArgs = { originalEvent: e, item: itemObj };\n if (itemObj && !isNOU(itemObj.click)) {\n this.trigger('items[' + this.tbarEle.indexOf(clst) + '].click', eventArgs);\n }\n if (!eventArgs.cancel) {\n this.trigger('clicked', eventArgs, function (clickedArgs) {\n if (!isNOU(_this.popObj) && isPopupElement && !clickedArgs.cancel && _this.overflowMode === 'Popup' &&\n clickedArgs.item && clickedArgs.item.type !== 'Input') {\n _this.popObj.hide({ name: 'FadeOut', duration: 100 });\n }\n });\n }\n };\n ;\n Toolbar.prototype.popupClickHandler = function (ele, popupNav, CLS_RTL) {\n var popObj = this.popObj;\n if (isVisible(popObj.element)) {\n popupNav.classList.remove(CLS_TBARNAVACT);\n popObj.hide({ name: 'FadeOut', duration: 100 });\n }\n else {\n if (ele.classList.contains(CLS_RTL)) {\n popObj.enableRtl = true;\n popObj.position = { X: 'left', Y: 'top' };\n }\n if (popObj.offsetX === 0 && !ele.classList.contains(CLS_RTL)) {\n popObj.enableRtl = false;\n popObj.position = { X: 'right', Y: 'top' };\n }\n popObj.dataBind();\n popObj.refreshPosition();\n popObj.element.style.top = this.getElementOffsetY() + 'px';\n if (this.overflowMode === 'Extended') {\n popObj.element.style.minHeight = '0px';\n }\n popupNav.classList.add(CLS_TBARNAVACT);\n popObj.show({ name: 'FadeIn', duration: 100 });\n }\n };\n /**\n * To Initialize the control rendering\n * @private\n */\n Toolbar.prototype.render = function () {\n this.initialize();\n this.renderControl();\n this.wireEvents();\n this.renderComplete();\n };\n Toolbar.prototype.initialize = function () {\n var width = formatUnit(this.width);\n var height = formatUnit(this.height);\n if (Browser.info.name !== 'msie' || this.height !== 'auto' || this.overflowMode === 'MultiRow') {\n setStyle(this.element, { 'height': height });\n }\n setStyle(this.element, { 'width': width });\n var ariaAttr = {\n 'role': 'toolbar', 'aria-disabled': 'false', 'aria-haspopup': 'false',\n 'aria-orientation': !this.isVertical ? 'horizontal' : 'vertical',\n };\n attributes(this.element, ariaAttr);\n if (this.cssClass) {\n addClass([this.element], this.cssClass.split(' '));\n }\n };\n Toolbar.prototype.renderControl = function () {\n var ele = this.element;\n this.trgtEle = (ele.children.length > 0) ? ele.querySelector('div') : null;\n this.tbarAlgEle = { lefts: [], centers: [], rights: [] };\n this.renderItems();\n this.renderLayout();\n };\n Toolbar.prototype.renderLayout = function () {\n this.renderOverflowMode();\n if (this.tbarAlign) {\n this.itemPositioning();\n }\n if (this.popObj && this.popObj.element.childElementCount > 1 && this.checkPopupRefresh(this.element, this.popObj.element)) {\n this.popupRefresh(this.popObj.element, false);\n }\n this.separator();\n };\n Toolbar.prototype.itemsAlign = function (items, itemEleDom) {\n var innerItem;\n var innerPos;\n if (!this.tbarEle) {\n this.tbarEle = [];\n }\n for (var i = 0; i < items.length; i++) {\n innerItem = this.renderSubComponent(items[i], i);\n if (this.tbarEle.indexOf(innerItem) === -1) {\n this.tbarEle.push(innerItem);\n }\n if (!this.tbarAlign) {\n this.tbarItemAlign(items[i], itemEleDom, i);\n }\n innerPos = itemEleDom.querySelector('.e-toolbar-' + items[i].align.toLowerCase());\n if (innerPos) {\n if (!(items[i].showAlwaysInPopup && items[i].overflow !== 'Show')) {\n this.tbarAlgEle[(items[i].align + 's').toLowerCase()].push(innerItem);\n }\n innerPos.appendChild(innerItem);\n }\n else {\n itemEleDom.appendChild(innerItem);\n }\n }\n // tslint:disable-next-line:no-any\n if (this.isReact) {\n var portals = 'portals';\n // tslint:disable-next-line:no-any\n this.notify('render-react-toolbar-template', this[portals]);\n this.renderReactTemplates();\n }\n };\n /** @hidden */\n Toolbar.prototype.changeOrientation = function () {\n var ele = this.element;\n if (this.isVertical) {\n ele.classList.remove(CLS_VERTICAL);\n this.isVertical = false;\n if (this.height === 'auto' || this.height === '100%') {\n ele.style.height = this.height;\n }\n ele.setAttribute('aria-orientation', 'horizontal');\n }\n else {\n ele.classList.add(CLS_VERTICAL);\n this.isVertical = true;\n ele.setAttribute('aria-orientation', 'vertical');\n setStyle(this.element, { 'height': formatUnit(this.height), 'width': formatUnit(this.width) });\n }\n this.destroyMode();\n this.refreshOverflow();\n };\n Toolbar.prototype.initScroll = function (element, innerItems) {\n if (!this.scrollModule && this.checkOverflow(element, innerItems[0])) {\n if (this.tbarAlign) {\n this.element.querySelector('.' + CLS_ITEMS + ' .' + CLS_TBARCENTER).removeAttribute('style');\n }\n if (this.isVertical) {\n this.scrollModule = new VScroll({ scrollStep: this.scrollStep, enableRtl: this.enableRtl }, innerItems[0]);\n }\n else {\n this.scrollModule = new HScroll({ scrollStep: this.scrollStep, enableRtl: this.enableRtl }, innerItems[0]);\n }\n this.remove(this.scrollModule.element, CLS_TBARPOS);\n setStyle(this.element, { overflow: 'hidden' });\n }\n };\n Toolbar.prototype.itemWidthCal = function (items) {\n var _this = this;\n var width = 0;\n var style;\n [].slice.call(selectAll('.' + CLS_ITEM, items)).forEach(function (el) {\n if (isVisible(el)) {\n style = window.getComputedStyle(el);\n width += _this.isVertical ? el.offsetHeight : el.offsetWidth;\n width += parseFloat(_this.isVertical ? style.marginTop : style.marginRight);\n width += parseFloat(_this.isVertical ? style.marginBottom : style.marginLeft);\n }\n });\n return width;\n };\n Toolbar.prototype.getScrollCntEle = function (innerItem) {\n var trgClass = (this.isVertical) ? '.e-vscroll-content' : '.e-hscroll-content';\n return innerItem.querySelector(trgClass);\n };\n Toolbar.prototype.checkOverflow = function (element, innerItem) {\n if (isNOU(element) || isNOU(innerItem) || !isVisible(element)) {\n return false;\n }\n var eleWidth = this.isVertical ? element.offsetHeight : element.offsetWidth;\n var itemWidth = this.isVertical ? innerItem.offsetHeight : innerItem.offsetWidth;\n if (this.tbarAlign || this.scrollModule || (eleWidth === itemWidth)) {\n itemWidth = this.itemWidthCal(this.scrollModule ? this.getScrollCntEle(innerItem) : innerItem);\n }\n var popNav = element.querySelector('.' + CLS_TBARNAV);\n var scrollNav = element.querySelector('.' + CLS_TBARSCRLNAV);\n var navEleWidth = 0;\n if (popNav) {\n navEleWidth = this.isVertical ? popNav.offsetHeight : popNav.offsetWidth;\n }\n else if (scrollNav) {\n navEleWidth = this.isVertical ? (scrollNav.offsetHeight * (2)) : (scrollNav.offsetWidth * 2);\n }\n if (itemWidth > eleWidth - navEleWidth) {\n return true;\n }\n else {\n return false;\n }\n };\n /**\n * Refresh the whole Toolbar component without re-rendering.\n * - It is used to manually refresh the Toolbar overflow modes such as scrollable, popup, multi row, and extended.\n * - It will refresh the Toolbar component after loading items dynamically.\n * @returns void.\n */\n Toolbar.prototype.refreshOverflow = function () {\n this.resize();\n };\n Toolbar.prototype.toolbarAlign = function (innerItems) {\n if (this.tbarAlign) {\n this.add(innerItems, CLS_TBARPOS);\n this.itemPositioning();\n }\n };\n Toolbar.prototype.renderOverflowMode = function () {\n var ele = this.element;\n var innerItems = ele.querySelector('.' + CLS_ITEMS);\n var priorityCheck = this.popupPriCount > 0;\n if (ele && ele.children.length > 0) {\n this.offsetWid = ele.offsetWidth;\n this.remove(this.element, 'e-toolpop');\n if (Browser.info.name === 'msie' && this.height === 'auto') {\n ele.style.height = '';\n }\n switch (this.overflowMode) {\n case 'Scrollable':\n if (isNOU(this.scrollModule)) {\n this.initScroll(ele, [].slice.call(ele.getElementsByClassName(CLS_ITEMS)));\n }\n break;\n case 'Popup':\n this.add(this.element, 'e-toolpop');\n if (this.tbarAlign) {\n this.removePositioning();\n }\n if (this.checkOverflow(ele, innerItems) || priorityCheck) {\n this.setOverflowAttributes(ele);\n }\n this.toolbarAlign(innerItems);\n break;\n case 'MultiRow':\n this.add(innerItems, CLS_MULTIROW);\n if (this.checkOverflow(ele, innerItems) && this.tbarAlign) {\n this.removePositioning();\n this.add(innerItems, CLS_MULTIROWPOS);\n }\n if (ele.style.overflow === 'hidden') {\n ele.style.overflow = '';\n }\n if (Browser.info.name === 'msie' || ele.style.height !== 'auto') {\n ele.style.height = 'auto';\n }\n break;\n case 'Extended':\n this.add(this.element, CLS_EXTEANDABLE_TOOLBAR);\n if (this.checkOverflow(ele, innerItems) || priorityCheck) {\n if (this.tbarAlign) {\n this.removePositioning();\n }\n this.setOverflowAttributes(ele);\n }\n this.toolbarAlign(innerItems);\n }\n }\n };\n Toolbar.prototype.setOverflowAttributes = function (ele) {\n this.createPopupEle(ele, [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, ele)));\n this.element.querySelector('.' + CLS_TBARNAV).setAttribute('tabIndex', '0');\n this.element.querySelector('.' + CLS_TBARNAV).setAttribute('role', 'list');\n };\n Toolbar.prototype.separator = function () {\n var element = this.element;\n var eleItem = [].slice.call(element.querySelectorAll('.' + CLS_SEPARATOR));\n var eleInlineItem;\n var multiVar = element.querySelector('.' + CLS_MULTIROW_SEPARATOR);\n var extendVar = element.querySelector('.' + CLS_EXTENDABLE_SEPARATOR);\n eleInlineItem = this.overflowMode === 'MultiRow' ? multiVar : extendVar;\n if (eleInlineItem !== null) {\n if (this.overflowMode === 'MultiRow') {\n eleInlineItem.classList.remove(CLS_MULTIROW_SEPARATOR);\n }\n else if (this.overflowMode === 'Extended') {\n eleInlineItem.classList.remove(CLS_EXTENDABLE_SEPARATOR);\n }\n }\n for (var i = 0; i <= eleItem.length - 1; i++) {\n if (eleItem[i].offsetLeft < 30 && eleItem[i].offsetLeft !== 0) {\n if (this.overflowMode === 'MultiRow') {\n eleItem[i].classList.add(CLS_MULTIROW_SEPARATOR);\n }\n else if (this.overflowMode === 'Extended') {\n eleItem[i].classList.add(CLS_EXTENDABLE_SEPARATOR);\n }\n }\n }\n };\n Toolbar.prototype.createPopupEle = function (ele, innerEle) {\n var innerNav = ele.querySelector('.' + CLS_TBARNAV);\n var vertical = this.isVertical;\n if (!innerNav) {\n this.createPopupIcon(ele);\n }\n innerNav = ele.querySelector('.' + CLS_TBARNAV);\n var innerNavDom = (vertical ? innerNav.offsetHeight : innerNav.offsetWidth);\n var eleWidth = ((vertical ? ele.offsetHeight : ele.offsetWidth) - (innerNavDom));\n this.element.classList.remove('e-rtl');\n setStyle(this.element, { direction: 'initial' });\n this.checkPriority(ele, innerEle, eleWidth, true);\n if (this.enableRtl) {\n this.element.classList.add('e-rtl');\n }\n this.element.style.removeProperty('direction');\n this.createPopup();\n };\n Toolbar.prototype.pushingPoppedEle = function (tbarObj, popupPri, ele, eleHeight, sepHeight) {\n var element = tbarObj.element;\n var nodes = selectAll('.' + CLS_TBAROVERFLOW, ele);\n var nodeIndex = 0;\n var poppedEle = [].slice.call(selectAll('.' + CLS_POPUP, element.querySelector('.' + CLS_ITEMS)));\n var nodePri = 0;\n poppedEle.forEach(function (el, index) {\n nodes = selectAll('.' + CLS_TBAROVERFLOW, ele);\n if (el.classList.contains(CLS_TBAROVERFLOW) && nodes.length > 0) {\n if (tbarObj.tbResize && nodes.length > index) {\n ele.insertBefore(el, nodes[index]);\n ++nodePri;\n }\n else {\n ele.insertBefore(el, ele.children[nodes.length]);\n ++nodePri;\n }\n }\n else if (el.classList.contains(CLS_TBAROVERFLOW)) {\n ele.insertBefore(el, ele.firstChild);\n ++nodePri;\n }\n else if (tbarObj.tbResize && el.classList.contains(CLS_POPOVERFLOW) && ele.children.length > 0 && nodes.length === 0) {\n ele.insertBefore(el, ele.firstChild);\n ++nodePri;\n }\n else if (el.classList.contains(CLS_POPOVERFLOW)) {\n popupPri.push(el);\n }\n else if (tbarObj.tbResize) {\n ele.insertBefore(el, ele.childNodes[nodeIndex + nodePri]);\n ++nodeIndex;\n }\n else {\n ele.appendChild(el);\n }\n if (el.classList.contains(CLS_SEPARATOR)) {\n setStyle(el, { display: '', height: sepHeight + 'px' });\n }\n else {\n setStyle(el, { display: '', height: eleHeight + 'px' });\n }\n });\n popupPri.forEach(function (el) {\n ele.appendChild(el);\n });\n var tbarEle = selectAll('.' + CLS_ITEM, element.querySelector('.' + CLS_ITEMS));\n for (var i = tbarEle.length - 1; i >= 0; i--) {\n var tbarElement = tbarEle[i];\n if (tbarElement.classList.contains(CLS_SEPARATOR) && this.overflowMode !== 'Extended') {\n setStyle(tbarElement, { display: 'none' });\n }\n else {\n break;\n }\n }\n };\n Toolbar.prototype.createPopup = function () {\n var element = this.element;\n var eleHeight;\n var eleItem;\n var sepHeight;\n var sepItem;\n if (this.overflowMode === 'Extended') {\n sepItem = element.querySelector('.' + CLS_SEPARATOR + ':not(.' + CLS_POPUP + ')');\n sepHeight = (element.style.height === 'auto' || element.style.height === '') ? null : sepItem.offsetHeight;\n }\n eleItem = element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_POPUP + ')');\n eleHeight = (element.style.height === 'auto' || element.style.height === '') ? null : (eleItem && eleItem.offsetHeight);\n var ele;\n var popupPri = [];\n if (element.querySelector('#' + element.id + '_popup.' + CLS_POPUPCLASS)) {\n ele = element.querySelector('#' + element.id + '_popup.' + CLS_POPUPCLASS);\n }\n else {\n var extendEle = this.createElement('div', {\n id: element.id + '_popup', className: CLS_POPUPCLASS + ' ' + CLS_EXTENDABLECLASS\n });\n var popupEle = this.createElement('div', { id: element.id + '_popup', className: CLS_POPUPCLASS });\n ele = this.overflowMode === 'Extended' ? extendEle : popupEle;\n }\n this.pushingPoppedEle(this, popupPri, ele, eleHeight, sepHeight);\n this.popupInit(element, ele);\n };\n Toolbar.prototype.getElementOffsetY = function () {\n return (this.overflowMode === 'Extended' && window.getComputedStyle(this.element).getPropertyValue('box-sizing') === 'border-box' ?\n this.element.clientHeight : this.element.offsetHeight);\n };\n Toolbar.prototype.popupInit = function (element, ele) {\n if (!this.popObj) {\n element.appendChild(ele);\n setStyle(this.element, { overflow: '' });\n var eleStyles = window.getComputedStyle(this.element);\n var popup = new Popup(null, {\n relateTo: this.element,\n offsetY: (this.isVertical) ? 0 : this.getElementOffsetY(),\n enableRtl: this.enableRtl,\n open: this.popupOpen.bind(this),\n close: this.popupClose.bind(this),\n collision: { Y: this.enableCollision ? 'flip' : 'none' },\n position: this.enableRtl ? { X: 'left', Y: 'top' } : { X: 'right', Y: 'top' }\n });\n popup.appendTo(ele);\n if (this.overflowMode === 'Extended') {\n popup.width = parseFloat(eleStyles.width) + ((parseFloat(eleStyles.borderRightWidth)) * 2);\n popup.offsetX = 0;\n }\n EventHandler.add(document, 'scroll', this.docEvent.bind(this));\n EventHandler.add(document, 'click ', this.docEvent.bind(this));\n popup.element.style.maxHeight = popup.element.offsetHeight + 'px';\n if (this.isVertical) {\n popup.element.style.visibility = 'hidden';\n }\n if (this.isExtendedOpen) {\n var popupNav = this.element.querySelector('.' + CLS_TBARNAV);\n popupNav.classList.add(CLS_TBARNAVACT);\n classList(popupNav.firstElementChild, [CLS_POPUPICON], [CLS_POPUPDOWN]);\n this.element.querySelector('.' + CLS_EXTENDABLECLASS).classList.add(CLS_POPUPOPEN);\n }\n else {\n popup.hide();\n }\n this.popObj = popup;\n this.element.setAttribute('aria-haspopup', 'true');\n }\n else {\n var popupEle = this.popObj.element;\n setStyle(popupEle, { maxHeight: '', display: 'block' });\n setStyle(popupEle, { maxHeight: popupEle.offsetHeight + 'px', display: '' });\n }\n };\n Toolbar.prototype.tbarPopupHandler = function (isOpen) {\n if (this.overflowMode === 'Extended') {\n isOpen ? this.add(this.element, CLS_EXTENDEDPOPOPEN) : this.remove(this.element, CLS_EXTENDEDPOPOPEN);\n }\n };\n Toolbar.prototype.popupOpen = function (e) {\n var popObj = this.popObj;\n if (!this.isVertical) {\n popObj.offsetY = this.getElementOffsetY();\n popObj.dataBind();\n }\n var popupEle = this.popObj.element;\n var toolEle = this.popObj.element.parentElement;\n var popupNav = toolEle.querySelector('.' + CLS_TBARNAV);\n setStyle(popObj.element, { height: 'auto', maxHeight: '' });\n popObj.element.style.maxHeight = popObj.element.offsetHeight + 'px';\n if (this.overflowMode === 'Extended') {\n popObj.element.style.minHeight = '';\n }\n var popupElePos = popupEle.offsetTop + popupEle.offsetHeight + calculatePosition(toolEle).top;\n var popIcon = popupNav.firstElementChild;\n popupNav.classList.add(CLS_TBARNAVACT);\n classList(popIcon, [CLS_POPUPICON], [CLS_POPUPDOWN]);\n this.tbarPopupHandler(true);\n var scrollVal = isNOU(window.scrollY) ? 0 : window.scrollY;\n if (!this.isVertical && ((window.innerHeight + scrollVal) < popupElePos) && (this.element.offsetTop < popupEle.offsetHeight)) {\n var overflowHeight = (popupEle.offsetHeight - ((popupElePos - window.innerHeight - scrollVal) + 5));\n popObj.height = overflowHeight + 'px';\n for (var i = 0; i <= popupEle.childElementCount; i++) {\n var ele = popupEle.children[i];\n if (ele.offsetTop + ele.offsetHeight > overflowHeight) {\n overflowHeight = ele.offsetTop;\n break;\n }\n }\n setStyle(popObj.element, { maxHeight: overflowHeight + 'px' });\n }\n else if (this.isVertical) {\n var tbEleData = this.element.getBoundingClientRect();\n setStyle(popObj.element, { maxHeight: (tbEleData.top + this.element.offsetHeight) + 'px', bottom: 0, visibility: '' });\n }\n if (popObj) {\n popObj.refreshPosition();\n }\n };\n Toolbar.prototype.popupClose = function (e) {\n var element = this.element;\n var popupNav = element.querySelector('.' + CLS_TBARNAV);\n var popIcon = popupNav.firstElementChild;\n popupNav.classList.remove(CLS_TBARNAVACT);\n classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);\n this.tbarPopupHandler(false);\n };\n Toolbar.prototype.checkPriority = function (ele, inEle, eleWidth, pre) {\n var popPriority = this.popupPriCount > 0;\n var len = inEle.length;\n var eleWid = eleWidth;\n var eleOffset;\n var checkoffset;\n var sepCheck = 0;\n var itemCount = 0;\n var itemPopCount = 0;\n var checkClass = function (ele, val) {\n var rVal = false;\n val.forEach(function (cls) {\n if (ele.classList.contains(cls)) {\n rVal = true;\n }\n });\n return rVal;\n };\n for (var i = len - 1; i >= 0; i--) {\n var mrgn = void 0;\n var compuStyle = window.getComputedStyle(inEle[i]);\n if (this.isVertical) {\n mrgn = parseFloat((compuStyle).marginTop);\n mrgn += parseFloat((compuStyle).marginBottom);\n }\n else {\n mrgn = parseFloat((compuStyle).marginRight);\n mrgn += parseFloat((compuStyle).marginLeft);\n }\n var fstEleCheck = inEle[i] === this.tbarEle[0];\n if (fstEleCheck) {\n this.tbarEleMrgn = mrgn;\n }\n eleOffset = this.isVertical ? inEle[i].offsetHeight : inEle[i].offsetWidth;\n var eleWid_1 = fstEleCheck ? (eleOffset + mrgn) : eleOffset;\n if (checkClass(inEle[i], [CLS_POPPRI]) && popPriority) {\n inEle[i].classList.add(CLS_POPUP);\n if (this.isVertical) {\n setStyle(inEle[i], { display: 'none', minHeight: eleWid_1 + 'px' });\n }\n else {\n setStyle(inEle[i], { display: 'none', minWidth: eleWid_1 + 'px' });\n }\n itemPopCount++;\n }\n if (this.isVertical) {\n checkoffset = (inEle[i].offsetTop + inEle[i].offsetHeight + mrgn) > eleWidth;\n }\n else {\n checkoffset = (inEle[i].offsetLeft + inEle[i].offsetWidth + mrgn) > eleWidth;\n }\n if (checkoffset) {\n if (inEle[i].classList.contains(CLS_SEPARATOR)) {\n if (this.overflowMode === 'Extended') {\n if (itemCount === itemPopCount) {\n var sepEle = inEle[i];\n if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {\n inEle[i].classList.add(CLS_POPUP);\n itemPopCount++;\n }\n }\n itemCount++;\n }\n else if (this.overflowMode === 'Popup') {\n if (sepCheck > 0 && itemCount === itemPopCount) {\n var sepEle = inEle[i + itemCount + (sepCheck - 1)];\n if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {\n setStyle(sepEle, { display: 'none' });\n }\n }\n sepCheck++;\n itemCount = 0;\n itemPopCount = 0;\n }\n }\n else {\n itemCount++;\n }\n if (inEle[i].classList.contains(CLS_TBAROVERFLOW) && pre) {\n eleWidth -= ((this.isVertical ? inEle[i].offsetHeight : inEle[i].offsetWidth) + (mrgn));\n }\n else if (!checkClass(inEle[i], [CLS_SEPARATOR, CLS_TBARIGNORE])) {\n inEle[i].classList.add(CLS_POPUP);\n if (this.isVertical) {\n setStyle(inEle[i], { display: 'none', minHeight: eleWid_1 + 'px' });\n }\n else {\n setStyle(inEle[i], { display: 'none', minWidth: eleWid_1 + 'px' });\n }\n itemPopCount++;\n }\n else {\n eleWidth -= ((this.isVertical ? inEle[i].offsetHeight : inEle[i].offsetWidth) + (mrgn));\n }\n }\n }\n if (pre) {\n var popedEle = selectAll('.' + CLS_ITEM + ':not(.' + CLS_POPUP + ')', this.element);\n this.checkPriority(ele, popedEle, eleWid, false);\n }\n };\n Toolbar.prototype.createPopupIcon = function (element) {\n var id = element.id.concat('_nav');\n var className = 'e-' + element.id.concat('_nav ' + CLS_POPUPNAV);\n className = this.overflowMode === 'Extended' ? className + ' ' + CLS_EXTENDPOPUP : className;\n var nav = this.createElement('div', { id: id, className: className });\n if (Browser.info.name === 'msie' || Browser.info.name === 'edge') {\n nav.classList.add('e-ie-align');\n }\n var navItem = this.createElement('div', { className: CLS_POPUPDOWN + ' e-icons' });\n nav.appendChild(navItem);\n nav.setAttribute('tabindex', '0');\n nav.setAttribute('role', 'list');\n element.appendChild(nav);\n };\n Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid, ig) {\n var ignoreCount = ig;\n var popEle = this.popObj.element;\n var query = '.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_TBAROVERFLOW + ')';\n var priEleCnt = selectAll('.' + CLS_POPUP + ':not(.' + CLS_TBAROVERFLOW + ')', popEle).length;\n var checkClass = function (ele, val) {\n return ele.classList.contains(val);\n };\n if (selectAll(query, inEle).length === 0) {\n var eleSep = inEle.children[indx - (indx - sepPri) - 1];\n var ignoreCheck = (!isNOU(eleSep) && checkClass(eleSep, CLS_TBARIGNORE));\n if ((!isNOU(eleSep) && checkClass(eleSep, CLS_SEPARATOR) && !isVisible(eleSep)) || ignoreCheck) {\n var sepDisplay = 'none';\n eleSep.style.display = 'inherit';\n var eleSepWidth = eleSep.offsetWidth + (parseFloat(window.getComputedStyle(eleSep).marginRight) * 2);\n var prevSep = eleSep.previousElementSibling;\n if ((elWid + eleSepWidth) < wid || des) {\n inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);\n if (!isNOU(prevSep)) {\n prevSep.style.display = '';\n }\n }\n else {\n if (prevSep.classList.contains(CLS_SEPARATOR)) {\n prevSep.style.display = sepDisplay;\n }\n }\n eleSep.style.display = '';\n }\n else {\n inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);\n }\n }\n else {\n inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - priEleCnt]);\n }\n };\n Toolbar.prototype.popupRefresh = function (popupEle, destroy) {\n var _this = this;\n var ele = this.element;\n var isVer = this.isVertical;\n var popNav = ele.querySelector('.' + CLS_TBARNAV);\n var innerEle = ele.querySelector('.' + CLS_ITEMS);\n if (isNOU(popNav)) {\n return;\n }\n innerEle.removeAttribute('style');\n popupEle.style.display = 'block';\n var dimension;\n if (isVer) {\n dimension = ele.offsetHeight - (popNav.offsetHeight + innerEle.offsetHeight);\n }\n else {\n dimension = ele.offsetWidth - (popNav.offsetWidth + innerEle.offsetWidth);\n }\n var popupEleWidth = 0;\n [].slice.call(popupEle.children).forEach(function (el) {\n popupEleWidth += _this.popupEleWidth(el);\n setStyle(el, { 'position': '' });\n });\n if ((dimension + (isVer ? popNav.offsetHeight : popNav.offsetWidth)) > (popupEleWidth) && this.popupPriCount === 0) {\n destroy = true;\n }\n this.popupEleRefresh(dimension, popupEle, destroy);\n popupEle.style.display = '';\n if (popupEle.children.length === 0 && popNav && this.popObj) {\n detach(popNav);\n popNav = null;\n this.popObj.destroy();\n detach(this.popObj.element);\n this.popObj = null;\n ele.setAttribute('aria-haspopup', 'false');\n }\n };\n Toolbar.prototype.ignoreEleFetch = function (index, innerEle) {\n var ignoreEle = [].slice.call(innerEle.querySelectorAll('.' + CLS_TBARIGNORE));\n var ignoreInx = [];\n var count = 0;\n if (ignoreEle.length > 0) {\n ignoreEle.forEach(function (ele) {\n ignoreInx.push([].slice.call(innerEle.children).indexOf(ele));\n });\n }\n else {\n return 0;\n }\n ignoreInx.forEach(function (val) {\n if (val <= index) {\n count++;\n }\n });\n return count;\n };\n Toolbar.prototype.checkPopupRefresh = function (root, popEle) {\n popEle.style.display = 'block';\n var elWid = this.popupEleWidth(popEle.firstElementChild);\n popEle.firstElementChild.style.removeProperty('Position');\n var tbarWidth = root.offsetWidth - root.querySelector('.' + CLS_TBARNAV).offsetWidth;\n var tbarItemsWid = root.querySelector('.' + CLS_ITEMS).offsetWidth;\n popEle.style.removeProperty('display');\n if (tbarWidth > (elWid + tbarItemsWid)) {\n return true;\n }\n return false;\n };\n Toolbar.prototype.popupEleWidth = function (el) {\n el.style.position = 'absolute';\n var elWidth = this.isVertical ? el.offsetHeight : el.offsetWidth;\n var btnText = el.querySelector('.' + CLS_TBARBTNTEXT);\n if (el.classList.contains('e-tbtn-align') || el.classList.contains(CLS_TBARTEXT)) {\n var btn = el.children[0];\n if (!isNOU(btnText) && el.classList.contains(CLS_TBARTEXT)) {\n btnText.style.display = 'none';\n }\n else if (!isNOU(btnText) && el.classList.contains(CLS_POPUPTEXT)) {\n btnText.style.display = 'block';\n }\n btn.style.minWidth = '0%';\n elWidth = parseFloat(!this.isVertical ? el.style.minWidth : el.style.minHeight);\n btn.style.minWidth = '';\n btn.style.minHeight = '';\n if (!isNOU(btnText)) {\n btnText.style.display = '';\n }\n }\n return elWidth;\n };\n Toolbar.prototype.popupEleRefresh = function (width, popupEle, destroy) {\n var popPriority = this.popupPriCount > 0;\n var eleSplice = this.tbarEle;\n var priEleCnt;\n var index;\n var checkOverflow;\n var innerEle = this.element.querySelector('.' + CLS_ITEMS);\n var ignoreCount = 0;\n var _loop_1 = function (el) {\n if (el.classList.contains(CLS_POPPRI) && popPriority && !destroy) {\n return \"continue\";\n }\n var elWidth = this_1.popupEleWidth(el);\n if (el === this_1.tbarEle[0]) {\n elWidth += this_1.tbarEleMrgn;\n }\n el.style.position = '';\n if (elWidth < width || destroy) {\n setStyle(el, { minWidth: '', height: '', minHeight: '' });\n if (!el.classList.contains(CLS_POPOVERFLOW)) {\n el.classList.remove(CLS_POPUP);\n }\n index = this_1.tbarEle.indexOf(el);\n if (this_1.tbarAlign) {\n var pos = this_1.items[index].align;\n index = this_1.tbarAlgEle[(pos + 's').toLowerCase()].indexOf(el);\n eleSplice = this_1.tbarAlgEle[(pos + 's').toLowerCase()];\n innerEle = this_1.element.querySelector('.' + CLS_ITEMS + ' .' + 'e-toolbar-' + pos.toLowerCase());\n }\n var sepBeforePri_1 = 0;\n if (this_1.overflowMode !== 'Extended') {\n eleSplice.slice(0, index).forEach(function (el) {\n if (el.classList.contains(CLS_TBAROVERFLOW) || el.classList.contains(CLS_SEPARATOR)) {\n if (el.classList.contains(CLS_SEPARATOR)) {\n el.style.display = '';\n width -= el.offsetWidth;\n }\n sepBeforePri_1++;\n }\n });\n }\n ignoreCount = this_1.ignoreEleFetch(index, innerEle);\n if (el.classList.contains(CLS_TBAROVERFLOW)) {\n this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width, ignoreCount);\n width -= el.offsetWidth;\n }\n else if (index === 0) {\n innerEle.insertBefore(el, innerEle.firstChild);\n width -= el.offsetWidth;\n }\n else {\n priEleCnt = selectAll('.' + CLS_TBAROVERFLOW, this_1.popObj.element).length;\n innerEle.insertBefore(el, innerEle.children[(index + ignoreCount) - priEleCnt]);\n width -= el.offsetWidth;\n }\n el.style.height = '';\n }\n else {\n return \"break\";\n }\n };\n var this_1 = this;\n for (var _i = 0, _a = [].slice.call(popupEle.children); _i < _a.length; _i++) {\n var el = _a[_i];\n var state_1 = _loop_1(el);\n if (state_1 === \"break\")\n break;\n }\n checkOverflow = this.checkOverflow(this.element, this.element.getElementsByClassName(CLS_ITEMS)[0]);\n if (checkOverflow && !destroy) {\n this.renderOverflowMode();\n }\n };\n Toolbar.prototype.removePositioning = function () {\n var item = this.element.querySelector('.' + CLS_ITEMS);\n if (isNOU(item) || !item.classList.contains(CLS_TBARPOS)) {\n return;\n }\n this.remove(item, CLS_TBARPOS);\n var innerItem = [].slice.call(item.childNodes);\n innerItem[1].removeAttribute('style');\n innerItem[2].removeAttribute('style');\n };\n Toolbar.prototype.refreshPositioning = function () {\n var item = this.element.querySelector('.' + CLS_ITEMS);\n this.add(item, CLS_TBARPOS);\n this.itemPositioning();\n };\n Toolbar.prototype.itemPositioning = function () {\n var item = this.element.querySelector('.' + CLS_ITEMS);\n var margin;\n if (isNOU(item) || !item.classList.contains(CLS_TBARPOS)) {\n return;\n }\n var popupNav = this.element.querySelector('.' + CLS_TBARNAV);\n var innerItem;\n if (this.scrollModule) {\n var trgClass = (this.isVertical) ? CLS_VSCROLLCNT : CLS_HSCROLLCNT;\n innerItem = [].slice.call(item.querySelector('.' + trgClass).children);\n }\n else {\n innerItem = [].slice.call(item.childNodes);\n }\n if (this.isVertical) {\n margin = innerItem[0].offsetHeight + innerItem[2].offsetHeight;\n }\n else {\n margin = innerItem[0].offsetWidth + innerItem[2].offsetWidth;\n }\n var tbarWid = this.isVertical ? this.element.offsetHeight : this.element.offsetWidth;\n if (popupNav) {\n tbarWid -= (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth);\n var popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + 'px';\n innerItem[2].removeAttribute('style');\n if (this.isVertical) {\n this.enableRtl ? innerItem[2].style.top = popWid : innerItem[2].style.bottom = popWid;\n }\n else {\n this.enableRtl ? innerItem[2].style.left = popWid : innerItem[2].style.right = popWid;\n }\n }\n if (tbarWid <= margin) {\n return;\n }\n var value = (((tbarWid - margin)) - (!this.isVertical ? innerItem[1].offsetWidth : innerItem[1].offsetHeight)) / 2;\n innerItem[1].removeAttribute('style');\n var mrgn = ((!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value) + 'px';\n if (this.isVertical) {\n this.enableRtl ? innerItem[1].style.marginBottom = mrgn : innerItem[1].style.marginTop = mrgn;\n }\n else {\n this.enableRtl ? innerItem[1].style.marginRight = mrgn : innerItem[1].style.marginLeft = mrgn;\n }\n };\n Toolbar.prototype.tbarItemAlign = function (item, itemEle, pos) {\n var _this = this;\n if (item.showAlwaysInPopup && item.overflow !== 'Show') {\n return;\n }\n var alignDiv = [];\n alignDiv.push(this.createElement('div', { className: CLS_TBARLEFT }));\n alignDiv.push(this.createElement('div', { className: CLS_TBARCENTER }));\n alignDiv.push(this.createElement('div', { className: CLS_TBARRIGHT }));\n if (pos === 0 && item.align !== 'Left') {\n alignDiv.forEach(function (ele) {\n itemEle.appendChild(ele);\n });\n this.tbarAlign = true;\n this.add(itemEle, CLS_TBARPOS);\n }\n else if (item.align !== 'Left') {\n var alignEle = itemEle.childNodes;\n var leftAlign_1 = alignDiv[0];\n [].slice.call(alignEle).forEach(function (el) {\n _this.tbarAlgEle.lefts.push(el);\n leftAlign_1.appendChild(el);\n });\n itemEle.appendChild(leftAlign_1);\n itemEle.appendChild(alignDiv[1]);\n itemEle.appendChild(alignDiv[2]);\n this.tbarAlign = true;\n this.add(itemEle, CLS_TBARPOS);\n }\n };\n Toolbar.prototype.ctrlTemplate = function () {\n var _this = this;\n this.ctrlTem = this.trgtEle.cloneNode(true);\n this.add(this.trgtEle, CLS_ITEMS);\n this.tbarEle = [];\n var innerEle = [].slice.call(this.trgtEle.children);\n innerEle.forEach(function (ele) {\n if (ele.tagName === 'DIV') {\n _this.tbarEle.push(ele);\n ele.setAttribute('aria-disabled', 'false');\n _this.add(ele, CLS_ITEM);\n }\n });\n };\n Toolbar.prototype.renderItems = function () {\n var ele = this.element;\n var items = this.items;\n if (this.trgtEle != null) {\n this.ctrlTemplate();\n }\n else if (ele && items.length > 0) {\n var itemEleDom = void 0;\n if (ele && ele.children.length > 0) {\n itemEleDom = ele.querySelector('.' + CLS_ITEMS);\n }\n if (!itemEleDom) {\n itemEleDom = this.createElement('div', { className: CLS_ITEMS });\n }\n this.itemsAlign(items, itemEleDom);\n ele.appendChild(itemEleDom);\n }\n };\n Toolbar.prototype.setAttr = function (attr, element) {\n var key = Object.keys(attr);\n var keyVal;\n for (var i = 0; i < key.length; i++) {\n keyVal = key[i];\n keyVal === 'class' ? this.add(element, attr[keyVal]) : element.setAttribute(keyVal, attr[keyVal]);\n }\n };\n /**\n * Enables or disables the specified Toolbar item.\n * @param {number|HTMLElement|NodeList} items - DOM element or an array of items to be enabled or disabled.\n * @param {boolean} isEnable - Boolean value that determines whether the command should be enabled or disabled.\n * By default, `isEnable` is set to true.\n * @returns void.\n */\n Toolbar.prototype.enableItems = function (items, isEnable) {\n var elements = items;\n var len = elements.length;\n var ele;\n if (isNOU(isEnable)) {\n isEnable = true;\n }\n var enable = function (isEnable, ele) {\n if (isEnable) {\n ele.classList.remove(CLS_DISABLE);\n ele.setAttribute('aria-disabled', 'false');\n }\n else {\n ele.classList.add(CLS_DISABLE);\n ele.setAttribute('aria-disabled', 'true');\n }\n };\n if (!isNOU(len) && len >= 1) {\n for (var a = 0, element = [].slice.call(elements); a < len; a++) {\n var itemElement = element[a];\n if (typeof (itemElement) === 'number') {\n ele = this.getElementByIndex(itemElement);\n if (isNOU(ele)) {\n return;\n }\n else {\n elements[a] = ele;\n }\n }\n else {\n ele = itemElement;\n }\n enable(isEnable, ele);\n }\n isEnable ? removeClass(elements, CLS_DISABLE) : addClass(elements, CLS_DISABLE);\n }\n else {\n if (typeof (elements) === 'number') {\n ele = this.getElementByIndex(elements);\n if (isNOU(ele)) {\n return;\n }\n }\n else {\n ele = items;\n }\n enable(isEnable, ele);\n }\n };\n Toolbar.prototype.getElementByIndex = function (index) {\n if (this.tbarEle[index]) {\n return this.tbarEle[index];\n }\n return null;\n };\n /**\n * Adds new items to the Toolbar that accepts an array as Toolbar items.\n * @param {ItemsModel[]} items - DOM element or an array of items to be added to the Toolbar.\n * @param {number} index - Number value that determines where the command is to be added. By default, index is 0.\n * @returns void.\n\n */\n Toolbar.prototype.addItems = function (items, index) {\n var innerItems;\n this.extendedOpen();\n var itemsDiv = this.element.querySelector('.' + CLS_ITEMS);\n if (isNOU(itemsDiv)) {\n this.itemsRerender(items);\n return;\n }\n var innerEle;\n var itemAgn = 'Left';\n if (isNOU(index)) {\n index = 0;\n }\n items.forEach(function (e) {\n if (!isNOU(e.align) && e.align !== 'Left' && itemAgn === 'Left') {\n itemAgn = e.align;\n }\n });\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var item = items_1[_i];\n if (isNOU(item.type)) {\n item.type = 'Button';\n }\n innerItems = selectAll('.' + CLS_ITEM, this.element);\n item.align = itemAgn;\n innerEle = this.renderSubComponent(item, index);\n if (this.tbarEle.length >= index && innerItems.length >= 0) {\n if (isNOU(this.scrollModule)) {\n this.destroyMode();\n }\n var algIndex = item.align[0] === 'L' ? 0 : item.align[0] === 'C' ? 1 : 2;\n var ele = void 0;\n if (!this.tbarAlign && itemAgn !== 'Left') {\n this.tbarItemAlign(item, itemsDiv, 1);\n this.tbarAlign = true;\n ele = closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];\n ele.appendChild(innerEle);\n this.tbarAlgEle[(item.align + 's').toLowerCase()].push(innerEle);\n this.refreshPositioning();\n }\n else if (this.tbarAlign) {\n ele = closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];\n ele.insertBefore(innerEle, ele.children[index]);\n this.tbarAlgEle[(item.align + 's').toLowerCase()].splice(index, 0, innerEle);\n this.refreshPositioning();\n }\n else if (innerItems.length === 0) {\n innerItems = selectAll('.' + CLS_ITEMS, this.element);\n innerItems[0].appendChild(innerEle);\n }\n else {\n innerItems[0].parentNode.insertBefore(innerEle, innerItems[index]);\n }\n this.items.splice(index, 0, item);\n this.tbarEle.splice(index, 0, innerEle);\n index++;\n this.offsetWid = itemsDiv.offsetWidth;\n }\n }\n itemsDiv.style.width = '';\n this.renderOverflowMode();\n // tslint:disable-next-line:no-any\n if (this.isReact) {\n this.renderReactTemplates();\n }\n };\n /**\n * Removes the items from the Toolbar. Acceptable arguments are index of item/HTMLElement/node list.\n * @param {number|HTMLElement|NodeList|HTMLElement[]} args\n * Index or DOM element or an Array of item which is to be removed from the Toolbar.\n * @returns void.\n\n */\n Toolbar.prototype.removeItems = function (args) {\n var elements = args;\n var index;\n var innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));\n if (typeof (elements) === 'number') {\n index = parseInt(args.toString(), 10);\n this.removeItemByIndex(index, innerItems);\n }\n else {\n if (elements && elements.length > 1) {\n for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {\n var ele = _a[_i];\n index = this.tbarEle.indexOf(ele);\n this.removeItemByIndex(index, innerItems);\n innerItems = selectAll('.' + CLS_ITEM, this.element);\n }\n }\n else {\n var ele = (elements && elements.length && elements.length === 1) ? elements[0] : args;\n index = innerItems.indexOf(ele);\n this.removeItemByIndex(index, innerItems);\n }\n }\n this.resize();\n };\n Toolbar.prototype.removeItemByIndex = function (index, innerItems) {\n if (this.tbarEle[index] && innerItems[index]) {\n var eleIdx = this.tbarEle.indexOf(innerItems[index]);\n if (this.tbarAlign) {\n var indexAgn = void 0;\n indexAgn = this.tbarAlgEle[(this.items[eleIdx].align + 's').toLowerCase()].indexOf(this.tbarEle[eleIdx]);\n this.tbarAlgEle[(this.items[eleIdx].align + 's').toLowerCase()].splice(indexAgn, 1);\n }\n // tslint:disable-next-line:no-any\n if (this.isReact) {\n this.clearTemplate();\n }\n detach(innerItems[index]);\n this.items.splice(eleIdx, 1);\n this.tbarEle.splice(eleIdx, 1);\n }\n };\n Toolbar.prototype.templateRender = function (templateProp, innerEle, item, index) {\n var itemType = item.type;\n var eleObj = templateProp;\n var isComponent;\n if (typeof (templateProp) === 'object') {\n isComponent = typeof (eleObj.appendTo) === 'function';\n }\n if (typeof (templateProp) === 'string' || !isComponent) {\n var templateFn = void 0;\n var val = templateProp;\n val = (typeof (templateProp) === 'string') ? templateProp.trim() : templateProp;\n var e = void 0;\n try {\n if (typeof (templateProp) === 'object' && !isNOU(templateProp.tagName)) {\n innerEle.appendChild(templateProp);\n }\n else if (document.querySelectorAll(val).length) {\n var ele = document.querySelector(val);\n var tempStr = ele.outerHTML.trim();\n innerEle.appendChild(ele);\n ele.style.display = '';\n if (!isNOU(tempStr)) {\n this.tempId.push(val);\n }\n }\n }\n catch (e) {\n templateFn = templateCompiler(val);\n }\n var tempArray = void 0;\n if (!isNOU(templateFn)) {\n var toolbarTemplateID = this.element.id + index + '_template';\n tempArray = templateFn({}, this, 'template', toolbarTemplateID, this.isStringTemplate);\n }\n if (!isNOU(tempArray) && tempArray.length > 0) {\n [].slice.call(tempArray).forEach(function (ele) {\n if (!isNOU(ele.tagName)) {\n ele.style.display = '';\n }\n innerEle.appendChild(ele);\n });\n }\n }\n else if (itemType === 'Input') {\n var ele = this.createElement('input');\n item.id ? (ele.id = item.id) : (ele.id = getUniqueID('tbr-ipt'));\n innerEle.appendChild(ele);\n eleObj.appendTo(ele);\n }\n this.add(innerEle, CLS_TEMPLATE);\n this.tbarEle.push(innerEle);\n };\n Toolbar.prototype.buttonRendering = function (item, innerEle) {\n var dom = this.createElement('button', { className: CLS_TBARBTN });\n dom.setAttribute('type', 'button');\n var textStr = item.text;\n var iconCss;\n var iconPos;\n item.id ? (dom.id = item.id) : dom.id = getUniqueID('e-tbr-btn');\n var btnTxt = this.createElement('span', { className: 'e-tbar-btn-text' });\n if (textStr) {\n btnTxt.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(textStr) : textStr;\n dom.appendChild(btnTxt);\n dom.classList.add('e-tbtn-txt');\n }\n else {\n this.add(innerEle, 'e-tbtn-align');\n }\n if (item.prefixIcon || item.suffixIcon) {\n if ((item.prefixIcon && item.suffixIcon) || item.prefixIcon) {\n iconCss = item.prefixIcon + ' e-icons';\n iconPos = 'Left';\n }\n else {\n iconCss = item.suffixIcon + ' e-icons';\n iconPos = 'Right';\n }\n }\n var btnObj = new Button({ iconCss: iconCss, iconPosition: iconPos });\n btnObj.createElement = this.createElement;\n btnObj.appendTo(dom);\n if (item.width) {\n setStyle(dom, { 'width': formatUnit(item.width) });\n }\n return dom;\n };\n Toolbar.prototype.renderSubComponent = function (item, index) {\n var innerEle;\n var dom;\n innerEle = this.createElement('div', { className: CLS_ITEM });\n innerEle.setAttribute('aria-disabled', 'false');\n var tempDom = this.createElement('div', {\n innerHTML: this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(item.tooltipText) : item.tooltipText\n });\n if (!this.tbarEle) {\n this.tbarEle = [];\n }\n if (item.htmlAttributes) {\n this.setAttr(item.htmlAttributes, innerEle);\n }\n if (item.tooltipText) {\n innerEle.setAttribute('title', tempDom.textContent);\n }\n if (item.cssClass) {\n innerEle.className = innerEle.className + ' ' + item.cssClass;\n }\n if (item.template) {\n this.templateRender(item.template, innerEle, item, index);\n }\n else {\n switch (item.type) {\n case 'Button':\n dom = this.buttonRendering(item, innerEle);\n dom.setAttribute('tabindex', '-1');\n dom.setAttribute('aria-label', (item.text || item.tooltipText));\n innerEle.appendChild(dom);\n innerEle.addEventListener('click', this.itemClick.bind(this));\n break;\n case 'Separator':\n this.add(innerEle, CLS_SEPARATOR);\n break;\n }\n }\n if (item.showTextOn) {\n var sTxt = item.showTextOn;\n if (sTxt === 'Toolbar') {\n this.add(innerEle, CLS_POPUPTEXT);\n this.add(innerEle, 'e-tbtn-align');\n }\n else if (sTxt === 'Overflow') {\n this.add(innerEle, CLS_TBARTEXT);\n }\n }\n if (item.overflow) {\n var overflow = item.overflow;\n if (overflow === 'Show') {\n this.add(innerEle, CLS_TBAROVERFLOW);\n }\n else if (overflow === 'Hide') {\n if (!innerEle.classList.contains(CLS_SEPARATOR)) {\n this.add(innerEle, CLS_POPOVERFLOW);\n }\n }\n }\n if (item.overflow !== 'Show' && item.showAlwaysInPopup && !innerEle.classList.contains(CLS_SEPARATOR)) {\n this.add(innerEle, CLS_POPPRI);\n this.popupPriCount++;\n }\n if (item.disabled) {\n this.add(innerEle, CLS_DISABLE);\n }\n if (item.visible === false) {\n this.add(innerEle, CLS_HIDDEN);\n }\n return innerEle;\n };\n Toolbar.prototype.itemClick = function (e) {\n this.activeEleSwitch(e.currentTarget);\n };\n Toolbar.prototype.activeEleSwitch = function (ele) {\n this.activeEleRemove(ele.firstElementChild);\n this.activeEle.focus();\n };\n Toolbar.prototype.activeEleRemove = function (curEle) {\n if (!isNOU(this.activeEle)) {\n this.activeEle.setAttribute('tabindex', '-1');\n }\n this.activeEle = curEle;\n if (isNOU(this.trgtEle) && !curEle.parentElement.classList.contains(CLS_TEMPLATE)) {\n curEle.removeAttribute('tabindex');\n }\n else {\n this.activeEle.setAttribute('tabindex', '0');\n }\n };\n Toolbar.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n /**\n * Returns the current module name.\n * @returns string\n * @private\n */\n Toolbar.prototype.getModuleName = function () {\n return 'toolbar';\n };\n Toolbar.prototype.itemsRerender = function (newProp) {\n this.items = this.tbarItemsCol;\n // tslint:disable-next-line:no-any\n if (this.isReact) {\n this.clearTemplate();\n }\n this.destroyMode();\n this.destroyItems();\n this.items = newProp;\n this.tbarItemsCol = this.items;\n this.renderItems();\n this.renderOverflowMode();\n // tslint:disable-next-line:no-any\n if (this.isReact) {\n this.renderReactTemplates();\n }\n };\n Toolbar.prototype.resize = function () {\n var ele = this.element;\n this.tbResize = true;\n if (this.tbarAlign) {\n this.itemPositioning();\n }\n if (this.popObj && this.overflowMode === 'Popup') {\n this.popObj.hide();\n }\n var checkOverflow = this.checkOverflow(ele, ele.getElementsByClassName(CLS_ITEMS)[0]);\n if (!checkOverflow) {\n this.destroyScroll();\n var multirowele = ele.querySelector('.' + CLS_ITEMS);\n if (!isNOU(multirowele)) {\n this.remove(multirowele, CLS_MULTIROWPOS);\n if (this.tbarAlign) {\n this.add(multirowele, CLS_TBARPOS);\n }\n }\n }\n if (checkOverflow && this.scrollModule && (this.offsetWid === ele.offsetWidth)) {\n return;\n }\n if (this.offsetWid > ele.offsetWidth || checkOverflow) {\n this.renderOverflowMode();\n }\n if (this.popObj) {\n if (this.overflowMode === 'Extended') {\n var eleStyles = window.getComputedStyle(this.element);\n this.popObj.width = parseFloat(eleStyles.width) + ((parseFloat(eleStyles.borderRightWidth)) * 2);\n }\n if (this.tbarAlign) {\n this.removePositioning();\n }\n this.popupRefresh(this.popObj.element, false);\n if (this.tbarAlign) {\n this.refreshPositioning();\n }\n }\n if (this.element.querySelector('.' + CLS_HSCROLLBAR)) {\n this.scrollStep = this.element.querySelector('.' + CLS_HSCROLLBAR).offsetWidth;\n }\n this.offsetWid = ele.offsetWidth;\n this.tbResize = false;\n this.separator();\n };\n Toolbar.prototype.extendedOpen = function () {\n var sib = this.element.querySelector('.' + CLS_EXTENDABLECLASS);\n if (this.overflowMode === 'Extended' && sib) {\n this.isExtendedOpen = sib.classList.contains(CLS_POPUPOPEN);\n }\n };\n /**\n * Gets called when the model property changes.The data that describes the old and new values of the property that changed.\n * @param {ToolbarModel} newProp\n * @param {ToolbarModel} oldProp\n * @returns void\n * @private\n */\n Toolbar.prototype.onPropertyChanged = function (newProp, oldProp) {\n var tEle = this.element;\n this.extendedOpen();\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'items':\n if (!(newProp.items instanceof Array && oldProp.items instanceof Array) && !this.isServerRendered) {\n var changedProb = Object.keys(newProp.items);\n for (var i = 0; i < changedProb.length; i++) {\n var index = parseInt(Object.keys(newProp.items)[i], 10);\n var property = Object.keys(newProp.items[index])[0];\n var newProperty = Object(newProp.items[index])[property];\n if (this.tbarAlign || property === 'align') {\n this.refresh();\n this.trigger('created');\n break;\n }\n var popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;\n var booleanCheck = property === 'overflow' && this.popupPriCount !== 0;\n if ((popupPriCheck) || (this.items[index].showAlwaysInPopup) && booleanCheck) {\n --this.popupPriCount;\n }\n if (isNOU(this.scrollModule)) {\n this.destroyMode();\n }\n var itemCol = [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, tEle));\n // tslint:disable-next-line:no-any\n if (this.isReact) {\n this.clearTemplate();\n }\n detach(itemCol[index]);\n this.tbarEle.splice(index, 1);\n this.addItems([this.items[index]], index);\n this.items.splice(index, 1);\n if (this.items[index].template) {\n this.tbarEle.splice(this.items.length, 1);\n }\n }\n }\n else {\n this.itemsRerender(newProp.items);\n }\n break;\n case 'width':\n var wid = tEle.offsetWidth;\n setStyle(tEle, { 'width': formatUnit(newProp.width) });\n this.renderOverflowMode();\n if (this.popObj && wid < tEle.offsetWidth) {\n this.popupRefresh(this.popObj.element, false);\n }\n break;\n case 'height':\n setStyle(this.element, { 'height': formatUnit(newProp.height) });\n break;\n case 'overflowMode':\n this.destroyMode();\n this.renderOverflowMode();\n if (this.enableRtl) {\n this.add(tEle, CLS_RTL);\n }\n this.refreshOverflow();\n break;\n case 'enableRtl':\n newProp.enableRtl ? this.add(tEle, CLS_RTL) : this.remove(tEle, CLS_RTL);\n if (!isNOU(this.scrollModule)) {\n newProp.enableRtl ? this.add(this.scrollModule.element, CLS_RTL) : this.remove(this.scrollModule.element, CLS_RTL);\n }\n if (!isNOU(this.popObj)) {\n newProp.enableRtl ? this.add(this.popObj.element, CLS_RTL) : this.remove(this.popObj.element, CLS_RTL);\n }\n if (this.tbarAlign) {\n this.itemPositioning();\n }\n break;\n case 'scrollStep':\n if (this.scrollModule) {\n this.scrollModule.scrollStep = this.scrollStep;\n }\n break;\n case 'enableCollision':\n if (this.popObj) {\n this.popObj.collision = { Y: this.enableCollision ? 'flip' : 'none' };\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([this.element], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([this.element], newProp.cssClass.split(' '));\n }\n break;\n case 'allowKeyboard':\n this.unwireKeyboardEvent();\n if (newProp.allowKeyboard) {\n this.wireKeyboardEvent();\n }\n break;\n }\n }\n };\n /**\n * Shows or hides the Toolbar item that is in the specified index.\n * @param {number | HTMLElement} index - Index value of target item or DOM element of items to be hidden or shown.\n * @param {boolean} value - Based on this Boolean value, item will be hide (true) or show (false). By default, value is false.\n * @returns void.\n */\n Toolbar.prototype.hideItem = function (index, value) {\n var isElement = (typeof (index) === 'object') ? true : false;\n var eleIndex = index;\n var initIndex;\n var ele;\n var innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));\n if (isElement) {\n ele = index;\n }\n else if (this.tbarEle[eleIndex]) {\n var innerItems_1 = [].slice.call(selectAll('.' + CLS_ITEM, this.element));\n ele = innerItems_1[eleIndex];\n }\n if (ele) {\n value ? ele.classList.add(CLS_HIDDEN) : ele.classList.remove(CLS_HIDDEN);\n if (value && isNOU(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {\n if (isNOU(ele.firstElementChild.getAttribute('tabindex'))) {\n ele.firstElementChild.setAttribute('tabindex', '-1');\n var innerItems_2 = [].slice.call(selectAll('.' + CLS_ITEM, this.element));\n if (isElement) {\n eleIndex = innerItems_2.indexOf(ele);\n }\n var nextEle = innerItems_2[++eleIndex];\n while (nextEle) {\n var skipEle = this.eleContains(nextEle);\n if (!skipEle) {\n nextEle.firstElementChild.removeAttribute('tabindex');\n break;\n }\n nextEle = innerItems_2[++eleIndex];\n }\n }\n }\n else if (isNOU(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {\n initIndex = 0;\n var setFlag = false;\n var removeFlag = false;\n var initELe = innerItems[initIndex];\n while (initELe) {\n if (!initELe.classList.contains(CLS_SEPARATOR)) {\n if (isNOU(initELe.firstElementChild.getAttribute('tabindex'))) {\n initELe.firstElementChild.setAttribute('tabindex', '-1');\n setFlag = true;\n }\n else {\n if (setFlag && removeFlag) {\n break;\n }\n var skipEle = this.eleContains(initELe);\n if (!skipEle) {\n initELe.firstElementChild.removeAttribute('tabindex');\n removeFlag = true;\n }\n initELe = innerItems[++initIndex];\n }\n }\n else {\n initELe = innerItems[++initIndex];\n }\n }\n }\n this.refreshOverflow();\n }\n };\n __decorate([\n Collection([], Item)\n ], Toolbar.prototype, \"items\", void 0);\n __decorate([\n Property('auto')\n ], Toolbar.prototype, \"width\", void 0);\n __decorate([\n Property('auto')\n ], Toolbar.prototype, \"height\", void 0);\n __decorate([\n Property('')\n ], Toolbar.prototype, \"cssClass\", void 0);\n __decorate([\n Property('Scrollable')\n ], Toolbar.prototype, \"overflowMode\", void 0);\n __decorate([\n Property()\n ], Toolbar.prototype, \"scrollStep\", void 0);\n __decorate([\n Property(true)\n ], Toolbar.prototype, \"enableCollision\", void 0);\n __decorate([\n Property(true)\n ], Toolbar.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property(true)\n ], Toolbar.prototype, \"allowKeyboard\", void 0);\n __decorate([\n Event()\n ], Toolbar.prototype, \"clicked\", void 0);\n __decorate([\n Event()\n ], Toolbar.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], Toolbar.prototype, \"destroyed\", void 0);\n __decorate([\n Event()\n ], Toolbar.prototype, \"beforeCreate\", void 0);\n Toolbar = __decorate([\n NotifyPropertyChanges\n ], Toolbar);\n return Toolbar;\n}(Component));\nexport { Toolbar };\n","import { EventHandler, extend, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { remove, isBlazor, updateBlazorTemplate, select } from '@syncfusion/ej2-base';\nimport { Toolbar as tool } from '@syncfusion/ej2-navigations';\nimport * as events from '../base/constant';\nimport { templateCompiler, appendChildren, parentsUntil } from '../base/util';\nimport { ResponsiveToolbarAction } from '../base/enum';\nimport { SearchBox } from '../services/focus-strategy';\n/**\n * The `Toolbar` module is used to handle ToolBar actions.\n * @hidden\n */\nvar Toolbar = /** @class */ (function () {\n function Toolbar(parent, serviceLocator) {\n this.predefinedItems = {};\n this.items = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'Print', 'Search',\n 'ColumnChooser', 'PdfExport', 'ExcelExport', 'CsvExport', 'WordExport'];\n this.parent = parent;\n this.gridID = parent.element.id;\n this.serviceLocator = serviceLocator;\n this.addEventListener();\n }\n Toolbar.prototype.render = function () {\n this.l10n = this.serviceLocator.getService('localization');\n var preItems = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'Print',\n 'PdfExport', 'ExcelExport', 'WordExport', 'CsvExport'];\n for (var _i = 0, preItems_1 = preItems; _i < preItems_1.length; _i++) {\n var item = preItems_1[_i];\n var itemStr = item.toLowerCase();\n var localeName = itemStr[0].toUpperCase() + itemStr.slice(1);\n this.predefinedItems[item] = {\n id: this.gridID + '_' + itemStr, prefixIcon: 'e-' + itemStr,\n text: this.parent.enableAdaptiveUI ? '' : this.l10n.getConstant(localeName), tooltipText: this.l10n.getConstant(localeName)\n };\n }\n this.predefinedItems.Search = {\n id: this.gridID + '_search',\n tooltipText: this.l10n.getConstant('Search'), align: 'Right', cssClass: 'e-search-wrapper',\n type: 'Input'\n };\n this.predefinedItems.ColumnChooser = {\n id: this.gridID + '_' + 'columnchooser', cssClass: 'e-cc e-ccdiv e-cc-toolbar', suffixIcon: 'e-' + 'columnchooser-btn',\n text: this.l10n.getConstant('Columnchooser'), tooltipText: this.l10n.getConstant('Columnchooser'), align: 'Right',\n };\n if (this.parent.rowRenderingMode === 'Vertical') {\n if (this.parent.allowFiltering && this.parent.filterSettings.type !== 'FilterBar') {\n this.predefinedItems.responsiveFilter = {\n id: this.gridID + '_' + 'responsivefilter', cssClass: 'e-gridresponsiveicons e-icons',\n suffixIcon: 'e-' + 'resfilter-icon', tooltipText: this.l10n.getConstant('FilterButton')\n };\n }\n if (this.parent.allowSorting) {\n this.predefinedItems.responsiveSort = {\n id: this.gridID + '_' + 'responsivesort', cssClass: 'e-gridresponsiveicons e-icons',\n suffixIcon: 'e-' + 'ressort-icon', tooltipText: this.l10n.getConstant('Sort')\n };\n }\n }\n if (this.parent.enableAdaptiveUI && this.parent.toolbar.indexOf('Search') > -1) {\n this.predefinedItems.responsiveBack = {\n id: this.gridID + '_' + 'responsiveback', cssClass: 'e-gridresponsiveicons e-icons',\n suffixIcon: 'e-' + 'resback-icon'\n };\n }\n this.createToolbar();\n };\n /**\n * Gets the toolbar of the Grid.\n * @return {Element}\n * @hidden\n */\n Toolbar.prototype.getToolbar = function () {\n return this.toolbar.element;\n };\n /**\n * Destroys the ToolBar.\n * @method destroy\n * @return {void}\n */\n Toolbar.prototype.destroy = function () {\n if (this.toolbar && !this.toolbar.isDestroyed) {\n if (!this.toolbar.element) {\n this.parent.destroyTemplate(['toolbarTemplate']);\n if (this.parent.isReact) {\n this.parent.renderTemplates();\n }\n }\n else {\n this.toolbar.off('render-react-toolbar-template', this.addReactToolbarPortals);\n this.toolbar.destroy();\n }\n this.unWireEvent();\n this.removeEventListener();\n remove(this.element);\n }\n };\n Toolbar.prototype.bindSearchEvents = function () {\n this.searchElement = select('#' + this.gridID + '_searchbar', this.element);\n this.wireEvent();\n this.refreshToolbarItems();\n if (this.parent.searchSettings) {\n this.updateSearchBox();\n }\n };\n Toolbar.prototype.toolbarCreated = function (isNormal) {\n if (this.element.querySelector('.e-search-wrapper')) {\n if (!this.parent.enableAdaptiveUI || isNormal) {\n this.element.querySelector('.e-search-wrapper').innerHTML = '
\\\n \\\n \\\n
';\n }\n else {\n this.element.querySelector('.e-search-wrapper').innerHTML = ' \\\n
';\n }\n }\n this.bindSearchEvents();\n };\n Toolbar.prototype.createToolbar = function () {\n var items = this.getResponsiveToolbarItems(this.getItems());\n this.toolbar = new tool({\n items: items,\n clicked: this.toolbarClickHandler.bind(this),\n enablePersistence: this.parent.enablePersistence,\n enableRtl: this.parent.enableRtl,\n created: this.toolbarCreated.bind(this)\n });\n this.toolbar.isReact = this.parent.isReact;\n this.toolbar.on('render-react-toolbar-template', this.addReactToolbarPortals, this);\n var isStringTemplate = 'isStringTemplate';\n this.toolbar[isStringTemplate] = true;\n var viewStr = 'viewContainerRef';\n var registerTemp = 'registeredTemplate';\n if (this.parent[viewStr]) {\n this.toolbar[registerTemp] = {};\n this.toolbar[viewStr] = this.parent[viewStr];\n }\n this.element = this.parent.createElement('div', { id: this.gridID + '_toolbarItems' });\n if (this.parent.enableAdaptiveUI) {\n this.toolbar.overflowMode = 'Popup';\n this.element.classList.add('e-res-toolbar');\n }\n if (this.parent.toolbarTemplate) {\n if (!isBlazor() && typeof (this.parent.toolbarTemplate) === 'string') {\n this.toolbar.appendTo(this.parent.toolbarTemplate);\n this.element = this.toolbar.element;\n }\n else {\n if (isBlazor()) {\n var tempID = this.parent.element.id + 'toolbarTemplate';\n var item = appendChildren(this.element, templateCompiler(this.parent.toolbarTemplate)({}, this.parent, 'toolbarTemplate', tempID));\n var items_1 = this.getItem(item);\n this.toolbar.items.push(items_1);\n this.toolbar.appendTo(this.element);\n updateBlazorTemplate(this.parent.element.id + 'toolbarTemplate', 'ToolbarTemplate', this.parent);\n }\n else {\n var isReactCompiler = this.parent.isReact && typeof (this.parent.toolbarTemplate) !== 'string';\n var ID = this.parent.element.id + 'toolbarTemplate';\n if (isReactCompiler) {\n templateCompiler(this.parent.toolbarTemplate)({}, this.parent, 'toolbarTemplate', ID, null, null, this.element);\n this.parent.renderTemplates();\n }\n else {\n appendChildren(this.element, templateCompiler(this.parent.toolbarTemplate)({}, this.parent, 'toolbarTemplate'));\n }\n }\n }\n }\n else {\n this.toolbar.appendTo(this.element);\n }\n this.parent.element.insertBefore(this.element, this.parent.getHeaderContent());\n };\n Toolbar.prototype.addReactToolbarPortals = function (args) {\n if (this.parent.isReact && args) {\n this.parent.portals = this.parent.portals.concat(args);\n this.parent.renderTemplates();\n }\n };\n Toolbar.prototype.renderResponsiveSearch = function (isRender) {\n if (isRender) {\n this.toolbarCreated(true);\n this.refreshResponsiveToolbarItems(ResponsiveToolbarAction.isSearch);\n this.searchElement = select('#' + this.gridID + '_searchbar', this.element);\n var right = parentsUntil(this.searchElement, 'e-toolbar-right');\n right.classList.add('e-responsive-right');\n if (this.parent.searchSettings) {\n this.updateSearchBox();\n }\n this.searchBoxObj.searchFocus({ target: this.searchElement });\n this.searchElement.focus();\n }\n else {\n var right = parentsUntil(this.searchElement, 'e-toolbar-right');\n right.classList.remove('e-responsive-right');\n this.refreshResponsiveToolbarItems(ResponsiveToolbarAction.isInitial);\n this.toolbarCreated(false);\n this.unWireEvent();\n this.searchElement = undefined;\n }\n };\n Toolbar.prototype.getResponsiveToolbarItems = function (items) {\n if (this.parent.enableAdaptiveUI) {\n for (var i = 0; i < items.length; i++) {\n items[i].visible = (items[i].id === this.parent.element.id + '_add'\n || items[i].id === this.parent.element.id + '_search' || items[i].id === this.parent.element.id + '_responsivesort'\n || items[i].id === this.parent.element.id + '_responsivefilter');\n }\n }\n return items;\n };\n Toolbar.prototype.refreshResponsiveToolbarItems = function (action) {\n var items = this.toolbar.items;\n var initial = ['add', 'search', 'responsivesort', 'responsivefilter'];\n if (this.parent.getSelectedRowIndexes().length) {\n initial.push('edit', 'delete');\n if (this.parent.rowRenderingMode !== 'Vertical') {\n initial.push('update', 'cancel');\n }\n }\n var search = ['responsiveback', 'search'];\n var buttons = action === ResponsiveToolbarAction.isInitial ? initial : search;\n for (var i = 0; i < items.length; i++) {\n var names = items[i].id.split('_');\n var ele = this.element.querySelector('#' + items[i].id);\n if (ele) {\n var parent_1 = parentsUntil(ele, 'e-toolbar-item');\n if (buttons.indexOf(names[1]) > -1) {\n parent_1.classList.remove('e-hidden');\n }\n else {\n parent_1.classList.add('e-hidden');\n }\n }\n }\n return items;\n };\n Toolbar.prototype.refreshToolbarItems = function (args) {\n var gObj = this.parent;\n var enableItems = [];\n var disableItems = [];\n var edit = gObj.editSettings;\n var hasData = gObj.currentViewData && gObj.currentViewData.length;\n edit.allowAdding ? enableItems.push(this.gridID + '_add') : disableItems.push(this.gridID + '_add');\n edit.allowEditing && hasData ? enableItems.push(this.gridID + '_edit') : disableItems.push(this.gridID + '_edit');\n edit.allowDeleting && hasData ? enableItems.push(this.gridID + '_delete') : disableItems.push(this.gridID + '_delete');\n if (gObj.editSettings.mode === 'Batch') {\n if (gObj.element.querySelectorAll('.e-updatedtd').length && (edit.allowAdding || edit.allowEditing)) {\n enableItems.push(this.gridID + '_update');\n enableItems.push(this.gridID + '_cancel');\n }\n else {\n disableItems.push(this.gridID + '_update');\n disableItems.push(this.gridID + '_cancel');\n }\n }\n else {\n if (gObj.isEdit && (edit.allowAdding || edit.allowEditing)) {\n enableItems = [this.gridID + '_update', this.gridID + '_cancel'];\n disableItems = [this.gridID + '_add', this.gridID + '_edit', this.gridID + '_delete'];\n }\n else {\n disableItems.push(this.gridID + '_update');\n disableItems.push(this.gridID + '_cancel');\n }\n }\n this.enableItems(enableItems, true);\n this.enableItems(disableItems, false);\n };\n Toolbar.prototype.getItems = function () {\n var items = [];\n var toolbarItems = this.parent.toolbar || [];\n if (typeof (this.parent.toolbar) === 'string') {\n return [];\n }\n for (var _i = 0, toolbarItems_1 = toolbarItems; _i < toolbarItems_1.length; _i++) {\n var item = toolbarItems_1[_i];\n switch (typeof item) {\n case 'number':\n items.push(this.getItemObject(this.items[item]));\n break;\n case 'string':\n items.push(this.getItemObject(item));\n break;\n default:\n items.push(this.getItem(item));\n }\n }\n if (this.parent.rowRenderingMode === 'Vertical') {\n if (this.parent.allowFiltering && this.parent.filterSettings.type !== 'FilterBar') {\n items.push(this.getItemObject('responsiveFilter'));\n }\n if (this.parent.allowSorting) {\n items.push(this.getItemObject('responsiveSort'));\n }\n }\n if (this.parent.enableAdaptiveUI) {\n items.push(this.getItemObject('responsiveBack'));\n }\n return items;\n };\n Toolbar.prototype.getItem = function (itemObject) {\n var item = this.predefinedItems[itemObject.text];\n return item ? extend(item, item, itemObject) : itemObject;\n };\n Toolbar.prototype.getItemObject = function (itemName) {\n return this.predefinedItems[itemName] || { text: itemName, id: this.gridID + '_' + itemName };\n };\n /**\n * Enables or disables ToolBar items.\n * @param {string[]} items - Defines the collection of itemID of ToolBar items.\n * @param {boolean} isEnable - Defines the items to be enabled or disabled.\n * @return {void}\n * @hidden\n */\n Toolbar.prototype.enableItems = function (items, isEnable) {\n for (var _i = 0, items_2 = items; _i < items_2.length; _i++) {\n var item = items_2[_i];\n var element = select('#' + item, this.element);\n if (element) {\n this.toolbar.enableItems(element.parentElement, isEnable);\n }\n }\n };\n Toolbar.prototype.toolbarClickHandler = function (args) {\n var _this = this;\n var gObj = this.parent;\n var gID = this.gridID;\n extend(args, { cancel: false });\n var newArgs = !isBlazor() || this.parent.isJsComponent ? args : { item: args.item, cancel: args.cancel, name: args.name };\n var originalEvent = args.originalEvent;\n gObj.trigger(events.toolbarClick, newArgs, function (toolbarargs) {\n toolbarargs.originalEvent = toolbarargs.originalEvent ? toolbarargs.originalEvent : originalEvent;\n if (!toolbarargs.cancel) {\n switch (!isNullOrUndefined(toolbarargs.item) && toolbarargs.item.id) {\n case gID + '_print':\n gObj.print();\n break;\n case gID + '_edit':\n gObj.startEdit();\n break;\n case gID + '_update':\n gObj.endEdit();\n break;\n case gID + '_cancel':\n gObj.closeEdit();\n break;\n case gID + '_add':\n gObj.addRecord();\n break;\n case gID + '_delete':\n gObj.deleteRecord();\n break;\n case gID + '_search':\n if (toolbarargs.originalEvent.target.id === gID + '_searchbutton' && _this.searchElement) {\n _this.search();\n }\n else if (gObj.enableAdaptiveUI && !_this.searchElement\n && (toolbarargs.originalEvent.target.classList.contains('e-search-wrapper')\n || toolbarargs.originalEvent.target.id === gID + '_searchbutton')) {\n _this.renderResponsiveSearch(true);\n }\n break;\n case gID + '_columnchooser':\n var tarElement = _this.parent.element.querySelector('.e-ccdiv');\n var y = tarElement.getBoundingClientRect().top;\n var x = tarElement.getBoundingClientRect().left;\n var targetEle = toolbarargs.originalEvent.target;\n y = tarElement.getBoundingClientRect().top + tarElement.offsetTop;\n gObj.createColumnchooser(x, y, targetEle);\n break;\n case 'copy':\n if (isBlazor()) {\n gObj.copy();\n }\n break;\n case 'copyheader':\n case 'copyHeader':\n if (isBlazor()) {\n gObj.copy(true);\n }\n break;\n case gID + '_responsivefilter':\n gObj.showResponsiveCustomFilter();\n break;\n case gID + '_responsivesort':\n gObj.showResponsiveCustomSort();\n break;\n case gID + '_responsiveback':\n _this.renderResponsiveSearch(false);\n break;\n }\n }\n });\n };\n Toolbar.prototype.modelChanged = function (e) {\n if (e.module === 'edit') {\n this.refreshToolbarItems();\n }\n };\n Toolbar.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName() || !this.parent.toolbar) {\n return;\n }\n if (this.element) {\n remove(this.element);\n }\n this.render();\n };\n Toolbar.prototype.keyUpHandler = function (e) {\n if (e.keyCode === 13) {\n this.search();\n }\n };\n Toolbar.prototype.search = function () {\n this.parent.search(this.searchElement.value);\n };\n Toolbar.prototype.updateSearchBox = function () {\n if (this.searchElement) {\n this.searchElement.value = this.parent.searchSettings.key;\n }\n };\n Toolbar.prototype.wireEvent = function () {\n if (this.searchElement) {\n this.searchBoxObj = new SearchBox(this.searchElement);\n EventHandler.add(this.searchElement, 'keyup', this.keyUpHandler, this);\n this.searchBoxObj.wireEvent();\n }\n };\n Toolbar.prototype.unWireEvent = function () {\n if (this.searchElement) {\n EventHandler.remove(this.searchElement, 'keyup', this.keyUpHandler);\n this.searchBoxObj.unWireEvent();\n }\n };\n Toolbar.prototype.reRenderToolbar = function () {\n if (this.element) {\n remove(this.element);\n }\n this.render();\n };\n Toolbar.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.setFullScreenDialog, this.reRenderToolbar, this);\n this.parent.on(events.initialEnd, this.render, this);\n this.parent.on(events.uiUpdate, this.onPropertyChanged, this);\n this.parent.on(events.inBoundModelChanged, this.updateSearchBox.bind(this));\n this.parent.on(events.modelChanged, this.refreshToolbarItems, this);\n this.parent.on(events.toolbarRefresh, this.refreshToolbarItems, this);\n this.parent.on(events.inBoundModelChanged, this.modelChanged, this);\n this.parent.on(events.dataBound, this.refreshToolbarItems, this);\n this.parent.on(events.click, this.removeResponsiveSearch, this);\n this.parent.on(events.rowModeChange, this.reRenderToolbar, this);\n this.rowSelectedFunction = this.rowSelected.bind(this);\n this.rowDeSelectedFunction = this.rowSelected.bind(this);\n this.parent.addEventListener(events.rowSelected, this.rowSelectedFunction);\n this.parent.addEventListener(events.rowDeselected, this.rowDeSelectedFunction);\n };\n Toolbar.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.setFullScreenDialog, this.reRenderToolbar);\n this.parent.off(events.initialEnd, this.render);\n this.parent.off(events.uiUpdate, this.onPropertyChanged);\n this.parent.off(events.inBoundModelChanged, this.updateSearchBox);\n this.parent.off(events.modelChanged, this.refreshToolbarItems);\n this.parent.off(events.toolbarRefresh, this.refreshToolbarItems);\n this.parent.off(events.inBoundModelChanged, this.modelChanged);\n this.parent.off(events.dataBound, this.refreshToolbarItems);\n this.parent.off(events.click, this.removeResponsiveSearch);\n this.parent.off(events.rowModeChange, this.reRenderToolbar);\n this.parent.removeEventListener(events.rowSelected, this.rowSelectedFunction);\n this.parent.removeEventListener(events.rowDeselected, this.rowDeSelectedFunction);\n };\n Toolbar.prototype.removeResponsiveSearch = function (e) {\n var target = e.target;\n var isSearch = target.classList.contains('e-search-icon') || target.classList.contains('e-search-wrapper');\n if (this.parent.enableAdaptiveUI && !isSearch && this.searchElement\n && !parentsUntil(e.target, 'e-res-toolbar')) {\n this.renderResponsiveSearch(false);\n }\n };\n Toolbar.prototype.rowSelected = function () {\n if (this.parent.enableAdaptiveUI) {\n this.refreshResponsiveToolbarItems(ResponsiveToolbarAction.isInitial);\n }\n };\n /**\n * For internal use only - Get the module name.\n */\n Toolbar.prototype.getModuleName = function () {\n return 'toolbar';\n };\n return Toolbar;\n}());\nexport { Toolbar };\n","import { Browser } from '@syncfusion/ej2-base';\nimport { extend, isNullOrUndefined, isBlazor } from '@syncfusion/ej2-base';\nimport { closest, classList } from '@syncfusion/ej2-base';\nimport { ResponsiveDialogAction } from '../base/enum';\nimport { setCssInGridPopUp, getActualPropFromColl, isActionPrevent, iterateExtend, parentsUntil } from '../base/util';\nimport * as events from '../base/constant';\nimport { AriaService } from '../services/aria-service';\n/**\n *\n * The `Sort` module is used to handle sorting action.\n */\nvar Sort = /** @class */ (function () {\n /**\n * Constructor for Grid sorting module\n * @hidden\n */\n function Sort(parent, sortSettings, sortedColumns, locator) {\n this.contentRefresh = true;\n this.isModelChanged = true;\n this.aria = new AriaService();\n this.currentTarget = null;\n this.parent = parent;\n this.sortSettings = sortSettings;\n this.sortedColumns = sortedColumns;\n this.serviceLocator = locator;\n this.focus = locator.getService('focus');\n this.addEventListener();\n this.setFullScreenDialog();\n }\n /**\n * The function used to update sortSettings\n * @return {void}\n * @hidden\n */\n Sort.prototype.updateModel = function () {\n var sortedColumn = { field: this.columnName, direction: this.direction };\n var index;\n var gCols = this.parent.groupSettings.columns;\n var flag = false;\n if (!this.isMultiSort) {\n if (!gCols.length) {\n this.sortSettings.columns = [sortedColumn];\n }\n else {\n var sortedCols = [];\n for (var i = 0, len = gCols.length; i < len; i++) {\n index = this.getSortedColsIndexByField(gCols[i], sortedCols);\n if (this.columnName === gCols[i]) {\n flag = true;\n sortedCols.push(sortedColumn);\n }\n else {\n var sCol = this.getSortColumnFromField(gCols[i]);\n sortedCols.push({ field: sCol.field, direction: sCol.direction, isFromGroup: sCol.isFromGroup });\n }\n }\n if (!flag) {\n sortedCols.push(sortedColumn);\n }\n this.sortSettings.columns = sortedCols;\n }\n }\n else {\n index = this.getSortedColsIndexByField(this.columnName);\n if (index > -1) {\n this.sortSettings.columns.splice(index, 1);\n }\n this.sortSettings.columns.push(sortedColumn);\n this.sortSettings.columns = this.sortSettings.columns;\n }\n this.parent.dataBind();\n this.lastSortedCol = this.columnName;\n };\n /**\n * The function used to trigger onActionComplete\n * @return {void}\n * @hidden\n */\n Sort.prototype.onActionComplete = function (e) {\n if (isBlazor() && !this.parent.isJsComponent) {\n e.rows = null;\n }\n var args = !this.isRemove ? {\n columnName: this.columnName, direction: this.direction, requestType: 'sorting', type: events.actionComplete\n } : { requestType: 'sorting', type: events.actionComplete };\n this.isRemove = false;\n this.parent.trigger(events.actionComplete, extend(e, args));\n };\n /**\n * Sorts a column with the given options.\n * @param {string} columnName - Defines the column name to sort.\n * @param {SortDirection} direction - Defines the direction of sorting field.\n * @param {boolean} isMultiSort - Specifies whether the previously sorted columns are to be maintained.\n * @return {void}\n */\n Sort.prototype.sortColumn = function (columnName, direction, isMultiSort) {\n var gObj = this.parent;\n if (this.parent.getColumnByField(columnName).allowSorting === false || this.parent.isContextMenuOpen()) {\n this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), columnName: columnName });\n return;\n }\n if (!gObj.allowMultiSorting) {\n isMultiSort = gObj.allowMultiSorting;\n }\n if (this.isActionPrevent()) {\n gObj.notify(events.preventBatch, {\n instance: this, handler: this.sortColumn,\n arg1: columnName, arg2: direction, arg3: isMultiSort\n });\n return;\n }\n this.backupSettings();\n this.columnName = columnName;\n this.direction = direction;\n this.isMultiSort = isMultiSort;\n this.removeSortIcons();\n var column = gObj.getColumnHeaderByField(columnName);\n this.updateSortedCols(columnName, isMultiSort);\n this.updateModel();\n };\n Sort.prototype.setFullScreenDialog = function () {\n if (this.serviceLocator) {\n this.serviceLocator.registerAdaptiveService(this, this.parent.enableAdaptiveUI, ResponsiveDialogAction.isSort);\n }\n };\n Sort.prototype.backupSettings = function () {\n this.lastSortedCols = iterateExtend(this.sortSettings.columns);\n this.lastCols = this.sortedColumns;\n };\n Sort.prototype.restoreSettings = function () {\n this.isModelChanged = false;\n this.isMultiSort = true;\n this.parent.setProperties({ sortSettings: { columns: this.lastSortedCols } }, true);\n //this.parent.sortSettings.columns = this.lastSortedCols; \n this.sortedColumns = this.lastCols;\n this.isModelChanged = true;\n };\n Sort.prototype.updateSortedCols = function (columnName, isMultiSort) {\n if (!isMultiSort) {\n if (this.parent.allowGrouping) {\n for (var i = 0, len = this.sortedColumns.length; i < len; i++) {\n if (this.parent.groupSettings.columns.indexOf(this.sortedColumns[i]) < 0) {\n this.sortedColumns.splice(i, 1);\n len--;\n i--;\n }\n }\n }\n else {\n this.sortedColumns.splice(0, this.sortedColumns.length);\n }\n }\n if (this.sortedColumns.indexOf(columnName) < 0) {\n this.sortedColumns.push(columnName);\n }\n };\n /**\n * @hidden\n */\n Sort.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n if (this.contentRefresh) {\n var args = this.sortSettings.columns.length ? {\n columnName: this.columnName, direction: this.direction, requestType: 'sorting',\n type: events.actionBegin, target: this.currentTarget, cancel: false\n } : {\n requestType: 'sorting', type: events.actionBegin, cancel: false,\n target: this.currentTarget\n };\n this.parent.notify(events.modelChanged, args);\n }\n this.refreshSortSettings();\n this.removeSortIcons();\n this.addSortIcons();\n };\n Sort.prototype.refreshSortSettings = function () {\n this.sortedColumns.length = 0;\n var sortColumns = this.sortSettings.columns;\n for (var i = 0; i < sortColumns.length; i++) {\n if (!sortColumns[i].isFromGroup) {\n this.sortedColumns.push(sortColumns[i].field);\n }\n }\n };\n /**\n * Clears all the sorted columns of the Grid.\n * @return {void}\n */\n Sort.prototype.clearSorting = function () {\n var cols = getActualPropFromColl(this.sortSettings.columns);\n if (this.isActionPrevent()) {\n this.parent.notify(events.preventBatch, { instance: this, handler: this.clearSorting });\n return;\n }\n for (var i = 0, len = cols.length; i < len; i++) {\n this.removeSortColumn(cols[i].field);\n }\n if (isBlazor() && !this.parent.isJsComponent) {\n this.sortSettings.columns = this.sortSettings.columns;\n }\n };\n Sort.prototype.isActionPrevent = function () {\n return isActionPrevent(this.parent);\n };\n /**\n * Remove sorted column by field name.\n * @param {string} field - Defines the column field name to remove sort.\n * @return {void}\n * @hidden\n */\n Sort.prototype.removeSortColumn = function (field) {\n var gObj = this.parent;\n var cols = this.sortSettings.columns;\n if (cols.length === 0 && this.sortedColumns.indexOf(field) < 0) {\n return;\n }\n if (this.isActionPrevent()) {\n this.parent.notify(events.preventBatch, { instance: this, handler: this.removeSortColumn, arg1: field });\n return;\n }\n this.backupSettings();\n this.removeSortIcons();\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[i].field === field) {\n if (gObj.allowGrouping && gObj.groupSettings.columns.indexOf(cols[i].field) > -1) {\n continue;\n }\n this.sortedColumns.splice(this.sortedColumns.indexOf(cols[i].field), 1);\n cols.splice(i, 1);\n this.isRemove = true;\n if (this.isModelChanged) {\n this.parent.notify(events.modelChanged, {\n requestType: 'sorting', type: events.actionBegin, target: this.currentTarget\n });\n }\n break;\n }\n }\n this.addSortIcons();\n };\n Sort.prototype.getSortedColsIndexByField = function (field, sortedColumns) {\n var cols = sortedColumns ? sortedColumns : this.sortSettings.columns;\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[i].field === field) {\n return i;\n }\n }\n return -1;\n };\n /**\n * For internal use only - Get the module name.\n * @private\n */\n Sort.prototype.getModuleName = function () {\n return 'sort';\n };\n Sort.prototype.initialEnd = function () {\n this.parent.off(events.contentReady, this.initialEnd);\n var isServerRendered = 'isServerRendered';\n if (isBlazor() && this.parent[isServerRendered]) {\n return;\n }\n if (this.parent.getColumns().length && this.sortSettings.columns.length) {\n var gObj = this.parent;\n this.contentRefresh = false;\n this.isMultiSort = this.sortSettings.columns.length > 1;\n for (var _i = 0, _a = gObj.sortSettings.columns.slice(); _i < _a.length; _i++) {\n var col = _a[_i];\n if (this.sortedColumns.indexOf(col.field) > -1) {\n this.sortColumn(col.field, col.direction, true);\n }\n }\n this.isMultiSort = false;\n this.contentRefresh = true;\n }\n };\n /**\n * @hidden\n */\n Sort.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.setFullScreenDialog, this.setFullScreenDialog, this);\n this.parent.on(events.contentReady, this.initialEnd, this);\n this.parent.on(events.sortComplete, this.onActionComplete, this);\n this.parent.on(events.inBoundModelChanged, this.onPropertyChanged, this);\n this.parent.on(events.click, this.clickHandler, this);\n this.parent.on(events.headerRefreshed, this.refreshSortIcons, this);\n this.parent.on(events.keyPressed, this.keyPressed, this);\n this.parent.on(events.cancelBegin, this.cancelBeginEvent, this);\n };\n /**\n * @hidden\n */\n Sort.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.setFullScreenDialog, this.setFullScreenDialog);\n this.parent.off(events.sortComplete, this.onActionComplete);\n this.parent.off(events.inBoundModelChanged, this.onPropertyChanged);\n this.parent.off(events.click, this.clickHandler);\n this.parent.off(events.headerRefreshed, this.refreshSortIcons);\n this.parent.off(events.keyPressed, this.keyPressed);\n this.parent.off(events.cancelBegin, this.cancelBeginEvent);\n };\n /**\n * To destroy the sorting\n * @return {void}\n * @hidden\n */\n Sort.prototype.destroy = function () {\n this.isModelChanged = false;\n var gridElement = this.parent.element;\n if (!gridElement || (!gridElement.querySelector('.e-gridheader') && !gridElement.querySelector('.e-gridcontent'))) {\n return;\n }\n if (this.parent.element.querySelector('.e-gridpopup').querySelectorAll('.e-sortdirect').length) {\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n // tslint:disable-next-line:no-any\n if (!this.parent.refreshing) {\n this.clearSorting();\n }\n this.isModelChanged = true;\n this.removeEventListener();\n };\n Sort.prototype.cancelBeginEvent = function (e) {\n if (e.requestType === 'sorting') {\n this.restoreSettings();\n this.refreshSortIcons();\n this.isMultiSort = true;\n }\n };\n Sort.prototype.clickHandler = function (e) {\n var gObj = this.parent;\n this.currentTarget = null;\n this.popUpClickHandler(e);\n var target = closest(e.target, '.e-headercell');\n if (target && !e.target.classList.contains('e-grptogglebtn') &&\n !(target.classList.contains('e-resized')) &&\n !e.target.classList.contains('e-rhandler') &&\n !e.target.classList.contains('e-columnmenu') &&\n !e.target.classList.contains('e-filtermenudiv') &&\n !parentsUntil(e.target, 'e-stackedheadercell') &&\n !(gObj.allowSelection && gObj.selectionSettings.allowColumnSelection &&\n e.target.classList.contains('e-headercell'))) {\n var gObj_1 = this.parent;\n var colObj = gObj_1.getColumnByUid(target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid'));\n var direction = !target.querySelectorAll('.e-ascending').length ? 'Ascending' :\n 'Descending';\n if (colObj.type !== 'checkbox') {\n this.initiateSort(target, e, colObj);\n if (Browser.isDevice) {\n this.showPopUp(e);\n }\n }\n }\n if (target) {\n target.classList.remove('e-resized');\n }\n if (parentsUntil(e.target, 'e-excel-ascending') ||\n parentsUntil(e.target, 'e-excel-descending')) {\n var colUid = closest(e.target, '.e-filter-popup').getAttribute('uid');\n var direction = isNullOrUndefined(parentsUntil(e.target, 'e-excel-descending')) ?\n 'Ascending' : 'Descending';\n this.sortColumn(gObj.getColumnByUid(colUid).field, direction, false);\n }\n };\n Sort.prototype.keyPressed = function (e) {\n var ele = e.target;\n if (!this.parent.isEdit && (e.action === 'enter' || e.action === 'ctrlEnter' || e.action === 'shiftEnter')\n && closest(ele, '.e-headercell')) {\n var target = this.focus.getFocusedElement();\n if (isNullOrUndefined(target) || !target.classList.contains('e-headercell')\n || !target.querySelector('.e-headercelldiv')) {\n return;\n }\n var col = this.parent.getColumnByUid(target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid'));\n this.initiateSort(target, e, col);\n }\n };\n Sort.prototype.initiateSort = function (target, e, column) {\n var gObj = this.parent;\n var field = column.field;\n this.currentTarget = e.target;\n var direction = !target.querySelectorAll('.e-ascending').length ? 'Ascending' :\n 'Descending';\n if (e.shiftKey || (this.sortSettings.allowUnsort && target.querySelectorAll('.e-descending').length)\n && !(gObj.groupSettings.columns.indexOf(field) > -1)) {\n this.removeSortColumn(field);\n if (isBlazor() && !this.parent.isJsComponent) {\n this.sortSettings.columns = this.sortSettings.columns;\n }\n }\n else {\n this.sortColumn(field, direction, e.ctrlKey || this.enableSortMultiTouch ||\n (navigator.userAgent.indexOf('Mac OS') !== -1 && e.metaKey));\n }\n };\n Sort.prototype.showPopUp = function (e) {\n var target = closest(e.target, '.e-headercell');\n if (this.parent.allowMultiSorting && (!isNullOrUndefined(target) || this.parent.isContextMenuOpen())) {\n setCssInGridPopUp(this.parent.element.querySelector('.e-gridpopup'), e, 'e-sortdirect e-icons e-icon-sortdirect' + (this.sortedColumns.length > 1 ? ' e-spanclicked' : ''));\n }\n };\n Sort.prototype.popUpClickHandler = function (e) {\n var target = e.target;\n if (closest(target, '.e-headercell') || e.target.classList.contains('e-rowcell') ||\n closest(target, '.e-gridpopup')) {\n if (target.classList.contains('e-sortdirect')) {\n if (!target.classList.contains('e-spanclicked')) {\n target.classList.add('e-spanclicked');\n this.enableSortMultiTouch = true;\n }\n else {\n target.classList.remove('e-spanclicked');\n this.enableSortMultiTouch = false;\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n }\n }\n else {\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n };\n Sort.prototype.addSortIcons = function () {\n var gObj = this.parent;\n var header;\n var filterElement;\n var cols = this.sortSettings.columns;\n var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });\n for (var i = 0, len = cols.length; i < len; i++) {\n header = gObj.getColumnHeaderByField(cols[i].field);\n if (fieldNames.indexOf(cols[i].field) === -1 || isNullOrUndefined(header)) {\n continue;\n }\n this.aria.setSort(header, cols[i].direction);\n if (this.isMultiSort && cols.length > 1) {\n header.querySelector('.e-headercelldiv').insertBefore(this.parent.createElement('span', { className: 'e-sortnumber', innerHTML: (i + 1).toString() }), header.querySelector('.e-headertext'));\n }\n filterElement = header.querySelector('.e-sortfilterdiv');\n if (cols[i].direction === 'Ascending') {\n classList(filterElement, ['e-ascending', 'e-icon-ascending'], []);\n }\n else {\n classList(filterElement, ['e-descending', 'e-icon-descending'], []);\n }\n }\n };\n Sort.prototype.removeSortIcons = function (position) {\n var gObj = this.parent;\n var header;\n var cols = this.sortSettings.columns;\n var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });\n for (var i = position ? position : 0, len = !isNullOrUndefined(position) ? position + 1 : cols.length; i < len; i++) {\n header = gObj.getColumnHeaderByField(cols[i].field);\n if (isNullOrUndefined(header) || (gObj.allowGrouping && gObj.groupSettings.columns.indexOf(cols[i].field) > -1 &&\n !header.querySelector('.e-sortfilterdiv'))) {\n continue;\n }\n if (fieldNames.indexOf(cols[i].field) === -1) {\n continue;\n }\n this.aria.setSort(header, 'none');\n classList(header.querySelector('.e-sortfilterdiv'), [], ['e-descending', 'e-icon-descending', 'e-ascending', 'e-icon-ascending']);\n if (header.querySelector('.e-sortnumber')) {\n header.querySelector('.e-headercelldiv').removeChild(header.querySelector('.e-sortnumber'));\n }\n }\n };\n Sort.prototype.getSortColumnFromField = function (field) {\n for (var i = 0, len = this.sortSettings.columns.length; i < len; i++) {\n if (this.sortSettings.columns[i].field === field) {\n return this.sortSettings.columns[i];\n }\n }\n return false;\n };\n Sort.prototype.updateAriaAttr = function () {\n var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });\n for (var _i = 0, _a = this.sortedColumns; _i < _a.length; _i++) {\n var col = _a[_i];\n if (fieldNames.indexOf(col) === -1) {\n continue;\n }\n var header = this.parent.getColumnHeaderByField(col);\n this.aria.setSort(header, this.getSortColumnFromField(col).direction);\n }\n };\n Sort.prototype.refreshSortIcons = function (params) {\n if (params === void 0) { params = { args: { isFrozen: false } }; }\n if (!params.args.isFrozen) {\n this.removeSortIcons();\n this.isMultiSort = true;\n this.removeSortIcons();\n this.addSortIcons();\n this.isMultiSort = false;\n this.updateAriaAttr();\n }\n };\n /**\n * To show the responsive custom sort dialog\n * @return {void}\n * @hidden\n */\n Sort.prototype.showCustomFilter = function () {\n this.responsiveDialogRenderer.showResponsiveDialog();\n };\n return Sort;\n}());\nexport { Sort };\n","import { merge } from '@syncfusion/ej2-base';\n/**\n * Row\n * @hidden\n */\nvar Row = /** @class */ (function () {\n function Row(options, parent) {\n merge(this, options);\n this.parent = parent;\n }\n Row.prototype.clone = function () {\n var row = new Row({});\n merge(row, this);\n row.cells = this.cells.map(function (cell) { return cell.clone(); });\n return row;\n };\n /**\n * Replaces the row data and grid refresh the particular row element only.\n * @param {Object} data - To update new data for the particular row.\n * @return {void}\n */\n Row.prototype.setRowValue = function (data) {\n if (!this.parent) {\n return;\n }\n var key = this.data[this.parent.getPrimaryKeyFieldNames()[0]];\n this.parent.setRowData(key, data);\n };\n /**\n * Replaces the given field value and refresh the particular cell element only.\n * @param {string} field - Specifies the field name which you want to update.\n * @param {string | number | boolean | Date} value - To update new value for the particular cell.\n * @return {void}\n */\n Row.prototype.setCellValue = function (field, value) {\n if (!this.parent) {\n return;\n }\n var isValDiff = !(this.data[field].toString() === value.toString());\n if (isValDiff) {\n var pKeyField = this.parent.getPrimaryKeyFieldNames()[0];\n var key = this.data[pKeyField];\n this.parent.setCellValue(key, field, value);\n this.makechanges(pKeyField, this.data);\n }\n else {\n return;\n }\n };\n Row.prototype.makechanges = function (key, data) {\n if (!this.parent) {\n return;\n }\n var gObj = this.parent;\n var dataManager = gObj.getDataModule().dataManager;\n dataManager.update(key, data);\n };\n return Row;\n}());\nexport { Row };\n","import { merge } from '@syncfusion/ej2-base';\n/**\n * Cell\n * @hidden\n */\nvar Cell = /** @class */ (function () {\n function Cell(options) {\n this.isSpanned = false;\n this.isRowSpanned = false;\n merge(this, options);\n }\n Cell.prototype.clone = function () {\n var cell = new Cell({});\n merge(cell, this);\n return cell;\n };\n return Cell;\n}());\nexport { Cell };\n","/**\n * Save class provide method to save file\n * ```typescript\n * let blob : Blob = new Blob([''], { type: 'text/plain' });\n * Save.save('fileName.txt',blob);\n */\nvar Save = /** @class */ (function () {\n /**\n * Initialize new instance of {save}\n */\n function Save() {\n // tslint:disable\n }\n /**\n * Saves the file with specified name and sends the file to client browser\n * @param {string} fileName- file name to save.\n * @param {Blob} buffer- the content to write in file\n * @param {boolean} isMicrosoftBrowser- specify whether microsoft browser or not\n * @returns {void}\n */\n Save.save = function (fileName, buffer) {\n if (fileName === null || fileName === undefined || fileName === '') {\n throw new Error('ArgumentException: fileName cannot be undefined, null or empty');\n }\n var extension = fileName.substring(fileName.lastIndexOf('.') + 1, fileName.length);\n var mimeType = this.getMimeType(extension);\n if (mimeType !== '') {\n buffer = new Blob([buffer], { type: mimeType });\n }\n if (this.isMicrosoftBrowser) {\n navigator.msSaveBlob(buffer, fileName);\n }\n else {\n var downloadLink = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');\n this.saveInternal(fileName, extension, buffer, downloadLink, 'download' in downloadLink);\n }\n };\n Save.saveInternal = function (fileName, extension, buffer, downloadLink, hasDownloadAttribute) {\n if (hasDownloadAttribute) {\n downloadLink.download = fileName;\n var dataUrl_1 = window.URL.createObjectURL(buffer);\n downloadLink.href = dataUrl_1;\n var event_1 = document.createEvent('MouseEvent');\n event_1.initEvent('click', true, true);\n downloadLink.dispatchEvent(event_1);\n setTimeout(function () {\n window.URL.revokeObjectURL(dataUrl_1);\n dataUrl_1 = undefined;\n });\n }\n else {\n if (extension !== 'docx' && extension !== 'xlsx') {\n var url = window.URL.createObjectURL(buffer);\n var isPopupBlocked = window.open(url, '_blank');\n if (!isPopupBlocked) {\n window.location.href = url;\n }\n }\n else {\n var reader_1 = new FileReader();\n reader_1.onloadend = function () {\n var isPopupBlocked = window.open(reader_1.result, '_blank');\n if (!isPopupBlocked) {\n window.location.href = reader_1.result;\n }\n };\n reader_1.readAsDataURL(buffer);\n }\n }\n };\n /**\n *\n * @param {string} extension - get mime type of the specified extension\n * @private\n */\n Save.getMimeType = function (extension) {\n var mimeType = '';\n switch (extension) {\n case 'html':\n mimeType = 'text/html';\n break;\n case 'pdf':\n mimeType = 'application/pdf';\n break;\n case 'docx':\n mimeType = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';\n break;\n case 'xlsx':\n mimeType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';\n break;\n case 'txt':\n mimeType = 'text/plain';\n break;\n }\n return mimeType;\n };\n return Save;\n}());\nexport { Save };\n","/**\n * Encoding class: Contains the details about encoding type, whether to write a Unicode byte order mark (BOM).\n * ```typescript\n * let encoding : Encoding = new Encoding();\n * encoding.type = 'Utf8';\n * encoding.getBytes('Encoding', 0, 5);\n * ```\n */\nvar Encoding = /** @class */ (function () {\n /**\n * Initializes a new instance of the Encoding class. A parameter specifies whether to write a Unicode byte order mark\n * @param {boolean} includeBom?-true to specify that a Unicode byte order mark is written; otherwise, false.\n */\n function Encoding(includeBom) {\n this.emitBOM = true;\n this.encodingType = 'Ansi';\n this.initBOM(includeBom);\n }\n Object.defineProperty(Encoding.prototype, \"includeBom\", {\n /**\n * Gets a value indicating whether to write a Unicode byte order mark\n * @returns boolean- true to specify that a Unicode byte order mark is written; otherwise, false\n */\n get: function () {\n return this.emitBOM;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Encoding.prototype, \"type\", {\n /**\n * Gets the encoding type.\n * @returns EncodingType\n */\n get: function () {\n return this.encodingType;\n },\n /**\n * Sets the encoding type.\n * @param {EncodingType} value\n */\n set: function (value) {\n this.encodingType = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Initialize the includeBom to emit BOM or Not\n * @param {boolean} includeBom\n */\n Encoding.prototype.initBOM = function (includeBom) {\n if (includeBom === undefined || includeBom === null) {\n this.emitBOM = true;\n }\n else {\n this.emitBOM = includeBom;\n }\n };\n /**\n * Calculates the number of bytes produced by encoding the characters in the specified string\n * @param {string} chars - The string containing the set of characters to encode\n * @returns {number} - The number of bytes produced by encoding the specified characters\n */\n Encoding.prototype.getByteCount = function (chars) {\n var byteCount = 0;\n validateNullOrUndefined(chars, 'string');\n if (chars === '') {\n var byte = this.utf8Len(chars.charCodeAt(0));\n return byte;\n }\n if (this.type === null || this.type === undefined) {\n this.type = 'Ansi';\n }\n return this.getByteCountInternal(chars, 0, chars.length);\n };\n /**\n * Return the Byte of character\n * @param {number} codePoint\n * @returns {number}\n */\n Encoding.prototype.utf8Len = function (codePoint) {\n var bytes = codePoint <= 0x7F ? 1 :\n codePoint <= 0x7FF ? 2 :\n codePoint <= 0xFFFF ? 3 :\n codePoint <= 0x1FFFFF ? 4 : 0;\n return bytes;\n };\n /**\n * for 4 byte character return surrogate pair true, otherwise false\n * @param {number} codeUnit\n * @returns {boolean}\n */\n Encoding.prototype.isHighSurrogate = function (codeUnit) {\n return codeUnit >= 0xD800 && codeUnit <= 0xDBFF;\n };\n /**\n * for 4byte character generate the surrogate pair\n * @param {number} highCodeUnit\n * @param {number} lowCodeUnit\n */\n Encoding.prototype.toCodepoint = function (highCodeUnit, lowCodeUnit) {\n highCodeUnit = (0x3FF & highCodeUnit) << 10;\n var u = highCodeUnit | (0x3FF & lowCodeUnit);\n return u + 0x10000;\n };\n /**\n * private method to get the byte count for specific charindex and count\n * @param {string} chars\n * @param {number} charIndex\n * @param {number} charCount\n */\n Encoding.prototype.getByteCountInternal = function (chars, charIndex, charCount) {\n var byteCount = 0;\n if (this.encodingType === 'Utf8' || this.encodingType === 'Unicode') {\n var isUtf8 = this.encodingType === 'Utf8';\n for (var i = 0; i < charCount; i++) {\n var charCode = chars.charCodeAt(isUtf8 ? charIndex : charIndex++);\n if (this.isHighSurrogate(charCode)) {\n if (isUtf8) {\n var high = charCode;\n var low = chars.charCodeAt(++charIndex);\n byteCount += this.utf8Len(this.toCodepoint(high, low));\n }\n else {\n byteCount += 4;\n ++i;\n }\n }\n else {\n if (isUtf8) {\n byteCount += this.utf8Len(charCode);\n }\n else {\n byteCount += 2;\n }\n }\n if (isUtf8) {\n charIndex++;\n }\n }\n return byteCount;\n }\n else {\n byteCount = charCount;\n return byteCount;\n }\n };\n /**\n * Encodes a set of characters from the specified string into the ArrayBuffer.\n * @param {string} s- The string containing the set of characters to encode\n * @param {number} charIndex-The index of the first character to encode.\n * @param {number} charCount- The number of characters to encode.\n * @returns {ArrayBuffer} - The ArrayBuffer that contains the resulting sequence of bytes.\n */\n Encoding.prototype.getBytes = function (s, charIndex, charCount) {\n validateNullOrUndefined(s, 'string');\n validateNullOrUndefined(charIndex, 'charIndex');\n validateNullOrUndefined(charCount, 'charCount');\n if (charIndex < 0 || charCount < 0) {\n throw new RangeError('Argument Out Of Range Exception: charIndex or charCount is less than zero');\n }\n if (s.length - charIndex < charCount) {\n throw new RangeError('Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string');\n }\n var bytes;\n if (s === '') {\n bytes = new ArrayBuffer(0);\n return bytes;\n }\n if (this.type === null || this.type === undefined) {\n this.type = 'Ansi';\n }\n var byteCount = this.getByteCountInternal(s, charIndex, charCount);\n switch (this.type) {\n case 'Utf8':\n bytes = this.getBytesOfUtf8Encoding(byteCount, s, charIndex, charCount);\n return bytes;\n case 'Unicode':\n bytes = this.getBytesOfUnicodeEncoding(byteCount, s, charIndex, charCount);\n return bytes;\n default:\n bytes = this.getBytesOfAnsiEncoding(byteCount, s, charIndex, charCount);\n return bytes;\n }\n };\n /**\n * Decodes a sequence of bytes from the specified ArrayBuffer into the string.\n * @param {ArrayBuffer} bytes- The ArrayBuffer containing the sequence of bytes to decode.\n * @param {number} index- The index of the first byte to decode.\n * @param {number} count- The number of bytes to decode.\n * @returns {string} - The string that contains the resulting set of characters.\n */\n Encoding.prototype.getString = function (bytes, index, count) {\n validateNullOrUndefined(bytes, 'bytes');\n validateNullOrUndefined(index, 'index');\n validateNullOrUndefined(count, 'count');\n if (index < 0 || count < 0) {\n throw new RangeError('Argument Out Of Range Exception: index or count is less than zero');\n }\n if (bytes.byteLength - index < count) {\n throw new RangeError('Argument Out Of Range Exception: index and count do not denote a valid range in bytes');\n }\n if (bytes.byteLength === 0 || count === 0) {\n return '';\n }\n if (this.type === null || this.type === undefined) {\n this.type = 'Ansi';\n }\n var out = '';\n var byteCal = new Uint8Array(bytes);\n switch (this.type) {\n case 'Utf8':\n var s = this.getStringOfUtf8Encoding(byteCal, index, count);\n return s;\n case 'Unicode':\n var byteUnicode = new Uint16Array(bytes);\n out = this.getStringofUnicodeEncoding(byteUnicode, index, count);\n return out;\n default:\n var j = index;\n for (var i = 0; i < count; i++) {\n var c = byteCal[j];\n out += String.fromCharCode(c); // 1 byte(ASCII) character \n j++;\n }\n return out;\n }\n };\n Encoding.prototype.getBytesOfAnsiEncoding = function (byteCount, s, charIndex, charCount) {\n var bytes = new ArrayBuffer(byteCount);\n var bufview = new Uint8Array(bytes);\n var k = 0;\n for (var i = 0; i < charCount; i++) {\n var charcode = s.charCodeAt(charIndex++);\n if (charcode < 0x800) {\n bufview[k] = charcode;\n }\n else {\n bufview[k] = 63; //replacement character '?'\n }\n k++;\n }\n return bytes;\n };\n Encoding.prototype.getBytesOfUtf8Encoding = function (byteCount, s, charIndex, charCount) {\n var bytes = new ArrayBuffer(byteCount);\n var uint = new Uint8Array(bytes);\n var index = charIndex;\n var j = 0;\n for (var i = 0; i < charCount; i++) {\n var charcode = s.charCodeAt(index);\n if (charcode <= 0x7F) { // 1 byte character 2^7\n uint[j] = charcode;\n }\n else if (charcode < 0x800) { // 2 byte character 2^11\n uint[j] = 0xc0 | (charcode >> 6);\n uint[++j] = 0x80 | (charcode & 0x3f);\n }\n else if ((charcode < 0xd800 || charcode >= 0xe000)) { // 3 byte character 2^16 \n uint[j] = 0xe0 | (charcode >> 12);\n uint[++j] = 0x80 | ((charcode >> 6) & 0x3f);\n uint[++j] = 0x80 | (charcode & 0x3f);\n }\n else {\n uint[j] = 0xef;\n uint[++j] = 0xbf;\n uint[++j] = 0xbd; // U+FFFE \"replacement character\"\n }\n ++j;\n ++index;\n }\n return bytes;\n };\n Encoding.prototype.getBytesOfUnicodeEncoding = function (byteCount, s, charIndex, charCount) {\n var bytes = new ArrayBuffer(byteCount);\n var uint16 = new Uint16Array(bytes);\n for (var i = 0; i < charCount; i++) {\n var charcode = s.charCodeAt(i);\n uint16[i] = charcode;\n }\n return bytes;\n };\n Encoding.prototype.getStringOfUtf8Encoding = function (byteCal, index, count) {\n var j = 0;\n var i = index;\n var s = '';\n for (j; j < count; j++) {\n var c = byteCal[i++];\n while (i > byteCal.length) {\n return s;\n }\n if (c > 127) {\n if (c > 191 && c < 224 && i < count) {\n c = (c & 31) << 6 | byteCal[i] & 63;\n }\n else if (c > 223 && c < 240 && i < byteCal.byteLength) {\n c = (c & 15) << 12 | (byteCal[i] & 63) << 6 | byteCal[++i] & 63;\n }\n else if (c > 239 && c < 248 && i < byteCal.byteLength) {\n c = (c & 7) << 18 | (byteCal[i] & 63) << 12 | (byteCal[++i] & 63) << 6 | byteCal[++i] & 63;\n }\n ++i;\n }\n s += String.fromCharCode(c); // 1 byte(ASCII) character \n }\n return s;\n };\n Encoding.prototype.getStringofUnicodeEncoding = function (byteUni, index, count) {\n if (count > byteUni.length) {\n throw new RangeError('ArgumentOutOfRange_Count');\n }\n var byte16 = new Uint16Array(count);\n var out = '';\n for (var i = 0; i < count && i < byteUni.length; i++) {\n byte16[i] = byteUni[index++];\n }\n out = String.fromCharCode.apply(null, byte16);\n return out;\n };\n /**\n * To clear the encoding instance\n * @return {void}\n */\n Encoding.prototype.destroy = function () {\n this.emitBOM = undefined;\n this.encodingType = undefined;\n };\n return Encoding;\n}());\nexport { Encoding };\n/**\n * To check the object is null or undefined and throw error if it is null or undefined\n * @param {Object} value - object to check is null or undefined\n * @return {boolean}\n * @throws {ArgumentException} - if the value is null or undefined\n * @private\n */\nexport function validateNullOrUndefined(value, message) {\n if (value === null || value === undefined) {\n throw new Error('ArgumentException: ' + message + ' cannot be null or undefined');\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Property, NotifyPropertyChanges, Component, isBlazor, isRippleEnabled } from '@syncfusion/ej2-base';\nimport { addClass, Event, detach, removeClass } from '@syncfusion/ej2-base';\nimport { rippleEffect, EventHandler, Observer, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { getTextNode } from '../common/common';\nexport var buttonObserver = new Observer();\nvar cssClassName = {\n RTL: 'e-rtl',\n BUTTON: 'e-btn',\n PRIMARY: 'e-primary',\n ICONBTN: 'e-icon-btn'\n};\n/**\n * The Button is a graphical user interface element that triggers an event on its click action. It can contain a text, an image, or both.\n * ```html\n * \n * ```\n * ```typescript\n * \n * ```\n */\nvar Button = /** @class */ (function (_super) {\n __extends(Button, _super);\n /**\n * Constructor for creating the widget\n * @param {ButtonModel} options?\n * @param {string|HTMLButtonElement} element?\n */\n function Button(options, element) {\n return _super.call(this, options, element) || this;\n }\n Button.prototype.preRender = function () {\n // pre render code snippets\n };\n /**\n * Initialize the control rendering\n * @returns void\n * @private\n */\n Button.prototype.render = function () {\n this.initialize();\n this.removeRippleEffect = rippleEffect(this.element, { selector: '.' + cssClassName.BUTTON });\n this.renderComplete();\n };\n Button.prototype.initialize = function () {\n if (this.cssClass) {\n addClass([this.element], this.cssClass.split(' '));\n }\n if (this.isPrimary) {\n this.element.classList.add(cssClassName.PRIMARY);\n }\n if (!isBlazor() || (isBlazor() && this.getModuleName() !== 'progress-btn')) {\n if (this.content) {\n var tempContent = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(this.content) : this.content;\n this.element.innerHTML = tempContent;\n }\n this.setIconCss();\n }\n if (this.enableRtl) {\n this.element.classList.add(cssClassName.RTL);\n }\n if (this.disabled) {\n this.controlStatus(this.disabled);\n }\n else {\n this.wireEvents();\n }\n };\n Button.prototype.controlStatus = function (disabled) {\n this.element.disabled = disabled;\n };\n Button.prototype.setIconCss = function () {\n if (this.iconCss) {\n var span = this.createElement('span', { className: 'e-btn-icon ' + this.iconCss });\n if (!this.element.textContent.trim()) {\n this.element.classList.add(cssClassName.ICONBTN);\n }\n else {\n span.classList.add('e-icon-' + this.iconPosition.toLowerCase());\n if (this.iconPosition === 'Top' || this.iconPosition === 'Bottom') {\n this.element.classList.add('e-' + this.iconPosition.toLowerCase() + '-icon-btn');\n }\n }\n var node = this.element.childNodes[0];\n if (node && (this.iconPosition === 'Left' || this.iconPosition === 'Top')) {\n this.element.insertBefore(span, node);\n }\n else {\n this.element.appendChild(span);\n }\n }\n };\n Button.prototype.wireEvents = function () {\n if (this.isToggle) {\n EventHandler.add(this.element, 'click', this.btnClickHandler, this);\n }\n };\n Button.prototype.unWireEvents = function () {\n if (this.isToggle) {\n EventHandler.remove(this.element, 'click', this.btnClickHandler);\n }\n };\n Button.prototype.btnClickHandler = function () {\n if (this.element.classList.contains('e-active')) {\n this.element.classList.remove('e-active');\n }\n else {\n this.element.classList.add('e-active');\n }\n };\n /**\n * Destroys the widget.\n * @returns void\n */\n Button.prototype.destroy = function () {\n var span;\n var classList = [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success', 'e-info', 'e-danger',\n 'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round',\n 'e-top-icon-btn', 'e-bottom-icon-btn'];\n if (this.cssClass) {\n classList = classList.concat(this.cssClass.split(' '));\n }\n _super.prototype.destroy.call(this);\n removeClass([this.element], classList);\n if (!this.element.getAttribute('class')) {\n this.element.removeAttribute('class');\n }\n if (this.disabled) {\n this.element.removeAttribute('disabled');\n }\n if (this.content) {\n this.element.innerHTML = this.element.innerHTML.replace(this.content, '');\n }\n span = this.element.querySelector('span.e-btn-icon');\n if (span) {\n detach(span);\n }\n this.unWireEvents();\n if (isRippleEnabled) {\n this.removeRippleEffect();\n }\n };\n /**\n * Get component name.\n * @returns string\n * @private\n */\n Button.prototype.getModuleName = function () {\n return 'btn';\n };\n /**\n * Get the properties to be maintained in the persisted state.\n * @returns string\n * @private\n */\n Button.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n /**\n * Dynamically injects the required modules to the component.\n * @private\n */\n Button.Inject = function () {\n // Inject code snippets\n };\n /**\n * Called internally if any of the property value changed.\n * @param {ButtonModel} newProp\n * @param {ButtonModel} oldProp\n * @returns void\n * @private\n */\n Button.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'isPrimary':\n if (newProp.isPrimary) {\n this.element.classList.add(cssClassName.PRIMARY);\n }\n else {\n this.element.classList.remove(cssClassName.PRIMARY);\n }\n break;\n case 'disabled':\n this.controlStatus(newProp.disabled);\n break;\n case 'iconCss':\n var span = this.element.querySelector('span.e-btn-icon');\n if (span) {\n if (newProp.iconCss) {\n span.className = 'e-btn-icon ' + newProp.iconCss;\n if (this.element.textContent.trim()) {\n if (this.iconPosition === 'Left') {\n span.classList.add('e-icon-left');\n }\n else {\n span.classList.add('e-icon-right');\n }\n }\n }\n else {\n detach(span);\n }\n }\n else {\n this.setIconCss();\n }\n break;\n case 'iconPosition':\n removeClass([this.element], ['e-top-icon-btn', 'e-bottom-icon-btn']);\n span = this.element.querySelector('span.e-btn-icon');\n if (span) {\n detach(span);\n }\n this.setIconCss();\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([this.element], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([this.element], newProp.cssClass.split(' '));\n }\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n this.element.classList.add(cssClassName.RTL);\n }\n else {\n this.element.classList.remove(cssClassName.RTL);\n }\n break;\n case 'content':\n var node = getTextNode(this.element);\n if (!node) {\n this.element.classList.remove(cssClassName.ICONBTN);\n }\n if (!isBlazor() || (isBlazor() && !this.isServerRendered && this.getModuleName() !== 'progress-btn')) {\n if (this.enableHtmlSanitizer) {\n newProp.content = SanitizeHtmlHelper.sanitize(newProp.content);\n }\n this.element.innerHTML = newProp.content;\n this.setIconCss();\n }\n break;\n case 'isToggle':\n if (newProp.isToggle) {\n EventHandler.add(this.element, 'click', this.btnClickHandler, this);\n }\n else {\n EventHandler.remove(this.element, 'click', this.btnClickHandler);\n removeClass([this.element], ['e-active']);\n }\n break;\n }\n }\n };\n /**\n * Click the button element\n * its native method\n * @public\n */\n Button.prototype.click = function () {\n this.element.click();\n };\n /**\n * Sets the focus to Button\n * its native method\n * @public\n */\n Button.prototype.focusIn = function () {\n this.element.focus();\n };\n __decorate([\n Property('Left')\n ], Button.prototype, \"iconPosition\", void 0);\n __decorate([\n Property('')\n ], Button.prototype, \"iconCss\", void 0);\n __decorate([\n Property(false)\n ], Button.prototype, \"disabled\", void 0);\n __decorate([\n Property(false)\n ], Button.prototype, \"isPrimary\", void 0);\n __decorate([\n Property('')\n ], Button.prototype, \"cssClass\", void 0);\n __decorate([\n Property('')\n ], Button.prototype, \"content\", void 0);\n __decorate([\n Property(false)\n ], Button.prototype, \"isToggle\", void 0);\n __decorate([\n Property()\n ], Button.prototype, \"locale\", void 0);\n __decorate([\n Property(false)\n ], Button.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Event()\n ], Button.prototype, \"created\", void 0);\n Button = __decorate([\n NotifyPropertyChanges\n ], Button);\n return Button;\n}(Component));\nexport { Button };\n"],"sourceRoot":""}