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

501 lines
65 KiB
JavaScript

import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';
import { ChangeDetectionStrategy, Component, ContentChildren, Inject, Input, NgModule, PLATFORM_ID, ViewChild, ViewEncapsulation, numberAttribute } from '@angular/core';
import { PrimeTemplate } from 'primeng/api';
import { DomHandler } from 'primeng/dom';
import { UniqueComponentId } from 'primeng/utils';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
/**
* ScrollPanel is a cross browser, lightweight and themable alternative to native browser scrollbar.
* @group Components
*/
export class ScrollPanel {
platformId;
el;
zone;
cd;
document;
renderer;
/**
* Inline style of the component.
* @group Props
*/
style;
/**
* Style class of the component.
* @group Props
*/
styleClass;
/**
* Step factor to scroll the content while pressing the arrow keys.
* @group Props
*/
step = 5;
containerViewChild;
contentViewChild;
xBarViewChild;
yBarViewChild;
templates;
scrollYRatio;
scrollXRatio;
timeoutFrame = (fn) => setTimeout(fn, 0);
initialized = false;
lastPageY;
lastPageX;
isXBarClicked = false;
isYBarClicked = false;
contentTemplate;
lastScrollLeft = 0;
lastScrollTop = 0;
orientation = 'vertical';
timer;
contentId;
windowResizeListener;
contentScrollListener;
mouseEnterListener;
xBarMouseDownListener;
yBarMouseDownListener;
documentMouseMoveListener;
documentMouseUpListener;
constructor(platformId, el, zone, cd, document, renderer) {
this.platformId = platformId;
this.el = el;
this.zone = zone;
this.cd = cd;
this.document = document;
this.renderer = renderer;
this.contentId = UniqueComponentId() + '_content';
}
ngAfterViewInit() {
if (isPlatformBrowser(this.platformId)) {
this.zone.runOutsideAngular(() => {
this.moveBar();
this.moveBar = this.moveBar.bind(this);
this.onXBarMouseDown = this.onXBarMouseDown.bind(this);
this.onYBarMouseDown = this.onYBarMouseDown.bind(this);
this.onDocumentMouseMove = this.onDocumentMouseMove.bind(this);
this.onDocumentMouseUp = this.onDocumentMouseUp.bind(this);
this.windowResizeListener = this.renderer.listen(window, 'resize', this.moveBar);
this.contentScrollListener = this.renderer.listen(this.contentViewChild.nativeElement, 'scroll', this.moveBar);
this.mouseEnterListener = this.renderer.listen(this.contentViewChild.nativeElement, 'mouseenter', this.moveBar);
this.xBarMouseDownListener = this.renderer.listen(this.xBarViewChild.nativeElement, 'mousedown', this.onXBarMouseDown);
this.yBarMouseDownListener = this.renderer.listen(this.yBarViewChild.nativeElement, 'mousedown', this.onYBarMouseDown);
this.calculateContainerHeight();
this.initialized = true;
});
}
}
ngAfterContentInit() {
this.templates.forEach((item) => {
switch (item.getType()) {
case 'content':
this.contentTemplate = item.template;
break;
default:
this.contentTemplate = item.template;
break;
}
});
}
calculateContainerHeight() {
let container = this.containerViewChild.nativeElement;
let content = this.contentViewChild.nativeElement;
let xBar = this.xBarViewChild.nativeElement;
const window = this.document.defaultView;
let containerStyles = window.getComputedStyle(container), xBarStyles = window.getComputedStyle(xBar), pureContainerHeight = DomHandler.getHeight(container) - parseInt(xBarStyles['height'], 10);
if (containerStyles['max-height'] != 'none' && pureContainerHeight == 0) {
if (content.offsetHeight + parseInt(xBarStyles['height'], 10) > parseInt(containerStyles['max-height'], 10)) {
container.style.height = containerStyles['max-height'];
}
else {
container.style.height = content.offsetHeight + parseFloat(containerStyles.paddingTop) + parseFloat(containerStyles.paddingBottom) + parseFloat(containerStyles.borderTopWidth) + parseFloat(containerStyles.borderBottomWidth) + 'px';
}
}
}
moveBar() {
let container = this.containerViewChild.nativeElement;
let content = this.contentViewChild.nativeElement;
/* horizontal scroll */
let xBar = this.xBarViewChild.nativeElement;
let totalWidth = content.scrollWidth;
let ownWidth = content.clientWidth;
let bottom = (container.clientHeight - xBar.clientHeight) * -1;
this.scrollXRatio = ownWidth / totalWidth;
/* vertical scroll */
let yBar = this.yBarViewChild.nativeElement;
let totalHeight = content.scrollHeight;
let ownHeight = content.clientHeight;
let right = (container.clientWidth - yBar.clientWidth) * -1;
this.scrollYRatio = ownHeight / totalHeight;
this.requestAnimationFrame(() => {
if (this.scrollXRatio >= 1) {
xBar.setAttribute('data-p-scrollpanel-hidden', 'true');
DomHandler.addClass(xBar, 'p-scrollpanel-hidden');
}
else {
xBar.setAttribute('data-p-scrollpanel-hidden', 'false');
DomHandler.removeClass(xBar, 'p-scrollpanel-hidden');
const xBarWidth = Math.max(this.scrollXRatio * 100, 10);
const xBarLeft = (content.scrollLeft * (100 - xBarWidth)) / (totalWidth - ownWidth);
xBar.style.cssText = 'width:' + xBarWidth + '%; left:' + xBarLeft + '%;bottom:' + bottom + 'px;';
}
if (this.scrollYRatio >= 1) {
yBar.setAttribute('data-p-scrollpanel-hidden', 'true');
DomHandler.addClass(yBar, 'p-scrollpanel-hidden');
}
else {
yBar.setAttribute('data-p-scrollpanel-hidden', 'false');
DomHandler.removeClass(yBar, 'p-scrollpanel-hidden');
const yBarHeight = Math.max(this.scrollYRatio * 100, 10);
const yBarTop = (content.scrollTop * (100 - yBarHeight)) / (totalHeight - ownHeight);
yBar.style.cssText = 'height:' + yBarHeight + '%; top: calc(' + yBarTop + '% - ' + xBar.clientHeight + 'px);right:' + right + 'px;';
}
});
this.cd.markForCheck();
}
onScroll(event) {
if (this.lastScrollLeft !== event.target.scrollLeft) {
this.lastScrollLeft = event.target.scrollLeft;
this.orientation = 'horizontal';
}
else if (this.lastScrollTop !== event.target.scrollTop) {
this.lastScrollTop = event.target.scrollTop;
this.orientation = 'vertical';
}
this.moveBar();
}
onKeyDown(event) {
if (this.orientation === 'vertical') {
switch (event.code) {
case 'ArrowDown': {
this.setTimer('scrollTop', this.step);
event.preventDefault();
break;
}
case 'ArrowUp': {
this.setTimer('scrollTop', this.step * -1);
event.preventDefault();
break;
}
case 'ArrowLeft':
case 'ArrowRight': {
event.preventDefault();
break;
}
default:
//no op
break;
}
}
else if (this.orientation === 'horizontal') {
switch (event.code) {
case 'ArrowRight': {
this.setTimer('scrollLeft', this.step);
event.preventDefault();
break;
}
case 'ArrowLeft': {
this.setTimer('scrollLeft', this.step * -1);
event.preventDefault();
break;
}
case 'ArrowDown':
case 'ArrowUp': {
event.preventDefault();
break;
}
default:
//no op
break;
}
}
}
onKeyUp() {
this.clearTimer();
}
repeat(bar, step) {
this.contentViewChild.nativeElement[bar] += step;
this.moveBar();
}
setTimer(bar, step) {
this.clearTimer();
this.timer = setTimeout(() => {
this.repeat(bar, step);
}, 40);
}
clearTimer() {
if (this.timer) {
clearTimeout(this.timer);
}
}
bindDocumentMouseListeners() {
if (!this.documentMouseMoveListener) {
this.documentMouseMoveListener = (e) => {
this.onDocumentMouseMove(e);
};
this.document.addEventListener('mousemove', this.documentMouseMoveListener);
}
if (!this.documentMouseUpListener) {
this.documentMouseUpListener = (e) => {
this.onDocumentMouseUp(e);
};
this.document.addEventListener('mouseup', this.documentMouseUpListener);
}
}
unbindDocumentMouseListeners() {
if (this.documentMouseMoveListener) {
this.document.removeEventListener('mousemove', this.documentMouseMoveListener);
this.documentMouseMoveListener = null;
}
if (this.documentMouseUpListener) {
document.removeEventListener('mouseup', this.documentMouseUpListener);
this.documentMouseUpListener = null;
}
}
onYBarMouseDown(e) {
this.isYBarClicked = true;
this.yBarViewChild.nativeElement.focus();
this.lastPageY = e.pageY;
this.yBarViewChild.nativeElement.setAttribute('data-p-scrollpanel-grabbed', 'true');
DomHandler.addClass(this.yBarViewChild.nativeElement, 'p-scrollpanel-grabbed');
this.document.body.setAttribute('data-p-scrollpanel-grabbed', 'true');
DomHandler.addClass(this.document.body, 'p-scrollpanel-grabbed');
this.bindDocumentMouseListeners();
e.preventDefault();
}
onXBarMouseDown(e) {
this.isXBarClicked = true;
this.xBarViewChild.nativeElement.focus();
this.lastPageX = e.pageX;
this.xBarViewChild.nativeElement.setAttribute('data-p-scrollpanel-grabbed', 'false');
DomHandler.addClass(this.xBarViewChild.nativeElement, 'p-scrollpanel-grabbed');
this.document.body.setAttribute('data-p-scrollpanel-grabbed', 'false');
DomHandler.addClass(this.document.body, 'p-scrollpanel-grabbed');
this.bindDocumentMouseListeners();
e.preventDefault();
}
onDocumentMouseMove(e) {
if (this.isXBarClicked) {
this.onMouseMoveForXBar(e);
}
else if (this.isYBarClicked) {
this.onMouseMoveForYBar(e);
}
else {
this.onMouseMoveForXBar(e);
this.onMouseMoveForYBar(e);
}
}
onMouseMoveForXBar(e) {
let deltaX = e.pageX - this.lastPageX;
this.lastPageX = e.pageX;
this.requestAnimationFrame(() => {
this.contentViewChild.nativeElement.scrollLeft += deltaX / this.scrollXRatio;
});
}
onMouseMoveForYBar(e) {
let deltaY = e.pageY - this.lastPageY;
this.lastPageY = e.pageY;
this.requestAnimationFrame(() => {
this.contentViewChild.nativeElement.scrollTop += deltaY / this.scrollYRatio;
});
}
/**
* Scrolls the top location to the given value.
* @param scrollTop
* @group Method
*/
scrollTop(scrollTop) {
let scrollableHeight = this.contentViewChild.nativeElement.scrollHeight - this.contentViewChild.nativeElement.clientHeight;
scrollTop = scrollTop > scrollableHeight ? scrollableHeight : scrollTop > 0 ? scrollTop : 0;
this.contentViewChild.nativeElement.scrollTop = scrollTop;
}
onFocus(event) {
if (this.xBarViewChild.nativeElement.isSameNode(event.target)) {
this.orientation = 'horizontal';
}
else if (this.yBarViewChild.nativeElement.isSameNode(event.target)) {
this.orientation = 'vertical';
}
}
onBlur() {
if (this.orientation === 'horizontal') {
this.orientation = 'vertical';
}
}
onDocumentMouseUp(e) {
this.yBarViewChild.nativeElement.setAttribute('data-p-scrollpanel-grabbed', 'false');
DomHandler.removeClass(this.yBarViewChild.nativeElement, 'p-scrollpanel-grabbed');
this.xBarViewChild.nativeElement.setAttribute('data-p-scrollpanel-grabbed', 'false');
DomHandler.removeClass(this.xBarViewChild.nativeElement, 'p-scrollpanel-grabbed');
this.document.body.setAttribute('data-p-scrollpanel-grabbed', 'false');
DomHandler.removeClass(this.document.body, 'p-scrollpanel-grabbed');
this.unbindDocumentMouseListeners();
this.isXBarClicked = false;
this.isYBarClicked = false;
}
requestAnimationFrame(f) {
let frame = window.requestAnimationFrame || this.timeoutFrame;
frame(f);
}
unbindListeners() {
if (this.windowResizeListener) {
this.windowResizeListener();
this.windowResizeListener = null;
}
if (this.contentScrollListener) {
this.contentScrollListener();
this.contentScrollListener = null;
}
if (this.mouseEnterListener) {
this.mouseEnterListener();
this.mouseEnterListener = null;
}
if (this.xBarMouseDownListener) {
this.xBarMouseDownListener();
this.xBarMouseDownListener = null;
}
if (this.yBarMouseDownListener) {
this.yBarMouseDownListener();
this.yBarMouseDownListener = null;
}
}
ngOnDestroy() {
if (this.initialized) {
this.unbindListeners();
}
}
/**
* Refreshes the position and size of the scrollbar.
* @group Method
*/
refresh() {
this.moveBar();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ScrollPanel, deps: [{ token: PLATFORM_ID }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: ScrollPanel, selector: "p-scrollPanel", inputs: { style: "style", styleClass: "styleClass", step: ["step", "step", numberAttribute] }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "contentViewChild", first: true, predicate: ["content"], descendants: true }, { propertyName: "xBarViewChild", first: true, predicate: ["xBar"], descendants: true }, { propertyName: "yBarViewChild", first: true, predicate: ["yBar"], descendants: true }], ngImport: i0, template: `
<div #container [ngClass]="'p-scrollpanel p-component'" [ngStyle]="style" [class]="styleClass" [attr.data-pc-name]="'scrollpanel'">
<div class="p-scrollpanel-wrapper" [attr.data-pc-section]="'wrapper'">
<div #content class="p-scrollpanel-content" [attr.data-pc-section]="'content'" (mouseenter)="moveBar()" (scroll)="onScroll($event)">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
</div>
</div>
<div
#xBar
class="p-scrollpanel-bar p-scrollpanel-bar-x"
tabindex="0"
role="scrollbar"
[attr.aria-orientation]="'horizontal'"
[attr.aria-valuenow]="lastScrollLeft"
[attr.data-pc-section]="'barx'"
[attr.aria-controls]="contentId"
(mousedown)="onXBarMouseDown($event)"
(keydown)="onKeyDown($event)"
(keyup)="onKeyUp()"
(focus)="onFocus($event)"
(blur)="onBlur()"
></div>
<div
#yBar
class="p-scrollpanel-bar p-scrollpanel-bar-y"
tabindex="0"
role="scrollbar"
[attr.aria-orientation]="'vertical'"
[attr.aria-valuenow]="lastScrollTop"
[attr.data-pc-section]="'bary'"
[attr.aria-controls]="contentId"
(mousedown)="onYBarMouseDown($event)"
(keydown)="onKeyDown($event)"
(keyup)="onKeyUp()"
(focus)="onFocus($event)"
></div>
</div>
`, isInline: true, styles: ["@layer primeng{.p-scrollpanel-wrapper{overflow:hidden;width:100%;height:100%;position:relative;float:left}.p-scrollpanel-content{height:calc(100% + 18px);width:calc(100% + 18px);padding:0 18px 18px 0;position:relative;overflow:auto;box-sizing:border-box}.p-scrollpanel-bar{position:relative;background:#c1c1c1;border-radius:3px;cursor:pointer;opacity:0;transition:opacity .25s linear}.p-scrollpanel-bar-y{width:9px;top:0}.p-scrollpanel-bar-x{height:9px;bottom:0}.p-scrollpanel-hidden{visibility:hidden}.p-scrollpanel:hover .p-scrollpanel-bar,.p-scrollpanel:active .p-scrollpanel-bar{opacity:1}.p-scrollpanel-grabbed{-webkit-user-select:none;user-select:none}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ScrollPanel, decorators: [{
type: Component,
args: [{ selector: 'p-scrollPanel', template: `
<div #container [ngClass]="'p-scrollpanel p-component'" [ngStyle]="style" [class]="styleClass" [attr.data-pc-name]="'scrollpanel'">
<div class="p-scrollpanel-wrapper" [attr.data-pc-section]="'wrapper'">
<div #content class="p-scrollpanel-content" [attr.data-pc-section]="'content'" (mouseenter)="moveBar()" (scroll)="onScroll($event)">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
</div>
</div>
<div
#xBar
class="p-scrollpanel-bar p-scrollpanel-bar-x"
tabindex="0"
role="scrollbar"
[attr.aria-orientation]="'horizontal'"
[attr.aria-valuenow]="lastScrollLeft"
[attr.data-pc-section]="'barx'"
[attr.aria-controls]="contentId"
(mousedown)="onXBarMouseDown($event)"
(keydown)="onKeyDown($event)"
(keyup)="onKeyUp()"
(focus)="onFocus($event)"
(blur)="onBlur()"
></div>
<div
#yBar
class="p-scrollpanel-bar p-scrollpanel-bar-y"
tabindex="0"
role="scrollbar"
[attr.aria-orientation]="'vertical'"
[attr.aria-valuenow]="lastScrollTop"
[attr.data-pc-section]="'bary'"
[attr.aria-controls]="contentId"
(mousedown)="onYBarMouseDown($event)"
(keydown)="onKeyDown($event)"
(keyup)="onKeyUp()"
(focus)="onFocus($event)"
></div>
</div>
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
class: 'p-element'
}, styles: ["@layer primeng{.p-scrollpanel-wrapper{overflow:hidden;width:100%;height:100%;position:relative;float:left}.p-scrollpanel-content{height:calc(100% + 18px);width:calc(100% + 18px);padding:0 18px 18px 0;position:relative;overflow:auto;box-sizing:border-box}.p-scrollpanel-bar{position:relative;background:#c1c1c1;border-radius:3px;cursor:pointer;opacity:0;transition:opacity .25s linear}.p-scrollpanel-bar-y{width:9px;top:0}.p-scrollpanel-bar-x{height:9px;bottom:0}.p-scrollpanel-hidden{visibility:hidden}.p-scrollpanel:hover .p-scrollpanel-bar,.p-scrollpanel:active .p-scrollpanel-bar{opacity:1}.p-scrollpanel-grabbed{-webkit-user-select:none;user-select:none}}\n"] }]
}], ctorParameters: () => [{ type: undefined, decorators: [{
type: Inject,
args: [PLATFORM_ID]
}] }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: Document, decorators: [{
type: Inject,
args: [DOCUMENT]
}] }, { type: i0.Renderer2 }], propDecorators: { style: [{
type: Input
}], styleClass: [{
type: Input
}], step: [{
type: Input,
args: [{ transform: numberAttribute }]
}], containerViewChild: [{
type: ViewChild,
args: ['container']
}], contentViewChild: [{
type: ViewChild,
args: ['content']
}], xBarViewChild: [{
type: ViewChild,
args: ['xBar']
}], yBarViewChild: [{
type: ViewChild,
args: ['yBar']
}], templates: [{
type: ContentChildren,
args: [PrimeTemplate]
}] } });
export class ScrollPanelModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ScrollPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: ScrollPanelModule, declarations: [ScrollPanel], imports: [CommonModule], exports: [ScrollPanel] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ScrollPanelModule, imports: [CommonModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ScrollPanelModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule],
exports: [ScrollPanel],
declarations: [ScrollPanel]
}]
}] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xscGFuZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvc2Nyb2xscGF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uXT1cIidob3Jpem9udGFsJ1wiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZW5vd109XCJsYXN0U2Nyb2xsTGVmdFwiXG4gICAgICAgICAgICAgICAgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidiYXJ4J1wiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1jb250cm9sc109XCJjb250ZW50SWRcIlxuICAgICAgICAgICAgICAgIChtb3VzZWRvd24pPVwib25YQmFyTW91c2VEb3duKCRldmVudClcIlxuICAgICAgICAgICAgICAgIChrZXlkb3duKT1cIm9uS2V5RG93bigkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICAoa2V5dXApPVwib25LZXlVcCgpXCJcbiAgICAgICAgICAgICAgICAoZm9jdXMpPVwib25Gb2N1cygkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICAoYmx1cik9XCJvbkJsdXIoKVwiXG4gICAgICAgICAgICA+PC9kaXY+XG4gICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgI3lCYXJcbiAgICAgICAgICAgICAgICBjbGFzcz1cInAtc2Nyb2xscGFuZWwtYmFyIHAtc2Nyb2xscGFuZWwtYmFyLXlcIlxuICAgICAgICAgICAgICAgIHRhYmluZGV4PVwiMFwiXG4gICAgICAgICAgICAgICAgcm9sZT1cInNjcm9sbGJhclwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1vcmllbnRhdGlvbl09XCIndmVydGljYWwnXCJcbiAgICAgICAgICAgICAgICBbYXR0ci5hcmlhLXZhbHVlbm93XT1cImxhc3RTY3JvbGxUb3BcIlxuICAgICAgICAgICAgICAgIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInYmFyeSdcIlxuICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtY29udHJvbHNdPVwiY29udGVudElkXCJcbiAgICAgICAgICAgICAgICAobW91c2Vkb3duKT1cIm9uWUJhck1vdXNlRG93bigkZXZlbnQpXCJcbiAgIC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RlIHJlbmRlcmVyOiBSZW5kZXJlcjIpIHtcbiAgICAgICAgdGhpcy5jb250ZW50SWQgPSBVbmlxdWVDb21wb25lbnRJZCgpICsgJ19jb250ZW50JztcbiAgICB9XG5cbiAgICBuZ0FmdGVyVmlld0luaXQoKSB7XG4gICAgICAgIGlmIChpc1BsYXRmb3JtQnJvd3Nlcih0aGlzLnBsYXRmb3JtSWQpKSB7XG4gICAgICAgICAgICB0aGlzLnpvbmUucnVuT3V0c2lkZUFuZ3VsYXIoKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUJhcigpO1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUJhciA9IHRoaXMubW92ZUJhci5iaW5kKHRoaXMpO1xuICAgICAgICAgICAgICAgIHRoaXMub25YQmFyTW91c2VEb3duID0gdGhpcy5vblhCYXJNb3VzZURvd24uYmluZCh0aGlzKTtcbiAgICAgICAgICAgICAgICB0aGlzLm9uWUJhck1vdXNlRG93biA9IHRoaXMub25ZQmFyTW91c2VEb3duLmJpbmQodGhpcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5vbkRvY3VtZW50TW91c2VNb3ZlID0gdGhpcy5vbkRvY3VtZW50TW91c2VNb3ZlLmJpbmQodGhpcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5vbkRvY3VtZW50TW91c2VVcCA9IHRoaXMub25Eb2N1bWVudE1vdXNlVXAuYmluZCh0aGlzKTtcblxuICAgICAgICAgICAgICAgIHRoaXMud2luZG93UmVzaXplTGlzdGVuZXIgPSB0aGlzLnJlbmRlcmVyLmxpc3Rlbih3aW5kb3csICdyZXNpemUnLCB0aGlzLm1vdmVCYXIpO1xuICAgICAgICAgICAgICAgIHRoaXMuY29udGVudFNjcm9sbExpc3RlbmVyID0gdGhpcy5yZW5kZXJlci5saXN0ZW4oKHRoaXMuY29udGVudFZpZXdDaGlsZCBhcyBFbGVtZW50UmVmKS5uYXRpdmVFbGVtZW50LCAnc2Nyb2xsJywgdGhpcy5t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AnQXJyb3dEb3duJzoge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFRpbWVyKCdzY3JvbGxUb3AnLCB0aGlzLnN0ZXApO1xuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjYXNlICdBcnJvd1VwJzoge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFRpbWVyKCdzY3JvbGxUb3AnLCB0aGlzLnN0ZXAgKiAtMSk7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNhc2UgJ0Fycm93TGVmdCc6XG5cbiAgICAgICAgICAgICAgICBjYXNlICdBcnJvd1JpZ2h0Jzoge1xuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAvL25vIG9wXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHRoaXMub3JpZW50YXRpb24gPT09ICdob3Jpem9udGFsJykge1xuICAgICAgICAgICAgc3dpdGNoIChldmVudC5jb2RlKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAnQXJyb3dSaWdodCc6IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRUaW1lcignc2Nyb2xsTGVmdCcsIHRoaXMuc3RlcCk7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNhc2UgJ0Fycm93TGVmdCc6IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRUaW1lcignc2Nyb2xsTGVmdCcsIHRoaXMuc3RlcCAqIC0xKTtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY2FzZSAnQXJyb3dEb3duJzpcblxuICAgICAgICAgICAgICAgIGNhc2UgJ0Fycm93VXAnOiB7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIC8vbm8gb3BcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbktleVVwKCkge1xuICAgICAgICB0aGlzLmNsZWFyVGltZXIoKTtcbiAgICB9XG5cbiAgICByZXBlYXQoYmFyLCBzdGVwKSB7XG4gICAgICAgIHRoaXMuY29udGVudFZpZXdDaGlsZC5uYXRpdmVFbGVtZW50W2Jhcl0gKz0gc3RlcDtcbiAgICAgICAgdGhpcy5tb3ZlQmFyKCk7XG4gICAgfVxuXG4gICAgc2V0VGltZXIoYmFyLCBzdGVwKSB7XG4gICAgICAgIHRoaXMuY2xlYXJUaW1lcigpO1xuICAgICAgICB0aGlzLnRpbWVyID0gc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLnJlcGVhdChiYXIsIHN0ZXApO1xuICAgICAgICB9LCA0MCk7XG4gICAgfVxuXG4gICAgY2xlYXJUaW1lcigpIHtcbiAgICAgICAgaWYgKHRoaX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dXNlRG93bkxpc3RlbmVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICBpZiAodGhpcy5pbml0aWFsaXplZCkge1xuICAgICAgICAgICAgdGhpcy51bmJpbmRMaXN0ZW5lcnMoKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICAvKipcbiAgICAgKiBSZWZyZXNoZXMgdGhlIHBvc2l0aW9uIGFuZCBzaXplIG9mIHRoZSBzY3JvbGxiYXIuXG4gICAgICogQGdyb3VwIE1ldGhvZFxuICAgICAqL1xuICAgIHJlZnJlc2goKSB7XG4gICAgICAgIHRoaXMubW92ZUJhcigpO1xuICAgIH1cbn1cblxuQE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlXSxcbiAgICBleHBvcnRzOiBbU2Nyb2xsUGFuZWxdLFxuICAgIGRlY2xhcmF0aW9uczogW1Njcm9sbFBhbmVsXVxufSlcbmV4cG9ydCBjbGFzcyBTY3JvbGxQYW5lbE1vZHVsZSB7fVxuIl19