{"version":3,"sources":["webpack:///1742452116000.blk-category-carousel-chunk.js","webpack:///D:/AzureDevops/vsts-agent-win-x64-2.202.1_06/_work/151/s/FrontEnd/src/views/blocks/categoryCarousel/js/categoryCarousel.js"],"names":["webpackJsonpUpdateBris","345","module","exports","__webpack_require__","$","_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","_classCallCheck","instance","Constructor","TypeError","CategoryCarousel","undefined","_createClass","defineProperties","target","props","i","length","descriptor","protoProps","staticProps","prototype","_utils","utils","__esModule","newObj","hasOwnProperty","call","default","CLS","el","this","$el","$parent","parent","$slider","find","$sliderWrap","$btnNext","$btnPrev","slidesToShow","data","isNaN","parseInt","hasClass","initCategoryCarousel","_breakpoints","_this","swiper","Swiper","init","slidesPerView","spaceBetween","freeMode","mousewheel","navigation","nextEl","prevEl","breakpoints","BREAKPOINT","XS","SM","MD","LG","on","addClass"],"mappings":";AAAAA,wBAAwB,KAElBC,IACA,SAAUC,EAAQC,EAASC,GAEjC,cAC4B,SAASC,GAerC,QAASC,GAAgBC,EAAKC,EAAKC,GAAiK,MAApJD,KAAOD,GAAOG,OAAOC,eAAeJ,EAAKC,GAAOC,MAAOA,EAAOG,YAAY,EAAMC,cAAc,EAAMC,UAAU,IAAkBP,EAAIC,GAAOC,EAAgBF,EAE3M,QAASQ,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAfhHR,OAAOC,eAAeR,EAAS,cAC9BM,OAAO,IAERN,EAAQgB,qBAAmBC,EAE3B,IAAIC,GAAe,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWf,WAAae,EAAWf,aAAc,EAAOe,EAAWd,cAAe,EAAU,SAAWc,KAAYA,EAAWb,UAAW,GAAMJ,OAAOC,eAAeY,EAAQI,EAAWnB,IAAKmB,IAAiB,MAAO,UAA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AS,oBAChCb,KAAKS,aAAe,EACVT,KAAKE,QAAQW,SAAS,yBAChCb,KAAKS,aAAe,EACVT,KAAKE,QAAQW,SAAS,0BAChCb,KAAKS,aAAe,EACVT,KAAKE,QAAQW,SAAS,2BAChCb,KAAKS,aAAe,EACVT,KAAKE,QAAQW,SAAS,gCAChCb,KAAKS,aAAe,GAGrBT,KAAKc,uBDoEN,MAzCAjC,GAAaF,IACZX,IAAK,uBACLC,MAAO,WC1Be,GAAA8C,GAAAC,EAAAhB,KAElBS,EAAeT,KAAKS,cA/DJ,EAiEdQ,EAAS,GAAIC,QAAOlB,KAAKM,YAAY,IAC1Ca,MAAM,EACNC,cAAe,EACfC,aAAc,GACdC,UAAU,EACVC,YAAY,EACZC,YACCC,OAAQzB,KAAKO,SAAS,GACtBmB,OAAQ1B,KAAKQ,SAAS,IAEvBmB,sBACEnC,EAAMoC,WAAWC,IACjBT,cAAe,IAFjBtD,EAAAiD,EAIEvB,EAAMoC,WAAWE,IACjBV,cAAe,IALjBtD,EAAAiD,EAOEvB,EAAMoC,WAAWG,IACjBX,cAAeX,EAAe,EAAI,EAAI,IARxC3C,EAAAiD,EAUEvB,EAAMoC,WAAWI,IACjBZ,cAAeX,IAXjBM,IAgBDE,GAAOgB,GAAG,OAAQ,WACjBjB,EAAKf,IAAIiC,SA3FU,oBA8FpBjB,EAAOE,WD+BDxC,OAEqBiB,KAAKjC,EAASC,EAAoB","file":"1742452116000.blk-category-carousel-chunk.js","sourcesContent":["webpackJsonpUpdateBris([97],{\n\n/***/ 345:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function($) {\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.CategoryCarousel = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _utils = __webpack_require__(4);\n\nvar utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// CONSTANTS are all caps.\nvar NS = 'CategoryCarousel';\nvar CLS = 'categoryCarousel';\nvar BLK = '.' + CLS + '-';\nvar SLIDE_TO_SHOW = 4;\nvar CLS_IS_INITED = 'is-initialized';\n\nvar CategoryCarousel = exports.CategoryCarousel = function () {\n\tfunction CategoryCarousel(el) {\n\t\t_classCallCheck(this, CategoryCarousel);\n\n\t\tthis.el = el;\n\t\tthis.$el = $(el);\n\t\tthis.$parent = this.$el.parent();\n\t\tthis.$slider = this.$el.find('.' + CLS + '-slider');\n\t\tthis.$sliderWrap = this.$el.find('.' + CLS + '-sliderWrap');\n\t\tthis.$btnNext = this.$el.find('.' + CLS + '-btnNext');\n\t\tthis.$btnPrev = this.$el.find('.' + CLS + '-btnPrev');\n\n\t\tthis.slidesToShow = this.$el.data('slidesToShow');\n\t\tif (this.slidesToShow && !isNaN(this.slidesToShow)) {\n\t\t\tthis.slidesToShow = parseInt(this.slidesToShow);\n\t\t} else {\n\t\t\t// if the value set in the data-slides-to-show attribute\n\t\t\tswitch (this.slidesToShow) {\n\t\t\t\tcase 'displaymode-full':\n\t\t\t\t\tthis.slidesToShow = 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-half':\n\t\t\t\t\tthis.slidesToShow = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-one-third':\n\t\t\t\t\tthis.slidesToShow = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-two-thirds':\n\t\t\t\t\tthis.slidesToShow = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-one-quarter':\n\t\t\t\t\tthis.slidesToShow = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-three-quarters':\n\t\t\t\t\tthis.slidesToShow = 3;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// if the value set in the parent\n\t\tif (this.$parent.hasClass('displaymode-full')) {\n\t\t\tthis.slidesToShow = 4;\n\t\t} else if (this.$parent.hasClass('displaymode-half')) {\n\t\t\tthis.slidesToShow = 3;\n\t\t} else if (this.$parent.hasClass('displaymode-one-third')) {\n\t\t\tthis.slidesToShow = 2;\n\t\t} else if (this.$parent.hasClass('displaymode-two-thirds')) {\n\t\t\tthis.slidesToShow = 3;\n\t\t} else if (this.$parent.hasClass('displaymode-one-quarter')) {\n\t\t\tthis.slidesToShow = 2;\n\t\t} else if (this.$parent.hasClass('displaymode-three-quarters')) {\n\t\t\tthis.slidesToShow = 3;\n\t\t}\n\n\t\tthis.initCategoryCarousel();\n\t}\n\n\t_createClass(CategoryCarousel, [{\n\t\tkey: 'initCategoryCarousel',\n\t\tvalue: function initCategoryCarousel() {\n\t\t\tvar _breakpoints,\n\t\t\t _this = this;\n\n\t\t\t// from mobile to desktop\n\t\t\tvar slidesToShow = this.slidesToShow || SLIDE_TO_SHOW;\n\n\t\t\tvar swiper = new Swiper(this.$sliderWrap[0], {\n\t\t\t\tinit: false,\n\t\t\t\tslidesPerView: 1,\n\t\t\t\tspaceBetween: 24,\n\t\t\t\tfreeMode: true,\n\t\t\t\tmousewheel: true,\n\t\t\t\tnavigation: {\n\t\t\t\t\tnextEl: this.$btnNext[0],\n\t\t\t\t\tprevEl: this.$btnPrev[0]\n\t\t\t\t},\n\t\t\t\tbreakpoints: (_breakpoints = {}, _defineProperty(_breakpoints, utils.BREAKPOINT.XS, {\n\t\t\t\t\tslidesPerView: 2\n\t\t\t\t}), _defineProperty(_breakpoints, utils.BREAKPOINT.SM, {\n\t\t\t\t\tslidesPerView: 2\n\t\t\t\t}), _defineProperty(_breakpoints, utils.BREAKPOINT.MD, {\n\t\t\t\t\tslidesPerView: slidesToShow > 2 ? 3 : 2\n\t\t\t\t}), _defineProperty(_breakpoints, utils.BREAKPOINT.LG, {\n\t\t\t\t\tslidesPerView: slidesToShow\n\t\t\t\t}), _breakpoints)\n\t\t\t});\n\n\t\t\tswiper.on('init', function () {\n\t\t\t\t_this.$el.addClass(CLS_IS_INITED);\n\t\t\t});\n\n\t\t\tswiper.init();\n\t\t}\n\n\t\t//Add more functions like on above here\n\n\t}]);\n\n\treturn CategoryCarousel;\n}();\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// 1742452116000.blk-category-carousel-chunk.js","// CONSTANTS are all caps.\nconst NS = 'CategoryCarousel';\nconst CLS = 'categoryCarousel';\nconst BLK = '.' + CLS + '-';\nconst SLIDE_TO_SHOW = 4;\nconst CLS_IS_INITED = 'is-initialized';\n\nimport * as utils from '../../../../global/js/utils';\n\nexport class CategoryCarousel {\n\n\tconstructor(el) {\n\t\tthis.el = el;\n\t\tthis.$el = $(el);\n\t\tthis.$parent = this.$el.parent();\n\t\tthis.$slider = this.$el.find(`.${CLS}-slider`);\n\t\tthis.$sliderWrap = this.$el.find(`.${CLS}-sliderWrap`);\n\t\tthis.$btnNext = this.$el.find(`.${CLS}-btnNext`);\n\t\tthis.$btnPrev = this.$el.find(`.${CLS}-btnPrev`);\n\n\t\tthis.slidesToShow = this.$el.data('slidesToShow');\n\t\tif (this.slidesToShow && !isNaN(this.slidesToShow)) {\n\t\t\tthis.slidesToShow = parseInt(this.slidesToShow);\n\t\t}else {\n\t\t\t// if the value set in the data-slides-to-show attribute\n\t\t\tswitch (this.slidesToShow) {\n\t\t\t\tcase 'displaymode-full': \n\t\t\t\t\tthis.slidesToShow = 4;\n\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-half': \n\t\t\t\t\tthis.slidesToShow = 3;\n\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-one-third': \n\t\t\t\t\tthis.slidesToShow = 2;\n\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-two-thirds': \n\t\t\t\t\tthis.slidesToShow = 3;\n\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-one-quarter': \n\t\t\t\t\tthis.slidesToShow = 2;\n\t\t\t\tbreak;\n\t\t\t\tcase 'displaymode-three-quarters': \n\t\t\t\t\tthis.slidesToShow = 3;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// if the value set in the parent\n\t\tif (this.$parent.hasClass('displaymode-full')) {\n\t\t\tthis.slidesToShow = 4;\n\t\t} else if (this.$parent.hasClass('displaymode-half')){\n\t\t\tthis.slidesToShow = 3;\n\t\t} else if (this.$parent.hasClass('displaymode-one-third')){\n\t\t\tthis.slidesToShow = 2;\n\t\t} else if (this.$parent.hasClass('displaymode-two-thirds')){\n\t\t\tthis.slidesToShow = 3;\n\t\t} else if (this.$parent.hasClass('displaymode-one-quarter')){\n\t\t\tthis.slidesToShow = 2;\n\t\t} else if (this.$parent.hasClass('displaymode-three-quarters')){\n\t\t\tthis.slidesToShow = 3;\n\t\t}\n\t\t\n\t\tthis.initCategoryCarousel();\n\t}\n\n\tinitCategoryCarousel() {\t\t\n\t\t// from mobile to desktop\n\t\tlet slidesToShow = this.slidesToShow || SLIDE_TO_SHOW;\n\n\t\tconst swiper = new Swiper(this.$sliderWrap[0], {\n\t\t\tinit: false,\n\t\t\tslidesPerView: 1,\n\t\t\tspaceBetween: 24,\n\t\t\tfreeMode: true,\n\t\t\tmousewheel: true,\n\t\t\tnavigation: {\n\t\t\t\tnextEl: this.$btnNext[0],\n\t\t\t\tprevEl: this.$btnPrev[0],\n\t\t\t},\n\t\t\tbreakpoints: {\n\t\t\t\t[utils.BREAKPOINT.XS]: {\n\t\t\t\t\tslidesPerView: 2,\n\t\t\t\t},\n\t\t\t\t[utils.BREAKPOINT.SM]: {\n\t\t\t\t\tslidesPerView: 2,\n\t\t\t\t},\n\t\t\t\t[utils.BREAKPOINT.MD]: {\n\t\t\t\t\tslidesPerView: slidesToShow > 2 ? 3 : 2,\n\t\t\t\t},\n\t\t\t\t[utils.BREAKPOINT.LG]: {\n\t\t\t\t\tslidesPerView: slidesToShow,\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tswiper.on('init', () => {\n\t\t\tthis.$el.addClass(CLS_IS_INITED);\n\t\t});\n\n\t\tswiper.init();\n\t}\n\n\t//Add more functions like on above here\n\n}\n\n\n\n// WEBPACK FOOTER //\n// D:/AzureDevops/vsts-agent-win-x64-2.202.1_06/_work/151/s/FrontEnd/src/views/blocks/categoryCarousel/js/categoryCarousel.js"],"sourceRoot":""}