UNPKG

60.4 kBJavaScriptView Raw
1import * as i0 from '@angular/core';
2import { Directive, Input, EventEmitter, PLATFORM_ID, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, Output, ViewChild, ContentChildren, HostBinding, NgModule } from '@angular/core';
3import * as i1 from '@angular/common';
4import { isPlatformBrowser, CommonModule } from '@angular/common';
5import Swiper from 'swiper';
6import { Subject, of } from 'rxjs';
7
8function isObject(o) {
9 return (typeof o === 'object' &&
10 o !== null &&
11 o.constructor &&
12 Object.prototype.toString.call(o).slice(8, -1) === 'Object');
13}
14function isShowEl(val, obj, el) {
15 return ((coerceBooleanProperty(val) === true && obj && !obj.el) ||
16 !(typeof obj !== 'boolean' &&
17 obj.el !== (el === null || el === void 0 ? void 0 : el.nativeElement) &&
18 (typeof obj.el === 'string' || typeof obj.el === 'object')));
19}
20function extend(target, src) {
21 const noExtend = ['__proto__', 'constructor', 'prototype'];
22 Object.keys(src)
23 .filter((key) => noExtend.indexOf(key) < 0)
24 .forEach((key) => {
25 if (typeof target[key] === 'undefined') {
26 target[key] = src[key];
27 return;
28 }
29 if (target[key] && !src[key]) {
30 return;
31 }
32 if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {
33 if (src[key].__swiper__)
34 target[key] = src[key];
35 else
36 extend(target[key], src[key]);
37 }
38 else {
39 target[key] = src[key];
40 }
41 });
42}
43function coerceBooleanProperty(value) {
44 return value != null && `${value}` !== 'false';
45}
46const ignoreNgOnChanges = ['pagination', 'navigation', 'scrollbar', 'virtual'];
47function setProperty(val, obj = {}) {
48 if (isObject(val)) {
49 return val;
50 }
51 if (coerceBooleanProperty(val) === true) {
52 return obj;
53 }
54 return false;
55}
56
57/* underscore in name -> watch for changes */
58const paramsList = [
59 'init',
60 'enabled',
61 '_direction',
62 'touchEventsTarget',
63 'initialSlide',
64 '_speed',
65 'cssMode',
66 'updateOnWindowResize',
67 'resizeObserver',
68 'nested',
69 'focusableElements',
70 '_width',
71 '_height',
72 'preventInteractionOnTransition',
73 'userAgent',
74 'url',
75 '_edgeSwipeDetection',
76 '_edgeSwipeThreshold',
77 '_freeMode',
78 '_autoHeight',
79 'setWrapperSize',
80 'virtualTranslate',
81 '_effect',
82 'breakpoints',
83 '_spaceBetween',
84 '_slidesPerView',
85 '_grid',
86 '_slidesPerGroup',
87 '_slidesPerGroupSkip',
88 '_centeredSlides',
89 '_centeredSlidesBounds',
90 '_slidesOffsetBefore',
91 '_slidesOffsetAfter',
92 'normalizeSlideIndex',
93 '_centerInsufficientSlides',
94 '_watchOverflow',
95 'roundLengths',
96 'touchRatio',
97 'touchAngle',
98 'simulateTouch',
99 '_shortSwipes',
100 '_longSwipes',
101 'longSwipesRatio',
102 'longSwipesMs',
103 '_followFinger',
104 'allowTouchMove',
105 '_threshold',
106 'touchMoveStopPropagation',
107 'touchStartPreventDefault',
108 'touchStartForcePreventDefault',
109 'touchReleaseOnEdges',
110 'uniqueNavElements',
111 '_resistance',
112 '_resistanceRatio',
113 '_watchSlidesProgress',
114 '_grabCursor',
115 'preventClicks',
116 'preventClicksPropagation',
117 '_slideToClickedSlide',
118 '_preloadImages',
119 'updateOnImagesReady',
120 '_loop',
121 '_loopAdditionalSlides',
122 '_loopedSlides',
123 '_loopFillGroupWithBlank',
124 'loopPreventsSlide',
125 '_allowSlidePrev',
126 '_allowSlideNext',
127 '_swipeHandler',
128 '_noSwiping',
129 'noSwipingClass',
130 'noSwipingSelector',
131 'passiveListeners',
132 'containerModifierClass',
133 'slideClass',
134 'slideBlankClass',
135 'slideActiveClass',
136 'slideDuplicateActiveClass',
137 'slideVisibleClass',
138 'slideDuplicateClass',
139 'slideNextClass',
140 'slideDuplicateNextClass',
141 'slidePrevClass',
142 'slideDuplicatePrevClass',
143 'wrapperClass',
144 'runCallbacksOnInit',
145 'observer',
146 'observeParents',
147 'observeSlideChildren',
148 // modules
149 'a11y',
150 'autoplay',
151 '_controller',
152 'coverflowEffect',
153 'cubeEffect',
154 'fadeEffect',
155 'flipEffect',
156 'creativeEffect',
157 'cardsEffect',
158 'hashNavigation',
159 'history',
160 'keyboard',
161 'lazy',
162 'mousewheel',
163 '_navigation',
164 '_pagination',
165 'parallax',
166 '_scrollbar',
167 '_thumbs',
168 'virtual',
169 'zoom',
170];
171
172// eslint-disable-next-line
173const allowedParams = paramsList.map((key) => key.replace(/_/, ''));
174function getParams(obj = {}) {
175 const params = {
176 on: {},
177 };
178 const passedParams = {};
179 extend(params, Swiper.defaults);
180 extend(params, Swiper.extendedDefaults);
181 params._emitClasses = true;
182 const rest = {};
183 Object.keys(obj).forEach((key) => {
184 const _key = key.replace(/^_/, '');
185 if (typeof obj[_key] === 'undefined')
186 return;
187 if (allowedParams.indexOf(_key) >= 0) {
188 if (isObject(obj[_key])) {
189 params[_key] = {};
190 passedParams[_key] = {};
191 extend(params[_key], obj[_key]);
192 extend(passedParams[_key], obj[_key]);
193 }
194 else {
195 params[_key] = obj[_key];
196 passedParams[_key] = obj[_key];
197 }
198 }
199 else {
200 rest[_key] = obj[_key];
201 }
202 });
203 return { params, passedParams, rest };
204}
205
206class SwiperSlideDirective {
207 constructor(template) {
208 this.template = template;
209 this.class = '';
210 this.autoplayDelay = null;
211 this.slideData = {
212 isActive: false,
213 isPrev: false,
214 isNext: false,
215 isVisible: false,
216 isDuplicate: false,
217 };
218 }
219 set zoom(val) {
220 this._zoom = coerceBooleanProperty(val);
221 }
222 get zoom() {
223 return this._zoom;
224 }
225 get classNames() {
226 return this._classNames;
227 }
228 set classNames(val) {
229 if (this._classNames === val) {
230 return;
231 }
232 this._classNames = val;
233 this.slideData = {
234 isActive: this._hasClass(['swiper-slide-active', 'swiper-slide-duplicate-active']),
235 isVisible: this._hasClass(['swiper-slide-visible']),
236 isDuplicate: this._hasClass(['swiper-slide-duplicate']),
237 isPrev: this._hasClass(['swiper-slide-prev', 'swiper-slide-duplicate-prev']),
238 isNext: this._hasClass(['swiper-slide-next', 'swiper-slide-duplicate-next']),
239 };
240 }
241 _hasClass(classNames) {
242 return classNames.some((className) => this._classNames.indexOf(className) >= 0);
243 }
244}
245SwiperSlideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0, type: SwiperSlideDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
246SwiperSlideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.2", type: SwiperSlideDirective, selector: "ng-template[swiperSlide]", inputs: { virtualIndex: "virtualIndex", class: "class", autoplayDelay: ["data-swiper-autoplay", "autoplayDelay"], zoom: "zoom" }, ngImport: i0 });
247i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0, type: SwiperSlideDirective, decorators: [{
248 type: Directive,
249 args: [{
250 selector: 'ng-template[swiperSlide]',
251 }]
252 }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { virtualIndex: [{
253 type: Input
254 }], class: [{
255 type: Input
256 }], autoplayDelay: [{
257 type: Input,
258 args: ['data-swiper-autoplay']
259 }], zoom: [{
260 type: Input
261 }] } });
262
263class SwiperComponent {
264 constructor(_ngZone, elementRef, _changeDetectorRef, _platformId) {
265 this._ngZone = _ngZone;
266 this.elementRef = elementRef;
267 this._changeDetectorRef = _changeDetectorRef;
268 this._platformId = _platformId;
269 this.slideClass = 'swiper-slide';
270 this.wrapperClass = 'swiper-wrapper';
271 this.showNavigation = true;
272 this.showPagination = true;
273 this.showScrollbar = true;
274 // prettier-ignore
275 this.s__beforeBreakpoint = new EventEmitter();
276 // prettier-ignore
277 this.s__containerClasses = new EventEmitter();
278 // prettier-ignore
279 this.s__slideClass = new EventEmitter();
280 // prettier-ignore
281 this.s__swiper = new EventEmitter();
282 // prettier-ignore
283 this.s_activeIndexChange = new EventEmitter();
284 // prettier-ignore
285 this.s_afterInit = new EventEmitter();
286 // prettier-ignore
287 this.s_autoplay = new EventEmitter();
288 // prettier-ignore
289 this.s_autoplayStart = new EventEmitter();
290 // prettier-ignore
291 this.s_autoplayStop = new EventEmitter();
292 // prettier-ignore
293 this.s_beforeDestroy = new EventEmitter();
294 // prettier-ignore
295 this.s_beforeInit = new EventEmitter();
296 // prettier-ignore
297 this.s_beforeLoopFix = new EventEmitter();
298 // prettier-ignore
299 this.s_beforeResize = new EventEmitter();
300 // prettier-ignore
301 this.s_beforeSlideChangeStart = new EventEmitter();
302 // prettier-ignore
303 this.s_beforeTransitionStart = new EventEmitter();
304 // prettier-ignore
305 this.s_breakpoint = new EventEmitter();
306 // prettier-ignore
307 this.s_changeDirection = new EventEmitter();
308 // prettier-ignore
309 this.s_click = new EventEmitter();
310 // prettier-ignore
311 this.s_doubleTap = new EventEmitter();
312 // prettier-ignore
313 this.s_doubleClick = new EventEmitter();
314 // prettier-ignore
315 this.s_destroy = new EventEmitter();
316 // prettier-ignore
317 this.s_fromEdge = new EventEmitter();
318 // prettier-ignore
319 this.s_hashChange = new EventEmitter();
320 // prettier-ignore
321 this.s_hashSet = new EventEmitter();
322 // prettier-ignore
323 this.s_imagesReady = new EventEmitter();
324 // prettier-ignore
325 this.s_init = new EventEmitter();
326 // prettier-ignore
327 this.s_keyPress = new EventEmitter();
328 // prettier-ignore
329 this.s_lazyImageLoad = new EventEmitter();
330 // prettier-ignore
331 this.s_lazyImageReady = new EventEmitter();
332 // prettier-ignore
333 this.s_loopFix = new EventEmitter();
334 // prettier-ignore
335 this.s_momentumBounce = new EventEmitter();
336 // prettier-ignore
337 this.s_navigationHide = new EventEmitter();
338 // prettier-ignore
339 this.s_navigationShow = new EventEmitter();
340 // prettier-ignore
341 this.s_observerUpdate = new EventEmitter();
342 // prettier-ignore
343 this.s_orientationchange = new EventEmitter();
344 // prettier-ignore
345 this.s_paginationHide = new EventEmitter();
346 // prettier-ignore
347 this.s_paginationRender = new EventEmitter();
348 // prettier-ignore
349 this.s_paginationShow = new EventEmitter();
350 // prettier-ignore
351 this.s_paginationUpdate = new EventEmitter();
352 // prettier-ignore
353 this.s_progress = new EventEmitter();
354 // prettier-ignore
355 this.s_reachBeginning = new EventEmitter();
356 // prettier-ignore
357 this.s_reachEnd = new EventEmitter();
358 // prettier-ignore
359 this.s_realIndexChange = new EventEmitter();
360 // prettier-ignore
361 this.s_resize = new EventEmitter();
362 // prettier-ignore
363 this.s_scroll = new EventEmitter();
364 // prettier-ignore
365 this.s_scrollbarDragEnd = new EventEmitter();
366 // prettier-ignore
367 this.s_scrollbarDragMove = new EventEmitter();
368 // prettier-ignore
369 this.s_scrollbarDragStart = new EventEmitter();
370 // prettier-ignore
371 this.s_setTransition = new EventEmitter();
372 // prettier-ignore
373 this.s_setTranslate = new EventEmitter();
374 // prettier-ignore
375 this.s_slideChange = new EventEmitter();
376 // prettier-ignore
377 this.s_slideChangeTransitionEnd = new EventEmitter();
378 // prettier-ignore
379 this.s_slideChangeTransitionStart = new EventEmitter();
380 // prettier-ignore
381 this.s_slideNextTransitionEnd = new EventEmitter();
382 // prettier-ignore
383 this.s_slideNextTransitionStart = new EventEmitter();
384 // prettier-ignore
385 this.s_slidePrevTransitionEnd = new EventEmitter();
386 // prettier-ignore
387 this.s_slidePrevTransitionStart = new EventEmitter();
388 // prettier-ignore
389 this.s_slideResetTransitionStart = new EventEmitter();
390 // prettier-ignore
391 this.s_slideResetTransitionEnd = new EventEmitter();
392 // prettier-ignore
393 this.s_sliderMove = new EventEmitter();
394 // prettier-ignore
395 this.s_sliderFirstMove = new EventEmitter();
396 // prettier-ignore
397 this.s_slidesLengthChange = new EventEmitter();
398 // prettier-ignore
399 this.s_slidesGridLengthChange = new EventEmitter();
400 // prettier-ignore
401 this.s_snapGridLengthChange = new EventEmitter();
402 // prettier-ignore
403 this.s_snapIndexChange = new EventEmitter();
404 // prettier-ignore
405 this.s_tap = new EventEmitter();
406 // prettier-ignore
407 this.s_toEdge = new EventEmitter();
408 // prettier-ignore
409 this.s_touchEnd = new EventEmitter();
410 // prettier-ignore
411 this.s_touchMove = new EventEmitter();
412 // prettier-ignore
413 this.s_touchMoveOpposite = new EventEmitter();
414 // prettier-ignore
415 this.s_touchStart = new EventEmitter();
416 // prettier-ignore
417 this.s_transitionEnd = new EventEmitter();
418 // prettier-ignore
419 this.s_transitionStart = new EventEmitter();
420 // prettier-ignore
421 this.s_update = new EventEmitter();
422 // prettier-ignore
423 this.s_zoomChange = new EventEmitter();
424 // prettier-ignore
425 this.s_swiper = new EventEmitter();
426 this.indexChange = new EventEmitter();
427 this._activeSlides = new Subject();
428 this.containerClasses = 'swiper';
429 this.slidesChanges = (val) => {
430 this.slides = val.map((slide, index) => {
431 slide.slideIndex = index;
432 slide.classNames = this.slideClass || '';
433 return slide;
434 });
435 if (this.loop && !this.loopedSlides) {
436 this.calcLoopedSlides();
437 }
438 if (!this.virtual) {
439 if (this.loopedSlides) {
440 this.prependSlides = of(this.slides.slice(this.slides.length - this.loopedSlides));
441 this.appendSlides = of(this.slides.slice(0, this.loopedSlides));
442 }
443 }
444 else if (this.swiperRef && this.swiperRef.virtual) {
445 this._ngZone.runOutsideAngular(() => {
446 this.swiperRef.virtual.slides = this.slides;
447 this.swiperRef.virtual.update(true);
448 });
449 }
450 this._changeDetectorRef.detectChanges();
451 };
452 this.style = null;
453 this.updateVirtualSlides = (virtualData) => {
454 // TODO: type virtualData
455 if (!this.swiperRef ||
456 (this.currentVirtualData &&
457 this.currentVirtualData.from === virtualData.from &&
458 this.currentVirtualData.to === virtualData.to &&
459 this.currentVirtualData.offset === virtualData.offset)) {
460 return;
461 }
462 this.style = this.swiperRef.isHorizontal()
463 ? {
464 [this.swiperRef.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`,
465 }
466 : {
467 top: `${virtualData.offset}px`,
468 };
469 this.currentVirtualData = virtualData;
470 this._activeSlides.next(virtualData.slides);
471 this._ngZone.run(() => {
472 this._changeDetectorRef.detectChanges();
473 });
474 this._ngZone.runOutsideAngular(() => {
475 this.swiperRef.updateSlides();
476 this.swiperRef.updateProgress();
477 this.swiperRef.updateSlidesClasses();
478 if (this.swiperRef.lazy && this.swiperRef.params.lazy['enabled']) {
479 this.swiperRef.lazy.load();
480 }
481 this.swiperRef.virtual.update(true);
482 });
483 return;
484 };
485 }
486 set navigation(val) {
487 var _a, _b, _c;
488 const currentNext = typeof this._navigation !== 'boolean' && this._navigation !== ''
489 ? (_a = this._navigation) === null || _a === void 0 ? void 0 : _a.nextEl
490 : null;
491 const currentPrev = typeof this._navigation !== 'boolean' && this._navigation !== ''
492 ? (_b = this._navigation) === null || _b === void 0 ? void 0 : _b.prevEl
493 : null;
494 this._navigation = setProperty(val, {
495 nextEl: currentNext || null,
496 prevEl: currentPrev || null,
497 });
498 this.showNavigation = !(coerceBooleanProperty(val) !== true ||
499 (this._navigation &&
500 typeof this._navigation !== 'boolean' &&
501 this._navigation.prevEl !== ((_c = this._prevElRef) === null || _c === void 0 ? void 0 : _c.nativeElement) &&
502 (this._navigation.prevEl !== null || this._navigation.nextEl !== null) &&
503 (typeof this._navigation.nextEl === 'string' ||
504 typeof this._navigation.prevEl === 'string' ||
505 typeof this._navigation.nextEl === 'object' ||
506 typeof this._navigation.prevEl === 'object')));
507 }
508 get navigation() {
509 return this._navigation;
510 }
511 set pagination(val) {
512 var _a;
513 const current = typeof this._pagination !== 'boolean' && this._pagination !== ''
514 ? (_a = this._pagination) === null || _a === void 0 ? void 0 : _a.el
515 : null;
516 this._pagination = setProperty(val, {
517 el: current || null,
518 });
519 this.showPagination = isShowEl(val, this._pagination, this._paginationElRef);
520 }
521 get pagination() {
522 return this._pagination;
523 }
524 set scrollbar(val) {
525 var _a;
526 const current = typeof this._scrollbar !== 'boolean' && this._scrollbar !== '' ? (_a = this._scrollbar) === null || _a === void 0 ? void 0 : _a.el : null;
527 this._scrollbar = setProperty(val, {
528 el: current || null,
529 });
530 this.showScrollbar = isShowEl(val, this._scrollbar, this._scrollbarElRef);
531 }
532 get scrollbar() {
533 return this._scrollbar;
534 }
535 set virtual(val) {
536 this._virtual = setProperty(val);
537 }
538 get virtual() {
539 return this._virtual;
540 }
541 set index(index) {
542 console.warn('`[(index)]` prop is deprecated and will be removed in upcoming versions');
543 this.setIndex(index);
544 }
545 set config(val) {
546 this.updateSwiper(val);
547 const { params } = getParams(val);
548 Object.assign(this, params);
549 }
550 set prevElRef(el) {
551 this._prevElRef = el;
552 this._setElement(el, this.navigation, 'navigation', 'prevEl');
553 }
554 set nextElRef(el) {
555 this._nextElRef = el;
556 this._setElement(el, this.navigation, 'navigation', 'nextEl');
557 }
558 set scrollbarElRef(el) {
559 this._scrollbarElRef = el;
560 this._setElement(el, this.scrollbar, 'scrollbar');
561 }
562 set paginationElRef(el) {
563 this._paginationElRef = el;
564 this._setElement(el, this.pagination, 'pagination');
565 }
566 get activeSlides() {
567 if (this.virtual) {
568 return this._activeSlides;
569 }
570 return of(this.slides);
571 }
572 get zoomContainerClass() {
573 return this.zoom && typeof this.zoom !== 'boolean'
574 ? this.zoom.containerClass
575 : 'swiper-zoom-container';
576 }
577 _setElement(el, ref, update, key = 'el') {
578 if (!el || !ref) {
579 return;
580 }
581 if (ref && el.nativeElement) {
582 if (ref[key] === el.nativeElement) {
583 return;
584 }
585 ref[key] = el.nativeElement;
586 }
587 const updateObj = {};
588 updateObj[update] = true;
589 this.updateInitSwiper(updateObj);
590 }
591 ngOnInit() {
592 const { params } = getParams(this);
593 Object.assign(this, params);
594 }
595 ngAfterViewInit() {
596 this.childrenSlidesInit();
597 this.initSwiper();
598 this._changeDetectorRef.detectChanges();
599 setTimeout(() => {
600 this.s_swiper.emit(this.swiperRef);
601 });
602 }
603 childrenSlidesInit() {
604 this.slidesChanges(this.slidesEl);
605 this.slidesEl.changes.subscribe(this.slidesChanges);
606 }
607 get isSwiperActive() {
608 return this.swiperRef && !this.swiperRef.destroyed;
609 }
610 initSwiper() {
611 const { params: swiperParams, passedParams } = getParams(this);
612 Object.assign(this, swiperParams);
613 this._ngZone.runOutsideAngular(() => {
614 swiperParams.init = false;
615 if (!swiperParams.virtual) {
616 swiperParams.observer = true;
617 }
618 swiperParams.onAny = (eventName, ...args) => {
619 const emitter = this[('s_' + eventName)];
620 if (emitter) {
621 emitter.emit(...args);
622 }
623 };
624 const _slideClasses = (_, updated) => {
625 updated.forEach(({ slideEl, classNames }, index) => {
626 const dataIndex = slideEl.getAttribute('data-swiper-slide-index');
627 const slideIndex = dataIndex ? parseInt(dataIndex) : index;
628 if (this.virtual) {
629 const virtualSlide = this.slides.find((item) => {
630 return item.virtualIndex && item.virtualIndex === slideIndex;
631 });
632 if (virtualSlide) {
633 virtualSlide.classNames = classNames;
634 return;
635 }
636 }
637 if (this.slides[slideIndex]) {
638 this.slides[slideIndex].classNames = classNames;
639 }
640 });
641 this._changeDetectorRef.detectChanges();
642 };
643 const _containerClasses = (_, classes) => {
644 setTimeout(() => {
645 this.containerClasses = classes;
646 });
647 };
648 Object.assign(swiperParams.on, {
649 _containerClasses,
650 _slideClasses,
651 });
652 const swiperRef = new Swiper(swiperParams);
653 swiperRef.loopCreate = () => { };
654 swiperRef.loopDestroy = () => { };
655 if (swiperParams.loop) {
656 swiperRef.loopedSlides = this.loopedSlides;
657 }
658 const isVirtualEnabled = typeof swiperRef.params.virtual !== 'undefined' &&
659 typeof swiperRef.params.virtual !== 'boolean' &&
660 swiperRef.params.virtual.enabled;
661 if (swiperRef.virtual && isVirtualEnabled) {
662 swiperRef.virtual.slides = this.slides;
663 const extendWith = {
664 cache: false,
665 slides: this.slides,
666 renderExternal: this.updateVirtualSlides,
667 renderExternalUpdate: false,
668 };
669 extend(swiperRef.params.virtual, extendWith);
670 extend(swiperRef.originalParams.virtual, extendWith);
671 }
672 if (isPlatformBrowser(this._platformId)) {
673 this.swiperRef = swiperRef.init(this.elementRef.nativeElement);
674 const isEnabled = typeof this.swiperRef.params.virtual !== 'undefined' &&
675 typeof this.swiperRef.params.virtual !== 'boolean' &&
676 this.swiperRef.params.virtual.enabled;
677 if (this.swiperRef.virtual && isEnabled) {
678 this.swiperRef.virtual.update(true);
679 }
680 this._changeDetectorRef.detectChanges();
681 swiperRef.on('slideChange', () => {
682 this.indexChange.emit(this.swiperRef.realIndex);
683 });
684 }
685 });
686 }
687 ngOnChanges(changedParams) {
688 this.updateSwiper(changedParams);
689 this._changeDetectorRef.detectChanges();
690 }
691 updateInitSwiper(changedParams) {
692 if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {
693 return;
694 }
695 this._ngZone.runOutsideAngular(() => {
696 const { params: currentParams, pagination, navigation, scrollbar, virtual, thumbs, } = this.swiperRef;
697 if (changedParams.pagination) {
698 if (this.pagination &&
699 typeof this.pagination !== 'boolean' &&
700 this.pagination.el &&
701 pagination &&
702 !pagination.el) {
703 this.updateParameter('pagination', this.pagination);
704 pagination.init();
705 pagination.render();
706 pagination.update();
707 }
708 else {
709 pagination.destroy();
710 pagination.el = null;
711 }
712 }
713 if (changedParams.scrollbar) {
714 if (this.scrollbar &&
715 typeof this.scrollbar !== 'boolean' &&
716 this.scrollbar.el &&
717 scrollbar &&
718 !scrollbar.el) {
719 this.updateParameter('scrollbar', this.scrollbar);
720 scrollbar.init();
721 scrollbar.updateSize();
722 scrollbar.setTranslate();
723 }
724 else {
725 scrollbar.destroy();
726 scrollbar.el = null;
727 }
728 }
729 if (changedParams.navigation) {
730 if (this.navigation &&
731 typeof this.navigation !== 'boolean' &&
732 this.navigation.prevEl &&
733 this.navigation.nextEl &&
734 navigation &&
735 !navigation.prevEl &&
736 !navigation.nextEl) {
737 this.updateParameter('navigation', this.navigation);
738 navigation.init();
739 navigation.update();
740 }
741 else if (navigation.prevEl && navigation.nextEl) {
742 navigation.destroy();
743 navigation.nextEl = null;
744 navigation.prevEl = null;
745 }
746 }
747 if (changedParams.thumbs && this.thumbs && this.thumbs.swiper) {
748 this.updateParameter('thumbs', this.thumbs);
749 const initialized = thumbs.init();
750 if (initialized)
751 thumbs.update(true);
752 }
753 if (changedParams.controller && this.controller && this.controller.control) {
754 this.swiperRef.controller.control = this.controller.control;
755 }
756 this.swiperRef.update();
757 });
758 }
759 updateSwiper(changedParams) {
760 this._ngZone.runOutsideAngular(() => {
761 var _a, _b;
762 if (changedParams.config) {
763 return;
764 }
765 if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {
766 return;
767 }
768 for (const key in changedParams) {
769 if (ignoreNgOnChanges.indexOf(key) >= 0) {
770 continue;
771 }
772 const newValue = (_b = (_a = changedParams[key]) === null || _a === void 0 ? void 0 : _a.currentValue) !== null && _b !== void 0 ? _b : changedParams[key];
773 this.updateParameter(key, newValue);
774 }
775 if (changedParams.allowSlideNext) {
776 this.swiperRef.allowSlideNext = this.allowSlideNext;
777 }
778 if (changedParams.allowSlidePrev) {
779 this.swiperRef.allowSlidePrev = this.allowSlidePrev;
780 }
781 if (changedParams.direction) {
782 this.swiperRef.changeDirection(this.direction, false);
783 }
784 if (changedParams.breakpoints) {
785 if (this.loop && !this.loopedSlides) {
786 this.calcLoopedSlides();
787 }
788 this.swiperRef.currentBreakpoint = null;
789 this.swiperRef.setBreakpoint();
790 }
791 if (changedParams.thumbs || changedParams.controller) {
792 this.updateInitSwiper(changedParams);
793 }
794 this.swiperRef.update();
795 });
796 }
797 calcLoopedSlides() {
798 if (!this.loop) {
799 return;
800 }
801 let slidesPerViewParams = this.slidesPerView;
802 if (this.breakpoints) {
803 const breakpoint = Swiper.prototype.getBreakpoint(this.breakpoints);
804 const breakpointOnlyParams = breakpoint in this.breakpoints ? this.breakpoints[breakpoint] : undefined;
805 if (breakpointOnlyParams && breakpointOnlyParams.slidesPerView) {
806 slidesPerViewParams = breakpointOnlyParams.slidesPerView;
807 }
808 }
809 if (slidesPerViewParams === 'auto') {
810 this.loopedSlides = this.slides.length;
811 return this.slides.length;
812 }
813 let loopedSlides = this.loopedSlides || slidesPerViewParams;
814 if (!loopedSlides) {
815 // ?
816 return;
817 }
818 if (this.loopAdditionalSlides) {
819 loopedSlides += this.loopAdditionalSlides;
820 }
821 if (loopedSlides > this.slides.length) {
822 loopedSlides = this.slides.length;
823 }
824 this.loopedSlides = loopedSlides;
825 return loopedSlides;
826 }
827 updateParameter(key, value) {
828 if (!(this.swiperRef && !this.swiperRef.destroyed)) {
829 return;
830 }
831 const _key = key.replace(/^_/, '');
832 const isCurrentParamObj = isObject(this.swiperRef.params[_key]);
833 if (Object.keys(this.swiperRef.modules).indexOf(_key) >= 0) {
834 const defaultParams = this.swiperRef.modules[_key].params[_key];
835 if (isCurrentParamObj) {
836 extend(this.swiperRef.params[_key], defaultParams);
837 }
838 else {
839 this.swiperRef.params[_key] = defaultParams;
840 }
841 }
842 if (_key === 'enabled') {
843 if (value === true) {
844 this.swiperRef.enable();
845 }
846 else if (value === false) {
847 this.swiperRef.disable();
848 }
849 return;
850 }
851 if (isCurrentParamObj && isObject(value)) {
852 extend(this.swiperRef.params[_key], value);
853 }
854 else {
855 this.swiperRef.params[_key] = value;
856 }
857 }
858 /**
859 * @deprecated will be removed in upcoming versions
860 */
861 setIndex(index, speed, silent) {
862 if (!this.isSwiperActive) {
863 this.initialSlide = index;
864 return;
865 }
866 if (index === this.swiperRef.activeIndex) {
867 return;
868 }
869 this._ngZone.runOutsideAngular(() => {
870 if (this.loop) {
871 this.swiperRef.slideToLoop(index, speed, !silent);
872 }
873 else {
874 this.swiperRef.slideTo(index, speed, !silent);
875 }
876 });
877 }
878 ngOnDestroy() {
879 this._ngZone.runOutsideAngular(() => {
880 var _a;
881 (_a = this.swiperRef) === null || _a === void 0 ? void 0 : _a.destroy(true, false);
882 });
883 }
884}
885SwiperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0, type: SwiperComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
886SwiperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.2", type: SwiperComponent, selector: "swiper, [swiper]", inputs: { enabled: "enabled", direction: "direction", touchEventsTarget: "touchEventsTarget", initialSlide: "initialSlide", speed: "speed", cssMode: "cssMode", updateOnWindowResize: "updateOnWindowResize", resizeObserver: "resizeObserver", nested: "nested", focusableElements: "focusableElements", width: "width", height: "height", preventInteractionOnTransition: "preventInteractionOnTransition", userAgent: "userAgent", url: "url", edgeSwipeDetection: "edgeSwipeDetection", edgeSwipeThreshold: "edgeSwipeThreshold", freeMode: "freeMode", autoHeight: "autoHeight", setWrapperSize: "setWrapperSize", virtualTranslate: "virtualTranslate", effect: "effect", breakpoints: "breakpoints", spaceBetween: "spaceBetween", slidesPerView: "slidesPerView", grid: "grid", slidesPerGroup: "slidesPerGroup", slidesPerGroupSkip: "slidesPerGroupSkip", centeredSlides: "centeredSlides", centeredSlidesBounds: "centeredSlidesBounds", slidesOffsetBefore: "slidesOffsetBefore", slidesOffsetAfter: "slidesOffsetAfter", normalizeSlideIndex: "normalizeSlideIndex", centerInsufficientSlides: "centerInsufficientSlides", watchOverflow: "watchOverflow", roundLengths: "roundLengths", touchRatio: "touchRatio", touchAngle: "touchAngle", simulateTouch: "simulateTouch", shortSwipes: "shortSwipes", longSwipes: "longSwipes", longSwipesRatio: "longSwipesRatio", longSwipesMs: "longSwipesMs", followFinger: "followFinger", allowTouchMove: "allowTouchMove", threshold: "threshold", touchMoveStopPropagation: "touchMoveStopPropagation", touchStartPreventDefault: "touchStartPreventDefault", touchStartForcePreventDefault: "touchStartForcePreventDefault", touchReleaseOnEdges: "touchReleaseOnEdges", uniqueNavElements: "uniqueNavElements", resistance: "resistance", resistanceRatio: "resistanceRatio", watchSlidesProgress: "watchSlidesProgress", grabCursor: "grabCursor", preventClicks: "preventClicks", preventClicksPropagation: "preventClicksPropagation", slideToClickedSlide: "slideToClickedSlide", preloadImages: "preloadImages", updateOnImagesReady: "updateOnImagesReady", loop: "loop", loopAdditionalSlides: "loopAdditionalSlides", loopedSlides: "loopedSlides", loopFillGroupWithBlank: "loopFillGroupWithBlank", loopPreventsSlide: "loopPreventsSlide", allowSlidePrev: "allowSlidePrev", allowSlideNext: "allowSlideNext", swipeHandler: "swipeHandler", noSwiping: "noSwiping", noSwipingClass: "noSwipingClass", noSwipingSelector: "noSwipingSelector", passiveListeners: "passiveListeners", containerModifierClass: "containerModifierClass", slideClass: "slideClass", slideBlankClass: "slideBlankClass", slideActiveClass: "slideActiveClass", slideDuplicateActiveClass: "slideDuplicateActiveClass", slideVisibleClass: "slideVisibleClass", slideDuplicateClass: "slideDuplicateClass", slideNextClass: "slideNextClass", slideDuplicateNextClass: "slideDuplicateNextClass", slidePrevClass: "slidePrevClass", slideDuplicatePrevClass: "slideDuplicatePrevClass", wrapperClass: "wrapperClass", runCallbacksOnInit: "runCallbacksOnInit", observeParents: "observeParents", observeSlideChildren: "observeSlideChildren", a11y: "a11y", autoplay: "autoplay", controller: "controller", coverflowEffect: "coverflowEffect", cubeEffect: "cubeEffect", fadeEffect: "fadeEffect", flipEffect: "flipEffect", creativeEffect: "creativeEffect", cardsEffect: "cardsEffect", hashNavigation: "hashNavigation", history: "history", keyboard: "keyboard", lazy: "lazy", mousewheel: "mousewheel", parallax: "parallax", thumbs: "thumbs", zoom: "zoom", class: "class", id: "id", navigation: "navigation", pagination: "pagination", scrollbar: "scrollbar", virtual: "virtual", index: "index", config: "config" }, outputs: { s__beforeBreakpoint: "_beforeBreakpoint", s__containerClasses: "_containerClasses", s__slideClass: "_slideClass", s__swiper: "_swiper", s_activeIndexChange: "activeIndexChange", s_afterInit: "afterInit", s_autoplay: "autoplay", s_autoplayStart: "autoplayStart", s_autoplayStop: "autoplayStop", s_beforeDestroy: "beforeDestroy", s_beforeInit: "beforeInit", s_beforeLoopFix: "beforeLoopFix", s_beforeResize: "beforeResize", s_beforeSlideChangeStart: "beforeSlideChangeStart", s_beforeTransitionStart: "beforeTransitionStart", s_breakpoint: "breakpoint", s_changeDirection: "changeDirection", s_click: "click", s_doubleTap: "doubleTap", s_doubleClick: "doubleClick", s_destroy: "destroy", s_fromEdge: "fromEdge", s_hashChange: "hashChange", s_hashSet: "hashSet", s_imagesReady: "imagesReady", s_init: "init", s_keyPress: "keyPress", s_lazyImageLoad: "lazyImageLoad", s_lazyImageReady: "lazyImageReady", s_loopFix: "loopFix", s_momentumBounce: "momentumBounce", s_navigationHide: "navigationHide", s_navigationShow: "navigationShow", s_observerUpdate: "observerUpdate", s_orientationchange: "orientationchange", s_paginationHide: "paginationHide", s_paginationRender: "paginationRender", s_paginationShow: "paginationShow", s_paginationUpdate: "paginationUpdate", s_progress: "progress", s_reachBeginning: "reachBeginning", s_reachEnd: "reachEnd", s_realIndexChange: "realIndexChange", s_resize: "resize", s_scroll: "scroll", s_scrollbarDragEnd: "scrollbarDragEnd", s_scrollbarDragMove: "scrollbarDragMove", s_scrollbarDragStart: "scrollbarDragStart", s_setTransition: "setTransition", s_setTranslate: "setTranslate", s_slideChange: "slideChange", s_slideChangeTransitionEnd: "slideChangeTransitionEnd", s_slideChangeTransitionStart: "slideChangeTransitionStart", s_slideNextTransitionEnd: "slideNextTransitionEnd", s_slideNextTransitionStart: "slideNextTransitionStart", s_slidePrevTransitionEnd: "slidePrevTransitionEnd", s_slidePrevTransitionStart: "slidePrevTransitionStart", s_slideResetTransitionStart: "slideResetTransitionStart", s_slideResetTransitionEnd: "slideResetTransitionEnd", s_sliderMove: "sliderMove", s_sliderFirstMove: "sliderFirstMove", s_slidesLengthChange: "slidesLengthChange", s_slidesGridLengthChange: "slidesGridLengthChange", s_snapGridLengthChange: "snapGridLengthChange", s_snapIndexChange: "snapIndexChange", s_tap: "tap", s_toEdge: "toEdge", s_touchEnd: "touchEnd", s_touchMove: "touchMove", s_touchMoveOpposite: "touchMoveOpposite", s_touchStart: "touchStart", s_transitionEnd: "transitionEnd", s_transitionStart: "transitionStart", s_update: "update", s_zoomChange: "zoomChange", s_swiper: "swiper", indexChange: "indexChange" }, host: { properties: { "class": "this.containerClasses" } }, queries: [{ propertyName: "slidesEl", predicate: SwiperSlideDirective }], viewQueries: [{ propertyName: "prevElRef", first: true, predicate: ["prevElRef"], descendants: true }, { propertyName: "nextElRef", first: true, predicate: ["nextElRef"], descendants: true }, { propertyName: "scrollbarElRef", first: true, predicate: ["scrollbarElRef"], descendants: true }, { propertyName: "paginationElRef", first: true, predicate: ["paginationElRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-content select=\"[slot=container-start]\"></ng-content>\n<ng-container *ngIf=\"navigation && showNavigation\">\n <div class=\"swiper-button-prev\" #prevElRef></div>\n <div class=\"swiper-button-next\" #nextElRef></div>\n</ng-container>\n<div *ngIf=\"scrollbar && showScrollbar\" class=\"swiper-scrollbar\" #scrollbarElRef></div>\n<div *ngIf=\"pagination && showPagination\" class=\"swiper-pagination\" #paginationElRef></div>\n<div [ngClass]=\"wrapperClass\" [attr.id]=\"id\">\n <ng-content select=\"[slot=wrapper-start]\"></ng-content>\n <ng-template\n *ngTemplateOutlet=\"\n slidesTemplate;\n context: {\n loopSlides: prependSlides,\n key: 'prepend'\n }\n \"\n ></ng-template>\n <ng-template\n *ngTemplateOutlet=\"\n slidesTemplate;\n context: {\n loopSlides: activeSlides,\n key: ''\n }\n \"\n ></ng-template>\n <ng-template\n *ngTemplateOutlet=\"\n slidesTemplate;\n context: {\n loopSlides: appendSlides,\n key: 'append'\n }\n \"\n ></ng-template>\n <ng-content select=\"[slot=wrapper-end]\"></ng-content>\n</div>\n<ng-content select=\"[slot=container-end]\"></ng-content>\n\n<ng-template #slidesTemplate let-loopSlides=\"loopSlides\" let-slideKey=\"key\">\n <div\n *ngFor=\"let slide of loopSlides | async\"\n [ngClass]=\"\n (slide.class ? slide.class + ' ' : '') +\n slideClass +\n (slideKey !== '' ? ' ' + slideDuplicateClass : '')\n \"\n [attr.data-swiper-slide-index]=\"slide.virtualIndex ? slide.virtualIndex : slide.slideIndex\"\n [attr.data-swiper-autoplay]=\"slide.autoplayDelay\"\n [style]=\"style\"\n [ngSwitch]=\"slide.zoom\"\n >\n <div *ngSwitchCase=\"true\" [ngClass]=\"zoomContainerClass\">\n <ng-template\n [ngTemplateOutlet]=\"slide.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: slide.slideData\n }\"\n ></ng-template>\n </div>\n <ng-container *ngSwitchDefault>\n <ng-template\n [ngTemplateOutlet]=\"slide.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: slide.slideData\n }\"\n ></ng-template>\n </ng-container>\n </div>\n</ng-template>\n", styles: ["\n swiper {\n display: block;\n }\n "], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "async": i1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
887i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0, type: SwiperComponent, decorators: [{
888 type: Component,
889 args: [{
890 selector: 'swiper, [swiper]',
891 templateUrl: './swiper.component.html',
892 changeDetection: ChangeDetectionStrategy.OnPush,
893 encapsulation: ViewEncapsulation.None,
894 styles: [
895 `
896 swiper {
897 display: block;
898 }
899 `,
900 ],
901 }]
902 }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: Object, decorators: [{
903 type: Inject,
904 args: [PLATFORM_ID]
905 }] }]; }, propDecorators: { enabled: [{
906 type: Input
907 }], direction: [{
908 type: Input
909 }], touchEventsTarget: [{
910 type: Input
911 }], initialSlide: [{
912 type: Input
913 }], speed: [{
914 type: Input
915 }], cssMode: [{
916 type: Input
917 }], updateOnWindowResize: [{
918 type: Input
919 }], resizeObserver: [{
920 type: Input
921 }], nested: [{
922 type: Input
923 }], focusableElements: [{
924 type: Input
925 }], width: [{
926 type: Input
927 }], height: [{
928 type: Input
929 }], preventInteractionOnTransition: [{
930 type: Input
931 }], userAgent: [{
932 type: Input
933 }], url: [{
934 type: Input
935 }], edgeSwipeDetection: [{
936 type: Input
937 }], edgeSwipeThreshold: [{
938 type: Input
939 }], freeMode: [{
940 type: Input
941 }], autoHeight: [{
942 type: Input
943 }], setWrapperSize: [{
944 type: Input
945 }], virtualTranslate: [{
946 type: Input
947 }], effect: [{
948 type: Input
949 }], breakpoints: [{
950 type: Input
951 }], spaceBetween: [{
952 type: Input
953 }], slidesPerView: [{
954 type: Input
955 }], grid: [{
956 type: Input
957 }], slidesPerGroup: [{
958 type: Input
959 }], slidesPerGroupSkip: [{
960 type: Input
961 }], centeredSlides: [{
962 type: Input
963 }], centeredSlidesBounds: [{
964 type: Input
965 }], slidesOffsetBefore: [{
966 type: Input
967 }], slidesOffsetAfter: [{
968 type: Input
969 }], normalizeSlideIndex: [{
970 type: Input
971 }], centerInsufficientSlides: [{
972 type: Input
973 }], watchOverflow: [{
974 type: Input
975 }], roundLengths: [{
976 type: Input
977 }], touchRatio: [{
978 type: Input
979 }], touchAngle: [{
980 type: Input
981 }], simulateTouch: [{
982 type: Input
983 }], shortSwipes: [{
984 type: Input
985 }], longSwipes: [{
986 type: Input
987 }], longSwipesRatio: [{
988 type: Input
989 }], longSwipesMs: [{
990 type: Input
991 }], followFinger: [{
992 type: Input
993 }], allowTouchMove: [{
994 type: Input
995 }], threshold: [{
996 type: Input
997 }], touchMoveStopPropagation: [{
998 type: Input
999 }], touchStartPreventDefault: [{
1000 type: Input
1001 }], touchStartForcePreventDefault: [{
1002 type: Input
1003 }], touchReleaseOnEdges: [{
1004 type: Input
1005 }], uniqueNavElements: [{
1006 type: Input
1007 }], resistance: [{
1008 type: Input
1009 }], resistanceRatio: [{
1010 type: Input
1011 }], watchSlidesProgress: [{
1012 type: Input
1013 }], grabCursor: [{
1014 type: Input
1015 }], preventClicks: [{
1016 type: Input
1017 }], preventClicksPropagation: [{
1018 type: Input
1019 }], slideToClickedSlide: [{
1020 type: Input
1021 }], preloadImages: [{
1022 type: Input
1023 }], updateOnImagesReady: [{
1024 type: Input
1025 }], loop: [{
1026 type: Input
1027 }], loopAdditionalSlides: [{
1028 type: Input
1029 }], loopedSlides: [{
1030 type: Input
1031 }], loopFillGroupWithBlank: [{
1032 type: Input
1033 }], loopPreventsSlide: [{
1034 type: Input
1035 }], allowSlidePrev: [{
1036 type: Input
1037 }], allowSlideNext: [{
1038 type: Input
1039 }], swipeHandler: [{
1040 type: Input
1041 }], noSwiping: [{
1042 type: Input
1043 }], noSwipingClass: [{
1044 type: Input
1045 }], noSwipingSelector: [{
1046 type: Input
1047 }], passiveListeners: [{
1048 type: Input
1049 }], containerModifierClass: [{
1050 type: Input
1051 }], slideClass: [{
1052 type: Input
1053 }], slideBlankClass: [{
1054 type: Input
1055 }], slideActiveClass: [{
1056 type: Input
1057 }], slideDuplicateActiveClass: [{
1058 type: Input
1059 }], slideVisibleClass: [{
1060 type: Input
1061 }], slideDuplicateClass: [{
1062 type: Input
1063 }], slideNextClass: [{
1064 type: Input
1065 }], slideDuplicateNextClass: [{
1066 type: Input
1067 }], slidePrevClass: [{
1068 type: Input
1069 }], slideDuplicatePrevClass: [{
1070 type: Input
1071 }], wrapperClass: [{
1072 type: Input
1073 }], runCallbacksOnInit: [{
1074 type: Input
1075 }], observeParents: [{
1076 type: Input
1077 }], observeSlideChildren: [{
1078 type: Input
1079 }], a11y: [{
1080 type: Input
1081 }], autoplay: [{
1082 type: Input
1083 }], controller: [{
1084 type: Input
1085 }], coverflowEffect: [{
1086 type: Input
1087 }], cubeEffect: [{
1088 type: Input
1089 }], fadeEffect: [{
1090 type: Input
1091 }], flipEffect: [{
1092 type: Input
1093 }], creativeEffect: [{
1094 type: Input
1095 }], cardsEffect: [{
1096 type: Input
1097 }], hashNavigation: [{
1098 type: Input
1099 }], history: [{
1100 type: Input
1101 }], keyboard: [{
1102 type: Input
1103 }], lazy: [{
1104 type: Input
1105 }], mousewheel: [{
1106 type: Input
1107 }], parallax: [{
1108 type: Input
1109 }], thumbs: [{
1110 type: Input
1111 }], zoom: [{
1112 type: Input
1113 }], class: [{
1114 type: Input
1115 }], id: [{
1116 type: Input
1117 }], navigation: [{
1118 type: Input
1119 }], pagination: [{
1120 type: Input
1121 }], scrollbar: [{
1122 type: Input
1123 }], virtual: [{
1124 type: Input
1125 }], index: [{
1126 type: Input
1127 }], config: [{
1128 type: Input
1129 }], s__beforeBreakpoint: [{
1130 type: Output,
1131 args: ['_beforeBreakpoint']
1132 }], s__containerClasses: [{
1133 type: Output,
1134 args: ['_containerClasses']
1135 }], s__slideClass: [{
1136 type: Output,
1137 args: ['_slideClass']
1138 }], s__swiper: [{
1139 type: Output,
1140 args: ['_swiper']
1141 }], s_activeIndexChange: [{
1142 type: Output,
1143 args: ['activeIndexChange']
1144 }], s_afterInit: [{
1145 type: Output,
1146 args: ['afterInit']
1147 }], s_autoplay: [{
1148 type: Output,
1149 args: ['autoplay']
1150 }], s_autoplayStart: [{
1151 type: Output,
1152 args: ['autoplayStart']
1153 }], s_autoplayStop: [{
1154 type: Output,
1155 args: ['autoplayStop']
1156 }], s_beforeDestroy: [{
1157 type: Output,
1158 args: ['beforeDestroy']
1159 }], s_beforeInit: [{
1160 type: Output,
1161 args: ['beforeInit']
1162 }], s_beforeLoopFix: [{
1163 type: Output,
1164 args: ['beforeLoopFix']
1165 }], s_beforeResize: [{
1166 type: Output,
1167 args: ['beforeResize']
1168 }], s_beforeSlideChangeStart: [{
1169 type: Output,
1170 args: ['beforeSlideChangeStart']
1171 }], s_beforeTransitionStart: [{
1172 type: Output,
1173 args: ['beforeTransitionStart']
1174 }], s_breakpoint: [{
1175 type: Output,
1176 args: ['breakpoint']
1177 }], s_changeDirection: [{
1178 type: Output,
1179 args: ['changeDirection']
1180 }], s_click: [{
1181 type: Output,
1182 args: ['click']
1183 }], s_doubleTap: [{
1184 type: Output,
1185 args: ['doubleTap']
1186 }], s_doubleClick: [{
1187 type: Output,
1188 args: ['doubleClick']
1189 }], s_destroy: [{
1190 type: Output,
1191 args: ['destroy']
1192 }], s_fromEdge: [{
1193 type: Output,
1194 args: ['fromEdge']
1195 }], s_hashChange: [{
1196 type: Output,
1197 args: ['hashChange']
1198 }], s_hashSet: [{
1199 type: Output,
1200 args: ['hashSet']
1201 }], s_imagesReady: [{
1202 type: Output,
1203 args: ['imagesReady']
1204 }], s_init: [{
1205 type: Output,
1206 args: ['init']
1207 }], s_keyPress: [{
1208 type: Output,
1209 args: ['keyPress']
1210 }], s_lazyImageLoad: [{
1211 type: Output,
1212 args: ['lazyImageLoad']
1213 }], s_lazyImageReady: [{
1214 type: Output,
1215 args: ['lazyImageReady']
1216 }], s_loopFix: [{
1217 type: Output,
1218 args: ['loopFix']
1219 }], s_momentumBounce: [{
1220 type: Output,
1221 args: ['momentumBounce']
1222 }], s_navigationHide: [{
1223 type: Output,
1224 args: ['navigationHide']
1225 }], s_navigationShow: [{
1226 type: Output,
1227 args: ['navigationShow']
1228 }], s_observerUpdate: [{
1229 type: Output,
1230 args: ['observerUpdate']
1231 }], s_orientationchange: [{
1232 type: Output,
1233 args: ['orientationchange']
1234 }], s_paginationHide: [{
1235 type: Output,
1236 args: ['paginationHide']
1237 }], s_paginationRender: [{
1238 type: Output,
1239 args: ['paginationRender']
1240 }], s_paginationShow: [{
1241 type: Output,
1242 args: ['paginationShow']
1243 }], s_paginationUpdate: [{
1244 type: Output,
1245 args: ['paginationUpdate']
1246 }], s_progress: [{
1247 type: Output,
1248 args: ['progress']
1249 }], s_reachBeginning: [{
1250 type: Output,
1251 args: ['reachBeginning']
1252 }], s_reachEnd: [{
1253 type: Output,
1254 args: ['reachEnd']
1255 }], s_realIndexChange: [{
1256 type: Output,
1257 args: ['realIndexChange']
1258 }], s_resize: [{
1259 type: Output,
1260 args: ['resize']
1261 }], s_scroll: [{
1262 type: Output,
1263 args: ['scroll']
1264 }], s_scrollbarDragEnd: [{
1265 type: Output,
1266 args: ['scrollbarDragEnd']
1267 }], s_scrollbarDragMove: [{
1268 type: Output,
1269 args: ['scrollbarDragMove']
1270 }], s_scrollbarDragStart: [{
1271 type: Output,
1272 args: ['scrollbarDragStart']
1273 }], s_setTransition: [{
1274 type: Output,
1275 args: ['setTransition']
1276 }], s_setTranslate: [{
1277 type: Output,
1278 args: ['setTranslate']
1279 }], s_slideChange: [{
1280 type: Output,
1281 args: ['slideChange']
1282 }], s_slideChangeTransitionEnd: [{
1283 type: Output,
1284 args: ['slideChangeTransitionEnd']
1285 }], s_slideChangeTransitionStart: [{
1286 type: Output,
1287 args: ['slideChangeTransitionStart']
1288 }], s_slideNextTransitionEnd: [{
1289 type: Output,
1290 args: ['slideNextTransitionEnd']
1291 }], s_slideNextTransitionStart: [{
1292 type: Output,
1293 args: ['slideNextTransitionStart']
1294 }], s_slidePrevTransitionEnd: [{
1295 type: Output,
1296 args: ['slidePrevTransitionEnd']
1297 }], s_slidePrevTransitionStart: [{
1298 type: Output,
1299 args: ['slidePrevTransitionStart']
1300 }], s_slideResetTransitionStart: [{
1301 type: Output,
1302 args: ['slideResetTransitionStart']
1303 }], s_slideResetTransitionEnd: [{
1304 type: Output,
1305 args: ['slideResetTransitionEnd']
1306 }], s_sliderMove: [{
1307 type: Output,
1308 args: ['sliderMove']
1309 }], s_sliderFirstMove: [{
1310 type: Output,
1311 args: ['sliderFirstMove']
1312 }], s_slidesLengthChange: [{
1313 type: Output,
1314 args: ['slidesLengthChange']
1315 }], s_slidesGridLengthChange: [{
1316 type: Output,
1317 args: ['slidesGridLengthChange']
1318 }], s_snapGridLengthChange: [{
1319 type: Output,
1320 args: ['snapGridLengthChange']
1321 }], s_snapIndexChange: [{
1322 type: Output,
1323 args: ['snapIndexChange']
1324 }], s_tap: [{
1325 type: Output,
1326 args: ['tap']
1327 }], s_toEdge: [{
1328 type: Output,
1329 args: ['toEdge']
1330 }], s_touchEnd: [{
1331 type: Output,
1332 args: ['touchEnd']
1333 }], s_touchMove: [{
1334 type: Output,
1335 args: ['touchMove']
1336 }], s_touchMoveOpposite: [{
1337 type: Output,
1338 args: ['touchMoveOpposite']
1339 }], s_touchStart: [{
1340 type: Output,
1341 args: ['touchStart']
1342 }], s_transitionEnd: [{
1343 type: Output,
1344 args: ['transitionEnd']
1345 }], s_transitionStart: [{
1346 type: Output,
1347 args: ['transitionStart']
1348 }], s_update: [{
1349 type: Output,
1350 args: ['update']
1351 }], s_zoomChange: [{
1352 type: Output,
1353 args: ['zoomChange']
1354 }], s_swiper: [{
1355 type: Output,
1356 args: ['swiper']
1357 }], indexChange: [{
1358 type: Output
1359 }], prevElRef: [{
1360 type: ViewChild,
1361 args: ['prevElRef', { static: false }]
1362 }], nextElRef: [{
1363 type: ViewChild,
1364 args: ['nextElRef', { static: false }]
1365 }], scrollbarElRef: [{
1366 type: ViewChild,
1367 args: ['scrollbarElRef', { static: false }]
1368 }], paginationElRef: [{
1369 type: ViewChild,
1370 args: ['paginationElRef', { static: false }]
1371 }], slidesEl: [{
1372 type: ContentChildren,
1373 args: [SwiperSlideDirective, { descendants: false, emitDistinctChangesOnly: true }]
1374 }], containerClasses: [{
1375 type: HostBinding,
1376 args: ['class']
1377 }] } });
1378
1379class SwiperModule {
1380}
1381SwiperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0, type: SwiperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1382SwiperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0, type: SwiperModule, declarations: [SwiperComponent, SwiperSlideDirective], imports: [CommonModule], exports: [SwiperComponent, SwiperSlideDirective] });
1383SwiperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0, type: SwiperModule, imports: [[CommonModule]] });
1384i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0, type: SwiperModule, decorators: [{
1385 type: NgModule,
1386 args: [{
1387 declarations: [SwiperComponent, SwiperSlideDirective],
1388 exports: [SwiperComponent, SwiperSlideDirective],
1389 imports: [CommonModule],
1390 }]
1391 }] });
1392
1393/*
1394 * Public API Surface of angular
1395 */
1396
1397/**
1398 * Generated bundle index. Do not edit.
1399 */
1400
1401export { SwiperComponent, SwiperModule, SwiperSlideDirective };
1402//# sourceMappingURL=swiper_angular.js.map