source: trip-planner-front/node_modules/primeng/esm2020/galleria/galleria.mjs

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

adding photos

  • Property mode set to 100644
File size: 138.6 KB
Line 
1import { NgModule, Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ViewChild, ContentChildren, ViewEncapsulation } from '@angular/core';
2import { CommonModule } from '@angular/common';
3import { SharedModule, PrimeTemplate } from 'primeng/api';
4import { UniqueComponentId, ZIndexUtils } from 'primeng/utils';
5import { DomHandler } from 'primeng/dom';
6import { RippleModule } from 'primeng/ripple';
7import { animate, style, transition, trigger } from '@angular/animations';
8import * as i0 from "@angular/core";
9import * as i1 from "primeng/api";
10import * as i2 from "@angular/common";
11import * as i3 from "primeng/ripple";
12export class Galleria {
13 constructor(element, cd, config) {
14 this.element = element;
15 this.cd = cd;
16 this.config = config;
17 this.fullScreen = false;
18 this.numVisible = 3;
19 this.showItemNavigators = false;
20 this.showThumbnailNavigators = true;
21 this.showItemNavigatorsOnHover = false;
22 this.changeItemOnIndicatorHover = false;
23 this.circular = false;
24 this.autoPlay = false;
25 this.transitionInterval = 4000;
26 this.showThumbnails = true;
27 this.thumbnailsPosition = "bottom";
28 this.verticalThumbnailViewPortHeight = "300px";
29 this.showIndicators = false;
30 this.showIndicatorsOnItem = false;
31 this.indicatorsPosition = "bottom";
32 this.baseZIndex = 0;
33 this.showTransitionOptions = '150ms cubic-bezier(0, 0, 0.2, 1)';
34 this.hideTransitionOptions = '150ms cubic-bezier(0, 0, 0.2, 1)';
35 this.activeIndexChange = new EventEmitter();
36 this.visibleChange = new EventEmitter();
37 this._visible = false;
38 this._activeIndex = 0;
39 this.maskVisible = false;
40 }
41 get activeIndex() {
42 return this._activeIndex;
43 }
44 ;
45 set activeIndex(activeIndex) {
46 this._activeIndex = activeIndex;
47 }
48 get visible() {
49 return this._visible;
50 }
51 ;
52 set visible(visible) {
53 this._visible = visible;
54 if (this._visible && !this.maskVisible) {
55 this.maskVisible = true;
56 }
57 }
58 ngAfterContentInit() {
59 this.templates.forEach((item) => {
60 switch (item.getType()) {
61 case 'header':
62 this.headerFacet = item.template;
63 break;
64 case 'footer':
65 this.footerFacet = item.template;
66 break;
67 case 'indicator':
68 this.indicatorFacet = item.template;
69 break;
70 case 'caption':
71 this.captionFacet = item.template;
72 break;
73 }
74 });
75 }
76 ngOnChanges(simpleChanges) {
77 if (simpleChanges.value && simpleChanges.value.currentValue?.length < this.numVisible) {
78 this.numVisible = simpleChanges.value.currentValue.length;
79 }
80 }
81 onMaskHide() {
82 this.visible = false;
83 this.visibleChange.emit(false);
84 }
85 onActiveItemChange(index) {
86 if (this.activeIndex !== index) {
87 this.activeIndex = index;
88 this.activeIndexChange.emit(index);
89 }
90 }
91 onAnimationStart(event) {
92 switch (event.toState) {
93 case 'visible':
94 this.enableModality();
95 break;
96 case 'void':
97 DomHandler.addClass(this.mask.nativeElement, 'p-component-overlay-leave');
98 break;
99 }
100 }
101 onAnimationEnd(event) {
102 switch (event.toState) {
103 case 'void':
104 this.disableModality();
105 break;
106 }
107 }
108 enableModality() {
109 DomHandler.addClass(document.body, 'p-overflow-hidden');
110 this.cd.markForCheck();
111 if (this.mask) {
112 ZIndexUtils.set('modal', this.mask.nativeElement, this.baseZIndex || this.config.zIndex.modal);
113 }
114 }
115 disableModality() {
116 DomHandler.removeClass(document.body, 'p-overflow-hidden');
117 this.maskVisible = false;
118 this.cd.markForCheck();
119 if (this.mask) {
120 ZIndexUtils.clear(this.mask.nativeElement);
121 }
122 }
123 ngOnDestroy() {
124 if (this.fullScreen) {
125 DomHandler.removeClass(document.body, 'p-overflow-hidden');
126 }
127 if (this.mask) {
128 this.disableModality();
129 }
130 }
131}
132Galleria.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Galleria, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
133Galleria.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Galleria, selector: "p-galleria", inputs: { activeIndex: "activeIndex", fullScreen: "fullScreen", id: "id", value: "value", numVisible: "numVisible", responsiveOptions: "responsiveOptions", showItemNavigators: "showItemNavigators", showThumbnailNavigators: "showThumbnailNavigators", showItemNavigatorsOnHover: "showItemNavigatorsOnHover", changeItemOnIndicatorHover: "changeItemOnIndicatorHover", circular: "circular", autoPlay: "autoPlay", transitionInterval: "transitionInterval", showThumbnails: "showThumbnails", thumbnailsPosition: "thumbnailsPosition", verticalThumbnailViewPortHeight: "verticalThumbnailViewPortHeight", showIndicators: "showIndicators", showIndicatorsOnItem: "showIndicatorsOnItem", indicatorsPosition: "indicatorsPosition", baseZIndex: "baseZIndex", maskClass: "maskClass", containerClass: "containerClass", containerStyle: "containerStyle", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions", visible: "visible" }, outputs: { activeIndexChange: "activeIndexChange", visibleChange: "visibleChange" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "mask", first: true, predicate: ["mask"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
134 <div *ngIf="fullScreen;else windowed">
135 <div *ngIf="maskVisible" #mask [ngClass]="{'p-galleria-mask p-component-overlay p-component-overlay-enter':true, 'p-galleria-visible': this.visible}" [class]="maskClass">
136 <p-galleriaContent *ngIf="visible" [@animation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)"
137 [value]="value" [activeIndex]="activeIndex" [numVisible]="numVisible" (maskHide)="onMaskHide()" (activeItemChange)="onActiveItemChange($event)" [ngStyle]="containerStyle"></p-galleriaContent>
138 </div>
139 </div>
140
141 <ng-template #windowed>
142 <p-galleriaContent [value]="value" [activeIndex]="activeIndex" [numVisible]="numVisible" (activeItemChange)="onActiveItemChange($event)"></p-galleriaContent>
143 </ng-template>
144 `, isInline: true, styles: [".p-galleria-content{display:flex;flex-direction:column}.p-galleria-item-wrapper{display:flex;flex-direction:column;position:relative}.p-galleria-item-container{position:relative;display:flex;height:100%}.p-galleria-item-nav{position:absolute;top:50%;margin-top:-.5rem;display:inline-flex;justify-content:center;align-items:center;overflow:hidden}.p-galleria-item-prev{left:0;border-top-left-radius:0;border-bottom-left-radius:0}.p-galleria-item-next{right:0;border-top-right-radius:0;border-bottom-right-radius:0}.p-galleria-item{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.p-galleria-item-nav-onhover .p-galleria-item-nav{pointer-events:none;opacity:0;transition:opacity .2s ease-in-out}.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav{pointer-events:all;opacity:1}.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled{pointer-events:none}.p-galleria-caption{position:absolute;bottom:0;left:0;width:100%}.p-galleria-thumbnail-wrapper{display:flex;flex-direction:column;overflow:auto;flex-shrink:0}.p-galleria-thumbnail-prev,.p-galleria-thumbnail-next{align-self:center;flex:0 0 auto;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-galleria-thumbnail-prev span,.p-galleria-thumbnail-next span{display:flex;justify-content:center;align-items:center}.p-galleria-thumbnail-container{display:flex;flex-direction:row}.p-galleria-thumbnail-items-container{overflow:hidden;width:100%}.p-galleria-thumbnail-items{display:flex}.p-galleria-thumbnail-item{overflow:auto;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.5}.p-galleria-thumbnail-item:hover{opacity:1;transition:opacity .3s}.p-galleria-thumbnail-item-current{opacity:1}.p-galleria-thumbnails-left .p-galleria-content,.p-galleria-thumbnails-right .p-galleria-content,.p-galleria-thumbnails-left .p-galleria-item-wrapper,.p-galleria-thumbnails-right .p-galleria-item-wrapper{flex-direction:row}.p-galleria-thumbnails-left p-galleriaitem,.p-galleria-thumbnails-top p-galleriaitem{order:2}.p-galleria-thumbnails-left p-galleriathumbnails,.p-galleria-thumbnails-top p-galleriathumbnails{order:1}.p-galleria-thumbnails-left .p-galleria-thumbnail-container,.p-galleria-thumbnails-right .p-galleria-thumbnail-container{flex-direction:column;flex-grow:1}.p-galleria-thumbnails-left .p-galleria-thumbnail-items,.p-galleria-thumbnails-right .p-galleria-thumbnail-items{flex-direction:column;height:100%}.p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper,.p-galleria-thumbnails-right .p-galleria-thumbnail-wrapper{height:100%}.p-galleria-indicators{display:flex;align-items:center;justify-content:center}.p-galleria-indicator>button{display:inline-flex;align-items:center}.p-galleria-indicators-left .p-galleria-item-wrapper,.p-galleria-indicators-right .p-galleria-item-wrapper{flex-direction:row;align-items:center}.p-galleria-indicators-left .p-galleria-item-container,.p-galleria-indicators-top .p-galleria-item-container{order:2}.p-galleria-indicators-left .p-galleria-indicators,.p-galleria-indicators-top .p-galleria-indicators{order:1}.p-galleria-indicators-left .p-galleria-indicators,.p-galleria-indicators-right .p-galleria-indicators{flex-direction:column}.p-galleria-indicator-onitem .p-galleria-indicators{position:absolute;display:flex;z-index:1}.p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators{top:0;left:0;width:100%;align-items:flex-start}.p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators{right:0;top:0;height:100%;align-items:flex-end}.p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators{bottom:0;left:0;width:100%;align-items:flex-end}.p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators{left:0;top:0;height:100%;align-items:flex-start}.p-galleria-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:transparent;transition-property:background-color}.p-galleria-close{position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center;overflow:hidden}.p-galleria-mask .p-galleria-item-nav{position:fixed;top:50%;margin-top:-.5rem}.p-galleria-mask.p-galleria-mask-leave{background-color:transparent}.p-items-hidden .p-galleria-thumbnail-item{visibility:hidden}.p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active{visibility:visible}\n"], components: [{ type: i0.forwardRef(function () { return GalleriaContent; }), selector: "p-galleriaContent", inputs: ["activeIndex", "value", "numVisible"], outputs: ["maskHide", "activeItemChange"] }], directives: [{ type: i0.forwardRef(function () { return i2.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i0.forwardRef(function () { return i2.NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i0.forwardRef(function () { return i2.NgStyle; }), selector: "[ngStyle]", inputs: ["ngStyle"] }], animations: [
145 trigger('animation', [
146 transition('void => visible', [
147 style({ transform: 'scale(0.7)', opacity: 0 }),
148 animate('{{showTransitionParams}}')
149 ]),
150 transition('visible => void', [
151 animate('{{hideTransitionParams}}', style({ transform: 'scale(0.7)', opacity: 0 }))
152 ])
153 ])
154 ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
155i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Galleria, decorators: [{
156 type: Component,
157 args: [{ selector: 'p-galleria', template: `
158 <div *ngIf="fullScreen;else windowed">
159 <div *ngIf="maskVisible" #mask [ngClass]="{'p-galleria-mask p-component-overlay p-component-overlay-enter':true, 'p-galleria-visible': this.visible}" [class]="maskClass">
160 <p-galleriaContent *ngIf="visible" [@animation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)"
161 [value]="value" [activeIndex]="activeIndex" [numVisible]="numVisible" (maskHide)="onMaskHide()" (activeItemChange)="onActiveItemChange($event)" [ngStyle]="containerStyle"></p-galleriaContent>
162 </div>
163 </div>
164
165 <ng-template #windowed>
166 <p-galleriaContent [value]="value" [activeIndex]="activeIndex" [numVisible]="numVisible" (activeItemChange)="onActiveItemChange($event)"></p-galleriaContent>
167 </ng-template>
168 `, animations: [
169 trigger('animation', [
170 transition('void => visible', [
171 style({ transform: 'scale(0.7)', opacity: 0 }),
172 animate('{{showTransitionParams}}')
173 ]),
174 transition('visible => void', [
175 animate('{{hideTransitionParams}}', style({ transform: 'scale(0.7)', opacity: 0 }))
176 ])
177 ])
178 ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
179 'class': 'p-element'
180 }, styles: [".p-galleria-content{display:flex;flex-direction:column}.p-galleria-item-wrapper{display:flex;flex-direction:column;position:relative}.p-galleria-item-container{position:relative;display:flex;height:100%}.p-galleria-item-nav{position:absolute;top:50%;margin-top:-.5rem;display:inline-flex;justify-content:center;align-items:center;overflow:hidden}.p-galleria-item-prev{left:0;border-top-left-radius:0;border-bottom-left-radius:0}.p-galleria-item-next{right:0;border-top-right-radius:0;border-bottom-right-radius:0}.p-galleria-item{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.p-galleria-item-nav-onhover .p-galleria-item-nav{pointer-events:none;opacity:0;transition:opacity .2s ease-in-out}.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav{pointer-events:all;opacity:1}.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled{pointer-events:none}.p-galleria-caption{position:absolute;bottom:0;left:0;width:100%}.p-galleria-thumbnail-wrapper{display:flex;flex-direction:column;overflow:auto;flex-shrink:0}.p-galleria-thumbnail-prev,.p-galleria-thumbnail-next{align-self:center;flex:0 0 auto;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-galleria-thumbnail-prev span,.p-galleria-thumbnail-next span{display:flex;justify-content:center;align-items:center}.p-galleria-thumbnail-container{display:flex;flex-direction:row}.p-galleria-thumbnail-items-container{overflow:hidden;width:100%}.p-galleria-thumbnail-items{display:flex}.p-galleria-thumbnail-item{overflow:auto;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.5}.p-galleria-thumbnail-item:hover{opacity:1;transition:opacity .3s}.p-galleria-thumbnail-item-current{opacity:1}.p-galleria-thumbnails-left .p-galleria-content,.p-galleria-thumbnails-right .p-galleria-content,.p-galleria-thumbnails-left .p-galleria-item-wrapper,.p-galleria-thumbnails-right .p-galleria-item-wrapper{flex-direction:row}.p-galleria-thumbnails-left p-galleriaitem,.p-galleria-thumbnails-top p-galleriaitem{order:2}.p-galleria-thumbnails-left p-galleriathumbnails,.p-galleria-thumbnails-top p-galleriathumbnails{order:1}.p-galleria-thumbnails-left .p-galleria-thumbnail-container,.p-galleria-thumbnails-right .p-galleria-thumbnail-container{flex-direction:column;flex-grow:1}.p-galleria-thumbnails-left .p-galleria-thumbnail-items,.p-galleria-thumbnails-right .p-galleria-thumbnail-items{flex-direction:column;height:100%}.p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper,.p-galleria-thumbnails-right .p-galleria-thumbnail-wrapper{height:100%}.p-galleria-indicators{display:flex;align-items:center;justify-content:center}.p-galleria-indicator>button{display:inline-flex;align-items:center}.p-galleria-indicators-left .p-galleria-item-wrapper,.p-galleria-indicators-right .p-galleria-item-wrapper{flex-direction:row;align-items:center}.p-galleria-indicators-left .p-galleria-item-container,.p-galleria-indicators-top .p-galleria-item-container{order:2}.p-galleria-indicators-left .p-galleria-indicators,.p-galleria-indicators-top .p-galleria-indicators{order:1}.p-galleria-indicators-left .p-galleria-indicators,.p-galleria-indicators-right .p-galleria-indicators{flex-direction:column}.p-galleria-indicator-onitem .p-galleria-indicators{position:absolute;display:flex;z-index:1}.p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators{top:0;left:0;width:100%;align-items:flex-start}.p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators{right:0;top:0;height:100%;align-items:flex-end}.p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators{bottom:0;left:0;width:100%;align-items:flex-end}.p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators{left:0;top:0;height:100%;align-items:flex-start}.p-galleria-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:transparent;transition-property:background-color}.p-galleria-close{position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center;overflow:hidden}.p-galleria-mask .p-galleria-item-nav{position:fixed;top:50%;margin-top:-.5rem}.p-galleria-mask.p-galleria-mask-leave{background-color:transparent}.p-items-hidden .p-galleria-thumbnail-item{visibility:hidden}.p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active{visibility:visible}\n"] }]
181 }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.PrimeNGConfig }]; }, propDecorators: { activeIndex: [{
182 type: Input
183 }], fullScreen: [{
184 type: Input
185 }], id: [{
186 type: Input
187 }], value: [{
188 type: Input
189 }], numVisible: [{
190 type: Input
191 }], responsiveOptions: [{
192 type: Input
193 }], showItemNavigators: [{
194 type: Input
195 }], showThumbnailNavigators: [{
196 type: Input
197 }], showItemNavigatorsOnHover: [{
198 type: Input
199 }], changeItemOnIndicatorHover: [{
200 type: Input
201 }], circular: [{
202 type: Input
203 }], autoPlay: [{
204 type: Input
205 }], transitionInterval: [{
206 type: Input
207 }], showThumbnails: [{
208 type: Input
209 }], thumbnailsPosition: [{
210 type: Input
211 }], verticalThumbnailViewPortHeight: [{
212 type: Input
213 }], showIndicators: [{
214 type: Input
215 }], showIndicatorsOnItem: [{
216 type: Input
217 }], indicatorsPosition: [{
218 type: Input
219 }], baseZIndex: [{
220 type: Input
221 }], maskClass: [{
222 type: Input
223 }], containerClass: [{
224 type: Input
225 }], containerStyle: [{
226 type: Input
227 }], showTransitionOptions: [{
228 type: Input
229 }], hideTransitionOptions: [{
230 type: Input
231 }], mask: [{
232 type: ViewChild,
233 args: ['mask']
234 }], visible: [{
235 type: Input
236 }], activeIndexChange: [{
237 type: Output
238 }], visibleChange: [{
239 type: Output
240 }], templates: [{
241 type: ContentChildren,
242 args: [PrimeTemplate]
243 }] } });
244export class GalleriaContent {
245 constructor(galleria, cd) {
246 this.galleria = galleria;
247 this.cd = cd;
248 this.value = [];
249 this.maskHide = new EventEmitter();
250 this.activeItemChange = new EventEmitter();
251 this.id = this.galleria.id || UniqueComponentId();
252 this.slideShowActicve = false;
253 this._activeIndex = 0;
254 this.slideShowActive = true;
255 }
256 get activeIndex() {
257 return this._activeIndex;
258 }
259 ;
260 set activeIndex(activeIndex) {
261 this._activeIndex = activeIndex;
262 }
263 galleriaClass() {
264 const thumbnailsPosClass = this.galleria.showThumbnails && this.getPositionClass('p-galleria-thumbnails', this.galleria.thumbnailsPosition);
265 const indicatorPosClass = this.galleria.showIndicators && this.getPositionClass('p-galleria-indicators', this.galleria.indicatorsPosition);
266 return (this.galleria.containerClass ? this.galleria.containerClass + " " : '') + (thumbnailsPosClass ? thumbnailsPosClass + " " : '') + (indicatorPosClass ? indicatorPosClass + " " : '');
267 }
268 startSlideShow() {
269 this.interval = setInterval(() => {
270 let activeIndex = (this.galleria.circular && (this.value.length - 1) === this.activeIndex) ? 0 : (this.activeIndex + 1);
271 this.onActiveIndexChange(activeIndex);
272 this.activeIndex = activeIndex;
273 }, this.galleria.transitionInterval);
274 this.slideShowActive = true;
275 }
276 stopSlideShow() {
277 if (this.interval) {
278 clearInterval(this.interval);
279 }
280 this.slideShowActive = false;
281 }
282 getPositionClass(preClassName, position) {
283 const positions = ['top', 'left', 'bottom', 'right'];
284 const pos = positions.find(item => item === position);
285 return pos ? `${preClassName}-${pos}` : '';
286 }
287 isVertical() {
288 return this.galleria.thumbnailsPosition === 'left' || this.galleria.thumbnailsPosition === 'right';
289 }
290 onActiveIndexChange(index) {
291 if (this.activeIndex !== index) {
292 this.activeIndex = index;
293 this.activeItemChange.emit(this.activeIndex);
294 }
295 }
296}
297GalleriaContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaContent, deps: [{ token: Galleria }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
298GalleriaContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: GalleriaContent, selector: "p-galleriaContent", inputs: { activeIndex: "activeIndex", value: "value", numVisible: "numVisible" }, outputs: { maskHide: "maskHide", activeItemChange: "activeItemChange" }, ngImport: i0, template: `
299 <div [attr.id]="id" *ngIf="value && value.length > 0" [ngClass]="{'p-galleria p-component': true, 'p-galleria-fullscreen': this.galleria.fullScreen,
300 'p-galleria-indicator-onitem': this.galleria.showIndicatorsOnItem, 'p-galleria-item-nav-onhover': this.galleria.showItemNavigatorsOnHover && !this.galleria.fullScreen}"
301 [ngStyle]="!galleria.fullScreen ? galleria.containerStyle : {}" [class]="galleriaClass()">
302 <button *ngIf="galleria.fullScreen" type="button" class="p-galleria-close p-link" (click)="maskHide.emit()" pRipple>
303 <span class="p-galleria-close-icon pi pi-times"></span>
304 </button>
305 <div *ngIf="galleria.templates && galleria.headerFacet" class="p-galleria-header">
306 <p-galleriaItemSlot type="header" [templates]="galleria.templates"></p-galleriaItemSlot>
307 </div>
308 <div class="p-galleria-content">
309 <p-galleriaItem [value]="value" [activeIndex]="activeIndex" [circular]="galleria.circular" [templates]="galleria.templates" (onActiveIndexChange)="onActiveIndexChange($event)"
310 [showIndicators]="galleria.showIndicators" [changeItemOnIndicatorHover]="galleria.changeItemOnIndicatorHover" [indicatorFacet]="galleria.indicatorFacet"
311 [captionFacet]="galleria.captionFacet" [showItemNavigators]="galleria.showItemNavigators" [autoPlay]="galleria.autoPlay" [slideShowActive]="slideShowActive"
312 (startSlideShow)="startSlideShow()" (stopSlideShow)="stopSlideShow()"></p-galleriaItem>
313
314 <p-galleriaThumbnails *ngIf="galleria.showThumbnails" [containerId]="id" [value]="value" (onActiveIndexChange)="onActiveIndexChange($event)" [activeIndex]="activeIndex" [templates]="galleria.templates"
315 [numVisible]="numVisible" [responsiveOptions]="galleria.responsiveOptions" [circular]="galleria.circular"
316 [isVertical]="isVertical()" [contentHeight]="galleria.verticalThumbnailViewPortHeight" [showThumbnailNavigators]="galleria.showThumbnailNavigators"
317 [slideShowActive]="slideShowActive" (stopSlideShow)="stopSlideShow()"></p-galleriaThumbnails>
318 </div>
319 <div *ngIf="galleria.templates && galleria.footerFacet" class="p-galleria-footer">
320 <p-galleriaItemSlot type="footer" [templates]="galleria.templates"></p-galleriaItemSlot>
321 </div>
322 </div>
323 `, isInline: true, components: [{ type: i0.forwardRef(function () { return GalleriaItemSlot; }), selector: "p-galleriaItemSlot", inputs: ["templates", "index", "item", "type"] }, { type: i0.forwardRef(function () { return GalleriaItem; }), selector: "p-galleriaItem", inputs: ["circular", "value", "showItemNavigators", "showIndicators", "slideShowActive", "changeItemOnIndicatorHover", "autoPlay", "templates", "indicatorFacet", "captionFacet", "activeIndex"], outputs: ["startSlideShow", "stopSlideShow", "onActiveIndexChange"] }, { type: i0.forwardRef(function () { return GalleriaThumbnails; }), selector: "p-galleriaThumbnails", inputs: ["containerId", "value", "isVertical", "slideShowActive", "circular", "responsiveOptions", "contentHeight", "showThumbnailNavigators", "templates", "numVisible", "activeIndex"], outputs: ["onActiveIndexChange", "stopSlideShow"] }], directives: [{ type: i0.forwardRef(function () { return i2.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i0.forwardRef(function () { return i2.NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i0.forwardRef(function () { return i2.NgStyle; }), selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i0.forwardRef(function () { return i3.Ripple; }), selector: "[pRipple]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
324i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaContent, decorators: [{
325 type: Component,
326 args: [{
327 selector: 'p-galleriaContent',
328 template: `
329 <div [attr.id]="id" *ngIf="value && value.length > 0" [ngClass]="{'p-galleria p-component': true, 'p-galleria-fullscreen': this.galleria.fullScreen,
330 'p-galleria-indicator-onitem': this.galleria.showIndicatorsOnItem, 'p-galleria-item-nav-onhover': this.galleria.showItemNavigatorsOnHover && !this.galleria.fullScreen}"
331 [ngStyle]="!galleria.fullScreen ? galleria.containerStyle : {}" [class]="galleriaClass()">
332 <button *ngIf="galleria.fullScreen" type="button" class="p-galleria-close p-link" (click)="maskHide.emit()" pRipple>
333 <span class="p-galleria-close-icon pi pi-times"></span>
334 </button>
335 <div *ngIf="galleria.templates && galleria.headerFacet" class="p-galleria-header">
336 <p-galleriaItemSlot type="header" [templates]="galleria.templates"></p-galleriaItemSlot>
337 </div>
338 <div class="p-galleria-content">
339 <p-galleriaItem [value]="value" [activeIndex]="activeIndex" [circular]="galleria.circular" [templates]="galleria.templates" (onActiveIndexChange)="onActiveIndexChange($event)"
340 [showIndicators]="galleria.showIndicators" [changeItemOnIndicatorHover]="galleria.changeItemOnIndicatorHover" [indicatorFacet]="galleria.indicatorFacet"
341 [captionFacet]="galleria.captionFacet" [showItemNavigators]="galleria.showItemNavigators" [autoPlay]="galleria.autoPlay" [slideShowActive]="slideShowActive"
342 (startSlideShow)="startSlideShow()" (stopSlideShow)="stopSlideShow()"></p-galleriaItem>
343
344 <p-galleriaThumbnails *ngIf="galleria.showThumbnails" [containerId]="id" [value]="value" (onActiveIndexChange)="onActiveIndexChange($event)" [activeIndex]="activeIndex" [templates]="galleria.templates"
345 [numVisible]="numVisible" [responsiveOptions]="galleria.responsiveOptions" [circular]="galleria.circular"
346 [isVertical]="isVertical()" [contentHeight]="galleria.verticalThumbnailViewPortHeight" [showThumbnailNavigators]="galleria.showThumbnailNavigators"
347 [slideShowActive]="slideShowActive" (stopSlideShow)="stopSlideShow()"></p-galleriaThumbnails>
348 </div>
349 <div *ngIf="galleria.templates && galleria.footerFacet" class="p-galleria-footer">
350 <p-galleriaItemSlot type="footer" [templates]="galleria.templates"></p-galleriaItemSlot>
351 </div>
352 </div>
353 `,
354 changeDetection: ChangeDetectionStrategy.OnPush
355 }]
356 }], ctorParameters: function () { return [{ type: Galleria }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { activeIndex: [{
357 type: Input
358 }], value: [{
359 type: Input
360 }], numVisible: [{
361 type: Input
362 }], maskHide: [{
363 type: Output
364 }], activeItemChange: [{
365 type: Output
366 }] } });
367export class GalleriaItemSlot {
368 get item() {
369 return this._item;
370 }
371 ;
372 set item(item) {
373 this._item = item;
374 if (this.templates) {
375 this.templates.forEach((item) => {
376 if (item.getType() === this.type) {
377 switch (this.type) {
378 case 'item':
379 case 'caption':
380 case 'thumbnail':
381 this.context = { $implicit: this.item };
382 this.contentTemplate = item.template;
383 break;
384 }
385 }
386 });
387 }
388 }
389 ngAfterContentInit() {
390 this.templates.forEach((item) => {
391 if (item.getType() === this.type) {
392 switch (this.type) {
393 case 'item':
394 case 'caption':
395 case 'thumbnail':
396 this.context = { $implicit: this.item };
397 this.contentTemplate = item.template;
398 break;
399 case 'indicator':
400 this.context = { $implicit: this.index };
401 this.contentTemplate = item.template;
402 break;
403 default:
404 this.context = {};
405 this.contentTemplate = item.template;
406 break;
407 }
408 }
409 });
410 }
411}
412GalleriaItemSlot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaItemSlot, deps: [], target: i0.ɵɵFactoryTarget.Component });
413GalleriaItemSlot.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: GalleriaItemSlot, selector: "p-galleriaItemSlot", inputs: { templates: "templates", index: "index", item: "item", type: "type" }, ngImport: i0, template: `
414 <ng-container *ngIf="contentTemplate">
415 <ng-container *ngTemplateOutlet="contentTemplate; context: context"></ng-container>
416 </ng-container>
417 `, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
418i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaItemSlot, decorators: [{
419 type: Component,
420 args: [{
421 selector: 'p-galleriaItemSlot',
422 template: `
423 <ng-container *ngIf="contentTemplate">
424 <ng-container *ngTemplateOutlet="contentTemplate; context: context"></ng-container>
425 </ng-container>
426 `,
427 changeDetection: ChangeDetectionStrategy.OnPush
428 }]
429 }], propDecorators: { templates: [{
430 type: Input
431 }], index: [{
432 type: Input
433 }], item: [{
434 type: Input
435 }], type: [{
436 type: Input
437 }] } });
438export class GalleriaItem {
439 constructor() {
440 this.circular = false;
441 this.showItemNavigators = false;
442 this.showIndicators = true;
443 this.slideShowActive = true;
444 this.changeItemOnIndicatorHover = true;
445 this.autoPlay = false;
446 this.startSlideShow = new EventEmitter();
447 this.stopSlideShow = new EventEmitter();
448 this.onActiveIndexChange = new EventEmitter();
449 this._activeIndex = 0;
450 }
451 get activeIndex() {
452 return this._activeIndex;
453 }
454 ;
455 set activeIndex(activeIndex) {
456 this._activeIndex = activeIndex;
457 this.activeItem = this.value[this._activeIndex];
458 }
459 ngOnInit() {
460 if (this.autoPlay) {
461 this.startSlideShow.emit();
462 }
463 }
464 next() {
465 let nextItemIndex = this.activeIndex + 1;
466 let activeIndex = this.circular && this.value.length - 1 === this.activeIndex
467 ? 0
468 : nextItemIndex;
469 this.onActiveIndexChange.emit(activeIndex);
470 }
471 prev() {
472 let prevItemIndex = this.activeIndex !== 0 ? this.activeIndex - 1 : 0;
473 let activeIndex = this.circular && this.activeIndex === 0
474 ? this.value.length - 1
475 : prevItemIndex;
476 this.onActiveIndexChange.emit(activeIndex);
477 }
478 stopTheSlideShow() {
479 if (this.slideShowActive && this.stopSlideShow) {
480 this.stopSlideShow.emit();
481 }
482 }
483 navForward(e) {
484 this.stopTheSlideShow();
485 this.next();
486 if (e && e.cancelable) {
487 e.preventDefault();
488 }
489 }
490 navBackward(e) {
491 this.stopTheSlideShow();
492 this.prev();
493 if (e && e.cancelable) {
494 e.preventDefault();
495 }
496 }
497 onIndicatorClick(index) {
498 this.stopTheSlideShow();
499 this.onActiveIndexChange.emit(index);
500 }
501 onIndicatorMouseEnter(index) {
502 if (this.changeItemOnIndicatorHover) {
503 this.stopTheSlideShow();
504 this.onActiveIndexChange.emit(index);
505 }
506 }
507 onIndicatorKeyDown(index) {
508 this.stopTheSlideShow();
509 this.onActiveIndexChange.emit(index);
510 }
511 isNavForwardDisabled() {
512 return !this.circular && this.activeIndex === (this.value.length - 1);
513 }
514 isNavBackwardDisabled() {
515 return !this.circular && this.activeIndex === 0;
516 }
517 isIndicatorItemActive(index) {
518 return this.activeIndex === index;
519 }
520}
521GalleriaItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
522GalleriaItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: GalleriaItem, selector: "p-galleriaItem", inputs: { circular: "circular", value: "value", showItemNavigators: "showItemNavigators", showIndicators: "showIndicators", slideShowActive: "slideShowActive", changeItemOnIndicatorHover: "changeItemOnIndicatorHover", autoPlay: "autoPlay", templates: "templates", indicatorFacet: "indicatorFacet", captionFacet: "captionFacet", activeIndex: "activeIndex" }, outputs: { startSlideShow: "startSlideShow", stopSlideShow: "stopSlideShow", onActiveIndexChange: "onActiveIndexChange" }, ngImport: i0, template: `
523 <div class="p-galleria-item-wrapper">
524 <div class="p-galleria-item-container">
525 <button *ngIf="showItemNavigators" type="button" [ngClass]="{'p-galleria-item-prev p-galleria-item-nav p-link': true, 'p-disabled': this.isNavBackwardDisabled()}" (click)="navBackward($event)" [disabled]="isNavBackwardDisabled()" pRipple>
526 <span class="p-galleria-item-prev-icon pi pi-chevron-left"></span>
527 </button>
528 <p-galleriaItemSlot type="item" [item]="activeItem" [templates]="templates" class="p-galleria-item"></p-galleriaItemSlot>
529 <button *ngIf="showItemNavigators" type="button" [ngClass]="{'p-galleria-item-next p-galleria-item-nav p-link': true,'p-disabled': this.isNavForwardDisabled()}" (click)="navForward($event)" [disabled]="isNavForwardDisabled()" pRipple>
530 <span class="p-galleria-item-next-icon pi pi-chevron-right"></span>
531 </button>
532 <div class="p-galleria-caption" *ngIf="captionFacet">
533 <p-galleriaItemSlot type="caption" [item]="activeItem" [templates]="templates"></p-galleriaItemSlot>
534 </div>
535 </div>
536 <ul *ngIf="showIndicators" class="p-galleria-indicators p-reset">
537 <li *ngFor="let item of value; let index = index;" tabindex="0"
538 (click)="onIndicatorClick(index)" (mouseenter)="onIndicatorMouseEnter(index)" (keydown.enter)="onIndicatorKeyDown(index)"
539 [ngClass]="{'p-galleria-indicator': true,'p-highlight': isIndicatorItemActive(index)}">
540 <button type="button" tabIndex="-1" class="p-link" *ngIf="!indicatorFacet">
541 </button>
542 <p-galleriaItemSlot type="indicator" [index]="index" [templates]="templates"></p-galleriaItemSlot>
543 </li>
544 </ul>
545 </div>
546 `, isInline: true, components: [{ type: GalleriaItemSlot, selector: "p-galleriaItemSlot", inputs: ["templates", "index", "item", "type"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.Ripple, selector: "[pRipple]" }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
547i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaItem, decorators: [{
548 type: Component,
549 args: [{
550 selector: 'p-galleriaItem',
551 template: `
552 <div class="p-galleria-item-wrapper">
553 <div class="p-galleria-item-container">
554 <button *ngIf="showItemNavigators" type="button" [ngClass]="{'p-galleria-item-prev p-galleria-item-nav p-link': true, 'p-disabled': this.isNavBackwardDisabled()}" (click)="navBackward($event)" [disabled]="isNavBackwardDisabled()" pRipple>
555 <span class="p-galleria-item-prev-icon pi pi-chevron-left"></span>
556 </button>
557 <p-galleriaItemSlot type="item" [item]="activeItem" [templates]="templates" class="p-galleria-item"></p-galleriaItemSlot>
558 <button *ngIf="showItemNavigators" type="button" [ngClass]="{'p-galleria-item-next p-galleria-item-nav p-link': true,'p-disabled': this.isNavForwardDisabled()}" (click)="navForward($event)" [disabled]="isNavForwardDisabled()" pRipple>
559 <span class="p-galleria-item-next-icon pi pi-chevron-right"></span>
560 </button>
561 <div class="p-galleria-caption" *ngIf="captionFacet">
562 <p-galleriaItemSlot type="caption" [item]="activeItem" [templates]="templates"></p-galleriaItemSlot>
563 </div>
564 </div>
565 <ul *ngIf="showIndicators" class="p-galleria-indicators p-reset">
566 <li *ngFor="let item of value; let index = index;" tabindex="0"
567 (click)="onIndicatorClick(index)" (mouseenter)="onIndicatorMouseEnter(index)" (keydown.enter)="onIndicatorKeyDown(index)"
568 [ngClass]="{'p-galleria-indicator': true,'p-highlight': isIndicatorItemActive(index)}">
569 <button type="button" tabIndex="-1" class="p-link" *ngIf="!indicatorFacet">
570 </button>
571 <p-galleriaItemSlot type="indicator" [index]="index" [templates]="templates"></p-galleriaItemSlot>
572 </li>
573 </ul>
574 </div>
575 `,
576 changeDetection: ChangeDetectionStrategy.OnPush
577 }]
578 }], propDecorators: { circular: [{
579 type: Input
580 }], value: [{
581 type: Input
582 }], showItemNavigators: [{
583 type: Input
584 }], showIndicators: [{
585 type: Input
586 }], slideShowActive: [{
587 type: Input
588 }], changeItemOnIndicatorHover: [{
589 type: Input
590 }], autoPlay: [{
591 type: Input
592 }], templates: [{
593 type: Input
594 }], indicatorFacet: [{
595 type: Input
596 }], captionFacet: [{
597 type: Input
598 }], startSlideShow: [{
599 type: Output
600 }], stopSlideShow: [{
601 type: Output
602 }], onActiveIndexChange: [{
603 type: Output
604 }], activeIndex: [{
605 type: Input
606 }] } });
607export class GalleriaThumbnails {
608 constructor(cd) {
609 this.cd = cd;
610 this.isVertical = false;
611 this.slideShowActive = false;
612 this.circular = false;
613 this.contentHeight = "300px";
614 this.showThumbnailNavigators = true;
615 this.onActiveIndexChange = new EventEmitter();
616 this.stopSlideShow = new EventEmitter();
617 this.startPos = null;
618 this.thumbnailsStyle = null;
619 this.sortedResponsiveOptions = null;
620 this.totalShiftedItems = 0;
621 this.page = 0;
622 this._numVisible = 0;
623 this.d_numVisible = 0;
624 this._oldNumVisible = 0;
625 this._activeIndex = 0;
626 this._oldactiveIndex = 0;
627 }
628 get numVisible() {
629 return this._numVisible;
630 }
631 ;
632 set numVisible(numVisible) {
633 this._numVisible = numVisible;
634 this._oldNumVisible = this.d_numVisible;
635 this.d_numVisible = numVisible;
636 }
637 get activeIndex() {
638 return this._activeIndex;
639 }
640 ;
641 set activeIndex(activeIndex) {
642 this._oldactiveIndex = this._activeIndex;
643 this._activeIndex = activeIndex;
644 }
645 ngOnInit() {
646 this.createStyle();
647 if (this.responsiveOptions) {
648 this.bindDocumentListeners();
649 }
650 }
651 ngAfterContentChecked() {
652 let totalShiftedItems = this.totalShiftedItems;
653 if ((this._oldNumVisible !== this.d_numVisible || this._oldactiveIndex !== this._activeIndex) && this.itemsContainer) {
654 if (this._activeIndex <= this.getMedianItemIndex()) {
655 totalShiftedItems = 0;
656 }
657 else if (this.value.length - this.d_numVisible + this.getMedianItemIndex() < this._activeIndex) {
658 totalShiftedItems = this.d_numVisible - this.value.length;
659 }
660 else if (this.value.length - this.d_numVisible < this._activeIndex && this.d_numVisible % 2 === 0) {
661 totalShiftedItems = (this._activeIndex * -1) + this.getMedianItemIndex() + 1;
662 }
663 else {
664 totalShiftedItems = (this._activeIndex * -1) + this.getMedianItemIndex();
665 }
666 if (totalShiftedItems !== this.totalShiftedItems) {
667 this.totalShiftedItems = totalShiftedItems;
668 }
669 if (this.itemsContainer && this.itemsContainer.nativeElement) {
670 this.itemsContainer.nativeElement.style.transform = this.isVertical ? `translate3d(0, ${totalShiftedItems * (100 / this.d_numVisible)}%, 0)` : `translate3d(${totalShiftedItems * (100 / this.d_numVisible)}%, 0, 0)`;
671 }
672 if (this._oldactiveIndex !== this._activeIndex) {
673 DomHandler.removeClass(this.itemsContainer.nativeElement, 'p-items-hidden');
674 this.itemsContainer.nativeElement.style.transition = 'transform 500ms ease 0s';
675 }
676 this._oldactiveIndex = this._activeIndex;
677 this._oldNumVisible = this.d_numVisible;
678 }
679 }
680 ngAfterViewInit() {
681 this.calculatePosition();
682 }
683 createStyle() {
684 if (!this.thumbnailsStyle) {
685 this.thumbnailsStyle = document.createElement('style');
686 this.thumbnailsStyle.type = 'text/css';
687 document.body.appendChild(this.thumbnailsStyle);
688 }
689 let innerHTML = `
690 #${this.containerId} .p-galleria-thumbnail-item {
691 flex: 1 0 ${(100 / this.d_numVisible)}%
692 }
693 `;
694 if (this.responsiveOptions) {
695 this.sortedResponsiveOptions = [...this.responsiveOptions];
696 this.sortedResponsiveOptions.sort((data1, data2) => {
697 const value1 = data1.breakpoint;
698 const value2 = data2.breakpoint;
699 let result = null;
700 if (value1 == null && value2 != null)
701 result = -1;
702 else if (value1 != null && value2 == null)
703 result = 1;
704 else if (value1 == null && value2 == null)
705 result = 0;
706 else if (typeof value1 === 'string' && typeof value2 === 'string')
707 result = value1.localeCompare(value2, undefined, { numeric: true });
708 else
709 result = (value1 < value2) ? -1 : (value1 > value2) ? 1 : 0;
710 return -1 * result;
711 });
712 for (let i = 0; i < this.sortedResponsiveOptions.length; i++) {
713 let res = this.sortedResponsiveOptions[i];
714 innerHTML += `
715 @media screen and (max-width: ${res.breakpoint}) {
716 #${this.containerId} .p-galleria-thumbnail-item {
717 flex: 1 0 ${(100 / res.numVisible)}%
718 }
719 }
720 `;
721 }
722 }
723 this.thumbnailsStyle.innerHTML = innerHTML;
724 }
725 calculatePosition() {
726 if (this.itemsContainer && this.sortedResponsiveOptions) {
727 let windowWidth = window.innerWidth;
728 let matchedResponsiveData = {
729 numVisible: this._numVisible
730 };
731 for (let i = 0; i < this.sortedResponsiveOptions.length; i++) {
732 let res = this.sortedResponsiveOptions[i];
733 if (parseInt(res.breakpoint, 10) >= windowWidth) {
734 matchedResponsiveData = res;
735 }
736 }
737 if (this.d_numVisible !== matchedResponsiveData.numVisible) {
738 this.d_numVisible = matchedResponsiveData.numVisible;
739 this.cd.markForCheck();
740 }
741 }
742 }
743 getTabIndex(index) {
744 return this.isItemActive(index) ? 0 : null;
745 }
746 navForward(e) {
747 this.stopTheSlideShow();
748 let nextItemIndex = this._activeIndex + 1;
749 if (nextItemIndex + this.totalShiftedItems > this.getMedianItemIndex() && ((-1 * this.totalShiftedItems) < this.getTotalPageNumber() - 1 || this.circular)) {
750 this.step(-1);
751 }
752 let activeIndex = this.circular && (this.value.length - 1) === this._activeIndex ? 0 : nextItemIndex;
753 this.onActiveIndexChange.emit(activeIndex);
754 if (e.cancelable) {
755 e.preventDefault();
756 }
757 }
758 navBackward(e) {
759 this.stopTheSlideShow();
760 let prevItemIndex = this._activeIndex !== 0 ? this._activeIndex - 1 : 0;
761 let diff = prevItemIndex + this.totalShiftedItems;
762 if ((this.d_numVisible - diff - 1) > this.getMedianItemIndex() && ((-1 * this.totalShiftedItems) !== 0 || this.circular)) {
763 this.step(1);
764 }
765 let activeIndex = this.circular && this._activeIndex === 0 ? this.value.length - 1 : prevItemIndex;
766 this.onActiveIndexChange.emit(activeIndex);
767 if (e.cancelable) {
768 e.preventDefault();
769 }
770 }
771 onItemClick(index) {
772 this.stopTheSlideShow();
773 let selectedItemIndex = index;
774 if (selectedItemIndex !== this._activeIndex) {
775 const diff = selectedItemIndex + this.totalShiftedItems;
776 let dir = 0;
777 if (selectedItemIndex < this._activeIndex) {
778 dir = (this.d_numVisible - diff - 1) - this.getMedianItemIndex();
779 if (dir > 0 && (-1 * this.totalShiftedItems) !== 0) {
780 this.step(dir);
781 }
782 }
783 else {
784 dir = this.getMedianItemIndex() - diff;
785 if (dir < 0 && (-1 * this.totalShiftedItems) < this.getTotalPageNumber() - 1) {
786 this.step(dir);
787 }
788 }
789 this.activeIndex = selectedItemIndex;
790 this.onActiveIndexChange.emit(this.activeIndex);
791 }
792 }
793 step(dir) {
794 let totalShiftedItems = this.totalShiftedItems + dir;
795 if (dir < 0 && (-1 * totalShiftedItems) + this.d_numVisible > (this.value.length - 1)) {
796 totalShiftedItems = this.d_numVisible - this.value.length;
797 }
798 else if (dir > 0 && totalShiftedItems > 0) {
799 totalShiftedItems = 0;
800 }
801 if (this.circular) {
802 if (dir < 0 && this.value.length - 1 === this._activeIndex) {
803 totalShiftedItems = 0;
804 }
805 else if (dir > 0 && this._activeIndex === 0) {
806 totalShiftedItems = this.d_numVisible - this.value.length;
807 }
808 }
809 if (this.itemsContainer) {
810 DomHandler.removeClass(this.itemsContainer.nativeElement, 'p-items-hidden');
811 this.itemsContainer.nativeElement.style.transform = this.isVertical ? `translate3d(0, ${totalShiftedItems * (100 / this.d_numVisible)}%, 0)` : `translate3d(${totalShiftedItems * (100 / this.d_numVisible)}%, 0, 0)`;
812 this.itemsContainer.nativeElement.style.transition = 'transform 500ms ease 0s';
813 }
814 this.totalShiftedItems = totalShiftedItems;
815 }
816 stopTheSlideShow() {
817 if (this.slideShowActive && this.stopSlideShow) {
818 this.stopSlideShow.emit();
819 }
820 }
821 changePageOnTouch(e, diff) {
822 if (diff < 0) { // left
823 this.navForward(e);
824 }
825 else { // right
826 this.navBackward(e);
827 }
828 }
829 getTotalPageNumber() {
830 return this.value.length > this.d_numVisible ? (this.value.length - this.d_numVisible) + 1 : 0;
831 }
832 getMedianItemIndex() {
833 let index = Math.floor(this.d_numVisible / 2);
834 return (this.d_numVisible % 2) ? index : index - 1;
835 }
836 onTransitionEnd() {
837 if (this.itemsContainer && this.itemsContainer.nativeElement) {
838 DomHandler.addClass(this.itemsContainer.nativeElement, 'p-items-hidden');
839 this.itemsContainer.nativeElement.style.transition = '';
840 }
841 }
842 onTouchEnd(e) {
843 let touchobj = e.changedTouches[0];
844 if (this.isVertical) {
845 this.changePageOnTouch(e, (touchobj.pageY - this.startPos.y));
846 }
847 else {
848 this.changePageOnTouch(e, (touchobj.pageX - this.startPos.x));
849 }
850 }
851 onTouchMove(e) {
852 if (e.cancelable) {
853 e.preventDefault();
854 }
855 }
856 onTouchStart(e) {
857 let touchobj = e.changedTouches[0];
858 this.startPos = {
859 x: touchobj.pageX,
860 y: touchobj.pageY
861 };
862 }
863 isNavBackwardDisabled() {
864 return (!this.circular && this._activeIndex === 0) || (this.value.length <= this.d_numVisible);
865 }
866 isNavForwardDisabled() {
867 return (!this.circular && this._activeIndex === (this.value.length - 1)) || (this.value.length <= this.d_numVisible);
868 }
869 firstItemAciveIndex() {
870 return this.totalShiftedItems * -1;
871 }
872 lastItemActiveIndex() {
873 return this.firstItemAciveIndex() + this.d_numVisible - 1;
874 }
875 isItemActive(index) {
876 return this.firstItemAciveIndex() <= index && this.lastItemActiveIndex() >= index;
877 }
878 bindDocumentListeners() {
879 if (!this.documentResizeListener) {
880 this.documentResizeListener = () => {
881 this.calculatePosition();
882 };
883 window.addEventListener('resize', this.documentResizeListener);
884 }
885 }
886 unbindDocumentListeners() {
887 if (this.documentResizeListener) {
888 window.removeEventListener('resize', this.documentResizeListener);
889 this.documentResizeListener = null;
890 }
891 }
892 ngOnDestroy() {
893 if (this.responsiveOptions) {
894 this.unbindDocumentListeners();
895 }
896 if (this.thumbnailsStyle) {
897 this.thumbnailsStyle.parentNode.removeChild(this.thumbnailsStyle);
898 }
899 }
900}
901GalleriaThumbnails.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaThumbnails, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
902GalleriaThumbnails.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: GalleriaThumbnails, selector: "p-galleriaThumbnails", inputs: { containerId: "containerId", value: "value", isVertical: "isVertical", slideShowActive: "slideShowActive", circular: "circular", responsiveOptions: "responsiveOptions", contentHeight: "contentHeight", showThumbnailNavigators: "showThumbnailNavigators", templates: "templates", numVisible: "numVisible", activeIndex: "activeIndex" }, outputs: { onActiveIndexChange: "onActiveIndexChange", stopSlideShow: "stopSlideShow" }, viewQueries: [{ propertyName: "itemsContainer", first: true, predicate: ["itemsContainer"], descendants: true }], ngImport: i0, template: `
903 <div class="p-galleria-thumbnail-wrapper">
904 <div class="p-galleria-thumbnail-container">
905 <button *ngIf="showThumbnailNavigators" type="button" [ngClass]="{'p-galleria-thumbnail-prev p-link': true, 'p-disabled': this.isNavBackwardDisabled()}" (click)="navBackward($event)" [disabled]="isNavBackwardDisabled()" pRipple>
906 <span [ngClass]="{'p-galleria-thumbnail-prev-icon pi': true, 'pi-chevron-left': !this.isVertical, 'pi-chevron-up': this.isVertical}"></span>
907 </button>
908 <div class="p-galleria-thumbnail-items-container" [ngStyle]="{'height': isVertical ? contentHeight : ''}">
909 <div #itemsContainer class="p-galleria-thumbnail-items" (transitionend)="onTransitionEnd()"
910 (touchstart)="onTouchStart($event)" (touchmove)="onTouchMove($event)" (touchend)="onTouchEnd($event)">
911 <div *ngFor="let item of value; let index = index;" [ngClass]="{'p-galleria-thumbnail-item': true, 'p-galleria-thumbnail-item-current': activeIndex === index, 'p-galleria-thumbnail-item-active': isItemActive(index),
912 'p-galleria-thumbnail-item-start': firstItemAciveIndex() === index, 'p-galleria-thumbnail-item-end': lastItemActiveIndex() === index }">
913 <div class="p-galleria-thumbnail-item-content" [attr.tabindex]="getTabIndex(index)" (click)="onItemClick(index)" (keydown.enter)="onItemClick(index)">
914 <p-galleriaItemSlot type="thumbnail" [item]="item" [templates]="templates"></p-galleriaItemSlot>
915 </div>
916 </div>
917 </div>
918 </div>
919 <button *ngIf="showThumbnailNavigators" type="button" [ngClass]="{'p-galleria-thumbnail-next p-link': true, 'p-disabled': this.isNavForwardDisabled()}" (click)="navForward($event)" [disabled]="isNavForwardDisabled()" pRipple>
920 <span [ngClass]="{'p-galleria-thumbnail-next-icon pi': true, 'pi-chevron-right': !this.isVertical, 'pi-chevron-down': this.isVertical}"></span>
921 </button>
922 </div>
923 </div>
924 `, isInline: true, components: [{ type: GalleriaItemSlot, selector: "p-galleriaItemSlot", inputs: ["templates", "index", "item", "type"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.Ripple, selector: "[pRipple]" }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
925i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaThumbnails, decorators: [{
926 type: Component,
927 args: [{
928 selector: 'p-galleriaThumbnails',
929 template: `
930 <div class="p-galleria-thumbnail-wrapper">
931 <div class="p-galleria-thumbnail-container">
932 <button *ngIf="showThumbnailNavigators" type="button" [ngClass]="{'p-galleria-thumbnail-prev p-link': true, 'p-disabled': this.isNavBackwardDisabled()}" (click)="navBackward($event)" [disabled]="isNavBackwardDisabled()" pRipple>
933 <span [ngClass]="{'p-galleria-thumbnail-prev-icon pi': true, 'pi-chevron-left': !this.isVertical, 'pi-chevron-up': this.isVertical}"></span>
934 </button>
935 <div class="p-galleria-thumbnail-items-container" [ngStyle]="{'height': isVertical ? contentHeight : ''}">
936 <div #itemsContainer class="p-galleria-thumbnail-items" (transitionend)="onTransitionEnd()"
937 (touchstart)="onTouchStart($event)" (touchmove)="onTouchMove($event)" (touchend)="onTouchEnd($event)">
938 <div *ngFor="let item of value; let index = index;" [ngClass]="{'p-galleria-thumbnail-item': true, 'p-galleria-thumbnail-item-current': activeIndex === index, 'p-galleria-thumbnail-item-active': isItemActive(index),
939 'p-galleria-thumbnail-item-start': firstItemAciveIndex() === index, 'p-galleria-thumbnail-item-end': lastItemActiveIndex() === index }">
940 <div class="p-galleria-thumbnail-item-content" [attr.tabindex]="getTabIndex(index)" (click)="onItemClick(index)" (keydown.enter)="onItemClick(index)">
941 <p-galleriaItemSlot type="thumbnail" [item]="item" [templates]="templates"></p-galleriaItemSlot>
942 </div>
943 </div>
944 </div>
945 </div>
946 <button *ngIf="showThumbnailNavigators" type="button" [ngClass]="{'p-galleria-thumbnail-next p-link': true, 'p-disabled': this.isNavForwardDisabled()}" (click)="navForward($event)" [disabled]="isNavForwardDisabled()" pRipple>
947 <span [ngClass]="{'p-galleria-thumbnail-next-icon pi': true, 'pi-chevron-right': !this.isVertical, 'pi-chevron-down': this.isVertical}"></span>
948 </button>
949 </div>
950 </div>
951 `,
952 changeDetection: ChangeDetectionStrategy.OnPush
953 }]
954 }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { containerId: [{
955 type: Input
956 }], value: [{
957 type: Input
958 }], isVertical: [{
959 type: Input
960 }], slideShowActive: [{
961 type: Input
962 }], circular: [{
963 type: Input
964 }], responsiveOptions: [{
965 type: Input
966 }], contentHeight: [{
967 type: Input
968 }], showThumbnailNavigators: [{
969 type: Input
970 }], templates: [{
971 type: Input
972 }], onActiveIndexChange: [{
973 type: Output
974 }], stopSlideShow: [{
975 type: Output
976 }], itemsContainer: [{
977 type: ViewChild,
978 args: ['itemsContainer']
979 }], numVisible: [{
980 type: Input
981 }], activeIndex: [{
982 type: Input
983 }] } });
984export class GalleriaModule {
985}
986GalleriaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
987GalleriaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaModule, declarations: [Galleria, GalleriaContent, GalleriaItemSlot, GalleriaItem, GalleriaThumbnails], imports: [CommonModule, SharedModule, RippleModule], exports: [CommonModule, Galleria, GalleriaContent, GalleriaItemSlot, GalleriaItem, GalleriaThumbnails, SharedModule] });
988GalleriaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaModule, imports: [[CommonModule, SharedModule, RippleModule], CommonModule, SharedModule] });
989i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: GalleriaModule, decorators: [{
990 type: NgModule,
991 args: [{
992 imports: [CommonModule, SharedModule, RippleModule],
993 exports: [CommonModule, Galleria, GalleriaContent, GalleriaItemSlot, GalleriaItem, GalleriaThumbnails, SharedModule],
994 declarations: [Galleria, GalleriaContent, GalleriaItemSlot, GalleriaItem, GalleriaThumbnails]
995 }]
996 }] });
997//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2FsbGVyaWEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvZ2FsbGVyaWEvZ2FsbGVyaWEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFFBQVEsRUFBQyxTQUFTLEVBQXNCLEtBQUssRUFBQyxNQUFNLEVBQUMsWUFBWSxFQUFDLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxlQUFlLEVBQWlGLGlCQUFpQixFQUFtQyxNQUFNLGVBQWUsQ0FBQztBQUN4UixPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDN0MsT0FBTyxFQUFFLFlBQVksRUFBRSxhQUFhLEVBQWlCLE1BQU0sYUFBYSxDQUFDO0FBQ3pFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxXQUFXLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDL0QsT0FBTyxFQUFFLFVBQVUs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g7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbk1hc2tIaWRlKCkge1xuICAgICAgICB0aGlzLnZpc2libGUgPSBmYWxzZTtcbiAgICAgICAgdGhpcy52aXNpYmxlQ2hhbmdlLmVtaXQoZmFsc2UpO1xuICAgIH1cblxuICAgIG9uQWN0aXZlSXRlbUNoYW5nZShpbmRleCkge1xuICAgICAgICBpZiAodGhpcy5hY3RpdmVJbmRleCAhPT0gaW5kZXgpIHtcbiAgICAgICAgICAgIHRoaXMuYWN0aXZlSW5kZXggPSBpbmRleDtcbiAgICAgICAgICAgIHRoaXMuYWN0aXZlSW5kZXhDaGFuZ2UuZW1pdChpbmRleCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbkFuaW1hdGlvblN0YXJ0KGV2ZW50OiBBbmltYXRpb25FdmVudCkge1xuICAgICAgICBzd2l0Y2goZXZlbnQudG9TdGF0ZSkge1xuICAgICAgICAgICAgY2FzZSAndmlzaWJsZSc6XG4gICAgICAgICAgICAgICAgdGhpcy5lbmFibGVNb2RhbGl0eSgpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ3ZvaWQnOlxuICAgICAgICAgICAgICAgIERvbUhhbmRsZXIuYWRkQ2xhc3ModGhpcy5tYXNrLm5hdGl2ZUVsZW1lbnQsICdwLWNvbXBvbmVudC1vdmVybGF5LWxlYXZlJyk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uQW5pbWF0aW9uRW5kKGV2ZW50OiBBbmltYXRpb25FdmVudCkge1xuICAgICAgICBzd2l0Y2goZXZlbnQudG9TdGF0ZSkge1xuICAgICAgICAgICAgY2FzZSAndm9pZCc6XG4gICAgICAgICAgICAgICB0aGlzLmRpc2FibGVNb2RhbGl0eSgpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBlbmFibGVNb2RhbGl0eSgpIHtcbiAgIC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kge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnaXRlbSc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdjYXB0aW9uJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3RodW1ibmFpbCc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0geyRpbXBsaWNpdDogdGhpcy5pdGVtfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRlbnRUZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgQElucHV0KCkgdHlwZTogc3RyaW5nO1xuXG4gICAgY29udGVudFRlbXBsYXRlOiBUZW1wbGF0ZVJlZjxhbnk+O1xuXG4gICAgY29udGV4dDphbnk7XG5cbiAgICBfaXRlbTphbnk7XG5cbiAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7XG4gICAgICAgIHRoaXMudGVtcGxhdGVzLmZvckVhY2goKGl0ZW0pID0+IHtcbiAgICAgICAgICAgIGlmIChpdGVtLmdldFR5cGUoKSA9PT0gdGhpcy50eXBlKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoKHRoaXMudHlwZSkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdpdGVtJzpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnY2FwdGlvbic6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3RodW1ibmFpbCc6XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRleHQgPSB7JGltcGxpY2l0OiB0aGlzLml0ZW19O1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250ZW50VGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnaW5kaWNhdG9yJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IHskaW1wbGljaXQ6IHRoaXMuaW5kZXh9O1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250ZW50VGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IHt9O1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250ZW50VGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn1cblxuQENvbXBvbmVudCh7XG4gICAgc2VsZWN0b3I6ICdwLWdhbGxlcmlhSXRlbScsXG4gICAgdGVtcGxhdGU6IGBcbiAgICAgICAgPGRpdiBjbGFzcz1cInAtZ2FsbGVyaWEtaXRlbS13cmFwcGVyXCI+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwicC1nYWxsZXJpYS1pdGVtLWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxidXR0b24gKm5nSWY9XCJzaG93SXRlbU5hdmlnYXRvcnNcIiB0eXBlPVwiYnV0dG9uXCIgW25nQ2xhc3NdPVwieydwLWdhbGxlcmlhLWl0ZW0tcHJldiBwLWdhbGxlcmlhLWl0ZW0tbmF2IHAtbGluayc6IHRydWUsICdwLWRpc2FibGVkJzogdGhpcy5pc05hdkJhY2t3YXJkRGlzYWJsZWQoKX1cIiAoY2xpY2spPVwibmF2QmFja3dhcmQoJGV2ZW50KVwiIFtkaXNhYmxlZF09XCJpc05hdkJhY2t3YXJkRGlzYWJs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GggLSAxXG4gICAgICAgICAgICAgICAgOiBwcmV2SXRlbUluZGV4XG4gICAgICAgIHRoaXMub25BY3RpdmVJbmRleENoYW5nZS5lbWl0KGFjdGl2ZUluZGV4KTtcbiAgICB9XG5cbiAgICBzdG9wVGhlU2xpZGVTaG93KCkge1xuICAgICAgICBpZiAodGhpcy5zbGlkZVNob3dBY3RpdmUgJiYgdGhpcy5zdG9wU2xpZGVTaG93KSB7XG4gICAgICAgICAgICB0aGlzLnN0b3BTbGlkZVNob3cuZW1pdCgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgbmF2Rm9yd2FyZChlKSB7XG4gICAgICAgIHRoaXMuc3RvcFRoZVNsaWRlU2hvdygpO1xuICAgICAgICB0aGlzLm5leHQoKTtcblxuICAgICAgICBpZiAoZSAmJiBlLmNhbmNlbGFibGUpIHtcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5hdkJhY2t3YXJkKGUpIHtcbiAgICAgICAgdGhpcy5zdG9wVGhlU2xpZGVTaG93KCk7XG4gICAgICAgIHRoaXMucHJldigpO1xuXG4gICAgICAgIGlmIChlICYmIGUuY2FuY2VsYWJsZSkge1xuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25JbmRpY2F0b3JDbGljayhpbmRleCkge1xuICAgICAgICB0aGlzLnN0b3BUaGVTbGlkZVNob3coKTtcbiAgICAgICAgdGhpcy5vbkFjdGl2ZUluZGV4Q2hhbmdlLmVtaXQoaW5kZXgpO1xuICAgIH1cblxuICAgIG9uSW5kaWNhdG9yTW91c2VFbnRlcihpbmRleCkge1xuICAgICAgICBpZiAodGhpcy5jaGFuZ2VJdGVtT25JbmRpY2F0b3JIb3Zlcikge1xuICAgICAgICAgICAgdGhpcy5zdG9wVGhlU2xpZGVTaG93KCk7XG4gICAgICAgICAgICB0aGlzLm9uQWN0aXZlSW5k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AgICAgICAgICB0aGlzLnRodW1ibmFpbHNTdHlsZS50eXBlID0gJ3RleHQvY3NzJztcbiAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQodGhpcy50aHVtYm5haWxzU3R5bGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IGlubmVySFRNTCA9IGBcbiAgICAgICAgICAgICMke3RoaXMuY29udGFpbmVySWR9IC5wLWdhbGxlcmlhLXRodW1ibmFpbC1pdGVtIHtcbiAgICAgICAgICAgICAgICBmbGV4OiAxIDAgJHsgKDEwMC8gdGhpcy5kX251bVZpc2libGUpIH0lXG4gICAgICAgICAgICB9XG4gICAgICAgIGA7XG5cbiAgICAgICAgaWYgKHRoaXMucmVzcG9uc2l2ZU9wdGlvbnMpIHtcbiAgICAgICAgICAgIHRoaXMuc29ydGVkUmVzcG9uc2l2ZU9wdGlvbnMgPSBbLi4udGhpcy5yZXNwb25zaXZlT3B0aW9uc107XG4gICAgICAgICAgICB0aGlzLnNvcnRlZFJlc3BvbnNpdmVPcHRpb25zLnNvcnQoKGRhdGExLCBkYXRhMikgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlMSA9IGRhdGExLmJyZWFrcG9pbnQ7XG4gICAgICAgICAgICAgICAgY29uc3QgdmFsdWUyID0gZGF0YTIuYnJlYWtwb2ludDtcbiAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gbnVsbDtcblxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZTEgPT0gbnVsbCAmJiB2YWx1ZTIgIT0gbnVsbClcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gLTE7XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodmFsdWUxICE9IG51bGwgJiYgdmFsdWUyID09IG51bGwpXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IDE7XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodmFsdWUxID09IG51bGwgJiYgdmFsdWUyID09IG51bGwpXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IDA7XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIHZhbHVlMSA9PT0gJ3N0cmluZycgJiYgdHlwZW9mIHZhbHVlMiA9PT0gJ3N0cmluZycpXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHZhbHVlMS5sb2NhbGVDb21wYXJlKHZhbHVlMiwgdW5kZWZpbmVkLCB7IG51bWVyaWM6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSAodmFsdWUxIDwgdmFsdWUyKSA/IC0xIDogKHZhbHVlMSA+IHZhbHVlMikgPyAxIDogMDtcblxuICAgICAgICAgICAgICAgIHJldHVybiAtMSAqIHJlc3VsdDtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMuc29ydGVkUmVzcG9uc2l2ZU9wdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBsZXQgcmVzID0gdGhpcy5zb3J0ZWRSZXNwb25zaXZlT3B0aW9uc1tpXTtcblxuICAgICAgICAgICAgICAgIGlubmVySFRNTCArPSBgXG4gICAgICAgICAgICAgICAgICAgIEBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6ICR7cmVzLmJyZWFrcG9pbnR9KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAjJHt0aGlzLmNvbnRhaW5lcklkfSAucC1nYWxsZXJpYS10aHVtYm5haWwtaXRlbSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxleDogMSAwICR7ICgxMDAvIHJlcy5udW1WaXNpYmxlKSB9JVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy50aHVtYm5haWxzU3R5bGUuaW5uZXJIVE1MID0gaW5uZXJIVE1MO1xuICAgIH1cblxuICAgIGNhbGN1bGF0ZVBvc2l0aW9uKCkge1xuICAgICAgICBpZiAodGhpcy5pdGVtc0NvbnRhaW5lciAmJiB0aGlzLnNvcnRlZFJlc3BvbnNpdmVPcHRpb25zKSB7XG4gICAgICAgICAgICBsZXQgd2luZG93V2lkdGggPSB3aW5kb3cuaW5uZXJXaWR0aDtcbiAgICAgICAgICAgIGxldCBtYXRjaGVkUmVzcG9uc2l2ZURhdGEgPSB7XG4gICAgICAgICAgICAgICAgbnVtVmlzaWJsZTogdGhpcy5fbnVtVmlzaWJsZVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLnNvcnRlZFJlc3BvbnNpdmVPcHRpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgbGV0IHJlcyA9IHRoaXMuc29ydGVkUmVzcG9uc2l2ZU9wdGlvbnNbaV07XG5cbiAgICAgICAgICAgICAgICBpZiAocGFyc2VJbnQocmVzLmJyZWFrcG9pbnQsIDEwKSA+PSB3aW5kb3dXaWR0aCkge1xuICAgICAgICAgICAgICAgICAgICBtYXRjaGVkUmVzcG9uc2l2ZURhdGEgPSByZXM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5kX251bVZpc2libGUgIT09IG1hdGNoZWRSZXNwb25zaXZlRGF0YS5udW1WaXNpYmxlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5kX251bVZpc2libGUgPSBtYXRjaGVkUmVzcG9uc2l2ZURhdGEubnVtVmlzaWJsZTtcbiAgICAgICAgICAgICAgICB0aGlzLmNkLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0VGFiSW5kZXgoaW5kZXgpIHtcbiAgICAgICAg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ICAgICB0aGlzLnRvdGFsU2hpZnRlZEl0ZW1zID0gdG90YWxTaGlmdGVkSXRlbXM7XG4gICAgfVxuXG4gICAgc3RvcFRoZVNsaWRlU2hvdygpIHtcbiAgICAgICAgaWYgKHRoaXMuc2xpZGVTaG93QWN0aXZlICYmIHRoaXMuc3RvcFNsaWRlU2hvdykge1xuICAgICAgICAgICAgdGhpcy5zdG9wU2xpZGVTaG93LmVtaXQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNoYW5nZVBhZ2VPblRvdWNoKGUsIGRpZmYpIHtcbiAgICAgICAgaWYgKGRpZmYgPCAwKSB7ICAgICAgICAgICAvLyBsZWZ0XG4gICAgICAgICAgICB0aGlzLm5hdkZvcndhcmQoZSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7ICAgICAgICAgICAgICAgICAgICAvLyByaWdodFxuICAgICAgICAgICAgdGhpcy5uYXZCYWNrd2FyZChlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGdldFRvdGFsUGFnZU51bWJlcigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudmFsdWUubGVuZ3RoID4gdGhpcy5kX251bVZpc2libGUgPyAodGhpcy52YWx1ZS5sZW5ndGggLSB0aGlzLmRfbnVtVmlzaWJsZSkgKyAxIDogMDtcbiAgICB9XG5cbiAgICBnZXRNZWRpYW5JdGVtSW5kZXgoKSB7XG4gICAgICAgIGxldCBpbmRleCA9IE1hdGguZmxvb3IodGhpcy5kX251bVZpc2libGUgLyAyKTtcblxuICAgICAgICByZXR1cm4gKHRoaXMuZF9udW1WaXNpYmxlICUgMikgPyBpbmRleCA6IGluZGV4IC0gMTtcbiAgICB9XG5cbiAgICBvblRyYW5zaXRpb25FbmQoKSB7XG4gICAgICAgIGlmICh0aGlzLml0ZW1zQ29udGFpbmVyICYmIHRoaXMuaXRlbXNDb250YWluZXIubmF0aXZlRWxlbWVudCkge1xuICAgICAgICAgICAgRG9tSGFuZGxlci5hZGRDbGFzc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uZXJzKCkge1xuICAgICAgICBpZih0aGlzLmRvY3VtZW50UmVzaXplTGlzdGVuZXIpIHtcbiAgICAgICAgICAgIHdpbmRvdy5yZW1vdmVFdmVudExpc3RlbmVyKCdyZXNpemUnLCB0aGlzLmRvY3VtZW50UmVzaXplTGlzdGVuZXIpO1xuICAgICAgICAgICAgdGhpcy5kb2N1bWVudFJlc2l6ZUxpc3RlbmVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICBpZiAodGhpcy5yZXNwb25zaXZlT3B0aW9ucykge1xuXHRcdFx0dGhpcy51bmJpbmREb2N1bWVudExpc3RlbmVycygpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMudGh1bWJuYWlsc1N0eWxlKSB7XG4gICAgICAgICAgICB0aGlzLnRodW1ibmFpbHNTdHlsZS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHRoaXMudGh1bWJuYWlsc1N0eWxlKTtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuQE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlLCBTaGFyZWRNb2R1bGUsIFJpcHBsZU1vZHVsZV0sXG4gICAgZXhwb3J0czogW0NvbW1vbk1vZHVsZSwgR2FsbGVyaWEsIEdhbGxlcmlhQ29udGVudCwgR2FsbGVyaWFJdGVtU2xvdCwgR2FsbGVyaWFJdGVtLCBHYWxsZXJpYVRodW1ibmFpbHMsIFNoYXJlZE1vZHVsZV0sXG4gICAgZGVjbGFyYXRpb25zOiBbR2FsbGVyaWEsIEdhbGxlcmlhQ29udGVudCwgR2FsbGVyaWFJdGVtU2xvdCwgR2FsbGVyaWFJdGVtLCBHYWxsZXJpYVRodW1ibmFpbHNdXG59KVxuZXhwb3J0IGNsYXNzIEdhbGxlcmlhTW9kdWxlIHsgfVxuIl19
Note: See TracBrowser for help on using the repository browser.