Icard/angular-clarity-master(work.../node_modules/primeng/esm2022/treetable/treetable.mjs

4111 lines
507 KiB
JavaScript

import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';
import { ChangeDetectionStrategy, Component, ContentChildren, Directive, EventEmitter, HostListener, Inject, Injectable, Input, NgModule, Output, PLATFORM_ID, ViewChild, ViewEncapsulation, booleanAttribute, numberAttribute } from '@angular/core';
import { PrimeTemplate, SharedModule } from 'primeng/api';
import { DomHandler } from 'primeng/dom';
import { ArrowDownIcon } from 'primeng/icons/arrowdown';
import { ArrowUpIcon } from 'primeng/icons/arrowup';
import { CheckIcon } from 'primeng/icons/check';
import { ChevronDownIcon } from 'primeng/icons/chevrondown';
import { ChevronRightIcon } from 'primeng/icons/chevronright';
import { MinusIcon } from 'primeng/icons/minus';
import { SortAltIcon } from 'primeng/icons/sortalt';
import { SortAmountDownIcon } from 'primeng/icons/sortamountdown';
import { SortAmountUpAltIcon } from 'primeng/icons/sortamountupalt';
import { SpinnerIcon } from 'primeng/icons/spinner';
import { PaginatorModule } from 'primeng/paginator';
import { RippleModule } from 'primeng/ripple';
import { ScrollerModule } from 'primeng/scroller';
import { ObjectUtils } from 'primeng/utils';
import { Subject } from 'rxjs';
import * as i0 from "@angular/core";
import * as i1 from "primeng/api";
import * as i2 from "@angular/common";
import * as i3 from "primeng/paginator";
import * as i4 from "primeng/scroller";
import * as i5 from "primeng/ripple";
export class TreeTableService {
sortSource = new Subject();
selectionSource = new Subject();
contextMenuSource = new Subject();
uiUpdateSource = new Subject();
totalRecordsSource = new Subject();
sortSource$ = this.sortSource.asObservable();
selectionSource$ = this.selectionSource.asObservable();
contextMenuSource$ = this.contextMenuSource.asObservable();
uiUpdateSource$ = this.uiUpdateSource.asObservable();
totalRecordsSource$ = this.totalRecordsSource.asObservable();
onSort(sortMeta) {
this.sortSource.next(sortMeta);
}
onSelectionChange() {
this.selectionSource.next(null);
}
onContextMenu(node) {
this.contextMenuSource.next(node);
}
onUIUpdate(value) {
this.uiUpdateSource.next(value);
}
onTotalRecordsChange(value) {
this.totalRecordsSource.next(value);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableService });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableService, decorators: [{
type: Injectable
}] });
/**
* TreeTable is used to display hierarchical data in tabular format.
* @group Components
*/
export class TreeTable {
document;
renderer;
el;
cd;
zone;
tableService;
filterService;
config;
/**
* An array of objects to represent dynamic columns.
* @group Props
*/
columns;
/**
* Inline style of the component.
* @group Props
*/
style;
/**
* Style class of the component.
* @group Props
*/
styleClass;
/**
* Inline style of the table.
* @group Props
*/
tableStyle;
/**
* Style class of the table.
* @group Props
*/
tableStyleClass;
/**
* Whether the cell widths scale according to their content or not.
* @group Props
*/
autoLayout;
/**
* Defines if data is loaded and interacted with in lazy manner.
* @group Props
*/
lazy = false;
/**
* Whether to call lazy loading on initialization.
* @group Props
*/
lazyLoadOnInit = true;
/**
* When specified as true, enables the pagination.
* @group Props
*/
paginator;
/**
* Number of rows to display per page.
* @group Props
*/
rows;
/**
* Index of the first row to be displayed.
* @group Props
*/
first = 0;
/**
* Number of page links to display in paginator.
* @group Props
*/
pageLinks = 5;
/**
* Array of integer/object values to display inside rows per page dropdown of paginator
* @group Props
*/
rowsPerPageOptions;
/**
* Whether to show it even there is only one page.
* @group Props
*/
alwaysShowPaginator = true;
/**
* Position of the paginator.
* @group Props
*/
paginatorPosition = 'bottom';
/**
* Custom style class for paginator
* @group Props
*/
paginatorStyleClass;
/**
* Target element to attach the paginator dropdown overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
* @group Props
*/
paginatorDropdownAppendTo;
/**
* Template of the current page report element. Available placeholders are {currentPage},{totalPages},{rows},{first},{last} and {totalRecords}
* @group Props
*/
currentPageReportTemplate = '{currentPage} of {totalPages}';
/**
* Whether to display current page report.
* @group Props
*/
showCurrentPageReport;
/**
* Whether to display a dropdown to navigate to any page.
* @group Props
*/
showJumpToPageDropdown;
/**
* When enabled, icons are displayed on paginator to go first and last page.
* @group Props
*/
showFirstLastIcon = true;
/**
* Whether to show page links.
* @group Props
*/
showPageLinks = true;
/**
* Sort order to use when an unsorted column gets sorted by user interaction.
* @group Props
*/
defaultSortOrder = 1;
/**
* Defines whether sorting works on single column or on multiple columns.
* @group Props
*/
sortMode = 'single';
/**
* When true, resets paginator to first page after sorting.
* @group Props
*/
resetPageOnSort = true;
/**
* Whether to use the default sorting or a custom one using sortFunction.
* @group Props
*/
customSort;
/**
* Specifies the selection mode, valid values are "single" and "multiple".
* @group Props
*/
selectionMode;
/**
* Selected row with a context menu.
* @group Props
*/
contextMenuSelection;
/**
* Mode of the contet menu selection.
* @group Props
*/
contextMenuSelectionMode = 'separate';
/**
* A property to uniquely identify a record in data.
* @group Props
*/
dataKey;
/**
* Defines whether metaKey is should be considered for the selection. On touch enabled devices, metaKeySelection is turned off automatically.
* @group Props
*/
metaKeySelection = false;
/**
* Algorithm to define if a row is selected, valid values are "equals" that compares by reference and "deepEquals" that compares all fields.
* @group Props
*/
compareSelectionBy = 'deepEquals';
/**
* Adds hover effect to rows without the need for selectionMode.
* @group Props
*/
rowHover;
/**
* Displays a loader to indicate data load is in progress.
* @group Props
*/
loading;
/**
* The icon to show while indicating data load is in progress.
* @group Props
*/
loadingIcon;
/**
* Whether to show the loading mask when loading property is true.
* @group Props
*/
showLoader = true;
/**
* When specifies, enables horizontal and/or vertical scrolling.
* @group Props
*/
scrollable;
/**
* Height of the scroll viewport in fixed pixels or the "flex" keyword for a dynamic size.
* @group Props
*/
scrollHeight;
/**
* Whether the data should be loaded on demand during scroll.
* @group Props
*/
virtualScroll;
/**
* Height of a row to use in calculations of virtual scrolling.
* @group Props
*/
virtualScrollItemSize;
/**
* Whether to use the scroller feature. The properties of scroller component can be used like an object in it.
* @group Props
*/
virtualScrollOptions;
/**
* The delay (in milliseconds) before triggering the virtual scroll. This determines the time gap between the user's scroll action and the actual rendering of the next set of items in the virtual scroll.
* @group Props
*/
virtualScrollDelay = 150;
/**
* Width of the frozen columns container.
* @group Props
*/
frozenWidth;
/**
* An array of objects to represent dynamic columns that are frozen.
* @group Props
*/
frozenColumns;
/**
* When enabled, columns can be resized using drag and drop.
* @group Props
*/
resizableColumns;
/**
* Defines whether the overall table width should change on column resize, valid values are "fit" and "expand".
* @group Props
*/
columnResizeMode = 'fit';
/**
* When enabled, columns can be reordered using drag and drop.
* @group Props
*/
reorderableColumns;
/**
* Local ng-template varilable of a ContextMenu.
* @group Props
*/
contextMenu;
/**
* Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity.
* @group Props
*/
rowTrackBy = (index, item) => item;
/**
* An array of FilterMetadata objects to provide external filters.
* @group Props
*/
filters = {};
/**
* An array of fields as string to use in global filtering.
* @group Props
*/
globalFilterFields;
/**
* Delay in milliseconds before filtering the data.
* @group Props
*/
filterDelay = 300;
/**
* Mode for filtering valid values are "lenient" and "strict". Default is lenient.
* @group Props
*/
filterMode = 'lenient';
/**
* Locale to use in filtering. The default locale is the host environment's current locale.
* @group Props
*/
filterLocale;
/**
* Locale to be used in paginator formatting.
* @group Props
*/
paginatorLocale;
/**
* Number of total records, defaults to length of value when not defined.
* @group Props
*/
get totalRecords() {
return this._totalRecords;
}
set totalRecords(val) {
this._totalRecords = val;
this.tableService.onTotalRecordsChange(this._totalRecords);
}
/**
* Name of the field to sort data by default.
* @group Props
*/
get sortField() {
return this._sortField;
}
set sortField(val) {
this._sortField = val;
}
/**
* Order to sort when default sorting is enabled.
* @defaultValue 1
* @group Props
*/
get sortOrder() {
return this._sortOrder;
}
set sortOrder(val) {
this._sortOrder = val;
}
/**
* An array of SortMeta objects to sort the data by default in multiple sort mode.
* @defaultValue null
* @group Props
*/
get multiSortMeta() {
return this._multiSortMeta;
}
set multiSortMeta(val) {
this._multiSortMeta = val;
}
/**
* Selected row in single mode or an array of values in multiple mode.
* @defaultValue null
* @group Props
*/
get selection() {
return this._selection;
}
set selection(val) {
this._selection = val;
}
/**
* An array of objects to display.
* @defaultValue null
* @group Props
*/
get value() {
return this._value;
}
set value(val) {
this._value = val;
}
/**
* Indicates the height of rows to be scrolled.
* @defaultValue 28
* @group Props
* @deprecated use virtualScrollItemSize property instead.
*/
get virtualRowHeight() {
return this._virtualRowHeight;
}
set virtualRowHeight(val) {
this._virtualRowHeight = val;
console.warn('The virtualRowHeight property is deprecated, use virtualScrollItemSize property instead.');
}
/**
* A map of keys to control the selection state.
* @group Props
*/
get selectionKeys() {
return this._selectionKeys;
}
set selectionKeys(value) {
this._selectionKeys = value;
this.selectionKeysChange.emit(this._selectionKeys);
}
/**
* Callback to invoke on selected node change.
* @param {TreeTableNode} object - Node instance.
* @group Emits
*/
selectionChange = new EventEmitter();
/**
* Callback to invoke on context menu selection change.
* @param {TreeTableNode} object - Node instance.
* @group Emits
*/
contextMenuSelectionChange = new EventEmitter();
/**
* Callback to invoke when data is filtered.
* @param {TreeTableFilterEvent} event - Custom filter event.
* @group Emits
*/
onFilter = new EventEmitter();
/**
* Callback to invoke when a node is expanded.
* @param {TreeTableNodeExpandEvent} event - Node expand event.
* @group Emits
*/
onNodeExpand = new EventEmitter();
/**
* Callback to invoke when a node is collapsed.
* @param {TreeTableNodeCollapseEvent} event - Node collapse event.
* @group Emits
*/
onNodeCollapse = new EventEmitter();
/**
* Callback to invoke when pagination occurs.
* @param {TreeTablePaginatorState} object - Paginator state.
* @group Emits
*/
onPage = new EventEmitter();
/**
* Callback to invoke when a column gets sorted.
* @param {Object} Object - Sort data.
* @group Emits
*/
onSort = new EventEmitter();
/**
* Callback to invoke when paging, sorting or filtering happens in lazy mode.
* @param {TreeTableLazyLoadEvent} event - Custom lazy load event.
* @group Emits
*/
onLazyLoad = new EventEmitter();
/**
* An event emitter to invoke on custom sorting, refer to sorting section for details.
* @param {TreeTableSortEvent} event - Custom sort event.
* @group Emits
*/
sortFunction = new EventEmitter();
/**
* Callback to invoke when a column is resized.
* @param {TreeTableColResizeEvent} event - Custom column resize event.
* @group Emits
*/
onColResize = new EventEmitter();
/**
* Callback to invoke when a column is reordered.
* @param {TreeTableColumnReorderEvent} event - Custom column reorder.
* @group Emits
*/
onColReorder = new EventEmitter();
/**
* Callback to invoke when a node is selected.
* @param {TreeTableNode} object - Node instance.
* @group Emits
*/
onNodeSelect = new EventEmitter();
/**
* Callback to invoke when a node is unselected.
* @param {TreeTableNodeUnSelectEvent} event - Custom node unselect event.
* @group Emits
*/
onNodeUnselect = new EventEmitter();
/**
* Callback to invoke when a node is selected with right click.
* @param {TreeTableContextMenuSelectEvent} event - Custom context menu select event.
* @group Emits
*/
onContextMenuSelect = new EventEmitter();
/**
* Callback to invoke when state of header checkbox changes.
* @param {TreeTableHeaderCheckboxToggleEvent} event - Custom checkbox toggle event.
* @group Emits
*/
onHeaderCheckboxToggle = new EventEmitter();
/**
* Callback to invoke when a cell switches to edit mode.
* @param {TreeTableEditEvent} event - Custom edit event.
* @group Emits
*/
onEditInit = new EventEmitter();
/**
* Callback to invoke when cell edit is completed.
* @param {TreeTableEditEvent} event - Custom edit event.
* @group Emits
*/
onEditComplete = new EventEmitter();
/**
* Callback to invoke when cell edit is cancelled with escape key.
* @param {TreeTableEditEvent} event - Custom edit event.
* @group Emits
*/
onEditCancel = new EventEmitter();
/**
* Callback to invoke when selectionKeys are changed.
* @param {Object} object - updated value of the selectionKeys.
* @group Emits
*/
selectionKeysChange = new EventEmitter();
containerViewChild;
resizeHelperViewChild;
reorderIndicatorUpViewChild;
reorderIndicatorDownViewChild;
tableViewChild;
scrollableViewChild;
scrollableFrozenViewChild;
templates;
_value = [];
_virtualRowHeight = 28;
_selectionKeys;
serializedValue;
_totalRecords = 0;
_multiSortMeta;
_sortField;
_sortOrder = 1;
filteredNodes;
filterTimeout;
colGroupTemplate;
captionTemplate;
headerTemplate;
bodyTemplate;
footerTemplate;
summaryTemplate;
emptyMessageTemplate;
paginatorLeftTemplate;
paginatorRightTemplate;
paginatorDropdownItemTemplate;
frozenHeaderTemplate;
frozenBodyTemplate;
frozenFooterTemplate;
frozenColGroupTemplate;
loadingIconTemplate;
reorderIndicatorUpIconTemplate;
reorderIndicatorDownIconTemplate;
sortIconTemplate;
checkboxIconTemplate;
headerCheckboxIconTemplate;
togglerIconTemplate;
paginatorFirstPageLinkIconTemplate;
paginatorLastPageLinkIconTemplate;
paginatorPreviousPageLinkIconTemplate;
paginatorNextPageLinkIconTemplate;
lastResizerHelperX;
reorderIconWidth;
reorderIconHeight;
draggedColumn;
dropPosition;
preventSelectionSetterPropagation;
_selection;
selectedKeys = {};
rowTouched;
editingCell;
editingCellData;
editingCellField;
editingCellClick;
documentEditListener;
initialized;
toggleRowIndex;
ngOnInit() {
if (this.lazy && this.lazyLoadOnInit && !this.virtualScroll) {
this.onLazyLoad.emit(this.createLazyLoadMetadata());
}
this.initialized = true;
}
ngAfterContentInit() {
this.templates.forEach((item) => {
switch (item.getType()) {
case 'caption':
this.captionTemplate = item.template;
break;
case 'header':
this.headerTemplate = item.template;
break;
case 'body':
this.bodyTemplate = item.template;
break;
case 'footer':
this.footerTemplate = item.template;
break;
case 'summary':
this.summaryTemplate = item.template;
break;
case 'colgroup':
this.colGroupTemplate = item.template;
break;
case 'emptymessage':
this.emptyMessageTemplate = item.template;
break;
case 'paginatorleft':
this.paginatorLeftTemplate = item.template;
break;
case 'paginatorright':
this.paginatorRightTemplate = item.template;
break;
case 'paginatordropdownitem':
this.paginatorDropdownItemTemplate = item.template;
break;
case 'frozenheader':
this.frozenHeaderTemplate = item.template;
break;
case 'frozenbody':
this.frozenBodyTemplate = item.template;
break;
case 'frozenfooter':
this.frozenFooterTemplate = item.template;
break;
case 'frozencolgroup':
this.frozenColGroupTemplate = item.template;
break;
case 'loadingicon':
this.loadingIconTemplate = item.template;
break;
case 'reorderindicatorupicon':
this.reorderIndicatorUpIconTemplate = item.template;
break;
case 'reorderindicatordownicon':
this.reorderIndicatorDownIconTemplate = item.template;
break;
case 'sorticon':
this.sortIconTemplate = item.template;
break;
case 'checkboxicon':
this.checkboxIconTemplate = item.template;
break;
case 'headercheckboxicon':
this.headerCheckboxIconTemplate = item.template;
break;
case 'togglericon':
this.togglerIconTemplate = item.template;
break;
case 'paginatorfirstpagelinkicon':
this.paginatorFirstPageLinkIconTemplate = item.template;
break;
case 'paginatorlastpagelinkicon':
this.paginatorLastPageLinkIconTemplate = item.template;
break;
case 'paginatorpreviouspagelinkicon':
this.paginatorPreviousPageLinkIconTemplate = item.template;
break;
case 'paginatornextpagelinkicon':
this.paginatorNextPageLinkIconTemplate = item.template;
break;
}
});
}
constructor(document, renderer, el, cd, zone, tableService, filterService, config) {
this.document = document;
this.renderer = renderer;
this.el = el;
this.cd = cd;
this.zone = zone;
this.tableService = tableService;
this.filterService = filterService;
this.config = config;
}
ngOnChanges(simpleChange) {
if (simpleChange.value) {
this._value = simpleChange.value.currentValue;
if (!this.lazy) {
this.totalRecords = this._value ? this._value.length : 0;
if (this.sortMode == 'single' && this.sortField)
this.sortSingle();
else if (this.sortMode == 'multiple' && this.multiSortMeta)
this.sortMultiple();
else if (this.hasFilter())
//sort already filters
this._filter();
}
this.updateSerializedValue();
this.tableService.onUIUpdate(this.value);
}
if (simpleChange.sortField) {
this._sortField = simpleChange.sortField.currentValue;
//avoid triggering lazy load prior to lazy initialization at onInit
if (!this.lazy || this.initialized) {
if (this.sortMode === 'single') {
this.sortSingle();
}
}
}
if (simpleChange.sortOrder) {
this._sortOrder = simpleChange.sortOrder.currentValue;
//avoid triggering lazy load prior to lazy initialization at onInit
if (!this.lazy || this.initialized) {
if (this.sortMode === 'single') {
this.sortSingle();
}
}
}
if (simpleChange.multiSortMeta) {
this._multiSortMeta = simpleChange.multiSortMeta.currentValue;
if (this.sortMode === 'multiple') {
this.sortMultiple();
}
}
if (simpleChange.selection) {
this._selection = simpleChange.selection.currentValue;
if (!this.preventSelectionSetterPropagation) {
this.updateselectedKeys();
this.tableService.onSelectionChange();
}
this.preventSelectionSetterPropagation = false;
}
}
updateSerializedValue() {
this.serializedValue = [];
if (this.paginator)
this.serializePageNodes();
else
this.serializeNodes(null, this.filteredNodes || this.value, 0, true);
}
serializeNodes(parent, nodes, level, visible) {
if (nodes && nodes.length) {
for (let node of nodes) {
node.parent = parent;
const rowNode = {
node: node,
parent: parent,
level: level,
visible: visible && (parent ? parent.expanded : true)
};
this.serializedValue.push(rowNode);
if (rowNode.visible && node.expanded) {
this.serializeNodes(node, node.children, level + 1, rowNode.visible);
}
}
}
}
serializePageNodes() {
let data = this.filteredNodes || this.value;
this.serializedValue = [];
if (data && data.length) {
const first = this.lazy ? 0 : this.first;
for (let i = first; i < first + this.rows; i++) {
let node = data[i];
if (node) {
this.serializedValue.push({
node: node,
parent: null,
level: 0,
visible: true
});
this.serializeNodes(node, node.children, 1, true);
}
}
}
}
updateselectedKeys() {
if (this.dataKey && this._selection) {
this.selectedKeys = {};
if (Array.isArray(this._selection)) {
for (let node of this._selection) {
this.selectedKeys[String(ObjectUtils.resolveFieldData(node.data, this.dataKey))] = 1;
}
}
else {
this.selectedKeys[String(ObjectUtils.resolveFieldData(this._selection.data, this.dataKey))] = 1;
}
}
}
onPageChange(event) {
this.first = event.first;
this.rows = event.rows;
if (this.lazy)
this.onLazyLoad.emit(this.createLazyLoadMetadata());
else
this.serializePageNodes();
this.onPage.emit({
first: this.first,
rows: this.rows
});
this.tableService.onUIUpdate(this.value);
if (this.scrollable) {
this.resetScrollTop();
}
}
sort(event) {
let originalEvent = event.originalEvent;
if (this.sortMode === 'single') {
this._sortOrder = this.sortField === event.field ? this.sortOrder * -1 : this.defaultSortOrder;
this._sortField = event.field;
this.sortSingle();
if (this.resetPageOnSort && this.scrollable) {
this.resetScrollTop();
}
}
if (this.sortMode === 'multiple') {
let metaKey = originalEvent.metaKey || originalEvent.ctrlKey;
let sortMeta = this.getSortMeta(event.field);
if (sortMeta) {
if (!metaKey) {
this._multiSortMeta = [{ field: event.field, order: sortMeta.order * -1 }];
if (this.resetPageOnSort && this.scrollable) {
this.resetScrollTop();
}
}
else {
sortMeta.order = sortMeta.order * -1;
}
}
else {
if (!metaKey || !this.multiSortMeta) {
this._multiSortMeta = [];
if (this.resetPageOnSort && this.scrollable) {
this.resetScrollTop();
}
}
this.multiSortMeta.push({ field: event.field, order: this.defaultSortOrder });
}
this.sortMultiple();
}
}
sortSingle() {
if (this.sortField && this.sortOrder) {
if (this.lazy) {
this.onLazyLoad.emit(this.createLazyLoadMetadata());
}
else if (this.value) {
this.sortNodes(this.value);
if (this.hasFilter()) {
this._filter();
}
}
let sortMeta = {
field: this.sortField,
order: this.sortOrder
};
this.onSort.emit(sortMeta);
this.tableService.onSort(sortMeta);
this.updateSerializedValue();
}
}
sortNodes(nodes) {
if (!nodes || nodes.length === 0) {
return;
}
if (this.customSort) {
this.sortFunction.emit({
data: nodes,
mode: this.sortMode,
field: this.sortField,
order: this.sortOrder
});
}
else {
nodes.sort((node1, node2) => {
let value1 = ObjectUtils.resolveFieldData(node1.data, this.sortField);
let value2 = ObjectUtils.resolveFieldData(node2.data, this.sortField);
let result = null;
if (value1 == null && value2 != null)
result = -1;
else if (value1 != null && value2 == null)
result = 1;
else if (value1 == null && value2 == null)
result = 0;
else if (typeof value1 === 'string' && typeof value2 === 'string')
result = value1.localeCompare(value2, undefined, { numeric: true });
else
result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
return this.sortOrder * result;
});
}
for (let node of nodes) {
this.sortNodes(node.children);
}
}
sortMultiple() {
if (this.multiSortMeta) {
if (this.lazy) {
this.onLazyLoad.emit(this.createLazyLoadMetadata());
}
else if (this.value) {
this.sortMultipleNodes(this.value);
if (this.hasFilter()) {
this._filter();
}
}
this.onSort.emit({
multisortmeta: this.multiSortMeta
});
this.updateSerializedValue();
this.tableService.onSort(this.multiSortMeta);
}
}
sortMultipleNodes(nodes) {
if (!nodes || nodes.length === 0) {
return;
}
if (this.customSort) {
this.sortFunction.emit({
data: this.value,
mode: this.sortMode,
multiSortMeta: this.multiSortMeta
});
}
else {
nodes.sort((node1, node2) => {
return this.multisortField(node1, node2, this.multiSortMeta, 0);
});
}
for (let node of nodes) {
this.sortMultipleNodes(node.children);
}
}
multisortField(node1, node2, multiSortMeta, index) {
if (ObjectUtils.isEmpty(this.multiSortMeta) || ObjectUtils.isEmpty(multiSortMeta[index])) {
return 0;
}
let value1 = ObjectUtils.resolveFieldData(node1.data, multiSortMeta[index].field);
let value2 = ObjectUtils.resolveFieldData(node2.data, multiSortMeta[index].field);
let result = null;
if (value1 == null && value2 != null)
result = -1;
else if (value1 != null && value2 == null)
result = 1;
else if (value1 == null && value2 == null)
result = 0;
if (typeof value1 == 'string' || value1 instanceof String) {
if (value1.localeCompare && value1 != value2) {
return multiSortMeta[index].order * value1.localeCompare(value2, undefined, { numeric: true });
}
}
else {
result = value1 < value2 ? -1 : 1;
}
if (value1 == value2) {
return multiSortMeta.length - 1 > index ? this.multisortField(node1, node2, multiSortMeta, index + 1) : 0;
}
return multiSortMeta[index].order * result;
}
getSortMeta(field) {
if (this.multiSortMeta && this.multiSortMeta.length) {
for (let i = 0; i < this.multiSortMeta.length; i++) {
if (this.multiSortMeta[i].field === field) {
return this.multiSortMeta[i];
}
}
}
return null;
}
isSorted(field) {
if (this.sortMode === 'single') {
return this.sortField && this.sortField === field;
}
else if (this.sortMode === 'multiple') {
let sorted = false;
if (this.multiSortMeta) {
for (let i = 0; i < this.multiSortMeta.length; i++) {
if (this.multiSortMeta[i].field == field) {
sorted = true;
break;
}
}
}
return sorted;
}
}
createLazyLoadMetadata() {
return {
first: this.first,
rows: this.rows,
sortField: this.sortField,
sortOrder: this.sortOrder,
filters: this.filters,
globalFilter: this.filters && this.filters['global'] ? this.filters['global'].value : null,
multiSortMeta: this.multiSortMeta,
forceUpdate: () => this.cd.detectChanges()
};
}
onLazyItemLoad(event) {
this.onLazyLoad.emit({
...this.createLazyLoadMetadata(),
...event,
rows: event.last - event.first
});
}
/**
* Resets scroll to top.
* @group Method
*/
resetScrollTop() {
if (this.virtualScroll)
this.scrollToVirtualIndex(0);
else
this.scrollTo({ top: 0 });
}
/**
* Scrolls to given index when using virtual scroll.
* @param {number} index - index of the element.
* @group Method
*/
scrollToVirtualIndex(index) {
if (this.scrollableViewChild) {
this.scrollableViewChild.scrollToVirtualIndex(index);
}
if (this.scrollableFrozenViewChild) {
this.scrollableViewChild.scrollToVirtualIndex(index);
}
}
/**
* Scrolls to given index.
* @param {ScrollToOptions} options - Scroll options.
* @group Method
*/
scrollTo(options) {
if (this.scrollableViewChild) {
this.scrollableViewChild.scrollTo(options);
}
if (this.scrollableFrozenViewChild) {
this.scrollableViewChild.scrollTo(options);
}
}
isEmpty() {
let data = this.filteredNodes || this.value;
return data == null || data.length == 0;
}
getBlockableElement() {
return this.el.nativeElement.children[0];
}
onColumnResizeBegin(event) {
let containerLeft = DomHandler.getOffset(this.containerViewChild?.nativeElement).left;
this.lastResizerHelperX = event.pageX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft;
event.preventDefault();
}
onColumnResize(event) {
let containerLeft = DomHandler.getOffset(this.containerViewChild?.nativeElement).left;
DomHandler.addClass(this.containerViewChild?.nativeElement, 'p-unselectable-text');
this.resizeHelperViewChild.nativeElement.style.height = this.containerViewChild?.nativeElement.offsetHeight + 'px';
this.resizeHelperViewChild.nativeElement.style.top = 0 + 'px';
this.resizeHelperViewChild.nativeElement.style.left = event.pageX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft + 'px';
this.resizeHelperViewChild.nativeElement.style.display = 'block';
}
onColumnResizeEnd(event, column) {
let delta = this.resizeHelperViewChild.nativeElement.offsetLeft - this.lastResizerHelperX;
let columnWidth = column.offsetWidth;
let newColumnWidth = columnWidth + delta;
let minWidth = column.style.minWidth || 15;
if (columnWidth + delta > parseInt(minWidth)) {
if (this.columnResizeMode === 'fit') {
let nextColumn = column.nextElementSibling;
while (!nextColumn.offsetParent) {
nextColumn = nextColumn.nextElementSibling;
}
if (nextColumn) {
let nextColumnWidth = nextColumn.offsetWidth - delta;
let nextColumnMinWidth = nextColumn.style.minWidth || 15;
if (newColumnWidth > 15 && nextColumnWidth > parseInt(nextColumnMinWidth)) {
if (this.scrollable) {
let scrollableView = this.findParentScrollableView(column);
let scrollableBodyTable = DomHandler.findSingle(scrollableView, '.p-treetable-scrollable-body table') || DomHandler.findSingle(scrollableView, '.p-scroller-viewport table');
let scrollableHeaderTable = DomHandler.findSingle(scrollableView, 'table.p-treetable-scrollable-header-table');
let scrollableFooterTable = DomHandler.findSingle(scrollableView, 'table.p-treetable-scrollable-footer-table');
let resizeColumnIndex = DomHandler.index(column);
this.resizeColGroup(scrollableHeaderTable, resizeColumnIndex, newColumnWidth, nextColumnWidth);
this.resizeColGroup(scrollableBodyTable, resizeColumnIndex, newColumnWidth, nextColumnWidth);
this.resizeColGroup(scrollableFooterTable, resizeColumnIndex, newColumnWidth, nextColumnWidth);
}
else {
column.style.width = newColumnWidth + 'px';
if (nextColumn) {
nextColumn.style.width = nextColumnWidth + 'px';
}
}
}
}
}
else if (this.columnResizeMode === 'expand') {
if (this.scrollable) {
let scrollableView = this.findParentScrollableView(column);
let scrollableBody = DomHandler.findSingle(scrollableView, '.p-treetable-scrollable-body') || DomHandler.findSingle(scrollableView, '.p-scroller-viewport');
let scrollableHeader = DomHandler.findSingle(scrollableView, '.p-treetable-scrollable-header');
let scrollableFooter = DomHandler.findSingle(scrollableView, '.p-treetable-scrollable-footer');
let scrollableBodyTable = DomHandler.findSingle(scrollableView, '.p-treetable-scrollable-body table') || DomHandler.findSingle(scrollableView, '.p-scroller-viewport table');
let scrollableHeaderTable = DomHandler.findSingle(scrollableView, 'table.p-treetable-scrollable-header-table');
let scrollableFooterTable = DomHandler.findSingle(scrollableView, 'table.p-treetable-scrollable-footer-table');
scrollableBodyTable.style.width = scrollableBodyTable.offsetWidth + delta + 'px';
scrollableHeaderTable.style.width = scrollableHeaderTable.offsetWidth + delta + 'px';
if (scrollableFooterTable) {
scrollableFooterTable.style.width = scrollableFooterTable.offsetWidth + delta + 'px';
}
let resizeColumnIndex = DomHandler.index(column);
const scrollableBodyTableWidth = column ? scrollableBodyTable.offsetWidth + delta : newColumnWidth;
const scrollableHeaderTableWidth = column ? scrollableHeaderTable.offsetWidth + delta : newColumnWidth;
const isContainerInViewport = this.containerViewChild?.nativeElement.offsetWidth >= scrollableBodyTableWidth;
let setWidth = (container, table, width, isContainerInViewport) => {
if (container && table) {
container.style.width = isContainerInViewport ? width + DomHandler.calculateScrollbarWidth(scrollableBody) + 'px' : 'auto';
table.style.width = width + 'px';
}
};
setWidth(scrollableBody, scrollableBodyTable, scrollableBodyTableWidth, isContainerInViewport);
setWidth(scrollableHeader, scrollableHeaderTable, scrollableHeaderTableWidth, isContainerInViewport);
setWidth(scrollableFooter, scrollableFooterTable, scrollableHeaderTableWidth, isContainerInViewport);
this.resizeColGroup(scrollableHeaderTable, resizeColumnIndex, newColumnWidth, null);
this.resizeColGroup(scrollableBodyTable, resizeColumnIndex, newColumnWidth, null);
this.resizeColGroup(scrollableFooterTable, resizeColumnIndex, newColumnWidth, null);
}
else {
this.tableViewChild.nativeElement.style.width = this.tableViewChild?.nativeElement.offsetWidth + delta + 'px';
column.style.width = newColumnWidth + 'px';
let containerWidth = this.tableViewChild?.nativeElement.style.width;
this.containerViewChild.nativeElement.style.width = containerWidth + 'px';
}
}
this.onColResize.emit({
element: column,
delta: delta
});
}
this.resizeHelperViewChild.nativeElement.style.display = 'none';
DomHandler.removeClass(this.containerViewChild?.nativeElement, 'p-unselectable-text');
}
findParentScrollableView(column) {
if (column) {
let parent = column.parentElement;
while (parent && !DomHandler.hasClass(parent, 'p-treetable-scrollable-view')) {
parent = parent.parentElement;
}
return parent;
}
else {
return null;
}
}
resizeColGroup(table, resizeColumnIndex, newColumnWidth, nextColumnWidth) {
if (table) {
let colGroup = table.children[0].nodeName === 'COLGROUP' ? table.children[0] : null;
if (colGroup) {
let col = colGroup.children[resizeColumnIndex];
let nextCol = col.nextElementSibling;
col.style.width = newColumnWidth + 'px';
if (nextCol && nextColumnWidth) {
nextCol.style.width = nextColumnWidth + 'px';
}
}
else {
throw 'Scrollable tables require a colgroup to support resizable columns';
}
}
}
onColumnDragStart(event, columnElement) {
this.reorderIconWidth = DomHandler.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement);
this.reorderIconHeight = DomHandler.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement);
this.draggedColumn = columnElement;
event.dataTransfer.setData('text', 'b'); // For firefox
}
onColumnDragEnter(event, dropHeader) {
if (this.reorderableColumns && this.draggedColumn && dropHeader) {
event.preventDefault();
let containerOffset = DomHandler.getOffset(this.containerViewChild?.nativeElement);
let dropHeaderOffset = DomHandler.getOffset(dropHeader);
if (this.draggedColumn != dropHeader) {
let targetLeft = dropHeaderOffset.left - containerOffset.left;
let targetTop = containerOffset.top - dropHeaderOffset.top;
let columnCenter = dropHeaderOffset.left + dropHeader.offsetWidth / 2;
this.reorderIndicatorUpViewChild.nativeElement.style.top = dropHeaderOffset.top - containerOffset.top - (this.reorderIconHeight - 1) + 'px';
this.reorderIndicatorDownViewChild.nativeElement.style.top = dropHeaderOffset.top - containerOffset.top + dropHeader.offsetHeight + 'px';
if (event.pageX > columnCenter) {
this.reorderIndicatorUpViewChild.nativeElement.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(this.reorderIconWidth / 2) + 'px';
this.reorderIndicatorDownViewChild.nativeElement.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(this.reorderIconWidth / 2) + 'px';
this.dropPosition = 1;
}
else {
this.reorderIndicatorUpViewChild.nativeElement.style.left = targetLeft - Math.ceil(this.reorderIconWidth / 2) + 'px';
this.reorderIndicatorDownViewChild.nativeElement.style.left = targetLeft - Math.ceil(this.reorderIconWidth / 2) + 'px';
this.dropPosition = -1;
}
this.reorderIndicatorUpViewChild.nativeElement.style.display = 'block';
this.reorderIndicatorDownViewChild.nativeElement.style.display = 'block';
}
else {
event.dataTransfer.dropEffect = 'none';
}
}
}
onColumnDragLeave(event) {
if (this.reorderableColumns && this.draggedColumn) {
event.preventDefault();
this.reorderIndicatorUpViewChild.nativeElement.style.display = 'none';
this.reorderIndicatorDownViewChild.nativeElement.style.display = 'none';
}
}
onColumnDrop(event, dropColumn) {
event.preventDefault();
if (this.draggedColumn) {
let dragIndex = DomHandler.indexWithinGroup(this.draggedColumn, 'ttreorderablecolumn');
let dropIndex = DomHandler.indexWithinGroup(dropColumn, 'ttreorderablecolumn');
let allowDrop = dragIndex != dropIndex;
if (allowDrop && ((dropIndex - dragIndex == 1 && this.dropPosition === -1) || (dragIndex - dropIndex == 1 && this.dropPosition === 1))) {
allowDrop = false;
}
if (allowDrop && dropIndex < dragIndex && this.dropPosition === 1) {
dropIndex = dropIndex + 1;
}
if (allowDrop && dropIndex > dragIndex && this.dropPosition === -1) {
dropIndex = dropIndex - 1;
}
if (allowDrop) {
ObjectUtils.reorderArray(this.columns, dragIndex, dropIndex);
this.onColReorder.emit({
dragIndex: dragIndex,
dropIndex: dropIndex,
columns: this.columns
});
}
this.reorderIndicatorUpViewChild.nativeElement.style.display = 'none';
this.reorderIndicatorDownViewChild.nativeElement.style.display = 'none';
this.draggedColumn.draggable = false;
this.draggedColumn = null;
this.dropPosition = null;
}
}
handleRowClick(event) {
let targetNode = event.originalEvent.target.nodeName;
if (targetNode == 'INPUT' || targetNode == 'BUTTON' || targetNode == 'A' || DomHandler.hasClass(event.originalEvent.target, 'p-clickable')) {
return;
}
if (this.selectionMode) {
this.preventSelectionSetterPropagation = true;
let rowNode = event.rowNode;
let selected = this.isSelected(rowNode.node);
let metaSelection = this.rowTouched ? false : this.metaKeySelection;
let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(rowNode.node.data, this.dataKey)) : null;
if (metaSelection) {
let keyboardEvent = event.originalEvent;
let metaKey = keyboardEvent.metaKey || keyboardEvent.ctrlKey;
if (selected && metaKey) {
if (this.isSingleSelectionMode()) {
this._selection = null;
this.selectedKeys = {};
this.selectionChange.emit(null);
}
else {
let selectionIndex = this.findIndexInSelection(rowNode.node);
this._selection = this.selection.filter((val, i) => i != selectionIndex);
this.selectionChange.emit(this.selection);
if (dataKeyValue) {
delete this.selectedKeys[dataKeyValue];
}
}
this.onNodeUnselect.emit({ originalEvent: event.originalEvent, node: rowNode.node, type: 'row' });
}
else {
if (this.isSingleSelectionMode()) {
this._selection = rowNode.node;
this.selectionChange.emit(rowNode.node);
if (dataKeyValue) {
this.selectedKeys = {};
this.selectedKeys[dataKeyValue] = 1;
}
}
else if (this.isMultipleSelectionMode()) {
if (metaKey) {
this._selection = this.selection || [];
}
else {
this._selection = [];
this.selectedKeys = {};
}
this._selection = [...this.selection, rowNode.node];
this.selectionChange.emit(this.selection);
if (dataKeyValue) {
this.selectedKeys[dataKeyValue] = 1;
}
}
this.onNodeSelect.emit({ originalEvent: event.originalEvent, node: rowNode.node, type: 'row', index: event.rowIndex });
}
}
else {
if (this.selectionMode === 'single') {
if (selected) {
this._selection = null;
this.selectedKeys = {};
this.selectionChange.emit(this.selection);
this.onNodeUnselect.emit({ originalEvent: event.originalEvent, node: rowNode.node, type: 'row' });
}
else {
this._selection = rowNode.node;
this.selectionChange.emit(this.selection);
this.onNodeSelect.emit({ originalEvent: event.originalEvent, node: rowNode.node, type: 'row', index: event.rowIndex });
if (dataKeyValue) {
this.selectedKeys = {};
this.selectedKeys[dataKeyValue] = 1;
}
}
}
else if (this.selectionMode === 'multiple') {
if (selected) {
let selectionIndex = this.findIndexInSelection(rowNode.node);
this._selection = this.selection.filter((val, i) => i != selectionIndex);
this.selectionChange.emit(this.selection);
this.onNodeUnselect.emit({ originalEvent: event.originalEvent, node: rowNode.node, type: 'row' });
if (dataKeyValue) {
delete this.selectedKeys[dataKeyValue];
}
}
else {
this._selection = this.selection ? [...this.selection, rowNode.node] : [rowNode.node];
this.selectionChange.emit(this.selection);
this.onNodeSelect.emit({ originalEvent: event.originalEvent, node: rowNode.node, type: 'row', index: event.rowIndex });
if (dataKeyValue) {
this.selectedKeys[dataKeyValue] = 1;
}
}
}
}
this.tableService.onSelectionChange();
}
this.rowTouched = false;
}
handleRowTouchEnd(event) {
this.rowTouched = true;
}
handleRowRightClick(event) {
if (this.contextMenu) {
const node = event.rowNode.node;
if (this.contextMenuSelectionMode === 'separate') {
this.contextMenuSelection = node;
this.contextMenuSelectionChange.emit(node);
this.onContextMenuSelect.emit({ originalEvent: event.originalEvent, node: node });
this.contextMenu.show(event.originalEvent);
this.tableService.onContextMenu(node);
}
else if (this.contextMenuSelectionMode === 'joint') {
this.preventSelectionSetterPropagation = true;
let selected = this.isSelected(node);
let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(node.data, this.dataKey)) : null;
if (!selected) {
if (this.isSingleSelectionMode()) {
this.selection = node;
this.selectionChange.emit(node);
}
else if (this.isMultipleSelectionMode()) {
this.selection = [node];
this.selectionChange.emit(this.selection);
}
if (dataKeyValue) {
this.selectedKeys[dataKeyValue] = 1;
}
}
this.contextMenu.show(event.originalEvent);
this.onContextMenuSelect.emit({ originalEvent: event.originalEvent, node: node });
}
}
}
toggleNodeWithCheckbox(event) {
// legacy selection support, will be removed in v18
this.selection = this.selection || [];
this.preventSelectionSetterPropagation = true;
let node = event.rowNode.node;
let selected = this.isSelected(node);
if (selected) {
this.propagateSelectionDown(node, false);
if (event.rowNode.parent) {
this.propagateSelectionUp(node.parent, false);
}
this.selectionChange.emit(this.selection);
this.onNodeUnselect.emit({ originalEvent: event, node: node });
}
else {
this.propagateSelectionDown(node, true);
if (event.rowNode.parent) {
this.propagateSelectionUp(node.parent, true);
}
this.selectionChange.emit(this.selection);
this.onNodeSelect.emit({ originalEvent: event, node: node });
}
this.tableService.onSelectionChange();
}
toggleNodesWithCheckbox(event, check) {
// legacy selection support, will be removed in v18
let data = this.filteredNodes || this.value;
this._selection = check && data ? data.slice() : [];
this.toggleAll(check);
if (!check) {
this._selection = [];
this.selectedKeys = {};
}
this.preventSelectionSetterPropagation = true;
this.selectionChange.emit(this._selection);
this.tableService.onSelectionChange();
this.onHeaderCheckboxToggle.emit({ originalEvent: event, checked: check });
}
toggleAll(checked) {
let data = this.filteredNodes || this.value;
if (!this.selectionKeys) {
if (data && data.length) {
for (let node of data) {
this.propagateSelectionDown(node, checked);
}
}
}
else {
// legacy selection support, will be removed in v18
if (data && data.length) {
for (let node of data) {
this.propagateDown(node, checked);
}
this.selectionKeysChange.emit(this.selectionKeys);
}
}
}
propagateSelectionUp(node, select) {
// legacy selection support, will be removed in v18
if (node.children && node.children.length) {
let selectedChildCount = 0;
let childPartialSelected = false;
let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(node.data, this.dataKey)) : null;
for (let child of node.children) {
if (this.isSelected(child))
selectedChildCount++;
else if (child.partialSelected)
childPartialSelected = true;
}
if (select && selectedChildCount == node.children.length) {
this._selection = [...(this.selection || []), node];
node.partialSelected = false;
if (dataKeyValue) {
this.selectedKeys[dataKeyValue] = 1;
}
}
else {
if (!select) {
let index = this.findIndexInSelection(node);
if (index >= 0) {
this._selection = this.selection.filter((val, i) => i != index);
if (dataKeyValue) {
delete this.selectedKeys[dataKeyValue];
}
}
}
if (childPartialSelected || (selectedChildCount > 0 && selectedChildCount != node.children.length))
node.partialSelected = true;
else
node.partialSelected = false;
}
}
let parent = node.parent;
node.checked = select;
if (parent) {
this.propagateSelectionUp(parent, select);
}
}
propagateSelectionDown(node, select) {
// legacy selection support, will be removed in v18
let index = this.findIndexInSelection(node);
let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(node.data, this.dataKey)) : null;
if (select && index == -1) {
this._selection = [...(this.selection || []), node];
if (dataKeyValue) {
this.selectedKeys[dataKeyValue] = 1;
}
}
else if (!select && index > -1) {
this._selection = this.selection.filter((val, i) => i != index);
if (dataKeyValue) {
delete this.selectedKeys[dataKeyValue];
}
}
node.partialSelected = false;
node.checked = select;
if (node.children && node.children.length) {
for (let child of node.children) {
this.propagateSelectionDown(child, select);
}
}
}
isSelected(node) {
// legacy selection support, will be removed in v18
if (node && this.selection) {
if (this.dataKey) {
if (node.hasOwnProperty('checked')) {
return node['checked'];
}
else {
return this.selectedKeys[ObjectUtils.resolveFieldData(node.data, this.dataKey)] !== undefined;
}
}
else {
if (Array.isArray(this.selection))
return this.findIndexInSelection(node) > -1;
else
return this.equals(node, this.selection);
}
}
return false;
}
isNodeSelected(node) {
return this.selectionMode && this.selectionKeys ? this.selectionKeys[this.nodeKey(node)]?.checked === true : false;
}
isNodePartialSelected(node) {
return this.selectionMode && this.selectionKeys ? this.selectionKeys[this.nodeKey(node)]?.partialChecked === true : false;
}
nodeKey(node) {
return ObjectUtils.resolveFieldData(node, this.dataKey) || ObjectUtils.resolveFieldData(node?.data, this.dataKey);
}
toggleCheckbox(event) {
let { rowNode, check, originalEvent } = event;
let node = rowNode.node;
if (this.selectionKeys) {
this.propagateDown(node, check);
if (node.parent) {
this.propagateUp(node.parent, check);
}
this.selectionKeysChange.emit(this.selectionKeys);
}
else {
this.toggleNodeWithCheckbox({ originalEvent, rowNode });
}
this.tableService.onSelectionChange();
}
propagateDown(node, check) {
if (check) {
this.selectionKeys[this.nodeKey(node)] = { checked: true, partialChecked: false };
}
else {
delete this.selectionKeys[this.nodeKey(node)];
}
if (node.children && node.children.length) {
for (let child of node.children) {
this.propagateDown(child, check);
}
}
}
propagateUp(node, check) {
let checkedChildCount = 0;
let childPartialSelected = false;
for (let child of node.children) {
if (this.selectionKeys[this.nodeKey(child)] && this.selectionKeys[this.nodeKey(child)].checked)
checkedChildCount++;
else if (this.selectionKeys[this.nodeKey(child)] && this.selectionKeys[this.nodeKey(child)].partialChecked)
childPartialSelected = true;
}
if (check && checkedChildCount === node.children.length) {
this.selectionKeys[this.nodeKey(node)] = { checked: true, partialChecked: false };
}
else {
if (!check) {
delete this.selectionKeys[this.nodeKey(node)];
}
if (childPartialSelected || (checkedChildCount > 0 && checkedChildCount !== node.children.length))
this.selectionKeys[this.nodeKey(node)] = { checked: false, partialChecked: true };
else
this.selectionKeys[this.nodeKey(node)] = { checked: false, partialChecked: false };
}
let parent = node.parent;
if (parent) {
this.propagateUp(parent, check);
}
}
findIndexInSelection(node) {
let index = -1;
if (this.selection && this.selection.length) {
for (let i = 0; i < this.selection.length; i++) {
if (this.equals(node, this.selection[i])) {
index = i;
break;
}
}
}
return index;
}
isSingleSelectionMode() {
return this.selectionMode === 'single';
}
isMultipleSelectionMode() {
return this.selectionMode === 'multiple';
}
equals(node1, node2) {
return this.compareSelectionBy === 'equals' ? ObjectUtils.equals(node1, node2) : ObjectUtils.equals(node1.data, node2.data, this.dataKey);
}
filter(value, field, matchMode) {
if (this.filterTimeout) {
clearTimeout(this.filterTimeout);
}
if (!this.isFilterBlank(value)) {
this.filters[field] = { value: value, matchMode: matchMode };
}
else if (this.filters[field]) {
delete this.filters[field];
}
this.filterTimeout = setTimeout(() => {
this._filter();
this.filterTimeout = null;
}, this.filterDelay);
}
filterGlobal(value, matchMode) {
this.filter(value, 'global', matchMode);
}
isFilterBlank(filter) {
if (filter !== null && filter !== undefined) {
if ((typeof filter === 'string' && filter.trim().length == 0) || (Array.isArray(filter) && filter.length == 0))
return true;
else
return false;
}
return true;
}
_filter() {
if (this.lazy) {
this.onLazyLoad.emit(this.createLazyLoadMetadata());
}
else {
if (!this.value) {
return;
}
if (!this.hasFilter()) {
this.filteredNodes = null;
if (this.paginator) {
this.totalRecords = this.value ? this.value.length : 0;
}
}
else {
let globalFilterFieldsArray;
if (this.filters['global']) {
if (!this.columns && !this.globalFilterFields)
throw new Error('Global filtering requires dynamic columns or globalFilterFields to be defined.');
else
globalFilterFieldsArray = this.globalFilterFields || this.columns;
}
this.filteredNodes = [];
const isStrictMode = this.filterMode === 'strict';
let isValueChanged = false;
for (let node of this.value) {
let copyNode = { ...node };
let localMatch = true;
let globalMatch = false;
let paramsWithoutNode;
for (let prop in this.filters) {
if (this.filters.hasOwnProperty(prop) && prop !== 'global') {
let filterMeta = this.filters[prop];
let filterField = prop;
let filterValue = filterMeta.value;
let filterMatchMode = filterMeta.matchMode || 'startsWith';
let filterConstraint = this.filterService.filters[filterMatchMode];
paramsWithoutNode = { filterField, filterValue, filterConstraint, isStrictMode };
if ((isStrictMode && !(this.findFilteredNodes(copyNode, paramsWithoutNode) || this.isFilterMatched(copyNode, paramsWithoutNode))) ||
(!isStrictMode && !(this.isFilterMatched(copyNode, paramsWithoutNode) || this.findFilteredNodes(copyNode, paramsWithoutNode)))) {
localMatch = false;
}
if (!localMatch) {
break;
}
}
}
if (this.filters['global'] && !globalMatch && globalFilterFieldsArray) {
let copyNodeForGlobal = { ...copyNode };
let filterField = undefined;
let filterValue = this.filters['global'].value;
let filterConstraint = this.filterService.filters[this.filters['global'].matchMode];
paramsWithoutNode = { filterField, filterValue, filterConstraint, isStrictMode, globalFilterFieldsArray };
if ((isStrictMode && (this.findFilteredNodes(copyNodeForGlobal, paramsWithoutNode) || this.isFilterMatched(copyNodeForGlobal, paramsWithoutNode))) ||
(!isStrictMode && (this.isFilterMatched(copyNodeForGlobal, paramsWithoutNode) || this.findFilteredNodes(copyNodeForGlobal, paramsWithoutNode)))) {
globalMatch = true;
copyNode = copyNodeForGlobal;
}
}
let matches = localMatch;
if (this.filters['global']) {
matches = localMatch && globalMatch;
}
if (matches) {
this.filteredNodes.push(copyNode);
}
isValueChanged = isValueChanged || !localMatch || globalMatch || (localMatch && this.filteredNodes.length > 0) || (!globalMatch && this.filteredNodes.length === 0);
}
if (!isValueChanged) {
this.filteredNodes = null;
}
if (this.paginator) {
this.totalRecords = this.filteredNodes ? this.filteredNodes.length : this.value ? this.value.length : 0;
}
}
this.cd.markForCheck();
}
this.first = 0;
const filteredValue = this.filteredNodes || this.value;
this.onFilter.emit({
filters: this.filters,
filteredValue: filteredValue
});
this.tableService.onUIUpdate(filteredValue);
this.updateSerializedValue();
if (this.scrollable) {
this.resetScrollTop();
}
}
findFilteredNodes(node, paramsWithoutNode) {
if (node) {
let matched = false;
if (node.children) {
let childNodes = [...node.children];
node.children = [];
for (let childNode of childNodes) {
let copyChildNode = { ...childNode };
if (this.isFilterMatched(copyChildNode, paramsWithoutNode)) {
matched = true;
node.children.push(copyChildNode);
}
}
}
if (matched) {
return true;
}
}
}
isFilterMatched(node, filterOptions) {
let { filterField, filterValue, filterConstraint, isStrictMode, globalFilterFieldsArray } = filterOptions;
let matched = false;
const isMatched = (field) => filterConstraint(ObjectUtils.resolveFieldData(node.data, field), filterValue, this.filterLocale);
matched = globalFilterFieldsArray?.length ? globalFilterFieldsArray.some((globalFilterField) => isMatched(globalFilterField.field || globalFilterField)) : isMatched(filterField);
if (!matched || (isStrictMode && !this.isNodeLeaf(node))) {
matched = this.findFilteredNodes(node, { filterField, filterValue, filterConstraint, isStrictMode, globalFilterFieldsArray }) || matched;
}
return matched;
}
isNodeLeaf(node) {
return node.leaf === false ? false : !(node.children && node.children.length);
}
hasFilter() {
let empty = true;
for (let prop in this.filters) {
if (this.filters.hasOwnProperty(prop)) {
empty = false;
break;
}
}
return !empty;
}
/**
* Clears the sort and paginator state.
* @group Method
*/
reset() {
this._sortField = null;
this._sortOrder = 1;
this._multiSortMeta = null;
this.tableService.onSort(null);
this.filteredNodes = null;
this.filters = {};
this.first = 0;
if (this.lazy) {
this.onLazyLoad.emit(this.createLazyLoadMetadata());
}
else {
this.totalRecords = this._value ? this._value.length : 0;
}
}
updateEditingCell(cell, data, field) {
this.editingCell = cell;
this.editingCellData = data;
this.editingCellField = field;
this.bindDocumentEditListener();
}
isEditingCellValid() {
return this.editingCell && DomHandler.find(this.editingCell, '.ng-invalid.ng-dirty').length === 0;
}
bindDocumentEditListener() {
if (!this.documentEditListener) {
this.documentEditListener = this.renderer.listen(this.document, 'click', (event) => {
if (this.editingCell && !this.editingCellClick && this.isEditingCellValid()) {
DomHandler.removeClass(this.editingCell, 'p-cell-editing');
this.editingCell = null;
this.onEditComplete.emit({ field: this.editingCellField, data: this.editingCellData });
this.editingCellField = null;
this.editingCellData = null;
this.unbindDocumentEditListener();
}
this.editingCellClick = false;
});
}
}
unbindDocumentEditListener() {
if (this.documentEditListener) {
this.documentEditListener();
this.documentEditListener = null;
}
}
ngOnDestroy() {
this.unbindDocumentEditListener();
this.editingCell = null;
this.editingCellField = null;
this.editingCellData = null;
this.initialized = null;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTable, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TreeTableService }, { token: i1.FilterService }, { token: i1.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: TreeTable, selector: "p-treeTable", inputs: { columns: "columns", style: "style", styleClass: "styleClass", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", autoLayout: ["autoLayout", "autoLayout", booleanAttribute], lazy: ["lazy", "lazy", booleanAttribute], lazyLoadOnInit: ["lazyLoadOnInit", "lazyLoadOnInit", booleanAttribute], paginator: ["paginator", "paginator", booleanAttribute], rows: ["rows", "rows", numberAttribute], first: ["first", "first", numberAttribute], pageLinks: ["pageLinks", "pageLinks", numberAttribute], rowsPerPageOptions: "rowsPerPageOptions", alwaysShowPaginator: ["alwaysShowPaginator", "alwaysShowPaginator", booleanAttribute], paginatorPosition: "paginatorPosition", paginatorStyleClass: "paginatorStyleClass", paginatorDropdownAppendTo: "paginatorDropdownAppendTo", currentPageReportTemplate: "currentPageReportTemplate", showCurrentPageReport: ["showCurrentPageReport", "showCurrentPageReport", booleanAttribute], showJumpToPageDropdown: ["showJumpToPageDropdown", "showJumpToPageDropdown", booleanAttribute], showFirstLastIcon: ["showFirstLastIcon", "showFirstLastIcon", booleanAttribute], showPageLinks: ["showPageLinks", "showPageLinks", booleanAttribute], defaultSortOrder: ["defaultSortOrder", "defaultSortOrder", numberAttribute], sortMode: "sortMode", resetPageOnSort: ["resetPageOnSort", "resetPageOnSort", booleanAttribute], customSort: ["customSort", "customSort", booleanAttribute], selectionMode: "selectionMode", contextMenuSelection: "contextMenuSelection", contextMenuSelectionMode: "contextMenuSelectionMode", dataKey: "dataKey", metaKeySelection: ["metaKeySelection", "metaKeySelection", booleanAttribute], compareSelectionBy: "compareSelectionBy", rowHover: ["rowHover", "rowHover", booleanAttribute], loading: ["loading", "loading", booleanAttribute], loadingIcon: "loadingIcon", showLoader: ["showLoader", "showLoader", booleanAttribute], scrollable: ["scrollable", "scrollable", booleanAttribute], scrollHeight: "scrollHeight", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", virtualScrollDelay: ["virtualScrollDelay", "virtualScrollDelay", numberAttribute], frozenWidth: "frozenWidth", frozenColumns: "frozenColumns", resizableColumns: ["resizableColumns", "resizableColumns", booleanAttribute], columnResizeMode: "columnResizeMode", reorderableColumns: ["reorderableColumns", "reorderableColumns", booleanAttribute], contextMenu: "contextMenu", rowTrackBy: "rowTrackBy", filters: "filters", globalFilterFields: "globalFilterFields", filterDelay: ["filterDelay", "filterDelay", numberAttribute], filterMode: "filterMode", filterLocale: "filterLocale", paginatorLocale: "paginatorLocale", totalRecords: "totalRecords", sortField: "sortField", sortOrder: "sortOrder", multiSortMeta: "multiSortMeta", selection: "selection", value: "value", virtualRowHeight: "virtualRowHeight", selectionKeys: "selectionKeys" }, outputs: { selectionChange: "selectionChange", contextMenuSelectionChange: "contextMenuSelectionChange", onFilter: "onFilter", onNodeExpand: "onNodeExpand", onNodeCollapse: "onNodeCollapse", onPage: "onPage", onSort: "onSort", onLazyLoad: "onLazyLoad", sortFunction: "sortFunction", onColResize: "onColResize", onColReorder: "onColReorder", onNodeSelect: "onNodeSelect", onNodeUnselect: "onNodeUnselect", onContextMenuSelect: "onContextMenuSelect", onHeaderCheckboxToggle: "onHeaderCheckboxToggle", onEditInit: "onEditInit", onEditComplete: "onEditComplete", onEditCancel: "onEditCancel", selectionKeysChange: "selectionKeysChange" }, host: { classAttribute: "p-element" }, providers: [TreeTableService], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "resizeHelperViewChild", first: true, predicate: ["resizeHelper"], descendants: true }, { propertyName: "reorderIndicatorUpViewChild", first: true, predicate: ["reorderIndicatorUp"], descendants: true }, { propertyName: "reorderIndicatorDownViewChild", first: true, predicate: ["reorderIndicatorDown"], descendants: true }, { propertyName: "tableViewChild", first: true, predicate: ["table"], descendants: true }, { propertyName: "scrollableViewChild", first: true, predicate: ["scrollableView"], descendants: true }, { propertyName: "scrollableFrozenViewChild", first: true, predicate: ["scrollableFrozenView"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
<div
#container
[ngStyle]="style"
[class]="styleClass"
data-scrollselectors=".p-treetable-scrollable-body"
[ngClass]="{
'p-treetable p-component': true,
'p-treetable-hoverable-rows': rowHover || selectionMode === 'single' || selectionMode === 'multiple',
'p-treetable-auto-layout': autoLayout,
'p-treetable-resizable': resizableColumns,
'p-treetable-resizable-fit': resizableColumns && columnResizeMode === 'fit',
'p-treetable-flex-scrollable': scrollable && scrollHeight === 'flex'
}"
>
<div class="p-treetable-loading" *ngIf="loading && showLoader">
<div class="p-treetable-loading-overlay p-component-overlay">
<i *ngIf="loadingIcon" [class]="'p-treetable-loading-icon pi-spin ' + loadingIcon"></i>
<ng-container *ngIf="!loadingIcon">
<SpinnerIcon *ngIf="!loadingIconTemplate" [spin]="true" [styleClass]="'p-treetable-loading-icon'" />
<span *ngIf="loadingIconTemplate" class="p-treetable-loading-icon">
<ng-template *ngTemplateOutlet="loadingIconTemplate"></ng-template>
</span>
</ng-container>
</div>
</div>
<div *ngIf="captionTemplate" class="p-treetable-header">
<ng-container *ngTemplateOutlet="captionTemplate"></ng-container>
</div>
<p-paginator
[rows]="rows"
[first]="first"
[totalRecords]="totalRecords"
[pageLinkSize]="pageLinks"
styleClass="p-paginator-top"
[alwaysShow]="alwaysShowPaginator"
(onPageChange)="onPageChange($event)"
[rowsPerPageOptions]="rowsPerPageOptions"
*ngIf="paginator && (paginatorPosition === 'top' || paginatorPosition == 'both')"
[templateLeft]="paginatorLeftTemplate"
[templateRight]="paginatorRightTemplate"
[dropdownAppendTo]="paginatorDropdownAppendTo"
[currentPageReportTemplate]="currentPageReportTemplate"
[showFirstLastIcon]="showFirstLastIcon"
[dropdownItemTemplate]="paginatorDropdownItemTemplate"
[showCurrentPageReport]="showCurrentPageReport"
[showJumpToPageDropdown]="showJumpToPageDropdown"
[showPageLinks]="showPageLinks"
[styleClass]="paginatorStyleClass"
[locale]="paginatorLocale"
>
<ng-template pTemplate="firstpagelinkicon" *ngIf="paginatorFirstPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorFirstPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="previouspagelinkicon" *ngIf="paginatorPreviousPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorPreviousPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="lastpagelinkicon" *ngIf="paginatorLastPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorLastPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="nextpagelinkicon" *ngIf="paginatorNextPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorNextPageLinkIconTemplate"></ng-container>
</ng-template>
</p-paginator>
<div class="p-treetable-wrapper" *ngIf="!scrollable">
<table role="table" #table [ngClass]="tableStyleClass" [ngStyle]="tableStyle">
<ng-container *ngTemplateOutlet="colGroupTemplate; context: { $implicit: columns }"></ng-container>
<thead role="rowgroup" class="p-treetable-thead">
<ng-container *ngTemplateOutlet="headerTemplate; context: { $implicit: columns }"></ng-container>
</thead>
<tbody class="p-treetable-tbody" role="rowgroup" [pTreeTableBody]="columns" [pTreeTableBodyTemplate]="bodyTemplate"></tbody>
<tfoot class="p-treetable-tfoot" role="rowgroup">
<ng-container *ngTemplateOutlet="footerTemplate; context: { $implicit: columns }"></ng-container>
</tfoot>
</table>
</div>
<div class="p-treetable-scrollable-wrapper" *ngIf="scrollable">
<div
class="p-treetable-scrollable-view p-treetable-frozen-view"
*ngIf="frozenColumns || frozenBodyTemplate"
#scrollableFrozenView
[ttScrollableView]="frozenColumns"
[frozen]="true"
[ngStyle]="{ width: frozenWidth }"
[scrollHeight]="scrollHeight"
></div>
<div class="p-treetable-scrollable-view" #scrollableView [ttScrollableView]="columns" [frozen]="false" [scrollHeight]="scrollHeight" [ngStyle]="{ left: frozenWidth, width: 'calc(100% - ' + frozenWidth + ')' }"></div>
</div>
<p-paginator
[rows]="rows"
[first]="first"
[totalRecords]="totalRecords"
[pageLinkSize]="pageLinks"
styleClass="p-paginator-bottom"
[alwaysShow]="alwaysShowPaginator"
(onPageChange)="onPageChange($event)"
[rowsPerPageOptions]="rowsPerPageOptions"
*ngIf="paginator && (paginatorPosition === 'bottom' || paginatorPosition == 'both')"
[templateLeft]="paginatorLeftTemplate"
[templateRight]="paginatorRightTemplate"
[dropdownAppendTo]="paginatorDropdownAppendTo"
[currentPageReportTemplate]="currentPageReportTemplate"
[showFirstLastIcon]="showFirstLastIcon"
[dropdownItemTemplate]="paginatorDropdownItemTemplate"
[showCurrentPageReport]="showCurrentPageReport"
[showJumpToPageDropdown]="showJumpToPageDropdown"
[showPageLinks]="showPageLinks"
[styleClass]="paginatorStyleClass"
[locale]="paginatorLocale"
>
<ng-template pTemplate="firstpagelinkicon" *ngIf="paginatorFirstPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorFirstPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="previouspagelinkicon" *ngIf="paginatorPreviousPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorPreviousPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="lastpagelinkicon" *ngIf="paginatorLastPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorLastPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="nextpagelinkicon" *ngIf="paginatorNextPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorNextPageLinkIconTemplate"></ng-container>
</ng-template>
</p-paginator>
<div *ngIf="summaryTemplate" class="p-treetable-footer">
<ng-container *ngTemplateOutlet="summaryTemplate"></ng-container>
</div>
<div #resizeHelper class="p-column-resizer-helper" style="display:none" *ngIf="resizableColumns"></div>
<span #reorderIndicatorUp class="p-treetable-reorder-indicator-up" style="display: none;" *ngIf="reorderableColumns">
<ArrowDownIcon *ngIf="!reorderIndicatorUpIconTemplate" />
<ng-template *ngTemplateOutlet="reorderIndicatorUpIconTemplate"></ng-template>
</span>
<span #reorderIndicatorDown class="p-treetable-reorder-indicator-down" style="display: none;" *ngIf="reorderableColumns">
<ArrowUpIcon *ngIf="!reorderIndicatorDownIconTemplate" />
<ng-template *ngTemplateOutlet="reorderIndicatorDownIconTemplate"></ng-template>
</span>
</div>
`, isInline: true, styles: ["@layer primeng{.p-treetable{position:relative}.p-treetable table{border-collapse:collapse;width:100%;table-layout:fixed}.p-treetable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}.p-treetable .p-sortable-column .p-column-title,.p-treetable .p-sortable-column .p-sortable-column-icon,.p-treetable .p-sortable-column .p-sortable-column-badge{vertical-align:middle}.p-treetable .p-sortable-column .p-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.p-treetable-auto-layout>.p-treetable-wrapper{overflow-x:auto}.p-treetable-auto-layout>.p-treetable-wrapper>table{table-layout:auto}.p-treetable-hoverable-rows .p-treetable-tbody>tr{cursor:pointer}.p-treetable-toggler{cursor:pointer;-webkit-user-select:none;user-select:none;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;overflow:hidden;position:relative}p-treetabletoggler+p-treetablecheckbox .p-checkbox{vertical-align:middle}p-treetabletoggler+p-treetablecheckbox+span{vertical-align:middle}.p-treetable-scrollable-wrapper{position:relative}.p-treetable-scrollable-header,.p-treetable-scrollable-footer{overflow:hidden;flex-shrink:0}.p-treetable-scrollable-body{overflow:auto;position:relative}.p-treetable-scrollable-body>table>.p-treetable-tbody>tr:first-child>td{border-top:0 none}.p-treetable-virtual-table{position:absolute}.p-treetable-frozen-view .p-treetable-scrollable-body{overflow:hidden}.p-treetable-frozen-view>.p-treetable-scrollable-body>table>.p-treetable-tbody>tr>td:last-child{border-right:0 none}.p-treetable-unfrozen-view{position:absolute;top:0}.p-treetable-flex-scrollable,.p-treetable-flex-scrollable .p-treetable-scrollable-wrapper,.p-treetable-flex-scrollable .p-treetable-scrollable-view{display:flex;flex-direction:column;flex:1;height:100%}.p-treetable-flex-scrollable .p-treetable-virtual-scrollable-body{flex:1}.p-treetable-resizable>.p-treetable-wrapper{overflow-x:auto}.p-treetable-resizable .p-treetable-thead>tr>th,.p-treetable-resizable .p-treetable-tfoot>tr>td,.p-treetable-resizable .p-treetable-tbody>tr>td{overflow:hidden}.p-treetable-resizable .p-resizable-column{background-clip:padding-box;position:relative}.p-treetable-resizable-fit .p-resizable-column:last-child .p-column-resizer{display:none}.p-treetable .p-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.p-treetable .p-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.p-treetable .p-row-editor-init,.p-treetable .p-row-editor-save,.p-treetable .p-row-editor-cancel,.p-treetable .p-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-treetable-reorder-indicator-up,.p-treetable-reorder-indicator-down{position:absolute;display:none}[ttReorderableColumn]{cursor:move}.p-treetable .p-treetable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}.p-treetable .p-scroller-loading{transform:none!important;min-height:0;position:sticky;top:0;left:0}}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i0.forwardRef(() => i3.Paginator), selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "directive", type: i0.forwardRef(() => i1.PrimeTemplate), selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i0.forwardRef(() => SpinnerIcon), selector: "SpinnerIcon" }, { kind: "component", type: i0.forwardRef(() => ArrowDownIcon), selector: "ArrowDownIcon" }, { kind: "component", type: i0.forwardRef(() => ArrowUpIcon), selector: "ArrowUpIcon" }, { kind: "component", type: i0.forwardRef(() => TTScrollableView), selector: "[ttScrollableView]", inputs: ["ttScrollableView", "frozen", "scrollHeight"] }, { kind: "component", type: i0.forwardRef(() => TTBody), selector: "[pTreeTableBody]", inputs: ["pTreeTableBody", "pTreeTableBodyTemplate", "frozen", "serializedNodes", "scrollerOptions"] }], encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTable, decorators: [{
type: Component,
args: [{ selector: 'p-treeTable', template: `
<div
#container
[ngStyle]="style"
[class]="styleClass"
data-scrollselectors=".p-treetable-scrollable-body"
[ngClass]="{
'p-treetable p-component': true,
'p-treetable-hoverable-rows': rowHover || selectionMode === 'single' || selectionMode === 'multiple',
'p-treetable-auto-layout': autoLayout,
'p-treetable-resizable': resizableColumns,
'p-treetable-resizable-fit': resizableColumns && columnResizeMode === 'fit',
'p-treetable-flex-scrollable': scrollable && scrollHeight === 'flex'
}"
>
<div class="p-treetable-loading" *ngIf="loading && showLoader">
<div class="p-treetable-loading-overlay p-component-overlay">
<i *ngIf="loadingIcon" [class]="'p-treetable-loading-icon pi-spin ' + loadingIcon"></i>
<ng-container *ngIf="!loadingIcon">
<SpinnerIcon *ngIf="!loadingIconTemplate" [spin]="true" [styleClass]="'p-treetable-loading-icon'" />
<span *ngIf="loadingIconTemplate" class="p-treetable-loading-icon">
<ng-template *ngTemplateOutlet="loadingIconTemplate"></ng-template>
</span>
</ng-container>
</div>
</div>
<div *ngIf="captionTemplate" class="p-treetable-header">
<ng-container *ngTemplateOutlet="captionTemplate"></ng-container>
</div>
<p-paginator
[rows]="rows"
[first]="first"
[totalRecords]="totalRecords"
[pageLinkSize]="pageLinks"
styleClass="p-paginator-top"
[alwaysShow]="alwaysShowPaginator"
(onPageChange)="onPageChange($event)"
[rowsPerPageOptions]="rowsPerPageOptions"
*ngIf="paginator && (paginatorPosition === 'top' || paginatorPosition == 'both')"
[templateLeft]="paginatorLeftTemplate"
[templateRight]="paginatorRightTemplate"
[dropdownAppendTo]="paginatorDropdownAppendTo"
[currentPageReportTemplate]="currentPageReportTemplate"
[showFirstLastIcon]="showFirstLastIcon"
[dropdownItemTemplate]="paginatorDropdownItemTemplate"
[showCurrentPageReport]="showCurrentPageReport"
[showJumpToPageDropdown]="showJumpToPageDropdown"
[showPageLinks]="showPageLinks"
[styleClass]="paginatorStyleClass"
[locale]="paginatorLocale"
>
<ng-template pTemplate="firstpagelinkicon" *ngIf="paginatorFirstPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorFirstPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="previouspagelinkicon" *ngIf="paginatorPreviousPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorPreviousPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="lastpagelinkicon" *ngIf="paginatorLastPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorLastPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="nextpagelinkicon" *ngIf="paginatorNextPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorNextPageLinkIconTemplate"></ng-container>
</ng-template>
</p-paginator>
<div class="p-treetable-wrapper" *ngIf="!scrollable">
<table role="table" #table [ngClass]="tableStyleClass" [ngStyle]="tableStyle">
<ng-container *ngTemplateOutlet="colGroupTemplate; context: { $implicit: columns }"></ng-container>
<thead role="rowgroup" class="p-treetable-thead">
<ng-container *ngTemplateOutlet="headerTemplate; context: { $implicit: columns }"></ng-container>
</thead>
<tbody class="p-treetable-tbody" role="rowgroup" [pTreeTableBody]="columns" [pTreeTableBodyTemplate]="bodyTemplate"></tbody>
<tfoot class="p-treetable-tfoot" role="rowgroup">
<ng-container *ngTemplateOutlet="footerTemplate; context: { $implicit: columns }"></ng-container>
</tfoot>
</table>
</div>
<div class="p-treetable-scrollable-wrapper" *ngIf="scrollable">
<div
class="p-treetable-scrollable-view p-treetable-frozen-view"
*ngIf="frozenColumns || frozenBodyTemplate"
#scrollableFrozenView
[ttScrollableView]="frozenColumns"
[frozen]="true"
[ngStyle]="{ width: frozenWidth }"
[scrollHeight]="scrollHeight"
></div>
<div class="p-treetable-scrollable-view" #scrollableView [ttScrollableView]="columns" [frozen]="false" [scrollHeight]="scrollHeight" [ngStyle]="{ left: frozenWidth, width: 'calc(100% - ' + frozenWidth + ')' }"></div>
</div>
<p-paginator
[rows]="rows"
[first]="first"
[totalRecords]="totalRecords"
[pageLinkSize]="pageLinks"
styleClass="p-paginator-bottom"
[alwaysShow]="alwaysShowPaginator"
(onPageChange)="onPageChange($event)"
[rowsPerPageOptions]="rowsPerPageOptions"
*ngIf="paginator && (paginatorPosition === 'bottom' || paginatorPosition == 'both')"
[templateLeft]="paginatorLeftTemplate"
[templateRight]="paginatorRightTemplate"
[dropdownAppendTo]="paginatorDropdownAppendTo"
[currentPageReportTemplate]="currentPageReportTemplate"
[showFirstLastIcon]="showFirstLastIcon"
[dropdownItemTemplate]="paginatorDropdownItemTemplate"
[showCurrentPageReport]="showCurrentPageReport"
[showJumpToPageDropdown]="showJumpToPageDropdown"
[showPageLinks]="showPageLinks"
[styleClass]="paginatorStyleClass"
[locale]="paginatorLocale"
>
<ng-template pTemplate="firstpagelinkicon" *ngIf="paginatorFirstPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorFirstPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="previouspagelinkicon" *ngIf="paginatorPreviousPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorPreviousPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="lastpagelinkicon" *ngIf="paginatorLastPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorLastPageLinkIconTemplate"></ng-container>
</ng-template>
<ng-template pTemplate="nextpagelinkicon" *ngIf="paginatorNextPageLinkIconTemplate">
<ng-container *ngTemplateOutlet="paginatorNextPageLinkIconTemplate"></ng-container>
</ng-template>
</p-paginator>
<div *ngIf="summaryTemplate" class="p-treetable-footer">
<ng-container *ngTemplateOutlet="summaryTemplate"></ng-container>
</div>
<div #resizeHelper class="p-column-resizer-helper" style="display:none" *ngIf="resizableColumns"></div>
<span #reorderIndicatorUp class="p-treetable-reorder-indicator-up" style="display: none;" *ngIf="reorderableColumns">
<ArrowDownIcon *ngIf="!reorderIndicatorUpIconTemplate" />
<ng-template *ngTemplateOutlet="reorderIndicatorUpIconTemplate"></ng-template>
</span>
<span #reorderIndicatorDown class="p-treetable-reorder-indicator-down" style="display: none;" *ngIf="reorderableColumns">
<ArrowUpIcon *ngIf="!reorderIndicatorDownIconTemplate" />
<ng-template *ngTemplateOutlet="reorderIndicatorDownIconTemplate"></ng-template>
</span>
</div>
`, providers: [TreeTableService], encapsulation: ViewEncapsulation.None, host: {
class: 'p-element'
}, styles: ["@layer primeng{.p-treetable{position:relative}.p-treetable table{border-collapse:collapse;width:100%;table-layout:fixed}.p-treetable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}.p-treetable .p-sortable-column .p-column-title,.p-treetable .p-sortable-column .p-sortable-column-icon,.p-treetable .p-sortable-column .p-sortable-column-badge{vertical-align:middle}.p-treetable .p-sortable-column .p-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.p-treetable-auto-layout>.p-treetable-wrapper{overflow-x:auto}.p-treetable-auto-layout>.p-treetable-wrapper>table{table-layout:auto}.p-treetable-hoverable-rows .p-treetable-tbody>tr{cursor:pointer}.p-treetable-toggler{cursor:pointer;-webkit-user-select:none;user-select:none;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;overflow:hidden;position:relative}p-treetabletoggler+p-treetablecheckbox .p-checkbox{vertical-align:middle}p-treetabletoggler+p-treetablecheckbox+span{vertical-align:middle}.p-treetable-scrollable-wrapper{position:relative}.p-treetable-scrollable-header,.p-treetable-scrollable-footer{overflow:hidden;flex-shrink:0}.p-treetable-scrollable-body{overflow:auto;position:relative}.p-treetable-scrollable-body>table>.p-treetable-tbody>tr:first-child>td{border-top:0 none}.p-treetable-virtual-table{position:absolute}.p-treetable-frozen-view .p-treetable-scrollable-body{overflow:hidden}.p-treetable-frozen-view>.p-treetable-scrollable-body>table>.p-treetable-tbody>tr>td:last-child{border-right:0 none}.p-treetable-unfrozen-view{position:absolute;top:0}.p-treetable-flex-scrollable,.p-treetable-flex-scrollable .p-treetable-scrollable-wrapper,.p-treetable-flex-scrollable .p-treetable-scrollable-view{display:flex;flex-direction:column;flex:1;height:100%}.p-treetable-flex-scrollable .p-treetable-virtual-scrollable-body{flex:1}.p-treetable-resizable>.p-treetable-wrapper{overflow-x:auto}.p-treetable-resizable .p-treetable-thead>tr>th,.p-treetable-resizable .p-treetable-tfoot>tr>td,.p-treetable-resizable .p-treetable-tbody>tr>td{overflow:hidden}.p-treetable-resizable .p-resizable-column{background-clip:padding-box;position:relative}.p-treetable-resizable-fit .p-resizable-column:last-child .p-column-resizer{display:none}.p-treetable .p-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.p-treetable .p-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.p-treetable .p-row-editor-init,.p-treetable .p-row-editor-save,.p-treetable .p-row-editor-cancel,.p-treetable .p-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-treetable-reorder-indicator-up,.p-treetable-reorder-indicator-down{position:absolute;display:none}[ttReorderableColumn]{cursor:move}.p-treetable .p-treetable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}.p-treetable .p-scroller-loading{transform:none!important;min-height:0;position:sticky;top:0;left:0}}\n"] }]
}], ctorParameters: () => [{ type: Document, decorators: [{
type: Inject,
args: [DOCUMENT]
}] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: TreeTableService }, { type: i1.FilterService }, { type: i1.PrimeNGConfig }], propDecorators: { columns: [{
type: Input
}], style: [{
type: Input
}], styleClass: [{
type: Input
}], tableStyle: [{
type: Input
}], tableStyleClass: [{
type: Input
}], autoLayout: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], lazy: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], lazyLoadOnInit: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], paginator: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], rows: [{
type: Input,
args: [{ transform: numberAttribute }]
}], first: [{
type: Input,
args: [{ transform: numberAttribute }]
}], pageLinks: [{
type: Input,
args: [{ transform: numberAttribute }]
}], rowsPerPageOptions: [{
type: Input
}], alwaysShowPaginator: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], paginatorPosition: [{
type: Input
}], paginatorStyleClass: [{
type: Input
}], paginatorDropdownAppendTo: [{
type: Input
}], currentPageReportTemplate: [{
type: Input
}], showCurrentPageReport: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], showJumpToPageDropdown: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], showFirstLastIcon: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], showPageLinks: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], defaultSortOrder: [{
type: Input,
args: [{ transform: numberAttribute }]
}], sortMode: [{
type: Input
}], resetPageOnSort: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], customSort: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], selectionMode: [{
type: Input
}], contextMenuSelection: [{
type: Input
}], contextMenuSelectionMode: [{
type: Input
}], dataKey: [{
type: Input
}], metaKeySelection: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], compareSelectionBy: [{
type: Input
}], rowHover: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], loading: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], loadingIcon: [{
type: Input
}], showLoader: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], scrollable: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], scrollHeight: [{
type: Input
}], virtualScroll: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], virtualScrollItemSize: [{
type: Input,
args: [{ transform: numberAttribute }]
}], virtualScrollOptions: [{
type: Input
}], virtualScrollDelay: [{
type: Input,
args: [{ transform: numberAttribute }]
}], frozenWidth: [{
type: Input
}], frozenColumns: [{
type: Input
}], resizableColumns: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], columnResizeMode: [{
type: Input
}], reorderableColumns: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], contextMenu: [{
type: Input
}], rowTrackBy: [{
type: Input
}], filters: [{
type: Input
}], globalFilterFields: [{
type: Input
}], filterDelay: [{
type: Input,
args: [{ transform: numberAttribute }]
}], filterMode: [{
type: Input
}], filterLocale: [{
type: Input
}], paginatorLocale: [{
type: Input
}], totalRecords: [{
type: Input
}], sortField: [{
type: Input
}], sortOrder: [{
type: Input
}], multiSortMeta: [{
type: Input
}], selection: [{
type: Input
}], value: [{
type: Input
}], virtualRowHeight: [{
type: Input
}], selectionKeys: [{
type: Input
}], selectionChange: [{
type: Output
}], contextMenuSelectionChange: [{
type: Output
}], onFilter: [{
type: Output
}], onNodeExpand: [{
type: Output
}], onNodeCollapse: [{
type: Output
}], onPage: [{
type: Output
}], onSort: [{
type: Output
}], onLazyLoad: [{
type: Output
}], sortFunction: [{
type: Output
}], onColResize: [{
type: Output
}], onColReorder: [{
type: Output
}], onNodeSelect: [{
type: Output
}], onNodeUnselect: [{
type: Output
}], onContextMenuSelect: [{
type: Output
}], onHeaderCheckboxToggle: [{
type: Output
}], onEditInit: [{
type: Output
}], onEditComplete: [{
type: Output
}], onEditCancel: [{
type: Output
}], selectionKeysChange: [{
type: Output
}], containerViewChild: [{
type: ViewChild,
args: ['container']
}], resizeHelperViewChild: [{
type: ViewChild,
args: ['resizeHelper']
}], reorderIndicatorUpViewChild: [{
type: ViewChild,
args: ['reorderIndicatorUp']
}], reorderIndicatorDownViewChild: [{
type: ViewChild,
args: ['reorderIndicatorDown']
}], tableViewChild: [{
type: ViewChild,
args: ['table']
}], scrollableViewChild: [{
type: ViewChild,
args: ['scrollableView']
}], scrollableFrozenViewChild: [{
type: ViewChild,
args: ['scrollableFrozenView']
}], templates: [{
type: ContentChildren,
args: [PrimeTemplate]
}] } });
export class TTBody {
tt;
treeTableService;
cd;
columns;
template;
frozen;
serializedNodes;
scrollerOptions;
subscription;
constructor(tt, treeTableService, cd) {
this.tt = tt;
this.treeTableService = treeTableService;
this.cd = cd;
this.subscription = this.tt.tableService.uiUpdateSource$.subscribe(() => {
if (this.tt.virtualScroll) {
this.cd.detectChanges();
}
});
}
getScrollerOption(option, options) {
if (this.tt.virtualScroll) {
options = options || this.scrollerOptions;
return options ? options[option] : null;
}
return null;
}
getRowIndex(rowIndex) {
const getItemOptions = this.getScrollerOption('getItemOptions');
return getItemOptions ? getItemOptions(rowIndex).index : rowIndex;
}
ngOnDestroy() {
if (this.subscription) {
this.subscription.unsubscribe();
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTBody, deps: [{ token: TreeTable }, { token: TreeTableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: TTBody, selector: "[pTreeTableBody]", inputs: { columns: ["pTreeTableBody", "columns"], template: ["pTreeTableBodyTemplate", "template"], frozen: ["frozen", "frozen", booleanAttribute], serializedNodes: "serializedNodes", scrollerOptions: "scrollerOptions" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
<ng-template ngFor let-serializedNode let-rowIndex="index" [ngForOf]="serializedNodes || tt.serializedValue" [ngForTrackBy]="tt.rowTrackBy">
<ng-container *ngIf="serializedNode.visible">
<ng-container *ngTemplateOutlet="template; context: { $implicit: serializedNode, node: serializedNode.node, rowData: serializedNode.node.data, columns: columns }"></ng-container>
</ng-container>
</ng-template>
<ng-container *ngIf="tt.isEmpty()">
<ng-container *ngTemplateOutlet="tt.emptyMessageTemplate; context: { $implicit: columns, frozen: frozen }"></ng-container>
</ng-container>
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTBody, decorators: [{
type: Component,
args: [{
selector: '[pTreeTableBody]',
template: `
<ng-template ngFor let-serializedNode let-rowIndex="index" [ngForOf]="serializedNodes || tt.serializedValue" [ngForTrackBy]="tt.rowTrackBy">
<ng-container *ngIf="serializedNode.visible">
<ng-container *ngTemplateOutlet="template; context: { $implicit: serializedNode, node: serializedNode.node, rowData: serializedNode.node.data, columns: columns }"></ng-container>
</ng-container>
</ng-template>
<ng-container *ngIf="tt.isEmpty()">
<ng-container *ngTemplateOutlet="tt.emptyMessageTemplate; context: { $implicit: columns, frozen: frozen }"></ng-container>
</ng-container>
`,
encapsulation: ViewEncapsulation.None,
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: TreeTableService }, { type: i0.ChangeDetectorRef }], propDecorators: { columns: [{
type: Input,
args: ['pTreeTableBody']
}], template: [{
type: Input,
args: ['pTreeTableBodyTemplate']
}], frozen: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], serializedNodes: [{
type: Input
}], scrollerOptions: [{
type: Input
}] } });
export class TTScrollableView {
platformId;
renderer;
tt;
el;
zone;
columns;
frozen;
scrollHeaderViewChild;
scrollHeaderBoxViewChild;
scrollBodyViewChild;
scrollTableViewChild;
scrollLoadingTableViewChild;
scrollFooterViewChild;
scrollFooterBoxViewChild;
scrollableAlignerViewChild;
scroller;
headerScrollListener;
bodyScrollListener;
footerScrollListener;
frozenSiblingBody;
totalRecordsSubscription;
_scrollHeight;
preventBodyScrollPropagation;
get scrollHeight() {
return this._scrollHeight;
}
set scrollHeight(val) {
this._scrollHeight = val;
if (val != null && (val.includes('%') || val.includes('calc'))) {
console.log('Percentage scroll height calculation is removed in favor of the more performant CSS based flex mode, use scrollHeight="flex" instead.');
}
}
constructor(platformId, renderer, tt, el, zone) {
this.platformId = platformId;
this.renderer = renderer;
this.tt = tt;
this.el = el;
this.zone = zone;
}
ngAfterViewInit() {
if (isPlatformBrowser(this.platformId)) {
if (!this.frozen) {
if (this.tt.frozenColumns || this.tt.frozenBodyTemplate) {
DomHandler.addClass(this.el.nativeElement, 'p-treetable-unfrozen-view');
}
let frozenView = this.el.nativeElement.previousElementSibling;
if (frozenView) {
if (this.tt.virtualScroll)
this.frozenSiblingBody = DomHandler.findSingle(frozenView, '.p-scroller-viewport');
else
this.frozenSiblingBody = DomHandler.findSingle(frozenView, '.p-treetable-scrollable-body');
}
let scrollBarWidth = DomHandler.calculateScrollbarWidth();
this.scrollHeaderBoxViewChild.nativeElement.style.paddingRight = scrollBarWidth + 'px';
if (this.scrollFooterBoxViewChild && this.scrollFooterBoxViewChild.nativeElement) {
this.scrollFooterBoxViewChild.nativeElement.style.paddingRight = scrollBarWidth + 'px';
}
}
else {
if (this.scrollableAlignerViewChild && this.scrollableAlignerViewChild.nativeElement) {
this.scrollableAlignerViewChild.nativeElement.style.height = DomHandler.calculateScrollbarHeight() + 'px';
}
}
this.bindEvents();
}
}
bindEvents() {
if (isPlatformBrowser(this.platformId)) {
this.zone.runOutsideAngular(() => {
if (this.scrollHeaderViewChild && this.scrollHeaderViewChild.nativeElement) {
this.headerScrollListener = this.renderer.listen(this.scrollHeaderBoxViewChild?.nativeElement, 'scroll', this.onHeaderScroll.bind(this));
}
if (this.scrollFooterViewChild && this.scrollFooterViewChild.nativeElement) {
this.footerScrollListener = this.renderer.listen(this.scrollFooterViewChild.nativeElement, 'scroll', this.onFooterScroll.bind(this));
}
if (!this.frozen) {
if (this.tt.virtualScroll) {
this.bodyScrollListener = this.renderer.listen((this.scroller?.getElementRef()).nativeElement, 'scroll', this.onBodyScroll.bind(this));
}
else {
this.bodyScrollListener = this.renderer.listen(this.scrollBodyViewChild?.nativeElement, 'scroll', this.onBodyScroll.bind(this));
}
}
});
}
}
unbindEvents() {
if (isPlatformBrowser(this.platformId)) {
if (this.scrollHeaderViewChild && this.scrollHeaderViewChild.nativeElement) {
if (this.headerScrollListener) {
this.headerScrollListener();
this.headerScrollListener = null;
}
}
if (this.scrollFooterViewChild && this.scrollFooterViewChild.nativeElement) {
if (this.footerScrollListener) {
this.footerScrollListener();
this.footerScrollListener = null;
}
}
if (this.scrollBodyViewChild && this.scrollBodyViewChild.nativeElement) {
if (this.bodyScrollListener) {
this.bodyScrollListener();
this.bodyScrollListener = null;
}
}
if (this.scroller && this.scroller.getElementRef()) {
if (this.bodyScrollListener) {
this.bodyScrollListener();
this.bodyScrollListener = null;
}
}
}
}
onHeaderScroll() {
const scrollLeft = this.scrollHeaderViewChild?.nativeElement.scrollLeft;
this.scrollBodyViewChild.nativeElement.scrollLeft = scrollLeft;
if (this.scrollFooterViewChild && this.scrollFooterViewChild.nativeElement) {
this.scrollFooterViewChild.nativeElement.scrollLeft = scrollLeft;
}
this.preventBodyScrollPropagation = true;
}
onFooterScroll() {
const scrollLeft = this.scrollFooterViewChild?.nativeElement.scrollLeft;
this.scrollBodyViewChild.nativeElement.scrollLeft = scrollLeft;
if (this.scrollHeaderViewChild && this.scrollHeaderViewChild.nativeElement) {
this.scrollHeaderViewChild.nativeElement.scrollLeft = scrollLeft;
}
this.preventBodyScrollPropagation = true;
}
onBodyScroll(event) {
if (this.preventBodyScrollPropagation) {
this.preventBodyScrollPropagation = false;
return;
}
if (this.scrollHeaderViewChild && this.scrollHeaderViewChild.nativeElement) {
this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft = -1 * event.target.scrollLeft + 'px';
}
if (this.scrollFooterViewChild && this.scrollFooterViewChild.nativeElement) {
this.scrollFooterBoxViewChild.nativeElement.style.marginLeft = -1 * event.target.scrollLeft + 'px';
}
if (this.frozenSiblingBody) {
this.frozenSiblingBody.scrollTop = event.target.scrollTop;
}
}
scrollToVirtualIndex(index) {
if (this.scroller) {
this.scroller.scrollToIndex(index);
}
}
scrollTo(options) {
if (this.scroller) {
this.scroller.scrollTo(options);
}
else {
if (this.scrollBodyViewChild?.nativeElement.scrollTo) {
this.scrollBodyViewChild.nativeElement.scrollTo(options);
}
else {
this.scrollBodyViewChild.nativeElement.scrollLeft = options.left;
this.scrollBodyViewChild.nativeElement.scrollTop = options.top;
}
}
}
ngOnDestroy() {
this.unbindEvents();
this.frozenSiblingBody = null;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTScrollableView, deps: [{ token: PLATFORM_ID }, { token: i0.Renderer2 }, { token: TreeTable }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: TTScrollableView, selector: "[ttScrollableView]", inputs: { columns: ["ttScrollableView", "columns"], frozen: ["frozen", "frozen", booleanAttribute], scrollHeight: "scrollHeight" }, host: { classAttribute: "p-element" }, viewQueries: [{ propertyName: "scrollHeaderViewChild", first: true, predicate: ["scrollHeader"], descendants: true }, { propertyName: "scrollHeaderBoxViewChild", first: true, predicate: ["scrollHeaderBox"], descendants: true }, { propertyName: "scrollBodyViewChild", first: true, predicate: ["scrollBody"], descendants: true }, { propertyName: "scrollTableViewChild", first: true, predicate: ["scrollTable"], descendants: true }, { propertyName: "scrollLoadingTableViewChild", first: true, predicate: ["loadingTable"], descendants: true }, { propertyName: "scrollFooterViewChild", first: true, predicate: ["scrollFooter"], descendants: true }, { propertyName: "scrollFooterBoxViewChild", first: true, predicate: ["scrollFooterBox"], descendants: true }, { propertyName: "scrollableAlignerViewChild", first: true, predicate: ["scrollableAligner"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }], ngImport: i0, template: `
<div #scrollHeader class="p-treetable-scrollable-header">
<div #scrollHeaderBox class="p-treetable-scrollable-header-box">
<table class="p-treetable-scrollable-header-table" [ngClass]="tt.tableStyleClass" [ngStyle]="tt.tableStyle">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenColGroupTemplate || tt.colGroupTemplate : tt.colGroupTemplate; context: { $implicit: columns }"></ng-container>
<thead role="rowgroup" class="p-treetable-thead">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenHeaderTemplate || tt.headerTemplate : tt.headerTemplate; context: { $implicit: columns }"></ng-container>
</thead>
</table>
</div>
</div>
<p-scroller
*ngIf="tt.virtualScroll"
#scroller
[items]="tt.serializedValue"
styleClass="p-treetable-scrollable-body"
[style]="{ height: tt.scrollHeight !== 'flex' ? tt.scrollHeight : undefined }"
[scrollHeight]="scrollHeight !== 'flex' ? undefined : '100%'"
[itemSize]="tt.virtualScrollItemSize || tt._virtualRowHeight"
[lazy]="tt.lazy"
(onLazyLoad)="tt.onLazyItemLoad($event)"
[options]="tt.virtualScrollOptions"
>
<ng-template pTemplate="content" let-items let-scrollerOptions="options">
<ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: items, options: scrollerOptions }"></ng-container>
</ng-template>
<ng-container *ngIf="loaderTemplate">
<ng-template pTemplate="loader" let-scrollerOptions="options">
<ng-container *ngTemplateOutlet="loaderTemplate; context: { options: scrollerOptions }"></ng-container>
</ng-template>
</ng-container>
</p-scroller>
<ng-container *ngIf="!tt.virtualScroll">
<div #scrollBody class="p-treetable-scrollable-body" [ngStyle]="{ 'max-height': tt.scrollHeight !== 'flex' ? scrollHeight : undefined, 'overflow-y': !frozen && tt.scrollHeight ? 'scroll' : undefined }">
<ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: serializedValue, options: {} }"></ng-container>
</div>
</ng-container>
<ng-template #buildInItems let-items let-scrollerOptions="options">
<table role="table" #scrollTable [class]="tt.tableStyleClass" [ngClass]="scrollerOptions.contentStyleClass" [ngStyle]="tt.tableStyle" [style]="scrollerOptions.contentStyle">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenColGroupTemplate || tt.colGroupTemplate : tt.colGroupTemplate; context: { $implicit: columns }"></ng-container>
<tbody role="rowgroup" class="p-treetable-tbody" [pTreeTableBody]="columns" [pTreeTableBodyTemplate]="frozen ? tt.frozenBodyTemplate || tt.bodyTemplate : tt.bodyTemplate" [serializedNodes]="items" [frozen]="frozen"></tbody>
</table>
<div #scrollableAligner style="background-color:transparent" *ngIf="frozen"></div>
</ng-template>
<div #scrollFooter *ngIf="tt.footerTemplate" class="p-treetable-scrollable-footer">
<div #scrollFooterBox class="p-treetable-scrollable-footer-box">
<table class="p-treetable-scrollable-footer-table" [ngClass]="tt.tableStyleClass" [ngStyle]="tt.tableStyle">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenColGroupTemplate || tt.colGroupTemplate : tt.colGroupTemplate; context: { $implicit: columns }"></ng-container>
<tfoot role="rowgroup" class="p-treetable-tfoot">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenFooterTemplate || tt.footerTemplate : tt.footerTemplate; context: { $implicit: columns }"></ng-container>
</tfoot>
</table>
</div>
</div>
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4.Scroller, selector: "p-scroller", inputs: ["id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "component", type: TTBody, selector: "[pTreeTableBody]", inputs: ["pTreeTableBody", "pTreeTableBodyTemplate", "frozen", "serializedNodes", "scrollerOptions"] }], encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTScrollableView, decorators: [{
type: Component,
args: [{
selector: '[ttScrollableView]',
template: `
<div #scrollHeader class="p-treetable-scrollable-header">
<div #scrollHeaderBox class="p-treetable-scrollable-header-box">
<table class="p-treetable-scrollable-header-table" [ngClass]="tt.tableStyleClass" [ngStyle]="tt.tableStyle">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenColGroupTemplate || tt.colGroupTemplate : tt.colGroupTemplate; context: { $implicit: columns }"></ng-container>
<thead role="rowgroup" class="p-treetable-thead">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenHeaderTemplate || tt.headerTemplate : tt.headerTemplate; context: { $implicit: columns }"></ng-container>
</thead>
</table>
</div>
</div>
<p-scroller
*ngIf="tt.virtualScroll"
#scroller
[items]="tt.serializedValue"
styleClass="p-treetable-scrollable-body"
[style]="{ height: tt.scrollHeight !== 'flex' ? tt.scrollHeight : undefined }"
[scrollHeight]="scrollHeight !== 'flex' ? undefined : '100%'"
[itemSize]="tt.virtualScrollItemSize || tt._virtualRowHeight"
[lazy]="tt.lazy"
(onLazyLoad)="tt.onLazyItemLoad($event)"
[options]="tt.virtualScrollOptions"
>
<ng-template pTemplate="content" let-items let-scrollerOptions="options">
<ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: items, options: scrollerOptions }"></ng-container>
</ng-template>
<ng-container *ngIf="loaderTemplate">
<ng-template pTemplate="loader" let-scrollerOptions="options">
<ng-container *ngTemplateOutlet="loaderTemplate; context: { options: scrollerOptions }"></ng-container>
</ng-template>
</ng-container>
</p-scroller>
<ng-container *ngIf="!tt.virtualScroll">
<div #scrollBody class="p-treetable-scrollable-body" [ngStyle]="{ 'max-height': tt.scrollHeight !== 'flex' ? scrollHeight : undefined, 'overflow-y': !frozen && tt.scrollHeight ? 'scroll' : undefined }">
<ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: serializedValue, options: {} }"></ng-container>
</div>
</ng-container>
<ng-template #buildInItems let-items let-scrollerOptions="options">
<table role="table" #scrollTable [class]="tt.tableStyleClass" [ngClass]="scrollerOptions.contentStyleClass" [ngStyle]="tt.tableStyle" [style]="scrollerOptions.contentStyle">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenColGroupTemplate || tt.colGroupTemplate : tt.colGroupTemplate; context: { $implicit: columns }"></ng-container>
<tbody role="rowgroup" class="p-treetable-tbody" [pTreeTableBody]="columns" [pTreeTableBodyTemplate]="frozen ? tt.frozenBodyTemplate || tt.bodyTemplate : tt.bodyTemplate" [serializedNodes]="items" [frozen]="frozen"></tbody>
</table>
<div #scrollableAligner style="background-color:transparent" *ngIf="frozen"></div>
</ng-template>
<div #scrollFooter *ngIf="tt.footerTemplate" class="p-treetable-scrollable-footer">
<div #scrollFooterBox class="p-treetable-scrollable-footer-box">
<table class="p-treetable-scrollable-footer-table" [ngClass]="tt.tableStyleClass" [ngStyle]="tt.tableStyle">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenColGroupTemplate || tt.colGroupTemplate : tt.colGroupTemplate; context: { $implicit: columns }"></ng-container>
<tfoot role="rowgroup" class="p-treetable-tfoot">
<ng-container *ngTemplateOutlet="frozen ? tt.frozenFooterTemplate || tt.footerTemplate : tt.footerTemplate; context: { $implicit: columns }"></ng-container>
</tfoot>
</table>
</div>
</div>
`,
encapsulation: ViewEncapsulation.None,
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: undefined, decorators: [{
type: Inject,
args: [PLATFORM_ID]
}] }, { type: i0.Renderer2 }, { type: TreeTable }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { columns: [{
type: Input,
args: ['ttScrollableView']
}], frozen: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], scrollHeaderViewChild: [{
type: ViewChild,
args: ['scrollHeader']
}], scrollHeaderBoxViewChild: [{
type: ViewChild,
args: ['scrollHeaderBox']
}], scrollBodyViewChild: [{
type: ViewChild,
args: ['scrollBody']
}], scrollTableViewChild: [{
type: ViewChild,
args: ['scrollTable']
}], scrollLoadingTableViewChild: [{
type: ViewChild,
args: ['loadingTable']
}], scrollFooterViewChild: [{
type: ViewChild,
args: ['scrollFooter']
}], scrollFooterBoxViewChild: [{
type: ViewChild,
args: ['scrollFooterBox']
}], scrollableAlignerViewChild: [{
type: ViewChild,
args: ['scrollableAligner']
}], scroller: [{
type: ViewChild,
args: ['scroller']
}], scrollHeight: [{
type: Input
}] } });
export class TTSortableColumn {
tt;
field;
ttSortableColumnDisabled;
sorted;
subscription;
get ariaSorted() {
if (this.sorted && this.tt.sortOrder < 0)
return 'descending';
else if (this.sorted && this.tt.sortOrder > 0)
return 'ascending';
else
return 'none';
}
constructor(tt) {
this.tt = tt;
if (this.isEnabled()) {
this.subscription = this.tt.tableService.sortSource$.subscribe((sortMeta) => {
this.updateSortState();
});
}
}
ngOnInit() {
if (this.isEnabled()) {
this.updateSortState();
}
}
updateSortState() {
this.sorted = this.tt.isSorted(this.field);
}
onClick(event) {
if (this.isEnabled()) {
this.updateSortState();
this.tt.sort({
originalEvent: event,
field: this.field
});
DomHandler.clearSelection();
}
}
onEnterKey(event) {
this.onClick(event);
}
isEnabled() {
return this.ttSortableColumnDisabled !== true;
}
ngOnDestroy() {
if (this.subscription) {
this.subscription.unsubscribe();
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTSortableColumn, deps: [{ token: TreeTable }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.7", type: TTSortableColumn, selector: "[ttSortableColumn]", inputs: { field: ["ttSortableColumn", "field"], ttSortableColumnDisabled: ["ttSortableColumnDisabled", "ttSortableColumnDisabled", booleanAttribute] }, host: { listeners: { "click": "onClick($event)", "keydown.enter": "onEnterKey($event)" }, properties: { "class.p-sortable-column": "isEnabled()", "class.p-highlight": "sorted", "attr.tabindex": "isEnabled() ? \"0\" : null", "attr.role": "\"columnheader\"", "attr.aria-sort": "ariaSorted" }, classAttribute: "p-element" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTSortableColumn, decorators: [{
type: Directive,
args: [{
selector: '[ttSortableColumn]',
host: {
class: 'p-element',
'[class.p-sortable-column]': 'isEnabled()',
'[class.p-highlight]': 'sorted',
'[attr.tabindex]': 'isEnabled() ? "0" : null',
'[attr.role]': '"columnheader"',
'[attr.aria-sort]': 'ariaSorted'
}
}]
}], ctorParameters: () => [{ type: TreeTable }], propDecorators: { field: [{
type: Input,
args: ['ttSortableColumn']
}], ttSortableColumnDisabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], onClick: [{
type: HostListener,
args: ['click', ['$event']]
}], onEnterKey: [{
type: HostListener,
args: ['keydown.enter', ['$event']]
}] } });
export class TTSortIcon {
tt;
cd;
field;
ariaLabelDesc;
ariaLabelAsc;
subscription;
sortOrder;
constructor(tt, cd) {
this.tt = tt;
this.cd = cd;
this.subscription = this.tt.tableService.sortSource$.subscribe((sortMeta) => {
this.updateSortState();
this.cd.markForCheck();
});
}
ngOnInit() {
this.updateSortState();
}
onClick(event) {
event.preventDefault();
}
updateSortState() {
if (this.tt.sortMode === 'single') {
this.sortOrder = this.tt.isSorted(this.field) ? this.tt.sortOrder : 0;
}
else if (this.tt.sortMode === 'multiple') {
let sortMeta = this.tt.getSortMeta(this.field);
this.sortOrder = sortMeta ? sortMeta.order : 0;
}
}
ngOnDestroy() {
if (this.subscription) {
this.subscription.unsubscribe();
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTSortIcon, deps: [{ token: TreeTable }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: TTSortIcon, selector: "p-treeTableSortIcon", inputs: { field: "field", ariaLabelDesc: "ariaLabelDesc", ariaLabelAsc: "ariaLabelAsc" }, host: { classAttribute: "p-element" }, ngImport: i0, template: ` <ng-container *ngIf="!tt.sortIconTemplate">
<SortAltIcon [styleClass]="'p-sortable-column-icon'" *ngIf="sortOrder === 0" />
<SortAmountUpAltIcon [styleClass]="'p-sortable-column-icon'" *ngIf="sortOrder === 1" />
<SortAmountDownIcon [styleClass]="'p-sortable-column-icon'" *ngIf="sortOrder === -1" />
</ng-container>
<span *ngIf="tt.sortIconTemplate" class="p-sortable-column-icon">
<ng-template *ngTemplateOutlet="tt.sortIconTemplate; context: { $implicit: sortOrder }"></ng-template>
</span>`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => SortAltIcon), selector: "SortAltIcon" }, { kind: "component", type: i0.forwardRef(() => SortAmountUpAltIcon), selector: "SortAmountUpAltIcon" }, { kind: "component", type: i0.forwardRef(() => SortAmountDownIcon), selector: "SortAmountDownIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTSortIcon, decorators: [{
type: Component,
args: [{
selector: 'p-treeTableSortIcon',
template: ` <ng-container *ngIf="!tt.sortIconTemplate">
<SortAltIcon [styleClass]="'p-sortable-column-icon'" *ngIf="sortOrder === 0" />
<SortAmountUpAltIcon [styleClass]="'p-sortable-column-icon'" *ngIf="sortOrder === 1" />
<SortAmountDownIcon [styleClass]="'p-sortable-column-icon'" *ngIf="sortOrder === -1" />
</ng-container>
<span *ngIf="tt.sortIconTemplate" class="p-sortable-column-icon">
<ng-template *ngTemplateOutlet="tt.sortIconTemplate; context: { $implicit: sortOrder }"></ng-template>
</span>`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: i0.ChangeDetectorRef }], propDecorators: { field: [{
type: Input
}], ariaLabelDesc: [{
type: Input
}], ariaLabelAsc: [{
type: Input
}] } });
export class TTResizableColumn {
document;
platformId;
renderer;
tt;
el;
zone;
ttResizableColumnDisabled;
resizer;
resizerMouseDownListener;
documentMouseMoveListener;
documentMouseUpListener;
constructor(document, platformId, renderer, tt, el, zone) {
this.document = document;
this.platformId = platformId;
this.renderer = renderer;
this.tt = tt;
this.el = el;
this.zone = zone;
}
ngAfterViewInit() {
if (isPlatformBrowser(this.platformId)) {
if (this.isEnabled()) {
DomHandler.addClass(this.el.nativeElement, 'p-resizable-column');
this.resizer = this.renderer.createElement('span');
this.renderer.addClass(this.resizer, 'p-column-resizer');
this.renderer.appendChild(this.el.nativeElement, this.resizer);
this.zone.runOutsideAngular(() => {
this.resizerMouseDownListener = this.renderer.listen(this.resizer, 'mousedown', this.onMouseDown.bind(this));
});
}
}
}
bindDocumentEvents() {
this.zone.runOutsideAngular(() => {
this.documentMouseMoveListener = this.renderer.listen(this.document, 'mousemove', this.onDocumentMouseMove.bind(this));
this.documentMouseUpListener = this.renderer.listen(this.document, 'mouseup', this.onDocumentMouseUp.bind(this));
});
}
unbindDocumentEvents() {
if (this.documentMouseMoveListener) {
this.documentMouseMoveListener();
this.documentMouseMoveListener = null;
}
if (this.documentMouseUpListener) {
this.documentMouseUpListener();
this.documentMouseUpListener = null;
}
}
onMouseDown(event) {
this.tt.onColumnResizeBegin(event);
this.bindDocumentEvents();
}
onDocumentMouseMove(event) {
this.tt.onColumnResize(event);
}
onDocumentMouseUp(event) {
this.tt.onColumnResizeEnd(event, this.el.nativeElement);
this.unbindDocumentEvents();
}
isEnabled() {
return this.ttResizableColumnDisabled !== true;
}
ngOnDestroy() {
if (this.resizerMouseDownListener) {
this.resizerMouseDownListener();
this.resizerMouseDownListener = null;
}
this.unbindDocumentEvents();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTResizableColumn, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.Renderer2 }, { token: TreeTable }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.7", type: TTResizableColumn, selector: "[ttResizableColumn]", inputs: { ttResizableColumnDisabled: ["ttResizableColumnDisabled", "ttResizableColumnDisabled", booleanAttribute] }, host: { classAttribute: "p-element" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTResizableColumn, decorators: [{
type: Directive,
args: [{
selector: '[ttResizableColumn]',
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: Document, decorators: [{
type: Inject,
args: [DOCUMENT]
}] }, { type: undefined, decorators: [{
type: Inject,
args: [PLATFORM_ID]
}] }, { type: i0.Renderer2 }, { type: TreeTable }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { ttResizableColumnDisabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}] } });
export class TTReorderableColumn {
document;
platformId;
renderer;
tt;
el;
zone;
ttReorderableColumnDisabled;
dragStartListener;
dragOverListener;
dragEnterListener;
dragLeaveListener;
mouseDownListener;
constructor(document, platformId, renderer, tt, el, zone) {
this.document = document;
this.platformId = platformId;
this.renderer = renderer;
this.tt = tt;
this.el = el;
this.zone = zone;
}
ngAfterViewInit() {
if (this.isEnabled()) {
this.bindEvents();
}
}
bindEvents() {
if (isPlatformBrowser(this.platformId)) {
this.zone.runOutsideAngular(() => {
this.mouseDownListener = this.renderer.listen(this.el.nativeElement, 'mousedown', this.onMouseDown.bind(this));
this.dragStartListener = this.renderer.listen(this.el.nativeElement, 'dragstart', this.onDragStart.bind(this));
this.dragOverListener = this.renderer.listen(this.el.nativeElement, 'dragover', this.onDragEnter.bind(this));
this.dragEnterListener = this.renderer.listen(this.el.nativeElement, 'dragenter', this.onDragEnter.bind(this));
this.dragLeaveListener = this.renderer.listen(this.el.nativeElement, 'dragleave', this.onDragLeave.bind(this));
});
}
}
unbindEvents() {
if (isPlatformBrowser(this.platformId)) {
if (this.mouseDownListener) {
this.mouseDownListener();
this.mouseDownListener = null;
}
if (this.dragOverListener) {
this.dragOverListener();
this.dragOverListener = null;
}
if (this.dragEnterListener) {
this.dragEnterListener();
this.dragEnterListener = null;
}
if (this.dragLeaveListener) {
this.dragLeaveListener();
this.dragLeaveListener = null;
}
}
}
onMouseDown(event) {
if (event.target.nodeName === 'INPUT' || event.target.nodeName === 'TEXTAREA' || DomHandler.hasClass(event.target, 'p-column-resizer'))
this.el.nativeElement.draggable = false;
else
this.el.nativeElement.draggable = true;
}
onDragStart(event) {
this.tt.onColumnDragStart(event, this.el.nativeElement);
}
onDragOver(event) {
event.preventDefault();
}
onDragEnter(event) {
this.tt.onColumnDragEnter(event, this.el.nativeElement);
}
onDragLeave(event) {
this.tt.onColumnDragLeave(event);
}
onDrop(event) {
if (this.isEnabled()) {
this.tt.onColumnDrop(event, this.el.nativeElement);
}
}
isEnabled() {
return this.ttReorderableColumnDisabled !== true;
}
ngOnDestroy() {
this.unbindEvents();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTReorderableColumn, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.Renderer2 }, { token: TreeTable }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.7", type: TTReorderableColumn, selector: "[ttReorderableColumn]", inputs: { ttReorderableColumnDisabled: ["ttReorderableColumnDisabled", "ttReorderableColumnDisabled", booleanAttribute] }, host: { listeners: { "drop": "onDrop($event)" }, classAttribute: "p-element" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTReorderableColumn, decorators: [{
type: Directive,
args: [{
selector: '[ttReorderableColumn]',
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: Document, decorators: [{
type: Inject,
args: [DOCUMENT]
}] }, { type: undefined, decorators: [{
type: Inject,
args: [PLATFORM_ID]
}] }, { type: i0.Renderer2 }, { type: TreeTable }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { ttReorderableColumnDisabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], onDrop: [{
type: HostListener,
args: ['drop', ['$event']]
}] } });
export class TTSelectableRow {
tt;
tableService;
rowNode;
ttSelectableRowDisabled;
selected;
subscription;
constructor(tt, tableService) {
this.tt = tt;
this.tableService = tableService;
if (this.isEnabled()) {
this.subscription = this.tt.tableService.selectionSource$.subscribe(() => {
this.selected = this.tt.isSelected(this.rowNode.node);
});
}
}
ngOnInit() {
if (this.isEnabled()) {
this.selected = this.tt.isSelected(this.rowNode.node);
}
}
onClick(event) {
if (this.isEnabled()) {
this.tt.handleRowClick({
originalEvent: event,
rowNode: this.rowNode
});
}
}
onKeyDown(event) {
switch (event.code) {
case 'Enter':
case 'Space':
this.onEnterKey(event);
break;
default:
break;
}
}
onTouchEnd(event) {
if (this.isEnabled()) {
this.tt.handleRowTouchEnd(event);
}
}
onEnterKey(event) {
if (this.tt.selectionMode === 'checkbox') {
this.tt.toggleNodeWithCheckbox({
originalEvent: event,
rowNode: this.rowNode
});
}
else {
this.onClick(event);
}
event.preventDefault();
}
isEnabled() {
return this.ttSelectableRowDisabled !== true;
}
ngOnDestroy() {
if (this.subscription) {
this.subscription.unsubscribe();
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTSelectableRow, deps: [{ token: TreeTable }, { token: TreeTableService }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.7", type: TTSelectableRow, selector: "[ttSelectableRow]", inputs: { rowNode: ["ttSelectableRow", "rowNode"], ttSelectableRowDisabled: ["ttSelectableRowDisabled", "ttSelectableRowDisabled", booleanAttribute] }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)", "touchend": "onTouchEnd($event)" }, properties: { "class.p-highlight": "selected", "attr.data-p-highlight": "selected", "attr.aria-checked": "selected" }, classAttribute: "p-element" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTSelectableRow, decorators: [{
type: Directive,
args: [{
selector: '[ttSelectableRow]',
host: {
class: 'p-element',
'[class.p-highlight]': 'selected',
'[attr.data-p-highlight]': 'selected',
'[attr.aria-checked]': 'selected'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: TreeTableService }], propDecorators: { rowNode: [{
type: Input,
args: ['ttSelectableRow']
}], ttSelectableRowDisabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], onClick: [{
type: HostListener,
args: ['click', ['$event']]
}], onKeyDown: [{
type: HostListener,
args: ['keydown', ['$event']]
}], onTouchEnd: [{
type: HostListener,
args: ['touchend', ['$event']]
}] } });
export class TTSelectableRowDblClick {
tt;
tableService;
rowNode;
ttSelectableRowDisabled;
selected;
subscription;
constructor(tt, tableService) {
this.tt = tt;
this.tableService = tableService;
if (this.isEnabled()) {
this.subscription = this.tt.tableService.selectionSource$.subscribe(() => {
this.selected = this.tt.isSelected(this.rowNode.node);
});
}
}
ngOnInit() {
if (this.isEnabled()) {
this.selected = this.tt.isSelected(this.rowNode.node);
}
}
onClick(event) {
if (this.isEnabled()) {
this.tt.handleRowClick({
originalEvent: event,
rowNode: this.rowNode
});
}
}
isEnabled() {
return this.ttSelectableRowDisabled !== true;
}
ngOnDestroy() {
if (this.subscription) {
this.subscription.unsubscribe();
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTSelectableRowDblClick, deps: [{ token: TreeTable }, { token: TreeTableService }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.7", type: TTSelectableRowDblClick, selector: "[ttSelectableRowDblClick]", inputs: { rowNode: ["ttSelectableRowDblClick", "rowNode"], ttSelectableRowDisabled: ["ttSelectableRowDisabled", "ttSelectableRowDisabled", booleanAttribute] }, host: { listeners: { "dblclick": "onClick($event)" }, properties: { "class.p-highlight": "selected" }, classAttribute: "p-element" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTSelectableRowDblClick, decorators: [{
type: Directive,
args: [{
selector: '[ttSelectableRowDblClick]',
host: {
class: 'p-element',
'[class.p-highlight]': 'selected'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: TreeTableService }], propDecorators: { rowNode: [{
type: Input,
args: ['ttSelectableRowDblClick']
}], ttSelectableRowDisabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], onClick: [{
type: HostListener,
args: ['dblclick', ['$event']]
}] } });
export class TTContextMenuRow {
tt;
tableService;
el;
rowNode;
ttContextMenuRowDisabled;
selected;
subscription;
constructor(tt, tableService, el) {
this.tt = tt;
this.tableService = tableService;
this.el = el;
if (this.isEnabled()) {
this.subscription = this.tt.tableService.contextMenuSource$.subscribe((node) => {
this.selected = this.tt.equals(this.rowNode.node, node);
});
}
}
onContextMenu(event) {
if (this.isEnabled()) {
this.tt.handleRowRightClick({
originalEvent: event,
rowNode: this.rowNode
});
this.el.nativeElement.focus();
event.preventDefault();
}
}
isEnabled() {
return this.ttContextMenuRowDisabled !== true;
}
ngOnDestroy() {
if (this.subscription) {
this.subscription.unsubscribe();
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTContextMenuRow, deps: [{ token: TreeTable }, { token: TreeTableService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.7", type: TTContextMenuRow, selector: "[ttContextMenuRow]", inputs: { rowNode: ["ttContextMenuRow", "rowNode"], ttContextMenuRowDisabled: ["ttContextMenuRowDisabled", "ttContextMenuRowDisabled", booleanAttribute] }, host: { listeners: { "contextmenu": "onContextMenu($event)" }, properties: { "class.p-highlight-contextmenu": "selected", "attr.tabindex": "isEnabled() ? 0 : undefined" }, classAttribute: "p-element" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTContextMenuRow, decorators: [{
type: Directive,
args: [{
selector: '[ttContextMenuRow]',
host: {
class: 'p-element',
'[class.p-highlight-contextmenu]': 'selected',
'[attr.tabindex]': 'isEnabled() ? 0 : undefined'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: TreeTableService }, { type: i0.ElementRef }], propDecorators: { rowNode: [{
type: Input,
args: ['ttContextMenuRow']
}], ttContextMenuRowDisabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], onContextMenu: [{
type: HostListener,
args: ['contextmenu', ['$event']]
}] } });
export class TTCheckbox {
tt;
tableService;
cd;
disabled;
rowNode;
checked;
partialChecked;
focused;
subscription;
constructor(tt, tableService, cd) {
this.tt = tt;
this.tableService = tableService;
this.cd = cd;
this.subscription = this.tt.tableService.selectionSource$.subscribe(() => {
if (this.tt.selectionKeys) {
this.checked = this.tt.isNodeSelected(this.rowNode.node);
this.partialChecked = this.tt.isNodePartialSelected(this.rowNode.node);
}
else {
this.checked = this.tt.isSelected(this.rowNode.node);
this.partialChecked = this.rowNode.node.partialSelected;
}
this.cd.markForCheck();
});
}
ngOnInit() {
if (this.tt.selectionKeys) {
this.checked = this.tt.isNodeSelected(this.rowNode.node);
this.partialChecked = this.tt.isNodePartialSelected(this.rowNode.node);
}
else {
// for backward compatibility
this.checked = this.tt.isSelected(this.rowNode.node);
this.partialChecked = this.rowNode.node.partialSelected;
}
}
onClick(event) {
if (!this.disabled) {
if (this.tt.selectionKeys) {
const _check = !this.checked;
this.tt.toggleCheckbox({
originalEvent: event,
check: _check,
rowNode: this.rowNode
});
}
else {
this.tt.toggleNodeWithCheckbox({
originalEvent: event,
rowNode: this.rowNode
});
}
}
DomHandler.clearSelection();
}
onFocus() {
this.focused = true;
}
onBlur() {
this.focused = false;
}
ngOnDestroy() {
if (this.subscription) {
this.subscription.unsubscribe();
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTCheckbox, deps: [{ token: TreeTable }, { token: TreeTableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: TTCheckbox, selector: "p-treeTableCheckbox", inputs: { disabled: ["disabled", "disabled", booleanAttribute], rowNode: ["value", "rowNode"] }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
<div class="p-checkbox p-component" [ngClass]="{ 'p-checkbox-focused': focused, 'p-variant-filled': tt.config.inputStyle() === 'filled' }" (click)="onClick($event)">
<div class="p-hidden-accessible">
<input type="checkbox" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()" tabindex="-1" />
</div>
<div #box [ngClass]="{ 'p-checkbox-box': true, 'p-highlight': checked, 'p-focus': focused, 'p-indeterminate': partialChecked, 'p-disabled': disabled }" role="checkbox" [attr.aria-checked]="checked">
<ng-container *ngIf="!tt.checkboxIconTemplate">
<CheckIcon [styleClass]="'p-checkbox-icon'" *ngIf="checked" />
<MinusIcon [styleClass]="'p-checkbox-icon'" *ngIf="partialChecked" />
</ng-container>
<span *ngIf="tt.checkboxIconTemplate">
<ng-template *ngTemplateOutlet="tt.checkboxIconTemplate; context: { $implicit: checked, partialSelected: partialChecked }"></ng-template>
</span>
</div>
</div>
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => CheckIcon), selector: "CheckIcon" }, { kind: "component", type: i0.forwardRef(() => MinusIcon), selector: "MinusIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTCheckbox, decorators: [{
type: Component,
args: [{
selector: 'p-treeTableCheckbox',
template: `
<div class="p-checkbox p-component" [ngClass]="{ 'p-checkbox-focused': focused, 'p-variant-filled': tt.config.inputStyle() === 'filled' }" (click)="onClick($event)">
<div class="p-hidden-accessible">
<input type="checkbox" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()" tabindex="-1" />
</div>
<div #box [ngClass]="{ 'p-checkbox-box': true, 'p-highlight': checked, 'p-focus': focused, 'p-indeterminate': partialChecked, 'p-disabled': disabled }" role="checkbox" [attr.aria-checked]="checked">
<ng-container *ngIf="!tt.checkboxIconTemplate">
<CheckIcon [styleClass]="'p-checkbox-icon'" *ngIf="checked" />
<MinusIcon [styleClass]="'p-checkbox-icon'" *ngIf="partialChecked" />
</ng-container>
<span *ngIf="tt.checkboxIconTemplate">
<ng-template *ngTemplateOutlet="tt.checkboxIconTemplate; context: { $implicit: checked, partialSelected: partialChecked }"></ng-template>
</span>
</div>
</div>
`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: TreeTableService }, { type: i0.ChangeDetectorRef }], propDecorators: { disabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], rowNode: [{
type: Input,
args: ['value']
}] } });
export class TTHeaderCheckbox {
tt;
tableService;
cd;
boxViewChild;
checked;
focused;
disabled;
selectionChangeSubscription;
valueChangeSubscription;
constructor(tt, tableService, cd) {
this.tt = tt;
this.tableService = tableService;
this.cd = cd;
this.valueChangeSubscription = this.tt.tableService.uiUpdateSource$.subscribe(() => {
this.checked = this.updateCheckedState();
});
this.selectionChangeSubscription = this.tt.tableService.selectionSource$.subscribe(() => {
this.checked = this.updateCheckedState();
});
}
ngOnInit() {
this.checked = this.updateCheckedState();
}
onClick(event, checked) {
if ((this.tt.value || this.tt.filteredNodes) && (this.tt.value.length > 0 || this.tt.filteredNodes.length > 0)) {
this.tt.toggleNodesWithCheckbox(event, !checked);
}
DomHandler.clearSelection();
}
onFocus() {
this.focused = true;
}
onBlur() {
this.focused = false;
}
ngOnDestroy() {
if (this.selectionChangeSubscription) {
this.selectionChangeSubscription.unsubscribe();
}
if (this.valueChangeSubscription) {
this.valueChangeSubscription.unsubscribe();
}
}
updateCheckedState() {
this.cd.markForCheck();
let checked;
const data = this.tt.filteredNodes || this.tt.value;
if (data) {
if (this.tt.selectionKeys) {
for (let node of data) {
if (this.tt.isNodeSelected(node)) {
checked = true;
}
else {
checked = false;
break;
}
}
}
if (!this.tt.selectionKeys) {
// legacy selection support, will be removed in v18
for (let node of data) {
if (this.tt.isSelected(node)) {
checked = true;
}
else {
checked = false;
break;
}
}
}
}
else {
checked = false;
}
return checked;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTHeaderCheckbox, deps: [{ token: TreeTable }, { token: TreeTableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: TTHeaderCheckbox, selector: "p-treeTableHeaderCheckbox", host: { classAttribute: "p-element" }, viewQueries: [{ propertyName: "boxViewChild", first: true, predicate: ["box"], descendants: true }], ngImport: i0, template: `
<div class="p-checkbox p-component" [ngClass]="{ 'p-checkbox-focused': focused }" (click)="onClick($event, cb.checked)">
<div class="p-hidden-accessible">
<input #cb type="checkbox" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()" [disabled]="!tt.value || tt.value.length === 0" />
</div>
<div #box [ngClass]="{ 'p-checkbox-box': true, 'p-highlight': checked, 'p-focus': focused, 'p-disabled': !tt.value || tt.value.length === 0 }" role="checkbox" [attr.aria-checked]="checked">
<ng-container *ngIf="!tt.headerCheckboxIconTemplate">
<CheckIcon *ngIf="checked" [styleClass]="'p-checkbox-icon'" />
</ng-container>
<span class="p-checkbox-icon" *ngIf="tt.headerCheckboxIconTemplate">
<ng-template *ngTemplateOutlet="tt.headerCheckboxIconTemplate; context: { $implicit: checked }"></ng-template>
</span>
</div>
</div>
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => CheckIcon), selector: "CheckIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTHeaderCheckbox, decorators: [{
type: Component,
args: [{
selector: 'p-treeTableHeaderCheckbox',
template: `
<div class="p-checkbox p-component" [ngClass]="{ 'p-checkbox-focused': focused }" (click)="onClick($event, cb.checked)">
<div class="p-hidden-accessible">
<input #cb type="checkbox" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()" [disabled]="!tt.value || tt.value.length === 0" />
</div>
<div #box [ngClass]="{ 'p-checkbox-box': true, 'p-highlight': checked, 'p-focus': focused, 'p-disabled': !tt.value || tt.value.length === 0 }" role="checkbox" [attr.aria-checked]="checked">
<ng-container *ngIf="!tt.headerCheckboxIconTemplate">
<CheckIcon *ngIf="checked" [styleClass]="'p-checkbox-icon'" />
</ng-container>
<span class="p-checkbox-icon" *ngIf="tt.headerCheckboxIconTemplate">
<ng-template *ngTemplateOutlet="tt.headerCheckboxIconTemplate; context: { $implicit: checked }"></ng-template>
</span>
</div>
</div>
`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: TreeTableService }, { type: i0.ChangeDetectorRef }], propDecorators: { boxViewChild: [{
type: ViewChild,
args: ['box']
}] } });
export class TTEditableColumn {
tt;
el;
zone;
data;
field;
ttEditableColumnDisabled;
constructor(tt, el, zone) {
this.tt = tt;
this.el = el;
this.zone = zone;
}
ngAfterViewInit() {
if (this.isEnabled()) {
DomHandler.addClass(this.el.nativeElement, 'p-editable-column');
}
}
onClick(event) {
if (this.isEnabled()) {
this.tt.editingCellClick = true;
if (this.tt.editingCell) {
if (this.tt.editingCell !== this.el.nativeElement) {
if (!this.tt.isEditingCellValid()) {
return;
}
DomHandler.removeClass(this.tt.editingCell, 'p-cell-editing');
this.openCell();
}
}
else {
this.openCell();
}
}
}
openCell() {
this.tt.updateEditingCell(this.el.nativeElement, this.data, this.field);
DomHandler.addClass(this.el.nativeElement, 'p-cell-editing');
this.tt.onEditInit.emit({ field: this.field, data: this.data });
this.tt.editingCellClick = true;
this.zone.runOutsideAngular(() => {
setTimeout(() => {
let focusable = DomHandler.findSingle(this.el.nativeElement, 'input, textarea');
if (focusable) {
focusable.focus();
}
}, 50);
});
}
closeEditingCell() {
DomHandler.removeClass(this.tt.editingCell, 'p-checkbox-icon');
this.tt.editingCell = null;
this.tt.unbindDocumentEditListener();
}
onKeyDown(event) {
if (this.isEnabled()) {
//enter
if (event.keyCode == 13 && !event.shiftKey) {
if (this.tt.isEditingCellValid()) {
DomHandler.removeClass(this.tt.editingCell, 'p-cell-editing');
this.closeEditingCell();
this.tt.onEditComplete.emit({ field: this.field, data: this.data });
}
event.preventDefault();
}
//escape
else if (event.keyCode == 27) {
if (this.tt.isEditingCellValid()) {
DomHandler.removeClass(this.tt.editingCell, 'p-cell-editing');
this.closeEditingCell();
this.tt.onEditCancel.emit({ field: this.field, data: this.data });
}
event.preventDefault();
}
//tab
else if (event.keyCode == 9) {
this.tt.onEditComplete.emit({ field: this.field, data: this.data });
if (event.shiftKey)
this.moveToPreviousCell(event);
else
this.moveToNextCell(event);
}
}
}
findCell(element) {
if (element) {
let cell = element;
while (cell && !DomHandler.hasClass(cell, 'p-cell-editing')) {
cell = cell.parentElement;
}
return cell;
}
else {
return null;
}
}
moveToPreviousCell(event) {
let currentCell = this.findCell(event.target);
let row = currentCell.parentElement;
let targetCell = this.findPreviousEditableColumn(currentCell);
if (targetCell) {
DomHandler.invokeElementMethod(targetCell, 'click');
event.preventDefault();
}
}
moveToNextCell(event) {
let currentCell = this.findCell(event.target);
let row = currentCell.parentElement;
let targetCell = this.findNextEditableColumn(currentCell);
if (targetCell) {
DomHandler.invokeElementMethod(targetCell, 'click');
event.preventDefault();
}
}
findPreviousEditableColumn(cell) {
let prevCell = cell.previousElementSibling;
if (!prevCell) {
let previousRow = cell.parentElement ? cell.parentElement.previousElementSibling : null;
if (previousRow) {
prevCell = previousRow.lastElementChild;
}
}
if (prevCell) {
if (DomHandler.hasClass(prevCell, 'p-editable-column'))
return prevCell;
else
return this.findPreviousEditableColumn(prevCell);
}
else {
return null;
}
}
findNextEditableColumn(cell) {
let nextCell = cell.nextElementSibling;
if (!nextCell) {
let nextRow = cell.parentElement ? cell.parentElement.nextElementSibling : null;
if (nextRow) {
nextCell = nextRow.firstElementChild;
}
}
if (nextCell) {
if (DomHandler.hasClass(nextCell, 'p-editable-column'))
return nextCell;
else
return this.findNextEditableColumn(nextCell);
}
else {
return null;
}
}
isEnabled() {
return this.ttEditableColumnDisabled !== true;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTEditableColumn, deps: [{ token: TreeTable }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.7", type: TTEditableColumn, selector: "[ttEditableColumn]", inputs: { data: ["ttEditableColumn", "data"], field: ["ttEditableColumnField", "field"], ttEditableColumnDisabled: ["ttEditableColumnDisabled", "ttEditableColumnDisabled", booleanAttribute] }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)" }, classAttribute: "p-element" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTEditableColumn, decorators: [{
type: Directive,
args: [{
selector: '[ttEditableColumn]',
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { data: [{
type: Input,
args: ['ttEditableColumn']
}], field: [{
type: Input,
args: ['ttEditableColumnField']
}], ttEditableColumnDisabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], onClick: [{
type: HostListener,
args: ['click', ['$event']]
}], onKeyDown: [{
type: HostListener,
args: ['keydown', ['$event']]
}] } });
export class TreeTableCellEditor {
tt;
editableColumn;
templates;
inputTemplate;
outputTemplate;
constructor(tt, editableColumn) {
this.tt = tt;
this.editableColumn = editableColumn;
}
ngAfterContentInit() {
this.templates.forEach((item) => {
switch (item.getType()) {
case 'input':
this.inputTemplate = item.template;
break;
case 'output':
this.outputTemplate = item.template;
break;
}
});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableCellEditor, deps: [{ token: TreeTable }, { token: TTEditableColumn }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: TreeTableCellEditor, selector: "p-treeTableCellEditor", host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: `
<ng-container *ngIf="tt.editingCell === editableColumn.el.nativeElement">
<ng-container *ngTemplateOutlet="inputTemplate"></ng-container>
</ng-container>
<ng-container *ngIf="!tt.editingCell || tt.editingCell !== editableColumn.el.nativeElement">
<ng-container *ngTemplateOutlet="outputTemplate"></ng-container>
</ng-container>
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableCellEditor, decorators: [{
type: Component,
args: [{
selector: 'p-treeTableCellEditor',
template: `
<ng-container *ngIf="tt.editingCell === editableColumn.el.nativeElement">
<ng-container *ngTemplateOutlet="inputTemplate"></ng-container>
</ng-container>
<ng-container *ngIf="!tt.editingCell || tt.editingCell !== editableColumn.el.nativeElement">
<ng-container *ngTemplateOutlet="outputTemplate"></ng-container>
</ng-container>
`,
encapsulation: ViewEncapsulation.None,
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: TTEditableColumn }], propDecorators: { templates: [{
type: ContentChildren,
args: [PrimeTemplate]
}] } });
export class TTRow {
tt;
el;
zone;
get level() {
return this.rowNode?.['level'] + 1;
}
get styleClass() {
return this.rowNode?.node['styleClass'] || '';
}
get expanded() {
return this.rowNode?.node['expanded'];
}
rowNode;
constructor(tt, el, zone) {
this.tt = tt;
this.el = el;
this.zone = zone;
}
onKeyDown(event) {
switch (event.code) {
case 'ArrowDown':
this.onArrowDownKey(event);
break;
case 'ArrowUp':
this.onArrowUpKey(event);
break;
case 'ArrowRight':
this.onArrowRightKey(event);
break;
case 'ArrowLeft':
this.onArrowLeftKey(event);
break;
case 'Tab':
this.onTabKey(event);
break;
case 'Home':
this.onHomeKey(event);
break;
case 'End':
this.onEndKey(event);
break;
default:
break;
}
}
onArrowDownKey(event) {
let nextRow = this.el?.nativeElement?.nextElementSibling;
if (nextRow) {
this.focusRowChange(event.currentTarget, nextRow);
}
event.preventDefault();
}
onArrowUpKey(event) {
let prevRow = this.el?.nativeElement?.previousElementSibling;
if (prevRow) {
this.focusRowChange(event.currentTarget, prevRow);
}
event.preventDefault();
}
onArrowRightKey(event) {
const currentTarget = event.currentTarget;
const isHiddenIcon = DomHandler.findSingle(currentTarget, 'button').style.visibility === 'hidden';
if (!isHiddenIcon && !this.expanded && this.rowNode.node['children']) {
this.expand(event);
currentTarget.tabIndex = -1;
}
event.preventDefault();
}
onArrowLeftKey(event) {
const container = this.tt.containerViewChild?.nativeElement;
const expandedRows = DomHandler.find(container, '[aria-expanded="true"]');
const lastExpandedRow = expandedRows[expandedRows.length - 1];
if (this.expanded) {
this.collapse(event);
}
if (lastExpandedRow) {
this.tt.toggleRowIndex = DomHandler.index(lastExpandedRow);
}
this.restoreFocus();
event.preventDefault();
}
onHomeKey(event) {
const firstElement = DomHandler.findSingle(this.tt.containerViewChild?.nativeElement, `tr[aria-level="${this.level}"]`);
firstElement && DomHandler.focus(firstElement);
event.preventDefault();
}
onEndKey(event) {
const nodes = DomHandler.find(this.tt.containerViewChild?.nativeElement, `tr[aria-level="${this.level}"]`);
const lastElement = nodes[nodes.length - 1];
DomHandler.focus(lastElement);
event.preventDefault();
}
onTabKey(event) {
const rows = this.el.nativeElement ? [...DomHandler.find(this.el.nativeElement.parentNode, 'tr')] : undefined;
if (rows && ObjectUtils.isNotEmpty(rows)) {
const hasSelectedRow = rows.some((row) => DomHandler.getAttribute(row, 'data-p-highlight') || row.getAttribute('aria-checked') === 'true');
rows.forEach((row) => {
row.tabIndex = -1;
});
if (hasSelectedRow) {
const selectedNodes = rows.filter((node) => DomHandler.getAttribute(node, 'data-p-highlight') || node.getAttribute('aria-checked') === 'true');
selectedNodes[0].tabIndex = 0;
return;
}
rows[0].tabIndex = 0;
}
}
expand(event) {
this.tt.toggleRowIndex = DomHandler.index(this.el.nativeElement);
this.rowNode.node['expanded'] = true;
this.tt.updateSerializedValue();
this.tt.tableService.onUIUpdate(this.tt.value);
this.rowNode.node['children'] ? this.restoreFocus(this.tt.toggleRowIndex + 1) : this.restoreFocus();
this.tt.onNodeExpand.emit({
originalEvent: event,
node: this.rowNode.node
});
}
collapse(event) {
this.rowNode.node['expanded'] = false;
this.tt.updateSerializedValue();
this.tt.tableService.onUIUpdate(this.tt.value);
this.tt.onNodeCollapse.emit({ originalEvent: event, node: this.rowNode.node });
}
focusRowChange(firstFocusableRow, currentFocusedRow, lastVisibleDescendant) {
firstFocusableRow.tabIndex = '-1';
currentFocusedRow.tabIndex = '0';
DomHandler.focus(currentFocusedRow);
}
restoreFocus(index) {
this.zone.runOutsideAngular(() => {
setTimeout(() => {
const container = this.tt.containerViewChild?.nativeElement;
const row = DomHandler.findSingle(container, '.p-treetable-tbody').children[index || this.tt.toggleRowIndex];
const rows = [...DomHandler.find(container, 'tr')];
rows &&
rows.forEach((r) => {
if (!row.isSameNode(r)) {
r.tabIndex = -1;
}
});
if (row) {
row.tabIndex = 0;
row.focus();
}
}, 25);
});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTRow, deps: [{ token: TreeTable }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.7", type: TTRow, selector: "[ttRow]", inputs: { rowNode: ["ttRow", "rowNode"] }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "class": "'p-element ' + styleClass", "attr.tabindex": "'0'", "attr.aria-expanded": "expanded", "attr.aria-level": "level", "attr.data-pc-section": "row", "attr.role": "row" }, classAttribute: "p-element" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TTRow, decorators: [{
type: Directive,
args: [{
selector: '[ttRow]',
host: {
class: 'p-element',
'[class]': `'p-element ' + styleClass`,
'[attr.tabindex]': "'0'",
'[attr.aria-expanded]': 'expanded',
'[attr.aria-level]': 'level',
'[attr.data-pc-section]': 'row',
'[attr.role]': 'row'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { rowNode: [{
type: Input,
args: ['ttRow']
}], onKeyDown: [{
type: HostListener,
args: ['keydown', ['$event']]
}] } });
export class TreeTableToggler {
tt;
config;
rowNode;
constructor(tt, config) {
this.tt = tt;
this.config = config;
}
get toggleButtonAriaLabel() {
return this.config.translation ? (this.rowNode.expanded ? this.config.translation.aria.collapseRow : this.config.translation.aria.expandRow) : undefined;
}
onClick(event) {
this.rowNode.node.expanded = !this.rowNode.node.expanded;
if (this.rowNode.node.expanded) {
this.tt.onNodeExpand.emit({
originalEvent: event,
node: this.rowNode.node
});
}
else {
this.tt.onNodeCollapse.emit({
originalEvent: event,
node: this.rowNode.node
});
}
this.tt.updateSerializedValue();
this.tt.tableService.onUIUpdate(this.tt.value);
event.preventDefault();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableToggler, deps: [{ token: TreeTable }, { token: i1.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: TreeTableToggler, selector: "p-treeTableToggler", inputs: { rowNode: "rowNode" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
<button
type="button"
class="p-treetable-toggler p-link"
(click)="onClick($event)"
tabindex="-1"
pRipple
[style.visibility]="rowNode.node.leaf === false || (rowNode.node.children && rowNode.node.children.length) ? 'visible' : 'hidden'"
[style.marginLeft]="rowNode.level * 16 + 'px'"
[attr.data-pc-section]="'rowtoggler'"
[attr.data-pc-group-section]="'rowactionbutton'"
[attr.aria-label]="toggleButtonAriaLabel"
>
<ng-container *ngIf="!tt.togglerIconTemplate">
<ChevronDownIcon *ngIf="rowNode.node.expanded" [attr.aria-hidden]="true" />
<ChevronRightIcon *ngIf="!rowNode.node.expanded" [attr.aria-hidden]="true" />
</ng-container>
<ng-template *ngTemplateOutlet="tt.togglerIconTemplate; context: { $implicit: rowNode.node.expanded }"></ng-template>
</button>
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i5.Ripple), selector: "[pRipple]" }, { kind: "component", type: i0.forwardRef(() => ChevronDownIcon), selector: "ChevronDownIcon" }, { kind: "component", type: i0.forwardRef(() => ChevronRightIcon), selector: "ChevronRightIcon" }], encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableToggler, decorators: [{
type: Component,
args: [{
selector: 'p-treeTableToggler',
template: `
<button
type="button"
class="p-treetable-toggler p-link"
(click)="onClick($event)"
tabindex="-1"
pRipple
[style.visibility]="rowNode.node.leaf === false || (rowNode.node.children && rowNode.node.children.length) ? 'visible' : 'hidden'"
[style.marginLeft]="rowNode.level * 16 + 'px'"
[attr.data-pc-section]="'rowtoggler'"
[attr.data-pc-group-section]="'rowactionbutton'"
[attr.aria-label]="toggleButtonAriaLabel"
>
<ng-container *ngIf="!tt.togglerIconTemplate">
<ChevronDownIcon *ngIf="rowNode.node.expanded" [attr.aria-hidden]="true" />
<ChevronRightIcon *ngIf="!rowNode.node.expanded" [attr.aria-hidden]="true" />
</ng-container>
<ng-template *ngTemplateOutlet="tt.togglerIconTemplate; context: { $implicit: rowNode.node.expanded }"></ng-template>
</button>
`,
encapsulation: ViewEncapsulation.None,
host: {
class: 'p-element'
}
}]
}], ctorParameters: () => [{ type: TreeTable }, { type: i1.PrimeNGConfig }], propDecorators: { rowNode: [{
type: Input
}] } });
export class TreeTableModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: TreeTableModule, declarations: [TreeTable, TreeTableToggler, TTScrollableView, TTBody, TTSortableColumn, TTSortIcon, TTResizableColumn, TTRow, TTReorderableColumn, TTSelectableRow, TTSelectableRowDblClick, TTContextMenuRow, TTCheckbox, TTHeaderCheckbox, TTEditableColumn, TreeTableCellEditor], imports: [CommonModule, PaginatorModule, RippleModule, ScrollerModule, SpinnerIcon, ArrowDownIcon, ArrowUpIcon, SortAltIcon, SortAmountUpAltIcon, SortAmountDownIcon, CheckIcon, MinusIcon, ChevronDownIcon, ChevronRightIcon], exports: [TreeTable, SharedModule, TreeTableToggler, TTSortableColumn, TTSortIcon, TTResizableColumn, TTRow, TTReorderableColumn, TTSelectableRow, TTSelectableRowDblClick, TTContextMenuRow, TTCheckbox, TTHeaderCheckbox, TTEditableColumn, TreeTableCellEditor, ScrollerModule] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableModule, imports: [CommonModule, PaginatorModule, RippleModule, ScrollerModule, SpinnerIcon, ArrowDownIcon, ArrowUpIcon, SortAltIcon, SortAmountUpAltIcon, SortAmountDownIcon, CheckIcon, MinusIcon, ChevronDownIcon, ChevronRightIcon, SharedModule,
ScrollerModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TreeTableModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, PaginatorModule, RippleModule, ScrollerModule, SpinnerIcon, ArrowDownIcon, ArrowUpIcon, SortAltIcon, SortAmountUpAltIcon, SortAmountDownIcon, CheckIcon, MinusIcon, ChevronDownIcon, ChevronRightIcon],
exports: [
TreeTable,
SharedModule,
TreeTableToggler,
TTSortableColumn,
TTSortIcon,
TTResizableColumn,
TTRow,
TTReorderableColumn,
TTSelectableRow,
TTSelectableRowDblClick,
TTContextMenuRow,
TTCheckbox,
TTHeaderCheckbox,
TTEditableColumn,
TreeTableCellEditor,
ScrollerModule
],
declarations: [
TreeTable,
TreeTableToggler,
TTScrollableView,
TTBody,
TTSortableColumn,
TTSortIcon,
TTResizableColumn,
TTRow,
TTReorderableColumn,
TTSelectableRow,
TTSelectableRowDblClick,
TTContextMenuRow,
TTCheckbox,
TTHeaderCheckbox,
TTEditableColumn,
TreeTableCellEditor
]
}]
}] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJlZXRhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL3RyZWV0YWJsZS90cmVldGFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxRQUFRLEVBQUUsaUJBQWlCLEVBQUUsTUF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ICAgICAgICAgICAgICAgICAgIDxzcGFuICpuZ0lmPVwibG9hZGluZ0ljb25UZW1wbGF0ZVwiIGNsYXNzPVwicC10cmVldGFibGUtbG9hZGluZy1pY29uXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLXRlbXBsYXRlICpuZ1RlbXBsYXRlT3V0bGV0PVwibG9hZGluZ0ljb25UZW1wbGF0ZVwiPjwvbmctdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2ICpuZ0lmPVwiY2FwdGlvblRlbXBsYXRlXCIgY2xhc3M9XCJwLXRyZWV0YWJsZS1oZWFkZXJcIj5cbiAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ1RlbXBsYXRlT3V0bGV0PVwiY2FwdGlvblRlbXBsYXRlXCI+PC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxwLXBhZ2luYXRvclxuICAgICAgICAgICAgICAgIFtyb3dzXT1cInJvd3NcIlxuICAgICAgICAgICAgICAgIFtmaXJzdF09XCJmaXJzdFwiXG4gICAgICAgICAgICAgICAgW3RvdGFsUmVjb3Jkc109XCJ0b3RhbFJlY29yZHNcIlxuICAgICAgICAgICAgICAgIFtwYWdlTGlua1NpemVdPVwicGFnZUxpbmtzXCJcbiAgICAgICAgICAgICAgICBzdHlsZUNsYXNzPVwicC1wYWdpbmF0b3ItdG9wXCJcbiAgICAgICAgICAgICAgICBbYWx3YXlzU2hvd109XCJhbHdheXNTaG93UGFnaW5hdG9yXCJcbiAgICAgICAgICAgICAgICAob25QYWdlQ2hhbmdlKT1cIm9uUGFnZUNoYW5nZSgkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICBbcm93c1BlclBhZ2VPc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2R5VGVtcGxhdGVcIj48L3Rib2R5PlxuICAgICAgICAgICAgICAgICAgICA8dGZvb3QgY2xhc3M9XCJwLXRyZWV0YWJsZS10Zm9vdFwiIHJvbGU9XCJyb3dncm91cFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cImZvb3RlclRlbXBsYXRlOyBjb250ZXh0OiB7ICRpbXBsaWNpdDogY29sdW1ucyB9XCI+PC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgICAgIDwvdGZvb3Q+XG4gICAgICAgICAgICAgICAgPC90YWJsZT5cbiAgICAgICAgICAgIDwvZGl2PlxuXG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwicC10cmVldGFibGUtc2Nyb2xsYWJsZS13cmFwcGVyXCIgKm5nSWY9XCJzY3JvbGxhYmxlXCI+XG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICBjbGFzcz1cInAtdHJlZXRhYmxlLXNjcm9sbGFibGUtdmlldyBwLXRyZWV0YWJsZS1mcm96ZW4tdmlld1wiXG4gICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiZnJvemVuQ29sdW1ucyB8fCBmcm96ZW5Cb2R5VGVtcGxhdGVcIlxuICAgICAgICAgICAgICAgICAgICAjc2Nyb2xsYWJsZUZyb3plblZpZXdcbiAgICAgICAgICAgICAgICAgICAgW3R0U2Nyb2xsYWJsZVZpZXddPVwiZnJvemVuQ29sdW1uc1wiXG4gICAgICAgICAgICAgICAgICAgIFtmcm96ZW5dPVwidHJ1ZVwiXG4gICAgICAgICAgICAgICAgICAgIFtuZ1N0eWxlXT1cInsgd2lkdGg6IGZyb3plbldpZHRoIH1cIlxuICAgICAgICAgICAgICAgICAgICBbc2Nyb2xsSGVpZ2h0XT1cInNjcm9sbEhlaWdodFwiXG4gICAgICAgICAgICAgICAgPjwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc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pbmVyPlxuICAgICAgICAgICAgICAgIDwvbmctdGVtcGxhdGU+XG5cbiAgICAgICAgICAgICAgICA8bmctdGVtcGxhdGUgcFRlbXBsYXRlPVwicHJldmlvdXNwYWdlbGlua2ljb25cIiAqbmdJZj1cInBhZ2luYXRvclByZXZpb3VzUGFnZUxpbmtJY29uVGVtcGxhdGVcIj5cbiAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cInBhZ2luYXRvclByZXZpb3VzUGFnZUxpbmtJY29uVGVtcGxhdGVcIj48L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICA8L25nLXRlbXBsYXRlPlxuXG4gICAgICAgICAgICAgICAgPG5nLXRlbXBsYXRlIHBUZW1wbGF0ZT1cImxhc3RwYWdlbGlua2ljb25cIiAqbmdJZj1cInBhZ2luYXRvckxhc3RQYWdlTGlua0ljb25UZW1wbGF0ZVwiPlxuICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ1RlbXBsYXRlT3V0bGV0PVwicGFnaW5hdG9yTGFzdFBhZ2VMaW5rSWNvblRlbXBsYXRlXCI+PC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cblxuICAgICAgICAgICAgICAgIDxuZy10ZW1wbGF0ZSBwVGVtcGxhdGU9XCJuZXh0cGFnZWxpbmtpY29uXCIgKm5nSWY9XCJwYWdpbmF0b3JOZXh0UGFnZUxpbmtJY29uVGVtcGxhdGVcIj5cbiAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cInBhZ2luYXRvck5leHRQYWdlTGlua0ljb25UZW1wbGF0ZVwiPjwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgICAgICAgICA8L3AtcGFnaW5hdG9yPlxuICAgICAgICAgICAgPGRpdiAqbmdJZj1cInN1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AgICAgICAgICAgIGNhc2UgJ2NhcHRpb24nOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNhcHRpb25UZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnaGVhZGVyJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oZWFkZXJUZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnYm9keSc6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYm9keVRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdmb290ZXInOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmZvb3RlclRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdzdW1tYXJ5JzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdW1tYXJ5VGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ2NvbGdyb3VwJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jb2xHcm91cFRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdlbXB0eW1lc3NhZ2UnOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmVtcHR5TWVzc2FnZVRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdwYWdpbmF0b3JsZWZ0JzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYWdpbmF0b3JMZWZ0VGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ3BhZ2luYXRvcnJpZ2h0JzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYWdpbmF0b3JSaWdodFRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdwYWdpbmF0b3Jkcm9wZG93bml0ZW0nOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBhZ2luYXRvckRyb3Bkb3duSXRlbVRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdmcm96ZW5oZWFkZXInOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmZyb3plbkhlYWRlclRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdmcm96ZW5ib2R5JzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5mcm96ZW5Cb2R5VGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ2Zyb3plbmZvb3Rlcic6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZnJvemVuRm9vdGVyVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ2Zyb3plbmNvbGdyb3VwJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5mcm96ZW5Db2xHcm91cFRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdsb2FkaW5naWNvbic6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubG9hZGluZ0ljb25UZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAncmVvcmRlcmluZGljYXRvcnVwaWNvbic6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVvcmRlckluZGljYXRvclVwSWNvblRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdyZW9yZGVyaW5kaWNhdG9yZG93bmljb24nOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlb3JkZXJJbmRpY2F0b3JEb3duSWNvblRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdzb3J0aWNvbic6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc29ydEljb25UZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnY2hlY2tib3hpY29uJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGVja2JveEljb25UZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnaGVhZGVyY2hlY2tib3hpY29uJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oZWFkZXJDaGVja2JveEljb25UZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAndG9nZ2xlcmljb24nOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLnRvZ2dsZXJJY29uVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ3BhZ2luYXRvcmZpcnN0cGFnZWxpbmtpY29uJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYWdpbmF0b3JGaXJzdFBhZ2VMaW5rSWNvblRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdwYWdpbmF0b3JsYXN0cGFnZWxpbmtpY29uJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYWdpbmF0b3JMYXN0UGFnZUxpbmtJY29uVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ3BhZ2luYXRvcnByZXZpb3VzcGFnZWxpbmtpY29uJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYWdpbmF0b3JQcmV2aW91c1BhZ2VMaW5rSWNvblRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdwYWdpbmF0b3JuZXh0cGFnZWxpbmtpY29uJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYWdpbmF0b3JOZXh0UGFnZUxpbmtJY29uVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgY29uc3RydWN0b3Io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bHNlIHRoaXMuc2VyaWFsaXplTm9kZXMobnVsbCwgdGhpcy5maWx0ZXJlZE5vZGVzIHx8IHRoaXMudmFsdWUsIDAsIHRydWUpO1xuICAgIH1cblxuICAgIHNlcmlhbGl6ZU5vZGVzKHBhcmVudDogTnVsbGFibGU8VHJlZVRhYmxlTm9kZT4sIG5vZGVzOiBOdWxsYWJsZTxUcmVlTm9kZVtdPiwgbGV2ZWw6IE51bGxhYmxlPG51bWJlcj4sIHZpc2libGU6IE51bGxhYmxlPGJvb2xlYW4+KSB7XG4gICAgICAgIGlmIChub2RlcyAmJiBub2Rlcy5sZW5ndGgpIHtcbiAgICAgICAgICAgIGZvciAobGV0IG5vZGUgb2Ygbm9kZXMpIHtcbiAgICAgICAgICAgICAgICBub2RlLnBhcmVudCA9IDxUcmVlVGFibGVOb2RlPnBhcmVudDtcbiAgICAgICAgICAgICAgICBjb25zdCByb3dOb2RlID0ge1xuICAgICAgICAgICAgICAgICAgICBub2RlOiBub2RlLFxuICAgICAgICAgICAgICAgICAgICBwYXJlbnQ6IHBhcmVudCxcbiAgICAgICAgICAgICAgICAgICAgbGV2ZWw6IGxldmVsLFxuICAgICAgICAgICAgICAgICAgICB2aXNpYmxlOiB2aXNpYmxlICYmIChwYXJlbnQgPyBwYXJlbnQuZXhwYW5kZWQgOiB0cnVlKVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgKDxUcmVlTm9kZVtdPnRoaXMuc2VyaWFsaXplZFZhbHVlKS5wdXNoKDxUcmVlVGFibGVOb2RlPnJvd05vZGUpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHJvd05vZGUudmlzaWJsZSAmJiBub2RlLmV4cGFuZGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VyaWFsaXplTm9kZXMobm9kZSwgbm9kZS5jaGlsZHJlbiwgPG51bWJlcj5sZXZlbCArIDEsIHJvd05vZGUudmlzaWJsZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgc2VyaWFsaXplUGFnZU5vZGVzKCkge1xuICAgICAgICBsZXQgZGF0YSA9IHRoaXMuZmlsdGVyZWROb2RlcyB8fCB0aGlzLnZhbHVlO1xuICAgICAgICB0aGlzLnNlcmlhbGl6ZWRWYWx1ZSA9IFtdO1xuICAgICAgICBpZiAoZGF0YSAmJiBkYXRhLmxlbmd0aCkge1xuICAgICAgICAgICAgY29uc3QgZmlyc3QgPSB0aGlzLmxhenkgPyAwIDogdGhpcy5maXJzdDtcblxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IGZpcnN0OyBpIDwgZmlyc3QgKyA8bnVtYmVyPnRoaXMucm93czsgaSsrKSB7XG4gICAgICAgICAgICAgICAgbGV0IG5vZGUgPSBkYXRhW2ldO1xuICAgICAgICAgICAgICAgIGlmIChub2RlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VyaWFsaXplZFZhbHVlLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZTogbm9kZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudDogPGFueT5udWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV2ZWw6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICB2aXNpYmxlOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VyaWFsaXplTm9kZXMobm9kZSwgbm9kZS5jaGlsZHJlbiwgMSwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgdXBkYXRlc2VsZWN0ZWRLZXlzKCkge1xuICAgICAgICBpZiAodGhpcy5kYXRhS2V5ICYmIHRoaXMuX3NlbGVjdGlvbikge1xuICAgICAgICAgICAgdGhpcy5zZWxlY3RlZEtleXMgPSB7fTtcbiAgICAgICAgICAgIGlmIChBc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6IDxzdHJpbmc+ZXZlbnQuZmllbGQsIG9yZGVyOiBzb3J0TWV0YS5vcmRlciAqIC0xIH1dO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnJlc2V0UGFnZU9uU29ydCAmJiB0aGlzLnNjcm9sbGFibGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVzZXRTY3JvbGxUb3AoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHNvcnRNZXRhLm9yZGVyID0gc29ydE1ldGEub3JkZXIgKiAtMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICghbWV0YUtleSB8fCAhdGhpcy5tdWx0aVNvcnRNZXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX211bHRpU29ydE1ldGEgPSBbXTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5yZXNldFBhZ2VPblNvcnQgJiYgdGhpcy5zY3JvbGxhYmxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc2V0U2Nyb2xsVG9wKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKDxTb3J0TWV0YVtdPnRoaXMubXVsdGlTb3J0TWV0YSkucHVzaCh7IGZpZWxkOiA8c3RyaW5nPmV2ZW50LmZpZWxkLCBvcmRlcjogdGhpcy5kZWZhdWx0U29ydE9yZGVyIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnNvcnRNdWx0aXBsZSgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgc29ydFNpbmdsZSgpIHtcbiAgICAgICAgaWYgKHRoaXMuc29ydEZpZWxkICYmIHRoaXMuc29ydE9yZGVyKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5sYXp5KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vbkxhenlMb2FkLmVtaXQodGhpcy5jcmVhdGVMYXp5TG9hZE1ldGFkYXRhKCkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zb3J0Tm9kZXModGhpcy52YWx1ZSk7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5oYXNGaWx0ZXIoKSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9maWx0ZXIoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBzb3J0TWV0YTogU29ydE1ldGEgPSB7XG4gICAgICAgICAgICAgICAgZmllbGQ6IHRoaXMuc29ydEZpZWxkLFxuICAgICAgICAgICAgICAgIG9yZGVyOiB0aGlzLnNvcnRPcmRlclxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy5vblNvcnQuZW1pdChzb3J0TWV0YSk7XG4gICAgICAgICAgICB0aGlzLnRhYmxlU2VydmljZS5vblNvcnQoc29ydE1ldGEpO1xuICAgICAgICAgICAgdGhpcy51cGRhdGVTZXJpYWxpemVkVmFsdWUoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHNvcnROb2Rlcyhub2RlczogVHJlZU5vZGVbXSkge1xuICAgICAgICBpZiAoIW5vZGVzIHx8IG5vZGVzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuY3VzdG9tU29ydCkge1xuICAgICAgICAgICAgdGhpcy5zb3J0RnVuY3Rpb24uZW1pdCh7XG4gICAgICAgICAgICAgICAgZGF0YTogbm9kZXMsXG4gICAgICAgICAgICAgICAgbW9kZTogdGhpcy5zb3J0TW9kZSxcbiAgICAgICAgICAgICAgICBmaWVsZDogPHN0cmluZz50aGlzLnNvcnRGaW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gICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKGxldCBub2RlIG9mIG5vZGVzKSB7XG4gICAgICAgICAgICB0aGlzLnNvcnROb2Rlcyhub2RlLmNoaWxkcmVuIGFzIFRyZWVOb2RlW10pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgc29ydE11bHRpcGxlKCkge1xuICAgICAgICBpZiAodGhpcy5tdWx0aVNvcnRNZXRhKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5sYXp5KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vbkxhenlMb2FkLmVtaXQodGhpcy5jcmVhdGVMYXp5TG9hZE1ldGFkYXRhKCkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zb3J0TXVsdGlwbGVOb2Rlcyh0aGlzLnZhbHVlKTtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmhhc0ZpbHRlcigpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZpbHRlcigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5vblNvcnQuZW1pdCh7XG4gICAgICAgICAgICAgICAgbXVsdGlzb3J0bWV0YTogdGhpcy5tdWx0aVNvcnRNZXRhXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlU2VyaWFsaXplZFZhbHVlKCk7XG4gICAgICAgICAgICB0aGlzLnRhYmxlU2VydmljZS5vblNvcnQodGhpcy5tdWx0aVNvcnRNZXRhKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHNvcnRNdWx0aXBsZU5vZGVzKG5vZGVzOiBUcmVlTm9kZVtdKSB7XG4gICAgICAgIGlmICghbm9kZXMgfHwgbm9kZXMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpc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gICAgICByZXR1cm4gbXVsdGlTb3J0TWV0YVtpbmRleF0ub3JkZXIgKiA8bnVtYmVyPnJlc3VsdDtcbiAgICB9XG5cbiAgICBnZXRTb3J0TWV0YShmaWVsZDogc3RyaW5nKSB7XG4gICAgICAgIGlmICh0aGlzLm11bHRpU29ydE1ldGEgJiYgdGhpcy5tdWx0aVNvcnRNZXRhLmxlbmd0aCkge1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLm11bHRpU29ydE1ldGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5tdWx0aVNvcnRNZXRhW2ldLmZpZWxkID09PSBmaWVsZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5tdWx0aVNvcnRNZXRhW2ldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGlzU29ydGVkKGZpZWxkOiBzdHJpbmcpIHtcbiAgICAgICAgaWYgKHRoaXMuc29ydE1vZGUgPT09ICdzaW5nbGUnKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5zb3J0RmllbGQgJiYgdGhpcy5zb3J0RmllbGQgPT09IGZpZWxkO1xuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuc29ydE1vZGUgPT09ICdtdWx0aXBsZScpIHtcbiAgICAgICAgICAgIGxldCBzb3J0ZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIGlmICh0aGlzLm11bHRpU29ydE1ldGEpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMubXVsdGlTb3J0TWV0YS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5tdWx0aVNvcnRNZXRhW2ldLmZpZWxkID09IGZpZWxkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzb3J0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc29ydGVkO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgY3JlYXRlTGF6eUxvYWRNZXRhZGF0YSgpOiBhbnkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZmlyc3Q6IHRoaXMuZmlyc3QsXG4gICAgICAgICAgICByb3dzOiB0aGlzLnJvd3MsXG4gICAgICAgICAgICBzb3J0RmllbGQ6IHRoaXMuc29ydEZpZWxkLFxuICAgICAgICAgICAgc29ydE9yZGVyOiB0aGlzLnNvcnRPcmRlcixcbiAgICAgICAgICAgIGZpbHRlcnM6IHRoaXMuZmlsdGVycyxcbiAgICAgICAgICAgIGdsb2JhbEZpbHRlcjogdGhpcy5maWx0ZXJzICYmIHRoaXMuZmlsdGVyc1snZ2xvYmFsJ10gPyB0aGlzLmZpbHRlcnNbJ2dsb2JhbCddLnZhbHVlIDogbnVsbCxcbiAgICAgICAgICAgIG11bHRpU29ydE1ldGE6IHRoaXMubXVsdGlTb3J0TWV0YSxcbiAgICAgICAgICAgIGZvcmNlVXBkYXRlOiAoKSA9PiB0aGlzLmNkLmRldGVjdENoYW5nZXMoKVxuICAgICAgICB9O1xuICAgIH1cblxuICAgIG9uTGF6eUl0ZW1Mb2FkKGV2ZW50OiBUcmVlVGFibGVMYXp5TG9hZEV2ZW50KSB7XG4gICAgICAgIHRoaXMub25MYXp5TG9hZC5lbWl0KHtcbiAgICAgICAgICAgIC4uLnRoaXMuY3JlYXRlTGF6eUxvYWRNZXRhZGF0YSgpLFxuICAgICAgICAgICAgLi4uZXZlbnQsXG4gICAgICAgICAgICByb3dzOiBldmVudC5sYXN0IC0gZXZlbnQuZmlyc3RcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIC8qKlxuICAgICAqIFJlc2V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aWV3Q2hpbGQpLm5hdGl2ZUVsZW1lbnQub2Zmc2V0TGVmdCAtIDxudW1iZXI+dGhpcy5sYXN0UmVzaXplckhlbHBlclg7XG4gICAgICAgIGxldCBjb2x1bW5XaWR0aCA9IGNvbHVtbi5vZmZzZXRXaWR0aDtcbiAgICAgICAgbGV0IG5ld0NvbHVtbldpZHRoID0gY29sdW1uV2lkdGggKyBkZWx0YTtcbiAgICAgICAgbGV0IG1pbldpZHRoID0gY29sdW1uLnN0eWxlLm1pbldpZHRoIHx8IDE1O1xuXG4gICAgICAgIGlmIChjb2x1bW5XaWR0aCArIGRlbHRhID4gcGFyc2VJbnQobWluV2lkdGgpKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5jb2x1bW5SZXNpemVNb2RlID09PSAnZml0Jykge1xuICAgICAgICAgICAgICAgIGxldCBuZXh0Q29sdW1uID0gY29sdW1uLm5leHRFbGVtZW50U2libGluZztcbiAgICAgICAgICAgICAgICB3aGlsZSAoIW5leHRDb2x1bW4ub2Zmc2V0UGFyZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIG5leHRDb2x1bW4gPSBuZXh0Q29sdW1uLm5leHRFbGVtZW50U2libGluZztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAobmV4dENvbHVtbikge1xuICAgICAgICAgICAgICAgICAgICBsZXQgbmV4dENvbHVtbldpZHRoID0gbmV4dENvbHVtbi5vZmZzZXRXaWR0aCAtIGRlbHRhO1xuICAgICAgICAgICAgICAgICAgICBsZXQgbmV4dENvbHVtbk1pbldpZHRoID0gbmV4dENvbHVtbi5zdHlsZS5taW5XaWR0aCB8fCAxNTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAobmV3Q29sdW1uV2lkdGggPiAxNSAmJiBuZXh0Q29sdW1uV2lkdGggPiBwYXJzZUludChuZXh0Q29sdW1uTWluV2lkdGgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5zY3JvbGxhYmxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNjcm9sbGFibGVWaWV3ID0gdGhpcy5maW5kUGFyZW50U2Nyb2xsYWJsZVZpZXcoY29sdW1uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2Nyb2xsYWJsZUJvZHlUYWJsZSA9IERvbUhhbmRsZXIuZmluZFNpbmdsZShzY3JvbGxhYmxlVmlldywgJy5wLXRyZWV0YWJsZS1zY3JvbGxhYmxlLWJvZHkgdGFibGUnKSB8fCBEb21IYW5kbGVyLmZpbmRTaW5nbGUoc2Nyb2xsYWJsZVZpZXcsICcucC1zY3JvbGxlci12aWV3cG9ydCB0YWJsZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzY3JvbGxhYmxlSGVhZGVyVGFibGUgPSBEb21IYW5kbGVyLmZpbmRTaW5nbGUoc2Nyb2xsYWJsZVZpZXcsICd0YWJsZS5wLXRyZWV0YWJsZS1zY3JvbGxhYmxlLWhlYWRlci10YWJsZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzY3JvbGxhYmxlRm9vdGVyVGFibGUgPSBEb21IYW5kbGVyLmZpbmRTaW5nbGUoc2Nyb2xsYWJsZVZpZXcsICd0YWJsZS5wLXRyZWV0YWJsZS1zY3JvbGxhYmxlLWZvb3Rlci10YWJsZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXNpemVDb2x1bW5JbmRleCA9IERvbUhhbmRsZXIuaW5kZXgoY29sdW1uKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVzaXplQ29sR3JvdXAoc2Nyb2xsYWJsZUhlYWRlclRhYmxlLCByZXNpemVDb2x1bW5JbmRleCwgbmV3Q29sdW1uV2lkdGgsIG5leHRDb2x1bW5XaWR0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXNpemVDb2xHcm91cChzY3JvbGxhYmxlQm9keVRhYmxlLCByZXNpemVDb2x1bW5JbmRleCwgbmV3Q29sdW1uV2lkdGgsIG5leHRDb2x1bW5XaWR0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXNpemVDb2xHcm91cChzY3JvbGxhYmxlRm9vdGVyVGFibGUsIHJlc2l6ZUNvbHVtbkluZGV4LCBuZXdDb2x1bW5XaWR0aCwgbmV4dENvbHVtbldpZHRoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sdW1uLnN0eWxlLndpZHRoID0gbmV3Q29sdW1uV2lkdGggKyAncHgnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXh0Q29sdW1uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5leHRDb2x1bW4uc3R5bGUud2lkdGggPSBuZXh0Q29sdW1uV2lkdGggKyAncHgnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5jb2x1bW5SZXNpemVNb2RlID09PSAnZXhwYW5kJykge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNjcm9sbGFibGUpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNjcm9sbGFibGVWaWV3ID0gdGhpcy5maW5kUGFyZW50U2Nyb2xsYWJsZVZpZXcoY29sdW1uKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNjcm9sbGFibGVCb2R5ID0gRG9tSGFuZGxlci5maW5kU2luZ2xlKHNjcm9sbGFibGVWaWV3LCAnLnAtdHJlZXRhYmxlLXNjcm9sbGFibGUtYm9keScpIHx8IERvbUhhbmRsZXIuZmluZFNpbmdsZShzY3JvbGxhYmxlVmlldywgJy5wLXNjcm9sbGV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SA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29udGFpbmVyICYmIHRhYmxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyLnN0eWxlLndpZHRoID0gaXNDb250YWluZXJJblZpZXdwb3J0ID8gd2lkdGggKyBEb21IYW5kbGVyLmNhbGN1bGF0ZVNjcm9sbGJhcldpZHRoKHNjcm9sbGFibGVCb2R5KSArICdweCcgOiAnYXV0byc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFibGUuc3R5bGUud2lkdGggPSB3aWR0aCArICdweCc7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgICAgc2V0V2lkdGgoc2Nyb2xsYWJsZUJvZHksIHNjcm9sbGFibGVCb2R5VGFibGUsIHNjcm9sbGFibGVCb2R5VGFibGVXaWR0aCwgaXNDb250YWluZXJJblZpZXdwb3J0KTtcbiAgICAgICAgICAgICAgICAgICAgc2V0V2lkdGgoc2Nyb2xsYWJsZUhlYWRlciwgc2Nyb2xsYWJsZUhlYWRlclRhYmxlLCBzY3JvbGxhYmxlSGVhZGVyVGFibGVXaWR0aCwgaXNDb250YWluZXJJblZpZXdwb3J0KTtcbiAgICAgICAgICAgICAgICAgICAgc2V0V2lkdGgoc2Nyb2xsYWJsZUZvb3Rlciwgc2Nyb2xsYWJsZUZvb3RlclRhYmxlLCBzY3JvbGxhYmxlSGVhZGVyVGFibGVXaWR0aCwgaXNDb250YWluZXJJblZpZXdwb3J0KTtcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc2l6ZUNvbEdyb3VwKHNjcm9sbGFibGVIZWFkZXJUYWJsZSwgcmVzaXplQ29sdW1uSW5kZXgsIG5ld0NvbHVtbldpZHRoLCBudWxsKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXNpemVDb2xHcm91cChzY3JvbGxhYmxlQm9keVRhYmxlLCByZXNpemVDb2x1bW5JbmRleCwgbmV3Q29sdW1uV2lkdGgsIG51bGwpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc2l6ZUNvbEdyb3VwKHNjcm9sbGFibGVGb290ZXJUYWJsZSwgcmVzaXplQ29sdW1uSW5kZXgsIG5ld0NvbHVtbldpZHRoLCBudWxsKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAoPEVsZW1lbnRSZWY+dGhpcy50YWJsZVZpZXdDaGlsZCkubmF0aXZlRWxlbWVudC5zdHlsZS53aWR0aCA9IHRoaXMudGFibGVWaWV3Q2hpbGQ/Lm5hdGl2ZUVsZW1lbnQub2Zmc2V0V2lkdGggKyBkZWx0YSArICdweCc7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbi5zdHlsZS53aWR0aCA9IG5ld0NvbHVtbldpZHRoICsgJ3B4JztcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRhaW5lcldpZHRoID0gdGhpcy50YWJsZVZpZXdDaGlsZD8ubmF0aXZlRWxlbWVudC5zdHlsZS53aWR0aDtcbiAgICAgICAgICAgICAgICAgICAgKDxFbGVtZW50UmVmPnRoaXMuY29udGFpbmVyVmlld0NoaWxkKS5uYXRpdmVFbGVtZW50LnN0eWxlLndpZHRoID0gY29udGFpbmVyV2lkdGggKyAncHgnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5vbkNvbFJlc2l6ZS5lbWl0KHtcbiAgICAgICAgICAgICAgICBlbGVtZW50OiBjb2x1bW4sXG4gICAgICAgICAgICAgICAgZGVsdGE6IGRlbHRhXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgICh0aGlzLnJlc2l6ZUhlbHBlclZpZXdDaGlsZCBhcyBFbGVtZW50UmVmKS5uYXRpdmVFbGVtZW50LnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG4gICA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vcEluZGV4ID4gZHJhZ0luZGV4ICYmIHRoaXMuZHJvcFBvc2l0aW9uID09PSAtMSkge1xuICAgICAgICAgICAgICAgIGRyb3BJbmRleCA9IGRyb3BJbmRleCAtIDE7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChhbGxvd0Ryb3ApIHtcbiAgICAgICAgICAgICAgICBPYmplY3RVdGlscy5yZW9yZGVyQXJyYXkoPGFueVtdPnRoaXMuY29sdW1ucywgZHJhZ0luZGV4LCBkcm9wSW5kZXgpO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5vbkNvbFJlb3JkZXIuZW1pdCh7XG4gICAgICAgICAgICAgICAgICAgIGRyYWdJbmRleDogZHJhZ0luZGV4LFxuICAgICAgICAgICAgICAgICAgICBkcm9wSW5kZXg6IGRyb3BJbmRleCxcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uczogdGhpcy5jb2x1bW5zXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICg8RWxlbWVudFJlZj50aGlzLnJlb3JkZXJJbmRpY2F0b3JVcFZpZXdDaGlsZCkubmF0aXZlRWxlbWVudC5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnO1xuICAgICAgICAgICAgKDxFbGVtZW50UmVmPnRoaXMucmVvcmRlckluZGljYXRvckRvd25WaWV3Q2hpbGQpLm5hdGl2ZUVsZW1lbnQuc3R5bGUuZGlzcGxheSA9ICdub25lJztcbiAgICAgICAgICAgICh0aGlzLmRyYWdnZWRDb2x1bW4gYXMgYW55KS5kcmFnZ2FibGUgPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuZHJhZ2dlZENvbHVtbiA9IG51bGw7XG4gICAgICAgICAgICB0aGlzLmRyb3BQb3NpdGlvbiA9IG51bGw7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBoYW5kbGVSb3dDbGljayhldmVudDogYW55KSB7XG4gICAgICAgIGxldCB0YXJnZXROb2RlID0g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S2V5IHx8IGtleWJvYXJkRXZlbnQuY3RybEtleTtcblxuICAgICAgICAgICAgICAgIGlmIChzZWxlY3RlZCAmJiBtZXRhS2V5KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmlzU2luZ2xlU2VsZWN0aW9uTW9kZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb24gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZEtleXMgPSB7fTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uQ2hhbmdlLmVtaXQobnVsbCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2VsZWN0aW9uSW5kZXggPSB0aGlzLmZpbmRJbmRleEluU2VsZWN0aW9uKHJvd05vZGUubm9kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb24gPSB0aGlzLnNlbGVjdGlvbi5maWx0ZXIoKHZhbDogVHJlZVRhYmxlTm9kZSwgaTogbnVtYmVyKSA9PiBpICE9IHNlbGVjdGlvbkluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uQ2hhbmdlLmVtaXQodGhpcy5zZWxlY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGFLZXlWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLnNlbGVjdGVkS2V5c1tkYXRhS2V5VmFsdWVdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vbk5vZGVVbnNlbGVjdC5lbWl0KHsgb3JpZ2luYWxFdmVudDogZXZlbnQub3JpZ2luYWxFdmVudCwgbm9kZTogPFRyZWVUYWJsZU5vZGU+cm93Tm9kZS5ub2RlLCB0eXBlOiAncm93JyB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5pc1NpbmdsZVNlbGVjdGlvbk1vZGUoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2VsZWN0aW9uID0gcm93Tm9kZS5ub2RlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb25DaGFuZ2UuZW1pdChyb3dOb2RlLm5vZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGFLZXlWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRLZXlzID0ge307XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZEtleXNbZGF0YUtleVZhbHVlXSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5pc011bHRpcGxlU2VsZWN0aW9uTW9kZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobWV0YUtleSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbiA9IHRoaXMuc2VsZWN0aW9uIHx8IFtdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb24gPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkS2V5cyA9IHt9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb24gPSBbLi4udGhpcy5zZWxlY3Rpb24sIHJvd05vZGUubm9kZV07XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbkNoYW5nZS5lbWl0KHRoaXMuc2VsZWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhS2V5VmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkS2V5c1tkYXRhS2V5VmFsdWVdID0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMub25Ob2RlU2VsZWN0LmVtaXQoeyBvcmlnaW5hbEV2ZW50OiBldmVudC5vcmlnaW5hbEV2ZW50LCBub2RlOiByb3dOb2RlLm5vZGUsIHR5cGU6ICdyb3cnLCBpbmRleDogKDxhbnk+ZXZlbnQpLnJvd0luZGV4IH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2VsZWN0aW9uTW9kZSA9PT0gJ3NpbmdsZScpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb24gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZEtleXMgPSB7fTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uQ2hhbmdlLmVtaXQodGhpcy5zZWxlY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vbk5vZGVVbnNlbGVjdC5lbWl0KHsgb3JpZ2luYWxFdmVudDogZXZlbnQub3JpZ2luYWxFdmVudCwgbm9kZTogPFRyZWVUYWJsZU5vZGU+cm93Tm9kZS5ub2RlLCB0eXBlOiAncm93JyB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbiA9IHJvd05vZGUubm9kZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uQ2hhbmdlLmVtaXQodGhpcy5zZWxlY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vbk5vZGVTZWxlY3QuZW1pdCh7IG9yaWdpbmFsRXZlbnQ6IGV2ZW50Lm9yaWdpbmFsRXZlbnQsIG5vZGU6IHJvd05vZGUubm9kZSwgdHlwZTogJ3JvdycsIGluZGV4OiBldmVudC5yb3dJbmRleCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhS2V5VmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkS2V5cyA9IHt9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRLZXlzW2RhdGFLZXlWYWx1ZV0gPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnNlbGVjdGlvbk1vZGUgPT09ICdtdWx0aXBsZScpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2VsZWN0aW9uSW5kZXggPSB0aGlzLmZpbmRJbmRleEluU2VsZWN0aW9uKHJvd05vZGUubm9kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3Rpb24gPSB0aGlzLnNlbGVjdGlvbi5maWx0ZXIoKHZhbDogVHJlZVRhYmxlTm9kZSwgaTogbnVtYmVyKSA9PiBpICE9IHNlbGVjdGlvbkluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uQ2hhbmdlLmVtaXQodGhpcy5zZWxlY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vbk5vZGVVbnNlbGVjdC5lbWl0KHsgb3JpZ2luYWxFdmVudDogZXZlbnQub3JpZ2luYWxFdmVudCwgbm9kZTogcm93Tm9kZS5ub2RlLCB0eXBlOiAncm93JyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhS2V5VmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5zZWxlY3RlZEtleXNbZGF0YUtleVZhbHVlXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbiA9IHRoaXMuc2VsZWN0aW9uID8gWy4uLnRoaXMuc2VsZWN0aW9uLCByb3dOb2RlLm5vZGVdIDogW3Jvd05vZGUubm9kZV07XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbkNoYW5nZS5lbWl0KHRoaXMuc2VsZWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub25Ob2RlU2VsZWN0LmVtaXQoeyBvcmlnaW5hbEV2ZW50OiBldmVudC5vcmlnaW5hbEV2ZW50LCBub2RlOiByb3dOb2RlLm5vZGUsIHR5cGU6ICdyb3cnLCBpbmRleDogZXZlbnQucm93SW5kZXggfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YUtleVZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZEtleXNbZGF0YUtleVZhbHVlXSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMudGFibGVTZXJ2aWNlLm9uU2VsZWN0aW9uQ2hhbmdlKCk7XG4gICAgICAgIH1cblxuICAgICAgICB0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XQgZGF0YUtleVZhbHVlID0gdGhpcy5kYXRhS2V5ID8gU3RyaW5nKE9iamVjdFV0aWxzLnJlc29sdmVGaWVsZERhdGEobm9kZS5kYXRhLCB0aGlzLmRhdGFLZXkpKSA6IG51bGw7XG5cbiAgICAgICAgICAgICAgICBpZiAoIXNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmlzU2luZ2xlU2VsZWN0aW9uTW9kZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbiA9IG5vZGU7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbkNoYW5nZS5lbWl0KG5vZGUpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuaXNNdWx0aXBsZVNlbGVjdGlvbk1vZGUoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb24gPSBbbm9kZV07XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbkNoYW5nZS5lbWl0KHRoaXMuc2VsZWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhS2V5VmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRLZXlzW2RhdGFLZXlWYWx1ZV0gPSAxO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5jb250ZXh0TWVudS5zaG93KGV2ZW50Lm9yaWdpbmFsRXZlbnQpO1xuICAgICAgICAgICAgICAgIHRoaXMub25Db250ZXh0TWVudVNlbGVjdC5lbWl0KHsgb3JpZ2luYWxFdmVudDogZXZlbnQub3JpZ2luYWxFdmVudCwgbm9kZTogbm9kZSB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAg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JblNlbGVjdGlvbihub2RlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdGlvbiA9IHRoaXMuc2VsZWN0aW9uLmZpbHRlcigodmFsOiBhbnksIGk6IG51bWJlcikgPT4gaSAhPSBpbmRleCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhS2V5VmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5zZWxlY3RlZEtleXNbZGF0YUtleVZhbHVlXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChjaGlsZFBhcnRpYWxTZWxlY3RlZCB8fCAoc2VsZWN0ZWRDaGlsZENvdW50ID4gMCAmJiBzZWxlY3RlZENoaWxkQ291bnQgIT0gbm9kZS5jaGlsZHJlbi5sZW5ndGgpKSBub2RlLnBhcnRpYWxTZWxlY3RlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgZWxzZSBub2RlLnBhcnRpYWxTZWxlY3RlZCA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgbGV0IHBhcmVudCA9IG5vZGUucGFyZW50O1xuICAgICAgICBub2RlLmNoZWNrZWQgPSBzZWxlY3Q7XG4gICAgICAgIGlmIChwYXJlbnQpIHtcbiAgICAgICAgICAgIHRoaXMucHJvcGFnYXRlU2VsZWN0aW9uVXAocGFyZW50LCBzZWxlY3QpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJvcGFnYXRlU2VsZWN0aW9uRG93bihub2RlOiBUcmVlVGFibGVOb2RlLCBzZWxlY3Q6IGJvb2xlYW4pIHtcbiAgICAgICAgLy8gbGVnYWN5IHNlbGVjdGlvbiBzdXBwb3J0LCB3aWxsIGJlIH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gICAgdGhpcy5wcm9wYWdhdGVTZWxlY3Rpb25Eb3duKGNoaWxkLCBzZWxlY3QpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaXNTZWxlY3RlZChub2RlOiBUcmVlVGFibGVOb2RlKSB7XG4gICAgICAgIC8vIGxlZ2FjeSBzZWxlY3Rpb24gc3VwcG9ydCwgd2lsbCBiZSByZW1vdmVkIGluIHYxOFxuICAgICAgICBpZiAobm9kZSAmJiB0aGlzLnNlbGVjdGlvbikge1xuICAgICAgICAgICAgaWYgKHRoaXMuZGF0YUtleSkge1xuICAgICAgICAgICAgICAgIGlmIChub2RlLmhhc093blByb3BlcnR5KCdjaGVja2VkJykpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vZGVbJ2NoZWNrZWQnXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zZWxlY3RlZEtleXNbT2JqZWN0VXRpbHMucmVzb2x2ZUZpZWxkRGF0YShub2RlLmRhdGEsIHRoaXMuZGF0YUtleSldICE9PSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh0aGlzLnNlbGVjdGlvbikpIHJldHVybiB0aGlzLmZpbmRJbmRleEluU2VsZWN0aW9uKG5vZGUpID4gLTE7XG4gICAgICAgICAgICAgICAgZWxzZSByZXR1cm4gdGhpcy5lcXVhbHMobm9kZSwgdGhpcy5zZWxlY3Rpb24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIGlzTm9kZVNlbGVjdGVkKG5vZGUpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuc2VsZWN0aW9uTW9kZSAmJiB0aGlzLnNlbGVjdGlvbktleXMgPyB0aGlz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ycmF5LmlzQXJyYXkoZmlsdGVyKSAmJiBmaWx0ZXIubGVuZ3RoID09IDApKSByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIGVsc2UgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cblxuICAgIF9maWx0ZXIoKSB7XG4gICAgICAgIGlmICh0aGlzLmxhenkpIHtcbiAgICAgICAgICAgIHRoaXMub25MYXp5TG9hZC5lbWl0KHRoaXMuY3JlYXRlTGF6eUxvYWRNZXRhZGF0YSgpKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICghdGhpcy52YWx1ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCF0aGlzLmhhc0ZpbHRlcigpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5maWx0ZXJlZE5vZGVzID0gbnVsbDtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wYWdpbmF0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50b3RhbFJlY29yZHMgPSB0aGlzLnZhbHVlID8gdGhpcy52YWx1ZS5sZW5ndGggOiAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbGV0IGdsb2JhbEZpbHRlckZpZWxkc0FycmF5O1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmZpbHRlcnNbJ2dsb2JhbCddKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5jb2x1bW5zICYmICF0aGlzLmdsb2JhbEZpbHRlckZpZWxkcykgdGhyb3cgbmV3IEVycm9yKCdHbG9iYWwgZmlsdGVyaW5nIHJlcXVpcmVzIGR5bmFtaWMgY29sdW1ucyBvciBnbG9iYWxGaWx0ZXJGaWVsZHMgdG8gYmUgZGVmaW5lZC4nKTtcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBnbG9iYWxGaWx0ZXJGaWVsZHNBcnJheSA9IHRoaXMuZ2xvYmFsRmlsdGVyRmllbGRzIHx8IHRoaXMuY29sdW1ucztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLmZpbHRlcmVkTm9kZXMgPSBbXTtcbiAgICAgICAgICAgICAgICBjb25zdCBpc1N0cmljdE1vZGUgPSB0aGlzLmZpbHRlck1vZGUgPT09ICdzdHJpY3QnO1xuICAgICAgICAgICAgICAgIGxldCBpc1ZhbHVlQ2hhbmdlZCA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgbm9kZSBvZiB0aGlzLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBjb3B5Tm9kZSA9IHsgLi4ubm9kZSB9O1xuICAgICAgICAgICAgICAgICAgICBsZXQgbG9jYWxNYXRjaCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGxldCBnbG9iYWxNYXRjaCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBsZXQgcGFyYW1zV2l0aG91dE5vZGU7XG5cbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgcHJvcCBpbiB0aGlzLmZpbHRlcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmZpbHRlcnMuaGFzT3duUHJvcGVydHkocHJvcCkgJiYgcHJvcCAhPT0gJ2dsb2JhbCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZmlsdGVyTWV0YSA9IDxGaWx0ZXJNZXRhZGF0YT50aGlzLmZpbHRlcnNbcHJvcF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZpbHRlckZpZWxkID0gcHJvcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZmlsdGVyVmFsdWUgPSBmaWx0ZXJNZXRhLnZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmaWx0ZXJNYXRjaE1vZGUgPSBmaWx0ZXJNZXRhLm1hdGNoTW9kZSB8fCAnc3RhcnRzV2l0aCc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZpbHRlckNvbnN0cmFpbnQgPSAoPGFueT50aGlzLmZpbHRlclNlcnZpY2UpLmZpbHRlcnNbZmlsdGVyTWF0Y2hNb2RlXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNXaXRob3V0Tm9kZSA9IHsgZmlsdGVyRmllbGQsIGZpbHRlclZhbHVlLCBmaWx0ZXJDb25zdHJhaW50LCBpc1N0cmljdE1vZGUgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpc1N0cmljdE1vZGUgJiYgISh0aGlzLmZpbmRGaWx0ZXJlZE5vZGVzKGNvcHlOb2RlLCBwYXJhbXNXaXRob3V0Tm9kZSkgfHwgdGhpcy5pc0ZpbHRlck1hdGNoZWQoY29weU5vZGUsIHBhcmFtc1dpdGhvdXROb2RlKSkpIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICghaXNTdHJpY3RNb2RlICYmICEodGhpcy5pc0ZpbHRlck1hdGNoZWQoY29weU5vZGUsIHBhcmFtc1dpdGhvdXROb2RlKSB8fCB0aGlzLmZpbmRGaWx0ZXJlZE5vZGVzKGNvcHlOb2RlLCBwYXJhbXNXaXRob3V0Tm9kZSkpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhbE1hdGNoID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFsb2NhbE1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmZpbHRlcnNbJ2dsb2JhbCddICYmICFnbG9iYWxNYXRjaCAmJiBnbG9iYWxGaWx0ZXJGaWVsZHNBcnJheSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvcHlOb2RlRm9yR2xvYmFsID0geyAuLi5jb3B5Tm9kZSB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZpbHRlckZpZWxkID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZpbHRlclZhbHVlID0gdGhpcy5maWx0ZXJzWydnbG9iYWwnXS52YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmaWx0ZXJDb25zdHJhaW50ID0gKDxhbnk+dGhpcy5maWx0ZXJTZXJ2aWNlKS5maWx0ZXJzWyg8YW55PnRoaXMuZmlsdGVycylbJ2dsb2JhbCddLm1hdGNoTW9kZV07XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNXaXRob3V0Tm9kZSA9IHsgZmlsdGVyRmllbGQsIGZpbHRlclZhbHVlLCBmaWx0ZXJDb25zdHJhaW50LCBpc1N0cmljdE1vZGUsIGdsb2JhbEZpbHRlckZpZWxkc0FycmF5IH07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaXNTdHJpY3RNb2RlICYmICh0aGlzLmZpbmRGaWx0ZXJlZE5vZGVzKGNvcHlOb2RlRm9yR2xvYmFsLCBwYXJhbXNXaXRob3V0Tm9kZSkgfHwgdGhpcy5pc0ZpbHRlck1hdGNoZWQoY29weU5vZGVGb3JHbG9iYWwsIHBhcmFtc1dpdGhvdXROb2RlKSkpIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCFpc1N0cmljdE1vZGUgJiYgKHRoaXMuaXNGaWx0ZXJNYXRjaGVkKGNvcHlOb2RlRm9yR2xvYmFsLCBwYXJhbXNXaXRob3V0Tm9kZSkgfHwgdGhpcy5maW5kRmlsdGVyZWROb2Rlcyhjb3B5Tm9kZUZvckdsb2JhbCwgcGFyYW1zV2l0aG91dE5vZGUpKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdsb2JhbE1hdGNoID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3B5Tm9kZSA9IGNvcHlOb2RlRm9yR2xvYmFsO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IG1hdGNoZXMgPSBsb2NhbE1hdGNoO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5maWx0ZXJzWydnbG9iYWwnXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlcyA9IGxvY2FsTWF0Y2ggJiYgZ2xvYmFsTWF0Y2g7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAobWF0Y2hlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5maWx0ZXJlZE5vZGVzLnB1c2goY29weU5vZGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaXNWYWx1ZUNoYW5nZWQgPSBpc1ZhbHVlQ2hhbmdlZCB8fCAhbG9jYWxNYXRjaCB8fCBnbG9iYWxNYXRjaCB8fCAobG9jYWxNYXRjaCAmJiB0aGlzLmZpbHRlcmVkTm9kZXMubGVuZ3RoID4gMCkgfHwgKCFnbG9iYWxNYXRjaCAmJiB0aGlzLmZpbHRlcmVkTm9kZXMubGVuZ3RoID09PSAwKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBp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AgICAgICAgICAgIGxldCBtYXRjaGVkID0gZmFsc2U7XG4gICAgICAgICAgICBpZiAobm9kZS5jaGlsZHJlbikge1xuICAgICAgICAgICAgICAgIGxldCBjaGlsZE5vZGVzID0gWy4uLm5vZGUuY2hpbGRyZW5dO1xuICAgICAgICAgICAgICAgIG5vZGUuY2hpbGRyZW4gPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBjaGlsZE5vZGUgb2YgY2hpbGROb2Rlcykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgY29weUNoaWxkTm9kZSA9IHsgLi4uY2hpbGROb2RlIH07XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmlzRmlsdGVyTWF0Y2hlZChjb3B5Q2hpbGROb2RlLCBwYXJhbXNXaXRob3V0Tm9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5jaGlsZHJlbi5wdXNoKGNvcHlDaGlsZE5vZGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAobWF0Y2hlZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaXNGaWx0ZXJNYXRjaGVkKG5vZGU6IFRyZWVUYWJsZU5vZGUsIGZpbHRlck9wdGlvbnM6IFRyZWVUYWJsZUZpbHRlck9wdGlvbnMpIHtcbiAgICAgICAgbGV0IHsgZmlsdGVyRmllbGQsIGZpbHRlclZhbHVlLCBmaWx0ZXJDb25zdHJhaW50LCBpc1N0cmljdE1vZGUsIGdsb2JhbEZpbHRlckZpZWxkc0FycmF5IH0gPSA8YW55PmZpbHRlck9wdGlvbnM7XG4gICAgICAgIGxldCBtYXRjaGVkID0gZmFsc2U7XG4gICAgICAgIGNvbnN0IGlzT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lcih0aGlzLnBsYXRmb3JtSWQpKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5zY3JvbGxIZWFkZXJWaWV3Q2hpbGQgJiYgdGhpcy5zY3JvbGxIZWFkZXJWaWV3Q2hpbGQubmF0aXZlRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmhlYWRlclNjcm9sbExpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVyU2Nyb2xsTGlzdGVuZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oZWFkZXJTY3JvbGxMaXN0ZW5lciA9IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5zY3JvbGxGb290ZXJWaWV3Q2hpbGQgJiYgdGhpcy5zY3JvbGxGb290ZXJWaWV3Q2hpbGQubmF0aXZlRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmZvb3RlclNjcm9sbExpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZm9vdGVyU2Nyb2xsTGlzdGVuZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5mb290ZXJTY3JvbGxMaXN0ZW5lciA9IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5zY3JvbGxCb2R5Vmlld0NoaWxkICYmIHRoaXMuc2Nyb2xsQm9keVZpZXdDaGlsZC5uYXRpdmVFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuYm9keVNjcm9sbExpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYm9keVNjcm9sbExpc3RlbmVyKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYm9keVNjcm9sbExpc3RlbmVyID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAg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gICAgICAgICAgdGhpcy51cGRhdGVTb3J0U3RhdGUoKTtcbiAgICAgICAgICAgIHRoaXMudHQuc29ydCh7XG4gICAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZXZlbnQsXG4gICAgICAgICAgICAgICAgZmllbGQ6IHRoaXMuZmllbGRcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBEb21IYW5kbGVyLmNsZWFyU2VsZWN0aW9uKCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdrZXlkb3duLmVudGVyJywgWyckZXZlbnQnXSlcbiAgICBvbkVudGVyS2V5KGV2ZW50OiBNb3VzZUV2ZW50KSB7XG4gICAgICAgIHRoaXMub25DbGljayhldmVudCk7XG4gICAgfVxuXG4gICAgaXNFbmFibGVkKCkge1xuICAgICAgICByZXR1cm4gdGhpcy50dFNvcnRhYmxlQ29sdW1uRGlzYWJsZWQgIT09IHRydWU7XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIGlmICh0aGlzLnN1YnNjcmlwdGlvbikge1xuICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuQENvbXBvbmVudCh7XG4gICAgc2VsZWN0b3I6ICdwLXRyZWVUYWJsZVNvcnRJY29uJyxcbiAgICB0ZW1wbGF0ZTogYCA8bmctY29udGFpbmVyICpuZ0lmPVwiIXR0LnNvcnRJY29uVGVtcGxhdGVcIj5cbiAgICAgICAgICAgIDxTb3J0QWx0SWNvbiBbc3R5bGVDbGFzc109XCIncC1zb3J0YWJsZS1jb2x1bW4taWNvbidcIiAqbmdJZj1cInNvcnRPcmRlciA9PT0gMFwiIC8+XG4gICAgICAgICAgICA8U29ydEFtb3VudFVwQWx0SWNvbiBbc3R5bGVDbGFzc109XCIncC1zb3J0YWJsZS1jb2x1bW4taWNvbidcIiAqbmdJZj1cInNvcnR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nQsICdkcmFnZW50ZXInLCB0aGlzLm9uRHJhZ0VudGVyLmJpbmQodGhpcykpO1xuICAgICAgICAgICAgICAgIHRoaXMuZHJhZ0xlYXZlTGlzdGVuZXIgPSB0aGlzLnJlbmRlcmVyLmxpc3Rlbih0aGlzLmVsLm5hdGl2ZUVsZW1lbnQsICdkcmFnbGVhdmUnLCB0aGlzLm9uRHJhZ0xlYXZlLmJpbmQodGhpcykpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB1bmJpbmRFdmVudHMoKSB7XG4gICAgICAgIGlmIChpc1BsYXRmb3JtQnJvd3Nlcih0aGlzLnBsYXRmb3JtSWQpKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5tb3VzZURvd25MaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgIHRoaXMubW91c2VEb3duTGlzdGVuZXIoKTtcbiAgICAgICAgICAgICAgICB0aGlzLm1vdXNlRG93bkxpc3RlbmVyID0gbnVsbDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuZHJhZ092ZXJMaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgIHRoaXMuZHJhZ092ZXJMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgIHRoaXMuZHJhZ092ZXJMaXN0ZW5lciA9IG51bGw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmRyYWdFbnRlckxpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5kcmFnRW50ZXJMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgIHRoaXMuZHJhZ0VudGVyTGlzdGVuZXIgPSBudWxsO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5kcmFnTGVhdmVMaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgIHRoaXMuZHJhZ0xlYXZlTGlzdGVuZXIoKTtcbiAgICAgICAgICAgICAgICB0aGlzLmRy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gcHVibGljIHRhYmxlU2VydmljZTogVHJlZVRhYmxlU2VydmljZSkge1xuICAgICAgICBpZiAodGhpcy5pc0VuYWJsZWQoKSkge1xuICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb24gPSB0aGlzLnR0LnRhYmxlU2VydmljZS5zZWxlY3Rpb25Tb3VyY2UkLnN1YnNjcmliZSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZCA9IHRoaXMudHQuaXNTZWxlY3RlZCh0aGlzLnJvd05vZGUubm9kZSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBpZiAodGhpcy5pc0VuYWJsZWQoKSkge1xuICAgICAgICAgICAgdGhpcy5zZWxlY3RlZCA9IHRoaXMudHQuaXNTZWxlY3RlZCh0aGlzLnJvd05vZGUubm9kZSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdjbGljaycsIFsnJGV2ZW50J10pXG4gICAgb25DbGljayhldmVudDogRXZlbnQpIHtcbiAgICAgICAgaWYgKHRoaXMuaXNFbmFibGVkKCkpIHtcbiAgICAgICAgICAgIHRoaXMudHQuaGFuZGxlUm93Q2xpY2soe1xuICAgICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGV2ZW50LFxuICAgICAgICAgICAgICAgIHJvd05vZGU6IHRoaXMucm93Tm9kZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdrZXlkb3duJywgWyckZXZlbnQnXSlcbiAgICBvbktleURvd24oZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHtcbiAgICAgICAgc3dpdGNoIChldmVudC5jb2RlKSB7XG4gICAgICAgICAgICBjYXNlICdFbnRlcic6XG4gICAgICAgICAgICBjYXNlICdTcGFjZSc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkVudGVyS2V5KGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIEBIb3N0TGlzdGVuZXIoJ3RvdWNoZW5kJywgWyckZXZlbnQnXSlcbiAgICBvblRvdWNoRW5kKGV2ZW50OiBFdmVudCkge1xuICAgICAgICBpZiAodGhpcy5pc0VuYWJsZWQoKSkge1xuICAgICAgICAgICAgdGhpcy50dC5oYW5kbGVSb3dUb3VjaEVuZChldmVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbkVudGVyS2V5KGV2ZW50KSB7XG4gICAgICAgIGlmICh0aGlzLnR0LnNlbGVjdGlvbk1vZGUgPT09ICdjaGVja2JveCcpIHtcbiAgICAgICAgICAgIHRoaXMudHQudG9nZ2xlTm9kZVdpdGhDaGVja2JveCh7XG4gICAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZXZlbnQsXG4gICAgICAgICAgICAgICAgcm93Tm9kZTogdGhpcy5yb3dOb2RlXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMub25DbGljayhldmVudCk7XG4gICAgICAgIH1cbiAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICB9XG5cbiAgICBpc0VuYWJsZWQoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnR0U2VsZWN0YWJsZVJvd0Rpc2FibGVkICE9PSB0cnVlO1xuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICBpZiAodGhpcy5zdWJzY3JpcHRpb24pIHtcbiAgICAgICAgICAgIHRoaXMuc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgIH1cbiAgICB9XG59XG5cbkBEaXJlY3RpdmUoe1xuICAgIHNlbGVjdG9yOiAnW3R0U2VsZWN0YWJsZVJvd0RibENs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aGVjaygpO1xuICAgICAgICBsZXQgY2hlY2tlZCE6IGJvb2xlYW47XG4gICAgICAgIGNvbnN0IGRhdGEgPSB0aGlzLnR0LmZpbHRlcmVkTm9kZXMgfHwgdGhpcy50dC52YWx1ZTtcblxuICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgICAgaWYgKHRoaXMudHQuc2VsZWN0aW9uS2V5cykge1xuICAgICAgICAgICAgICAgIGZvciAobGV0IG5vZGUgb2YgZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy50dC5pc05vZGVTZWxlY3RlZChub2RlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghdGhpcy50dC5zZWxlY3Rpb25LZXlzKSB7XG4gICAgICAgICAgICAgICAgLy8gbGVnYWN5IHNlbGVjdGlvbiBzdXBwb3J0LCB3aWxsIGJlIHJlbW92ZWQgaW4gdjE4XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgbm9kZSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnR0LmlzU2VsZWN0ZWQobm9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZ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IHRydWU7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnR0LmVkaXRpbmdDZWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudHQuZWRpdGluZ0NlbGwgIT09IHRoaXMuZWwubmF0aXZlRWxlbWVudCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMudHQuaXNFZGl0aW5nQ2VsbFZhbGlkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIERvbUhhbmRsZXIucmVtb3ZlQ2xhc3ModGhpcy50dC5lZGl0aW5nQ2VsbCwgJ3AtY2VsbC1lZGl0aW5nJyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMub3BlbkNlbGwoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMub3BlbkNlbGwoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9wZW5DZWxsKCkge1xuICAgICAgICB0aGlzLnR0LnVwZGF0ZUVkaXRpbmdDZWxsKHRoaXMuZWwubmF0aXZlRWxlbWVudCwgdGhpcy5kYXRhLCB0aGlzLmZpZWxkKTtcbiAgICAgICAgRG9tSGFuZGxlci5hZGRDbGFzcyh0aGlzLmVsLm5hdGl2ZUVsZW1lbnQsICdwLWNlbGwtZWRpdGluZycpO1xuICAgICAgICB0aGlzLnR0Lm9uRWRpdEluaXQuZW1pdCh7IGZpZWxkOiB0aGlzLmZpZWxkLCBkYXRhOiB0aGlzLmRhdGEgfSk7XG4gICAgICAgIHRoaXMudHQuZWRpdGluZ0NlbGxDbGljayA9IHRydWU7XG4gICAgICAgIHRoaXMuem9uZS5ydW5PdXRzaWRlQW5ndWxhcigoKSA9PiB7XG4gICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICBsZXQgZm9jdXNhYmxlID0gRG9tSGFuZGxlci5maW5kU2luZ2xlKHRoaXMuZWwubmF0aXZlRWxlbWVudCwgJ2lucHV0LCB0ZXh0YXJlYScpO1xuICAgICAgICAgICAgICAgIGlmIChmb2N1c2FibGUpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9jdXNhYmxlLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgNTApO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBjbG9zZUVkaXRpbmdDZWxsKCkge1xuICAgICAgICBEb21IYW5kbGVyLnJlbW92ZUNsYXNzKHRoaXMudHQuZWRpdGluZ0NlbGwsICdwLWNoZWNrYm94LWljb24nKTtcbiAgICAgICAgdGhpcy50dC5lZGl0aW5nQ2VsbCA9IG51bGw7XG4gICAgICAgIHRoaXMudHQudW5iaW5kRG9jdW1lbnRFZGl0TGlzdGVuZXIoKTtcbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdrZXlkb3duJywgWyckZXZlbnQnXSlcbiAgICBvbktleURvd24oZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHtcbiAgICAgICAgaWYgKHRoaXMuaXNFbmFibGVkKCkpIHtcbiAgICAgICAgICAgIC8vZW50ZXJcbiAgICAgICAgICAgIGlmIChldmVudC5rZXlDb2RlID09IDEzICYmICFldmVudC5zaGlmdEtleSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnR0LmlzRWRpdGluZ0NlbGxWYWxpZCgpKSB7XG4gICAgICAgICAgICAgICAgICAgIERvbUhhbmRsZXIucmVtb3ZlQ2xhc3ModGhpcy50dC5lZGl0aW5nQ2VsbCwgJ3AtY2VsbC1lZGl0aW5nJyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2xvc2VFZGl0aW5nQ2VsbCgpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnR0Lm9uRWRpdENvbXBsZXRlLmVtaXQoeyBmaWVsZDogdGhpcy5maWVsZCwgZGF0YTogdGhpcy5kYXRhIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vZXNjYXBlXG4gICAgICAgICAgICBlbHNlIGlmIChldmVudC5rZXlDb2RlID09IDI3KSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudHQuaXNFZGl0aW5nQ2VsbFZhbGlkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgRG9tSGFuZGxlci5yZW1vdmVDbGFzcyh0aGlzLnR0LmVkaXRpbmdDZWxsLCAncC1jZWxsLWVkaXRpbmcnKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jbG9zZUVkaXRpbmdDZWxsKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudHQub25FZGl0Q2FuY2VsLmVtaXQoeyBmaWVsZDogdGhpcy5maWVsZCwgZGF0YTogdGhpcy5kYXRhIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vdGFiXG4gICAgICAgICAgICBlbHNlIGlmIChldmVudC5rZXlDb2RlID09IDkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnR0Lm9uRWRpdENvbXBsZXRlLmVtaXQoeyBmaWVsZDogdGhpcy5maWVsZCwgZGF0YTogdGhpcy5kYXRhIH0pO1xuXG4gICAgICAgICAgICAgICAgaWYgKGV2ZW50LnNoaWZ0S2V5KSB0aGlzLm1vdmVUb1ByZXZpb3VzQ2VsbChldmVudCk7XG4gICAgICAgICAgICAgICAgZWxzZSB0aGlzLm1vdmVUb05leHRDZWxsKGV2ZW50KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZpbmRDZWxsKGVsZW1lbnQ6IGFueSkge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E5leHRFZGl0YWJsZUNvbHVtbihjdXJyZW50Q2VsbCk7XG5cbiAgICAgICAgaWYgKHRhcmdldENlbGwpIHtcbiAgICAgICAgICAgIERvbUhhbmRsZXIuaW52b2tlRWxlbWVudE1ldGhvZCh0YXJnZXRDZWxsLCAnY2xpY2snKTtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmaW5kUHJldmlvdXNFZGl0YWJsZUNvbHVtbihjZWxsOiBhbnkpOiBFbGVtZW50IHwgbnVsbCB7XG4gICAgICAgIGxldCBwcmV2Q2VsbCA9IGNlbGwucHJldmlvdXNFbGVtZW50U2libGluZztcblxuICAgICAgICBpZiAoIXByZXZDZWxsKSB7XG4gICAgICAgICAgICBsZXQgcHJldmlvdXNSb3cgPSBjZWxsLnBhcmVudEVsZW1lbnQgPyBjZWxsLnBhcmVudEVsZW1lbnQucHJldmlvdXNFbGVtZW50U2libGluZyA6IG51bGw7XG4gICAgICAgICAgICBpZiAocHJldmlvdXNSb3cpIHtcbiAgICAgICAgICAgICAgICBwcmV2Q2VsbCA9IHByZXZpb3VzUm93Lmxhc3RFbGVtZW50Q2hpbGQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocHJldkNlbGwpIHtcbiAgICAgICAgICAgIGlmIChEb21IYW5kbGVyLmhhc0NsYXNzKHByZXZDZWxsLCAncC1lZGl0YWJsZS1jb2x1bW4nKSkgcmV0dXJuIHByZXZDZWxsO1xuICAgICAgICAgICAgZWxzZSByZXR1cm4gdGhpcy5maW5kUHJldmlvdXNFZGl0YWJsZUNvbHVtbihwcmV2Q2VsbCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZpbmROZXh0RWRpdGFibGVDb2x1bW4oY2VsbDogRWxlbWVudCk6IEVsZW1lbnQgfCBudWxs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T8ubm9kZVsnZXhwYW5kZWQnXTtcbiAgICB9XG5cbiAgICBASW5wdXQoJ3R0Um93Jykgcm93Tm9kZTogYW55O1xuXG4gICAgY29uc3RydWN0b3IocHVibGljIHR0OiBUcmVlVGFibGUsIHB1YmxpYyBlbDogRWxlbWVudFJlZiwgcHVibGljIHpvbmU6IE5nWm9uZSkge31cblxuICAgIEBIb3N0TGlzdGVuZXIoJ2tleWRvd24nLCBbJyRldmVudCddKVxuICAgIG9uS2V5RG93bihldmVudDogS2V5Ym9hcmRFdmVudCkge1xuICAgICAgICBzd2l0Y2ggKGV2ZW50LmNvZGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ0Fycm93RG93bic6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkFycm93RG93bktleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0Fycm93VXAnOlxuICAgICAgICAgICAgICAgIHRoaXMub25BcnJvd1VwS2V5KGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnQXJyb3dSaWdodCc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkFycm93UmlnaHRLZXkoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdBcnJvd0xlZnQnOlxuICAgICAgICAgICAgICAgIHRoaXMub25BcnJvd0xlZnRLZXkoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdUYWInOlxuICAgICAgICAgICAgICAgIHRoaXMub25UYWJLZXkoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdIb21lJzpcbiAgICAgICAgICAgICAgICB0aGlzLm9uSG9tZUtleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0VuZCc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkVuZEtleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbkFycm93RG93bktleShldmVudDogS2V5Ym9hcmRFdmVudCkge1xuICAgICAgICBsZXQgbmV4dFJvdyA9IHRoaXMuZWw/Lm5hdGl2ZUVsZW1lbnQ/Lm5leHRFbGVtZW50U2libGluZztcbiAgICAgICAgaWYgKG5leHRSb3cpIHtcbiAgICAgICAgICAgIHRoaXMuZm9jdXNSb3dDaGFuZ2UoPEhUTUxFbGVtZW50PmV2ZW50LmN1cnJlbnRUYXJnZXQsIG5leHRSb3cpO1xuICAgICAgICB9XG5cbiAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICB9XG5cbiAgICBvbkFycm93VXBLZXkoZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHtcbiAgICAgICAgbGV0IHByZXZSb3cgPSB0aGlzLmVsPy5uYXRpdmVFbGVtZW50Py5wcmV2aW91c0VsZW1lbnRTaWJsaW5nO1xuICAgICAgICBpZiAocHJldlJvdykge1xuICAgICAgICAgICAgdGhpcy5mb2N1c1Jvd0NoYW5nZSg8SFRNTEVsZW1lbnQ+ZXZlbnQuY3VycmVudFRhcmdldCwgcHJldlJvdyk7XG4gICAgICAgIH1cblxuICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgIH1cblxuICAgIG9uQXJyb3dSaWdodEtleShldmVudDogS2V5Ym9hcmRFdmVudCkge1xuICAgICAgICBjb25zdCBjdXJyZW50VGFyZ2V0ID0gPEhUTUxFbGVtZW50PmV2ZW50LmN1cnJlbnRUYXJnZXQ7XG4gICAgICAgIGNvbnN0IGlzSGlkZGVuSWNvbiA9IERvbUhhbmRsZXIuZmluZFNpbmdsZShjdXJyZW50VGFyZ2V0LCAnYnV0dG9uJykuc3R5bGUudmlzaWJpbGl0eSA9PT0gJ2hpZGRlbic7XG5cbiAgICAgICAgaWYgKCFpc0hpZGRlbkljb24gJiYgIXRoaXMuZXhwYW5kZWQgJiYgdGhpcy5yb3dOb2RlLm5vZGVbJ2NoaWxkcmVuJ10pIHtcbiAgICAgICAgICAgIHRoaXMuZXhwYW5kKGV2ZW50KTtcblxuICAgICAgICAgICAgY3VycmVudFRhcmdldC50YWJJbmRleCA9IC0xO1xuICAgICAgICB9XG4gICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgfVxuXG4gICAgb25BcnJvd0xlZnRLZXkoZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHtcbiAgICAgICAgY29uc3QgY29udGFpbmVyID0gdGhpcy50dC5jb250YWluZXJWaWV3Q2hpbGQ/Lm5hdGl2ZUVsZW1lbnQ7XG4gICAgICAgIGNvbnN0IGV4cGFuZGVkUm93cyA9IERvbUhhbmRsZXIuZmluZChjb250YWluZXIsICdbYXJpYS1leHBhbmRlZD1cInRydWVcIl0nKTtcbiAgICAgICAgY29uc3QgbGFzdEV4cGFuZGVkUm93ID0gZXhwYW5kZWRSb3dzW2V4cGFuZGVkUm93cy5sZW5ndGggLSAxXTtcblxuICAgICAgICBpZiAodGhpcy5leHBhbmRlZCkge1xuICAgICAgICAgICAgdGhpcy5jb2xsYXBzZShldmVudCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGxhc3RFeHBhbmRlZFJvdykge1xuICAgICAgICAgICAgdGhpcy50dC50b2dnbGVSb3dJbmRleCA9IERvbUhhbmRsZXIuaW5kZXgobGFzdEV4cGFuZGVkUm93KTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnJlc3RvcmVGb2N1cygpO1xuICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgIH1cblxuICAgIG9uSG9tZUtleShldmVudDogS2V5Ym9hcmRFdmVudCkge1xuICAgICAgICBjb25zdCBmaXJ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gICAgICAgICBjb25zdCByb3cgPSBEb21IYW5kbGVyLmZpbmRTaW5nbGUoY29udGFpbmVyLCAnLnAtdHJlZXRhYmxlLXRib2R5JykuY2hpbGRyZW5bPG51bWJlcj5pbmRleCB8fCB0aGlzLnR0LnRvZ2dsZVJvd0luZGV4XTtcbiAgICAgICAgICAgICAgICBjb25zdCByb3dzID0gWy4uLkRvbUhhbmRsZXIuZmluZChjb250YWluZXIsICd0cicpXTtcblxuICAgICAgICAgICAgICAgIHJvd3MgJiZcbiAgICAgICAgICAgICAgICAgICAgcm93cy5mb3JFYWNoKChyKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJvdy5pc1NhbWVOb2RlKHIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgci50YWJJbmRleCA9IC0xO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGlmIChyb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgcm93LnRhYkluZGV4ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgcm93LmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgMjUpO1xuICAgICAgICB9KTtcbiAgICB9XG59XG5cbkBDb21wb25lbnQoe1xuICAgIHNlbGVjdG9yOiAncC10cmVlVGFibGVUb2dnbGVyJyxcbiAgICB0ZW1wbGF0ZTogYFxuICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcbiAgICAgICAgICAgIGNsYXNzPVwicC10cmVldGFibGUtdG9nZ2xlciBwLWxpbmtcIlxuICAgICAgICAgICAgKGNsaWNrKT1cIm9uQ2xpY2soJGV2ZW50KVwiXG4gICAgICAgICAgICB0YWJpbmRleD1cIi0xXCJcbiAgICAgICAgICAgIHBSaXBwbGVcbiAgICAgICAgICAgIFtzdHlsZS52aXNpYmlsaXR5XT1cInJvd05vZGUubm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ZVxuICAgIF0sXG4gICAgZGVjbGFyYXRpb25zOiBbXG4gICAgICAgIFRyZWVUYWJsZSxcbiAgICAgICAgVHJlZVRhYmxlVG9nZ2xlcixcbiAgICAgICAgVFRTY3JvbGxhYmxlVmlldyxcbiAgICAgICAgVFRCb2R5LFxuICAgICAgICBUVFNvcnRhYmxlQ29sdW1uLFxuICAgICAgICBUVFNvcnRJY29uLFxuICAgICAgICBUVFJlc2l6YWJsZUNvbHVtbixcbiAgICAgICAgVFRSb3csXG4gICAgICAgIFRUUmVvcmRlcmFibGVDb2x1bW4sXG4gICAgICAgIFRUU2VsZWN0YWJsZVJvdyxcbiAgICAgICAgVFRTZWxlY3RhYmxlUm93RGJsQ2xpY2ssXG4gICAgICAgIFRUQ29udGV4dE1lbnVSb3csXG4gICAgICAgIFRUQ2hlY2tib3gsXG4gICAgICAgIFRUSGVhZGVyQ2hlY2tib3gsXG4gICAgICAgIFRURWRpdGFibGVDb2x1bW4sXG4gICAgICAgIFRyZWVUYWJsZUNlbGxFZGl0b3JcbiAgICBdXG59KVxuZXhwb3J0IGNsYXNzIFRyZWVUYWJsZU1vZHVsZSB7fVxuIl19