1 | import { NgModule, Component, Input, Output, EventEmitter, ContentChildren, ContentChild, forwardRef, ViewChild, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
---|
2 | import { CommonModule } from '@angular/common';
|
---|
3 | import { SharedModule, PrimeTemplate, Footer, Header, TranslationKeys } from 'primeng/api';
|
---|
4 | import { DomHandler } from 'primeng/dom';
|
---|
5 | import { ObjectUtils } from 'primeng/utils';
|
---|
6 | import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
---|
7 | import { RippleModule } from 'primeng/ripple';
|
---|
8 | import * as i0 from "@angular/core";
|
---|
9 | import * as i1 from "primeng/api";
|
---|
10 | import * as i2 from "@angular/common";
|
---|
11 | import * as i3 from "primeng/ripple";
|
---|
12 | export const LISTBOX_VALUE_ACCESSOR = {
|
---|
13 | provide: NG_VALUE_ACCESSOR,
|
---|
14 | useExisting: forwardRef(() => Listbox),
|
---|
15 | multi: true
|
---|
16 | };
|
---|
17 | export class Listbox {
|
---|
18 | constructor(el, cd, filterService, config) {
|
---|
19 | this.el = el;
|
---|
20 | this.cd = cd;
|
---|
21 | this.filterService = filterService;
|
---|
22 | this.config = config;
|
---|
23 | this.checkbox = false;
|
---|
24 | this.filter = false;
|
---|
25 | this.filterMatchMode = 'contains';
|
---|
26 | this.metaKeySelection = true;
|
---|
27 | this.showToggleAll = true;
|
---|
28 | this.optionGroupChildren = "items";
|
---|
29 | this.onChange = new EventEmitter();
|
---|
30 | this.onClick = new EventEmitter();
|
---|
31 | this.onDblClick = new EventEmitter();
|
---|
32 | this.onModelChange = () => { };
|
---|
33 | this.onModelTouched = () => { };
|
---|
34 | }
|
---|
35 | get options() {
|
---|
36 | return this._options;
|
---|
37 | }
|
---|
38 | set options(val) {
|
---|
39 | this._options = val;
|
---|
40 | if (this.hasFilter())
|
---|
41 | this.activateFilter();
|
---|
42 | }
|
---|
43 | get filterValue() {
|
---|
44 | return this._filterValue;
|
---|
45 | }
|
---|
46 | set filterValue(val) {
|
---|
47 | this._filterValue = val;
|
---|
48 | this.activateFilter();
|
---|
49 | }
|
---|
50 | ngOnInit() {
|
---|
51 | this.translationSubscription = this.config.translationObserver.subscribe(() => {
|
---|
52 | this.cd.markForCheck();
|
---|
53 | });
|
---|
54 | }
|
---|
55 | ngAfterContentInit() {
|
---|
56 | this.templates.forEach((item) => {
|
---|
57 | switch (item.getType()) {
|
---|
58 | case 'item':
|
---|
59 | this.itemTemplate = item.template;
|
---|
60 | break;
|
---|
61 | case 'group':
|
---|
62 | this.groupTemplate = item.template;
|
---|
63 | break;
|
---|
64 | case 'header':
|
---|
65 | this.headerTemplate = item.template;
|
---|
66 | break;
|
---|
67 | case 'footer':
|
---|
68 | this.footerTemplate = item.template;
|
---|
69 | break;
|
---|
70 | case 'empty':
|
---|
71 | this.emptyTemplate = item.template;
|
---|
72 | break;
|
---|
73 | case 'emptyfilter':
|
---|
74 | this.emptyFilterTemplate = item.template;
|
---|
75 | break;
|
---|
76 | default:
|
---|
77 | this.itemTemplate = item.template;
|
---|
78 | break;
|
---|
79 | }
|
---|
80 | });
|
---|
81 | }
|
---|
82 | getOptionLabel(option) {
|
---|
83 | return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : (option.label != undefined ? option.label : option);
|
---|
84 | }
|
---|
85 | getOptionGroupChildren(optionGroup) {
|
---|
86 | return this.optionGroupChildren ? ObjectUtils.resolveFieldData(optionGroup, this.optionGroupChildren) : optionGroup.items;
|
---|
87 | }
|
---|
88 | getOptionGroupLabel(optionGroup) {
|
---|
89 | return this.optionGroupLabel ? ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel) : (optionGroup.label != undefined ? optionGroup.label : optionGroup);
|
---|
90 | }
|
---|
91 | getOptionValue(option) {
|
---|
92 | return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : (this.optionLabel || option.value === undefined ? option : option.value);
|
---|
93 | }
|
---|
94 | isOptionDisabled(option) {
|
---|
95 | return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : (option.disabled !== undefined ? option.disabled : false);
|
---|
96 | }
|
---|
97 | writeValue(value) {
|
---|
98 | this.value = value;
|
---|
99 | this.cd.markForCheck();
|
---|
100 | }
|
---|
101 | registerOnChange(fn) {
|
---|
102 | this.onModelChange = fn;
|
---|
103 | }
|
---|
104 | registerOnTouched(fn) {
|
---|
105 | this.onModelTouched = fn;
|
---|
106 | }
|
---|
107 | setDisabledState(val) {
|
---|
108 | this.disabled = val;
|
---|
109 | this.cd.markForCheck();
|
---|
110 | }
|
---|
111 | onOptionClick(event, option) {
|
---|
112 | if (this.disabled || this.isOptionDisabled(option) || this.readonly) {
|
---|
113 | return;
|
---|
114 | }
|
---|
115 | if (this.multiple) {
|
---|
116 | if (this.checkbox)
|
---|
117 | this.onOptionClickCheckbox(event, option);
|
---|
118 | else
|
---|
119 | this.onOptionClickMultiple(event, option);
|
---|
120 | }
|
---|
121 | else {
|
---|
122 | this.onOptionClickSingle(event, option);
|
---|
123 | }
|
---|
124 | this.onClick.emit({
|
---|
125 | originalEvent: event,
|
---|
126 | option: option,
|
---|
127 | value: this.value
|
---|
128 | });
|
---|
129 | this.optionTouched = false;
|
---|
130 | }
|
---|
131 | onOptionTouchEnd(option) {
|
---|
132 | if (this.disabled || this.isOptionDisabled(option) || this.readonly) {
|
---|
133 | return;
|
---|
134 | }
|
---|
135 | this.optionTouched = true;
|
---|
136 | }
|
---|
137 | onOptionDoubleClick(event, option) {
|
---|
138 | if (this.disabled || this.isOptionDisabled(option) || this.readonly) {
|
---|
139 | return;
|
---|
140 | }
|
---|
141 | this.onDblClick.emit({
|
---|
142 | originalEvent: event,
|
---|
143 | option: option,
|
---|
144 | value: this.value
|
---|
145 | });
|
---|
146 | }
|
---|
147 | onOptionClickSingle(event, option) {
|
---|
148 | let selected = this.isSelected(option);
|
---|
149 | let valueChanged = false;
|
---|
150 | let metaSelection = this.optionTouched ? false : this.metaKeySelection;
|
---|
151 | if (metaSelection) {
|
---|
152 | let metaKey = (event.metaKey || event.ctrlKey);
|
---|
153 | if (selected) {
|
---|
154 | if (metaKey) {
|
---|
155 | this.value = null;
|
---|
156 | valueChanged = true;
|
---|
157 | }
|
---|
158 | }
|
---|
159 | else {
|
---|
160 | this.value = this.getOptionValue(option);
|
---|
161 | valueChanged = true;
|
---|
162 | }
|
---|
163 | }
|
---|
164 | else {
|
---|
165 | this.value = selected ? null : this.getOptionValue(option);
|
---|
166 | valueChanged = true;
|
---|
167 | }
|
---|
168 | if (valueChanged) {
|
---|
169 | this.onModelChange(this.value);
|
---|
170 | this.onChange.emit({
|
---|
171 | originalEvent: event,
|
---|
172 | value: this.value
|
---|
173 | });
|
---|
174 | }
|
---|
175 | }
|
---|
176 | onOptionClickMultiple(event, option) {
|
---|
177 | let selected = this.isSelected(option);
|
---|
178 | let valueChanged = false;
|
---|
179 | let metaSelection = this.optionTouched ? false : this.metaKeySelection;
|
---|
180 | if (metaSelection) {
|
---|
181 | let metaKey = (event.metaKey || event.ctrlKey);
|
---|
182 | if (selected) {
|
---|
183 | if (metaKey) {
|
---|
184 | this.removeOption(option);
|
---|
185 | }
|
---|
186 | else {
|
---|
187 | this.value = [this.getOptionValue(option)];
|
---|
188 | }
|
---|
189 | valueChanged = true;
|
---|
190 | }
|
---|
191 | else {
|
---|
192 | this.value = (metaKey) ? this.value || [] : [];
|
---|
193 | this.value = [...this.value, this.getOptionValue(option)];
|
---|
194 | valueChanged = true;
|
---|
195 | }
|
---|
196 | }
|
---|
197 | else {
|
---|
198 | if (selected) {
|
---|
199 | this.removeOption(option);
|
---|
200 | }
|
---|
201 | else {
|
---|
202 | this.value = [...this.value || [], this.getOptionValue(option)];
|
---|
203 | }
|
---|
204 | valueChanged = true;
|
---|
205 | }
|
---|
206 | if (valueChanged) {
|
---|
207 | this.onModelChange(this.value);
|
---|
208 | this.onChange.emit({
|
---|
209 | originalEvent: event,
|
---|
210 | value: this.value
|
---|
211 | });
|
---|
212 | }
|
---|
213 | }
|
---|
214 | onOptionClickCheckbox(event, option) {
|
---|
215 | if (this.disabled || this.readonly) {
|
---|
216 | return;
|
---|
217 | }
|
---|
218 | let selected = this.isSelected(option);
|
---|
219 | if (selected) {
|
---|
220 | this.removeOption(option);
|
---|
221 | }
|
---|
222 | else {
|
---|
223 | this.value = this.value ? this.value : [];
|
---|
224 | this.value = [...this.value, this.getOptionValue(option)];
|
---|
225 | }
|
---|
226 | this.onModelChange(this.value);
|
---|
227 | this.onChange.emit({
|
---|
228 | originalEvent: event,
|
---|
229 | value: this.value
|
---|
230 | });
|
---|
231 | }
|
---|
232 | removeOption(option) {
|
---|
233 | this.value = this.value.filter(val => !ObjectUtils.equals(val, this.getOptionValue(option), this.dataKey));
|
---|
234 | }
|
---|
235 | isSelected(option) {
|
---|
236 | let selected = false;
|
---|
237 | let optionValue = this.getOptionValue(option);
|
---|
238 | if (this.multiple) {
|
---|
239 | if (this.value) {
|
---|
240 | for (let val of this.value) {
|
---|
241 | if (ObjectUtils.equals(val, optionValue, this.dataKey)) {
|
---|
242 | selected = true;
|
---|
243 | break;
|
---|
244 | }
|
---|
245 | }
|
---|
246 | }
|
---|
247 | }
|
---|
248 | else {
|
---|
249 | selected = ObjectUtils.equals(this.value, optionValue, this.dataKey);
|
---|
250 | }
|
---|
251 | return selected;
|
---|
252 | }
|
---|
253 | get allChecked() {
|
---|
254 | let optionsToRender = this.optionsToRender;
|
---|
255 | if (!optionsToRender || optionsToRender.length === 0) {
|
---|
256 | return false;
|
---|
257 | }
|
---|
258 | else {
|
---|
259 | let selectedDisabledItemsLength = 0;
|
---|
260 | let unselectedDisabledItemsLength = 0;
|
---|
261 | let selectedEnabledItemsLength = 0;
|
---|
262 | let visibleOptionsLength = this.group ? 0 : this.optionsToRender.length;
|
---|
263 | for (let option of optionsToRender) {
|
---|
264 | if (!this.group) {
|
---|
265 | let disabled = this.isOptionDisabled(option);
|
---|
266 | let selected = this.isSelected(option);
|
---|
267 | if (disabled) {
|
---|
268 | if (selected)
|
---|
269 | selectedDisabledItemsLength++;
|
---|
270 | else
|
---|
271 | unselectedDisabledItemsLength++;
|
---|
272 | }
|
---|
273 | else {
|
---|
274 | if (selected)
|
---|
275 | selectedEnabledItemsLength++;
|
---|
276 | else
|
---|
277 | return false;
|
---|
278 | }
|
---|
279 | }
|
---|
280 | else {
|
---|
281 | for (let opt of this.getOptionGroupChildren(option)) {
|
---|
282 | let disabled = this.isOptionDisabled(opt);
|
---|
283 | let selected = this.isSelected(opt);
|
---|
284 | if (disabled) {
|
---|
285 | if (selected)
|
---|
286 | selectedDisabledItemsLength++;
|
---|
287 | else
|
---|
288 | unselectedDisabledItemsLength++;
|
---|
289 | }
|
---|
290 | else {
|
---|
291 | if (selected)
|
---|
292 | selectedEnabledItemsLength++;
|
---|
293 | else {
|
---|
294 | return false;
|
---|
295 | }
|
---|
296 | }
|
---|
297 | visibleOptionsLength++;
|
---|
298 | }
|
---|
299 | }
|
---|
300 | }
|
---|
301 | return (visibleOptionsLength === selectedDisabledItemsLength
|
---|
302 | || visibleOptionsLength === selectedEnabledItemsLength
|
---|
303 | || selectedEnabledItemsLength && visibleOptionsLength === (selectedEnabledItemsLength + unselectedDisabledItemsLength + selectedDisabledItemsLength));
|
---|
304 | }
|
---|
305 | }
|
---|
306 | get optionsToRender() {
|
---|
307 | return this._filteredOptions || this.options;
|
---|
308 | }
|
---|
309 | get emptyMessageLabel() {
|
---|
310 | return this.emptyMessage || this.config.getTranslation(TranslationKeys.EMPTY_MESSAGE);
|
---|
311 | }
|
---|
312 | get emptyFilterMessageLabel() {
|
---|
313 | return this.emptyFilterMessage || this.config.getTranslation(TranslationKeys.EMPTY_FILTER_MESSAGE);
|
---|
314 | }
|
---|
315 | hasFilter() {
|
---|
316 | return this._filterValue && this._filterValue.trim().length > 0;
|
---|
317 | }
|
---|
318 | isEmpty(optionsToDisplay) {
|
---|
319 | return !optionsToDisplay || (optionsToDisplay && optionsToDisplay.length === 0);
|
---|
320 | }
|
---|
321 | onFilter(event) {
|
---|
322 | this._filterValue = event.target.value;
|
---|
323 | this.activateFilter();
|
---|
324 | }
|
---|
325 | activateFilter() {
|
---|
326 | if (this.hasFilter() && this._options) {
|
---|
327 | if (this.group) {
|
---|
328 | let searchFields = (this.optionLabel || 'label').split(',');
|
---|
329 | let filteredGroups = [];
|
---|
330 | for (let optgroup of this.options) {
|
---|
331 | let filteredSubOptions = this.filterService.filter(this.getOptionGroupChildren(optgroup), searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
---|
332 | if (filteredSubOptions && filteredSubOptions.length) {
|
---|
333 | filteredGroups.push({ ...optgroup, ...{ [this.optionGroupChildren]: filteredSubOptions } });
|
---|
334 | }
|
---|
335 | }
|
---|
336 | this._filteredOptions = filteredGroups;
|
---|
337 | }
|
---|
338 | else {
|
---|
339 | this._filteredOptions = this._options.filter(option => this.filterService.filters[this.filterMatchMode](this.getOptionLabel(option), this._filterValue, this.filterLocale));
|
---|
340 | }
|
---|
341 | }
|
---|
342 | else {
|
---|
343 | this._filteredOptions = null;
|
---|
344 | }
|
---|
345 | }
|
---|
346 | get toggleAllDisabled() {
|
---|
347 | let optionsToRender = this.optionsToRender;
|
---|
348 | if (!optionsToRender || optionsToRender.length === 0) {
|
---|
349 | return true;
|
---|
350 | }
|
---|
351 | else {
|
---|
352 | for (let option of optionsToRender) {
|
---|
353 | if (!this.isOptionDisabled(option))
|
---|
354 | return false;
|
---|
355 | }
|
---|
356 | return true;
|
---|
357 | }
|
---|
358 | }
|
---|
359 | toggleAll(event) {
|
---|
360 | if (this.disabled || this.toggleAllDisabled || this.readonly) {
|
---|
361 | return;
|
---|
362 | }
|
---|
363 | let allChecked = this.allChecked;
|
---|
364 | if (allChecked)
|
---|
365 | this.uncheckAll();
|
---|
366 | else
|
---|
367 | this.checkAll();
|
---|
368 | this.onModelChange(this.value);
|
---|
369 | this.onChange.emit({ originalEvent: event, value: this.value });
|
---|
370 | event.preventDefault();
|
---|
371 | }
|
---|
372 | checkAll() {
|
---|
373 | let optionsToRender = this.optionsToRender;
|
---|
374 | let val = [];
|
---|
375 | optionsToRender.forEach(opt => {
|
---|
376 | if (!this.group) {
|
---|
377 | let optionDisabled = this.isOptionDisabled(opt);
|
---|
378 | if (!optionDisabled || (optionDisabled && this.isSelected(opt))) {
|
---|
379 | val.push(this.getOptionValue(opt));
|
---|
380 | }
|
---|
381 | }
|
---|
382 | else {
|
---|
383 | let subOptions = this.getOptionGroupChildren(opt);
|
---|
384 | if (subOptions) {
|
---|
385 | subOptions.forEach(option => {
|
---|
386 | let optionDisabled = this.isOptionDisabled(option);
|
---|
387 | if (!optionDisabled || (optionDisabled && this.isSelected(option))) {
|
---|
388 | val.push(this.getOptionValue(option));
|
---|
389 | }
|
---|
390 | });
|
---|
391 | }
|
---|
392 | }
|
---|
393 | });
|
---|
394 | this.value = val;
|
---|
395 | }
|
---|
396 | uncheckAll() {
|
---|
397 | let optionsToRender = this.optionsToRender;
|
---|
398 | let val = [];
|
---|
399 | optionsToRender.forEach(opt => {
|
---|
400 | if (!this.group) {
|
---|
401 | let optionDisabled = this.isOptionDisabled(opt);
|
---|
402 | if (optionDisabled && this.isSelected(opt)) {
|
---|
403 | val.push(this.getOptionValue(opt));
|
---|
404 | }
|
---|
405 | }
|
---|
406 | else {
|
---|
407 | if (opt.items) {
|
---|
408 | opt.items.forEach(option => {
|
---|
409 | let optionDisabled = this.isOptionDisabled(option);
|
---|
410 | if (optionDisabled && this.isSelected(option)) {
|
---|
411 | val.push(this.getOptionValue(option));
|
---|
412 | }
|
---|
413 | });
|
---|
414 | }
|
---|
415 | }
|
---|
416 | });
|
---|
417 | this.value = val;
|
---|
418 | }
|
---|
419 | onOptionKeyDown(event, option) {
|
---|
420 | if (this.readonly) {
|
---|
421 | return;
|
---|
422 | }
|
---|
423 | let item = event.currentTarget;
|
---|
424 | switch (event.which) {
|
---|
425 | //down
|
---|
426 | case 40:
|
---|
427 | var nextItem = this.findNextItem(item);
|
---|
428 | if (nextItem) {
|
---|
429 | nextItem.focus();
|
---|
430 | }
|
---|
431 | event.preventDefault();
|
---|
432 | break;
|
---|
433 | //up
|
---|
434 | case 38:
|
---|
435 | var prevItem = this.findPrevItem(item);
|
---|
436 | if (prevItem) {
|
---|
437 | prevItem.focus();
|
---|
438 | }
|
---|
439 | event.preventDefault();
|
---|
440 | break;
|
---|
441 | //enter
|
---|
442 | case 13:
|
---|
443 | this.onOptionClick(event, option);
|
---|
444 | event.preventDefault();
|
---|
445 | break;
|
---|
446 | }
|
---|
447 | }
|
---|
448 | findNextItem(item) {
|
---|
449 | let nextItem = item.nextElementSibling;
|
---|
450 | if (nextItem)
|
---|
451 | return DomHandler.hasClass(nextItem, 'p-disabled') || DomHandler.isHidden(nextItem) || DomHandler.hasClass(nextItem, 'p-listbox-item-group') ? this.findNextItem(nextItem) : nextItem;
|
---|
452 | else
|
---|
453 | return null;
|
---|
454 | }
|
---|
455 | findPrevItem(item) {
|
---|
456 | let prevItem = item.previousElementSibling;
|
---|
457 | if (prevItem)
|
---|
458 | return DomHandler.hasClass(prevItem, 'p-disabled') || DomHandler.isHidden(prevItem) || DomHandler.hasClass(prevItem, 'p-listbox-item-group') ? this.findPrevItem(prevItem) : prevItem;
|
---|
459 | else
|
---|
460 | return null;
|
---|
461 | }
|
---|
462 | onHeaderCheckboxFocus() {
|
---|
463 | this.headerCheckboxFocus = true;
|
---|
464 | }
|
---|
465 | onHeaderCheckboxBlur() {
|
---|
466 | this.headerCheckboxFocus = false;
|
---|
467 | }
|
---|
468 | ngOnDestroy() {
|
---|
469 | if (this.translationSubscription) {
|
---|
470 | this.translationSubscription.unsubscribe();
|
---|
471 | }
|
---|
472 | }
|
---|
473 | }
|
---|
474 | Listbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Listbox, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FilterService }, { token: i1.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
|
---|
475 | Listbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Listbox, selector: "p-listbox", inputs: { multiple: "multiple", style: "style", styleClass: "styleClass", listStyle: "listStyle", listStyleClass: "listStyleClass", readonly: "readonly", disabled: "disabled", checkbox: "checkbox", filter: "filter", filterMatchMode: "filterMatchMode", filterLocale: "filterLocale", metaKeySelection: "metaKeySelection", dataKey: "dataKey", showToggleAll: "showToggleAll", optionLabel: "optionLabel", optionValue: "optionValue", optionGroupChildren: "optionGroupChildren", optionGroupLabel: "optionGroupLabel", optionDisabled: "optionDisabled", ariaFilterLabel: "ariaFilterLabel", filterPlaceHolder: "filterPlaceHolder", emptyFilterMessage: "emptyFilterMessage", emptyMessage: "emptyMessage", group: "group", options: "options", filterValue: "filterValue" }, outputs: { onChange: "onChange", onClick: "onClick", onDblClick: "onDblClick" }, host: { classAttribute: "p-element" }, providers: [LISTBOX_VALUE_ACCESSOR], queries: [{ propertyName: "headerFacet", first: true, predicate: Header, descendants: true }, { propertyName: "footerFacet", first: true, predicate: Footer, descendants: true }, { propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "headerCheckboxViewChild", first: true, predicate: ["headerchkbox"], descendants: true }], ngImport: i0, template: `
|
---|
476 | <div [ngClass]="{'p-listbox p-component': true, 'p-disabled': disabled}" [ngStyle]="style" [class]="styleClass">
|
---|
477 | <div class="p-listbox-header" *ngIf="headerFacet || headerTemplate">
|
---|
478 | <ng-content select="p-header"></ng-content>
|
---|
479 | <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
|
---|
480 | </div>
|
---|
481 | <div class="p-listbox-header" *ngIf="(checkbox && multiple && showToggleAll) || filter">
|
---|
482 | <div class="p-checkbox p-component" *ngIf="checkbox && multiple && showToggleAll" [ngClass]="{'p-checkbox-disabled': disabled || toggleAllDisabled}">
|
---|
483 | <div class="p-hidden-accessible">
|
---|
484 | <input type="checkbox" readonly="readonly" [checked]="allChecked" (focus)="onHeaderCheckboxFocus()" (blur)="onHeaderCheckboxBlur()" (keydown.space)="toggleAll($event)" [disabled]="disabled || toggleAllDisabled">
|
---|
485 | </div>
|
---|
486 | <div #headerchkbox class="p-checkbox-box" [ngClass]="{'p-highlight': allChecked, 'p-focus': headerCheckboxFocus, 'p-disabled': disabled || toggleAllDisabled}" (click)="toggleAll($event)">
|
---|
487 | <span class="p-checkbox-icon" [ngClass]="{'pi pi-check':allChecked}"></span>
|
---|
488 | </div>
|
---|
489 | </div>
|
---|
490 | <div class="p-listbox-filter-container" *ngIf="filter">
|
---|
491 | <input type="text" [value]="filterValue||''" (input)="onFilter($event)" class="p-listbox-filter p-inputtext p-component" [disabled]="disabled" [attr.placeholder]="filterPlaceHolder" [attr.aria-label]="ariaFilterLabel">
|
---|
492 | <span class="p-listbox-filter-icon pi pi-search"></span>
|
---|
493 | </div>
|
---|
494 | </div>
|
---|
495 | <div [ngClass]="'p-listbox-list-wrapper'" [ngStyle]="listStyle" [class]="listStyleClass">
|
---|
496 | <ul class="p-listbox-list" role="listbox" aria-multiselectable="multiple">
|
---|
497 | <ng-container *ngIf="group">
|
---|
498 | <ng-template ngFor let-optgroup [ngForOf]="optionsToRender">
|
---|
499 | <li class="p-listbox-item-group">
|
---|
500 | <span *ngIf="!groupTemplate">{{getOptionGroupLabel(optgroup)||'empty'}}</span>
|
---|
501 | <ng-container *ngTemplateOutlet="groupTemplate; context: {$implicit: optgroup}"></ng-container>
|
---|
502 | </li>
|
---|
503 | <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: getOptionGroupChildren(optgroup)}"></ng-container>
|
---|
504 | </ng-template>
|
---|
505 | </ng-container>
|
---|
506 | <ng-container *ngIf="!group">
|
---|
507 | <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: optionsToRender}"></ng-container>
|
---|
508 | </ng-container>
|
---|
509 | <ng-template #itemslist let-optionsToDisplay>
|
---|
510 | <li *ngFor="let option of optionsToDisplay; let i = index;" [attr.tabindex]="disabled || isOptionDisabled(option) ? null : '0'" pRipple
|
---|
511 | [ngClass]="{'p-listbox-item':true,'p-highlight':isSelected(option), 'p-disabled': this.isOptionDisabled(option)}" role="option" [attr.aria-label]="getOptionLabel(option)"
|
---|
512 | [attr.aria-selected]="isSelected(option)" (click)="onOptionClick($event,option)" (dblclick)="onOptionDoubleClick($event,option)" (touchend)="onOptionTouchEnd(option)" (keydown)="onOptionKeyDown($event,option)">
|
---|
513 | <div class="p-checkbox p-component" *ngIf="checkbox && multiple" [ngClass]="{'p-checkbox-disabled': disabled || isOptionDisabled(option)}">
|
---|
514 | <div class="p-checkbox-box" [ngClass]="{'p-highlight':isSelected(option)}">
|
---|
515 | <span class="p-checkbox-icon" [ngClass]="{'pi pi-check':isSelected(option)}"></span>
|
---|
516 | </div>
|
---|
517 | </div>
|
---|
518 | <span *ngIf="!itemTemplate">{{getOptionLabel(option)}}</span>
|
---|
519 | <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: option, index: i}"></ng-container>
|
---|
520 | </li>
|
---|
521 | <li *ngIf="hasFilter() && isEmpty(optionsToDisplay)" class="p-listbox-empty-message">
|
---|
522 | <ng-container *ngIf="!emptyFilterTemplate && !emptyTemplate; else emptyFilter">
|
---|
523 | {{emptyFilterMessageLabel}}
|
---|
524 | </ng-container>
|
---|
525 | <ng-container #emptyFilter *ngTemplateOutlet="emptyFilterTemplate || emptyTemplate"></ng-container>
|
---|
526 | </li>
|
---|
527 | <li *ngIf="!hasFilter() && isEmpty(optionsToDisplay)" class="p-listbox-empty-message">
|
---|
528 | <ng-container *ngIf="!emptyTemplate; else empty">
|
---|
529 | {{emptyMessageLabel}}
|
---|
530 | </ng-container>
|
---|
531 | <ng-container #empty *ngTemplateOutlet="emptyTemplate"></ng-container>
|
---|
532 | </li>
|
---|
533 | </ng-template>
|
---|
534 | </ul>
|
---|
535 | </div>
|
---|
536 | <div class="p-listbox-footer" *ngIf="footerFacet || footerTemplate">
|
---|
537 | <ng-content select="p-footer"></ng-content>
|
---|
538 | <ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
|
---|
539 | </div>
|
---|
540 | </div>
|
---|
541 | `, isInline: true, styles: [".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.Ripple, selector: "[pRipple]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
542 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Listbox, decorators: [{
|
---|
543 | type: Component,
|
---|
544 | args: [{ selector: 'p-listbox', template: `
|
---|
545 | <div [ngClass]="{'p-listbox p-component': true, 'p-disabled': disabled}" [ngStyle]="style" [class]="styleClass">
|
---|
546 | <div class="p-listbox-header" *ngIf="headerFacet || headerTemplate">
|
---|
547 | <ng-content select="p-header"></ng-content>
|
---|
548 | <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
|
---|
549 | </div>
|
---|
550 | <div class="p-listbox-header" *ngIf="(checkbox && multiple && showToggleAll) || filter">
|
---|
551 | <div class="p-checkbox p-component" *ngIf="checkbox && multiple && showToggleAll" [ngClass]="{'p-checkbox-disabled': disabled || toggleAllDisabled}">
|
---|
552 | <div class="p-hidden-accessible">
|
---|
553 | <input type="checkbox" readonly="readonly" [checked]="allChecked" (focus)="onHeaderCheckboxFocus()" (blur)="onHeaderCheckboxBlur()" (keydown.space)="toggleAll($event)" [disabled]="disabled || toggleAllDisabled">
|
---|
554 | </div>
|
---|
555 | <div #headerchkbox class="p-checkbox-box" [ngClass]="{'p-highlight': allChecked, 'p-focus': headerCheckboxFocus, 'p-disabled': disabled || toggleAllDisabled}" (click)="toggleAll($event)">
|
---|
556 | <span class="p-checkbox-icon" [ngClass]="{'pi pi-check':allChecked}"></span>
|
---|
557 | </div>
|
---|
558 | </div>
|
---|
559 | <div class="p-listbox-filter-container" *ngIf="filter">
|
---|
560 | <input type="text" [value]="filterValue||''" (input)="onFilter($event)" class="p-listbox-filter p-inputtext p-component" [disabled]="disabled" [attr.placeholder]="filterPlaceHolder" [attr.aria-label]="ariaFilterLabel">
|
---|
561 | <span class="p-listbox-filter-icon pi pi-search"></span>
|
---|
562 | </div>
|
---|
563 | </div>
|
---|
564 | <div [ngClass]="'p-listbox-list-wrapper'" [ngStyle]="listStyle" [class]="listStyleClass">
|
---|
565 | <ul class="p-listbox-list" role="listbox" aria-multiselectable="multiple">
|
---|
566 | <ng-container *ngIf="group">
|
---|
567 | <ng-template ngFor let-optgroup [ngForOf]="optionsToRender">
|
---|
568 | <li class="p-listbox-item-group">
|
---|
569 | <span *ngIf="!groupTemplate">{{getOptionGroupLabel(optgroup)||'empty'}}</span>
|
---|
570 | <ng-container *ngTemplateOutlet="groupTemplate; context: {$implicit: optgroup}"></ng-container>
|
---|
571 | </li>
|
---|
572 | <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: getOptionGroupChildren(optgroup)}"></ng-container>
|
---|
573 | </ng-template>
|
---|
574 | </ng-container>
|
---|
575 | <ng-container *ngIf="!group">
|
---|
576 | <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: optionsToRender}"></ng-container>
|
---|
577 | </ng-container>
|
---|
578 | <ng-template #itemslist let-optionsToDisplay>
|
---|
579 | <li *ngFor="let option of optionsToDisplay; let i = index;" [attr.tabindex]="disabled || isOptionDisabled(option) ? null : '0'" pRipple
|
---|
580 | [ngClass]="{'p-listbox-item':true,'p-highlight':isSelected(option), 'p-disabled': this.isOptionDisabled(option)}" role="option" [attr.aria-label]="getOptionLabel(option)"
|
---|
581 | [attr.aria-selected]="isSelected(option)" (click)="onOptionClick($event,option)" (dblclick)="onOptionDoubleClick($event,option)" (touchend)="onOptionTouchEnd(option)" (keydown)="onOptionKeyDown($event,option)">
|
---|
582 | <div class="p-checkbox p-component" *ngIf="checkbox && multiple" [ngClass]="{'p-checkbox-disabled': disabled || isOptionDisabled(option)}">
|
---|
583 | <div class="p-checkbox-box" [ngClass]="{'p-highlight':isSelected(option)}">
|
---|
584 | <span class="p-checkbox-icon" [ngClass]="{'pi pi-check':isSelected(option)}"></span>
|
---|
585 | </div>
|
---|
586 | </div>
|
---|
587 | <span *ngIf="!itemTemplate">{{getOptionLabel(option)}}</span>
|
---|
588 | <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: option, index: i}"></ng-container>
|
---|
589 | </li>
|
---|
590 | <li *ngIf="hasFilter() && isEmpty(optionsToDisplay)" class="p-listbox-empty-message">
|
---|
591 | <ng-container *ngIf="!emptyFilterTemplate && !emptyTemplate; else emptyFilter">
|
---|
592 | {{emptyFilterMessageLabel}}
|
---|
593 | </ng-container>
|
---|
594 | <ng-container #emptyFilter *ngTemplateOutlet="emptyFilterTemplate || emptyTemplate"></ng-container>
|
---|
595 | </li>
|
---|
596 | <li *ngIf="!hasFilter() && isEmpty(optionsToDisplay)" class="p-listbox-empty-message">
|
---|
597 | <ng-container *ngIf="!emptyTemplate; else empty">
|
---|
598 | {{emptyMessageLabel}}
|
---|
599 | </ng-container>
|
---|
600 | <ng-container #empty *ngTemplateOutlet="emptyTemplate"></ng-container>
|
---|
601 | </li>
|
---|
602 | </ng-template>
|
---|
603 | </ul>
|
---|
604 | </div>
|
---|
605 | <div class="p-listbox-footer" *ngIf="footerFacet || footerTemplate">
|
---|
606 | <ng-content select="p-footer"></ng-content>
|
---|
607 | <ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
|
---|
608 | </div>
|
---|
609 | </div>
|
---|
610 | `, providers: [LISTBOX_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
---|
611 | 'class': 'p-element'
|
---|
612 | }, styles: [".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"] }]
|
---|
613 | }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FilterService }, { type: i1.PrimeNGConfig }]; }, propDecorators: { multiple: [{
|
---|
614 | type: Input
|
---|
615 | }], style: [{
|
---|
616 | type: Input
|
---|
617 | }], styleClass: [{
|
---|
618 | type: Input
|
---|
619 | }], listStyle: [{
|
---|
620 | type: Input
|
---|
621 | }], listStyleClass: [{
|
---|
622 | type: Input
|
---|
623 | }], readonly: [{
|
---|
624 | type: Input
|
---|
625 | }], disabled: [{
|
---|
626 | type: Input
|
---|
627 | }], checkbox: [{
|
---|
628 | type: Input
|
---|
629 | }], filter: [{
|
---|
630 | type: Input
|
---|
631 | }], filterMatchMode: [{
|
---|
632 | type: Input
|
---|
633 | }], filterLocale: [{
|
---|
634 | type: Input
|
---|
635 | }], metaKeySelection: [{
|
---|
636 | type: Input
|
---|
637 | }], dataKey: [{
|
---|
638 | type: Input
|
---|
639 | }], showToggleAll: [{
|
---|
640 | type: Input
|
---|
641 | }], optionLabel: [{
|
---|
642 | type: Input
|
---|
643 | }], optionValue: [{
|
---|
644 | type: Input
|
---|
645 | }], optionGroupChildren: [{
|
---|
646 | type: Input
|
---|
647 | }], optionGroupLabel: [{
|
---|
648 | type: Input
|
---|
649 | }], optionDisabled: [{
|
---|
650 | type: Input
|
---|
651 | }], ariaFilterLabel: [{
|
---|
652 | type: Input
|
---|
653 | }], filterPlaceHolder: [{
|
---|
654 | type: Input
|
---|
655 | }], emptyFilterMessage: [{
|
---|
656 | type: Input
|
---|
657 | }], emptyMessage: [{
|
---|
658 | type: Input
|
---|
659 | }], group: [{
|
---|
660 | type: Input
|
---|
661 | }], onChange: [{
|
---|
662 | type: Output
|
---|
663 | }], onClick: [{
|
---|
664 | type: Output
|
---|
665 | }], onDblClick: [{
|
---|
666 | type: Output
|
---|
667 | }], headerCheckboxViewChild: [{
|
---|
668 | type: ViewChild,
|
---|
669 | args: ['headerchkbox']
|
---|
670 | }], headerFacet: [{
|
---|
671 | type: ContentChild,
|
---|
672 | args: [Header]
|
---|
673 | }], footerFacet: [{
|
---|
674 | type: ContentChild,
|
---|
675 | args: [Footer]
|
---|
676 | }], templates: [{
|
---|
677 | type: ContentChildren,
|
---|
678 | args: [PrimeTemplate]
|
---|
679 | }], options: [{
|
---|
680 | type: Input
|
---|
681 | }], filterValue: [{
|
---|
682 | type: Input
|
---|
683 | }] } });
|
---|
684 | export class ListboxModule {
|
---|
685 | }
|
---|
686 | ListboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ListboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
687 | ListboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ListboxModule, declarations: [Listbox], imports: [CommonModule, SharedModule, RippleModule], exports: [Listbox, SharedModule] });
|
---|
688 | ListboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ListboxModule, imports: [[CommonModule, SharedModule, RippleModule], SharedModule] });
|
---|
689 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ListboxModule, decorators: [{
|
---|
690 | type: NgModule,
|
---|
691 | args: [{
|
---|
692 | imports: [CommonModule, SharedModule, RippleModule],
|
---|
693 | exports: [Listbox, SharedModule],
|
---|
694 | declarations: [Listbox]
|
---|
695 | }]
|
---|
696 | }] });
|
---|
697 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdGJveC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy9saXN0Ym94L2xpc3Rib3gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQWMsS0FBSyxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQW9CLGVBQWUsRUFBRSxZQUFZLEVBQXlCLFVBQVUsRUFBcUIsU0FBUyxFQUFFLHVCQUF1QixFQUFFLGlCQUFpQixFQUFxQixNQUFNLGVBQWUsQ0FBQztBQUM5USxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFlBQVksRUFBRSxhQUFhLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBaUIsZUFBZSxFQUFpQixNQUFNLGFBQWEsQ0FBQztBQUN6SCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sYUFBYSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDNUMsT0FBTyxFQUFFLGlCQUFpQixFQUF3QixNQUFNLGdCQUFnQixDQUFDO0FBQ3pFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQzs7Ozs7QUFHOUMsTUFB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G4gICAgfVxuXG4gICAgbmdPbkluaXQoKSB7XG4gICAgICAgIHRoaXMudHJhbnNsYXRpb25TdWJzY3JpcHRpb24gPSB0aGlzLmNvbmZpZy50cmFuc2xhdGlvbk9ic2VydmVyLnN1YnNjcmliZSgoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLmNkLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7XG4gICAgICAgIHRoaXMudGVtcGxhdGVzLmZvckVhY2goKGl0ZW0pID0+IHtcbiAgICAgICAgICAgIHN3aXRjaCAoaXRlbS5nZXRUeXBlKCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlICdpdGVtJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pdGVtVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnZ3JvdXAnOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmdyb3VwVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnaGVhZGVyJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oZWFkZXJUZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlICdmb290ZXInOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmZvb3RlclRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ2VtcHR5JzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbXB0eVRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbl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gIHRoaXMuY2QubWFya0ZvckNoZWNrKCk7XG4gICAgfVxuXG4gICAgb25PcHRpb25DbGljayhldmVudDogRXZlbnQsIG9wdGlvbjogYW55KSB7XG4gICAgICAgIGlmICh0aGlzLmRpc2FibGVkIHx8IHRoaXMuaXNPcHRpb25EaXNhYmxlZChvcHRpb24pIHx8IHRoaXMucmVhZG9ubHkpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLm11bHRpcGxlKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5jaGVja2JveClcbiAgICAgICAgICAgICAgICB0aGlzLm9uT3B0aW9uQ2xpY2tDaGVja2JveChldmVudCwgb3B0aW9uKTtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICB0aGlzLm9uT3B0aW9uQ2xpY2tNdWx0aXBsZShldmVudCwgb3B0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMub25PcHRpb25DbGlja1NpbmdsZShldmVudCwgb3B0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLm9uQ2xpY2suZW1pdCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBldmVudCxcbiAgICAgICAgICAgIG9wdGlvbjogb3B0aW9uLFxuICAgICAgICAgICAgdmFsdWU6IHRoaXMudmFsdWVcbiAgICAgICAgfSk7XG4gICAgICAgIHRoaXMub3B0aW9uVG91Y2hlZCA9IGZhbHNlO1xuICAgIH1cblxuICAgIG9uT3B0aW9uVG91Y2hFbmQob3B0aW9uOiBhbnkpIHtcbiAgICAgICAgaWYgKHRoaXMuZGlzYWJsZWQgfHwgdGhpcy5pc09wdGlvbkRpc2FibGVkKG9wdGlvbikgfHwgdGhpcy5yZWFkb25seSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5vcHRpb25Ub3VjaGVkID0gdHJ1ZTtcbiAgICB9XG5cbiAgICBvbk9wdGlvbkRvdWJsZUNsaWNrKGV2ZW50OiBFdmVudCwgb3B0aW9uOiBhbnkpOiBhbnkge1xuICAgICAgICBpZiAodGhpcy5kaXNhYmxlZCB8fCB0aGlzLmlzT3B0aW9uRGlzYWJsZWQob3B0aW9uKSB8fCB0aGlzLnJlYWRvbmx5KSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLm9uRGJsQ2xpY2suZW1pdCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBldmVudCxcbiAgICAgICAgICAgIG9wdGlvbjogb3B0aW9uLFxuICAgICAgICAgICAgdmFsdWU6IHRoaXMudmFsdWVcbiAgICAgICAgfSlcbiAgICB9XG5cbiAgICBvbk9wdGlvbkNsaWNrU2luZ2xlKGV2ZW50LCBvcHRpb24pIHtcbiAgICAgICAgbGV0IHNlbGVjdGVkID0gdGhpcy5pc1NlbGVjdGVkKG9wdGlvbik7XG4gICAgICAgIGxldCB2YWx1ZUNoYW5nZWQgPSBmYWxzZTtcbiAgICAgICAgbGV0IG1ldGFTZWxlY3Rpb24gPSB0aGlzLm9wdGlvblRvdWNoZWQgPyBmYWxzZSA6IHRoaXMubWV0YUtleVNlbGVjdGlvbjtcblxuICAgICAgICBpZiAobWV0YVNlbGVjdGlvbikge1xuICAgICAgICAgICAgbGV0IG1ldGFLZXkgPSAoZXZlbnQubWV0YUtleSB8fCBldmVudC5jdHJsS2V5KTtcblxuICAgICAgICAgICAgaWYgKHNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgaWYgKG1ldGFLZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy52YWx1ZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlQ2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdG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gICAgICAgICAgIHRoaXMucmVtb3ZlT3B0aW9uKG9wdGlvbik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gW3RoaXMuZ2V0T3B0aW9uVmFsdWUob3B0aW9uKV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhbHVlQ2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gKG1ldGFLZXkpID8gdGhpcy52YWx1ZSB8fCBbXSA6IFtdO1xuICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSBbLi4udGhpcy52YWx1ZSwgdGhpcy5nZXRPcHRpb25WYWx1ZShvcHRpb24pXTtcbiAgICAgICAgICAgICAgICB2YWx1ZUNoYW5nZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKHNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVPcHRpb24ob3B0aW9uKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSBbLi4udGhpcy52YWx1ZSB8fCBbXSwgdGhpcy5nZXRPcHRpb25WYWx1ZShvcHRpb24pXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsdWVDaGFuZ2VkID0gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh2YWx1ZUNoYW5nZWQpIHtcbiAgICAgICAgICAgIHRoaXMub25Nb2RlbENoYW5nZSh0aGlzLnZhbHVlKTtcbiAgICAgICAgICAgIHRoaXMub25DaGFuZ2UuZW1pdCh7XG4gICAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZXZlbnQsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHRoaXMudmFsdWVcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25PcHRpb25DbGlja0NoZWNrYm94KGV2ZW50LCBvcHRpb24pIHtcbiAgICAgICAgaWYgKHRoaXMuZGlzYWJsZWQgfHwgdGhpcy5yZWFkb25seSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IHNlbGVjdGVkID0gdGhpcy5pc1NlbGVjdGVkKG9wdGlvbik7XG5cbiAgICAgICAgaWYgKHNlbGVjdGVkKSB7XG4gICAgICAgICAgICB0aGlzLnJlbW92ZU9wdGlvbihvcHRpb24pO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHRoaXMudmFsdWUgPyB0aGlzLnZhbHVlIDogW107XG4gICAgICAgICAgICB0aGlzLnZhbHVlID0gWy4uLnRoaXMudmFsdWUsIHRoaXMuZ2V0T3B0aW9uVmFsdWUob3B0aW9uKV07XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLm9uTW9kZWxDaGFuZ2UodGhpcy52YWx1ZSk7XG4gICAgICAgIHRoaXMub25DaGFuZ2UuZW1pdCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBldmVudCxcbiAgICAgICAgICAgIHZhbHVlOiB0aGlzLnZhbHVlXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHJlbW92ZU9wdGlvbihvcHRpb246IGFueSk6IHZvaWQge1xuICAgICAgICB0aGlzLnZhbHVlID0gdGhpcy52YWx1ZS5maWx0ZXIodmFsID0+ICFPYmplY3RVdGlscy5lcXVhbHModmFsLCB0aGlzLmdldE9wdGlvblZhbHVlKG9wdGlvbiksIHRoaXMuZGF0YUtleSkpO1xuICAgIH1cblxuICAgIGlzU2VsZWN0ZWQob3B0aW9uOiBhbnkpIHtcbiAgICAgICAgbGV0IHNlbGVjdGVkID0gZmFsc2U7XG4gICAgICAgIGxldCBvcHRpb25WYWx1ZSA9IHRoaXMuZ2V0T3B0aW9uVmFsdWUob3B0aW9uKTtcblxuICAgICAgICBpZiAodGhpcy5tdWx0aXBsZSkge1xuICAgICAgICAgICAgaWYgKHRoaXMudmFsdWUpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCB2YWwgb2YgdGhpcy52YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoT2JqZWN0VXRpbHMuZXF1YWxzKHZhbCwgb3B0aW9uVmFsdWUsIHRoaXMuZGF0YUtleSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgc2VsZWN0ZWQgPSBPYmplY3RVdGlscy5lcXVhbHModGhpcy52YWx1ZSwgb3B0aW9uVmFsdWUsIHRoaXMuZGF0YUtleSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gc2VsZWN0ZWQ7XG4gICAgfVxuXG4gICAgZ2V0IGFsbENoZWNrZWQoKTogYm9vbGVhbiB7XG4gICAgICAgIGxldCBvcHRpb25zVG9SZW5kZXIgPSB0aGlzLm9wdGlvbnNUb1JlbmRlcjtcbiAgICAgICAgaWYgKCFvcHRpb25zVG9SZW5kZXIgfHwgb3B0aW9uc1RvUmVuZGVyLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgbGV0IHNlbGVjdGVkRGlzYWJsZWRJdGVtc0xlbmd0aCA9IDA7XG4gICAgICAgICAgICBsZXQgdW5zZWxlY3RlZERpc2FibGVkSXRlbXNMZW5ndGggPSAwO1xuICAgICAgICAgICAgbGV0IHNlbGVjdGVkRW5hYmxlZEl0ZW1zTGVuZ3RoID0gMDtcbiAgICAgICAgICAgIGxldCB2aXNpYmxlT3B0aW9uc0xlbmd0aCA9IHRoaXMuZ3JvdXAgPyAwIDogdGhpcy5vcHRpb25zVG9SZW5kZXIubGVuZ3RoO1xuXG4gICAgICAgICAgICBmb3IgKGxldCBvcHRpb24gb2Ygb3B0aW9uc1RvUmVuZGVyKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmdyb3VwKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBkaXNhYmxlZCA9IHRoaXMuaXNPcHRpb25EaXNhYmxlZChvcHRpb24pO1xuICAgICAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWQgPSB0aGlzLmlzU2VsZWN0ZWQob3B0aW9uKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoZGlzYWJsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxlY3RlZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZERpc2FibGVkSXRlbXNMZW5ndGgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNlbGVjdGVkRGlzYWJsZWRJdGVtc0xlbmd0aCsrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkRW5hYmxlZEl0ZW1zTGVuZ3RoKys7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBvcHQgb2YgdGhpcy5nZXRPcHRpb25Hcm91cENoaWxkcmVuKG9wdGlvbikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkaXNhYmxlZCA9IHRoaXMuaXNPcHRpb25EaXNhYmxlZChvcHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gdGhpcy5pc1NlbGVjdGVkKG9wdCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkaXNhYmxlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxlY3RlZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWREaXNhYmxlZEl0ZW1zTGVuZ3RoKys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNlbGVjdGVkRGlzYWJsZWRJdGVtc0xlbmd0aCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEVuYWJsZWRJdGVtc0xlbmd0aCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICB2aXNpYmxlT3B0aW9uc0xlbmd0aCsrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gKHZpc2libGVP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HRpb25zLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyZWRHcm91cHMucHVzaCh7Li4ub3B0Z3JvdXAsIC4uLntbdGhpcy5vcHRpb25Hcm91cENoaWxkcmVuXTogZmlsdGVyZWRTdWJPcHRpb25zfX0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5fZmlsdGVyZWRPcHRpb25zID0gZmlsdGVyZWRHcm91cHM7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9maWx0ZXJlZE9wdGlvbnMgPSB0aGlzLl9vcHRpb25zLmZpbHRlcihvcHRpb24gPT4gdGhpcy5maWx0ZXJTZXJ2aWNlLmZpbHRlcnNbdGhpcy5maWx0ZXJNYXRjaE1vZGVdKHRoaXMuZ2V0T3B0aW9uTGFiZWwob3B0aW9uKSwgdGhpcy5fZmlsdGVyVmFsdWUsIHRoaXMuZmlsdGVyTG9jYWxlKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLl9maWx0ZXJlZE9wdGlvbnMgPSBudWxsO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0IHRvZ2dsZUFsbERpc2FibGVkKCk6IGJvb2xlYW4ge1xuICAgICAgICBsZXQgb3B0aW9uc1RvUmVuZGVyID0gdGhpcy5vcHRpb25zVG9SZW5kZXI7XG4gICAgICAgIGlmICghb3B0aW9uc1RvUmVuZGVyIHx8IG9wdGlvbnNUb1JlbmRlci5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZm9yIChsZXQgb3B0aW9uIG9mIG9wdGlvbnNUb1JlbmRlcikge1xuICAgICAgICAgICAgICAgIGlmICghdGh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8fCAob3B0aW9uRGlzYWJsZWQgJiYgdGhpcy5pc1NlbGVjdGVkKG9wdCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbC5wdXNoKHRoaXMuZ2V0T3B0aW9uVmFsdWUob3B0KSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgbGV0IHN1Yk9wdGlvbnMgPSB0aGlzLmdldE9wdGlvbkdyb3VwQ2hpbGRyZW4ob3B0KTtcblxuICAgICAgICAgICAgICAgIGlmIChzdWJPcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIHN1Yk9wdGlvbnMuZm9yRWFjaChvcHRpb24gPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvbkRpc2FibGVkID0gdGhpcy5pc09wdGlvbkRpc2FibGVkKG9wdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW9wdGlvbkRpc2FibGVkIHx8IChvcHRpb25EaXNhYmxlZCAmJiB0aGlzLmlzU2VsZWN0ZWQob3B0aW9uKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWwucHVzaCh0aGlzLmdldE9wdGlvblZhbHVlKG9wdGlvbikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMudmFsdWUgPSB2YWw7XG4gICAgfVxuXG4gICAgdW5jaGVja0FsbCgpIHtcbiAgICAgICAgbGV0IG9wdGlvbnNUb1JlbmRlciA9IHRoaXMub3B0aW9uc1RvUmVuZGVyO1xuICAgICAgICBsZXQgdmFsOiBhbnlbXSA9IFtdO1xuXG4gICAgICAgIG9wdGlvbnNUb1JlbmRlci5mb3JFYWNoKG9wdCA9PiB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuZ3JvdXApIHtcbiAgICAgICAgICAgICAgICBsZXQgb3B0aW9uRGlzYWJsZWQgPSB0aGlzLmlzT3B0aW9uRGlzYWJsZWQob3B0KTtcbiAgICAgICAgICAgICAgICBpZiAob3B0aW9uRGlzYWJsZWQgJiYgdGhpcy5pc1NlbGVjdGVkKG9wdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsLnB1c2godGhpcy5nZXRPcHRpb25WYWx1ZShvcHQpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAob3B0Lml0ZW1zKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdC5pdGVtcy5mb3JFYWNoKG9wdGlvbiA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3B0aW9uRGlzYWJsZWQgPSB0aGlzLmlzT3B0aW9uRGlzYWJsZWQob3B0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25EaXNhYmxlZCAmJiB0aGlzLmlzU2VsZWN0ZWQob3B0aW9uKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbC5wdXNoKHRoaXMuZ2V0T3B0aW9uVmFsdWUob3B0aW9uKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy52YWx1ZSA9IHZhbDtcbiAgICB9XG5cbiAgICBvbk9wdGlvbktleURvd24oZXZlbnQ6S2V5Ym9hcmRFdmVudCwgb3B0aW9uKSB7XG4gICAgICAgIGlmICh0aGlzLnJlYWRvbmx5KSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgaXRlbSA9IDxIVE1MTElFbGVtZW50PiBldmVudC5jdXJyZW50VGFyZ2V0O1xuXG4gICAgICAgIHN3aXRjaChldmVudC53aGljaCkge1xuICAgICAgICAgICAgLy9kb3duXG4gICAgICAgICAgICBjYXNlIDQwOlxuICAgICAgICAgICAgICAgIHZhciBuZXh0SXRlbSA9IHRoaXMuZmluZE5leHRJdGVtKGl0ZW0pO1xuICAgICAgICAgICAgICAgIGlmIChuZXh0SXRlbSkge1xuICAgICAgICAgICAgICAgICAgICBuZXh0SXRlbS5mb2N1cygpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgLy91cFxuICAgICAgICAgICAgY2FzZSAzODpcbiAgICAgICAgICAgICAgICB2YXIgcHJldkl0ZW0gPSB0aGlzLmZpbmRQcmV2SXRlbShpdGVtKTtcbiAgICAgICAgICAgICAgICBpZiAocHJldkl0ZW0pIHtcbiAgICAgICAgICAgICAgICAgICAgcHJldkl0ZW0uZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIC8vZW50ZXJcbiAgICAgICAgICAgIGNhc2UgMTM6XG4gICAgICAgICAgICAgICAgdGhpcy5vbk9wdGlvbkNsaWNrKGV2ZW50LCBvcHRpb24pO1xuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZpbmROZXh0SXRlbShpdGVtKSB7XG4gICAgICAgIGxldCBuZXh0SXRlbSA9IGl0ZW0ubmV4dEVsZW1lbnRTaWJsaW5nO1xuXG4gICAgICAgIGlmIChuZXh0SXRlbSlcbiAgICAgICAgICAgIHJldHVybiBEb21IYW5kbGVyLmhhc0NsYXNzKG5leHRJdGVtLCAncC1kaXNh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