{"version":3,"sources":["webpack:///./app/components/m/tabs-small-top/index.js","webpack:///./app/components/m/tabs/index.js"],"names":["$","each","_index","element","tabs","querySelector","content","numSlides","querySelectorAll","length","thumbs","Swiper","slidesPerView","width","slidesOffsetBefore","loop","roundLengths","spaceBetween","watchSlidesProgress","s","autoHeight","grabCursor","centeredSlides","watchActiveIndex","swiper","pagination","el","clickable","navigation","nextEl","prevEl","destroy","tabsSwiper","tabsSwiperTabs","media","window","matchMedia","swiperWidth","matches","index","addClass","freeMode","modules","Thumbs","Controller","breakpoints","allowSlideNext","allowSlidePrev","screenTest","e","params","addListener"],"mappings":";;;;;;;;;;;AAAA;AAAA;AAA4B;AAE5BA,CAAC,CAAC,iBAAiB,CAAC,CAACC,IAAI,CAAC,CAACC,MAAM,EAAEC,OAAO,KAAK;EAC7C,MAAMC,IAAI,GAAGD,OAAO,CAACE,aAAa,CAAC,kCAAkC,CAAC;EACtE,MAAMC,OAAO,GAAGH,OAAO,CAACE,aAAa,CAAC,yBAAyB,CAAC;EAChE,MAAME,SAAS,GAAGJ,OAAO,CAACK,gBAAgB,CAAC,eAAe,CAAC,CAACC,MAAM;;EAElE;EACA,MAAMC,MAAM,GAAG,IAAIC,8CAAM,CAACP,IAAI,EAAE;IAC9BQ,aAAa,EAAE,MAAM;IACrBC,KAAK,EAAE,GAAG;IACVC,kBAAkB,EAAE,EAAE;IACtBC,IAAI,EAAE,KAAK;IACXC,YAAY,EAAE,IAAI;IAClBC,YAAY,EAAE,CAAC;IACfC,mBAAmB,EAAE;EACvB,CAAC,CAAC;;EAEF;EACA,MAAMC,CAAC,GAAG,IAAIR,8CAAM,CAACL,OAAO,EAAE;IAC5BM,aAAa,EAAE,CAAC;IAChBK,YAAY,EAAE,CAAC;IACfG,UAAU,EAAE,IAAI;IAChBL,IAAI,EAAE,KAAK;IACXM,UAAU,EAAE,IAAI;IAChBC,cAAc,EAAE,IAAI;IACpBC,gBAAgB,EAAE,IAAI;IACtBb,MAAM,EAAE;MACNc,M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AClB,CAAC;MACD;MACA,GAAG,EAAE;QACHD,cAAc,EAAE,KAAK;QACrBC,cAAc,EAAE;MAClB;IACF;EACF,CAAC,CAAC;AACJ,CAAC,CAAC;;AAEF;AACA/C,CAAC,CAAC,qBAAqB,CAAC,CAACC,IAAI,CAAC,CAACsC,KAAK,EAAEpC,OAAO,KAAK;EAChDH,CAAC,CAACG,OAAO,CAAC,CAACqC,QAAQ,CAAC,aAAa,GAAGD,KAAK,CAAC;EAC1CP,UAAU,CAACO,KAAK,CAAC,GAAG,IAAI5B,6CAAM,CAAC,cAAc,GAAG4B,KAAK,EAAE;IACrD3B,aAAa,EAAE,CAAC;IAChBK,YAAY,EAAE,CAAC;IACfG,UAAU,EAAE,IAAI;IAChBL,IAAI,EAAE,KAAK;IACXM,UAAU,EAAE,IAAI;IAChBC,cAAc,EAAE,IAAI;IACpBC,gBAAgB,EAAE,IAAI;IACtBmB,OAAO,EAAE,CAACC,6CAAM,EAAEC,iDAAU,CAAC;IAC7BlC,MAAM,EAAE;MACNc,MAAM,EAAES,cAAc,CAACM,KAAK;IAC9B;EACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,SAASS,UAAUA,CAACC,CAAC,EAAE;EACrBZ,WAAW,GAAGY,CAAC,CAACX,OAAO,GAAG,MAAM,GAAG,KAAK;EACxCtC,CAAC,CAAC,wBAAwB,CAAC,CAACC,IAAI,CAAC,YAAY;IAC3C,IAAI,CAACuB,MAAM,CAAC0B,MAAM,CAACrC,KAAK,GAAGwB,WAAW;EACxC,CAAC,CAAC;AACJ;AAEAH,KAAK,CAACiB,WAAW,CAACH,UAAU,CAAC;AAC7BA,UAAU,CAACd,KAAK,CAAC,C","file":"tabs.chunk.js","sourcesContent":["import Swiper from 'swiper';\r\n\r\n$('.tabs-small-top').each((_index, element) => {\r\n  const tabs = element.querySelector('.tabs-small-top__label-container');\r\n  const content = element.querySelector('.tabs-small-top__slider');\r\n  const numSlides = element.querySelectorAll('.swiper-slide').length;\r\n\r\n  // tabs\r\n  const thumbs = new Swiper(tabs, {\r\n    slidesPerView: 'auto',\r\n    width: 100,\r\n    slidesOffsetBefore: 20,\r\n    loop: false,\r\n    roundLengths: true,\r\n    spaceBetween: 0,\r\n    watchSlidesProgress: true,\r\n  });\r\n\r\n  // tab content\r\n  const s = new Swiper(content, {\r\n    slidesPerView: 1,\r\n    spaceBetween: 0,\r\n    autoHeight: true,\r\n    loop: false,\r\n    grabCursor: true,\r\n    centeredSlides: true,\r\n    watchActiveIndex: true,\r\n    thumbs: {\r\n      swiper: thumbs,\r\n    },\r\n    pagination: {\r\n      el: element.querySelector('.swiper-pagination'),\r\n      clickable: true,\r\n    },\r\n    navigation: {\r\n      nextEl: element.querySelector('.swiper-button-next'),\r\n      prevEl: element.querySelector('.swiper-button-prev'),\r\n    },\r\n  });\r\n\r\n  // destroy/disable slider if only one\r\n  // slide are available\r\n  if (numSlides <= 1) {\r\n    s.destroy();\r\n  }\r\n\r\n  return s;\r\n});\r\n","import { Swiper, Thumbs, Controller } from 'swiper';\r\n\r\nconst tabsSwiper = [];\r\nconst tabsSwiperTabs = [];\r\nconst media = window.matchMedia('(min-width: 768px)');\r\n// hack to force active label always align to left, make width of swiper less than label\r\nlet swiperWidth = media.matches ? '100%' : '190';\r\n\r\n// tabs\r\n$('.tabs .tabs__label-container').each((index, element) => {\r\n  $(element).addClass('tabsSwiperTabs-' + index);\r\n  tabsSwiperTabs[index] = new Swiper('.tabsSwiperTabs-' + index, {\r\n    slidesPerView: 1,\r\n    width: swiperWidth,\r\n    spaceBetween: 0,\r\n    autoHeight: false,\r\n    loop: false,\r\n    grabCursor: true,\r\n    freeMode: false,\r\n    modules: [Thumbs, Controller],\r\n    breakpoints: {\r\n      // when window width is >= 320px\r\n      320: {\r\n        allowSlideNext: true,\r\n        allowSlidePrev: true,\r\n      },\r\n      // when window width is >= 768px\r\n      768: {\r\n        allowSlideNext: false,\r\n        allowSlidePrev: false,\r\n      },\r\n    },\r\n  });\r\n});\r\n\r\n// content\r\n$('.tabs .tabs__slider').each((index, element) => {\r\n  $(element).addClass('tabsSwiper-' + index);\r\n  tabsSwiper[index] = new Swiper('.tabsSwiper-' + index, {\r\n    slidesPerView: 1,\r\n    spaceBetween: 0,\r\n    autoHeight: true,\r\n    loop: false,\r\n    grabCursor: true,\r\n    centeredSlides: true,\r\n    watchActiveIndex: true,\r\n    modules: [Thumbs, Controller],\r\n    thumbs: {\r\n      swiper: tabsSwiperTabs[index],\r\n    },\r\n  });\r\n});\r\n\r\nfunction screenTest(e) {\r\n  swiperWidth = e.matches ? '100%' : '190';\r\n  $('.tabs__label-container').each(function () {\r\n    this.swiper.params.width = swiperWidth;\r\n  });\r\n}\r\n\r\nmedia.addListener(screenTest);\r\nscreenTest(media);\r\n"],"sourceRoot":""}