swiper_angular.mjs 58 KB

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