{"version":3,"sources":["webpack:///./src/assets/images/cms/CarouselLeft.svg","webpack:///./src/commoncomponents/CmsCardCarousel/CmsCardCarousel.less?abaa","webpack:///./src/commoncomponents/CmsCardCarousel/CmsCardCarousel.vue?c821","webpack:///./src/commoncomponents/CmsCardCarousel/CmsCardCarousel.ts","webpack:///./src/commoncomponents/CmsCardCarousel/CmsCardCarousel.vue?55e6","webpack:///./src/commoncomponents/CmsCardCarousel/CmsCardCarousel.vue?8541","webpack:///./src/commoncomponents/CmsCardCarousel/CmsCardCarousel.vue","webpack:///./src/assets/images/cms/CarouselRight.svg"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","ref","_v","_s","title","attrs","leftArrowIcon","on","$event","moveLeft","_e","rightArrowIcon","moveRight","showFilters","filterOptions","length","_l","data","index","key","class","currentFilters","includes","value","filterBy","directives","name","rawName","left","e","handleSwipeLeft","right","handleSwipeRight","expression","style","transform","offset","staticRenderFns","CmsCardCarousel","filteredCards","cardDataArr","offsetAmmount","showPrev","showNext","CarouselLeft","CarouselRight","touchstartX","touchendX","displayableCards","ammount","move","carouselEl","parent","parentElement","parentWidth","clientWidth","Math","floor","newWidth","setProperty","carousel","$refs","carouselContainer","setWidth","window","addEventListener","handleResize","removeEventListener","val","filter","el","push","newFiltered","courseStatus","Vue","set","allStatuses","map","item","undefined","uniqueStatuses","Set","filters","st","label","getStatusState","statusText","count","cardWidth","originalWidth","offsetWidth","tslib_1","Prop","type","Array","Boolean","default","String","Component","props","components","CmsCardComponent","component"],"mappings":"sHAAAA,EAAOC,QAAU,IAA0B,iC,oCCA3C,W,4CCAA,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,8BAA8B,CAACF,EAAG,MAAM,CAACG,IAAI,oBAAoBD,YAAY,sBAAsB,CAACF,EAAG,MAAM,CAACE,YAAY,+BAA+B,CAAC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Y6B,QAAO,SAAAC,GAAE,OACxB,EAAKjD,eAAeC,SAASgD,EAAGG,iBACjC,eACG9E,KAAK6C,aACbkC,OAAIC,IAAIhF,KAAM,gBAAiB6E,GAC/B7E,KAAKuD,KAAK,EAAIvD,KAAKuB,SACpB,oCAGC,IAAM0D,EAAcjF,KAAK6C,YACtBqC,KAAI,SAAAC,GAAI,OAAIA,EAAKL,gBACjBJ,QAAO,SAAAS,GAAI,YAAaC,IAATD,KACZE,EAAiB,eAAI,IAAIC,IAAIL,IAC7BM,EAAUF,EAAeH,KAAI,SAAAM,GAAE,MAAK,CACxC5D,MAAO4D,EACPC,MAAOC,eAAeF,GAAIG,WAC1BC,MAAOX,EAAYP,QAAO,SAAAC,GAAE,OAAIA,IAAOa,KAAIpE,WAE7CpB,KAAKmB,cAAgBoE,IACtB,gCAGC,IAAMM,EAAY,IAClB7F,KAAK8C,cAAgB+C,EACrB,IAAM5B,EAAgBjE,KAAKkE,MAAMC,kBAC3B2B,EAAgB7B,GAAYA,EAAS8B,YACvC9B,GAAY6B,GACd9F,KAAKoE,SAASH,OAEjB,EA/IiC,CAASc,QAI3CiB,QAHCC,eAAK,CACJC,KAAMC,SACN,kCAOFH,QAJCC,eAAK,CACJC,KAAME,QACNC,QAAS,kBAAM,MACf,kCAMFL,QAHCC,eAAK,CACJC,KAAMI,UACN,4BAdiB3D,EAAe,QAjBnC4D,eAAU,CACTxE,KAAM,gBACNyE,MAAO,CACL3D,YAAa,CACXqD,KAAMC,OAERjF,YAAa,CACXgF,KAAME,SAER3F,MAAO,CACLyF,KAAMI,SAGVG,WAAY,CACV,WAAYC,iBAGK/D,WC0ENA,IClG6Y,I,wBCQxZgE,EAAY,eACd,EACA7G,EACA4C,GACA,EACA,KACA,WACA,MAIa,aAAAiE,E,+BCnBf/G,EAAOC,QAAU,IAA0B,kC","file":"js/chunk-31b3baee.524b694999338ff77481.1725496708077.min.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/CarouselLeft.a2456483.svg\";","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!./CmsCardCarousel.less?vue&type=style&index=0&id=62fd86f1&lang=less&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"top-cms-carousel-container\"},[_c('div',{ref:\"carouselContainer\",staticClass:\"carousel-container\"},[_c('div',{staticClass:\"carousel-title-and-controls\"},[_c('div',{staticClass:\"carousel-title\"},[_vm._v(\" \"+_vm._s(_vm.title)+\" \")]),_c('div',{staticClass:\"mobilenav\"},[_c('button',{staticClass:\"mobileprev\"},[(_vm.showPrev)?_c('img',{attrs:{\"src\":_vm.leftArrowIcon,\"alt\":\"\"},on:{\"click\":function($event){return _vm.moveLeft()}}}):_vm._e()]),_c('button',{staticClass:\"mobilenext\"},[(_vm.showNext)?_c('img',{attrs:{\"src\":_vm.rightArrowIcon,\"alt\":\"\"},on:{\"click\":function($event){return _vm.moveRight()}}}):_vm._e()])])]),(_vm.showFilters && _vm.filterOptions.length)?_c('div',{staticClass:\"filters\"},_vm._l((_vm.filterOptions),function(data,index){return _c('div',{key:index},[_c('div',{staticClass:\"filter-button\",class:{ 'selected-filter': _vm.currentFilters.includes(data.value) },on:{\"click\":function($event){return _vm.filterBy(data.value)}}},[_vm._v(\" \"+_vm._s(((data.label) + \" (\" + (data.count) + \")\"))+\" \")])])}),0):_vm._e(),_c('div',{directives:[{name:\"touch\",rawName:\"v-touch\",value:({\n left: function (e) { return _vm.handleSwipeLeft(e); },\n right: function (e) { return _vm.handleSwipeRight(e); },\n }),expression:\"{\\n left: (e) => handleSwipeLeft(e),\\n right: (e) => handleSwipeRight(e),\\n }\"}],staticClass:\"inner-carousel\"},[_c('ul',{ref:\"trackContainer\",staticClass:\"track no-marker\",style:({ transform: (\"translateX(\" + _vm.offset + \")\") })},_vm._l((_vm.filteredCards),function(data,index){return _c('li',{key:data.title + index,staticClass:\"no-marker\"},[_c('div',{staticClass:\"card\"},[_c('cms-card',{attrs:{\"cardData\":data}})],1)])}),0),_c('div',{staticClass:\"nav\"},[(_vm.showPrev)?_c('button',{staticClass:\"prev\",on:{\"click\":function($event){return _vm.moveLeft()}}},[_c('img',{attrs:{\"src\":_vm.leftArrowIcon,\"alt\":\"\"}})]):_vm._e(),(_vm.showNext)?_c('button',{staticClass:\"next\",on:{\"click\":function($event){return _vm.moveRight()}}},[_c('img',{attrs:{\"src\":_vm.rightArrowIcon,\"alt\":\"\"}})]):_vm._e()])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { Vue, Component, Prop } from \"vue-property-decorator\";\nimport * as CarouselLeft from \"../../assets/images/cms/CarouselLeft.svg\";\nimport * as CarouselRight from \"../../assets/images/cms/CarouselRight.svg\";\nimport CmsCardComponent from \"@/commoncomponents/CmsCardComponent/CmsCardComponent.vue\";\nimport { getStatusState } from \"../CmsCardComponent/CmsCardComponent\";\nimport { ContentCardData, CourseStatus } from \"@/utilities/cmsUtilities\";\n\n@Component({\n name: \"card-carousel\",\n props: {\n cardDataArr: {\n type: Array\n },\n showFilters: {\n type: Boolean\n },\n title: {\n type: String\n }\n },\n components: {\n \"cms-card\": CmsCardComponent\n }\n})\nexport default class CmsCardCarousel extends Vue {\n @Prop({\n type: Array\n })\n cardDataArr!: Array;\n\n @Prop({\n type: Boolean,\n default: () => true\n })\n showFilters!: boolean;\n\n @Prop({\n type: String\n })\n title!: String;\n\n filterOptions: Array = [];\n\n currentFilters: Array = [];\n\n filteredCards: Array = [...this.cardDataArr];\n\n index = 0;\n offset = \"0px\";\n offsetAmmount = 0;\n\n showPrev: boolean = false;\n showNext: boolean = true;\n leftArrowIcon: string = CarouselLeft;\n rightArrowIcon: string = CarouselRight;\n\n touchstartX = 0;\n touchendX = 0;\n displayableCards = 0;\n\n move(ammount: number) {\n this.index += ammount;\n //If index is 1 we need to offset for padding\n if (this.index === 1) {\n this.offset = `-${this.offsetAmmount * this.index + 16}px`;\n } else {\n this.offset = `-${this.offsetAmmount * this.index}px`;\n }\n if (this.index > 0) {\n this.showPrev = true;\n } else {\n this.showPrev = false;\n }\n if (this.index < this.filteredCards.length - 1) {\n this.showNext = true;\n } else {\n this.showNext = false;\n }\n if (this.index + this.displayableCards > this.filteredCards.length) {\n this.showNext = false;\n }\n if (this.displayableCards >= this.cardDataArr.length) {\n this.showNext = false;\n }\n }\n\n moveRight() {\n this.move(1);\n }\n\n moveLeft() {\n if (this.index > 0) {\n this.move(-1);\n }\n }\n\n setWidth(carouselEl: HTMLElement) {\n const parent = carouselEl.parentElement;\n const parentWidth = parent ? parent.clientWidth : 0;\n this.displayableCards = Math.floor(parentWidth / this.offsetAmmount);\n const newWidth = this.displayableCards * this.offsetAmmount + 20;\n carouselEl.style.setProperty(\"--carousel-width\", `${newWidth}px`);\n if (this.displayableCards >= this.cardDataArr.length) {\n this.showNext = false;\n } else {\n this.showNext = true;\n }\n }\n\n handleResize(e: any) {\n const carousel: any = this.$refs.carouselContainer;\n this.setWidth(carousel);\n }\n\n handleSwipeLeft(e: any) {\n this.moveRight();\n }\n\n handleSwipeRight(e: any) {\n this.moveLeft();\n }\n\n created() {\n window.addEventListener(\"resize\", this.handleResize);\n }\n\n destroyed() {\n window.removeEventListener(\"resize\", this.handleResize);\n }\n\n filterBy(val: CourseStatus) {\n if (this.currentFilters.includes(val)) {\n this.currentFilters = this.currentFilters.filter(el => el !== val);\n } else {\n this.currentFilters.push(val);\n }\n\n const newFiltered = this.currentFilters.length\n ? this.cardDataArr.filter(el =>\n this.currentFilters.includes(el.courseStatus as CourseStatus)\n )\n : [...this.cardDataArr];\n Vue.set(this, \"filteredCards\", newFiltered);\n this.move(0 - this.index);\n }\n\n beforeMount() {\n const allStatuses = this.cardDataArr\n .map(item => item.courseStatus)\n .filter(item => item !== undefined);\n const uniqueStatuses = [...new Set(allStatuses)];\n const filters = uniqueStatuses.map(st => ({\n value: st,\n label: getStatusState(st).statusText,\n count: allStatuses.filter(el => el === st).length\n }));\n this.filterOptions = filters;\n }\n\n mounted() {\n const cardWidth = 253 + 16;\n this.offsetAmmount = cardWidth;\n const carousel: any = this.$refs.carouselContainer;\n const originalWidth = carousel && carousel.offsetWidth;\n if (carousel && originalWidth) {\n this.setWidth(carousel);\n }\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport CmsCardCarousel from \"./CmsCardCarousel\";\nexport default CmsCardCarousel;\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CmsCardCarousel.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CmsCardCarousel.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CmsCardCarousel.vue?vue&type=template&id=62fd86f1&scoped=true&\"\nimport script from \"./CmsCardCarousel.vue?vue&type=script&lang=ts&\"\nexport * from \"./CmsCardCarousel.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./CmsCardCarousel.less?vue&type=style&index=0&id=62fd86f1&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"62fd86f1\",\n null\n \n)\n\nexport default component.exports","module.exports = __webpack_public_path__ + \"img/CarouselRight.331d37e0.svg\";"],"sourceRoot":""}