{"version":3,"sources":["webpack:///./src/js/utils/slider.js","webpack:///./src/js/components/stats-graph.js","webpack:///./node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./src/js/components/rounded-stats.js"],"names":["hideFocusableElementsinSlide","$slide","_$$","focusableElements","forEach","$element","setAttribute","disableFocusOnHiddenSlides","$slides","$selectedSlide","find","classList","contains","removeAttribute","getGenericSliderConfig","element","heading","textDefault","arguments","length","undefined","slides","querySelectorAll","pager","querySelector","prevButton","nextButton","a11y","enabled","nextSlideMessage","concat","textContent","replace","trim","prevSlideMessage","paginationBulletMessage","keyboard","onlyInViewport","watchSlidesProgress","watchSlidesVisibility","slideToClickedSlide","observer","allowTouchMove","pagination","dynamicBullets","clickable","el","bulletClass","bulletActiveClass","modifierClass","navigation","nextEl","prevEl","watchOverflow","colors","orange","normal","light","blue","green","purple","pink","StatsGraph","_Component","_classCallCheck","_callSuper","_inherits","key","value","_this","this","dom","$canvas","_$","$canvasContext","getContext","chartColor","dataset","chartType","chartValue","chartLabels","chart","window","IntersectionObserver","entries","entry","isIntersecting","setTimeout","initGraph","bind","threshold","observe","_this$chartValue$spli2","_slicedToArray","split","map","Number","value1","value2","_this$chartColor$spli","color","_color$trim$split2","_this$chartColor$spli2","_this$chartColor$spli3","color1","variation1","_this$chartColor$spli4","color2","variation2","data","backgroundColor","maxBarThickness","fonts","fontSize","fontFamily","scales","xAxes","stacked","gridLines","lineWidth","ticks","_objectSpread","yAxes","offsetGridLines","drawBorder","beginAtZero","maxTicksLimit","display","label","Chart","type","getType","labels","getLabels","datasets","getData","options","animation","duration","responsive","scaleLabel","hover","mode","aspectRatio","legend","tooltips","position","getScales","Component","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","RoundedStats","$heading","$swiperContainer","$cards","initSlider","card","_this$dom","Swiper","slidesPerView","spaceBetween","breakpoints","_defineProperty","tablet","noSwiping","lg","on","init","remove","add"],"mappings":"wNAIMA,EAA+B,SAACC,GACTA,EAA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FAlCvB,CAASjC,aAyCZe","file":"20.2cea4e.js","sourcesContent":["/* eslint-disable indent */\r\nimport breakpoints from './breakpoints';\r\nimport focusableElements from './focusable-elements';\r\n\r\nconst hideFocusableElementsinSlide = ($slide) => {\r\n const $focusableElements = $slide._$$(focusableElements);\r\n $focusableElements.forEach(($element) =>\r\n $element.setAttribute('tabindex', '-1')\r\n );\r\n};\r\n\r\nconst showFocusableElementsinSlide = ($slide) => {\r\n const $focusableElements = $slide._$$(focusableElements);\r\n $focusableElements.forEach(($element) =>\r\n $element.removeAttribute('tabindex')\r\n );\r\n};\r\n\r\nexport const disableFocusOnHiddenSlides = ($slides) => {\r\n $slides.forEach(hideFocusableElementsinSlide);\r\n const $selectedSlide = $slides.find(($slide) =>\r\n $slide.classList.contains('swiper-slide-active')\r\n );\r\n showFocusableElementsinSlide($selectedSlide);\r\n};\r\n\r\nexport const getGenericSliderConfig = (element, heading, textDefault = '') => {\r\n const slides = element.querySelectorAll('.swiper-slide');\r\n const pager = element.querySelector('.swiper-pagination');\r\n const prevButton = element.querySelector('.swiper-button-prev');\r\n const nextButton = element.querySelector('.swiper-button-next');\r\n\r\n return {\r\n a11y: {\r\n enabled: true,\r\n nextSlideMessage: `Go to ${\r\n heading\r\n ? `${heading.textContent\r\n .replace(/(\\r\\n|\\n|\\r)/gm, '')\r\n .replace(/\\s+/g, ' ')\r\n .trim()}`\r\n : textDefault\r\n } next slide`,\r\n prevSlideMessage: `Go to ${\r\n heading\r\n ? `${heading.textContent\r\n .replace(/(\\r\\n|\\n|\\r)/gm, '')\r\n .replace(/\\s+/g, ' ')\r\n .trim()}`\r\n : textDefault\r\n } previous slide`,\r\n paginationBulletMessage: `Go to ${\r\n heading\r\n ? `${heading.textContent\r\n .replace(/(\\r\\n|\\n|\\r)/gm, '')\r\n .replace(/\\s+/g, ' ')\r\n .trim()}`\r\n : textDefault\r\n } slide {{index}} of ${slides.length}`\r\n },\r\n keyboard: {\r\n enabled: true,\r\n onlyInViewport: true\r\n },\r\n watchSlidesProgress: true,\r\n watchSlidesVisibility: true,\r\n slideToClickedSlide: false,\r\n observer: true,\r\n allowTouchMove: true,\r\n pagination: {\r\n dynamicBullets: true,\r\n clickable: true,\r\n el: pager,\r\n bulletClass: 'swiper-bullet',\r\n bulletActiveClass: 'swiper-bullet--active',\r\n modifierClass: 'swiper-bullet--'\r\n },\r\n navigation: {\r\n nextEl: nextButton,\r\n prevEl: prevButton\r\n },\r\n watchOverflow: true\r\n };\r\n};\r\n","import { Component } from '@verndale/core';\r\nimport Chart from 'chart.js';\r\n\r\nexport const colors = {\r\n orange: {\r\n normal: '#F78842',\r\n light: '#FFDEC5'\r\n },\r\n blue: {\r\n normal: '#06A7DE',\r\n light: '#C9E5F7'\r\n },\r\n green: {\r\n normal: '#019A4B',\r\n light: '#C0DDC7'\r\n },\r\n purple: {\r\n normal: '#6F2981',\r\n light: '#CBBDD7'\r\n },\r\n pink: {\r\n normal: '#B94096',\r\n light: '#F0C7E0'\r\n }\r\n};\r\n\r\nclass StatsGraph extends Component {\r\n setupDefaults() {\r\n this.dom = {\r\n $canvas: this.el._$('.stats__canvas'),\r\n $canvasContext: this.el._$('.stats__canvas').getContext('2d')\r\n };\r\n\r\n this.chartColor = this.el.dataset.chartColor;\r\n this.chartType = this.el.dataset.chartType;\r\n this.chartValue = this.el.dataset.chartValue;\r\n this.chartLabels = this.el.dataset.chartLabels;\r\n this.chart = null;\r\n\r\n this.observer = new window.IntersectionObserver(\r\n (entries, observer) => {\r\n entries.forEach((entry) => {\r\n if (entry.isIntersecting && !this.chart) {\r\n setTimeout(::this.initGraph, 500);\r\n }\r\n });\r\n },\r\n {\r\n threshold: 1\r\n }\r\n );\r\n this.observer.observe(this.dom.$canvas);\r\n }\r\n\r\n getData() {\r\n const BAR_THICKNESS = 20;\r\n const MAX_VALUE = 100;\r\n const [value1, value2] = this.chartValue.split(',').map(Number);\r\n const value = Number(this.chartValue);\r\n\r\n if (this.chartType === 'double-bar') {\r\n const [\r\n [color1, variation1],\r\n [color2, variation2]\r\n ] = this.chartColor.split(',').map((color) => {\r\n const [c, variation] = color.trim().split('.');\r\n return [c, variation];\r\n });\r\n\r\n return [\r\n {\r\n data: [value1, value2],\r\n backgroundColor: [\r\n colors[color1][variation1],\r\n colors[color2][variation2]\r\n ],\r\n maxBarThickness: BAR_THICKNESS\r\n }\r\n ];\r\n }\r\n\r\n if (this.chartType === 'bar') {\r\n return [\r\n {\r\n data: [value],\r\n backgroundColor: colors[this.chartColor].normal,\r\n maxBarThickness: BAR_THICKNESS\r\n },\r\n {\r\n data: [MAX_VALUE - value],\r\n backgroundColor: colors[this.chartColor].light,\r\n maxBarThickness: BAR_THICKNESS\r\n }\r\n ];\r\n }\r\n\r\n return [\r\n {\r\n data: [value, MAX_VALUE - value],\r\n backgroundColor: [\r\n colors[this.chartColor].normal,\r\n colors[this.chartColor].light\r\n ]\r\n }\r\n ];\r\n }\r\n\r\n getScales() {\r\n const fonts = {\r\n fontSize: 12,\r\n fontFamily: 'Atlas Grotesk'\r\n };\r\n\r\n if (this.chartType === 'bar' || this.chartType === 'double-bar') {\r\n return {\r\n scales: {\r\n xAxes: [\r\n {\r\n stacked: true,\r\n gridLines: {\r\n lineWidth: 1\r\n },\r\n ticks: {\r\n ...fonts\r\n }\r\n }\r\n ],\r\n yAxes: [\r\n {\r\n stacked: true,\r\n gridLines: {\r\n lineWidth: 1,\r\n offsetGridLines: false,\r\n drawBorder: false\r\n },\r\n ticks: {\r\n beginAtZero: true,\r\n maxTicksLimit: 2,\r\n display: this.chartType === 'double-bar' ? false : true,\r\n ...fonts\r\n }\r\n }\r\n ]\r\n }\r\n };\r\n }\r\n\r\n return {};\r\n }\r\n\r\n getLabels() {\r\n if (this.chartType === 'double-bar') {\r\n return this.chartLabels.split(',').map((label) => label.trim());\r\n }\r\n\r\n return [];\r\n }\r\n\r\n getType() {\r\n if (this.chartType === 'double-bar') {\r\n return 'bar';\r\n }\r\n\r\n return this.chartType;\r\n }\r\n\r\n initGraph() {\r\n const { $canvasContext } = this.dom;\r\n\r\n this.chart = new Chart($canvasContext, {\r\n type: this.getType(),\r\n data: {\r\n labels: this.getLabels(),\r\n datasets: this.getData()\r\n },\r\n options: {\r\n animation: {\r\n duration: 2000\r\n },\r\n responsive: false,\r\n scaleLabel: {\r\n display: false\r\n },\r\n hover: {\r\n mode: null\r\n },\r\n aspectRatio: 1,\r\n legend: {\r\n display: false\r\n },\r\n tooltips: {\r\n enabled: false\r\n },\r\n yAxes: [\r\n {\r\n type: 'linear',\r\n position: 'left'\r\n }\r\n ],\r\n ...this.getScales()\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default StatsGraph;\r\n","var map = {\n\t\"./af\": 534,\n\t\"./af.js\": 534,\n\t\"./ar\": 535,\n\t\"./ar-dz\": 536,\n\t\"./ar-dz.js\": 536,\n\t\"./ar-kw\": 537,\n\t\"./ar-kw.js\": 537,\n\t\"./ar-ly\": 538,\n\t\"./ar-ly.js\": 538,\n\t\"./ar-ma\": 539,\n\t\"./ar-ma.js\": 539,\n\t\"./ar-ps\": 540,\n\t\"./ar-ps.js\": 540,\n\t\"./ar-sa\": 541,\n\t\"./ar-sa.js\": 541,\n\t\"./ar-tn\": 542,\n\t\"./ar-tn.js\": 542,\n\t\"./ar.js\": 535,\n\t\"./az\": 543,\n\t\"./az.js\": 543,\n\t\"./be\": 544,\n\t\"./be.js\": 544,\n\t\"./bg\": 545,\n\t\"./bg.js\": 545,\n\t\"./bm\": 546,\n\t\"./bm.js\": 546,\n\t\"./bn\": 547,\n\t\"./bn-bd\": 548,\n\t\"./bn-bd.js\": 548,\n\t\"./bn.js\": 547,\n\t\"./bo\": 549,\n\t\"./bo.js\": 549,\n\t\"./br\": 550,\n\t\"./br.js\": 550,\n\t\"./bs\": 551,\n\t\"./bs.js\": 551,\n\t\"./ca\": 552,\n\t\"./ca.js\": 552,\n\t\"./cs\": 553,\n\t\"./cs.js\": 553,\n\t\"./cv\": 554,\n\t\"./cv.js\": 554,\n\t\"./cy\": 555,\n\t\"./cy.js\": 555,\n\t\"./da\": 556,\n\t\"./da.js\": 556,\n\t\"./de\": 557,\n\t\"./de-at\": 558,\n\t\"./de-at.js\": 558,\n\t\"./de-ch\": 559,\n\t\"./de-ch.js\": 559,\n\t\"./de.js\": 557,\n\t\"./dv\": 560,\n\t\"./dv.js\": 560,\n\t\"./el\": 561,\n\t\"./el.js\": 561,\n\t\"./en-au\": 562,\n\t\"./en-au.js\": 562,\n\t\"./en-ca\": 563,\n\t\"./en-ca.js\": 563,\n\t\"./en-gb\": 564,\n\t\"./en-gb.js\": 564,\n\t\"./en-ie\": 565,\n\t\"./en-ie.js\": 565,\n\t\"./en-il\": 566,\n\t\"./en-il.js\": 566,\n\t\"./en-in\": 567,\n\t\"./en-in.js\": 567,\n\t\"./en-nz\": 568,\n\t\"./en-nz.js\": 568,\n\t\"./en-sg\": 569,\n\t\"./en-sg.js\": 569,\n\t\"./eo\": 570,\n\t\"./eo.js\": 570,\n\t\"./es\": 571,\n\t\"./es-do\": 572,\n\t\"./es-do.js\": 572,\n\t\"./es-mx\": 573,\n\t\"./es-mx.js\": 573,\n\t\"./es-us\": 574,\n\t\"./es-us.js\": 574,\n\t\"./es.js\": 571,\n\t\"./et\": 575,\n\t\"./et.js\": 575,\n\t\"./eu\": 576,\n\t\"./eu.js\": 576,\n\t\"./fa\": 577,\n\t\"./fa.js\": 577,\n\t\"./fi\": 578,\n\t\"./fi.js\": 578,\n\t\"./fil\": 579,\n\t\"./fil.js\": 579,\n\t\"./fo\": 580,\n\t\"./fo.js\": 580,\n\t\"./fr\": 581,\n\t\"./fr-ca\": 582,\n\t\"./fr-ca.js\": 582,\n\t\"./fr-ch\": 583,\n\t\"./fr-ch.js\": 583,\n\t\"./fr.js\": 581,\n\t\"./fy\": 584,\n\t\"./fy.js\": 584,\n\t\"./ga\": 585,\n\t\"./ga.js\": 585,\n\t\"./gd\": 586,\n\t\"./gd.js\": 586,\n\t\"./gl\": 587,\n\t\"./gl.js\": 587,\n\t\"./gom-deva\": 588,\n\t\"./gom-deva.js\": 588,\n\t\"./gom-latn\": 589,\n\t\"./gom-latn.js\": 589,\n\t\"./gu\": 590,\n\t\"./gu.js\": 590,\n\t\"./he\": 591,\n\t\"./he.js\": 591,\n\t\"./hi\": 592,\n\t\"./hi.js\": 592,\n\t\"./hr\": 593,\n\t\"./hr.js\": 593,\n\t\"./hu\": 594,\n\t\"./hu.js\": 594,\n\t\"./hy-am\": 595,\n\t\"./hy-am.js\": 595,\n\t\"./id\": 596,\n\t\"./id.js\": 596,\n\t\"./is\": 597,\n\t\"./is.js\": 597,\n\t\"./it\": 598,\n\t\"./it-ch\": 599,\n\t\"./it-ch.js\": 599,\n\t\"./it.js\": 598,\n\t\"./ja\": 600,\n\t\"./ja.js\": 600,\n\t\"./jv\": 601,\n\t\"./jv.js\": 601,\n\t\"./ka\": 602,\n\t\"./ka.js\": 602,\n\t\"./kk\": 603,\n\t\"./kk.js\": 603,\n\t\"./km\": 604,\n\t\"./km.js\": 604,\n\t\"./kn\": 605,\n\t\"./kn.js\": 605,\n\t\"./ko\": 606,\n\t\"./ko.js\": 606,\n\t\"./ku\": 607,\n\t\"./ku-kmr\": 608,\n\t\"./ku-kmr.js\": 608,\n\t\"./ku.js\": 607,\n\t\"./ky\": 609,\n\t\"./ky.js\": 609,\n\t\"./lb\": 610,\n\t\"./lb.js\": 610,\n\t\"./lo\": 611,\n\t\"./lo.js\": 611,\n\t\"./lt\": 612,\n\t\"./lt.js\": 612,\n\t\"./lv\": 613,\n\t\"./lv.js\": 613,\n\t\"./me\": 614,\n\t\"./me.js\": 614,\n\t\"./mi\": 615,\n\t\"./mi.js\": 615,\n\t\"./mk\": 616,\n\t\"./mk.js\": 616,\n\t\"./ml\": 617,\n\t\"./ml.js\": 617,\n\t\"./mn\": 618,\n\t\"./mn.js\": 618,\n\t\"./mr\": 619,\n\t\"./mr.js\": 619,\n\t\"./ms\": 620,\n\t\"./ms-my\": 621,\n\t\"./ms-my.js\": 621,\n\t\"./ms.js\": 620,\n\t\"./mt\": 622,\n\t\"./mt.js\": 622,\n\t\"./my\": 623,\n\t\"./my.js\": 623,\n\t\"./nb\": 624,\n\t\"./nb.js\": 624,\n\t\"./ne\": 625,\n\t\"./ne.js\": 625,\n\t\"./nl\": 626,\n\t\"./nl-be\": 627,\n\t\"./nl-be.js\": 627,\n\t\"./nl.js\": 626,\n\t\"./nn\": 628,\n\t\"./nn.js\": 628,\n\t\"./oc-lnc\": 629,\n\t\"./oc-lnc.js\": 629,\n\t\"./pa-in\": 630,\n\t\"./pa-in.js\": 630,\n\t\"./pl\": 631,\n\t\"./pl.js\": 631,\n\t\"./pt\": 632,\n\t\"./pt-br\": 633,\n\t\"./pt-br.js\": 633,\n\t\"./pt.js\": 632,\n\t\"./ro\": 634,\n\t\"./ro.js\": 634,\n\t\"./ru\": 635,\n\t\"./ru.js\": 635,\n\t\"./sd\": 636,\n\t\"./sd.js\": 636,\n\t\"./se\": 637,\n\t\"./se.js\": 637,\n\t\"./si\": 638,\n\t\"./si.js\": 638,\n\t\"./sk\": 639,\n\t\"./sk.js\": 639,\n\t\"./sl\": 640,\n\t\"./sl.js\": 640,\n\t\"./sq\": 641,\n\t\"./sq.js\": 641,\n\t\"./sr\": 642,\n\t\"./sr-cyrl\": 643,\n\t\"./sr-cyrl.js\": 643,\n\t\"./sr.js\": 642,\n\t\"./ss\": 644,\n\t\"./ss.js\": 644,\n\t\"./sv\": 645,\n\t\"./sv.js\": 645,\n\t\"./sw\": 646,\n\t\"./sw.js\": 646,\n\t\"./ta\": 647,\n\t\"./ta.js\": 647,\n\t\"./te\": 648,\n\t\"./te.js\": 648,\n\t\"./tet\": 649,\n\t\"./tet.js\": 649,\n\t\"./tg\": 650,\n\t\"./tg.js\": 650,\n\t\"./th\": 651,\n\t\"./th.js\": 651,\n\t\"./tk\": 652,\n\t\"./tk.js\": 652,\n\t\"./tl-ph\": 653,\n\t\"./tl-ph.js\": 653,\n\t\"./tlh\": 654,\n\t\"./tlh.js\": 654,\n\t\"./tr\": 655,\n\t\"./tr.js\": 655,\n\t\"./tzl\": 656,\n\t\"./tzl.js\": 656,\n\t\"./tzm\": 657,\n\t\"./tzm-latn\": 658,\n\t\"./tzm-latn.js\": 658,\n\t\"./tzm.js\": 657,\n\t\"./ug-cn\": 659,\n\t\"./ug-cn.js\": 659,\n\t\"./uk\": 660,\n\t\"./uk.js\": 660,\n\t\"./ur\": 661,\n\t\"./ur.js\": 661,\n\t\"./uz\": 662,\n\t\"./uz-latn\": 663,\n\t\"./uz-latn.js\": 663,\n\t\"./uz.js\": 662,\n\t\"./vi\": 664,\n\t\"./vi.js\": 664,\n\t\"./x-pseudo\": 665,\n\t\"./x-pseudo.js\": 665,\n\t\"./yo\": 666,\n\t\"./yo.js\": 666,\n\t\"./zh-cn\": 667,\n\t\"./zh-cn.js\": 667,\n\t\"./zh-hk\": 668,\n\t\"./zh-hk.js\": 668,\n\t\"./zh-mo\": 669,\n\t\"./zh-mo.js\": 669,\n\t\"./zh-tw\": 670,\n\t\"./zh-tw.js\": 670\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 688;","import { Component } from '@verndale/core';\r\nimport Swiper from 'swiper/js/swiper';\r\n\r\nimport breakpoints from '../utils/breakpoints';\r\nimport StatsGraph from '../components/stats-graph';\r\nimport { getGenericSliderConfig } from '../utils/slider';\r\n\r\nclass RoundedStats extends Component {\r\n setupDefaults() {\r\n this.dom = {\r\n $heading: this.el._$('h2'),\r\n $slides: this.el._$$('.swiper-slide'),\r\n $swiperContainer: this.el._$('.swiper-container'),\r\n $cards: this.el._$$('[data-chart-type]')\r\n };\r\n\r\n this.initSlider();\r\n this.dom.$cards.forEach((card) => new StatsGraph(card));\r\n }\r\n\r\n initSlider() {\r\n const { $swiperContainer, $heading } = this.dom;\r\n const element = this.el;\r\n\r\n new Swiper($swiperContainer, {\r\n ...getGenericSliderConfig(element, $heading),\r\n slidesPerView: 1,\r\n spaceBetween: 0,\r\n breakpoints: {\r\n [breakpoints.tablet]: {\r\n slidesPerView: 2,\r\n noSwiping: true\r\n },\r\n [breakpoints.lg]: {\r\n slidesPerView: 3,\r\n noSwiping: true\r\n }\r\n },\r\n on: {\r\n init() {\r\n $swiperContainer.classList.remove('loading');\r\n $swiperContainer.classList.add('loaded');\r\n }\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default RoundedStats;\r\n"],"sourceRoot":""}