source: trip-planner-front/node_modules/primeng/esm2020/image/image.mjs@ 571e0df

Last change on this file since 571e0df was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 31.4 KB
RevLine 
[59329aa]1import { NgModule, Component, Input, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, Output, EventEmitter, ViewChild } from '@angular/core';
2import { CommonModule } from '@angular/common';
3import { SharedModule, PrimeTemplate } from 'primeng/api';
4import { trigger, style, transition, animate, } from '@angular/animations';
5import { DomHandler } from 'primeng/dom';
6import { ZIndexUtils } from 'primeng/utils';
7import * as i0 from "@angular/core";
8import * as i1 from "primeng/api";
9import * as i2 from "@angular/common";
10export class Image {
11 constructor(config, cd) {
12 this.config = config;
13 this.cd = cd;
14 this.preview = false;
15 this.showTransitionOptions = '150ms cubic-bezier(0, 0, 0.2, 1)';
16 this.hideTransitionOptions = '150ms cubic-bezier(0, 0, 0.2, 1)';
17 this.onShow = new EventEmitter();
18 this.onHide = new EventEmitter();
19 this.maskVisible = false;
20 this.previewVisible = false;
21 this.rotate = 0;
22 this.scale = 1;
23 this.previewClick = false;
24 }
25 ngAfterContentInit() {
26 this.templates.forEach((item) => {
27 switch (item.getType()) {
28 case 'indicator':
29 this.indicatorTemplate = item.template;
30 break;
31 default:
32 this.indicatorTemplate = item.template;
33 break;
34 }
35 });
36 }
37 onImageClick() {
38 if (this.preview) {
39 this.maskVisible = true;
40 this.previewVisible = true;
41 }
42 }
43 onMaskClick() {
44 if (!this.previewClick) {
45 this.previewVisible = false;
46 this.rotate = 0;
47 this.scale = 1;
48 }
49 this.previewClick = false;
50 }
51 onPreviewImageClick() {
52 this.previewClick = true;
53 }
54 rotateRight() {
55 this.rotate += 90;
56 this.previewClick = true;
57 }
58 rotateLeft() {
59 this.rotate -= 90;
60 this.previewClick = true;
61 }
62 zoomIn() {
63 this.scale = this.scale + 0.1;
64 this.previewClick = true;
65 }
66 zoomOut() {
67 this.scale = this.scale - 0.1;
68 this.previewClick = true;
69 }
70 zoomDisabled() {
71 return this.scale <= 0.5 || this.scale >= 1.5;
72 }
73 onAnimationStart(event) {
74 switch (event.toState) {
75 case 'visible':
76 this.container = event.element;
77 this.wrapper = this.container.parentElement;
78 this.appendContainer();
79 this.moveOnTop();
80 break;
81 case 'void':
82 DomHandler.addClass(this.wrapper, 'p-component-overlay-leave');
83 break;
84 }
85 }
86 onAnimationEnd(event) {
87 switch (event.toState) {
88 case 'void':
89 ZIndexUtils.clear(this.container);
90 this.maskVisible = false;
91 this.container = null;
92 this.wrapper = null;
93 this.cd.markForCheck();
94 this.onHide.emit({});
95 break;
96 case 'visible':
97 this.onShow.emit({});
98 break;
99 }
100 }
101 moveOnTop() {
102 ZIndexUtils.set('modal', this.container, this.config.zIndex.modal);
103 this.wrapper.style.zIndex = String(parseInt(this.container.style.zIndex, 10) - 1);
104 }
105 appendContainer() {
106 if (this.appendTo) {
107 if (this.appendTo === 'body')
108 document.body.appendChild(this.wrapper);
109 else
110 DomHandler.appendChild(this.wrapper, this.appendTo);
111 }
112 }
113 imagePreviewStyle() {
114 return { transform: 'rotate(' + this.rotate + 'deg) scale(' + this.scale + ')' };
115 }
116 containerClass() {
117 return {
118 'p-image p-component': true,
119 'p-image-preview-container': this.preview
120 };
121 }
122}
123Image.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Image, deps: [{ token: i1.PrimeNGConfig }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
124Image.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Image, selector: "p-image", inputs: { imageClass: "imageClass", imageStyle: "imageStyle", styleClass: "styleClass", style: "style", src: "src", alt: "alt", width: "width", height: "height", appendTo: "appendTo", preview: "preview", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions" }, outputs: { onShow: "onShow", onHide: "onHide" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "mask", first: true, predicate: ["mask"], descendants: true }], ngImport: i0, template: `
125 <span [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="style">
126 <img [attr.src]="src" [attr.alt]="alt" [attr.width]="width" [attr.height]="height" [ngStyle]="imageStyle" [class]="imageClass" />
127 <div class="p-image-preview-indicator" *ngIf="preview" (click)="onImageClick()">
128 <ng-container *ngIf="indicatorTemplate;else defaultTemplate">
129 <ng-container *ngTemplateOutlet="indicatorTemplate"></ng-container>
130 </ng-container>
131 <ng-template #defaultTemplate>
132 <i class="p-image-preview-icon pi pi-eye"></i>
133 </ng-template>
134 </div>
135 <div #mask class="p-image-mask p-component-overlay p-component-overlay-enter" *ngIf="maskVisible" (click)="onMaskClick()">
136 <div class="p-image-toolbar">
137 <button class="p-image-action p-link" (click)="rotateRight()" type="button">
138 <i class="pi pi-refresh"></i>
139 </button>
140 <button class="p-image-action p-link" (click)="rotateLeft()" type="button">
141 <i class="pi pi-undo"></i>
142 </button>
143 <button class="p-image-action p-link" (click)="zoomOut()" type="button" [disabled]="zoomDisabled()">
144 <i class="pi pi-search-minus"></i>
145 </button>
146 <button class="p-image-action p-link" (click)="zoomIn()" type="button" [disabled]="zoomDisabled()">
147 <i class="pi pi-search-plus"></i>
148 </button>
149 <button class="p-image-action p-link" type="button">
150 <i class="pi pi-times"></i>
151 </button>
152 </div>
153 <div *ngIf="previewVisible" [@animation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}"
154 (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)">
155 <img [attr.src]="src" class="p-image-preview" [ngStyle]="imagePreviewStyle()" (click)="onPreviewImageClick()"/>
156 </div>
157 </div>
158 </span>
159 `, isInline: true, styles: [".p-image-mask{display:flex;align-items:center;justify-content:center}.p-image-preview-container{position:relative;display:inline-block}.p-image-preview-indicator{position:absolute;left:0;top:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .3s}.p-image-preview-icon{font-size:1.5rem}.p-image-preview-container:hover>.p-image-preview-indicator{opacity:1;cursor:pointer}.p-image-preview-container>img{cursor:pointer}.p-image-toolbar{position:absolute;top:0;right:0;display:flex}.p-image-action.p-link{display:flex;justify-content:center;align-items:center}.p-image-preview{transition:transform .15s;max-width:100vw;max-height:100vh}\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"] }], animations: [
160 trigger('animation', [
161 transition('void => visible', [
162 style({ transform: 'scale(0.7)', opacity: 0 }),
163 animate('{{showTransitionParams}}')
164 ]),
165 transition('visible => void', [
166 animate('{{hideTransitionParams}}', style({ transform: 'scale(0.7)', opacity: 0 }))
167 ])
168 ])
169 ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
170i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Image, decorators: [{
171 type: Component,
172 args: [{ selector: 'p-image', template: `
173 <span [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="style">
174 <img [attr.src]="src" [attr.alt]="alt" [attr.width]="width" [attr.height]="height" [ngStyle]="imageStyle" [class]="imageClass" />
175 <div class="p-image-preview-indicator" *ngIf="preview" (click)="onImageClick()">
176 <ng-container *ngIf="indicatorTemplate;else defaultTemplate">
177 <ng-container *ngTemplateOutlet="indicatorTemplate"></ng-container>
178 </ng-container>
179 <ng-template #defaultTemplate>
180 <i class="p-image-preview-icon pi pi-eye"></i>
181 </ng-template>
182 </div>
183 <div #mask class="p-image-mask p-component-overlay p-component-overlay-enter" *ngIf="maskVisible" (click)="onMaskClick()">
184 <div class="p-image-toolbar">
185 <button class="p-image-action p-link" (click)="rotateRight()" type="button">
186 <i class="pi pi-refresh"></i>
187 </button>
188 <button class="p-image-action p-link" (click)="rotateLeft()" type="button">
189 <i class="pi pi-undo"></i>
190 </button>
191 <button class="p-image-action p-link" (click)="zoomOut()" type="button" [disabled]="zoomDisabled()">
192 <i class="pi pi-search-minus"></i>
193 </button>
194 <button class="p-image-action p-link" (click)="zoomIn()" type="button" [disabled]="zoomDisabled()">
195 <i class="pi pi-search-plus"></i>
196 </button>
197 <button class="p-image-action p-link" type="button">
198 <i class="pi pi-times"></i>
199 </button>
200 </div>
201 <div *ngIf="previewVisible" [@animation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}"
202 (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)">
203 <img [attr.src]="src" class="p-image-preview" [ngStyle]="imagePreviewStyle()" (click)="onPreviewImageClick()"/>
204 </div>
205 </div>
206 </span>
207 `, animations: [
208 trigger('animation', [
209 transition('void => visible', [
210 style({ transform: 'scale(0.7)', opacity: 0 }),
211 animate('{{showTransitionParams}}')
212 ]),
213 transition('visible => void', [
214 animate('{{hideTransitionParams}}', style({ transform: 'scale(0.7)', opacity: 0 }))
215 ])
216 ])
217 ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
218 'class': 'p-element'
219 }, styles: [".p-image-mask{display:flex;align-items:center;justify-content:center}.p-image-preview-container{position:relative;display:inline-block}.p-image-preview-indicator{position:absolute;left:0;top:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .3s}.p-image-preview-icon{font-size:1.5rem}.p-image-preview-container:hover>.p-image-preview-indicator{opacity:1;cursor:pointer}.p-image-preview-container>img{cursor:pointer}.p-image-toolbar{position:absolute;top:0;right:0;display:flex}.p-image-action.p-link{display:flex;justify-content:center;align-items:center}.p-image-preview{transition:transform .15s;max-width:100vw;max-height:100vh}\n"] }]
220 }], ctorParameters: function () { return [{ type: i1.PrimeNGConfig }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { imageClass: [{
221 type: Input
222 }], imageStyle: [{
223 type: Input
224 }], styleClass: [{
225 type: Input
226 }], style: [{
227 type: Input
228 }], src: [{
229 type: Input
230 }], alt: [{
231 type: Input
232 }], width: [{
233 type: Input
234 }], height: [{
235 type: Input
236 }], appendTo: [{
237 type: Input
238 }], preview: [{
239 type: Input
240 }], showTransitionOptions: [{
241 type: Input
242 }], hideTransitionOptions: [{
243 type: Input
244 }], onShow: [{
245 type: Output
246 }], onHide: [{
247 type: Output
248 }], mask: [{
249 type: ViewChild,
250 args: ['mask']
251 }], templates: [{
252 type: ContentChildren,
253 args: [PrimeTemplate]
254 }] } });
255export class ImageModule {
256}
257ImageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
258ImageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ImageModule, declarations: [Image], imports: [CommonModule], exports: [Image, SharedModule] });
259ImageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ImageModule, imports: [[CommonModule], SharedModule] });
260i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ImageModule, decorators: [{
261 type: NgModule,
262 args: [{
263 imports: [CommonModule],
264 exports: [Image, SharedModule],
265 declarations: [Image]
266 }]
267 }] });
268//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvaW1hZ2UvaW1hZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBT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CJwLWltYWdlLW1hc2sgcC1jb21wb25lbnQtb3ZlcmxheSBwLWNvbXBvbmVudC1vdmVybGF5LWVudGVyXCIgKm5nSWY9XCJtYXNrVmlzaWJsZVwiIChjbGljayk9XCJvbk1hc2tDbGljaygpXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInAtaW1hZ2UtdG9vbGJhclwiPlxuICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIGNsYXNzPVwicC1pbWFnZS1hY3Rpb24gcC1saW5rXCIgKGNsaWNrKT1cInJvdGF0ZVJpZ2h0KClcIiB0eXBlPVwiYnV0dG9uXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInBpIHBpLXJlZnJlc2hcIj48L2k+XG4gICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIGNsYXNzPVwicC1pbWFnZS1hY3Rpb24gcC1saW5rXCIgKGNsaWNrKT1cInJvdGF0ZUxlZnQoKVwiIHR5cGU9XCJidXR0b25cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxpIGNsYXNzPVwicGkgcGktdW5kb1wiPjwvaT5cbiAgICAgICAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJwLWltYWdlLWFjdGlvbiBwLWxpbmtcIiAoY2xpY2spPVwiem9vbU91dCgpXCIgdHlwZT1cImJ1dHRvblwiIFtkaXNhYmxlZF09XCJ6b29tRGlzYWJsZWQoKVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGkgY2xhc3M9XCJwaSBwaS1zZWFyY2gtbWludXNcIj48L2k+XG4gICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIGNsYXNzPVwicC1pbWFnZS1hY3Rpb24gcC1saW5rXCIgKGNsaWNrKT1cInpvb21JbigpXCIgdHlwZT1cImJ1dHRvblwiIFtkaXNhYmxlZF09XCJ6b29tRGlzYWJsZWQoKVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGkgY2xhc3M9XCJwaSBwaS1zZWFyY2gtcGx1c1wiPjwvaT5cbiAgICAgICAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJwLWltYWdlLWFjdGlvbiBwLWxpbmtcIiB0eXBlPVwiYnV0dG9uXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInBpIHBpLXRpbWVzXCI+PC9pPlxuICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2ICpuZ0lmPVwicHJldmlld1Zpc2libGVcIiBbQGFuaW1hdGlvbl09XCJ7dmFsdWU6ICd2aXNpYmxlJywgcGFyYW1zOiB7c2hvd1RyYW5zaXRpb25QYXJhbXM6IHNob3dUcmFuc2l0aW9uT3B0aW9ucywgaGlkZVRyYW5zaXRpb25QYXJhbXM6IGhpZGVUcmFuc2l0aW9uT3B0aW9uc319XCJcbiAgICAgICAgICAgICAgICAgICAgKEBhbmltYXRpb24uc3RhcnQpPVwib25BbmltYXRpb25TdGFydCgkZXZlbnQpXCIgKEBhbmltYXRpb24uZG9uZSk9XCJvbkFuaW1hdGlvbkVuZCgkZXZlbnQpXCI+XG4gICAgICAgICAgICAgICAgICAgIDxpbWcgW2F0dHIuc3JjXT1cInNyY1wiIGNsYXNzPVwicC1pbWFnZS1wcmV2aWV3XCIgW25nU3R5bGVdPVwiaW1hZ2VQcmV2aWV3U3R5bGUoKVwiIChjbGljayk9XCJvblByZXZpZXdJbWFnZUNsaWNrKClcIi8+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9zcGFuPlxuICAgIGAsXG4gICAgYW5pbWF0aW9uczogW1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HJ1Y3Rvcihwcml2YXRlIGNvbmZpZzogUHJpbWVOR0NvbmZpZywgcHJpdmF0ZSBjZDogQ2hhbmdlRGV0ZWN0b3JSZWYpIHsgfVxuXG4gICAgbmdBZnRlckNvbnRlbnRJbml0KCkge1xuICAgICAgICB0aGlzLnRlbXBsYXRlcy5mb3JFYWNoKChpdGVtKSA9PiB7XG4gICAgICAgICAgICBzd2l0Y2goaXRlbS5nZXRUeXBlKCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlICdpbmRpY2F0b3InOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmluZGljYXRvclRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaW5kaWNhdG9yVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBvbkltYWdlQ2xpY2soKSB7XG4gICAgICAgIGlmICh0aGlzLnByZXZpZXcpIHtcbiAgICAgICAgICAgIHRoaXMubWFza1Zpc2libGUgPSB0cnVlO1xuICAgICAgICAgICAgdGhpcy5wcmV2aWV3VmlzaWJsZSA9IHRydWU7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbk1hc2tDbGljaygpIHtcbiAgICAgICAgaWYgKCF0aGlzLnByZXZpZXdDbGljaykge1xuICAgICAgICAgICAgdGhpcy5wcmV2aWV3VmlzaWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5yb3RhdGUgPSAwO1xuICAgICAgICAgICAgdGhpcy5zY2FsZSA9IDE7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnByZXZpZXdDbGljayA9IGZhbHNlO1xuICAgIH1cblxuICAgIG9uUHJldmlld0ltYWdlQ2xpY2soKSB7XG4gICAg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FzZSAndm9pZCc6XG4gICAgICAgICAgICAgICAgRG9tSGFuZGxlci5hZGRDbGFzcyh0aGlzLndyYXBwZXIsICdwLWNvbXBvbmVudC1vdmVybGF5LWxlYXZlJyk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uQW5pbWF0aW9uRW5kKGV2ZW50OiBBbmltYXRpb25FdmVudCkge1xuICAgICAgICBzd2l0Y2goZXZlbnQudG9TdGF0ZSkge1xuICAgICAgICAgICAgY2FzZSAndm9pZCc6XG4gICAgICAgICAgICAgICAgWkluZGV4VXRpbHMuY2xlYXIodGhpcy5jb250YWluZXIpO1xuICAgICAgICAgICAgICAgIHRoaXMubWFza1Zpc2libGUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnRhaW5lciA9IG51bGw7XG4gICAgICAgICAgICAgICAgdGhpcy53cmFwcGVyID0gbnVsbDtcbiAgICAgICAgICAgICAgICB0aGlzLmNkLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgICAgICAgIHRoaXMub25IaWRlLmVtaXQoe30pO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICd2aXNpYmxlJzpcbiAgICAgICAgICAgICAgICB0aGlzLm9uU2hvdy5lbWl0KHt9KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgbW92ZU9uVG9wKCkge1xuICAgICAgICBaSW5kZXhVdGlscy5zZXQoJ21vZGFsJywgdGhpcy5jb250YWluZXIsIHRoaXMuY29uZmlnLnpJbmRleC5tb2RhbCk7XG4gICAgICAgIHRoaXMud3JhcHBlci5zdHlsZS56SW5kZXggPSBTdHJpbmcocGFyc2VJbnQodGhpcy5jb250YWluZXIuc3R5bGUuekluZGV4LCAxMCkgLSAxKTtcbiAgICB9XG5cbiAgICBhcHBlbmRDb250YWluZXIoKSB7XG4gICAgICAgIGlmICh0aGlzLmFwcGVuZFRvKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5hcHBlbmRUbyA9PT0gJ2JvZHknKVxuICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQodGhpcy53cmFwcGVyKTtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICBEb21IYW5kbGVyLmFwcGVuZENoaWxkKHRoaXMud3JhcHBlciwgdGhpcy5hcHBlbmRUbyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpbWFnZVByZXZpZXdTdHlsZSgpIHtcbiAgICAgICAgcmV0dXJuIHt0cmFuc2Zvcm06ICdyb3RhdGUoJyArIHRoaXMucm90YXRlICsgJ2RlZykgc2NhbGUoJyArIHRoaXMuc2NhbGUgKyAnKSd9O1xuICAgIH1cblxuICAgIGNvbnRhaW5lckNsYXNzKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgJ3AtaW1hZ2UgcC1jb21wb25lbnQnOiB0cnVlLFxuICAgICAgICAgICAgJ3AtaW1hZ2UtcHJldmlldy1jb250YWluZXInOiB0aGlzLnByZXZpZXdcbiAgICAgICAgfTtcbiAgICB9XG59XG5cbkBOZ01vZHVsZSh7XG4gICAgaW1wb3J0czogW0NvbW1vbk1vZHVsZV0sXG4gICAgZXhwb3J0czogW0ltYWdlLCBTaGFyZWRNb2R1bGVdLFxuICAgIGRlY2xhcmF0aW9uczogW0ltYWdlXVxufSlcbmV4cG9ydCBjbGFzcyBJbWFnZU1vZHVsZSB7IH1cbiJdfQ==
Note: See TracBrowser for help on using the repository browser.