source: trip-planner-front/node_modules/primeng/esm2020/spinner/spinner.mjs@ 76712b2

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

adding photos

  • Property mode set to 100644
File size: 43.9 KB
Line 
1import { NgModule, Component, Input, Output, EventEmitter, forwardRef, ViewChild, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
2import { CommonModule } from '@angular/common';
3import { InputTextModule } from 'primeng/inputtext';
4import { NG_VALUE_ACCESSOR } from '@angular/forms';
5import * as i0 from "@angular/core";
6import * as i1 from "@angular/common";
7export const SPINNER_VALUE_ACCESSOR = {
8 provide: NG_VALUE_ACCESSOR,
9 useExisting: forwardRef(() => Spinner),
10 multi: true
11};
12export class Spinner {
13 constructor(el, cd) {
14 this.el = el;
15 this.cd = cd;
16 this.onChange = new EventEmitter();
17 this.onFocus = new EventEmitter();
18 this.onBlur = new EventEmitter();
19 this._step = 1;
20 this.onModelChange = () => { };
21 this.onModelTouched = () => { };
22 this.keyPattern = /[0-9\+\-]/;
23 this.negativeSeparator = '-';
24 }
25 get step() {
26 return this._step;
27 }
28 set step(val) {
29 this._step = val;
30 if (this._step != null) {
31 let tokens = this.step.toString().split(/[,]|[.]/);
32 this.calculatedPrecision = tokens[1] ? tokens[1].length : undefined;
33 }
34 }
35 ngOnInit() {
36 if (this.formatInput) {
37 this.localeDecimalSeparator = (1.1).toLocaleString().substring(1, 2);
38 this.localeThousandSeparator = (1000).toLocaleString().substring(1, 2);
39 this.thousandRegExp = new RegExp(`[${this.thousandSeparator || this.localeThousandSeparator}]`, 'gim');
40 if (this.decimalSeparator && this.thousandSeparator && this.decimalSeparator === this.thousandSeparator) {
41 console.warn("thousandSeparator and decimalSeparator cannot have the same value.");
42 }
43 }
44 }
45 repeat(event, interval, dir) {
46 let i = interval || 500;
47 this.clearTimer();
48 this.timer = setTimeout(() => {
49 this.repeat(event, 40, dir);
50 }, i);
51 this.spin(event, dir);
52 }
53 spin(event, dir) {
54 let step = this.step * dir;
55 let currentValue;
56 let precision = this.getPrecision();
57 if (this.value)
58 currentValue = (typeof this.value === 'string') ? this.parseValue(this.value) : this.value;
59 else
60 currentValue = 0;
61 if (precision)
62 this.value = parseFloat(this.toFixed(currentValue + step, precision));
63 else
64 this.value = currentValue + step;
65 if (this.maxlength !== undefined && this.value.toString().length > this.maxlength) {
66 this.value = currentValue;
67 }
68 if (this.min !== undefined && this.value < this.min) {
69 this.value = this.min;
70 }
71 if (this.max !== undefined && this.value > this.max) {
72 this.value = this.max;
73 }
74 this.formatValue();
75 this.onModelChange(this.value);
76 this.onChange.emit(event);
77 }
78 getPrecision() {
79 return this.precision === undefined ? this.calculatedPrecision : this.precision;
80 }
81 toFixed(value, precision) {
82 let power = Math.pow(10, precision || 0);
83 return String(Math.round(value * power) / power);
84 }
85 onUpButtonMousedown(event) {
86 if (!this.disabled) {
87 this.inputfieldViewChild.nativeElement.focus();
88 this.repeat(event, null, 1);
89 this.updateFilledState();
90 event.preventDefault();
91 }
92 }
93 onUpButtonMouseup(event) {
94 if (!this.disabled) {
95 this.clearTimer();
96 }
97 }
98 onUpButtonMouseleave(event) {
99 if (!this.disabled) {
100 this.clearTimer();
101 }
102 }
103 onDownButtonMousedown(event) {
104 if (!this.disabled) {
105 this.inputfieldViewChild.nativeElement.focus();
106 this.repeat(event, null, -1);
107 this.updateFilledState();
108 event.preventDefault();
109 }
110 }
111 onDownButtonMouseup(event) {
112 if (!this.disabled) {
113 this.clearTimer();
114 }
115 }
116 onDownButtonMouseleave(event) {
117 if (!this.disabled) {
118 this.clearTimer();
119 }
120 }
121 onInputKeydown(event) {
122 if (event.which == 38) {
123 this.spin(event, 1);
124 event.preventDefault();
125 }
126 else if (event.which == 40) {
127 this.spin(event, -1);
128 event.preventDefault();
129 }
130 }
131 onInputChange(event) {
132 this.onChange.emit(event);
133 }
134 onInput(event) {
135 this.value = this.parseValue(event.target.value);
136 this.onModelChange(this.value);
137 this.updateFilledState();
138 }
139 onInputBlur(event) {
140 this.focus = false;
141 this.formatValue();
142 this.onModelTouched();
143 this.onBlur.emit(event);
144 }
145 onInputFocus(event) {
146 this.focus = true;
147 this.onFocus.emit(event);
148 }
149 parseValue(val) {
150 let value;
151 let precision = this.getPrecision();
152 if (val.trim() === '') {
153 value = null;
154 }
155 else {
156 if (this.formatInput) {
157 val = val.replace(this.thousandRegExp, '');
158 }
159 if (precision) {
160 val = this.formatInput ? val.replace(this.decimalSeparator || this.localeDecimalSeparator, '.') : val.replace(',', '.');
161 value = parseFloat(val);
162 }
163 else {
164 value = parseInt(val, 10);
165 }
166 if (!isNaN(value)) {
167 if (this.max !== null && value > this.max) {
168 value = this.max;
169 }
170 if (this.min !== null && value < this.min) {
171 value = this.min;
172 }
173 }
174 else {
175 value = null;
176 }
177 }
178 return value;
179 }
180 formatValue() {
181 let value = this.value;
182 let precision = this.getPrecision();
183 if (value != null) {
184 if (this.formatInput) {
185 value = value.toLocaleString(undefined, { maximumFractionDigits: 20 });
186 if (this.decimalSeparator && this.thousandSeparator) {
187 value = value.split(this.localeDecimalSeparator);
188 if (precision && value[1]) {
189 value[1] = (this.decimalSeparator || this.localeDecimalSeparator) + value[1];
190 }
191 if (this.thousandSeparator && value[0].length > 3) {
192 value[0] = value[0].replace(new RegExp(`[${this.localeThousandSeparator}]`, 'gim'), this.thousandSeparator);
193 }
194 value = value.join('');
195 }
196 }
197 this.formattedValue = value.toString();
198 }
199 else {
200 this.formattedValue = null;
201 }
202 if (this.inputfieldViewChild && this.inputfieldViewChild.nativeElement) {
203 this.inputfieldViewChild.nativeElement.value = this.formattedValue;
204 }
205 }
206 clearTimer() {
207 if (this.timer) {
208 clearInterval(this.timer);
209 }
210 }
211 writeValue(value) {
212 this.value = value;
213 this.formatValue();
214 this.updateFilledState();
215 this.cd.markForCheck();
216 }
217 registerOnChange(fn) {
218 this.onModelChange = fn;
219 }
220 registerOnTouched(fn) {
221 this.onModelTouched = fn;
222 }
223 setDisabledState(val) {
224 this.disabled = val;
225 this.cd.markForCheck();
226 }
227 updateFilledState() {
228 this.filled = (this.value !== undefined && this.value != null);
229 }
230}
231Spinner.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Spinner, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
232Spinner.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Spinner, selector: "p-spinner", inputs: { min: "min", max: "max", maxlength: "maxlength", size: "size", placeholder: "placeholder", inputId: "inputId", disabled: "disabled", readonly: "readonly", tabindex: "tabindex", required: "required", name: "name", ariaLabelledBy: "ariaLabelledBy", inputStyle: "inputStyle", inputStyleClass: "inputStyleClass", formatInput: "formatInput", decimalSeparator: "decimalSeparator", thousandSeparator: "thousandSeparator", precision: "precision", step: "step" }, outputs: { onChange: "onChange", onFocus: "onFocus", onBlur: "onBlur" }, host: { properties: { "class.ui-inputwrapper-filled": "filled", "class.ui-inputwrapper-focus": "focus" }, classAttribute: "p-element" }, providers: [SPINNER_VALUE_ACCESSOR], viewQueries: [{ propertyName: "inputfieldViewChild", first: true, predicate: ["inputfield"], descendants: true }], ngImport: i0, template: `
233 <span class="ui-spinner ui-widget ui-corner-all">
234 <input #inputfield type="text" [attr.id]="inputId" [value]="formattedValue||null" [attr.name]="name" [attr.aria-valumin]="min" [attr.aria-valuemax]="max" [attr.aria-valuenow]="value" [attr.aria-labelledby]="ariaLabelledBy"
235 [attr.size]="size" [attr.maxlength]="maxlength" [attr.tabindex]="tabindex" [attr.placeholder]="placeholder" [disabled]="disabled" [readonly]="readonly" [attr.required]="required"
236 (keydown)="onInputKeydown($event)" (blur)="onInputBlur($event)" (input)="onInput($event)" (change)="onInputChange($event)" (focus)="onInputFocus($event)"
237 [ngStyle]="inputStyle" [class]="inputStyleClass" [ngClass]="'ui-spinner-input ui-inputtext ui-widget ui-state-default ui-corner-all'">
238 <button type="button" [ngClass]="{'ui-spinner-button ui-spinner-up ui-corner-tr ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}" [disabled]="disabled||readonly" tabindex="-1" [attr.readonly]="readonly"
239 (mouseleave)="onUpButtonMouseleave($event)" (mousedown)="onUpButtonMousedown($event)" (mouseup)="onUpButtonMouseup($event)">
240 <span class="ui-spinner-button-icon pi pi-caret-up ui-clickable"></span>
241 </button>
242 <button type="button" [ngClass]="{'ui-spinner-button ui-spinner-down ui-corner-br ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}" [disabled]="disabled||readonly" tabindex="-1" [attr.readonly]="readonly"
243 (mouseleave)="onDownButtonMouseleave($event)" (mousedown)="onDownButtonMousedown($event)" (mouseup)="onDownButtonMouseup($event)">
244 <span class="ui-spinner-button-icon pi pi-caret-down ui-clickable"></span>
245 </button>
246 </span>
247 `, isInline: true, styles: [".ui-spinner{display:inline-block;overflow:visible;padding:0;position:relative;vertical-align:middle}.ui-spinner-input{vertical-align:middle;padding-right:1.5em}.ui-spinner-button{cursor:default;display:block;height:50%;margin:0;overflow:hidden;padding:0;position:absolute;right:0;text-align:center;vertical-align:middle;width:1.5em}.ui-spinner .ui-spinner-button-icon{position:absolute;top:50%;left:50%;margin-top:-.5em;margin-left:-.5em;width:1em}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-fluid .ui-spinner{width:100%}.ui-fluid .ui-spinner .ui-spinner-input{padding-right:2em;width:100%}.ui-fluid .ui-spinner .ui-spinner-button{width:1.5em}.ui-fluid .ui-spinner .ui-spinner-button .ui-spinner-button-icon{left:.7em}\n"], directives: [{ type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
248i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Spinner, decorators: [{
249 type: Component,
250 args: [{ selector: 'p-spinner', template: `
251 <span class="ui-spinner ui-widget ui-corner-all">
252 <input #inputfield type="text" [attr.id]="inputId" [value]="formattedValue||null" [attr.name]="name" [attr.aria-valumin]="min" [attr.aria-valuemax]="max" [attr.aria-valuenow]="value" [attr.aria-labelledby]="ariaLabelledBy"
253 [attr.size]="size" [attr.maxlength]="maxlength" [attr.tabindex]="tabindex" [attr.placeholder]="placeholder" [disabled]="disabled" [readonly]="readonly" [attr.required]="required"
254 (keydown)="onInputKeydown($event)" (blur)="onInputBlur($event)" (input)="onInput($event)" (change)="onInputChange($event)" (focus)="onInputFocus($event)"
255 [ngStyle]="inputStyle" [class]="inputStyleClass" [ngClass]="'ui-spinner-input ui-inputtext ui-widget ui-state-default ui-corner-all'">
256 <button type="button" [ngClass]="{'ui-spinner-button ui-spinner-up ui-corner-tr ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}" [disabled]="disabled||readonly" tabindex="-1" [attr.readonly]="readonly"
257 (mouseleave)="onUpButtonMouseleave($event)" (mousedown)="onUpButtonMousedown($event)" (mouseup)="onUpButtonMouseup($event)">
258 <span class="ui-spinner-button-icon pi pi-caret-up ui-clickable"></span>
259 </button>
260 <button type="button" [ngClass]="{'ui-spinner-button ui-spinner-down ui-corner-br ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}" [disabled]="disabled||readonly" tabindex="-1" [attr.readonly]="readonly"
261 (mouseleave)="onDownButtonMouseleave($event)" (mousedown)="onDownButtonMousedown($event)" (mouseup)="onDownButtonMouseup($event)">
262 <span class="ui-spinner-button-icon pi pi-caret-down ui-clickable"></span>
263 </button>
264 </span>
265 `, host: {
266 'class': 'p-element',
267 '[class.ui-inputwrapper-filled]': 'filled',
268 '[class.ui-inputwrapper-focus]': 'focus'
269 }, providers: [SPINNER_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".ui-spinner{display:inline-block;overflow:visible;padding:0;position:relative;vertical-align:middle}.ui-spinner-input{vertical-align:middle;padding-right:1.5em}.ui-spinner-button{cursor:default;display:block;height:50%;margin:0;overflow:hidden;padding:0;position:absolute;right:0;text-align:center;vertical-align:middle;width:1.5em}.ui-spinner .ui-spinner-button-icon{position:absolute;top:50%;left:50%;margin-top:-.5em;margin-left:-.5em;width:1em}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-fluid .ui-spinner{width:100%}.ui-fluid .ui-spinner .ui-spinner-input{padding-right:2em;width:100%}.ui-fluid .ui-spinner .ui-spinner-button{width:1.5em}.ui-fluid .ui-spinner .ui-spinner-button .ui-spinner-button-icon{left:.7em}\n"] }]
270 }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { onChange: [{
271 type: Output
272 }], onFocus: [{
273 type: Output
274 }], onBlur: [{
275 type: Output
276 }], min: [{
277 type: Input
278 }], max: [{
279 type: Input
280 }], maxlength: [{
281 type: Input
282 }], size: [{
283 type: Input
284 }], placeholder: [{
285 type: Input
286 }], inputId: [{
287 type: Input
288 }], disabled: [{
289 type: Input
290 }], readonly: [{
291 type: Input
292 }], tabindex: [{
293 type: Input
294 }], required: [{
295 type: Input
296 }], name: [{
297 type: Input
298 }], ariaLabelledBy: [{
299 type: Input
300 }], inputStyle: [{
301 type: Input
302 }], inputStyleClass: [{
303 type: Input
304 }], formatInput: [{
305 type: Input
306 }], decimalSeparator: [{
307 type: Input
308 }], thousandSeparator: [{
309 type: Input
310 }], precision: [{
311 type: Input
312 }], inputfieldViewChild: [{
313 type: ViewChild,
314 args: ['inputfield']
315 }], step: [{
316 type: Input
317 }] } });
318export class SpinnerModule {
319}
320SpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
321SpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SpinnerModule, declarations: [Spinner], imports: [CommonModule, InputTextModule], exports: [Spinner] });
322SpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SpinnerModule, imports: [[CommonModule, InputTextModule]] });
323i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SpinnerModule, decorators: [{
324 type: NgModule,
325 args: [{
326 imports: [CommonModule, InputTextModule],
327 exports: [Spinner],
328 declarations: [Spinner]
329 }]
330 }] });
331//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bpbm5lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy9zcGlubmVyL3NwaW5uZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFFBQVEsRUFBQyxTQUFTLEVBQW1CLEtBQUssRUFBQyxNQUFNLEVBQUMsWUFBWSxFQUFDLFVBQVUsRUFBQyxTQUFTLEVBQW1CLHVCQUF1QixFQUFFLGlCQUFpQixFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQy9LLE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQztBQUM3QyxPQUFPLEVBQUMsZUFBZSxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFDbEQsT0FBTyxFQUFDLGlCQUFpQixFQUF1QixNQUFNLGdCQUFnQixDQUFDOzs7QUFFdkUsTUFBTSxDQUFDLE1BQU0sc0JBQXNCLEdBQVE7SUFDdkMsT0FBTyxFQUFFLGlCQUFpQjtJQUMxQixXQUFXLEVBQUUsVUFBVSxDQUFDLEdBQUcsRUFBRSxDQUFDLE9BQU8sQ0FBQztJQUN0QyxLQUFLLEVBQUUsSUFBSTtDQUNkLENBQUM7QUE4QkYsTUFBTSxPQUFPLE9BQU87SUFzRmhCLFlBQW1CLEVBQWMsR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gICAgICAgICAgIGlmICghaXNOYU4odmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubWF4ICE9PSBudWxsICYmIHZhbHVlID4gdGhpcy5tYXgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB0aGlzLm1heDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5taW4gIT09IG51bGwgJiYgdmFsdWUgPCB0aGlzLm1pbikge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXMubWluO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICBmb3JtYXRWYWx1ZSgpIHtcbiAgICAgICAgbGV0IHZhbHVlID0gdGhpcy52YWx1ZTtcbiAgICAgICAgbGV0IHByZWNpc2lvbiA9IHRoaXMuZ2V0UHJlY2lzaW9uKCk7XG5cbiAgICAgICAgaWYgKHZhbHVlICE9IG51bGwpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmZvcm1hdElucHV0KSB7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS50b0xvY2FsZVN0cmluZyh1bmRlZmluZWQsIHttYXhpbXVtRnJhY3Rpb25EaWdpdHM6IDIwfSk7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5kZWNpbWFsU2VwYXJhdG9yICYmIHRoaXMudGhvdXNhbmRTZXBhcmF0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5zcGxpdCh0aGlzLmxvY2FsZURlY2ltYWxTZXBhcmF0b3IpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChwcmVjaXNpb24gJiYgdmFsdWVbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlWzFdID0gKHRoaXMuZGVjaW1hbFNlcGFyYXRvciB8fCB0aGlzLmxvY2FsZURlY2ltYWxTZXBhcmF0b3IpICsgdmFsdWVbMV07XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy50aG91c2FuZFNlcGFyYXRvciAmJiB2YWx1ZVswXS5sZW5ndGggPiAzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZVswXSA9IHZhbHVlWzBdLnJlcGxhY2UobmV3IFJlZ0V4cChgWyR7dGhpcy5sb2NhbGVUaG91c2FuZFNlcGFyYXRvcn1dYCwgJ2dpbScpLCB0aGlzLnRob3VzYW5kU2VwYXJhdG9yKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUuam9pbignJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLmZvcm1hdHRlZFZhbHVlID0gdmFsdWUudG9TdHJpbmcoKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuZm9ybWF0dGVkVmFsdWUgPSBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuaW5wdXRmaWVsZFZpZXdDaGlsZCAmJiB0aGlzLmlucHV0ZmllbGRWaWV3Q2hpbGQubmF0aXZlRWxlbWVudCkge1xuICAgICAgICAgICAgdGhpcy5pbnB1dGZpZWxkVmlld0NoaWxkLm5hdGl2ZUVsZW1lbnQudmFsdWUgPSB0aGlzLmZvcm1hdHRlZFZhbHVlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgY2xlYXJUaW1lcigpIHtcbiAgICAgICAgaWYgKHRoaXMudGltZXIpIHtcbiAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGhpcy50aW1lcik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB3cml0ZVZhbHVlKHZhbHVlOiBhbnkpIDogdm9pZCB7XG4gICAgICAgIHRoaXMudmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgdGhpcy5mb3JtYXRWYWx1ZSgpO1xuICAgICAgICB0aGlzLnVwZGF0ZUZpbGxlZFN0YXRlKCk7XG4gICAgICAgIHRoaXMuY2QubWFya0ZvckNoZWNrKCk7XG4gICAgfVxuXG4gICAgcmVnaXN0ZXJPbkNoYW5nZShmbjogRnVuY3Rpb24pOiB2b2lkIHtcbiAgICAgICAgdGhpcy5vbk1vZGVsQ2hhbmdlID0gZm47XG4gICAgfVxuXG4gICAgcmVnaXN0ZXJPblRvdWNoZWQoZm46IEZ1bmN0aW9uKTogdm9pZCB7XG4gICAgICAgIHRoaXMub25Nb2RlbFRvdWNoZWQgPSBmbjtcbiAgICB9XG5cbiAgICBzZXREaXNhYmxlZFN0YXRlKHZhbDogYm9vbGVhbik6IHZvaWQge1xuICAgICAgICB0aGlzLmRpc2FibGVkID0gdmFsO1xuICAgICAgICB0aGlzLmNkLm1hcmtGb3JDaGVjaygpO1xuICAgIH1cblxuICAgIHVwZGF0ZUZpbGxlZFN0YXRlKCkge1xuICAgICAgICB0aGlzLmZpbGxlZCA9ICh0aGlzLnZhbHVlICE9PSB1bmRlZmluZWQgJiYgdGhpcy52YWx1ZSAhPSBudWxsKTtcbiAgICB9XG59XG5cblxuQE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlLElucHV0VGV4dE1vZHVsZV0sXG4gICAgZXhwb3J0czogW1NwaW5uZXJdLFxuICAgIGRlY2xhcmF0aW9uczogW1NwaW5uZXJdXG59KVxuZXhwb3J0IGNsYXNzIFNwaW5uZXJNb2R1bGUgeyB9XG4iXX0=
Note: See TracBrowser for help on using the repository browser.