swiper_angular.mjs 60 KB

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