diff --git a/.gitignore b/.gitignore index c5cfd053a..9f67b5e44 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ log/ tmp/ *.js.map *.scssc +*.ruby-version node_modules/ config.php composer.lock diff --git a/.scss-lint.yml b/.scss-lint.yml index aa6ab2e61..24cd71fd7 100644 --- a/.scss-lint.yml +++ b/.scss-lint.yml @@ -168,7 +168,7 @@ linters: Shorthand: enabled: true - allowed_shorthands: [1, 2, 3] + allowed_shorthands: [1, 2, 3, 4] SingleLinePerProperty: enabled: true @@ -251,4 +251,3 @@ linters: Compass::*: enabled: false - \ No newline at end of file diff --git a/javascripts/langviews/langviews.js b/javascripts/langviews/langviews.js index 36556d6f4..3b0a0e844 100644 --- a/javascripts/langviews/langviews.js +++ b/javascripts/langviews/langviews.js @@ -505,36 +505,16 @@ class LangViews extends mix(Pv).with(ChartHelpers, ListHelpers) { * @returns {null} nothing */ popParams() { - let startDate, endDate, params = this.parseQueryString('pages'); + let params = this.parseQueryString('pages'); $(this.config.projectInput).val(params.project || this.config.defaults.project); if (this.validateProject()) return; this.patchUsage('lv'); - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < this.config.minDate || endDate < this.config.minDate) { - this.addSiteNotice('danger', $.i18n('param-error-1', `${$.i18n('july')} 2015`), $.i18n('invalid-params'), true); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - return; - } - this.daterangepicker.setStartDate(startDate); - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); + // if date range is invalid, remove page from params so we don't process the default date range + if (!this.checkDateRange(params)) { + delete params.page; } $(this.config.platformSelector).val(params.platform || 'all-access'); diff --git a/javascripts/massviews/massviews.js b/javascripts/massviews/massviews.js index ed29c2014..9a1ebff72 100644 --- a/javascripts/massviews/massviews.js +++ b/javascripts/massviews/massviews.js @@ -481,7 +481,7 @@ class MassViews extends mix(Pv).with(ChartHelpers, ListHelpers) { * @returns {null} nothing */ popParams() { - let startDate, endDate, params = this.parseQueryString(); + let params = this.parseQueryString(); this.patchUsage('mv'); @@ -499,29 +499,9 @@ class MassViews extends mix(Pv).with(ChartHelpers, ListHelpers) { ); } - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < moment('2015-08-01') || endDate < moment('2015-08-01')) { - this.addSiteNotice('danger', $.i18n('param-error-1'), $.i18n('invalid-params'), true); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - return; - } - this.daterangepicker.setStartDate(startDate); - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); + // if date range is invalid, remove target so we don't process the default date range + if (!this.checkDateRange(params)) { + delete params.target; } $(this.config.platformSelector).val(params.platform || 'all-access'); diff --git a/javascripts/pageviews.js b/javascripts/pageviews.js index d271019a7..671a8fe68 100644 --- a/javascripts/pageviews.js +++ b/javascripts/pageviews.js @@ -98,40 +98,13 @@ class PageViews extends mix(Pv).with(ChartHelpers) { /** show loading indicator and add error handling for timeouts */ this.startSpinny(); - let startDate, endDate, params = this.parseQueryString('pages'); + let params = this.parseQueryString('pages'); $(this.config.projectInput).val(params.project || this.config.defaults.project); if (this.validateProject()) return; this.patchUsage('pv'); - - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < this.config.minDate || endDate < this.config.minDate) { - this.addSiteNotice('danger', $.i18n('param-error-1', `${$.i18n('july')} 2015`), $.i18n('invalid-params'), true); - this.resetView(); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - this.resetView(); - return; - } - /** directly assign startDate before calling setEndDate so events will be fired once */ - this.daterangepicker.startDate = startDate; - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); - } + this.checkDateRange(params); $(this.config.platformSelector).val(params.platform || 'all-access'); $('#agent-select').val(params.agent || 'user'); diff --git a/javascripts/redirectviews/redirectviews.js b/javascripts/redirectviews/redirectviews.js index d0d240706..cdb6db17d 100644 --- a/javascripts/redirectviews/redirectviews.js +++ b/javascripts/redirectviews/redirectviews.js @@ -473,36 +473,16 @@ class RedirectViews extends mix(Pv).with(ChartHelpers, ListHelpers) { * @returns {null} nothing */ popParams() { - let startDate, endDate, params = this.parseQueryString('pages'); + let params = this.parseQueryString('pages'); $(this.config.projectInput).val(params.project || this.config.defaults.project); if (this.validateProject()) return; this.patchUsage('rv'); - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < this.config.minDate || endDate < this.config.minDate) { - this.addSiteNotice('danger', $.i18n('param-error-1', `${$.i18n('july')} 2015`), $.i18n('invalid-params'), true); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - return; - } - this.daterangepicker.setStartDate(startDate); - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); + // if date range is invalid, remove page from params so we don't process the default date range + if (!this.checkDateRange(params)) { + delete params.page; } $(this.config.platformSelector).val(params.platform || 'all-access'); diff --git a/javascripts/shared/pv.js b/javascripts/shared/pv.js index 2417d5ed5..c407acabe 100644 --- a/javascripts/shared/pv.js +++ b/javascripts/shared/pv.js @@ -94,6 +94,43 @@ class Pv extends PvConfig { ); } + /** + * Check the validity of the date range of given params + * and throw errors as necessary and/or set defaults + * @param {Object} params - as returned by this.parseQueryString() + * @returns {Boolean} true if there were no errors, false otherwise + */ + checkDateRange(params) { + if (params.range) { + if (!this.setSpecialRange(params.range)) { + this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); + this.setSpecialRange(this.config.defaults.dateRange); + } + } else if (params.start) { + const startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')), + endDate = moment(params.end || Date.now()); + + if (startDate < this.config.minDate || endDate < this.config.minDate) { + this.addSiteNotice('danger', + $.i18n('param-error-1', moment(this.config.minDate).format(this.dateFormat)), + $.i18n('invalid-params'), + true + ); + return false; + } else if (startDate > endDate) { + this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); + return false; + } + /** directly assign startDate before calling setEndDate so events will be fired once */ + this.daterangepicker.startDate = startDate; + this.daterangepicker.setEndDate(endDate); + } else { + this.setSpecialRange(this.config.defaults.dateRange); + } + + return true; + } + clearSiteNotices() { $('.site-notice').html(''); } diff --git a/javascripts/siteviews/siteviews.js b/javascripts/siteviews/siteviews.js index e32b669ed..a582e56ab 100644 --- a/javascripts/siteviews/siteviews.js +++ b/javascripts/siteviews/siteviews.js @@ -58,37 +58,10 @@ class SiteViews extends mix(Pv).with(ChartHelpers) { popParams() { this.startSpinny(); - let startDate, endDate, params = this.parseQueryString('sites'); + let params = this.parseQueryString('sites'); this.patchUsage('sv'); - - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < this.config.minDate || endDate < this.config.minDate) { - this.addSiteNotice('danger', $.i18n('param-error-1', `${$.i18n('july')} 2015`), $.i18n('invalid-params'), true); - this.resetView(); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - this.resetView(); - return; - } - /** directly assign startDate before calling setEndDate so events will be fired once */ - this.daterangepicker.startDate = startDate; - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); - } + this.checkDateRange(params); $(this.config.dataSourceSelector).val(params.source || 'pageviews'); diff --git a/public_html/application.js b/public_html/application.js index c618b19bd..9d828a65f 100644 --- a/public_html/application.js +++ b/public_html/application.js @@ -10,7 +10,7 @@ if(this.timePicker){var h=parseInt(this.container.find(".left .hourselect").val( }return e.getPixelForValue(f)}return e.getBasePixel()},getRuler:function(a){var b,c=this,d=c.getMeta(),e=c.getScaleForId(d.xAxisID),f=c.getBarCount();b="category"===e.options.type?e.getPixelForTick(a+1)-e.getPixelForTick(a):e.width/e.ticks.length;var g=b*e.options.categoryPercentage,h=(b-b*e.options.categoryPercentage)/2,i=g/f;if(e.ticks.length!==c.chart.data.labels.length){var j=e.ticks.length/c.chart.data.labels.length;i*=j}var k=i*e.options.barPercentage,l=i-i*e.options.barPercentage;return{datasetCount:f,tickWidth:b,categoryWidth:g,categorySpacing:h,fullBarWidth:i,barWidth:k,barSpacing:l}},calculateBarWidth:function(a){var b=this.getScaleForId(this.getMeta().xAxisID),c=this.getRuler(a);return b.options.stacked?c.categoryWidth:c.barWidth},getBarIndex:function(a){var b,c,d=0;for(c=0;a>c;++c)b=this.chart.getDatasetMeta(c),b.bar&&this.chart.isDatasetVisible(c)&&++d;return d},calculateBarX:function(a,b){var c=this,d=c.getMeta(),e=c.getScaleForId(d.xAxisID),f=c.getBarIndex(b),g=c.getRuler(a),h=e.getPixelForValue(null,a,b,c.chart.isCombo);return h-=c.chart.isCombo?g.tickWidth/2:0,e.options.stacked?h+g.categoryWidth/2+g.categorySpacing:h+g.barWidth/2+g.categorySpacing+g.barWidth*f+g.barSpacing/2+g.barSpacing*f},calculateBarY:function(a,b){var c=this,d=c.getMeta(),e=c.getScaleForId(d.yAxisID),f=c.getDataset().data[a];if(e.options.stacked){for(var g=0,h=0,i=0;b>i;i++){var j=c.chart.data.datasets[i],k=c.chart.getDatasetMeta(i);k.bar&&k.yAxisID===e.id&&c.chart.isDatasetVisible(i)&&(j.data[a]<0?h+=j.data[a]||0:g+=j.data[a]||0)}return 0>f?e.getPixelForValue(h+f):e.getPixelForValue(g+f)}return e.getPixelForValue(f)},draw:function(a){var c=this,d=a||1;b.each(c.getMeta().data,function(a,b){var e=c.getDataset().data[b];null===e||void 0===e||isNaN(e)||a.transition(d).draw()},c)},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=a._model;f.backgroundColor=e.hoverBackgroundColor?e.hoverBackgroundColor:b.getValueAtIndexOrDefault(c.hoverBackgroundColor,d,b.getHoverColor(f.backgroundColor)),f.borderColor=e.hoverBorderColor?e.hoverBorderColor:b.getValueAtIndexOrDefault(c.hoverBorderColor,d,b.getHoverColor(f.borderColor)),f.borderWidth=e.hoverBorderWidth?e.hoverBorderWidth:b.getValueAtIndexOrDefault(c.hoverBorderWidth,d,f.borderWidth)},removeHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=a._model,g=this.chart.options.elements.rectangle;f.backgroundColor=e.backgroundColor?e.backgroundColor:b.getValueAtIndexOrDefault(c.backgroundColor,d,g.backgroundColor),f.borderColor=e.borderColor?e.borderColor:b.getValueAtIndexOrDefault(c.borderColor,d,g.borderColor),f.borderWidth=e.borderWidth?e.borderWidth:b.getValueAtIndexOrDefault(c.borderWidth,d,g.borderWidth)}}),a.defaults.horizontalBar={hover:{mode:"label"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(a,b){var c="";return a.length>0&&(a[0].yLabel?c=a[0].yLabel:b.labels.length>0&&a[0].indexl;l++)b.lineTo.apply(b,a(l));b.fill(),c.borderWidth&&b.stroke()},inRange:function(a,b){var c=this._view,d=!1;return c&&(d=c.x=c.y-c.height/2&&b<=c.y+c.height/2&&a>=c.x&&a<=c.base:b>=c.y-c.height/2&&b<=c.y+c.height/2&&a>=c.base&&a<=c.x),d}}),a.pivot()},calculateBarBase:function(a,b){var c=this,d=c.getMeta(),e=c.getScaleForId(d.xAxisID),f=0;if(e.options.stacked){var g=c.chart.data.datasets[a].data[b];if(0>g)for(var h=0;a>h;h++){var i=c.chart.data.datasets[h],j=c.chart.getDatasetMeta(h);j.bar&&j.xAxisID===e.id&&c.chart.isDatasetVisible(h)&&(f+=i.data[b]<0?i.data[b]:0)}else for(var k=0;a>k;k++){var l=c.chart.data.datasets[k],m=c.chart.getDatasetMeta(k);m.bar&&m.xAxisID===e.id&&c.chart.isDatasetVisible(k)&&(f+=l.data[b]>0?l.data[b]:0)}return e.getPixelForValue(f)}return e.getBasePixel()},getRuler:function(a){var b,c=this,d=c.getMeta(),e=c.getScaleForId(d.yAxisID),f=c.getBarCount();b="category"===e.options.type?e.getPixelForTick(a+1)-e.getPixelForTick(a):e.width/e.ticks.length;var g=b*e.options.categoryPercentage,h=(b-b*e.options.categoryPercentage)/2,i=g/f;if(e.ticks.length!==c.chart.data.labels.length){var j=e.ticks.length/c.chart.data.labels.length;i*=j}var k=i*e.options.barPercentage,l=i-i*e.options.barPercentage;return{datasetCount:f,tickHeight:b,categoryHeight:g,categorySpacing:h,fullBarHeight:i,barHeight:k,barSpacing:l}},calculateBarHeight:function(a){var b=this,c=b.getScaleForId(b.getMeta().yAxisID),d=b.getRuler(a);return c.options.stacked?d.categoryHeight:d.barHeight},calculateBarX:function(a,b){var c=this,d=c.getMeta(),e=c.getScaleForId(d.xAxisID),f=c.getDataset().data[a];if(e.options.stacked){for(var g=0,h=0,i=0;b>i;i++){var j=c.chart.data.datasets[i],k=c.chart.getDatasetMeta(i);k.bar&&k.xAxisID===e.id&&c.chart.isDatasetVisible(i)&&(j.data[a]<0?h+=j.data[a]||0:g+=j.data[a]||0)}return 0>f?e.getPixelForValue(h+f):e.getPixelForValue(g+f)}return e.getPixelForValue(f)},calculateBarY:function(a,b){var c=this,d=c.getMeta(),e=c.getScaleForId(d.yAxisID),f=c.getBarIndex(b),g=c.getRuler(a),h=e.getPixelForValue(null,a,b,c.chart.isCombo);return h-=c.chart.isCombo?g.tickHeight/2:0,e.options.stacked?h+g.categoryHeight/2+g.categorySpacing:h+g.barHeight/2+g.categorySpacing+g.barHeight*f+g.barSpacing/2+g.barSpacing*f}})}},{}],16:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.bubble={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(a,b){return""},label:function(a,b){var c=b.datasets[a.datasetIndex].label||"",d=b.datasets[a.datasetIndex].data[a.index];return c+": ("+d.x+", "+d.y+", "+d.r+")"}}}},a.controllers.bubble=a.DatasetController.extend({dataElementType:a.elements.Point,update:function(a){var c=this,d=c.getMeta(),e=d.data;b.each(e,function(b,d){c.updateElement(b,d,a)})},updateElement:function(c,d,e){var f=this,g=f.getMeta(),h=f.getScaleForId(g.xAxisID),i=f.getScaleForId(g.yAxisID),j=c.custom||{},k=f.getDataset(),l=k.data[d],m=f.chart.options.elements.point,n=f.index;b.extend(c,{_xScale:h,_yScale:i,_datasetIndex:n,_index:d,_model:{x:e?h.getPixelForDecimal(.5):h.getPixelForValue(l,d,n,f.chart.isCombo),y:e?i.getBasePixel():i.getPixelForValue(l,d,n),radius:e?0:j.radius?j.radius:f.getRadius(l),hitRadius:j.hitRadius?j.hitRadius:b.getValueAtIndexOrDefault(k.hitRadius,d,m.hitRadius)}}),a.DatasetController.prototype.removeHoverStyle.call(f,c,m);var o=c._model;o.skip=j.skip?j.skip:isNaN(o.x)||isNaN(o.y),c.pivot()},getRadius:function(a){return a.r||this.chart.options.elements.point.radius},setHoverStyle:function(c){var d=this;a.DatasetController.prototype.setHoverStyle.call(d,c);var e=d.chart.data.datasets[c._datasetIndex],f=c._index,g=c.custom||{},h=c._model;h.radius=g.hoverRadius?g.hoverRadius:b.getValueAtIndexOrDefault(e.hoverRadius,f,d.chart.options.elements.point.hoverRadius)+d.getRadius(e.data[f])},removeHoverStyle:function(b){var c=this;a.DatasetController.prototype.removeHoverStyle.call(c,b,c.chart.options.elements.point);var d=c.chart.data.datasets[b._datasetIndex].data[b._index],e=b.custom||{},f=b._model;f.radius=e.radius?e.radius:c.getRadius(d)}})}},{}],17:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults;c.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(a){var b=[];b.push('"),b.join("")},legend:{labels:{generateLabels:function(a){var c=a.data;return c.labels.length&&c.datasets.length?c.labels.map(function(d,e){var f=a.getDatasetMeta(0),g=c.datasets[0],h=f.data[e],i=h.custom||{},j=b.getValueAtIndexOrDefault,k=a.options.elements.arc,l=i.backgroundColor?i.backgroundColor:j(g.backgroundColor,e,k.backgroundColor),m=i.borderColor?i.borderColor:j(g.borderColor,e,k.borderColor),n=i.borderWidth?i.borderWidth:j(g.borderWidth,e,k.borderWidth);return{text:d,fillStyle:l,strokeStyle:m,lineWidth:n,hidden:isNaN(g.data[e])||f.data[e].hidden,index:e}}):[]}},onClick:function(a,b){var c,d,e,f=b.index,g=this.chart;for(c=0,d=(g.data.datasets||[]).length;d>c;++c)e=g.getDatasetMeta(c),e.data[f].hidden=!e.data[f].hidden;g.update()}},cutoutPercentage:50,rotation:Math.PI*-.5,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(a,b){return b.labels[a.index]+": "+b.datasets[a.datasetIndex].data[a.index]}}}},c.pie=b.clone(c.doughnut),b.extend(c.pie,{cutoutPercentage:0}),a.controllers.doughnut=a.controllers.pie=a.DatasetController.extend({dataElementType:a.elements.Arc,linkScales:b.noop,getRingIndex:function(a){for(var b=0,c=0;a>c;++c)this.chart.isDatasetVisible(c)&&++b;return b},update:function(a){var c=this,d=c.chart,e=d.chartArea,f=d.options,g=f.elements.arc,h=e.right-e.left-g.borderWidth,i=e.bottom-e.top-g.borderWidth,j=Math.min(h,i),k={x:0,y:0},l=c.getMeta(),m=f.cutoutPercentage,n=f.circumference;if(n<2*Math.PI){var o=f.rotation%(2*Math.PI);o+=2*Math.PI*(o>=Math.PI?-1:o<-Math.PI?1:0);var p=o+n,q={x:Math.cos(o),y:Math.sin(o)},r={x:Math.cos(p),y:Math.sin(p)},s=0>=o&&p>=0||o<=2*Math.PI&&2*Math.PI<=p,t=o<=.5*Math.PI&&.5*Math.PI<=p||o<=2.5*Math.PI&&2.5*Math.PI<=p,u=o<=-Math.PI&&-Math.PI<=p||o<=Math.PI&&Math.PI<=p,v=o<=.5*-Math.PI&&.5*-Math.PI<=p||o<=1.5*Math.PI&&1.5*Math.PI<=p,w=m/100,x={x:u?-1:Math.min(q.x*(q.x<0?1:w),r.x*(r.x<0?1:w)),y:v?-1:Math.min(q.y*(q.y<0?1:w),r.y*(r.y<0?1:w))},y={x:s?1:Math.max(q.x*(q.x>0?1:w),r.x*(r.x>0?1:w)),y:t?1:Math.max(q.y*(q.y>0?1:w),r.y*(r.y>0?1:w))},z={width:.5*(y.x-x.x),height:.5*(y.y-x.y)};j=Math.min(h/z.width,i/z.height),k={x:(y.x+x.x)*-.5,y:(y.y+x.y)*-.5}}d.outerRadius=Math.max(j/2,0),d.innerRadius=Math.max(m?d.outerRadius/100*m:1,0),d.radiusLength=(d.outerRadius-d.innerRadius)/d.getVisibleDatasetCount(),d.offsetX=k.x*d.outerRadius,d.offsetY=k.y*d.outerRadius,l.total=c.calculateTotal(),c.outerRadius=d.outerRadius-d.radiusLength*c.getRingIndex(c.index),c.innerRadius=c.outerRadius-d.radiusLength,b.each(l.data,function(b,d){c.updateElement(b,d,a)})},updateElement:function(a,c,d){var e=this,f=e.chart,g=f.chartArea,h=f.options,i=h.animation,j=(h.elements.arc,(g.left+g.right)/2),k=(g.top+g.bottom)/2,l=h.rotation,m=h.rotation,n=e.getDataset(),o=d&&i.animateRotate?0:a.hidden?0:e.calculateCircumference(n.data[c])*(h.circumference/(2*Math.PI)),p=d&&i.animateScale?0:e.innerRadius,q=d&&i.animateScale?0:e.outerRadius,r=(a.custom||{},b.getValueAtIndexOrDefault);b.extend(a,{_datasetIndex:e.index,_index:c,_model:{x:j+f.offsetX,y:k+f.offsetY,startAngle:l,endAngle:m,circumference:o,outerRadius:q,innerRadius:p,label:r(n.label,c,f.data.labels[c])}});var s=a._model;this.removeHoverStyle(a),d&&i.animateRotate||(0===c?s.startAngle=h.rotation:s.startAngle=e.getMeta().data[c-1]._model.endAngle,s.endAngle=s.startAngle+s.circumference),a.pivot()},removeHoverStyle:function(b){a.DatasetController.prototype.removeHoverStyle.call(this,b,this.chart.options.elements.arc)},calculateTotal:function(){var a,c=this.getDataset(),d=this.getMeta(),e=0;return b.each(d.data,function(b,d){a=c.data[d],isNaN(a)||b.hidden||(e+=Math.abs(a))}),e},calculateCircumference:function(a){var b=this.getMeta().total;return b>0&&!isNaN(a)?2*Math.PI*(a/b):0}})}},{}],18:[function(a,b,c){"use strict";b.exports=function(a){function b(a,b){return c.getValueOrDefault(a.showLine,b.showLines)}var c=a.helpers;a.defaults.line={showLines:!0,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},a.controllers.line=a.DatasetController.extend({datasetElementType:a.elements.Line,dataElementType:a.elements.Point,addElementAndReset:function(c){var d=this,e=d.chart.options,f=d.getMeta();a.DatasetController.prototype.addElementAndReset.call(d,c),b(d.getDataset(),e)&&0!==f.dataset._model.tension&&d.updateBezierControlPoints()},update:function(a){var d,e,f,g=this,h=g.getMeta(),i=h.dataset,j=h.data||[],k=g.chart.options,l=k.elements.line,m=g.getScaleForId(h.yAxisID),n=g.getDataset(),o=b(n,k);for(o&&(f=i.custom||{},void 0!==n.tension&&void 0===n.lineTension&&(n.lineTension=n.tension),i._scale=m,i._datasetIndex=g.index,i._children=j,i._model={spanGaps:n.spanGaps?n.spanGaps:!1,tension:f.tension?f.tension:c.getValueOrDefault(n.lineTension,l.tension),backgroundColor:f.backgroundColor?f.backgroundColor:n.backgroundColor||l.backgroundColor,borderWidth:f.borderWidth?f.borderWidth:n.borderWidth||l.borderWidth,borderColor:f.borderColor?f.borderColor:n.borderColor||l.borderColor,borderCapStyle:f.borderCapStyle?f.borderCapStyle:n.borderCapStyle||l.borderCapStyle,borderDash:f.borderDash?f.borderDash:n.borderDash||l.borderDash,borderDashOffset:f.borderDashOffset?f.borderDashOffset:n.borderDashOffset||l.borderDashOffset,borderJoinStyle:f.borderJoinStyle?f.borderJoinStyle:n.borderJoinStyle||l.borderJoinStyle,fill:f.fill?f.fill:void 0!==n.fill?n.fill:l.fill,scaleTop:m.top,scaleBottom:m.bottom,scaleZero:m.getBasePixel()},i.pivot()),d=0,e=j.length;e>d;++d)g.updateElement(j[d],d,a);for(o&&0!==i._model.tension&&g.updateBezierControlPoints(),d=0,e=j.length;e>d;++d)j[d].pivot()},getPointBackgroundColor:function(a,b){var d=this.chart.options.elements.point.backgroundColor,e=this.getDataset(),f=a.custom||{};return f.backgroundColor?d=f.backgroundColor:e.pointBackgroundColor?d=c.getValueAtIndexOrDefault(e.pointBackgroundColor,b,d):e.backgroundColor&&(d=e.backgroundColor),d},getPointBorderColor:function(a,b){var d=this.chart.options.elements.point.borderColor,e=this.getDataset(),f=a.custom||{};return f.borderColor?d=f.borderColor:e.pointBorderColor?d=c.getValueAtIndexOrDefault(e.pointBorderColor,b,d):e.borderColor&&(d=e.borderColor),d},getPointBorderWidth:function(a,b){var d=this.chart.options.elements.point.borderWidth,e=this.getDataset(),f=a.custom||{};return f.borderWidth?d=f.borderWidth:e.pointBorderWidth?d=c.getValueAtIndexOrDefault(e.pointBorderWidth,b,d):e.borderWidth&&(d=e.borderWidth),d},updateElement:function(a,b,d){var e,f,g=this,h=g.getMeta(),i=a.custom||{},j=g.getDataset(),k=g.index,l=j.data[b],m=g.getScaleForId(h.yAxisID),n=g.getScaleForId(h.xAxisID),o=g.chart.options.elements.point;void 0!==j.radius&&void 0===j.pointRadius&&(j.pointRadius=j.radius),void 0!==j.hitRadius&&void 0===j.pointHitRadius&&(j.pointHitRadius=j.hitRadius),e=n.getPixelForValue(l,b,k,g.chart.isCombo),f=d?m.getBasePixel():g.calculatePointY(l,b,k,g.chart.isCombo),a._xScale=n,a._yScale=m,a._datasetIndex=k,a._index=b,a._model={x:e,y:f,skip:i.skip||isNaN(e)||isNaN(f),radius:i.radius||c.getValueAtIndexOrDefault(j.pointRadius,b,o.radius),pointStyle:i.pointStyle||c.getValueAtIndexOrDefault(j.pointStyle,b,o.pointStyle),backgroundColor:g.getPointBackgroundColor(a,b),borderColor:g.getPointBorderColor(a,b),borderWidth:g.getPointBorderWidth(a,b),tension:h.dataset._model?h.dataset._model.tension:0,hitRadius:i.hitRadius||c.getValueAtIndexOrDefault(j.pointHitRadius,b,o.hitRadius)}},calculatePointY:function(a,b,c,d){var e,f,g,h=this,i=h.chart,j=h.getMeta(),k=h.getScaleForId(j.yAxisID),l=0,m=0;if(k.options.stacked){for(e=0;c>e;e++)f=i.data.datasets[e],g=i.getDatasetMeta(e),"line"===g.type&&i.isDatasetVisible(e)&&(f.data[b]<0?m+=f.data[b]||0:l+=f.data[b]||0);return 0>a?k.getPixelForValue(m+a):k.getPixelForValue(l+a)}return k.getPixelForValue(a)},updateBezierControlPoints:function(){var a,b,d,e,f,g=this.getMeta(),h=(this.chart.chartArea,g.data||[]);for(a=0,b=h.length;b>a;++a)d=h[a],e=d._model,f=c.splineCurve(c.previousItem(h,a)._model,e,c.nextItem(h,a)._model,g.dataset._model.tension),e.controlPointPreviousX=f.previous.x,e.controlPointPreviousY=f.previous.y,e.controlPointNextX=f.next.x,e.controlPointNextY=f.next.y},draw:function(a){var c,d,e=this,f=e.getMeta(),g=f.data||[],h=a||1;for(c=0,d=g.length;d>c;++c)g[c].transition(h);for(b(e.getDataset(),e.chart.options)&&f.dataset.transition(h).draw(),c=0,d=g.length;d>c;++c)g[c].draw()},setHoverStyle:function(a){var b=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=a._model;f.radius=e.hoverRadius||c.getValueAtIndexOrDefault(b.pointHoverRadius,d,this.chart.options.elements.point.hoverRadius),f.backgroundColor=e.hoverBackgroundColor||c.getValueAtIndexOrDefault(b.pointHoverBackgroundColor,d,c.getHoverColor(f.backgroundColor)),f.borderColor=e.hoverBorderColor||c.getValueAtIndexOrDefault(b.pointHoverBorderColor,d,c.getHoverColor(f.borderColor)),f.borderWidth=e.hoverBorderWidth||c.getValueAtIndexOrDefault(b.pointHoverBorderWidth,d,f.borderWidth)},removeHoverStyle:function(a){var b=this,d=b.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=a._model;void 0!==d.radius&&void 0===d.pointRadius&&(d.pointRadius=d.radius),g.radius=f.radius||c.getValueAtIndexOrDefault(d.pointRadius,e,b.chart.options.elements.point.radius),g.backgroundColor=b.getPointBackgroundColor(a,e),g.borderColor=b.getPointBorderColor(a,e),g.borderWidth=b.getPointBorderWidth(a,e)}})}},{}],19:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0},animation:{animateRotate:!0,animateScale:!0},aspectRatio:1,legendCallback:function(a){var b=[];b.push('"),b.join("")},legend:{labels:{generateLabels:function(a){var c=a.data;return c.labels.length&&c.datasets.length?c.labels.map(function(d,e){var f=a.getDatasetMeta(0),g=c.datasets[0],h=f.data[e],i=h.custom||{},j=b.getValueAtIndexOrDefault,k=a.options.elements.arc,l=i.backgroundColor?i.backgroundColor:j(g.backgroundColor,e,k.backgroundColor),m=i.borderColor?i.borderColor:j(g.borderColor,e,k.borderColor),n=i.borderWidth?i.borderWidth:j(g.borderWidth,e,k.borderWidth);return{text:d,fillStyle:l,strokeStyle:m,lineWidth:n,hidden:isNaN(g.data[e])||f.data[e].hidden,index:e}}):[]}},onClick:function(a,b){var c,d,e,f=b.index,g=this.chart;for(c=0,d=(g.data.datasets||[]).length;d>c;++c)e=g.getDatasetMeta(c),e.data[f].hidden=!e.data[f].hidden;g.update()}},tooltips:{callbacks:{title:function(){return""},label:function(a,b){return b.labels[a.index]+": "+a.yLabel}}}},a.controllers.polarArea=a.DatasetController.extend({dataElementType:a.elements.Arc,linkScales:b.noop,update:function(a){var c=this,d=c.chart,e=d.chartArea,f=c.getMeta(),g=d.options,h=g.elements.arc,i=Math.min(e.right-e.left,e.bottom-e.top);d.outerRadius=Math.max((i-h.borderWidth/2)/2,0),d.innerRadius=Math.max(g.cutoutPercentage?d.outerRadius/100*g.cutoutPercentage:1,0),d.radiusLength=(d.outerRadius-d.innerRadius)/d.getVisibleDatasetCount(),c.outerRadius=d.outerRadius-d.radiusLength*c.index,c.innerRadius=c.outerRadius-d.radiusLength,f.count=c.countVisibleElements(),b.each(f.data,function(b,d){c.updateElement(b,d,a)})},updateElement:function(a,c,d){for(var e=this,f=e.chart,g=f.chartArea,h=e.getDataset(),i=f.options,j=i.animation,k=(i.elements.arc,a.custom||{},f.scale),l=b.getValueAtIndexOrDefault,m=f.data.labels,n=e.calculateCircumference(h.data[c]),o=(g.left+g.right)/2,p=(g.top+g.bottom)/2,q=0,r=e.getMeta(),s=0;c>s;++s)isNaN(h.data[s])||r.data[s].hidden||++q;var t=-.5*Math.PI,u=a.hidden?0:k.getDistanceFromCenterForValue(h.data[c]),v=t+n*q,w=v+(a.hidden?0:n),x=j.animateScale?0:k.getDistanceFromCenterForValue(h.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:k,_model:{x:o,y:p,innerRadius:0,outerRadius:d?x:u,startAngle:d&&j.animateRotate?t:v,endAngle:d&&j.animateRotate?t:w,label:l(m,c,m[c])}}),e.removeHoverStyle(a),a.pivot()},removeHoverStyle:function(b){a.DatasetController.prototype.removeHoverStyle.call(this,b,this.chart.options.elements.arc)},countVisibleElements:function(){var a=this.getDataset(),c=this.getMeta(),d=0;return b.each(c.data,function(b,c){isNaN(a.data[c])||b.hidden||d++}),d},calculateCircumference:function(a){var b=this.getMeta().count;return b>0&&!isNaN(a)?2*Math.PI/b:0}})}},{}],20:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},a.controllers.radar=a.DatasetController.extend({datasetElementType:a.elements.Line,dataElementType:a.elements.Point,linkScales:b.noop,addElementAndReset:function(b){a.DatasetController.prototype.addElementAndReset.call(this,b),this.updateBezierControlPoints()},update:function(a){var c=this,d=c.getMeta(),e=d.dataset,f=d.data,g=e.custom||{},h=c.getDataset(),i=c.chart.options.elements.line,j=c.chart.scale;void 0!==h.tension&&void 0===h.lineTension&&(h.lineTension=h.tension),b.extend(d.dataset,{_datasetIndex:c.index,_children:f,_loop:!0,_model:{tension:g.tension?g.tension:b.getValueOrDefault(h.lineTension,i.tension),backgroundColor:g.backgroundColor?g.backgroundColor:h.backgroundColor||i.backgroundColor,borderWidth:g.borderWidth?g.borderWidth:h.borderWidth||i.borderWidth,borderColor:g.borderColor?g.borderColor:h.borderColor||i.borderColor,fill:g.fill?g.fill:void 0!==h.fill?h.fill:i.fill,borderCapStyle:g.borderCapStyle?g.borderCapStyle:h.borderCapStyle||i.borderCapStyle,borderDash:g.borderDash?g.borderDash:h.borderDash||i.borderDash,borderDashOffset:g.borderDashOffset?g.borderDashOffset:h.borderDashOffset||i.borderDashOffset,borderJoinStyle:g.borderJoinStyle?g.borderJoinStyle:h.borderJoinStyle||i.borderJoinStyle,scaleTop:j.top,scaleBottom:j.bottom,scaleZero:j.getBasePosition()}}),d.dataset.pivot(),b.each(f,function(b,d){c.updateElement(b,d,a)},c),c.updateBezierControlPoints()},updateElement:function(a,c,d){var e=this,f=a.custom||{},g=e.getDataset(),h=e.chart.scale,i=e.chart.options.elements.point,j=h.getPointPositionForValue(c,g.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:h,_model:{x:d?h.xCenter:j.x,y:d?h.yCenter:j.y,tension:f.tension?f.tension:b.getValueOrDefault(g.tension,e.chart.options.elements.line.tension),radius:f.radius?f.radius:b.getValueAtIndexOrDefault(g.pointRadius,c,i.radius),backgroundColor:f.backgroundColor?f.backgroundColor:b.getValueAtIndexOrDefault(g.pointBackgroundColor,c,i.backgroundColor),borderColor:f.borderColor?f.borderColor:b.getValueAtIndexOrDefault(g.pointBorderColor,c,i.borderColor),borderWidth:f.borderWidth?f.borderWidth:b.getValueAtIndexOrDefault(g.pointBorderWidth,c,i.borderWidth),pointStyle:f.pointStyle?f.pointStyle:b.getValueAtIndexOrDefault(g.pointStyle,c,i.pointStyle),hitRadius:f.hitRadius?f.hitRadius:b.getValueAtIndexOrDefault(g.hitRadius,c,i.hitRadius)}}),a._model.skip=f.skip?f.skip:isNaN(a._model.x)||isNaN(a._model.y)},updateBezierControlPoints:function(){var a=this.chart.chartArea,c=this.getMeta();b.each(c.data,function(d,e){var f=d._model,g=b.splineCurve(b.previousItem(c.data,e,!0)._model,f,b.nextItem(c.data,e,!0)._model,f.tension);f.controlPointPreviousX=Math.max(Math.min(g.previous.x,a.right),a.left),f.controlPointPreviousY=Math.max(Math.min(g.previous.y,a.bottom),a.top),f.controlPointNextX=Math.max(Math.min(g.next.x,a.right),a.left),f.controlPointNextY=Math.max(Math.min(g.next.y,a.bottom),a.top),d.pivot()})},draw:function(a){var c=this.getMeta(),d=a||1;b.each(c.data,function(a,b){a.transition(d)}),c.dataset.transition(d).draw(),b.each(c.data,function(a){a.draw()})},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model;f.radius=d.hoverRadius?d.hoverRadius:b.getValueAtIndexOrDefault(c.pointHoverRadius,e,this.chart.options.elements.point.hoverRadius),f.backgroundColor=d.hoverBackgroundColor?d.hoverBackgroundColor:b.getValueAtIndexOrDefault(c.pointHoverBackgroundColor,e,b.getHoverColor(f.backgroundColor)),f.borderColor=d.hoverBorderColor?d.hoverBorderColor:b.getValueAtIndexOrDefault(c.pointHoverBorderColor,e,b.getHoverColor(f.borderColor)),f.borderWidth=d.hoverBorderWidth?d.hoverBorderWidth:b.getValueAtIndexOrDefault(c.pointHoverBorderWidth,e,f.borderWidth)},removeHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model,g=this.chart.options.elements.point;f.radius=d.radius?d.radius:b.getValueAtIndexOrDefault(c.radius,e,g.radius),f.backgroundColor=d.backgroundColor?d.backgroundColor:b.getValueAtIndexOrDefault(c.pointBackgroundColor,e,g.backgroundColor),f.borderColor=d.borderColor?d.borderColor:b.getValueAtIndexOrDefault(c.pointBorderColor,e,g.borderColor),f.borderWidth=d.borderWidth?d.borderWidth:b.getValueAtIndexOrDefault(c.pointBorderWidth,e,g.borderWidth)}})}},{}],21:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:b.noop,onComplete:b.noop},a.Animation=a.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),a.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(a,b,c,d){var e=this;d||(a.animating=!0);for(var f=0;f1&&(c=Math.floor(a.dropFrames),a.dropFrames=a.dropFrames%1);for(var d=0;da.animations[d].animationObject.numSteps&&(a.animations[d].animationObject.currentStep=a.animations[d].animationObject.numSteps),a.animations[d].animationObject.render(a.animations[d].chartInstance,a.animations[d].animationObject),a.animations[d].animationObject.onAnimationProgress&&a.animations[d].animationObject.onAnimationProgress.call&&a.animations[d].animationObject.onAnimationProgress.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].animationObject.currentStep===a.animations[d].animationObject.numSteps?(a.animations[d].animationObject.onAnimationComplete&&a.animations[d].animationObject.onAnimationComplete.call&&a.animations[d].animationObject.onAnimationComplete.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].chartInstance.animating=!1,a.animations.splice(d,1)):++d;var e=Date.now(),f=(e-b)/a.frameDuration;a.dropFrames+=f,a.animations.length>0&&a.requestAnimationFrame()}}}},{}],22:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.types={},a.instances={},a.controllers={},a.Controller=function(c){return this.chart=c,this.config=c.config,this.options=this.config.options=b.configMerge(a.defaults.global,a.defaults[this.config.type],this.config.options||{}),this.id=b.uid(),Object.defineProperty(this,"data",{get:function(){return this.config.data}}),a.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},b.extend(a.Controller.prototype,{initialize:function(){var b=this;return a.plugins.notify("beforeInit",[b]),b.bindEvents(),b.ensureScalesHaveIDs(),b.buildOrUpdateControllers(),b.buildScales(),b.updateLayout(),b.resetElements(),b.initToolTip(),b.update(),a.plugins.notify("afterInit",[b]),b},clear:function(){return b.clear(this.chart),this},stop:function(){return a.animationService.cancelAnimation(this),this},resize:function(c){var d=this,e=d.chart,f=e.canvas,g=b.getMaximumWidth(f),h=e.aspectRatio,i=d.options.maintainAspectRatio&&isNaN(h)===!1&&isFinite(h)&&0!==h?g/h:b.getMaximumHeight(f),j=e.width!==g||e.height!==i;if(!j)return d;f.width=e.width=g,f.height=e.height=i,b.retinaScale(e);var k={width:g,height:i};return a.plugins.notify("resize",[d,k]),d.options.onResize&&d.options.onResize(d,k),c||(d.stop(),d.update(d.options.responsiveAnimationDuration)),d},ensureScalesHaveIDs:function(){var a=this.options,c=a.scales||{},d=a.scale;b.each(c.xAxes,function(a,b){a.id=a.id||"x-axis-"+b}),b.each(c.yAxes,function(a,b){a.id=a.id||"y-axis-"+b}),d&&(d.id=d.id||"scale")},buildScales:function(){var c=this,d=c.options,e=c.scales={},f=[];d.scales&&(f=f.concat((d.scales.xAxes||[]).map(function(a){return{options:a,dtype:"category"}}),(d.scales.yAxes||[]).map(function(a){return{options:a,dtype:"linear"}}))),d.scale&&f.push({options:d.scale,dtype:"radialLinear",isDefault:!0}),b.each(f,function(d,f){var g=d.options,h=b.getValueOrDefault(g.type,d.dtype),i=a.scaleService.getScaleConstructor(h);if(i){var j=new i({id:g.id,options:g,ctx:c.chart.ctx,chart:c});e[j.id]=j,d.isDefault&&(c.scale=j)}}),a.scaleService.addScalesToLayout(this)},updateLayout:function(){a.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var c=this,d=[],e=[];if(b.each(c.data.datasets,function(b,f){var g=c.getDatasetMeta(f);g.type||(g.type=b.type||c.config.type),d.push(g.type),g.controller?g.controller.updateIndex(f):(g.controller=new a.controllers[g.type](c,f),e.push(g.controller))},c),d.length>1)for(var f=1;fb;++b)d.getDatasetMeta(b).controller.update();a.plugins.notify("afterDatasetsUpdate",[d])}},render:function(c,d){var e=this;a.plugins.notify("beforeRender",[e]);var f=e.options.animation;if(f&&("undefined"!=typeof c&&0!==c||"undefined"==typeof c&&0!==f.duration)){var g=new a.Animation;g.numSteps=(c||f.duration)/16.66, g.easing=f.easing,g.render=function(a,c){var d=b.easingEffects[c.easing],e=c.currentStep/c.numSteps,f=d(e);a.draw(f,e,c.currentStep)},g.onAnimationProgress=f.onProgress,g.onAnimationComplete=f.onComplete,a.animationService.addAnimation(e,g,c,d)}else e.draw(),f&&f.onComplete&&f.onComplete.call&&f.onComplete.call(e);return e},draw:function(c){var d=this,e=c||1;d.clear(),a.plugins.notify("beforeDraw",[d,e]),b.each(d.boxes,function(a){a.draw(d.chartArea)},d),d.scale&&d.scale.draw(),a.plugins.notify("beforeDatasetsDraw",[d,e]),b.each(d.data.datasets,function(a,b){d.isDatasetVisible(b)&&d.getDatasetMeta(b).controller.draw(c)},d,!0),a.plugins.notify("afterDatasetsDraw",[d,e]),d.tooltip.transition(e).draw(),a.plugins.notify("afterDraw",[d,e])},getElementAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[];return b.each(c.data.datasets,function(a,f){if(c.isDatasetVisible(f)){var g=c.getDatasetMeta(f);b.each(g.data,function(a,b){return a.inRange(d.x,d.y)?(e.push(a),e):void 0})}}),e},getElementsAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[],f=function(){if(c.data.datasets)for(var a=0;a0&&(b=this.getDatasetMeta(b[0]._datasetIndex).data),b},getDatasetMeta:function(a){var b=this,c=b.data.datasets[a];c._meta||(c._meta={});var d=c._meta[b.id];return d||(d=c._meta[b.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),d},getVisibleDatasetCount:function(){for(var a=0,b=0,c=this.data.datasets.length;c>b;++b)this.isDatasetVisible(b)&&a++;return a},isDatasetVisible:function(a){var b=this.getDatasetMeta(a);return"boolean"==typeof b.hidden?!b.hidden:!this.data.datasets[a].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var c=this;c.stop(),c.clear(),b.unbindEvents(c,c.events),b.removeResizeListener(c.chart.canvas.parentNode);var d=c.chart.canvas;d.width=c.chart.width,d.height=c.chart.height,void 0!==c.chart.originalDevicePixelRatio&&c.chart.ctx.scale(1/c.chart.originalDevicePixelRatio,1/c.chart.originalDevicePixelRatio),d.style.width=c.chart.originalCanvasStyleWidth,d.style.height=c.chart.originalCanvasStyleHeight,a.plugins.notify("destroy",[c]),delete a.instances[c.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var b=this;b.tooltip=new a.Tooltip({_chart:b.chart,_chartInstance:b,_data:b.data,_options:b.options.tooltips},b)},bindEvents:function(){var a=this;b.bindEvents(a,a.options.events,function(b){a.eventHandler(b)})},updateHoverStyle:function(a,b,c){var d,e,f,g=c?"setHoverStyle":"removeHoverStyle";switch(b){case"single":a=[a[0]];break;case"label":case"dataset":break;default:return}for(e=0,f=a.length;f>e;++e)d=a[e],d&&this.getDatasetMeta(d._datasetIndex).controller[g](d)},eventHandler:function(a){var c=this,d=c.tooltip,e=c.options||{},f=e.hover,g=e.tooltips;return c.lastActive=c.lastActive||[],c.lastTooltipActive=c.lastTooltipActive||[],"mouseout"===a.type?(c.active=[],c.tooltipActive=[]):(c.active=c.getElementsAtEventForMode(a,f.mode),c.tooltipActive=c.getElementsAtEventForMode(a,g.mode)),f.onHover&&f.onHover.call(c,c.active),("mouseup"===a.type||"click"===a.type)&&(e.onClick&&e.onClick.call(c,a,c.active),c.legend&&c.legend.handleEvent&&c.legend.handleEvent(a)),c.lastActive.length&&c.updateHoverStyle(c.lastActive,f.mode,!1),c.active.length&&f.mode&&c.updateHoverStyle(c.active,f.mode,!0),(g.enabled||g.custom)&&(d.initialize(),d._active=c.tooltipActive,d.update(!0)),d.pivot(),c.animating||b.arrayEquals(c.active,c.lastActive)&&b.arrayEquals(c.tooltipActive,c.lastTooltipActive)||(c.stop(),(g.enabled||g.custom)&&d.update(!0),c.render(f.animationDuration,!0)),c.lastActive=c.active,c.lastTooltipActive=c.tooltipActive,c}})}},{}],23:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.DatasetController=function(a,b){this.initialize.call(this,a,b)},b.extend(a.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(a,b){var c=this;c.chart=a,c.index=b,c.linkScales(),c.addElements()},updateIndex:function(a){this.index=a},linkScales:function(){var a=this,b=a.getMeta(),c=a.getDataset();null===b.xAxisID&&(b.xAxisID=c.xAxisID||a.chart.options.scales.xAxes[0].id),null===b.yAxisID&&(b.yAxisID=c.yAxisID||a.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(a){return this.chart.scales[a]},reset:function(){this.update(!0)},createMetaDataset:function(){var a=this,b=a.datasetElementType;return b&&new b({_chart:a.chart.chart,_datasetIndex:a.index})},createMetaData:function(a){var b=this,c=b.dataElementType;return c&&new c({_chart:b.chart.chart,_datasetIndex:b.index,_index:a})},addElements:function(){var a,b,c=this,d=c.getMeta(),e=c.getDataset().data||[],f=d.data;for(a=0,b=e.length;b>a;++a)f[a]=f[a]||c.createMetaData(d,a);d.dataset=d.dataset||c.createMetaDataset()},addElementAndReset:function(a){var b=this,c=b.createMetaData(a);b.getMeta().data.splice(a,0,c),b.updateElement(c,a,!0)},buildOrUpdateElements:function(){var a=this.getMeta(),b=a.data,c=this.getDataset().data.length,d=b.length;if(d>c)b.splice(c,d-c);else if(c>d)for(var e=d;c>e;++e)this.addElementAndReset(e)},update:c,draw:function(a){var c=a||1;b.each(this.getMeta().data,function(a,b){a.transition(c).draw()})},removeHoverStyle:function(a,c){var d=this.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=b.getValueAtIndexOrDefault,h=(b.color,a._model);h.backgroundColor=f.backgroundColor?f.backgroundColor:g(d.backgroundColor,e,c.backgroundColor),h.borderColor=f.borderColor?f.borderColor:g(d.borderColor,e,c.borderColor),h.borderWidth=f.borderWidth?f.borderWidth:g(d.borderWidth,e,c.borderWidth)},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=b.getValueAtIndexOrDefault,g=(b.color,b.getHoverColor),h=a._model;h.backgroundColor=e.hoverBackgroundColor?e.hoverBackgroundColor:f(c.hoverBackgroundColor,d,g(h.backgroundColor)),h.borderColor=e.hoverBorderColor?e.hoverBorderColor:f(c.hoverBorderColor,d,g(h.borderColor)),h.borderWidth=e.hoverBorderWidth?e.hoverBorderWidth:f(c.hoverBorderWidth,d,h.borderWidth)}}),a.DatasetController.extend=b.inherits}},{}],24:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.elements={},a.Element=function(a){b.extend(this,a),this.initialize.apply(this,arguments)},b.extend(a.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var a=this;return a._view||(a._view=b.clone(a._model)),a._start=b.clone(a._view),a},transition:function(a){var c=this;return c._view||(c._view=b.clone(c._model)),1===a?(c._view=c._model,c._start=null,c):(c._start||c.pivot(),b.each(c._model,function(d,e){if("_"===e[0]);else if(c._view.hasOwnProperty(e))if(d===c._view[e]);else if("string"==typeof d)try{var f=b.color(c._model[e]).mix(b.color(c._start[e]),a);c._view[e]=f.rgbString()}catch(g){c._view[e]=d}else if("number"==typeof d){var h=void 0!==c._start[e]&&isNaN(c._start[e])===!1?c._start[e]:0;c._view[e]=(c._model[e]-h)*a+h}else c._view[e]=d;else"number"!=typeof d||isNaN(c._view[e])?c._view[e]=d:c._view[e]=d*a},c),c)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return b.isNumber(this._model.x)&&b.isNumber(this._model.y)}}),a.Element.extend=b.inherits}},{}],25:[function(a,b,c){"use strict";var d=a(3);b.exports=function(a){function b(a,b,c){var d;return"string"==typeof a?(d=parseInt(a,10),-1!=a.indexOf("%")&&(d=d/100*b.parentNode[c])):d=a,d}function c(a){return void 0!==a&&null!==a&&"none"!==a}function e(a,d,e){var f=document.defaultView,g=a.parentNode,h=f.getComputedStyle(a)[d],i=f.getComputedStyle(g)[d],j=c(h),k=c(i),l=Number.POSITIVE_INFINITY;return j||k?Math.min(j?b(h,a,e):l,k?b(i,g,e):l):"none"}var f=a.helpers={};f.each=function(a,b,c,d){var e,g;if(f.isArray(a))if(g=a.length,d)for(e=g-1;e>=0;e--)b.call(c,a[e],e);else for(e=0;g>e;e++)b.call(c,a[e],e);else if("object"==typeof a){var h=Object.keys(a);for(g=h.length,e=0;g>e;e++)b.call(c,a[h[e]],h[e])}},f.clone=function(a){var b={};return f.each(a,function(a,c){f.isArray(a)?b[c]=a.slice(0):"object"==typeof a&&null!==a?b[c]=f.clone(a):b[c]=a}),b},f.extend=function(a){for(var b=function(b,c){a[c]=b},c=1,d=arguments.length;d>c;c++)f.each(arguments[c],b);return a},f.configMerge=function(b){var c=f.clone(b);return f.each(Array.prototype.slice.call(arguments,1),function(b){f.each(b,function(b,d){if("scales"===d)c[d]=f.scaleMerge(c.hasOwnProperty(d)?c[d]:{},b);else if("scale"===d)c[d]=f.configMerge(c.hasOwnProperty(d)?c[d]:{},a.scaleService.getScaleDefaults(b.type),b);else if(c.hasOwnProperty(d)&&f.isArray(c[d])&&f.isArray(b)){var e=c[d];f.each(b,function(a,b){b=d[c].length||!d[c][e].type?d[c].push(f.configMerge(h,b)):b.type&&b.type!==d[c][e].type?d[c][e]=f.configMerge(d[c][e],h,b):d[c][e]=f.configMerge(d[c][e],b)}):(d[c]=[],f.each(b,function(b){var e=f.getValueOrDefault(b.type,"xAxes"===c?"category":"linear");d[c].push(f.configMerge(a.scaleService.getScaleDefaults(e),b))})):d.hasOwnProperty(c)&&"object"==typeof d[c]&&null!==d[c]&&"object"==typeof b?d[c]=f.configMerge(d[c],b):d[c]=b}),d},f.getValueAtIndexOrDefault=function(a,b,c){return void 0===a||null===a?c:f.isArray(a)?bc;++c)if(a[c]===b)return c;return-1},f.where=function(a,b){if(f.isArray(a)&&Array.prototype.filter)return a.filter(b);var c=[];return f.each(a,function(a){b(a)&&c.push(a)}),c},f.findIndex=Array.prototype.findIndex?function(a,b,c){return a.findIndex(b,c)}:function(a,b,c){c=void 0===c?a:c;for(var d=0,e=a.length;e>d;++d)if(b.call(c,a[d],d,a))return d;return-1},f.findNextWhere=function(a,b,c){(void 0===c||null===c)&&(c=-1);for(var d=c+1;d=0;d--){var e=a[d];if(b(e))return e}},f.inherits=function(a){var b=this,c=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return b.apply(this,arguments)},d=function(){this.constructor=c};return d.prototype=b.prototype,c.prototype=new d,c.extend=f.inherits,a&&f.extend(c.prototype,a),c.__super__=b.prototype,c},f.noop=function(){},f.uid=function(){var a=0;return function(){return a++}}(),f.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},f.almostEquals=function(a,b,c){return Math.abs(a-b)0?1:-1},f.log10=Math.log10?function(a){return Math.log10(a)}:function(a){return Math.log(a)/Math.LN10},f.toRadians=function(a){return a*(Math.PI/180)},f.toDegrees=function(a){return a*(180/Math.PI)},f.getAngleFromPoint=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=Math.sqrt(c*c+d*d),f=Math.atan2(d,c);return f<-.5*Math.PI&&(f+=2*Math.PI),{angle:f,distance:e}},f.aliasPixel=function(a){return a%2===0?0:.5},f.splineCurve=function(a,b,c,d){var e=a.skip?b:a,f=b,g=c.skip?b:c,h=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),i=Math.sqrt(Math.pow(g.x-f.x,2)+Math.pow(g.y-f.y,2)),j=h/(h+i),k=i/(h+i);j=isNaN(j)?0:j,k=isNaN(k)?0:k;var l=d*j,m=d*k;return{previous:{x:f.x-l*(g.x-e.x),y:f.y-l*(g.y-e.y)},next:{x:f.x+m*(g.x-e.x),y:f.y+m*(g.y-e.y)}}},f.nextItem=function(a,b,c){return c?b>=a.length-1?a[0]:a[b+1]:b>=a.length-1?a[a.length-1]:a[b+1]},f.previousItem=function(a,b,c){return c?0>=b?a[a.length-1]:a[b-1]:0>=b?a[0]:a[b-1]},f.niceNum=function(a,b){var c,d=Math.floor(f.log10(a)),e=a/Math.pow(10,d);return c=b?1.5>e?1:3>e?2:7>e?5:10:1>=e?1:2>=e?2:5>=e?5:10,c*Math.pow(10,d)};var g=f.easingEffects={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return(a/=.5)<1?.5*a*a:-.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var b=1.70158,c=0,d=1;return 0===a?0:1===(a/=1)?1:(c||(c=.3),da?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)):d*Math.pow(2,-10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)*.5+1)},easeInBack:function(a){var b=1.70158;return 1*(a/=1)*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return 1*((a=a/1-1)*a*((b+1)*a+b)+1)},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},easeInBounce:function(a){return 1-g.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):2/2.75>a?1*(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},easeInOutBounce:function(a){return.5>a?.5*g.easeInBounce(2*a):.5*g.easeOutBounce(2*a-1)+.5}};f.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),f.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1e3/60)}}(),f.getRelativePosition=function(a,b){var c,d,e=a.originalEvent||a,g=a.currentTarget||a.srcElement,h=g.getBoundingClientRect(),i=e.touches;i&&i.length>0?(c=i[0].clientX,d=i[0].clientY):(c=e.clientX,d=e.clientY);var j=parseFloat(f.getStyle(g,"padding-left")),k=parseFloat(f.getStyle(g,"padding-top")),l=parseFloat(f.getStyle(g,"padding-right")),m=parseFloat(f.getStyle(g,"padding-bottom")),n=h.right-h.left-j-l,o=h.bottom-h.top-k-m;return c=Math.round((c-h.left-j)/n*g.width/b.currentDevicePixelRatio),d=Math.round((d-h.top-k)/o*g.height/b.currentDevicePixelRatio),{x:c,y:d}},f.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},f.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=f.noop},f.bindEvents=function(a,b,c){var d=a.events=a.events||{};f.each(b,function(b){d[b]=function(){c.apply(a,arguments)},f.addEvent(a.chart.canvas,b,d[b])})},f.unbindEvents=function(a,b){var c=a.chart.canvas;f.each(b,function(a,b){f.removeEvent(c,b,a)})},f.getConstraintWidth=function(a){return e(a,"max-width","clientWidth")},f.getConstraintHeight=function(a){return e(a,"max-height","clientHeight")},f.getMaximumWidth=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-left"))+parseInt(f.getStyle(b,"padding-right")),d=b.clientWidth-c,e=f.getConstraintWidth(a);return isNaN(e)?d:Math.min(d,e)},f.getMaximumHeight=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-top"))+parseInt(f.getStyle(b,"padding-bottom")),d=b.clientHeight-c,e=f.getConstraintHeight(a);return isNaN(e)?d:Math.min(d,e)},f.getStyle=function(a,b){return a.currentStyle?a.currentStyle[b]:document.defaultView.getComputedStyle(a,null).getPropertyValue(b)},f.retinaScale=function(a){var b=a.ctx,c=a.canvas,d=c.width,e=c.height,f=a.currentDevicePixelRatio=window.devicePixelRatio||1;1!==f&&(c.height=e*f,c.width=d*f,b.scale(f,f),a.originalDevicePixelRatio=a.originalDevicePixelRatio||f),c.style.width=d+"px",c.style.height=e+"px"},f.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},f.fontString=function(a,b,c){return b+" "+a+"px "+c},f.longestText=function(a,b,c,d){d=d||{};var e=d.data=d.data||{},g=d.garbageCollect=d.garbageCollect||[];d.font!==b&&(e=d.data={},g=d.garbageCollect=[],d.font=b),a.font=b;var h=0;f.each(c,function(b){void 0!==b&&null!==b&&f.isArray(b)!==!0?h=f.measureText(a,e,g,h,b):f.isArray(b)&&f.each(b,function(b){void 0===b||null===b||f.isArray(b)||(h=f.measureText(a,e,g,h,b))})});var i=g.length/2;if(i>c.length){for(var j=0;i>j;j++)delete e[g[j]];g.splice(0,i)}return h},f.measureText=function(a,b,c,d,e){var f=b[e];return f||(f=b[e]=a.measureText(e).width,c.push(e)),f>d&&(d=f),d},f.numberOfLabelLines=function(a){var b=1;return f.each(a,function(a){f.isArray(a)&&a.length>b&&(b=a.length)}),b},f.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()},f.color=function(b){return d?d(b instanceof CanvasGradient?a.defaults.global.defaultColor:b):(console.log("Color.js not found!"),b)},f.addResizeListener=function(a,b){var c=document.createElement("iframe"),d="chartjs-hidden-iframe";c.classlist?c.classlist.add(d):c.setAttribute("class",d);var e=c.style;e.width="100%",e.display="block",e.border=0,e.height=0,e.margin=0,e.position="absolute",e.left=0,e.right=0,e.top=0,e.bottom=0,a.insertBefore(c,a.firstChild),(c.contentWindow||c).onresize=function(){b&&b()}},f.removeResizeListener=function(a){var b=a.querySelector(".chartjs-hidden-iframe");b&&b.parentNode.removeChild(b)},f.isArray=Array.isArray?function(a){return Array.isArray(a)}:function(a){return"[object Array]"===Object.prototype.toString.call(a)},f.arrayEquals=function(a,b){var c,d,e,g;if(!a||!b||a.length!=b.length)return!1;for(c=0,d=a.length;d>c;++c)if(e=a[c],g=b[c],e instanceof Array&&g instanceof Array){if(!f.arrayEquals(e,g))return!1}else if(e!=g)return!1;return!0},f.callCallback=function(a,b,c){a&&"function"==typeof a.call&&a.apply(c,b)},f.getHoverColor=function(a){return a instanceof CanvasPattern?a:f.color(a).saturate(.5).darken(.1).rgbString()}}},{3:3}],26:[function(a,b,c){"use strict";b.exports=function(){var a=function(b,c){var d=this,e=a.helpers;return d.config=c,b.length&&b[0].getContext&&(b=b[0]),b.getContext&&(b=b.getContext("2d")),d.ctx=b,d.canvas=b.canvas,b.canvas.style.display=b.canvas.style.display||"block",d.width=b.canvas.width||parseInt(e.getStyle(b.canvas,"width"),10)||e.getMaximumWidth(b.canvas),d.height=b.canvas.height||parseInt(e.getStyle(b.canvas,"height"),10)||e.getMaximumHeight(b.canvas),d.aspectRatio=d.width/d.height,(isNaN(d.aspectRatio)||isFinite(d.aspectRatio)===!1)&&(d.aspectRatio=void 0!==c.aspectRatio?c.aspectRatio:2),d.originalCanvasStyleWidth=b.canvas.style.width,d.originalCanvasStyleHeight=b.canvas.style.height,e.retinaScale(d),c&&(d.controller=new a.Controller(d)),e.addResizeListener(b.canvas.parentNode,function(){d.controller&&d.controller.config.options.responsive&&d.controller.resize()}),d.controller?d.controller:d};return a.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(a){var b=[];b.push('
    ');for(var c=0;c'),a.data.datasets[c].label&&b.push(a.data.datasets[c].label),b.push("");return b.push("
"),b.join("")}}},a.Chart=a,a}},{}],27:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.layoutService={defaults:{},addBox:function(a,b){a.boxes||(a.boxes=[]),a.boxes.push(b)},removeBox:function(a,b){a.boxes&&a.boxes.splice(a.boxes.indexOf(b),1)},update:function(a,c,d){function e(a){var b,c=a.isHorizontal();c?(b=a.update(a.options.fullWidth?p:v,u),w-=b.height):(b=a.update(t,s),v-=b.width),x.push({horizontal:c,minSize:b,box:a})}function f(a){var c=b.findNextWhere(x,function(b){return b.box===a});if(c)if(a.isHorizontal()){var d={left:y,right:z,top:0,bottom:0};a.update(a.options.fullWidth?p:v,q/2,d)}else a.update(c.minSize.width,w)}function g(a){var c=b.findNextWhere(x,function(b){return b.box===a}),d={left:0,right:0,top:A,bottom:B};c&&a.update(c.minSize.width,w,d)}function h(a){a.isHorizontal()?(a.left=a.options.fullWidth?i:y,a.right=a.options.fullWidth?c-i:y+v,a.top=F,a.bottom=F+a.height,F=a.bottom):(a.left=E,a.right=E+a.width,a.top=A,a.bottom=A+w,E=a.right)}if(a){var i=0,j=0,k=b.where(a.boxes,function(a){return"left"===a.options.position}),l=b.where(a.boxes,function(a){return"right"===a.options.position}),m=b.where(a.boxes,function(a){return"top"===a.options.position}),n=b.where(a.boxes,function(a){return"bottom"===a.options.position}),o=b.where(a.boxes,function(a){return"chartArea"===a.options.position});m.sort(function(a,b){return(b.options.fullWidth?1:0)-(a.options.fullWidth?1:0)}),n.sort(function(a,b){return(a.options.fullWidth?1:0)-(b.options.fullWidth?1:0)});var p=c-2*i,q=d-2*j,r=p/2,s=q/2,t=(c-r)/(k.length+l.length),u=(d-s)/(m.length+n.length),v=p,w=q,x=[];b.each(k.concat(l,m,n),e);var y=i,z=i,A=j,B=j;b.each(k.concat(l),f),b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m.concat(n),f),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height}),b.each(k.concat(l),g),y=i,z=i,A=j,B=j,b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height});var C=d-A-B,D=c-y-z;(D!==v||C!==w)&&(b.each(k,function(a){a.height=C}),b.each(l,function(a){a.height=C}),b.each(m,function(a){a.options.fullWidth||(a.width=D)}),b.each(n,function(a){a.options.fullWidth||(a.width=D)}),w=C,v=D);var E=i,F=j;b.each(k.concat(m),h),E+=v,F+=w,b.each(l,h),b.each(n,h),a.chartArea={left:y,top:A,right:y+v,bottom:A+w},b.each(o,function(b){b.left=a.chartArea.left,b.top=a.chartArea.top,b.right=a.chartArea.right,b.bottom=a.chartArea.bottom,b.update(v,w)})}}}}},{}],28:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(a,b){var c=b.datasetIndex,d=this.chart,e=d.getDatasetMeta(c);e.hidden=null===e.hidden?!d.data.datasets[c].hidden:null,d.update()},labels:{boxWidth:40,padding:10,generateLabels:function(a){var c=a.data;return b.isArray(c.datasets)?c.datasets.map(function(c,d){return{text:c.label,fillStyle:b.isArray(c.backgroundColor)?c.backgroundColor[0]:c.backgroundColor,hidden:!a.isDatasetVisible(d),lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,datasetIndex:d}},this):[]}}},a.Legend=a.Element.extend({initialize:function(a){b.extend(this,a),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:c,update:function(a,b,c){var d=this;return d.beforeUpdate(),d.maxWidth=a,d.maxHeight=b,d.margins=c,d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeBuildLabels(),d.buildLabels(),d.afterBuildLabels(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:c,beforeSetDimensions:c,setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0,a.minSize={width:0,height:0}},afterSetDimensions:c,beforeBuildLabels:c,buildLabels:function(){var a=this;a.legendItems=a.options.labels.generateLabels.call(a,a.chart),a.options.reverse&&a.legendItems.reverse()},afterBuildLabels:c,beforeFit:c,fit:function(){var c=this,d=c.options,e=d.labels,f=d.display,g=c.ctx,h=a.defaults.global,i=b.getValueOrDefault,j=i(e.fontSize,h.defaultFontSize),k=i(e.fontStyle,h.defaultFontStyle),l=i(e.fontFamily,h.defaultFontFamily),m=b.fontString(j,k,l),n=c.legendHitBoxes=[],o=c.minSize,p=c.isHorizontal();if(p?(o.width=c.maxWidth,o.height=f?10:0):(o.width=f?10:0,o.height=c.maxHeight),f)if(g.font=m,p){var q=c.lineWidths=[0],r=c.legendItems.length?j+e.padding:0;g.textAlign="left",g.textBaseline="top",b.each(c.legendItems,function(a,b){var d=e.boxWidth+j/2+g.measureText(a.text).width;q[q.length-1]+d+e.padding>=c.width&&(r+=j+e.padding,q[q.length]=c.left),n[b]={left:0,top:0,width:d,height:j},q[q.length-1]+=d+e.padding}),o.height+=r}else{var s=e.padding,t=c.columnWidths=[],u=e.padding,v=0,w=0,x=j+s;b.each(c.legendItems,function(a,b){var c=e.boxWidth+j/2+g.measureText(a.text).width;w+x>o.height&&(u+=v+e.padding,t.push(v),v=0,w=0),v=Math.max(v,c),w+=x,n[b]={left:0,top:0,width:c,height:j}}),u+=v,t.push(v),o.width+=u}c.width=o.width,c.height=o.height},afterFit:c,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var c=this,d=c.options,e=d.labels,f=a.defaults.global,g=f.elements.line,h=c.width,i=(c.height,c.lineWidths);if(d.display){var j,k=c.ctx,l=b.getValueOrDefault,m=l(e.fontColor,f.defaultFontColor),n=l(e.fontSize,f.defaultFontSize),o=l(e.fontStyle,f.defaultFontStyle),p=l(e.fontFamily,f.defaultFontFamily),q=b.fontString(n,o,p);k.textAlign="left",k.textBaseline="top",k.lineWidth=.5,k.strokeStyle=m,k.fillStyle=m,k.font=q;var r=e.boxWidth,s=c.legendHitBoxes,t=function(a,b,c){k.save(),k.fillStyle=l(c.fillStyle,f.defaultColor),k.lineCap=l(c.lineCap,g.borderCapStyle),k.lineDashOffset=l(c.lineDashOffset,g.borderDashOffset),k.lineJoin=l(c.lineJoin,g.borderJoinStyle),k.lineWidth=l(c.lineWidth,g.borderWidth),k.strokeStyle=l(c.strokeStyle,f.defaultColor),k.setLineDash&&k.setLineDash(l(c.lineDash,g.borderDash)),k.strokeRect(a,b,r,n),k.fillRect(a,b,r,n),k.restore()},u=function(a,b,c,d){k.fillText(c.text,r+n/2+a,b),c.hidden&&(k.beginPath(),k.lineWidth=2,k.moveTo(r+n/2+a,b+n/2),k.lineTo(r+n/2+a+d,b+n/2),k.stroke())},v=c.isHorizontal();j=v?{x:c.left+(h-i[0])/2,y:c.top+e.padding,line:0}:{x:c.left+e.padding,y:c.top,line:0};var w=n+e.padding;b.each(c.legendItems,function(a,b){var d=k.measureText(a.text).width,f=r+n/2+d,g=j.x,l=j.y;v?g+f>=h&&(l=j.y+=n+e.padding,j.line++,g=j.x=c.left+(h-i[j.line])/2):l+w>c.bottom&&(g=j.x=g+c.columnWidths[j.line]+e.padding,l=j.y=c.top,j.line++),t(g,l,a),s[b].left=g,s[b].top=l,u(g,l,a,d),v?j.x+=f+e.padding:j.y+=w})}},handleEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart.chart),e=d.x,f=d.y,g=c.options;if(e>=c.left&&e<=c.right&&f>=c.top&&f<=c.bottom)for(var h=c.legendHitBoxes,i=0;i=j.left&&e<=j.left+j.width&&f>=j.top&&f<=j.top+j.height){g.onClick&&g.onClick.call(c,a,c.legendItems[i]);break}}}}),a.plugins.register({beforeInit:function(b){var c=b.options,d=c.legend;d&&(b.legend=new a.Legend({ctx:b.chart.ctx,options:d,chart:b}),a.layoutService.addBox(b,b.legend))}})}},{}],29:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers.noop;a.plugins={_plugins:[],register:function(a){var b=this._plugins;[].concat(a).forEach(function(a){-1===b.indexOf(a)&&b.push(a)})},unregister:function(a){var b=this._plugins;[].concat(a).forEach(function(a){var c=b.indexOf(a);-1!==c&&b.splice(c,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(a,b){var c,d,e=this._plugins,f=e.length;for(c=0;f>c;++c)if(d=e[c],"function"==typeof d[a]&&d[a].apply(d,b||[])===!1)return!1;return!0}},a.PluginBase=a.Element.extend({beforeInit:b,afterInit:b,beforeUpdate:b,afterUpdate:b,beforeDraw:b,afterDraw:b,destroy:b}),a.pluginService=a.plugins}},{}],30:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(a){return b.isArray(a)?a:""+a}}},a.Scale=a.Element.extend({beforeUpdate:function(){b.callCallback(this.options.beforeUpdate,[this])},update:function(a,c,d){var e=this;return e.beforeUpdate(),e.maxWidth=a,e.maxHeight=c,e.margins=b.extend({left:0,right:0,top:0,bottom:0},d),e.beforeSetDimensions(),e.setDimensions(),e.afterSetDimensions(),e.beforeDataLimits(),e.determineDataLimits(),e.afterDataLimits(),e.beforeBuildTicks(),e.buildTicks(),e.afterBuildTicks(),e.beforeTickToLabelConversion(),e.convertTicksToLabels(),e.afterTickToLabelConversion(),e.beforeCalculateTickRotation(),e.calculateTickRotation(),e.afterCalculateTickRotation(),e.beforeFit(),e.fit(),e.afterFit(),e.afterUpdate(),e.minSize},afterUpdate:function(){b.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){b.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0},afterSetDimensions:function(){b.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){b.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:b.noop,afterDataLimits:function(){ b.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){b.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:b.noop,afterBuildTicks:function(){b.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){b.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var a=this;a.ticks=a.ticks.map(function(b,c,d){return a.options.ticks.userCallback?a.options.ticks.userCallback(b,c,d):a.options.ticks.callback(b,c,d)},a)},afterTickToLabelConversion:function(){b.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){b.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var c=this,d=c.ctx,e=a.defaults.global,f=c.options.ticks,g=b.getValueOrDefault(f.fontSize,e.defaultFontSize),h=b.getValueOrDefault(f.fontStyle,e.defaultFontStyle),i=b.getValueOrDefault(f.fontFamily,e.defaultFontFamily),j=b.fontString(g,h,i);d.font=j;var k,l=d.measureText(c.ticks[0]).width,m=d.measureText(c.ticks[c.ticks.length-1]).width;if(c.labelRotation=f.minRotation||0,c.paddingRight=0,c.paddingLeft=0,c.options.display&&c.isHorizontal()){c.paddingRight=m/2+3,c.paddingLeft=l/2+3,c.longestTextCache||(c.longestTextCache={});for(var n,o,p=b.longestText(d,j,c.ticks,c.longestTextCache),q=p,r=c.getPixelForTick(1)-c.getPixelForTick(0)-6;q>r&&c.labelRotationc.yLabelWidth&&(c.paddingLeft=k+g/2),c.paddingRight=g/2,o*p>c.maxHeight){c.labelRotation--;break}c.labelRotation++,q=n*p}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0))},afterCalculateTickRotation:function(){b.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){b.callCallback(this.options.beforeFit,[this])},fit:function(){var c=this,d=c.minSize={width:0,height:0},e=c.options,f=a.defaults.global,g=e.ticks,h=e.scaleLabel,i=e.display,j=c.isHorizontal(),k=b.getValueOrDefault(g.fontSize,f.defaultFontSize),l=b.getValueOrDefault(g.fontStyle,f.defaultFontStyle),m=b.getValueOrDefault(g.fontFamily,f.defaultFontFamily),n=b.fontString(k,l,m),o=b.getValueOrDefault(h.fontSize,f.defaultFontSize),p=b.getValueOrDefault(h.fontStyle,f.defaultFontStyle),q=b.getValueOrDefault(h.fontFamily,f.defaultFontFamily),r=(b.fontString(o,p,q),e.gridLines.tickMarkLength);if(j?d.width=c.isFullWidth()?c.maxWidth-c.margins.left-c.margins.right:c.maxWidth:d.width=i?r:0,j?d.height=i?r:0:d.height=c.maxHeight,h.display&&i&&(j?d.height+=1.5*o:d.width+=1.5*o),g.display&&i){c.longestTextCache||(c.longestTextCache={});var s=b.longestText(c.ctx,n,c.ticks,c.longestTextCache),t=b.numberOfLabelLines(c.ticks),u=.5*k;if(j){c.longestLabelWidth=s;var v=Math.sin(b.toRadians(c.labelRotation))*c.longestLabelWidth+k*t+u*t;d.height=Math.min(c.maxHeight,d.height+v),c.ctx.font=n;var w=c.ctx.measureText(c.ticks[0]).width,x=c.ctx.measureText(c.ticks[c.ticks.length-1]).width,y=Math.cos(b.toRadians(c.labelRotation)),z=Math.sin(b.toRadians(c.labelRotation));c.paddingLeft=0!==c.labelRotation?y*w+3:w/2+3,c.paddingRight=0!==c.labelRotation?z*(k/2)+3:x/2+3}else{var A=c.maxWidth-d.width,B=g.mirror;B?s=0:s+=c.options.ticks.padding,A>s?d.width+=s:d.width=c.maxWidth,c.paddingTop=k/2,c.paddingBottom=k/2}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingTop=Math.max(c.paddingTop-c.margins.top,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0),c.paddingBottom=Math.max(c.paddingBottom-c.margins.bottom,0)),c.width=d.width,c.height=d.height},afterFit:function(){b.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function c(a){return null===a||"undefined"==typeof a?NaN:"number"==typeof a&&isNaN(a)?NaN:"object"==typeof a?a instanceof Date||a.isValid?a:c(this.isHorizontal()?a.x:a.y):a},getLabelForIndex:b.noop,getPixelForValue:b.noop,getValueForPixel:b.noop,getPixelForTick:function(a,b){var c=this;if(c.isHorizontal()){var d=c.width-(c.paddingLeft+c.paddingRight),e=d/Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),f=e*a+c.paddingLeft;b&&(f+=e/2);var g=c.left+Math.round(f);return g+=c.isFullWidth()?c.margins.left:0}var h=c.height-(c.paddingTop+c.paddingBottom);return c.top+a*(h/(c.ticks.length-1))},getPixelForDecimal:function(a){var b=this;if(b.isHorizontal()){var c=b.width-(b.paddingLeft+b.paddingRight),d=c*a+b.paddingLeft,e=b.left+Math.round(d);return e+=b.isFullWidth()?b.margins.left:0}return b.top+a*b.height},getBasePixel:function(){var a=this,b=a.min,c=a.max;return a.getPixelForValue(a.beginAtZero?0:0>b&&0>c?c:b>0&&c>0?b:0)},draw:function(c){var d=this,e=d.options;if(e.display){var f,g,h=d.ctx,i=a.defaults.global,j=e.ticks,k=e.gridLines,l=e.scaleLabel,m=0!==d.labelRotation,n=j.autoSkip,o=d.isHorizontal();j.maxTicksLimit&&(g=j.maxTicksLimit);var p=b.getValueOrDefault(j.fontColor,i.defaultFontColor),q=b.getValueOrDefault(j.fontSize,i.defaultFontSize),r=b.getValueOrDefault(j.fontStyle,i.defaultFontStyle),s=b.getValueOrDefault(j.fontFamily,i.defaultFontFamily),t=b.fontString(q,r,s),u=k.tickMarkLength,v=b.getValueOrDefault(l.fontColor,i.defaultFontColor),w=b.getValueOrDefault(l.fontSize,i.defaultFontSize),x=b.getValueOrDefault(l.fontStyle,i.defaultFontStyle),y=b.getValueOrDefault(l.fontFamily,i.defaultFontFamily),z=b.fontString(w,x,y),A=b.toRadians(d.labelRotation),B=Math.cos(A),C=(Math.sin(A),d.longestLabelWidth*B);h.fillStyle=p;var D=[];if(o){if(f=!1,m&&(C/=2),(C+j.autoSkipPadding)*d.ticks.length>d.width-(d.paddingLeft+d.paddingRight)&&(f=1+Math.floor((C+j.autoSkipPadding)*d.ticks.length/(d.width-(d.paddingLeft+d.paddingRight)))),g&&d.ticks.length>g)for(;!f||d.ticks.length/(f||1)>g;)f||(f=1),f+=1;n||(f=!1)}var E="right"===e.position?d.left:d.right-u,F="right"===e.position?d.left+u:d.right,G="bottom"===e.position?d.top:d.bottom-u,H="bottom"===e.position?d.top+u:d.bottom;if(b.each(d.ticks,function(a,g){if(void 0!==a&&null!==a){var h=d.ticks.length===g+1,i=f>1&&g%f>0||g%f===0&&g+f>=d.ticks.length;if((!i||h)&&void 0!==a&&null!==a){var l,n;g===("undefined"!=typeof d.zeroLineIndex?d.zeroLineIndex:0)?(l=k.zeroLineWidth,n=k.zeroLineColor):(l=b.getValueAtIndexOrDefault(k.lineWidth,g),n=b.getValueAtIndexOrDefault(k.color,g));var p,q,r,s,t,v,w,x,y,z,B,C="middle";if(o){m||(C="top"===e.position?"bottom":"top"),B=m?"right":"center";var I=d.getPixelForTick(g)+b.aliasPixel(l);y=d.getPixelForTick(g,k.offsetGridLines)+j.labelOffset,z=m?d.top+12:"top"===e.position?d.bottom-u:d.top+u,p=r=t=w=I,q=G,s=H,v=c.top,x=c.bottom}else{"left"===e.position?j.mirror?(y=d.right+j.padding,B="left"):(y=d.right-j.padding,B="right"):j.mirror?(y=d.left-j.padding,B="right"):(y=d.left+j.padding,B="left");var J=d.getPixelForTick(g);J+=b.aliasPixel(l),z=d.getPixelForTick(g,k.offsetGridLines),p=E,r=F,t=c.left,w=c.right,q=s=v=x=J}D.push({tx1:p,ty1:q,tx2:r,ty2:s,x1:t,y1:v,x2:w,y2:x,labelX:y,labelY:z,glWidth:l,glColor:n,rotation:-1*A,label:a,textBaseline:C,textAlign:B})}}}),b.each(D,function(a){if(k.display&&(h.lineWidth=a.glWidth,h.strokeStyle=a.glColor,h.beginPath(),k.drawTicks&&(h.moveTo(a.tx1,a.ty1),h.lineTo(a.tx2,a.ty2)),k.drawOnChartArea&&(h.moveTo(a.x1,a.y1),h.lineTo(a.x2,a.y2)),h.stroke()),j.display){h.save(),h.translate(a.labelX,a.labelY),h.rotate(a.rotation),h.font=t,h.textBaseline=a.textBaseline,h.textAlign=a.textAlign;var c=a.label;if(b.isArray(c))for(var d=0,e=0;db;++b){var f=a[b];if(f&&f.hasValue()){var g=f.tooltipPosition();d.push(g.x),e.push(g.y)}}var h=0,i=0;for(b=0,c-d.length;c>b;++b)h+=d[b],i+=e[b];return{x:Math.round(h/d.length),y:Math.round(i/d.length)}}function d(a){var b=a._xScale,c=a._yScale||a._scale,d=a._index,e=a._datasetIndex;return{xLabel:b?b.getLabelForIndex(d,e):"",yLabel:c?c.getLabelForIndex(d,e):"",index:d,datasetIndex:e}}var e=a.helpers;a.defaults.global.tooltips={enabled:!0,custom:null,mode:"single",backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:e.noop,title:function(a,b){var c="",d=b.labels,e=d?d.length:0;if(a.length>0){var f=a[0];f.xLabel?c=f.xLabel:e>0&&f.indexb;++b)o.push(d(j[b]));h.itemSort&&(o=o.sort(h.itemSort)),j.length>1&&e.each(o,function(a){m.push(h.callbacks.labelColor.call(g,a,l))}),e.extend(i,{title:g.getTitle(o,k),beforeBody:g.getBeforeBody(o,k),body:g.getBody(o,k),afterBody:g.getAfterBody(o,k),footer:g.getFooter(o,k),x:Math.round(n.x),y:Math.round(n.y),caretPadding:e.getValueOrDefault(n.padding,2),labelColors:m});var p=g.getTooltipSize(i);g.determineAlignment(p),e.extend(i,g.getBackgroundPoint(i,p))}else g._model.opacity=0;return a&&h.custom&&h.custom.call(g,i),g},getTooltipSize:function(a){var b=this._chart.ctx,c={height:2*a.yPadding,width:0},d=a.body,f=d.reduce(function(a,b){return a+b.before.length+b.lines.length+b.after.length},0);f+=a.beforeBody.length+a.afterBody.length;var g=a.title.length,h=a.footer.length,i=a.titleFontSize,j=a.bodyFontSize,k=a.footerFontSize;c.height+=g*i,c.height+=(g-1)*a.titleSpacing,c.height+=g?a.titleMarginBottom:0,c.height+=f*j,c.height+=f?(f-1)*a.bodySpacing:0,c.height+=h?a.footerMarginTop:0,c.height+=h*k,c.height+=h?(h-1)*a.footerSpacing:0;var l=0,m=function(a){c.width=Math.max(c.width,b.measureText(a).width+l)};return b.font=e.fontString(i,a._titleFontStyle,a._titleFontFamily),e.each(a.title,m),b.font=e.fontString(j,a._bodyFontStyle,a._bodyFontFamily),e.each(a.beforeBody.concat(a.afterBody),m),l=d.length>1?j+2:0,e.each(d,function(a){e.each(a.before,m),e.each(a.lines,m),e.each(a.after,m)}),l=0,b.font=e.fontString(k,a._footerFontStyle,a._footerFontFamily),e.each(a.footer,m),c.width+=2*a.xPadding,c},determineAlignment:function(a){var b=this,c=b._model,d=b._chart,e=b._chartInstance.chartArea;c.yd.height-a.height&&(c.yAlign="bottom");var f,g,h,i,j,k=(e.left+e.right)/2,l=(e.top+e.bottom)/2;"center"===c.yAlign?(f=function(a){return k>=a},g=function(a){return a>k}):(f=function(b){return b<=a.width/2},g=function(b){return b>=d.width-a.width/2}),h=function(b){return b+a.width>d.width},i=function(b){return b-a.width<0},j=function(a){return l>=a?"top":"bottom"},f(c.x)?(c.xAlign="left",h(c.x)&&(c.xAlign="center",c.yAlign=j(c.y))):g(c.x)&&(c.xAlign="right",i(c.x)&&(c.xAlign="center",c.yAlign=j(c.y)))},getBackgroundPoint:function(a,b){var c={x:a.x,y:a.y},d=a.caretSize,e=a.caretPadding,f=a.cornerRadius,g=a.xAlign,h=a.yAlign,i=d+e,j=f+e;return"right"===g?c.x-=b.width:"center"===g&&(c.x-=b.width/2),"top"===h?c.y+=i:"bottom"===h?c.y-=b.height+i:c.y-=b.height/2,"center"===h?"left"===g?c.x+=i:"right"===g&&(c.x-=i):"left"===g?c.x-=j:"right"===g&&(c.x+=j),c},drawCaret:function(a,b,c,d){var f,g,h,i,j,k,l=this._view,m=this._chart.ctx,n=l.caretSize,o=l.cornerRadius,p=l.xAlign,q=l.yAlign,r=a.x,s=a.y,t=b.width,u=b.height;"center"===q?("left"===p?(f=r,g=f-n,h=f):(f=r+t,g=f+n,h=f),j=s+u/2,i=j-n,k=j+n):("left"===p?(f=r+o,g=f+n,h=g+n):"right"===p?(f=r+t-o,g=f-n,h=g-n):(g=r+t/2,f=g-n,h=g+n),"top"===q?(i=s,j=i-n,k=i):(i=s+u,j=i+n,k=i));var v=e.color(l.backgroundColor);m.fillStyle=v.alpha(c*v.alpha()).rgbString(),m.beginPath(),m.moveTo(f,i),m.lineTo(g,j),m.lineTo(h,k),m.closePath(),m.fill()},drawTitle:function(a,b,c,d){var f=b.title;if(f.length){c.textAlign=b._titleAlign,c.textBaseline="top";var g=b.titleFontSize,h=b.titleSpacing,i=e.color(b.titleFontColor);c.fillStyle=i.alpha(d*i.alpha()).rgbString(),c.font=e.fontString(g,b._titleFontStyle,b._titleFontFamily);var j,k;for(j=0,k=f.length;k>j;++j)c.fillText(f[j],a.x,a.y),a.y+=g+h,j+1===f.length&&(a.y+=b.titleMarginBottom-h)}},drawBody:function(a,b,c,d){var f=b.bodyFontSize,g=b.bodySpacing,h=b.body;c.textAlign=b._bodyAlign,c.textBaseline="top";var i=e.color(b.bodyFontColor),j=i.alpha(d*i.alpha()).rgbString();c.fillStyle=j,c.font=e.fontString(f,b._bodyFontStyle,b._bodyFontFamily);var k=0,l=function(b){c.fillText(b,a.x+k,a.y),a.y+=f+g};e.each(b.beforeBody,l);var m=h.length>1;k=m?f+2:0,e.each(h,function(g,h){e.each(g.before,l),e.each(g.lines,function(g){m&&(c.fillStyle=e.color(b.legendColorBackground).alpha(d).rgbaString(),c.fillRect(a.x,a.y,f,f),c.strokeStyle=e.color(b.labelColors[h].borderColor).alpha(d).rgbaString(),c.strokeRect(a.x,a.y,f,f),c.fillStyle=e.color(b.labelColors[h].backgroundColor).alpha(d).rgbaString(),c.fillRect(a.x+1,a.y+1,f-2,f-2),c.fillStyle=j),l(g)}),e.each(g.after,l)}),k=0,e.each(b.afterBody,l),a.y-=g},drawFooter:function(a,b,c,d){var f=b.footer;if(f.length){a.y+=b.footerMarginTop,c.textAlign=b._footerAlign,c.textBaseline="top";var g=e.color(b.footerFontColor);c.fillStyle=g.alpha(d*g.alpha()).rgbString(),c.font=e.fontString(b.footerFontSize,b._footerFontStyle,b._footerFontFamily),e.each(f,function(d){c.fillText(d,a.x,a.y),a.y+=b.footerFontSize+b.footerSpacing})}},draw:function(){var a=this._chart.ctx,b=this._view;if(0!==b.opacity){var c=this.getTooltipSize(b),d={x:b.x,y:b.y},f=Math.abs(b.opacity<.001)?0:b.opacity;if(this._options.enabled){var g=e.color(b.backgroundColor);a.fillStyle=g.alpha(f*g.alpha()).rgbString(),e.drawRoundedRectangle(a,d.x,d.y,c.width,c.height,b.cornerRadius),a.fill(),this.drawCaret(d,c,f,b.caretPadding),d.x+=b.xPadding,d.y+=b.yPadding,this.drawTitle(d,b,a,f),this.drawBody(d,b,a,f),this.drawFooter(d,b,a,f)}}}})}},{}],34:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.helpers,d=a.defaults.global;d.elements.arc={backgroundColor:d.defaultColor,borderColor:"#fff",borderWidth:2},a.elements.Arc=a.Element.extend({inLabelRange:function(a){var b=this._view;return b?Math.pow(a-b.x,2)i;)i+=2*Math.PI;for(;f>i;)f-=2*Math.PI;for(;h>f;)f+=2*Math.PI;var j=f>=h&&i>=f,k=g>=d.innerRadius&&g<=d.outerRadius;return j&&k}return!1},tooltipPosition:function(){var a=this._view,b=a.startAngle+(a.endAngle-a.startAngle)/2,c=(a.outerRadius-a.innerRadius)/2+a.innerRadius;return{x:a.x+Math.cos(b)*c,y:a.y+Math.sin(b)*c}},draw:function(){var a=this._chart.ctx,b=this._view,c=b.startAngle,d=b.endAngle;a.beginPath(),a.arc(b.x,b.y,b.outerRadius,c,d),a.arc(b.x,b.y,b.innerRadius,d,c,!0),a.closePath(),a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth,a.fillStyle=b.backgroundColor,a.fill(),a.lineJoin="bevel",b.borderWidth&&a.stroke()}})}},{}],35:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global;a.defaults.global.elements.line={tension:.4,backgroundColor:c.defaultColor,borderWidth:3,borderColor:c.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0},a.elements.Line=a.Element.extend({lineToNextPoint:function(a,b,c,d,e){var f=this,g=f._chart.ctx,h=f._view?f._view.spanGaps:!1;b._view.skip&&!h?d.call(f,a,b,c):a._view.skip&&!h?e.call(f,a,b,c):0===b._view.tension?g.lineTo(b._view.x,b._view.y):g.bezierCurveTo(a._view.controlPointNextX,a._view.controlPointNextY,b._view.controlPointPreviousX,b._view.controlPointPreviousY,b._view.x,b._view.y)},draw:function(){function a(a){g._view.skip||h._view.skip?a&&f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):f.bezierCurveTo(h._view.controlPointNextX,h._view.controlPointNextY,g._view.controlPointPreviousX,g._view.controlPointPreviousY,g._view.x,g._view.y)}var d=this,e=d._view,f=d._chart.ctx,g=d._children[0],h=d._children[d._children.length-1];f.save(),d._children.length>0&&e.fill&&(f.beginPath(),b.each(d._children,function(a,c){var g=b.previousItem(d._children,c),h=b.nextItem(d._children,c);0===c?(d._loop?f.moveTo(e.scaleZero.x,e.scaleZero.y):f.moveTo(a._view.x,e.scaleZero),a._view.skip?d._loop||f.moveTo(h._view.x,d._view.scaleZero):f.lineTo(a._view.x,a._view.y)):d.lineToNextPoint(g,a,h,function(a,b,c){d._loop?f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):(f.lineTo(a._view.x,d._view.scaleZero),f.moveTo(c._view.x,d._view.scaleZero))},function(a,b){f.lineTo(b._view.x,b._view.y)})},d),d._loop?a(!0):(f.lineTo(d._children[d._children.length-1]._view.x,e.scaleZero),f.lineTo(d._children[0]._view.x,e.scaleZero)),f.fillStyle=e.backgroundColor||c.defaultColor,f.closePath(),f.fill());var i=c.elements.line;f.lineCap=e.borderCapStyle||i.borderCapStyle,f.setLineDash&&f.setLineDash(e.borderDash||i.borderDash),f.lineDashOffset=e.borderDashOffset||i.borderDashOffset,f.lineJoin=e.borderJoinStyle||i.borderJoinStyle,f.lineWidth=e.borderWidth||i.borderWidth,f.strokeStyle=e.borderColor||c.defaultColor,f.beginPath(),b.each(d._children,function(a,c){var e=b.previousItem(d._children,c),g=b.nextItem(d._children,c);0===c?f.moveTo(a._view.x,a._view.y):d.lineToNextPoint(e,a,g,function(a,b,c){f.moveTo(c._view.x,c._view.y)},function(a,b){f.moveTo(b._view.x,b._view.y)})},d),d._loop&&d._children.length>0&&a(),f.stroke(),f.restore()}})}},{}],36:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global,d=c.defaultColor;c.elements.point={radius:3,pointStyle:"circle",backgroundColor:d,borderWidth:1,borderColor:d,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},a.elements.Point=a.Element.extend({inRange:function(a,b){var c=this._view;return c?Math.pow(a-c.x,2)+Math.pow(b-c.y,2)=m)){switch(k.strokeStyle=j.borderColor||d,k.lineWidth=b.getValueOrDefault(j.borderWidth,c.elements.point.borderWidth),k.fillStyle=j.backgroundColor||d,l){default:k.beginPath(),k.arc(n,o,m,0,2*Math.PI),k.closePath(),k.fill();break;case"triangle":k.beginPath(),e=3*m/Math.sqrt(3),h=e*Math.sqrt(3)/2,k.moveTo(n-e/2,o+h/3),k.lineTo(n+e/2,o+h/3),k.lineTo(n,o-2*h/3),k.closePath(),k.fill();break;case"rect":i=1/Math.SQRT2*m,k.fillRect(n-i,o-i,2*i,2*i),k.strokeRect(n-i,o-i,2*i,2*i);break;case"rectRot":i=1/Math.SQRT2*m,k.beginPath(),k.moveTo(n-i,o),k.lineTo(n,o+i),k.lineTo(n+i,o),k.lineTo(n,o-i),k.closePath(),k.fill();break;case"cross":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"crossRot":k.beginPath(),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"star":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"line":k.beginPath(),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"dash":k.beginPath(),k.moveTo(n,o),k.lineTo(n+m,o),k.closePath()}k.stroke()}}}})}},{}],37:[function(a,b,c){"use strict";b.exports=function(a){var b=(a.helpers,a.defaults.global);b.elements.rectangle={backgroundColor:b.defaultColor,borderWidth:0,borderColor:b.defaultColor,borderSkipped:"bottom"},a.elements.Rectangle=a.Element.extend({draw:function(){function a(a){return i[(k+a)%4]}var b=this._chart.ctx,c=this._view,d=c.width/2,e=c.x-d,f=c.x+d,g=c.base-(c.base-c.y),h=c.borderWidth/2;c.borderWidth&&(e+=h,f-=h,g+=h),b.beginPath(),b.fillStyle=c.backgroundColor,b.strokeStyle=c.borderColor,b.lineWidth=c.borderWidth;var i=[[e,c.base],[e,g],[f,g],[f,c.base]],j=["bottom","left","top","right"],k=j.indexOf(c.borderSkipped,0);-1===k&&(k=0),b.moveTo.apply(b,a(0));for(var l=1;4>l;l++)b.lineTo.apply(b,a(l));b.fill(),c.borderWidth&&b.stroke()},height:function(){var a=this._view;return a.base-a.y},inRange:function(a,b){var c=this._view;return c?c.y=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.y&&b<=c.base:a>=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.base&&b<=c.y:!1},inLabelRange:function(a){var b=this._view;return b?a>=b.x-b.width/2&&a<=b.x+b.width/2:!1},tooltipPosition:function(){var a=this._view;return{x:a.x,y:a.y}}})}},{}],38:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"bottom"},d=a.Scale.extend({determineDataLimits:function(){var a=this;a.minIndex=0,a.maxIndex=a.chart.data.labels.length-1;var c;void 0!==a.options.ticks.min&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.min),a.minIndex=-1!==c?c:a.minIndex),void 0!==a.options.ticks.max&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.max),a.maxIndex=-1!==c?c:a.maxIndex),a.min=a.chart.data.labels[a.minIndex],a.max=a.chart.data.labels[a.maxIndex]},buildTicks:function(a){var b=this;b.ticks=0===b.minIndex&&b.maxIndex===b.chart.data.labels.length-1?b.chart.data.labels:b.chart.data.labels.slice(b.minIndex,b.maxIndex+1)},getLabelForIndex:function(a,b){return this.ticks[a]},getPixelForValue:function(a,b,c,d){var e=this,f=Math.max(e.maxIndex+1-e.minIndex-(e.options.gridLines.offsetGridLines?0:1),1);if(e.isHorizontal()){var g=e.width-(e.paddingLeft+e.paddingRight),h=g/f,i=h*(b-e.minIndex)+e.paddingLeft;return e.options.gridLines.offsetGridLines&&d&&(i+=h/2),e.left+Math.round(i)}var j=e.height-(e.paddingTop+e.paddingBottom),k=j/f,l=k*(b-e.minIndex)+e.paddingTop;return e.options.gridLines.offsetGridLines&&d&&(l+=k/2),e.top+Math.round(l)},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticks[a],a+this.minIndex,null,b)},getValueForPixel:function(a){var b,c=this,d=Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),e=c.isHorizontal(),f=e?c.width-(c.paddingLeft+c.paddingRight):c.height-(c.paddingTop+c.paddingBottom),g=f/d;return c.options.gridLines.offsetGridLines&&(a-=g/2),a-=e?c.paddingLeft:c.paddingTop,b=0>=a?0:Math.round(a/g)}});a.scaleService.registerScaleType("category",d,c)}},{}],39:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=d.length>3?d[2]-d[1]:d[1]-d[0];Math.abs(e)>1&&a!==Math.floor(a)&&(e=a-Math.floor(a));var f=b.log10(Math.abs(e)),g="";if(0!==a){var h=-1*Math.floor(f);h=Math.max(Math.min(h,20),0),g=a.toFixed(h)}else g="0";return g}}},d=a.LinearScaleBase.extend({determineDataLimits:function(){function a(a){return h?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=(d.ticks,c.chart),f=e.data,g=f.datasets,h=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var i={},j=!1,k=!1;b.each(g,function(f,g){var h=e.getDatasetMeta(g);void 0===i[h.type]&&(i[h.type]={positiveValues:[],negativeValues:[]});var l=i[h.type].positiveValues,m=i[h.type].negativeValues;e.isDatasetVisible(g)&&a(h)&&b.each(f.data,function(a,b){var e=+c.getRightValue(a);isNaN(e)||h.data[b].hidden||(l[b]=l[b]||0,m[b]=m[b]||0,d.relativePoints?l[b]=100:0>e?(k=!0,m[b]+=e):(j=!0,l[b]+=e))})}),b.each(i,function(a){var d=a.positiveValues.concat(a.negativeValues),e=b.min(d),f=b.max(d);c.min=null===c.min?e:Math.min(c.min,e),c.max=null===c.max?f:Math.max(c.max,f)})}else b.each(g,function(d,f){var g=e.getDatasetMeta(f);e.isDatasetVisible(f)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});this.handleTickRangeOptions()},getTickLimit:function(){var c,d=this,e=d.options.ticks;if(d.isHorizontal())c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.width/50));else{var f=b.getValueOrDefault(e.fontSize,a.defaults.global.defaultFontSize);c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.height/(2*f)))}return c},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},getPixelForValue:function(a,b,c,d){var e,f,g=this,h=g.paddingLeft,i=g.paddingBottom,j=g.start,k=+g.getRightValue(a),l=g.end-j;return g.isHorizontal()?(f=g.width-(h+g.paddingRight),e=g.left+f/l*(k-j),Math.round(e+h)):(f=g.height-(g.paddingTop+i),e=g.bottom-i-f/l*(k-j),Math.round(e))},getValueForPixel:function(a){var b=this,c=b.isHorizontal(),d=b.paddingLeft,e=b.paddingBottom,f=c?b.width-(d+b.paddingRight):b.height-(b.paddingTop+e),g=(c?a-b.left-d:b.bottom-e-a)/f;return b.start+(b.end-b.start)*g},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticksAsNumbers[a],null,null,b)}});a.scaleService.registerScaleType("linear",d,c)}},{}],40:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.LinearScaleBase=a.Scale.extend({handleTickRangeOptions:function(){var a=this,c=a.options,d=c.ticks;if(d.beginAtZero){var e=b.sign(a.min),f=b.sign(a.max);0>e&&0>f?a.max=0:e>0&&f>0&&(a.min=0)}void 0!==d.min?a.min=d.min:void 0!==d.suggestedMin&&(a.min=Math.min(a.min,d.suggestedMin)),void 0!==d.max?a.max=d.max:void 0!==d.suggestedMax&&(a.max=Math.max(a.max,d.suggestedMax)),a.min===a.max&&(a.max++,d.beginAtZero||a.min--)},getTickLimit:c,handleDirectionalChanges:c,buildTicks:function(){var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=(a.isHorizontal(), -a.ticks=[]),g=a.getTickLimit();g=Math.max(2,g);var h,i=d.fixedStepSize&&d.fixedStepSize>0||d.stepSize&&d.stepSize>0;if(i)h=e(d.fixedStepSize,d.stepSize);else{var j=b.niceNum(a.max-a.min,!1);h=b.niceNum(j/(g-1),!0)}var k=Math.floor(a.min/h)*h,l=Math.ceil(a.max/h)*h,m=(l-k)/h;m=b.almostEquals(m,Math.round(m),h/1e3)?Math.round(m):Math.ceil(m),f.push(void 0!==d.min?d.min:k);for(var n=1;m>n;++n)f.push(k+n*h);f.push(void 0!==d.max?d.max:l),a.handleDirectionalChanges(),a.max=b.max(f),a.min=b.min(f),d.reverse?(f.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){var b=this;b.ticksAsNumbers=b.ticks.slice(),b.zeroLineIndex=b.ticks.indexOf(0),a.Scale.prototype.convertTicksToLabels.call(b)}})}},{}],41:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(b.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?a.toExponential():""}}},d=a.Scale.extend({determineDataLimits:function(){function a(a){return j?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=d.ticks,f=c.chart,g=f.data,h=g.datasets,i=b.getValueOrDefault,j=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var k={};b.each(h,function(e,g){var h=f.getDatasetMeta(g);f.isDatasetVisible(g)&&a(h)&&(void 0===k[h.type]&&(k[h.type]=[]),b.each(e.data,function(a,b){var e=k[h.type],f=+c.getRightValue(a);isNaN(f)||h.data[b].hidden||(e[b]=e[b]||0,d.relativePoints?e[b]=100:e[b]+=f)}))}),b.each(k,function(a){var d=b.min(a),e=b.max(a);c.min=null===c.min?d:Math.min(c.min,d),c.max=null===c.max?e:Math.max(c.max,e)})}else b.each(h,function(d,e){var g=f.getDatasetMeta(e);f.isDatasetVisible(e)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});c.min=i(e.min,c.min),c.max=i(e.max,c.max),c.min===c.max&&(0!==c.min&&null!==c.min?(c.min=Math.pow(10,Math.floor(b.log10(c.min))-1),c.max=Math.pow(10,Math.floor(b.log10(c.max))+1)):(c.min=1,c.max=10))},buildTicks:function(){for(var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=a.ticks=[],g=e(d.min,Math.pow(10,Math.floor(b.log10(a.min))));ga.max&&(a.max=d))})}}),a.handleTickRangeOptions()},getTickLimit:function(){var a=this.options.ticks,d=b.getValueOrDefault(a.fontSize,c.defaultFontSize);return Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*d)))},convertTicksToLabels:function(){var b=this;a.LinearScaleBase.prototype.convertTicksToLabels.call(b),b.pointLabels=b.chart.data.labels.map(b.options.pointLabels.callback,b)},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},fit:function(){var a,d,e,f,g,h,i,j,k,l,m,n,o=this.options.pointLabels,p=b.getValueOrDefault(o.fontSize,c.defaultFontSize),q=b.getValueOrDefault(o.fontStyle,c.defaultFontStyle),r=b.getValueOrDefault(o.fontFamily,c.defaultFontFamily),s=b.fontString(p,q,r),t=b.min([this.height/2-p-5,this.width/2]),u=this.width,v=0;for(this.ctx.font=s,d=0;du&&(u=a.x+f,g=d),a.x-fu&&(u=a.x+e,g=d):d>this.getValueCount()/2&&a.x-eb&&0>c?c:b>0&&c>0?b:0)},draw:function(){var a=this,d=a.options,e=d.gridLines,f=d.ticks,g=d.angleLines,h=d.pointLabels,i=b.getValueOrDefault;if(d.display){var j=a.ctx,k=i(f.fontSize,c.defaultFontSize),l=i(f.fontStyle,c.defaultFontStyle),m=i(f.fontFamily,c.defaultFontFamily),n=b.fontString(k,l,m);if(b.each(a.ticks,function(g,h){if(h>0||d.reverse){var l=a.getDistanceFromCenterForValue(a.ticksAsNumbers[h]),m=a.yCenter-l;if(e.display&&0!==h)if(j.strokeStyle=b.getValueAtIndexOrDefault(e.color,h-1),j.lineWidth=b.getValueAtIndexOrDefault(e.lineWidth,h-1),d.lineArc)j.beginPath(),j.arc(a.xCenter,a.yCenter,l,0,2*Math.PI),j.closePath(),j.stroke();else{j.beginPath();for(var o=0;o=0;t--){if(g.display){var u=a.getPointPosition(t,o);j.beginPath(),j.moveTo(a.xCenter,a.yCenter),j.lineTo(u.x,u.y),j.stroke(),j.closePath()}var v=a.getPointPosition(t,o+5),w=i(h.fontColor,c.defaultFontColor);j.font=s,j.fillStyle=w;var x=a.pointLabels,y=x.length,z=x.length/2,A=z/2,B=A>t||t>y-A,C=t===A||t===y-A;0===t?j.textAlign="center":t===z?j.textAlign="center":z>t?j.textAlign="left":j.textAlign="right",C?j.textBaseline="middle":B?j.textBaseline="bottom":j.textBaseline="top",j.fillText(x[t]?x[t]:"",v.x,v.y)}}}}});a.scaleService.registerScaleType("radialLinear",e,d)}},{}],43:[function(a,b,c){"use strict";var d=a(1);d="function"==typeof d?d:window.moment,b.exports=function(a){var b=a.helpers,c={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},e={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},f=a.Scale.extend({initialize:function(){if(!d)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");a.Scale.prototype.initialize.call(this)},getLabelMoment:function(a,b){return this.labelMoments[a][b]},getMomentStartOf:function(a){var b=this;return"week"===b.options.time.unit&&b.options.time.isoWeekday!==!1?a.clone().startOf("isoWeek").isoWeekday(b.options.time.isoWeekday):a.clone().startOf(b.tickUnit)},determineDataLimits:function(){var a=this;a.labelMoments=[];var c=[];a.chart.data.labels&&a.chart.data.labels.length>0?(b.each(a.chart.data.labels,function(b,d){var e=a.parseTime(b);e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),c.push(e))},a),a.firstTick=d.min.call(a,c),a.lastTick=d.max.call(a,c)):(a.firstTick=null,a.lastTick=null),b.each(a.chart.data.datasets,function(e,f){var g=[],h=a.chart.isDatasetVisible(f);"object"==typeof e.data[0]&&null!==e.data[0]?b.each(e.data,function(b,c){var e=a.parseTime(a.getRightValue(b));e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),g.push(e),h&&(a.firstTick=null!==a.firstTick?d.min(a.firstTick,e):e,a.lastTick=null!==a.lastTick?d.max(a.lastTick,e):e))},a):g=c,a.labelMoments.push(g)},a),a.options.time.min&&(a.firstTick=a.parseTime(a.options.time.min)),a.options.time.max&&(a.lastTick=a.parseTime(a.options.time.max)),a.firstTick=(a.firstTick||d()).clone(),a.lastTick=(a.lastTick||d()).clone()},buildTicks:function(d){var e=this;e.ctx.save();var f=b.getValueOrDefault(e.options.ticks.fontSize,a.defaults.global.defaultFontSize),g=b.getValueOrDefault(e.options.ticks.fontStyle,a.defaults.global.defaultFontStyle),h=b.getValueOrDefault(e.options.ticks.fontFamily,a.defaults.global.defaultFontFamily),i=b.fontString(f,g,h);if(e.ctx.font=i,e.ticks=[],e.unitScale=1,e.scaleSizeInUnits=0,e.options.time.unit)e.tickUnit=e.options.time.unit||"day",e.displayFormat=e.options.time.displayFormats[e.tickUnit],e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,1);else{var j=e.isHorizontal()?e.width-(e.paddingLeft+e.paddingRight):e.height-(e.paddingTop+e.paddingBottom),k=e.tickFormatFunction(e.firstTick,0,[]),l=e.ctx.measureText(k).width,m=Math.cos(b.toRadians(e.options.ticks.maxRotation)),n=Math.sin(b.toRadians(e.options.ticks.maxRotation));l=l*m+f*n;var o=j/l;e.tickUnit="millisecond",e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.displayFormat=e.options.time.displayFormats[e.tickUnit];for(var p=0,q=c.units[p];p=Math.ceil(e.scaleSizeInUnits/o)){e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,q.steps[r]);break}break}if(q.maxStep===!1||Math.ceil(e.scaleSizeInUnits/o)=0)break;w%e.unitScale===0&&e.ticks.push(x)}var y=e.ticks[e.ticks.length-1].diff(e.lastTick,e.tickUnit);(0!==y||0===e.scaleSizeInUnits)&&(e.options.time.max?(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.ticks[0],e.tickUnit,!0)):(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0))),e.ctx.restore()},getLabelForIndex:function(a,b){var c=this,d=c.chart.data.labels&&ac)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),void this.resetView();this.daterangepicker.startDate=b,this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);$(this.config.platformSelector).val(d.platform||"all-access"),$("#agent-select").val(d.agent||"user"),this.resetSelect2();var e=function(b){a.normalized?(b=a.underscorePageNames(b),a.setSelect2Defaults(b)):a.normalizePageNames(b).then(function(c){a.normalized=!0,b=c,a.setSelect2Defaults(a.underscorePageNames(b))})};!d.pages||1===d.pages.length&&!d.pages[0]?"en.wikipedia"===this.project?(d.pages=["Cat","Dog"],this.setInitialChartType(d.pages.length),e(d.pages)):(this.focusSelect2(),this.stopSpinny(),this.setInitialChartType()):d.pages.length>10?this.massviewsRedirectWithPagePile(d.pages).then(e):(this.setInitialChartType(d.pages.length),e(d.pages))}}},{key:"processSearchResults",value:function(a){var b=a?a.query:{},c=[];return b?("autocomplete"===this.autocomplete?b.prefixsearch.length&&(c=b.prefixsearch.map(function(a){return{id:a.title.score(),text:a.title}})):"autocomplete_redirects"===this.autocomplete&&(b.redirects&&(c=b.redirects.map(function(a){return{id:a.from.score(),text:a.from}})),Object.keys(b.pages).forEach(function(a){var d=b.pages[a];c.push({id:d.title.score(),text:d.title})})),{results:c}):{results:c}}},{key:"getParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],b={project:$(this.config.projectInput).val(),platform:$(this.config.platformSelector).val(),agent:$("#agent-select").val()};return this.specialRange&&a?b.range=this.specialRange.range:(b.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),b.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),this.noLogScale&&(b.autolog="false"),b}},{key:"pushParams",value:function(){var a=$(this.config.select2Input).select2("val")||[],b=a.join("|").replace(/[&%]/g,escape);window.history&&window.history.replaceState&&window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&pages="+b),$(".permalink").prop("href","?"+$.param(this.getPermaLink())+"&pages="+b)}},{key:"setupSelect2",value:function(){var a=this,b=$(this.config.select2Input),c={ajax:this.getArticleSelectorAjax(),tags:"no_autocomplete"===this.autocomplete,placeholder:$.i18n("article-placeholder"),maximumSelectionLength:10,minimumInputLength:1};b.select2(c),b.on("change",function(b){$(b.target).val()?a.processInput():a.resetView()})}},{key:"getArticleSelectorAjax",value:function(){var a=this;return"no_autocomplete"!==this.autocomplete?{url:"https://"+this.project+".org/w/api.php",dataType:"jsonp",delay:200,jsonpCallback:"articleSuggestionCallback",data:function(b){return a.getSearchParams(b.term)},processResults:this.processSearchResults.bind(this),cache:!0}:null}},{key:"setupListeners",value:function(){h(Object.getPrototypeOf(b.prototype),"setupListeners",this).call(this),$("#platform-select, #agent-select").on("change",this.processInput.bind(this))}},{key:"setupProjectInput",value:function(){var a=this;$(this.config.projectInput).on("change",function(b){return b.target.value?void(a.validateProject()||(a.resetView(!0),a.updateInterAppLinks())):void(b.target.value=a.config.defaults.project)})}},{key:"processInput",value:function(a){var b=this,c=$(i.select2Input).select2("val")||[];this.pushParams(),(a||(location.search!==this.params||this.prevChartType!==this.chartType)&&c.length)&&(this.prevChartType&&this.clearMessages(),this.params=location.search,this.prevChartType=this.chartType,this.destroyChart(),this.startSpinny(),this.getPageViewsData(c).done(function(a){return b.updateChart(a)}))}},{key:"validateProject",value:function(){var a=$(this.config.projectInput).val();return a.startsWith("www.")&&(a=a.substring(4),$(this.config.projectInput).val(a)),k.includes(a)?($(".validate").remove(),void $(".select2-selection--multiple").removeClass("disabled")):(this.resetView(!0),this.writeMessage($.i18n("invalid-project",""+a.escape()+""),!0),$(".select2-selection--multiple").addClass("disabled"),!0)}},{key:"massviewsRedirectWithPagePile",value:function(a){var b=this,c=$.Deferred(),d=Object.keys(j).find(function(a){return j[a]===b.project+".org"});return $.ajax({url:"//tools.wmflabs.org/pagepile/api.php",data:{action:"create_pile_with_data",wiki:d,data:a.join("\n")}}).success(function(a){var c=b.getParams();delete c.project,document.location="/massviews?overflow=1&"+$.param(c)+"&source=pagepile&target="+a.pile.id}).fail(function(){b.writeMessage($.i18n("auto-pagepile-error","PagePile",10)),c.resolve(a.slice(0,10))}),c}}]),b}(mix(l)["with"](m));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new n})},{"./config":1,"./shared/chart_helpers":3,"./shared/pv":7,"./shared/site_map":9}],3:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
    "+i.map(function(a){return"
  • "+b.getPageLink(a,b.project.escape())+"
  • "}).join("")+"
")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable(); -}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
  • "+a+"
  • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
      "+c+"
    "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],6:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],7:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0); +a.ticks=[]),g=a.getTickLimit();g=Math.max(2,g);var h,i=d.fixedStepSize&&d.fixedStepSize>0||d.stepSize&&d.stepSize>0;if(i)h=e(d.fixedStepSize,d.stepSize);else{var j=b.niceNum(a.max-a.min,!1);h=b.niceNum(j/(g-1),!0)}var k=Math.floor(a.min/h)*h,l=Math.ceil(a.max/h)*h,m=(l-k)/h;m=b.almostEquals(m,Math.round(m),h/1e3)?Math.round(m):Math.ceil(m),f.push(void 0!==d.min?d.min:k);for(var n=1;m>n;++n)f.push(k+n*h);f.push(void 0!==d.max?d.max:l),a.handleDirectionalChanges(),a.max=b.max(f),a.min=b.min(f),d.reverse?(f.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){var b=this;b.ticksAsNumbers=b.ticks.slice(),b.zeroLineIndex=b.ticks.indexOf(0),a.Scale.prototype.convertTicksToLabels.call(b)}})}},{}],41:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(b.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?a.toExponential():""}}},d=a.Scale.extend({determineDataLimits:function(){function a(a){return j?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=d.ticks,f=c.chart,g=f.data,h=g.datasets,i=b.getValueOrDefault,j=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var k={};b.each(h,function(e,g){var h=f.getDatasetMeta(g);f.isDatasetVisible(g)&&a(h)&&(void 0===k[h.type]&&(k[h.type]=[]),b.each(e.data,function(a,b){var e=k[h.type],f=+c.getRightValue(a);isNaN(f)||h.data[b].hidden||(e[b]=e[b]||0,d.relativePoints?e[b]=100:e[b]+=f)}))}),b.each(k,function(a){var d=b.min(a),e=b.max(a);c.min=null===c.min?d:Math.min(c.min,d),c.max=null===c.max?e:Math.max(c.max,e)})}else b.each(h,function(d,e){var g=f.getDatasetMeta(e);f.isDatasetVisible(e)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});c.min=i(e.min,c.min),c.max=i(e.max,c.max),c.min===c.max&&(0!==c.min&&null!==c.min?(c.min=Math.pow(10,Math.floor(b.log10(c.min))-1),c.max=Math.pow(10,Math.floor(b.log10(c.max))+1)):(c.min=1,c.max=10))},buildTicks:function(){for(var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=a.ticks=[],g=e(d.min,Math.pow(10,Math.floor(b.log10(a.min))));ga.max&&(a.max=d))})}}),a.handleTickRangeOptions()},getTickLimit:function(){var a=this.options.ticks,d=b.getValueOrDefault(a.fontSize,c.defaultFontSize);return Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*d)))},convertTicksToLabels:function(){var b=this;a.LinearScaleBase.prototype.convertTicksToLabels.call(b),b.pointLabels=b.chart.data.labels.map(b.options.pointLabels.callback,b)},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},fit:function(){var a,d,e,f,g,h,i,j,k,l,m,n,o=this.options.pointLabels,p=b.getValueOrDefault(o.fontSize,c.defaultFontSize),q=b.getValueOrDefault(o.fontStyle,c.defaultFontStyle),r=b.getValueOrDefault(o.fontFamily,c.defaultFontFamily),s=b.fontString(p,q,r),t=b.min([this.height/2-p-5,this.width/2]),u=this.width,v=0;for(this.ctx.font=s,d=0;du&&(u=a.x+f,g=d),a.x-fu&&(u=a.x+e,g=d):d>this.getValueCount()/2&&a.x-eb&&0>c?c:b>0&&c>0?b:0)},draw:function(){var a=this,d=a.options,e=d.gridLines,f=d.ticks,g=d.angleLines,h=d.pointLabels,i=b.getValueOrDefault;if(d.display){var j=a.ctx,k=i(f.fontSize,c.defaultFontSize),l=i(f.fontStyle,c.defaultFontStyle),m=i(f.fontFamily,c.defaultFontFamily),n=b.fontString(k,l,m);if(b.each(a.ticks,function(g,h){if(h>0||d.reverse){var l=a.getDistanceFromCenterForValue(a.ticksAsNumbers[h]),m=a.yCenter-l;if(e.display&&0!==h)if(j.strokeStyle=b.getValueAtIndexOrDefault(e.color,h-1),j.lineWidth=b.getValueAtIndexOrDefault(e.lineWidth,h-1),d.lineArc)j.beginPath(),j.arc(a.xCenter,a.yCenter,l,0,2*Math.PI),j.closePath(),j.stroke();else{j.beginPath();for(var o=0;o=0;t--){if(g.display){var u=a.getPointPosition(t,o);j.beginPath(),j.moveTo(a.xCenter,a.yCenter),j.lineTo(u.x,u.y),j.stroke(),j.closePath()}var v=a.getPointPosition(t,o+5),w=i(h.fontColor,c.defaultFontColor);j.font=s,j.fillStyle=w;var x=a.pointLabels,y=x.length,z=x.length/2,A=z/2,B=A>t||t>y-A,C=t===A||t===y-A;0===t?j.textAlign="center":t===z?j.textAlign="center":z>t?j.textAlign="left":j.textAlign="right",C?j.textBaseline="middle":B?j.textBaseline="bottom":j.textBaseline="top",j.fillText(x[t]?x[t]:"",v.x,v.y)}}}}});a.scaleService.registerScaleType("radialLinear",e,d)}},{}],43:[function(a,b,c){"use strict";var d=a(1);d="function"==typeof d?d:window.moment,b.exports=function(a){var b=a.helpers,c={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},e={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},f=a.Scale.extend({initialize:function(){if(!d)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");a.Scale.prototype.initialize.call(this)},getLabelMoment:function(a,b){return this.labelMoments[a][b]},getMomentStartOf:function(a){var b=this;return"week"===b.options.time.unit&&b.options.time.isoWeekday!==!1?a.clone().startOf("isoWeek").isoWeekday(b.options.time.isoWeekday):a.clone().startOf(b.tickUnit)},determineDataLimits:function(){var a=this;a.labelMoments=[];var c=[];a.chart.data.labels&&a.chart.data.labels.length>0?(b.each(a.chart.data.labels,function(b,d){var e=a.parseTime(b);e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),c.push(e))},a),a.firstTick=d.min.call(a,c),a.lastTick=d.max.call(a,c)):(a.firstTick=null,a.lastTick=null),b.each(a.chart.data.datasets,function(e,f){var g=[],h=a.chart.isDatasetVisible(f);"object"==typeof e.data[0]&&null!==e.data[0]?b.each(e.data,function(b,c){var e=a.parseTime(a.getRightValue(b));e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),g.push(e),h&&(a.firstTick=null!==a.firstTick?d.min(a.firstTick,e):e,a.lastTick=null!==a.lastTick?d.max(a.lastTick,e):e))},a):g=c,a.labelMoments.push(g)},a),a.options.time.min&&(a.firstTick=a.parseTime(a.options.time.min)),a.options.time.max&&(a.lastTick=a.parseTime(a.options.time.max)),a.firstTick=(a.firstTick||d()).clone(),a.lastTick=(a.lastTick||d()).clone()},buildTicks:function(d){var e=this;e.ctx.save();var f=b.getValueOrDefault(e.options.ticks.fontSize,a.defaults.global.defaultFontSize),g=b.getValueOrDefault(e.options.ticks.fontStyle,a.defaults.global.defaultFontStyle),h=b.getValueOrDefault(e.options.ticks.fontFamily,a.defaults.global.defaultFontFamily),i=b.fontString(f,g,h);if(e.ctx.font=i,e.ticks=[],e.unitScale=1,e.scaleSizeInUnits=0,e.options.time.unit)e.tickUnit=e.options.time.unit||"day",e.displayFormat=e.options.time.displayFormats[e.tickUnit],e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,1);else{var j=e.isHorizontal()?e.width-(e.paddingLeft+e.paddingRight):e.height-(e.paddingTop+e.paddingBottom),k=e.tickFormatFunction(e.firstTick,0,[]),l=e.ctx.measureText(k).width,m=Math.cos(b.toRadians(e.options.ticks.maxRotation)),n=Math.sin(b.toRadians(e.options.ticks.maxRotation));l=l*m+f*n;var o=j/l;e.tickUnit="millisecond",e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.displayFormat=e.options.time.displayFormats[e.tickUnit];for(var p=0,q=c.units[p];p=Math.ceil(e.scaleSizeInUnits/o)){e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,q.steps[r]);break}break}if(q.maxStep===!1||Math.ceil(e.scaleSizeInUnits/o)=0)break;w%e.unitScale===0&&e.ticks.push(x)}var y=e.ticks[e.ticks.length-1].diff(e.lastTick,e.tickUnit);(0!==y||0===e.scaleSizeInUnits)&&(e.options.time.max?(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.ticks[0],e.tickUnit,!0)):(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0))),e.ctx.restore()},getLabelForIndex:function(a,b){var c=this,d=c.chart.data.labels&&a10?this.massviewsRedirectWithPagePile(b.pages).then(c):(this.setInitialChartType(b.pages.length),c(b.pages))}}},{key:"processSearchResults",value:function(a){var b=a?a.query:{},c=[];return b?("autocomplete"===this.autocomplete?b.prefixsearch.length&&(c=b.prefixsearch.map(function(a){return{id:a.title.score(),text:a.title}})):"autocomplete_redirects"===this.autocomplete&&(b.redirects&&(c=b.redirects.map(function(a){return{id:a.from.score(),text:a.from}})),Object.keys(b.pages).forEach(function(a){var d=b.pages[a];c.push({id:d.title.score(),text:d.title})})),{results:c}):{results:c}}},{key:"getParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],b={project:$(this.config.projectInput).val(),platform:$(this.config.platformSelector).val(),agent:$("#agent-select").val()};return this.specialRange&&a?b.range=this.specialRange.range:(b.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),b.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),this.noLogScale&&(b.autolog="false"),b}},{key:"pushParams",value:function(){var a=$(this.config.select2Input).select2("val")||[],b=a.join("|").replace(/[&%]/g,escape);window.history&&window.history.replaceState&&window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&pages="+b),$(".permalink").prop("href","?"+$.param(this.getPermaLink())+"&pages="+b)}},{key:"setupSelect2",value:function(){var a=this,b=$(this.config.select2Input),c={ajax:this.getArticleSelectorAjax(),tags:"no_autocomplete"===this.autocomplete,placeholder:$.i18n("article-placeholder"),maximumSelectionLength:10,minimumInputLength:1};b.select2(c),b.on("change",function(b){$(b.target).val()?a.processInput():a.resetView()})}},{key:"getArticleSelectorAjax",value:function(){var a=this;return"no_autocomplete"!==this.autocomplete?{url:"https://"+this.project+".org/w/api.php",dataType:"jsonp",delay:200,jsonpCallback:"articleSuggestionCallback",data:function(b){return a.getSearchParams(b.term)},processResults:this.processSearchResults.bind(this),cache:!0}:null}},{key:"setupListeners",value:function(){h(Object.getPrototypeOf(b.prototype),"setupListeners",this).call(this),$("#platform-select, #agent-select").on("change",this.processInput.bind(this))}},{key:"setupProjectInput",value:function(){var a=this;$(this.config.projectInput).on("change",function(b){return b.target.value?void(a.validateProject()||(a.resetView(!0),a.updateInterAppLinks())):void(b.target.value=a.config.defaults.project)})}},{key:"processInput",value:function(a){var b=this,c=$(i.select2Input).select2("val")||[];this.pushParams(),(a||(location.search!==this.params||this.prevChartType!==this.chartType)&&c.length)&&(this.prevChartType&&this.clearMessages(),this.params=location.search,this.prevChartType=this.chartType,this.destroyChart(),this.startSpinny(),this.getPageViewsData(c).done(function(a){return b.updateChart(a)}))}},{key:"validateProject",value:function(){var a=$(this.config.projectInput).val();return a.startsWith("www.")&&(a=a.substring(4),$(this.config.projectInput).val(a)),k.includes(a)?($(".validate").remove(),void $(".select2-selection--multiple").removeClass("disabled")):(this.resetView(!0),this.writeMessage($.i18n("invalid-project",""+a.escape()+""),!0),$(".select2-selection--multiple").addClass("disabled"),!0)}},{key:"massviewsRedirectWithPagePile",value:function(a){var b=this,c=$.Deferred(),d=Object.keys(j).find(function(a){return j[a]===b.project+".org"});return $.ajax({url:"//tools.wmflabs.org/pagepile/api.php",data:{action:"create_pile_with_data",wiki:d,data:a.join("\n")}}).success(function(a){var c=b.getParams();delete c.project,document.location="/massviews?overflow=1&"+$.param(c)+"&source=pagepile&target="+a.pile.id}).fail(function(){b.writeMessage($.i18n("auto-pagepile-error","PagePile",10)),c.resolve(a.slice(0,10))}),c}}]),b}(mix(l)["with"](m));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new n})},{"./config":1,"./shared/chart_helpers":3,"./shared/pv":7,"./shared/site_map":9}],3:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
      "+i.map(function(a){return"
    • "+b.getPageLink(a,b.project.escape())+"
    • "}).join("")+"
    ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius", +value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
  • "+a+"
  • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
      "+c+"
    "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],6:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],7:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"checkDateRange",value:function(a){if(a.range)this.setSpecialRange(a.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(a.start){var b=moment(a.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(a.end||Date.now());if(bc)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),!1;this.daterangepicker.startDate=b,this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);return!0}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0); },2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
    "+a+"
    ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":8}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],9:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org", outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}],10:[function(a,b,c){"use strict";var d={linearLegend:function(a,b){var c="";if(1===a.length){var d=a[0];return'
    \n '+$.i18n("totals")+":\n "+b.formatNumber(d.sum)+" ("+b.formatNumber(d.average)+"/"+$.i18n("day")+')\n •\n '+$.i18n("all-languages")+'\n •\n '+$.i18n("redirects")+'\n •\n '+$.i18n("history")+'\n •\n '+$.i18n("info")+"\n
    "}if(a.length>1){var e=a.reduce(function(a,b){return a+b.sum},0);c='
    \n '+$.i18n("totals")+":\n "+b.formatNumber(e)+" ("+b.formatNumber(Math.round(e/b.numDaysInRange()))+"/"+$.i18n("day")+")\n
    "}c+='
    ';for(var f=0;f\n \n
    \n '+b.formatNumber(a[f].sum)+" ("+b.formatNumber(a[f].average)+"/"+$.i18n("day")+')\n
    \n \n \n ";return c+="
    "},circularLegend:function(a,b){var c=a[0],d=c.data.reduce(function(a,b){return a+b}),e='
    \n '+$.i18n("totals")+":\n "+b.formatNumber(d)+" ("+b.formatNumber(Math.round(d/b.numDaysInRange()))+"/"+$.i18n("day")+")\n
    ";e+='
    ';for(var f=0;f\n
    \n '+h+'\n
    \n
    \n '+b.formatNumber(c.data[f])+" ("+b.formatNumber(c.averages[f])+"/"+$.i18n("day")+')\n
    \n \n \n '}return e+="
    "}};b.exports=d},{}]},{},[3,4,5,6,7,8,9,2]); \ No newline at end of file diff --git a/public_html/langviews/application.js b/public_html/langviews/application.js index fd285536e..0f34f0e34 100644 --- a/public_html/langviews/application.js +++ b/public_html/langviews/application.js @@ -9,6 +9,6 @@ if(0==h)return f=255*i,[f,f,f];c=.5>i?i*(1+h):i+h-i*h,b=2*i-c,e=[0,0,0];for(var }},calculatePointY:function(a,b,c,d){var e,f,g,h=this,i=h.chart,j=h.getMeta(),k=h.getScaleForId(j.yAxisID),l=0,m=0;if(k.options.stacked){for(e=0;c>e;e++)f=i.data.datasets[e],g=i.getDatasetMeta(e),"line"===g.type&&i.isDatasetVisible(e)&&(f.data[b]<0?m+=f.data[b]||0:l+=f.data[b]||0);return 0>a?k.getPixelForValue(m+a):k.getPixelForValue(l+a)}return k.getPixelForValue(a)},updateBezierControlPoints:function(){var a,b,d,e,f,g=this.getMeta(),h=(this.chart.chartArea,g.data||[]);for(a=0,b=h.length;b>a;++a)d=h[a],e=d._model,f=c.splineCurve(c.previousItem(h,a)._model,e,c.nextItem(h,a)._model,g.dataset._model.tension),e.controlPointPreviousX=f.previous.x,e.controlPointPreviousY=f.previous.y,e.controlPointNextX=f.next.x,e.controlPointNextY=f.next.y},draw:function(a){var c,d,e=this,f=e.getMeta(),g=f.data||[],h=a||1;for(c=0,d=g.length;d>c;++c)g[c].transition(h);for(b(e.getDataset(),e.chart.options)&&f.dataset.transition(h).draw(),c=0,d=g.length;d>c;++c)g[c].draw()},setHoverStyle:function(a){var b=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=a._model;f.radius=e.hoverRadius||c.getValueAtIndexOrDefault(b.pointHoverRadius,d,this.chart.options.elements.point.hoverRadius),f.backgroundColor=e.hoverBackgroundColor||c.getValueAtIndexOrDefault(b.pointHoverBackgroundColor,d,c.getHoverColor(f.backgroundColor)),f.borderColor=e.hoverBorderColor||c.getValueAtIndexOrDefault(b.pointHoverBorderColor,d,c.getHoverColor(f.borderColor)),f.borderWidth=e.hoverBorderWidth||c.getValueAtIndexOrDefault(b.pointHoverBorderWidth,d,f.borderWidth)},removeHoverStyle:function(a){var b=this,d=b.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=a._model;void 0!==d.radius&&void 0===d.pointRadius&&(d.pointRadius=d.radius),g.radius=f.radius||c.getValueAtIndexOrDefault(d.pointRadius,e,b.chart.options.elements.point.radius),g.backgroundColor=b.getPointBackgroundColor(a,e),g.borderColor=b.getPointBorderColor(a,e),g.borderWidth=b.getPointBorderWidth(a,e)}})}},{}],19:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0},animation:{animateRotate:!0,animateScale:!0},aspectRatio:1,legendCallback:function(a){var b=[];b.push('
      ');var c=a.data,d=c.datasets,e=c.labels;if(d.length)for(var f=0;f'),e[f]&&b.push(e[f]),b.push("");return b.push("
    "),b.join("")},legend:{labels:{generateLabels:function(a){var c=a.data;return c.labels.length&&c.datasets.length?c.labels.map(function(d,e){var f=a.getDatasetMeta(0),g=c.datasets[0],h=f.data[e],i=h.custom||{},j=b.getValueAtIndexOrDefault,k=a.options.elements.arc,l=i.backgroundColor?i.backgroundColor:j(g.backgroundColor,e,k.backgroundColor),m=i.borderColor?i.borderColor:j(g.borderColor,e,k.borderColor),n=i.borderWidth?i.borderWidth:j(g.borderWidth,e,k.borderWidth);return{text:d,fillStyle:l,strokeStyle:m,lineWidth:n,hidden:isNaN(g.data[e])||f.data[e].hidden,index:e}}):[]}},onClick:function(a,b){var c,d,e,f=b.index,g=this.chart;for(c=0,d=(g.data.datasets||[]).length;d>c;++c)e=g.getDatasetMeta(c),e.data[f].hidden=!e.data[f].hidden;g.update()}},tooltips:{callbacks:{title:function(){return""},label:function(a,b){return b.labels[a.index]+": "+a.yLabel}}}},a.controllers.polarArea=a.DatasetController.extend({dataElementType:a.elements.Arc,linkScales:b.noop,update:function(a){var c=this,d=c.chart,e=d.chartArea,f=c.getMeta(),g=d.options,h=g.elements.arc,i=Math.min(e.right-e.left,e.bottom-e.top);d.outerRadius=Math.max((i-h.borderWidth/2)/2,0),d.innerRadius=Math.max(g.cutoutPercentage?d.outerRadius/100*g.cutoutPercentage:1,0),d.radiusLength=(d.outerRadius-d.innerRadius)/d.getVisibleDatasetCount(),c.outerRadius=d.outerRadius-d.radiusLength*c.index,c.innerRadius=c.outerRadius-d.radiusLength,f.count=c.countVisibleElements(),b.each(f.data,function(b,d){c.updateElement(b,d,a)})},updateElement:function(a,c,d){for(var e=this,f=e.chart,g=f.chartArea,h=e.getDataset(),i=f.options,j=i.animation,k=(i.elements.arc,a.custom||{},f.scale),l=b.getValueAtIndexOrDefault,m=f.data.labels,n=e.calculateCircumference(h.data[c]),o=(g.left+g.right)/2,p=(g.top+g.bottom)/2,q=0,r=e.getMeta(),s=0;c>s;++s)isNaN(h.data[s])||r.data[s].hidden||++q;var t=-.5*Math.PI,u=a.hidden?0:k.getDistanceFromCenterForValue(h.data[c]),v=t+n*q,w=v+(a.hidden?0:n),x=j.animateScale?0:k.getDistanceFromCenterForValue(h.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:k,_model:{x:o,y:p,innerRadius:0,outerRadius:d?x:u,startAngle:d&&j.animateRotate?t:v,endAngle:d&&j.animateRotate?t:w,label:l(m,c,m[c])}}),e.removeHoverStyle(a),a.pivot()},removeHoverStyle:function(b){a.DatasetController.prototype.removeHoverStyle.call(this,b,this.chart.options.elements.arc)},countVisibleElements:function(){var a=this.getDataset(),c=this.getMeta(),d=0;return b.each(c.data,function(b,c){isNaN(a.data[c])||b.hidden||d++}),d},calculateCircumference:function(a){var b=this.getMeta().count;return b>0&&!isNaN(a)?2*Math.PI/b:0}})}},{}],20:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},a.controllers.radar=a.DatasetController.extend({datasetElementType:a.elements.Line,dataElementType:a.elements.Point,linkScales:b.noop,addElementAndReset:function(b){a.DatasetController.prototype.addElementAndReset.call(this,b),this.updateBezierControlPoints()},update:function(a){var c=this,d=c.getMeta(),e=d.dataset,f=d.data,g=e.custom||{},h=c.getDataset(),i=c.chart.options.elements.line,j=c.chart.scale;void 0!==h.tension&&void 0===h.lineTension&&(h.lineTension=h.tension),b.extend(d.dataset,{_datasetIndex:c.index,_children:f,_loop:!0,_model:{tension:g.tension?g.tension:b.getValueOrDefault(h.lineTension,i.tension),backgroundColor:g.backgroundColor?g.backgroundColor:h.backgroundColor||i.backgroundColor,borderWidth:g.borderWidth?g.borderWidth:h.borderWidth||i.borderWidth,borderColor:g.borderColor?g.borderColor:h.borderColor||i.borderColor,fill:g.fill?g.fill:void 0!==h.fill?h.fill:i.fill,borderCapStyle:g.borderCapStyle?g.borderCapStyle:h.borderCapStyle||i.borderCapStyle,borderDash:g.borderDash?g.borderDash:h.borderDash||i.borderDash,borderDashOffset:g.borderDashOffset?g.borderDashOffset:h.borderDashOffset||i.borderDashOffset,borderJoinStyle:g.borderJoinStyle?g.borderJoinStyle:h.borderJoinStyle||i.borderJoinStyle,scaleTop:j.top,scaleBottom:j.bottom,scaleZero:j.getBasePosition()}}),d.dataset.pivot(),b.each(f,function(b,d){c.updateElement(b,d,a)},c),c.updateBezierControlPoints()},updateElement:function(a,c,d){var e=this,f=a.custom||{},g=e.getDataset(),h=e.chart.scale,i=e.chart.options.elements.point,j=h.getPointPositionForValue(c,g.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:h,_model:{x:d?h.xCenter:j.x,y:d?h.yCenter:j.y,tension:f.tension?f.tension:b.getValueOrDefault(g.tension,e.chart.options.elements.line.tension),radius:f.radius?f.radius:b.getValueAtIndexOrDefault(g.pointRadius,c,i.radius),backgroundColor:f.backgroundColor?f.backgroundColor:b.getValueAtIndexOrDefault(g.pointBackgroundColor,c,i.backgroundColor),borderColor:f.borderColor?f.borderColor:b.getValueAtIndexOrDefault(g.pointBorderColor,c,i.borderColor),borderWidth:f.borderWidth?f.borderWidth:b.getValueAtIndexOrDefault(g.pointBorderWidth,c,i.borderWidth),pointStyle:f.pointStyle?f.pointStyle:b.getValueAtIndexOrDefault(g.pointStyle,c,i.pointStyle),hitRadius:f.hitRadius?f.hitRadius:b.getValueAtIndexOrDefault(g.hitRadius,c,i.hitRadius)}}),a._model.skip=f.skip?f.skip:isNaN(a._model.x)||isNaN(a._model.y)},updateBezierControlPoints:function(){var a=this.chart.chartArea,c=this.getMeta();b.each(c.data,function(d,e){var f=d._model,g=b.splineCurve(b.previousItem(c.data,e,!0)._model,f,b.nextItem(c.data,e,!0)._model,f.tension);f.controlPointPreviousX=Math.max(Math.min(g.previous.x,a.right),a.left),f.controlPointPreviousY=Math.max(Math.min(g.previous.y,a.bottom),a.top),f.controlPointNextX=Math.max(Math.min(g.next.x,a.right),a.left),f.controlPointNextY=Math.max(Math.min(g.next.y,a.bottom),a.top),d.pivot()})},draw:function(a){var c=this.getMeta(),d=a||1;b.each(c.data,function(a,b){a.transition(d)}),c.dataset.transition(d).draw(),b.each(c.data,function(a){a.draw()})},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model;f.radius=d.hoverRadius?d.hoverRadius:b.getValueAtIndexOrDefault(c.pointHoverRadius,e,this.chart.options.elements.point.hoverRadius),f.backgroundColor=d.hoverBackgroundColor?d.hoverBackgroundColor:b.getValueAtIndexOrDefault(c.pointHoverBackgroundColor,e,b.getHoverColor(f.backgroundColor)),f.borderColor=d.hoverBorderColor?d.hoverBorderColor:b.getValueAtIndexOrDefault(c.pointHoverBorderColor,e,b.getHoverColor(f.borderColor)),f.borderWidth=d.hoverBorderWidth?d.hoverBorderWidth:b.getValueAtIndexOrDefault(c.pointHoverBorderWidth,e,f.borderWidth)},removeHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model,g=this.chart.options.elements.point;f.radius=d.radius?d.radius:b.getValueAtIndexOrDefault(c.radius,e,g.radius),f.backgroundColor=d.backgroundColor?d.backgroundColor:b.getValueAtIndexOrDefault(c.pointBackgroundColor,e,g.backgroundColor),f.borderColor=d.borderColor?d.borderColor:b.getValueAtIndexOrDefault(c.pointBorderColor,e,g.borderColor),f.borderWidth=d.borderWidth?d.borderWidth:b.getValueAtIndexOrDefault(c.pointBorderWidth,e,g.borderWidth)}})}},{}],21:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:b.noop,onComplete:b.noop},a.Animation=a.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),a.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(a,b,c,d){var e=this;d||(a.animating=!0);for(var f=0;f1&&(c=Math.floor(a.dropFrames),a.dropFrames=a.dropFrames%1);for(var d=0;da.animations[d].animationObject.numSteps&&(a.animations[d].animationObject.currentStep=a.animations[d].animationObject.numSteps),a.animations[d].animationObject.render(a.animations[d].chartInstance,a.animations[d].animationObject),a.animations[d].animationObject.onAnimationProgress&&a.animations[d].animationObject.onAnimationProgress.call&&a.animations[d].animationObject.onAnimationProgress.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].animationObject.currentStep===a.animations[d].animationObject.numSteps?(a.animations[d].animationObject.onAnimationComplete&&a.animations[d].animationObject.onAnimationComplete.call&&a.animations[d].animationObject.onAnimationComplete.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].chartInstance.animating=!1,a.animations.splice(d,1)):++d;var e=Date.now(),f=(e-b)/a.frameDuration;a.dropFrames+=f,a.animations.length>0&&a.requestAnimationFrame()}}}},{}],22:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.types={},a.instances={},a.controllers={},a.Controller=function(c){return this.chart=c,this.config=c.config,this.options=this.config.options=b.configMerge(a.defaults.global,a.defaults[this.config.type],this.config.options||{}),this.id=b.uid(),Object.defineProperty(this,"data",{get:function(){return this.config.data}}),a.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},b.extend(a.Controller.prototype,{initialize:function(){var b=this;return a.plugins.notify("beforeInit",[b]),b.bindEvents(),b.ensureScalesHaveIDs(),b.buildOrUpdateControllers(),b.buildScales(),b.updateLayout(),b.resetElements(),b.initToolTip(),b.update(),a.plugins.notify("afterInit",[b]),b},clear:function(){return b.clear(this.chart),this},stop:function(){return a.animationService.cancelAnimation(this),this},resize:function(c){var d=this,e=d.chart,f=e.canvas,g=b.getMaximumWidth(f),h=e.aspectRatio,i=d.options.maintainAspectRatio&&isNaN(h)===!1&&isFinite(h)&&0!==h?g/h:b.getMaximumHeight(f),j=e.width!==g||e.height!==i;if(!j)return d;f.width=e.width=g,f.height=e.height=i,b.retinaScale(e);var k={width:g,height:i};return a.plugins.notify("resize",[d,k]),d.options.onResize&&d.options.onResize(d,k),c||(d.stop(),d.update(d.options.responsiveAnimationDuration)),d},ensureScalesHaveIDs:function(){var a=this.options,c=a.scales||{},d=a.scale;b.each(c.xAxes,function(a,b){a.id=a.id||"x-axis-"+b}),b.each(c.yAxes,function(a,b){a.id=a.id||"y-axis-"+b}),d&&(d.id=d.id||"scale")},buildScales:function(){var c=this,d=c.options,e=c.scales={},f=[];d.scales&&(f=f.concat((d.scales.xAxes||[]).map(function(a){return{options:a,dtype:"category"}}),(d.scales.yAxes||[]).map(function(a){return{options:a,dtype:"linear"}}))),d.scale&&f.push({options:d.scale,dtype:"radialLinear",isDefault:!0}),b.each(f,function(d,f){var g=d.options,h=b.getValueOrDefault(g.type,d.dtype),i=a.scaleService.getScaleConstructor(h);if(i){var j=new i({id:g.id,options:g,ctx:c.chart.ctx,chart:c});e[j.id]=j,d.isDefault&&(c.scale=j)}}),a.scaleService.addScalesToLayout(this)},updateLayout:function(){a.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var c=this,d=[],e=[];if(b.each(c.data.datasets,function(b,f){var g=c.getDatasetMeta(f);g.type||(g.type=b.type||c.config.type),d.push(g.type),g.controller?g.controller.updateIndex(f):(g.controller=new a.controllers[g.type](c,f),e.push(g.controller))},c),d.length>1)for(var f=1;fb;++b)d.getDatasetMeta(b).controller.update();a.plugins.notify("afterDatasetsUpdate",[d])}},render:function(c,d){var e=this;a.plugins.notify("beforeRender",[e]);var f=e.options.animation;if(f&&("undefined"!=typeof c&&0!==c||"undefined"==typeof c&&0!==f.duration)){var g=new a.Animation;g.numSteps=(c||f.duration)/16.66,g.easing=f.easing,g.render=function(a,c){var d=b.easingEffects[c.easing],e=c.currentStep/c.numSteps,f=d(e);a.draw(f,e,c.currentStep)},g.onAnimationProgress=f.onProgress,g.onAnimationComplete=f.onComplete,a.animationService.addAnimation(e,g,c,d)}else e.draw(),f&&f.onComplete&&f.onComplete.call&&f.onComplete.call(e);return e},draw:function(c){var d=this,e=c||1;d.clear(),a.plugins.notify("beforeDraw",[d,e]),b.each(d.boxes,function(a){a.draw(d.chartArea)},d),d.scale&&d.scale.draw(),a.plugins.notify("beforeDatasetsDraw",[d,e]),b.each(d.data.datasets,function(a,b){d.isDatasetVisible(b)&&d.getDatasetMeta(b).controller.draw(c)},d,!0),a.plugins.notify("afterDatasetsDraw",[d,e]),d.tooltip.transition(e).draw(),a.plugins.notify("afterDraw",[d,e])},getElementAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[];return b.each(c.data.datasets,function(a,f){if(c.isDatasetVisible(f)){var g=c.getDatasetMeta(f);b.each(g.data,function(a,b){return a.inRange(d.x,d.y)?(e.push(a),e):void 0})}}),e},getElementsAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[],f=function(){if(c.data.datasets)for(var a=0;a0&&(b=this.getDatasetMeta(b[0]._datasetIndex).data),b},getDatasetMeta:function(a){var b=this,c=b.data.datasets[a];c._meta||(c._meta={});var d=c._meta[b.id];return d||(d=c._meta[b.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),d},getVisibleDatasetCount:function(){for(var a=0,b=0,c=this.data.datasets.length;c>b;++b)this.isDatasetVisible(b)&&a++;return a},isDatasetVisible:function(a){var b=this.getDatasetMeta(a);return"boolean"==typeof b.hidden?!b.hidden:!this.data.datasets[a].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var c=this;c.stop(),c.clear(),b.unbindEvents(c,c.events),b.removeResizeListener(c.chart.canvas.parentNode);var d=c.chart.canvas;d.width=c.chart.width,d.height=c.chart.height,void 0!==c.chart.originalDevicePixelRatio&&c.chart.ctx.scale(1/c.chart.originalDevicePixelRatio,1/c.chart.originalDevicePixelRatio),d.style.width=c.chart.originalCanvasStyleWidth,d.style.height=c.chart.originalCanvasStyleHeight,a.plugins.notify("destroy",[c]),delete a.instances[c.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var b=this;b.tooltip=new a.Tooltip({_chart:b.chart,_chartInstance:b,_data:b.data,_options:b.options.tooltips},b)},bindEvents:function(){var a=this;b.bindEvents(a,a.options.events,function(b){a.eventHandler(b)})},updateHoverStyle:function(a,b,c){var d,e,f,g=c?"setHoverStyle":"removeHoverStyle";switch(b){case"single":a=[a[0]];break;case"label":case"dataset":break;default:return}for(e=0,f=a.length;f>e;++e)d=a[e],d&&this.getDatasetMeta(d._datasetIndex).controller[g](d)},eventHandler:function(a){var c=this,d=c.tooltip,e=c.options||{},f=e.hover,g=e.tooltips;return c.lastActive=c.lastActive||[],c.lastTooltipActive=c.lastTooltipActive||[],"mouseout"===a.type?(c.active=[],c.tooltipActive=[]):(c.active=c.getElementsAtEventForMode(a,f.mode),c.tooltipActive=c.getElementsAtEventForMode(a,g.mode)),f.onHover&&f.onHover.call(c,c.active),("mouseup"===a.type||"click"===a.type)&&(e.onClick&&e.onClick.call(c,a,c.active),c.legend&&c.legend.handleEvent&&c.legend.handleEvent(a)),c.lastActive.length&&c.updateHoverStyle(c.lastActive,f.mode,!1),c.active.length&&f.mode&&c.updateHoverStyle(c.active,f.mode,!0),(g.enabled||g.custom)&&(d.initialize(),d._active=c.tooltipActive,d.update(!0)),d.pivot(),c.animating||b.arrayEquals(c.active,c.lastActive)&&b.arrayEquals(c.tooltipActive,c.lastTooltipActive)||(c.stop(),(g.enabled||g.custom)&&d.update(!0),c.render(f.animationDuration,!0)),c.lastActive=c.active,c.lastTooltipActive=c.tooltipActive,c}})}},{}],23:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.DatasetController=function(a,b){this.initialize.call(this,a,b)},b.extend(a.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(a,b){var c=this;c.chart=a,c.index=b,c.linkScales(),c.addElements()},updateIndex:function(a){this.index=a},linkScales:function(){var a=this,b=a.getMeta(),c=a.getDataset();null===b.xAxisID&&(b.xAxisID=c.xAxisID||a.chart.options.scales.xAxes[0].id),null===b.yAxisID&&(b.yAxisID=c.yAxisID||a.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(a){return this.chart.scales[a]},reset:function(){this.update(!0)},createMetaDataset:function(){var a=this,b=a.datasetElementType;return b&&new b({_chart:a.chart.chart,_datasetIndex:a.index})},createMetaData:function(a){var b=this,c=b.dataElementType;return c&&new c({_chart:b.chart.chart,_datasetIndex:b.index,_index:a})},addElements:function(){var a,b,c=this,d=c.getMeta(),e=c.getDataset().data||[],f=d.data;for(a=0,b=e.length;b>a;++a)f[a]=f[a]||c.createMetaData(d,a);d.dataset=d.dataset||c.createMetaDataset()},addElementAndReset:function(a){var b=this,c=b.createMetaData(a);b.getMeta().data.splice(a,0,c),b.updateElement(c,a,!0)},buildOrUpdateElements:function(){var a=this.getMeta(),b=a.data,c=this.getDataset().data.length,d=b.length;if(d>c)b.splice(c,d-c);else if(c>d)for(var e=d;c>e;++e)this.addElementAndReset(e)},update:c,draw:function(a){var c=a||1;b.each(this.getMeta().data,function(a,b){a.transition(c).draw()})},removeHoverStyle:function(a,c){var d=this.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=b.getValueAtIndexOrDefault,h=(b.color,a._model);h.backgroundColor=f.backgroundColor?f.backgroundColor:g(d.backgroundColor,e,c.backgroundColor),h.borderColor=f.borderColor?f.borderColor:g(d.borderColor,e,c.borderColor),h.borderWidth=f.borderWidth?f.borderWidth:g(d.borderWidth,e,c.borderWidth)},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=b.getValueAtIndexOrDefault,g=(b.color,b.getHoverColor),h=a._model;h.backgroundColor=e.hoverBackgroundColor?e.hoverBackgroundColor:f(c.hoverBackgroundColor,d,g(h.backgroundColor)),h.borderColor=e.hoverBorderColor?e.hoverBorderColor:f(c.hoverBorderColor,d,g(h.borderColor)),h.borderWidth=e.hoverBorderWidth?e.hoverBorderWidth:f(c.hoverBorderWidth,d,h.borderWidth)}}),a.DatasetController.extend=b.inherits}},{}],24:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.elements={},a.Element=function(a){b.extend(this,a),this.initialize.apply(this,arguments)},b.extend(a.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var a=this;return a._view||(a._view=b.clone(a._model)),a._start=b.clone(a._view),a},transition:function(a){var c=this;return c._view||(c._view=b.clone(c._model)),1===a?(c._view=c._model,c._start=null,c):(c._start||c.pivot(),b.each(c._model,function(d,e){if("_"===e[0]);else if(c._view.hasOwnProperty(e))if(d===c._view[e]);else if("string"==typeof d)try{var f=b.color(c._model[e]).mix(b.color(c._start[e]),a);c._view[e]=f.rgbString()}catch(g){c._view[e]=d}else if("number"==typeof d){var h=void 0!==c._start[e]&&isNaN(c._start[e])===!1?c._start[e]:0;c._view[e]=(c._model[e]-h)*a+h}else c._view[e]=d;else"number"!=typeof d||isNaN(c._view[e])?c._view[e]=d:c._view[e]=d*a},c),c)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return b.isNumber(this._model.x)&&b.isNumber(this._model.y)}}),a.Element.extend=b.inherits}},{}],25:[function(a,b,c){"use strict";var d=a(3);b.exports=function(a){function b(a,b,c){var d;return"string"==typeof a?(d=parseInt(a,10),-1!=a.indexOf("%")&&(d=d/100*b.parentNode[c])):d=a,d}function c(a){return void 0!==a&&null!==a&&"none"!==a}function e(a,d,e){var f=document.defaultView,g=a.parentNode,h=f.getComputedStyle(a)[d],i=f.getComputedStyle(g)[d],j=c(h),k=c(i),l=Number.POSITIVE_INFINITY;return j||k?Math.min(j?b(h,a,e):l,k?b(i,g,e):l):"none"}var f=a.helpers={};f.each=function(a,b,c,d){var e,g;if(f.isArray(a))if(g=a.length,d)for(e=g-1;e>=0;e--)b.call(c,a[e],e);else for(e=0;g>e;e++)b.call(c,a[e],e);else if("object"==typeof a){var h=Object.keys(a);for(g=h.length,e=0;g>e;e++)b.call(c,a[h[e]],h[e])}},f.clone=function(a){var b={};return f.each(a,function(a,c){f.isArray(a)?b[c]=a.slice(0):"object"==typeof a&&null!==a?b[c]=f.clone(a):b[c]=a}),b},f.extend=function(a){for(var b=function(b,c){a[c]=b},c=1,d=arguments.length;d>c;c++)f.each(arguments[c],b);return a},f.configMerge=function(b){var c=f.clone(b);return f.each(Array.prototype.slice.call(arguments,1),function(b){f.each(b,function(b,d){if("scales"===d)c[d]=f.scaleMerge(c.hasOwnProperty(d)?c[d]:{},b);else if("scale"===d)c[d]=f.configMerge(c.hasOwnProperty(d)?c[d]:{},a.scaleService.getScaleDefaults(b.type),b);else if(c.hasOwnProperty(d)&&f.isArray(c[d])&&f.isArray(b)){var e=c[d];f.each(b,function(a,b){b=d[c].length||!d[c][e].type?d[c].push(f.configMerge(h,b)):b.type&&b.type!==d[c][e].type?d[c][e]=f.configMerge(d[c][e],h,b):d[c][e]=f.configMerge(d[c][e],b)}):(d[c]=[],f.each(b,function(b){var e=f.getValueOrDefault(b.type,"xAxes"===c?"category":"linear");d[c].push(f.configMerge(a.scaleService.getScaleDefaults(e),b))})):d.hasOwnProperty(c)&&"object"==typeof d[c]&&null!==d[c]&&"object"==typeof b?d[c]=f.configMerge(d[c],b):d[c]=b}),d},f.getValueAtIndexOrDefault=function(a,b,c){return void 0===a||null===a?c:f.isArray(a)?bc;++c)if(a[c]===b)return c;return-1},f.where=function(a,b){if(f.isArray(a)&&Array.prototype.filter)return a.filter(b);var c=[];return f.each(a,function(a){b(a)&&c.push(a)}),c},f.findIndex=Array.prototype.findIndex?function(a,b,c){return a.findIndex(b,c)}:function(a,b,c){c=void 0===c?a:c;for(var d=0,e=a.length;e>d;++d)if(b.call(c,a[d],d,a))return d;return-1},f.findNextWhere=function(a,b,c){(void 0===c||null===c)&&(c=-1);for(var d=c+1;d=0;d--){var e=a[d];if(b(e))return e}},f.inherits=function(a){var b=this,c=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return b.apply(this,arguments)},d=function(){this.constructor=c};return d.prototype=b.prototype,c.prototype=new d,c.extend=f.inherits,a&&f.extend(c.prototype,a),c.__super__=b.prototype,c},f.noop=function(){},f.uid=function(){var a=0;return function(){return a++}}(),f.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},f.almostEquals=function(a,b,c){return Math.abs(a-b)0?1:-1},f.log10=Math.log10?function(a){return Math.log10(a)}:function(a){return Math.log(a)/Math.LN10},f.toRadians=function(a){return a*(Math.PI/180)},f.toDegrees=function(a){return a*(180/Math.PI)},f.getAngleFromPoint=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=Math.sqrt(c*c+d*d),f=Math.atan2(d,c);return f<-.5*Math.PI&&(f+=2*Math.PI),{angle:f,distance:e}},f.aliasPixel=function(a){return a%2===0?0:.5},f.splineCurve=function(a,b,c,d){var e=a.skip?b:a,f=b,g=c.skip?b:c,h=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),i=Math.sqrt(Math.pow(g.x-f.x,2)+Math.pow(g.y-f.y,2)),j=h/(h+i),k=i/(h+i);j=isNaN(j)?0:j,k=isNaN(k)?0:k;var l=d*j,m=d*k;return{previous:{x:f.x-l*(g.x-e.x),y:f.y-l*(g.y-e.y)},next:{x:f.x+m*(g.x-e.x),y:f.y+m*(g.y-e.y)}}},f.nextItem=function(a,b,c){return c?b>=a.length-1?a[0]:a[b+1]:b>=a.length-1?a[a.length-1]:a[b+1]},f.previousItem=function(a,b,c){return c?0>=b?a[a.length-1]:a[b-1]:0>=b?a[0]:a[b-1]},f.niceNum=function(a,b){var c,d=Math.floor(f.log10(a)),e=a/Math.pow(10,d);return c=b?1.5>e?1:3>e?2:7>e?5:10:1>=e?1:2>=e?2:5>=e?5:10,c*Math.pow(10,d)};var g=f.easingEffects={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return(a/=.5)<1?.5*a*a:-.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var b=1.70158,c=0,d=1;return 0===a?0:1===(a/=1)?1:(c||(c=.3),da?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)):d*Math.pow(2,-10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)*.5+1)},easeInBack:function(a){var b=1.70158;return 1*(a/=1)*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return 1*((a=a/1-1)*a*((b+1)*a+b)+1)},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},easeInBounce:function(a){return 1-g.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):2/2.75>a?1*(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},easeInOutBounce:function(a){return.5>a?.5*g.easeInBounce(2*a):.5*g.easeOutBounce(2*a-1)+.5}};f.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),f.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1e3/60)}}(),f.getRelativePosition=function(a,b){var c,d,e=a.originalEvent||a,g=a.currentTarget||a.srcElement,h=g.getBoundingClientRect(),i=e.touches;i&&i.length>0?(c=i[0].clientX,d=i[0].clientY):(c=e.clientX,d=e.clientY);var j=parseFloat(f.getStyle(g,"padding-left")),k=parseFloat(f.getStyle(g,"padding-top")),l=parseFloat(f.getStyle(g,"padding-right")),m=parseFloat(f.getStyle(g,"padding-bottom")),n=h.right-h.left-j-l,o=h.bottom-h.top-k-m; return c=Math.round((c-h.left-j)/n*g.width/b.currentDevicePixelRatio),d=Math.round((d-h.top-k)/o*g.height/b.currentDevicePixelRatio),{x:c,y:d}},f.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},f.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=f.noop},f.bindEvents=function(a,b,c){var d=a.events=a.events||{};f.each(b,function(b){d[b]=function(){c.apply(a,arguments)},f.addEvent(a.chart.canvas,b,d[b])})},f.unbindEvents=function(a,b){var c=a.chart.canvas;f.each(b,function(a,b){f.removeEvent(c,b,a)})},f.getConstraintWidth=function(a){return e(a,"max-width","clientWidth")},f.getConstraintHeight=function(a){return e(a,"max-height","clientHeight")},f.getMaximumWidth=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-left"))+parseInt(f.getStyle(b,"padding-right")),d=b.clientWidth-c,e=f.getConstraintWidth(a);return isNaN(e)?d:Math.min(d,e)},f.getMaximumHeight=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-top"))+parseInt(f.getStyle(b,"padding-bottom")),d=b.clientHeight-c,e=f.getConstraintHeight(a);return isNaN(e)?d:Math.min(d,e)},f.getStyle=function(a,b){return a.currentStyle?a.currentStyle[b]:document.defaultView.getComputedStyle(a,null).getPropertyValue(b)},f.retinaScale=function(a){var b=a.ctx,c=a.canvas,d=c.width,e=c.height,f=a.currentDevicePixelRatio=window.devicePixelRatio||1;1!==f&&(c.height=e*f,c.width=d*f,b.scale(f,f),a.originalDevicePixelRatio=a.originalDevicePixelRatio||f),c.style.width=d+"px",c.style.height=e+"px"},f.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},f.fontString=function(a,b,c){return b+" "+a+"px "+c},f.longestText=function(a,b,c,d){d=d||{};var e=d.data=d.data||{},g=d.garbageCollect=d.garbageCollect||[];d.font!==b&&(e=d.data={},g=d.garbageCollect=[],d.font=b),a.font=b;var h=0;f.each(c,function(b){void 0!==b&&null!==b&&f.isArray(b)!==!0?h=f.measureText(a,e,g,h,b):f.isArray(b)&&f.each(b,function(b){void 0===b||null===b||f.isArray(b)||(h=f.measureText(a,e,g,h,b))})});var i=g.length/2;if(i>c.length){for(var j=0;i>j;j++)delete e[g[j]];g.splice(0,i)}return h},f.measureText=function(a,b,c,d,e){var f=b[e];return f||(f=b[e]=a.measureText(e).width,c.push(e)),f>d&&(d=f),d},f.numberOfLabelLines=function(a){var b=1;return f.each(a,function(a){f.isArray(a)&&a.length>b&&(b=a.length)}),b},f.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()},f.color=function(b){return d?d(b instanceof CanvasGradient?a.defaults.global.defaultColor:b):(console.log("Color.js not found!"),b)},f.addResizeListener=function(a,b){var c=document.createElement("iframe"),d="chartjs-hidden-iframe";c.classlist?c.classlist.add(d):c.setAttribute("class",d);var e=c.style;e.width="100%",e.display="block",e.border=0,e.height=0,e.margin=0,e.position="absolute",e.left=0,e.right=0,e.top=0,e.bottom=0,a.insertBefore(c,a.firstChild),(c.contentWindow||c).onresize=function(){b&&b()}},f.removeResizeListener=function(a){var b=a.querySelector(".chartjs-hidden-iframe");b&&b.parentNode.removeChild(b)},f.isArray=Array.isArray?function(a){return Array.isArray(a)}:function(a){return"[object Array]"===Object.prototype.toString.call(a)},f.arrayEquals=function(a,b){var c,d,e,g;if(!a||!b||a.length!=b.length)return!1;for(c=0,d=a.length;d>c;++c)if(e=a[c],g=b[c],e instanceof Array&&g instanceof Array){if(!f.arrayEquals(e,g))return!1}else if(e!=g)return!1;return!0},f.callCallback=function(a,b,c){a&&"function"==typeof a.call&&a.apply(c,b)},f.getHoverColor=function(a){return a instanceof CanvasPattern?a:f.color(a).saturate(.5).darken(.1).rgbString()}}},{3:3}],26:[function(a,b,c){"use strict";b.exports=function(){var a=function(b,c){var d=this,e=a.helpers;return d.config=c,b.length&&b[0].getContext&&(b=b[0]),b.getContext&&(b=b.getContext("2d")),d.ctx=b,d.canvas=b.canvas,b.canvas.style.display=b.canvas.style.display||"block",d.width=b.canvas.width||parseInt(e.getStyle(b.canvas,"width"),10)||e.getMaximumWidth(b.canvas),d.height=b.canvas.height||parseInt(e.getStyle(b.canvas,"height"),10)||e.getMaximumHeight(b.canvas),d.aspectRatio=d.width/d.height,(isNaN(d.aspectRatio)||isFinite(d.aspectRatio)===!1)&&(d.aspectRatio=void 0!==c.aspectRatio?c.aspectRatio:2),d.originalCanvasStyleWidth=b.canvas.style.width,d.originalCanvasStyleHeight=b.canvas.style.height,e.retinaScale(d),c&&(d.controller=new a.Controller(d)),e.addResizeListener(b.canvas.parentNode,function(){d.controller&&d.controller.config.options.responsive&&d.controller.resize()}),d.controller?d.controller:d};return a.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(a){var b=[];b.push('
      ');for(var c=0;c'),a.data.datasets[c].label&&b.push(a.data.datasets[c].label),b.push("");return b.push("
    "),b.join("")}}},a.Chart=a,a}},{}],27:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.layoutService={defaults:{},addBox:function(a,b){a.boxes||(a.boxes=[]),a.boxes.push(b)},removeBox:function(a,b){a.boxes&&a.boxes.splice(a.boxes.indexOf(b),1)},update:function(a,c,d){function e(a){var b,c=a.isHorizontal();c?(b=a.update(a.options.fullWidth?p:v,u),w-=b.height):(b=a.update(t,s),v-=b.width),x.push({horizontal:c,minSize:b,box:a})}function f(a){var c=b.findNextWhere(x,function(b){return b.box===a});if(c)if(a.isHorizontal()){var d={left:y,right:z,top:0,bottom:0};a.update(a.options.fullWidth?p:v,q/2,d)}else a.update(c.minSize.width,w)}function g(a){var c=b.findNextWhere(x,function(b){return b.box===a}),d={left:0,right:0,top:A,bottom:B};c&&a.update(c.minSize.width,w,d)}function h(a){a.isHorizontal()?(a.left=a.options.fullWidth?i:y,a.right=a.options.fullWidth?c-i:y+v,a.top=F,a.bottom=F+a.height,F=a.bottom):(a.left=E,a.right=E+a.width,a.top=A,a.bottom=A+w,E=a.right)}if(a){var i=0,j=0,k=b.where(a.boxes,function(a){return"left"===a.options.position}),l=b.where(a.boxes,function(a){return"right"===a.options.position}),m=b.where(a.boxes,function(a){return"top"===a.options.position}),n=b.where(a.boxes,function(a){return"bottom"===a.options.position}),o=b.where(a.boxes,function(a){return"chartArea"===a.options.position});m.sort(function(a,b){return(b.options.fullWidth?1:0)-(a.options.fullWidth?1:0)}),n.sort(function(a,b){return(a.options.fullWidth?1:0)-(b.options.fullWidth?1:0)});var p=c-2*i,q=d-2*j,r=p/2,s=q/2,t=(c-r)/(k.length+l.length),u=(d-s)/(m.length+n.length),v=p,w=q,x=[];b.each(k.concat(l,m,n),e);var y=i,z=i,A=j,B=j;b.each(k.concat(l),f),b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m.concat(n),f),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height}),b.each(k.concat(l),g),y=i,z=i,A=j,B=j,b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height});var C=d-A-B,D=c-y-z;(D!==v||C!==w)&&(b.each(k,function(a){a.height=C}),b.each(l,function(a){a.height=C}),b.each(m,function(a){a.options.fullWidth||(a.width=D)}),b.each(n,function(a){a.options.fullWidth||(a.width=D)}),w=C,v=D);var E=i,F=j;b.each(k.concat(m),h),E+=v,F+=w,b.each(l,h),b.each(n,h),a.chartArea={left:y,top:A,right:y+v,bottom:A+w},b.each(o,function(b){b.left=a.chartArea.left,b.top=a.chartArea.top,b.right=a.chartArea.right,b.bottom=a.chartArea.bottom,b.update(v,w)})}}}}},{}],28:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(a,b){var c=b.datasetIndex,d=this.chart,e=d.getDatasetMeta(c);e.hidden=null===e.hidden?!d.data.datasets[c].hidden:null,d.update()},labels:{boxWidth:40,padding:10,generateLabels:function(a){var c=a.data;return b.isArray(c.datasets)?c.datasets.map(function(c,d){return{text:c.label,fillStyle:b.isArray(c.backgroundColor)?c.backgroundColor[0]:c.backgroundColor,hidden:!a.isDatasetVisible(d),lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,datasetIndex:d}},this):[]}}},a.Legend=a.Element.extend({initialize:function(a){b.extend(this,a),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:c,update:function(a,b,c){var d=this;return d.beforeUpdate(),d.maxWidth=a,d.maxHeight=b,d.margins=c,d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeBuildLabels(),d.buildLabels(),d.afterBuildLabels(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:c,beforeSetDimensions:c,setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0,a.minSize={width:0,height:0}},afterSetDimensions:c,beforeBuildLabels:c,buildLabels:function(){var a=this;a.legendItems=a.options.labels.generateLabels.call(a,a.chart),a.options.reverse&&a.legendItems.reverse()},afterBuildLabels:c,beforeFit:c,fit:function(){var c=this,d=c.options,e=d.labels,f=d.display,g=c.ctx,h=a.defaults.global,i=b.getValueOrDefault,j=i(e.fontSize,h.defaultFontSize),k=i(e.fontStyle,h.defaultFontStyle),l=i(e.fontFamily,h.defaultFontFamily),m=b.fontString(j,k,l),n=c.legendHitBoxes=[],o=c.minSize,p=c.isHorizontal();if(p?(o.width=c.maxWidth,o.height=f?10:0):(o.width=f?10:0,o.height=c.maxHeight),f)if(g.font=m,p){var q=c.lineWidths=[0],r=c.legendItems.length?j+e.padding:0;g.textAlign="left",g.textBaseline="top",b.each(c.legendItems,function(a,b){var d=e.boxWidth+j/2+g.measureText(a.text).width;q[q.length-1]+d+e.padding>=c.width&&(r+=j+e.padding,q[q.length]=c.left),n[b]={left:0,top:0,width:d,height:j},q[q.length-1]+=d+e.padding}),o.height+=r}else{var s=e.padding,t=c.columnWidths=[],u=e.padding,v=0,w=0,x=j+s;b.each(c.legendItems,function(a,b){var c=e.boxWidth+j/2+g.measureText(a.text).width;w+x>o.height&&(u+=v+e.padding,t.push(v),v=0,w=0),v=Math.max(v,c),w+=x,n[b]={left:0,top:0,width:c,height:j}}),u+=v,t.push(v),o.width+=u}c.width=o.width,c.height=o.height},afterFit:c,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var c=this,d=c.options,e=d.labels,f=a.defaults.global,g=f.elements.line,h=c.width,i=(c.height,c.lineWidths);if(d.display){var j,k=c.ctx,l=b.getValueOrDefault,m=l(e.fontColor,f.defaultFontColor),n=l(e.fontSize,f.defaultFontSize),o=l(e.fontStyle,f.defaultFontStyle),p=l(e.fontFamily,f.defaultFontFamily),q=b.fontString(n,o,p);k.textAlign="left",k.textBaseline="top",k.lineWidth=.5,k.strokeStyle=m,k.fillStyle=m,k.font=q;var r=e.boxWidth,s=c.legendHitBoxes,t=function(a,b,c){k.save(),k.fillStyle=l(c.fillStyle,f.defaultColor),k.lineCap=l(c.lineCap,g.borderCapStyle),k.lineDashOffset=l(c.lineDashOffset,g.borderDashOffset),k.lineJoin=l(c.lineJoin,g.borderJoinStyle),k.lineWidth=l(c.lineWidth,g.borderWidth),k.strokeStyle=l(c.strokeStyle,f.defaultColor),k.setLineDash&&k.setLineDash(l(c.lineDash,g.borderDash)),k.strokeRect(a,b,r,n),k.fillRect(a,b,r,n),k.restore()},u=function(a,b,c,d){k.fillText(c.text,r+n/2+a,b),c.hidden&&(k.beginPath(),k.lineWidth=2,k.moveTo(r+n/2+a,b+n/2),k.lineTo(r+n/2+a+d,b+n/2),k.stroke())},v=c.isHorizontal();j=v?{x:c.left+(h-i[0])/2,y:c.top+e.padding,line:0}:{x:c.left+e.padding,y:c.top,line:0};var w=n+e.padding;b.each(c.legendItems,function(a,b){var d=k.measureText(a.text).width,f=r+n/2+d,g=j.x,l=j.y;v?g+f>=h&&(l=j.y+=n+e.padding,j.line++,g=j.x=c.left+(h-i[j.line])/2):l+w>c.bottom&&(g=j.x=g+c.columnWidths[j.line]+e.padding,l=j.y=c.top,j.line++),t(g,l,a),s[b].left=g,s[b].top=l,u(g,l,a,d),v?j.x+=f+e.padding:j.y+=w})}},handleEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart.chart),e=d.x,f=d.y,g=c.options;if(e>=c.left&&e<=c.right&&f>=c.top&&f<=c.bottom)for(var h=c.legendHitBoxes,i=0;i=j.left&&e<=j.left+j.width&&f>=j.top&&f<=j.top+j.height){g.onClick&&g.onClick.call(c,a,c.legendItems[i]);break}}}}),a.plugins.register({beforeInit:function(b){var c=b.options,d=c.legend;d&&(b.legend=new a.Legend({ctx:b.chart.ctx,options:d,chart:b}),a.layoutService.addBox(b,b.legend))}})}},{}],29:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers.noop;a.plugins={_plugins:[],register:function(a){var b=this._plugins;[].concat(a).forEach(function(a){-1===b.indexOf(a)&&b.push(a)})},unregister:function(a){var b=this._plugins;[].concat(a).forEach(function(a){var c=b.indexOf(a);-1!==c&&b.splice(c,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(a,b){var c,d,e=this._plugins,f=e.length;for(c=0;f>c;++c)if(d=e[c],"function"==typeof d[a]&&d[a].apply(d,b||[])===!1)return!1;return!0}},a.PluginBase=a.Element.extend({beforeInit:b,afterInit:b,beforeUpdate:b,afterUpdate:b,beforeDraw:b,afterDraw:b,destroy:b}),a.pluginService=a.plugins}},{}],30:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(a){return b.isArray(a)?a:""+a}}},a.Scale=a.Element.extend({beforeUpdate:function(){b.callCallback(this.options.beforeUpdate,[this])},update:function(a,c,d){var e=this;return e.beforeUpdate(),e.maxWidth=a,e.maxHeight=c,e.margins=b.extend({left:0,right:0,top:0,bottom:0},d),e.beforeSetDimensions(),e.setDimensions(),e.afterSetDimensions(),e.beforeDataLimits(),e.determineDataLimits(),e.afterDataLimits(),e.beforeBuildTicks(),e.buildTicks(),e.afterBuildTicks(),e.beforeTickToLabelConversion(),e.convertTicksToLabels(),e.afterTickToLabelConversion(),e.beforeCalculateTickRotation(),e.calculateTickRotation(),e.afterCalculateTickRotation(),e.beforeFit(),e.fit(),e.afterFit(),e.afterUpdate(),e.minSize},afterUpdate:function(){b.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){b.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0},afterSetDimensions:function(){b.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){b.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:b.noop,afterDataLimits:function(){b.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){b.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:b.noop,afterBuildTicks:function(){b.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){b.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var a=this;a.ticks=a.ticks.map(function(b,c,d){return a.options.ticks.userCallback?a.options.ticks.userCallback(b,c,d):a.options.ticks.callback(b,c,d)},a)},afterTickToLabelConversion:function(){b.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){b.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var c=this,d=c.ctx,e=a.defaults.global,f=c.options.ticks,g=b.getValueOrDefault(f.fontSize,e.defaultFontSize),h=b.getValueOrDefault(f.fontStyle,e.defaultFontStyle),i=b.getValueOrDefault(f.fontFamily,e.defaultFontFamily),j=b.fontString(g,h,i);d.font=j;var k,l=d.measureText(c.ticks[0]).width,m=d.measureText(c.ticks[c.ticks.length-1]).width;if(c.labelRotation=f.minRotation||0,c.paddingRight=0,c.paddingLeft=0,c.options.display&&c.isHorizontal()){c.paddingRight=m/2+3,c.paddingLeft=l/2+3,c.longestTextCache||(c.longestTextCache={});for(var n,o,p=b.longestText(d,j,c.ticks,c.longestTextCache),q=p,r=c.getPixelForTick(1)-c.getPixelForTick(0)-6;q>r&&c.labelRotationc.yLabelWidth&&(c.paddingLeft=k+g/2),c.paddingRight=g/2,o*p>c.maxHeight){c.labelRotation--;break}c.labelRotation++,q=n*p}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0))},afterCalculateTickRotation:function(){b.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){b.callCallback(this.options.beforeFit,[this])},fit:function(){var c=this,d=c.minSize={width:0,height:0},e=c.options,f=a.defaults.global,g=e.ticks,h=e.scaleLabel,i=e.display,j=c.isHorizontal(),k=b.getValueOrDefault(g.fontSize,f.defaultFontSize),l=b.getValueOrDefault(g.fontStyle,f.defaultFontStyle),m=b.getValueOrDefault(g.fontFamily,f.defaultFontFamily),n=b.fontString(k,l,m),o=b.getValueOrDefault(h.fontSize,f.defaultFontSize),p=b.getValueOrDefault(h.fontStyle,f.defaultFontStyle),q=b.getValueOrDefault(h.fontFamily,f.defaultFontFamily),r=(b.fontString(o,p,q),e.gridLines.tickMarkLength);if(j?d.width=c.isFullWidth()?c.maxWidth-c.margins.left-c.margins.right:c.maxWidth:d.width=i?r:0,j?d.height=i?r:0:d.height=c.maxHeight,h.display&&i&&(j?d.height+=1.5*o:d.width+=1.5*o),g.display&&i){c.longestTextCache||(c.longestTextCache={});var s=b.longestText(c.ctx,n,c.ticks,c.longestTextCache),t=b.numberOfLabelLines(c.ticks),u=.5*k;if(j){c.longestLabelWidth=s;var v=Math.sin(b.toRadians(c.labelRotation))*c.longestLabelWidth+k*t+u*t;d.height=Math.min(c.maxHeight,d.height+v),c.ctx.font=n;var w=c.ctx.measureText(c.ticks[0]).width,x=c.ctx.measureText(c.ticks[c.ticks.length-1]).width,y=Math.cos(b.toRadians(c.labelRotation)),z=Math.sin(b.toRadians(c.labelRotation));c.paddingLeft=0!==c.labelRotation?y*w+3:w/2+3,c.paddingRight=0!==c.labelRotation?z*(k/2)+3:x/2+3}else{var A=c.maxWidth-d.width,B=g.mirror;B?s=0:s+=c.options.ticks.padding,A>s?d.width+=s:d.width=c.maxWidth,c.paddingTop=k/2,c.paddingBottom=k/2}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingTop=Math.max(c.paddingTop-c.margins.top,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0),c.paddingBottom=Math.max(c.paddingBottom-c.margins.bottom,0)),c.width=d.width,c.height=d.height},afterFit:function(){b.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function c(a){return null===a||"undefined"==typeof a?NaN:"number"==typeof a&&isNaN(a)?NaN:"object"==typeof a?a instanceof Date||a.isValid?a:c(this.isHorizontal()?a.x:a.y):a},getLabelForIndex:b.noop,getPixelForValue:b.noop,getValueForPixel:b.noop,getPixelForTick:function(a,b){var c=this;if(c.isHorizontal()){var d=c.width-(c.paddingLeft+c.paddingRight),e=d/Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),f=e*a+c.paddingLeft;b&&(f+=e/2);var g=c.left+Math.round(f);return g+=c.isFullWidth()?c.margins.left:0}var h=c.height-(c.paddingTop+c.paddingBottom);return c.top+a*(h/(c.ticks.length-1))},getPixelForDecimal:function(a){var b=this;if(b.isHorizontal()){var c=b.width-(b.paddingLeft+b.paddingRight),d=c*a+b.paddingLeft,e=b.left+Math.round(d);return e+=b.isFullWidth()?b.margins.left:0}return b.top+a*b.height},getBasePixel:function(){var a=this,b=a.min,c=a.max;return a.getPixelForValue(a.beginAtZero?0:0>b&&0>c?c:b>0&&c>0?b:0)},draw:function(c){var d=this,e=d.options;if(e.display){var f,g,h=d.ctx,i=a.defaults.global,j=e.ticks,k=e.gridLines,l=e.scaleLabel,m=0!==d.labelRotation,n=j.autoSkip,o=d.isHorizontal();j.maxTicksLimit&&(g=j.maxTicksLimit);var p=b.getValueOrDefault(j.fontColor,i.defaultFontColor),q=b.getValueOrDefault(j.fontSize,i.defaultFontSize),r=b.getValueOrDefault(j.fontStyle,i.defaultFontStyle),s=b.getValueOrDefault(j.fontFamily,i.defaultFontFamily),t=b.fontString(q,r,s),u=k.tickMarkLength,v=b.getValueOrDefault(l.fontColor,i.defaultFontColor),w=b.getValueOrDefault(l.fontSize,i.defaultFontSize),x=b.getValueOrDefault(l.fontStyle,i.defaultFontStyle),y=b.getValueOrDefault(l.fontFamily,i.defaultFontFamily),z=b.fontString(w,x,y),A=b.toRadians(d.labelRotation),B=Math.cos(A),C=(Math.sin(A),d.longestLabelWidth*B);h.fillStyle=p;var D=[];if(o){if(f=!1,m&&(C/=2),(C+j.autoSkipPadding)*d.ticks.length>d.width-(d.paddingLeft+d.paddingRight)&&(f=1+Math.floor((C+j.autoSkipPadding)*d.ticks.length/(d.width-(d.paddingLeft+d.paddingRight)))),g&&d.ticks.length>g)for(;!f||d.ticks.length/(f||1)>g;)f||(f=1),f+=1;n||(f=!1)}var E="right"===e.position?d.left:d.right-u,F="right"===e.position?d.left+u:d.right,G="bottom"===e.position?d.top:d.bottom-u,H="bottom"===e.position?d.top+u:d.bottom;if(b.each(d.ticks,function(a,g){if(void 0!==a&&null!==a){var h=d.ticks.length===g+1,i=f>1&&g%f>0||g%f===0&&g+f>=d.ticks.length;if((!i||h)&&void 0!==a&&null!==a){var l,n;g===("undefined"!=typeof d.zeroLineIndex?d.zeroLineIndex:0)?(l=k.zeroLineWidth,n=k.zeroLineColor):(l=b.getValueAtIndexOrDefault(k.lineWidth,g),n=b.getValueAtIndexOrDefault(k.color,g));var p,q,r,s,t,v,w,x,y,z,B,C="middle";if(o){m||(C="top"===e.position?"bottom":"top"),B=m?"right":"center";var I=d.getPixelForTick(g)+b.aliasPixel(l);y=d.getPixelForTick(g,k.offsetGridLines)+j.labelOffset,z=m?d.top+12:"top"===e.position?d.bottom-u:d.top+u,p=r=t=w=I,q=G,s=H,v=c.top,x=c.bottom}else{"left"===e.position?j.mirror?(y=d.right+j.padding,B="left"):(y=d.right-j.padding,B="right"):j.mirror?(y=d.left-j.padding,B="right"):(y=d.left+j.padding,B="left");var J=d.getPixelForTick(g);J+=b.aliasPixel(l),z=d.getPixelForTick(g,k.offsetGridLines),p=E,r=F,t=c.left,w=c.right,q=s=v=x=J}D.push({tx1:p,ty1:q,tx2:r,ty2:s,x1:t,y1:v,x2:w,y2:x,labelX:y,labelY:z,glWidth:l,glColor:n,rotation:-1*A,label:a,textBaseline:C,textAlign:B})}}}),b.each(D,function(a){if(k.display&&(h.lineWidth=a.glWidth,h.strokeStyle=a.glColor,h.beginPath(),k.drawTicks&&(h.moveTo(a.tx1,a.ty1),h.lineTo(a.tx2,a.ty2)),k.drawOnChartArea&&(h.moveTo(a.x1,a.y1),h.lineTo(a.x2,a.y2)),h.stroke()),j.display){h.save(),h.translate(a.labelX,a.labelY),h.rotate(a.rotation),h.font=t,h.textBaseline=a.textBaseline,h.textAlign=a.textAlign;var c=a.label;if(b.isArray(c))for(var d=0,e=0;db;++b){var f=a[b];if(f&&f.hasValue()){var g=f.tooltipPosition();d.push(g.x),e.push(g.y)}}var h=0,i=0;for(b=0,c-d.length;c>b;++b)h+=d[b],i+=e[b];return{x:Math.round(h/d.length),y:Math.round(i/d.length)}}function d(a){var b=a._xScale,c=a._yScale||a._scale,d=a._index,e=a._datasetIndex;return{xLabel:b?b.getLabelForIndex(d,e):"",yLabel:c?c.getLabelForIndex(d,e):"",index:d,datasetIndex:e}}var e=a.helpers;a.defaults.global.tooltips={enabled:!0,custom:null,mode:"single",backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:e.noop,title:function(a,b){var c="",d=b.labels,e=d?d.length:0;if(a.length>0){var f=a[0];f.xLabel?c=f.xLabel:e>0&&f.indexb;++b)o.push(d(j[b]));h.itemSort&&(o=o.sort(h.itemSort)),j.length>1&&e.each(o,function(a){m.push(h.callbacks.labelColor.call(g,a,l))}),e.extend(i,{title:g.getTitle(o,k),beforeBody:g.getBeforeBody(o,k),body:g.getBody(o,k),afterBody:g.getAfterBody(o,k),footer:g.getFooter(o,k),x:Math.round(n.x),y:Math.round(n.y),caretPadding:e.getValueOrDefault(n.padding,2),labelColors:m});var p=g.getTooltipSize(i);g.determineAlignment(p),e.extend(i,g.getBackgroundPoint(i,p))}else g._model.opacity=0;return a&&h.custom&&h.custom.call(g,i),g},getTooltipSize:function(a){var b=this._chart.ctx,c={height:2*a.yPadding,width:0},d=a.body,f=d.reduce(function(a,b){return a+b.before.length+b.lines.length+b.after.length},0);f+=a.beforeBody.length+a.afterBody.length;var g=a.title.length,h=a.footer.length,i=a.titleFontSize,j=a.bodyFontSize,k=a.footerFontSize;c.height+=g*i,c.height+=(g-1)*a.titleSpacing,c.height+=g?a.titleMarginBottom:0,c.height+=f*j,c.height+=f?(f-1)*a.bodySpacing:0,c.height+=h?a.footerMarginTop:0,c.height+=h*k,c.height+=h?(h-1)*a.footerSpacing:0;var l=0,m=function(a){c.width=Math.max(c.width,b.measureText(a).width+l)};return b.font=e.fontString(i,a._titleFontStyle,a._titleFontFamily),e.each(a.title,m),b.font=e.fontString(j,a._bodyFontStyle,a._bodyFontFamily),e.each(a.beforeBody.concat(a.afterBody),m),l=d.length>1?j+2:0,e.each(d,function(a){e.each(a.before,m),e.each(a.lines,m),e.each(a.after,m)}),l=0,b.font=e.fontString(k,a._footerFontStyle,a._footerFontFamily), e.each(a.footer,m),c.width+=2*a.xPadding,c},determineAlignment:function(a){var b=this,c=b._model,d=b._chart,e=b._chartInstance.chartArea;c.yd.height-a.height&&(c.yAlign="bottom");var f,g,h,i,j,k=(e.left+e.right)/2,l=(e.top+e.bottom)/2;"center"===c.yAlign?(f=function(a){return k>=a},g=function(a){return a>k}):(f=function(b){return b<=a.width/2},g=function(b){return b>=d.width-a.width/2}),h=function(b){return b+a.width>d.width},i=function(b){return b-a.width<0},j=function(a){return l>=a?"top":"bottom"},f(c.x)?(c.xAlign="left",h(c.x)&&(c.xAlign="center",c.yAlign=j(c.y))):g(c.x)&&(c.xAlign="right",i(c.x)&&(c.xAlign="center",c.yAlign=j(c.y)))},getBackgroundPoint:function(a,b){var c={x:a.x,y:a.y},d=a.caretSize,e=a.caretPadding,f=a.cornerRadius,g=a.xAlign,h=a.yAlign,i=d+e,j=f+e;return"right"===g?c.x-=b.width:"center"===g&&(c.x-=b.width/2),"top"===h?c.y+=i:"bottom"===h?c.y-=b.height+i:c.y-=b.height/2,"center"===h?"left"===g?c.x+=i:"right"===g&&(c.x-=i):"left"===g?c.x-=j:"right"===g&&(c.x+=j),c},drawCaret:function(a,b,c,d){var f,g,h,i,j,k,l=this._view,m=this._chart.ctx,n=l.caretSize,o=l.cornerRadius,p=l.xAlign,q=l.yAlign,r=a.x,s=a.y,t=b.width,u=b.height;"center"===q?("left"===p?(f=r,g=f-n,h=f):(f=r+t,g=f+n,h=f),j=s+u/2,i=j-n,k=j+n):("left"===p?(f=r+o,g=f+n,h=g+n):"right"===p?(f=r+t-o,g=f-n,h=g-n):(g=r+t/2,f=g-n,h=g+n),"top"===q?(i=s,j=i-n,k=i):(i=s+u,j=i+n,k=i));var v=e.color(l.backgroundColor);m.fillStyle=v.alpha(c*v.alpha()).rgbString(),m.beginPath(),m.moveTo(f,i),m.lineTo(g,j),m.lineTo(h,k),m.closePath(),m.fill()},drawTitle:function(a,b,c,d){var f=b.title;if(f.length){c.textAlign=b._titleAlign,c.textBaseline="top";var g=b.titleFontSize,h=b.titleSpacing,i=e.color(b.titleFontColor);c.fillStyle=i.alpha(d*i.alpha()).rgbString(),c.font=e.fontString(g,b._titleFontStyle,b._titleFontFamily);var j,k;for(j=0,k=f.length;k>j;++j)c.fillText(f[j],a.x,a.y),a.y+=g+h,j+1===f.length&&(a.y+=b.titleMarginBottom-h)}},drawBody:function(a,b,c,d){var f=b.bodyFontSize,g=b.bodySpacing,h=b.body;c.textAlign=b._bodyAlign,c.textBaseline="top";var i=e.color(b.bodyFontColor),j=i.alpha(d*i.alpha()).rgbString();c.fillStyle=j,c.font=e.fontString(f,b._bodyFontStyle,b._bodyFontFamily);var k=0,l=function(b){c.fillText(b,a.x+k,a.y),a.y+=f+g};e.each(b.beforeBody,l);var m=h.length>1;k=m?f+2:0,e.each(h,function(g,h){e.each(g.before,l),e.each(g.lines,function(g){m&&(c.fillStyle=e.color(b.legendColorBackground).alpha(d).rgbaString(),c.fillRect(a.x,a.y,f,f),c.strokeStyle=e.color(b.labelColors[h].borderColor).alpha(d).rgbaString(),c.strokeRect(a.x,a.y,f,f),c.fillStyle=e.color(b.labelColors[h].backgroundColor).alpha(d).rgbaString(),c.fillRect(a.x+1,a.y+1,f-2,f-2),c.fillStyle=j),l(g)}),e.each(g.after,l)}),k=0,e.each(b.afterBody,l),a.y-=g},drawFooter:function(a,b,c,d){var f=b.footer;if(f.length){a.y+=b.footerMarginTop,c.textAlign=b._footerAlign,c.textBaseline="top";var g=e.color(b.footerFontColor);c.fillStyle=g.alpha(d*g.alpha()).rgbString(),c.font=e.fontString(b.footerFontSize,b._footerFontStyle,b._footerFontFamily),e.each(f,function(d){c.fillText(d,a.x,a.y),a.y+=b.footerFontSize+b.footerSpacing})}},draw:function(){var a=this._chart.ctx,b=this._view;if(0!==b.opacity){var c=this.getTooltipSize(b),d={x:b.x,y:b.y},f=Math.abs(b.opacity<.001)?0:b.opacity;if(this._options.enabled){var g=e.color(b.backgroundColor);a.fillStyle=g.alpha(f*g.alpha()).rgbString(),e.drawRoundedRectangle(a,d.x,d.y,c.width,c.height,b.cornerRadius),a.fill(),this.drawCaret(d,c,f,b.caretPadding),d.x+=b.xPadding,d.y+=b.yPadding,this.drawTitle(d,b,a,f),this.drawBody(d,b,a,f),this.drawFooter(d,b,a,f)}}}})}},{}],34:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.helpers,d=a.defaults.global;d.elements.arc={backgroundColor:d.defaultColor,borderColor:"#fff",borderWidth:2},a.elements.Arc=a.Element.extend({inLabelRange:function(a){var b=this._view;return b?Math.pow(a-b.x,2)i;)i+=2*Math.PI;for(;f>i;)f-=2*Math.PI;for(;h>f;)f+=2*Math.PI;var j=f>=h&&i>=f,k=g>=d.innerRadius&&g<=d.outerRadius;return j&&k}return!1},tooltipPosition:function(){var a=this._view,b=a.startAngle+(a.endAngle-a.startAngle)/2,c=(a.outerRadius-a.innerRadius)/2+a.innerRadius;return{x:a.x+Math.cos(b)*c,y:a.y+Math.sin(b)*c}},draw:function(){var a=this._chart.ctx,b=this._view,c=b.startAngle,d=b.endAngle;a.beginPath(),a.arc(b.x,b.y,b.outerRadius,c,d),a.arc(b.x,b.y,b.innerRadius,d,c,!0),a.closePath(),a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth,a.fillStyle=b.backgroundColor,a.fill(),a.lineJoin="bevel",b.borderWidth&&a.stroke()}})}},{}],35:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global;a.defaults.global.elements.line={tension:.4,backgroundColor:c.defaultColor,borderWidth:3,borderColor:c.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0},a.elements.Line=a.Element.extend({lineToNextPoint:function(a,b,c,d,e){var f=this,g=f._chart.ctx,h=f._view?f._view.spanGaps:!1;b._view.skip&&!h?d.call(f,a,b,c):a._view.skip&&!h?e.call(f,a,b,c):0===b._view.tension?g.lineTo(b._view.x,b._view.y):g.bezierCurveTo(a._view.controlPointNextX,a._view.controlPointNextY,b._view.controlPointPreviousX,b._view.controlPointPreviousY,b._view.x,b._view.y)},draw:function(){function a(a){g._view.skip||h._view.skip?a&&f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):f.bezierCurveTo(h._view.controlPointNextX,h._view.controlPointNextY,g._view.controlPointPreviousX,g._view.controlPointPreviousY,g._view.x,g._view.y)}var d=this,e=d._view,f=d._chart.ctx,g=d._children[0],h=d._children[d._children.length-1];f.save(),d._children.length>0&&e.fill&&(f.beginPath(),b.each(d._children,function(a,c){var g=b.previousItem(d._children,c),h=b.nextItem(d._children,c);0===c?(d._loop?f.moveTo(e.scaleZero.x,e.scaleZero.y):f.moveTo(a._view.x,e.scaleZero),a._view.skip?d._loop||f.moveTo(h._view.x,d._view.scaleZero):f.lineTo(a._view.x,a._view.y)):d.lineToNextPoint(g,a,h,function(a,b,c){d._loop?f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):(f.lineTo(a._view.x,d._view.scaleZero),f.moveTo(c._view.x,d._view.scaleZero))},function(a,b){f.lineTo(b._view.x,b._view.y)})},d),d._loop?a(!0):(f.lineTo(d._children[d._children.length-1]._view.x,e.scaleZero),f.lineTo(d._children[0]._view.x,e.scaleZero)),f.fillStyle=e.backgroundColor||c.defaultColor,f.closePath(),f.fill());var i=c.elements.line;f.lineCap=e.borderCapStyle||i.borderCapStyle,f.setLineDash&&f.setLineDash(e.borderDash||i.borderDash),f.lineDashOffset=e.borderDashOffset||i.borderDashOffset,f.lineJoin=e.borderJoinStyle||i.borderJoinStyle,f.lineWidth=e.borderWidth||i.borderWidth,f.strokeStyle=e.borderColor||c.defaultColor,f.beginPath(),b.each(d._children,function(a,c){var e=b.previousItem(d._children,c),g=b.nextItem(d._children,c);0===c?f.moveTo(a._view.x,a._view.y):d.lineToNextPoint(e,a,g,function(a,b,c){f.moveTo(c._view.x,c._view.y)},function(a,b){f.moveTo(b._view.x,b._view.y)})},d),d._loop&&d._children.length>0&&a(),f.stroke(),f.restore()}})}},{}],36:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global,d=c.defaultColor;c.elements.point={radius:3,pointStyle:"circle",backgroundColor:d,borderWidth:1,borderColor:d,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},a.elements.Point=a.Element.extend({inRange:function(a,b){var c=this._view;return c?Math.pow(a-c.x,2)+Math.pow(b-c.y,2)=m)){switch(k.strokeStyle=j.borderColor||d,k.lineWidth=b.getValueOrDefault(j.borderWidth,c.elements.point.borderWidth),k.fillStyle=j.backgroundColor||d,l){default:k.beginPath(),k.arc(n,o,m,0,2*Math.PI),k.closePath(),k.fill();break;case"triangle":k.beginPath(),e=3*m/Math.sqrt(3),h=e*Math.sqrt(3)/2,k.moveTo(n-e/2,o+h/3),k.lineTo(n+e/2,o+h/3),k.lineTo(n,o-2*h/3),k.closePath(),k.fill();break;case"rect":i=1/Math.SQRT2*m,k.fillRect(n-i,o-i,2*i,2*i),k.strokeRect(n-i,o-i,2*i,2*i);break;case"rectRot":i=1/Math.SQRT2*m,k.beginPath(),k.moveTo(n-i,o),k.lineTo(n,o+i),k.lineTo(n+i,o),k.lineTo(n,o-i),k.closePath(),k.fill();break;case"cross":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"crossRot":k.beginPath(),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"star":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"line":k.beginPath(),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"dash":k.beginPath(),k.moveTo(n,o),k.lineTo(n+m,o),k.closePath()}k.stroke()}}}})}},{}],37:[function(a,b,c){"use strict";b.exports=function(a){var b=(a.helpers,a.defaults.global);b.elements.rectangle={backgroundColor:b.defaultColor,borderWidth:0,borderColor:b.defaultColor,borderSkipped:"bottom"},a.elements.Rectangle=a.Element.extend({draw:function(){function a(a){return i[(k+a)%4]}var b=this._chart.ctx,c=this._view,d=c.width/2,e=c.x-d,f=c.x+d,g=c.base-(c.base-c.y),h=c.borderWidth/2;c.borderWidth&&(e+=h,f-=h,g+=h),b.beginPath(),b.fillStyle=c.backgroundColor,b.strokeStyle=c.borderColor,b.lineWidth=c.borderWidth;var i=[[e,c.base],[e,g],[f,g],[f,c.base]],j=["bottom","left","top","right"],k=j.indexOf(c.borderSkipped,0);-1===k&&(k=0),b.moveTo.apply(b,a(0));for(var l=1;4>l;l++)b.lineTo.apply(b,a(l));b.fill(),c.borderWidth&&b.stroke()},height:function(){var a=this._view;return a.base-a.y},inRange:function(a,b){var c=this._view;return c?c.y=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.y&&b<=c.base:a>=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.base&&b<=c.y:!1},inLabelRange:function(a){var b=this._view;return b?a>=b.x-b.width/2&&a<=b.x+b.width/2:!1},tooltipPosition:function(){var a=this._view;return{x:a.x,y:a.y}}})}},{}],38:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"bottom"},d=a.Scale.extend({determineDataLimits:function(){var a=this;a.minIndex=0,a.maxIndex=a.chart.data.labels.length-1;var c;void 0!==a.options.ticks.min&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.min),a.minIndex=-1!==c?c:a.minIndex),void 0!==a.options.ticks.max&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.max),a.maxIndex=-1!==c?c:a.maxIndex),a.min=a.chart.data.labels[a.minIndex],a.max=a.chart.data.labels[a.maxIndex]},buildTicks:function(a){var b=this;b.ticks=0===b.minIndex&&b.maxIndex===b.chart.data.labels.length-1?b.chart.data.labels:b.chart.data.labels.slice(b.minIndex,b.maxIndex+1)},getLabelForIndex:function(a,b){return this.ticks[a]},getPixelForValue:function(a,b,c,d){var e=this,f=Math.max(e.maxIndex+1-e.minIndex-(e.options.gridLines.offsetGridLines?0:1),1);if(e.isHorizontal()){var g=e.width-(e.paddingLeft+e.paddingRight),h=g/f,i=h*(b-e.minIndex)+e.paddingLeft;return e.options.gridLines.offsetGridLines&&d&&(i+=h/2),e.left+Math.round(i)}var j=e.height-(e.paddingTop+e.paddingBottom),k=j/f,l=k*(b-e.minIndex)+e.paddingTop;return e.options.gridLines.offsetGridLines&&d&&(l+=k/2),e.top+Math.round(l)},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticks[a],a+this.minIndex,null,b)},getValueForPixel:function(a){var b,c=this,d=Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),e=c.isHorizontal(),f=e?c.width-(c.paddingLeft+c.paddingRight):c.height-(c.paddingTop+c.paddingBottom),g=f/d;return c.options.gridLines.offsetGridLines&&(a-=g/2),a-=e?c.paddingLeft:c.paddingTop,b=0>=a?0:Math.round(a/g)}});a.scaleService.registerScaleType("category",d,c)}},{}],39:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=d.length>3?d[2]-d[1]:d[1]-d[0];Math.abs(e)>1&&a!==Math.floor(a)&&(e=a-Math.floor(a));var f=b.log10(Math.abs(e)),g="";if(0!==a){var h=-1*Math.floor(f);h=Math.max(Math.min(h,20),0),g=a.toFixed(h)}else g="0";return g}}},d=a.LinearScaleBase.extend({determineDataLimits:function(){function a(a){return h?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=(d.ticks,c.chart),f=e.data,g=f.datasets,h=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var i={},j=!1,k=!1;b.each(g,function(f,g){var h=e.getDatasetMeta(g);void 0===i[h.type]&&(i[h.type]={positiveValues:[],negativeValues:[]});var l=i[h.type].positiveValues,m=i[h.type].negativeValues;e.isDatasetVisible(g)&&a(h)&&b.each(f.data,function(a,b){var e=+c.getRightValue(a);isNaN(e)||h.data[b].hidden||(l[b]=l[b]||0,m[b]=m[b]||0,d.relativePoints?l[b]=100:0>e?(k=!0,m[b]+=e):(j=!0,l[b]+=e))})}),b.each(i,function(a){var d=a.positiveValues.concat(a.negativeValues),e=b.min(d),f=b.max(d);c.min=null===c.min?e:Math.min(c.min,e),c.max=null===c.max?f:Math.max(c.max,f)})}else b.each(g,function(d,f){var g=e.getDatasetMeta(f);e.isDatasetVisible(f)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});this.handleTickRangeOptions()},getTickLimit:function(){var c,d=this,e=d.options.ticks;if(d.isHorizontal())c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.width/50));else{var f=b.getValueOrDefault(e.fontSize,a.defaults.global.defaultFontSize);c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.height/(2*f)))}return c},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},getPixelForValue:function(a,b,c,d){var e,f,g=this,h=g.paddingLeft,i=g.paddingBottom,j=g.start,k=+g.getRightValue(a),l=g.end-j;return g.isHorizontal()?(f=g.width-(h+g.paddingRight),e=g.left+f/l*(k-j),Math.round(e+h)):(f=g.height-(g.paddingTop+i),e=g.bottom-i-f/l*(k-j),Math.round(e))},getValueForPixel:function(a){var b=this,c=b.isHorizontal(),d=b.paddingLeft,e=b.paddingBottom,f=c?b.width-(d+b.paddingRight):b.height-(b.paddingTop+e),g=(c?a-b.left-d:b.bottom-e-a)/f;return b.start+(b.end-b.start)*g},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticksAsNumbers[a],null,null,b)}});a.scaleService.registerScaleType("linear",d,c)}},{}],40:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.LinearScaleBase=a.Scale.extend({handleTickRangeOptions:function(){var a=this,c=a.options,d=c.ticks;if(d.beginAtZero){var e=b.sign(a.min),f=b.sign(a.max);0>e&&0>f?a.max=0:e>0&&f>0&&(a.min=0)}void 0!==d.min?a.min=d.min:void 0!==d.suggestedMin&&(a.min=Math.min(a.min,d.suggestedMin)),void 0!==d.max?a.max=d.max:void 0!==d.suggestedMax&&(a.max=Math.max(a.max,d.suggestedMax)),a.min===a.max&&(a.max++,d.beginAtZero||a.min--)},getTickLimit:c,handleDirectionalChanges:c,buildTicks:function(){var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=(a.isHorizontal(),a.ticks=[]),g=a.getTickLimit();g=Math.max(2,g);var h,i=d.fixedStepSize&&d.fixedStepSize>0||d.stepSize&&d.stepSize>0;if(i)h=e(d.fixedStepSize,d.stepSize);else{var j=b.niceNum(a.max-a.min,!1);h=b.niceNum(j/(g-1),!0)}var k=Math.floor(a.min/h)*h,l=Math.ceil(a.max/h)*h,m=(l-k)/h;m=b.almostEquals(m,Math.round(m),h/1e3)?Math.round(m):Math.ceil(m),f.push(void 0!==d.min?d.min:k);for(var n=1;m>n;++n)f.push(k+n*h);f.push(void 0!==d.max?d.max:l),a.handleDirectionalChanges(),a.max=b.max(f),a.min=b.min(f),d.reverse?(f.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){var b=this;b.ticksAsNumbers=b.ticks.slice(),b.zeroLineIndex=b.ticks.indexOf(0),a.Scale.prototype.convertTicksToLabels.call(b)}})}},{}],41:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(b.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?a.toExponential():""}}},d=a.Scale.extend({determineDataLimits:function(){function a(a){return j?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=d.ticks,f=c.chart,g=f.data,h=g.datasets,i=b.getValueOrDefault,j=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var k={};b.each(h,function(e,g){var h=f.getDatasetMeta(g);f.isDatasetVisible(g)&&a(h)&&(void 0===k[h.type]&&(k[h.type]=[]),b.each(e.data,function(a,b){var e=k[h.type],f=+c.getRightValue(a);isNaN(f)||h.data[b].hidden||(e[b]=e[b]||0,d.relativePoints?e[b]=100:e[b]+=f)}))}),b.each(k,function(a){var d=b.min(a),e=b.max(a);c.min=null===c.min?d:Math.min(c.min,d),c.max=null===c.max?e:Math.max(c.max,e)})}else b.each(h,function(d,e){var g=f.getDatasetMeta(e);f.isDatasetVisible(e)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});c.min=i(e.min,c.min),c.max=i(e.max,c.max),c.min===c.max&&(0!==c.min&&null!==c.min?(c.min=Math.pow(10,Math.floor(b.log10(c.min))-1),c.max=Math.pow(10,Math.floor(b.log10(c.max))+1)):(c.min=1,c.max=10))},buildTicks:function(){for(var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=a.ticks=[],g=e(d.min,Math.pow(10,Math.floor(b.log10(a.min))));ga.max&&(a.max=d))})}}),a.handleTickRangeOptions()},getTickLimit:function(){var a=this.options.ticks,d=b.getValueOrDefault(a.fontSize,c.defaultFontSize);return Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*d)))},convertTicksToLabels:function(){var b=this;a.LinearScaleBase.prototype.convertTicksToLabels.call(b),b.pointLabels=b.chart.data.labels.map(b.options.pointLabels.callback,b)},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},fit:function(){var a,d,e,f,g,h,i,j,k,l,m,n,o=this.options.pointLabels,p=b.getValueOrDefault(o.fontSize,c.defaultFontSize),q=b.getValueOrDefault(o.fontStyle,c.defaultFontStyle),r=b.getValueOrDefault(o.fontFamily,c.defaultFontFamily),s=b.fontString(p,q,r),t=b.min([this.height/2-p-5,this.width/2]),u=this.width,v=0;for(this.ctx.font=s,d=0;du&&(u=a.x+f,g=d),a.x-fu&&(u=a.x+e,g=d):d>this.getValueCount()/2&&a.x-eb&&0>c?c:b>0&&c>0?b:0)},draw:function(){var a=this,d=a.options,e=d.gridLines,f=d.ticks,g=d.angleLines,h=d.pointLabels,i=b.getValueOrDefault;if(d.display){var j=a.ctx,k=i(f.fontSize,c.defaultFontSize),l=i(f.fontStyle,c.defaultFontStyle),m=i(f.fontFamily,c.defaultFontFamily),n=b.fontString(k,l,m);if(b.each(a.ticks,function(g,h){if(h>0||d.reverse){var l=a.getDistanceFromCenterForValue(a.ticksAsNumbers[h]),m=a.yCenter-l;if(e.display&&0!==h)if(j.strokeStyle=b.getValueAtIndexOrDefault(e.color,h-1),j.lineWidth=b.getValueAtIndexOrDefault(e.lineWidth,h-1),d.lineArc)j.beginPath(),j.arc(a.xCenter,a.yCenter,l,0,2*Math.PI),j.closePath(),j.stroke();else{j.beginPath();for(var o=0;o=0;t--){if(g.display){var u=a.getPointPosition(t,o);j.beginPath(),j.moveTo(a.xCenter,a.yCenter),j.lineTo(u.x,u.y),j.stroke(),j.closePath()}var v=a.getPointPosition(t,o+5),w=i(h.fontColor,c.defaultFontColor);j.font=s,j.fillStyle=w;var x=a.pointLabels,y=x.length,z=x.length/2,A=z/2,B=A>t||t>y-A,C=t===A||t===y-A;0===t?j.textAlign="center":t===z?j.textAlign="center":z>t?j.textAlign="left":j.textAlign="right",C?j.textBaseline="middle":B?j.textBaseline="bottom":j.textBaseline="top",j.fillText(x[t]?x[t]:"",v.x,v.y)}}}}});a.scaleService.registerScaleType("radialLinear",e,d)}},{}],43:[function(a,b,c){"use strict";var d=a(1);d="function"==typeof d?d:window.moment,b.exports=function(a){var b=a.helpers,c={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},e={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},f=a.Scale.extend({initialize:function(){if(!d)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");a.Scale.prototype.initialize.call(this)},getLabelMoment:function(a,b){return this.labelMoments[a][b]},getMomentStartOf:function(a){var b=this;return"week"===b.options.time.unit&&b.options.time.isoWeekday!==!1?a.clone().startOf("isoWeek").isoWeekday(b.options.time.isoWeekday):a.clone().startOf(b.tickUnit)},determineDataLimits:function(){var a=this;a.labelMoments=[];var c=[];a.chart.data.labels&&a.chart.data.labels.length>0?(b.each(a.chart.data.labels,function(b,d){var e=a.parseTime(b);e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),c.push(e))},a),a.firstTick=d.min.call(a,c),a.lastTick=d.max.call(a,c)):(a.firstTick=null,a.lastTick=null),b.each(a.chart.data.datasets,function(e,f){var g=[],h=a.chart.isDatasetVisible(f);"object"==typeof e.data[0]&&null!==e.data[0]?b.each(e.data,function(b,c){var e=a.parseTime(a.getRightValue(b));e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),g.push(e),h&&(a.firstTick=null!==a.firstTick?d.min(a.firstTick,e):e,a.lastTick=null!==a.lastTick?d.max(a.lastTick,e):e))},a):g=c,a.labelMoments.push(g)},a),a.options.time.min&&(a.firstTick=a.parseTime(a.options.time.min)),a.options.time.max&&(a.lastTick=a.parseTime(a.options.time.max)),a.firstTick=(a.firstTick||d()).clone(),a.lastTick=(a.lastTick||d()).clone()},buildTicks:function(d){var e=this;e.ctx.save();var f=b.getValueOrDefault(e.options.ticks.fontSize,a.defaults.global.defaultFontSize),g=b.getValueOrDefault(e.options.ticks.fontStyle,a.defaults.global.defaultFontStyle),h=b.getValueOrDefault(e.options.ticks.fontFamily,a.defaults.global.defaultFontFamily),i=b.fontString(f,g,h);if(e.ctx.font=i,e.ticks=[],e.unitScale=1,e.scaleSizeInUnits=0,e.options.time.unit)e.tickUnit=e.options.time.unit||"day",e.displayFormat=e.options.time.displayFormats[e.tickUnit],e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,1);else{var j=e.isHorizontal()?e.width-(e.paddingLeft+e.paddingRight):e.height-(e.paddingTop+e.paddingBottom),k=e.tickFormatFunction(e.firstTick,0,[]),l=e.ctx.measureText(k).width,m=Math.cos(b.toRadians(e.options.ticks.maxRotation)),n=Math.sin(b.toRadians(e.options.ticks.maxRotation));l=l*m+f*n;var o=j/l;e.tickUnit="millisecond",e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.displayFormat=e.options.time.displayFormats[e.tickUnit];for(var p=0,q=c.units[p];p=Math.ceil(e.scaleSizeInUnits/o)){e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,q.steps[r]);break}break}if(q.maxStep===!1||Math.ceil(e.scaleSizeInUnits/o)=0)break;w%e.unitScale===0&&e.ticks.push(x)}var y=e.ticks[e.ticks.length-1].diff(e.lastTick,e.tickUnit);(0!==y||0===e.scaleSizeInUnits)&&(e.options.time.max?(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.ticks[0],e.tickUnit,!0)):(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0))),e.ctx.restore()},getLabelForIndex:function(a,b){var c=this,d=c.chart.data.labels&&a"+$.i18n("totals")+": "+b.formatNumber(b.outputData.sum)+"\n ("+b.formatNumber(Math.round(b.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform_select",projectInput:"#project_input",formStates:["initial","processing","complete","invalid"],sourceInput:"#source_input",timestampFormat:"YYYYMMDD00",validParams:{direction:["-1","1"],sort:["title","views","badges","lang"],view:["list","chart"]}};b.exports=d},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function a(a,b){for(var c=0;c"}},{key:"renderData",value:function(){var a=this;i(Object.getPrototypeOf(b.prototype),"renderData",this).call(this,function(b){var c=Object.keys(a.outputData.badges).map(function(b){return""+a.getBadgeMarkup(b)+" × "+a.outputData.badges[b]+""}).join(", ");$(".output-totals").html(""+$.i18n("totals")+"\n "+$.i18n("num-languages",b.length)+"\n "+$.i18n("unique-titles",a.outputData.titles.length)+"\n "+c+"\n "+a.formatNumber(a.outputData.sum)+"\n "+a.formatNumber(Math.round(a.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),b.forEach(function(b,c){var d="";b.badges&&(d=b.badges.map(a.getBadgeMarkup.bind(a)).join()),$("#output_list").append("\n "+(c+1)+"\n "+b.lang+'\n '+b.label+"\n "+d+"\n "+a.formatNumber(b.sum)+"\n "+a.formatNumber(Math.round(b.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(a,b){switch(b){case"lang":return a.lang;case"title":return a.label;case"badges":return a.badges.sort().join("");case"views":return Number(a.sum)}}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=Object.keys(a),f=$.Deferred(),g=[],h=0,i=void 0,j={},k=e.length,l=[],m=[],n=function p(e){var n=a[e],o=encodeURIComponent(n.title),q="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+n.lang+"."+b.baseProject+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+o+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),r=$.ajax({url:q,dataType:"json"});g.push(r),r.done(function(a){m.push({badges:n.badges,dbName:e,lang:n.lang,title:n.title,url:n.url,items:a.items})}).fail(function(a){var c="Error in Cassandra table storage backend"===a.responseJSON.title,d=b.getPageLink(n.title,n.lang+"."+b.baseProject+".org");if(c){if(j[e]?j[e]++:j[e]=1,j[e]<3)return k++,b.rateLimit(p,100,b)(e);l.push(d)}else b.writeMessage(d+": "+$.i18n("api-error","Pageviews API")+" - "+a.responseJSON.title);i=!0}).always(function(){b.updateProgressBar(++h/k*100),h===k&&(f.resolve(m),l.length&&b.writeMessage($.i18n("api-error-timeout","
      "+l.map(function(a){return"
    • "+a+"
    • "}).join("")+"
    ")),i||simpleStorage.set(b.getCacheKey(),!0,{TTL:6e5}))})},o=this.isRequestCached()?n:this.rateLimit(n,100,this);return e.forEach(function(a,b){o(a)}),f}},{key:"getInterwikiData",value:function(a,b){var c=this,d=$.Deferred(),e="https://www.wikidata.org/w/api.php?action=wbgetentities&sites="+a+("&titles="+encodeURIComponent(b)+"&props=sitelinks/urls|datatype&format=json&callback=?");return $.getJSON(e).done(function(a){if(a.error)return d.reject($.i18n("api-error","Wikidata")+": "+a.error.info);if(a.entities[-1])return d.reject(""+b.descore().escape()+" - "+$.i18n("api-error-no-data"));var e=Object.keys(a.entities)[0],f=a.entities[e].sitelinks,g={},h=new RegExp("^https://[\\w-]+\\."+c.baseProject+"\\.org");return Object.keys(f).forEach(function(a){var b=f[a].site.replace(/-/g,"_");h.test(f[a].url)&&k[b]&&(f[a].lang=k[b].replace(/\.wiki.*$/,""),g[a]=f[a])}),d.resolve(g)}),d}},{key:"getPageNameFromURL",value:function(a){return a.includes("?")?a.match(/\?(?:.*\b)?title=(.*?)(?:&|$)/)[1]:a.match(/\/wiki\/(.*?)(?:\?|$)/)[1]}},{key:"popParams",value:function(){var a=this,b=void 0,c=void 0,d=this.parseQueryString("pages");if($(this.config.projectInput).val(d.project||this.config.defaults.project),!this.validateProject()){if(this.patchUsage("lv"),d.range)this.setSpecialRange(d.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(d.start){if(b=moment(d.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(d.end||Date.now()),bc)return void this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0);this.daterangepicker.setStartDate(b),this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);$(this.config.platformSelector).val(d.platform||"all-access"),$(this.config.agentSelector).val(d.agent||"user"),["sort","direction","view"].forEach(function(b){var c=d[b];c&&a.config.validParams[b].includes(c)?(d[b]=c,a[b]=c):(d[b]=a.config.defaults.params[b],a[b]=a.config.defaults.params[b])}),d.page&&($(this.config.sourceInput).val(decodeURIComponent(d.page).descore()),this.processInput())}}},{key:"setState",value:function(a){switch($("main").removeClass(this.config.formStates.join(" ")).addClass(a),a){case"initial":this.clearMessages(),this.assignDefaults(),this.destroyChart(),$("output").removeClass("list-mode").removeClass("chart-mode"),$(".data-links").addClass("invisible"),this.typeahead&&this.typeahead.hide(),$(this.config.sourceInput).val("").focus();break;case"processing":this.processStarted(),this.clearMessages(),document.activeElement.blur(),$(".progress-bar").addClass("active");break;case"complete":this.processEnded(),this.updateProgressBar(0),$(".progress-bar").removeClass("active"),$(".data-links").removeClass("invisible");break;case"invalid":}}},{key:"processInput",value:function(){var a=this;if(!this.isRequestCached()&&simpleStorage.hasKey("pageviews-throttle")){var b=Math.round(simpleStorage.getTTL("pageviews-throttle")/1e3);if(b>0)return this.writeMessage($.i18n("api-throttle-wait",""+b+"",'phab:T124314'),!0)}var c=$(this.config.sourceInput).val();this.setState("processing");var d=Object.keys(k).find(function(b){return k[b]===$(a.config.projectInput).val()});this.getInterwikiData(d,c).done(function(b){var d=Object.keys(b).length;d>10&&a.setThrottle(),a.getPageViewsData(b).done(function(b){var e=a.getPageLink(decodeURIComponent(c),a.project);$(".output-title").html(e),$(".output-params").text($(a.config.dateRangeSelector).val()),a.buildMotherDataset(c,e,b),a.updateProgressBar(100),a.setInitialChartType(),a.renderData(),d>10&&a.setThrottle()})}).fail(function(b){a.setState("initial"),"string"==typeof b?a.writeMessage(b):a.writeMessage($.i18n("api-error-unknown","Wikidata"))})}},{key:"setupsourceInput",value:function(){this.typeahead&&this.typeahead.destroy(),$(this.config.sourceInput).typeahead({ajax:{url:"https://"+this.project+".org/w/api.php",timeout:200,triggerLength:1,method:"get",preDispatch:function(a){return{action:"query",list:"prefixsearch",format:"json",pssearch:a}},preProcess:function(a){var b=a.query.prefixsearch.map(function(a){return a.title});return b}}})}},{key:"validateProject",value:function(){var a=$(this.config.projectInput).val();return this.isMultilangProject()?(this.setState("initial"),this.setupsourceInput(),!1):(this.writeMessage($.i18n("invalid-lang-project",""+a.escape()+""),!0),this.setState("invalid"),!0)}},{key:"exportCSV",value:function(){var a=this,b="data:text/csv;charset=utf-8,Language,Title,Badges,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(c){var d='"'+c.label.descore().replace(/"/g,'""')+'"',e='"'+c.badges.map(function(b){return a.config.badges[b].name.replace(/"/g,'""')})+'"';b+=[c.lang,d,e].concat(c.data).join(",")+"\n"}),this.downloadData(b,"csv")}},{key:"baseProject",get:function(){return this.project.split(".")[1]}},{key:"typeahead",get:function(){return $(this.config.sourceInput).data("typeahead")}}]),b}(mix(l)["with"](m,n));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new o})},{"../shared/chart_helpers":3,"../shared/list_helpers":5,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
      "+i.map(function(a){return"
    • "+b.getPageLink(a,b.project.escape())+"
    • "}).join("")+"
    ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
  • "+a+"
  • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
      "+c+"
    "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts); -if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],6:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],7:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
    "+a+"
    ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":8}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],9:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org", -cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}]},{},[3,4,5,6,7,8,9,2]); \ No newline at end of file +},Q17437798:{image:"https://upload.wikimedia.org/wikipedia/commons/9/94/Symbol_support_vote.svg",name:"Good article"},Q17559452:{image:"https://upload.wikimedia.org/wikipedia/commons/c/c4/Art%C3%ADculo_bueno-blue.svg",name:"Recommended article"},Q17506997:{image:"https://upload.wikimedia.org/wikipedia/commons/e/e7/Cscr-featured.svg",name:"Featured list"},Q17580674:{image:"https://upload.wikimedia.org/wikipedia/commons/e/e7/Cscr-featured.svg",name:"Featured portal"},Q20748092:{image:"https://upload.wikimedia.org/wikipedia/commons/c/ce/Featured_article_star_-_check.svg",name:"Proofread"},Q20748093:{image:"https://upload.wikimedia.org/wikipedia/commons/9/94/Symbol_support_vote.svg",name:"Validated"}},dateLimit:90,dateRangeSelector:"#range_input",defaults:{dateRange:"latest-20",project:"en.wikipedia.org",params:{sort:"views",direction:1,outputData:[],total:0,view:"list"}},linearLegend:function(a,b){return""+$.i18n("totals")+": "+b.formatNumber(b.outputData.sum)+"\n ("+b.formatNumber(Math.round(b.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform_select",projectInput:"#project_input",formStates:["initial","processing","complete","invalid"],sourceInput:"#source_input",timestampFormat:"YYYYMMDD00",validParams:{direction:["-1","1"],sort:["title","views","badges","lang"],view:["list","chart"]}};b.exports=d},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function a(a,b){for(var c=0;c"}},{key:"renderData",value:function(){var a=this;i(Object.getPrototypeOf(b.prototype),"renderData",this).call(this,function(b){var c=Object.keys(a.outputData.badges).map(function(b){return""+a.getBadgeMarkup(b)+" × "+a.outputData.badges[b]+""}).join(", ");$(".output-totals").html(""+$.i18n("totals")+"\n "+$.i18n("num-languages",b.length)+"\n "+$.i18n("unique-titles",a.outputData.titles.length)+"\n "+c+"\n "+a.formatNumber(a.outputData.sum)+"\n "+a.formatNumber(Math.round(a.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),b.forEach(function(b,c){var d="";b.badges&&(d=b.badges.map(a.getBadgeMarkup.bind(a)).join()),$("#output_list").append("\n "+(c+1)+"\n "+b.lang+'\n '+b.label+"\n "+d+"\n "+a.formatNumber(b.sum)+"\n "+a.formatNumber(Math.round(b.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(a,b){switch(b){case"lang":return a.lang;case"title":return a.label;case"badges":return a.badges.sort().join("");case"views":return Number(a.sum)}}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=Object.keys(a),f=$.Deferred(),g=[],h=0,i=void 0,j={},k=e.length,l=[],m=[],n=function p(e){var n=a[e],o=encodeURIComponent(n.title),q="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+n.lang+"."+b.baseProject+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+o+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),r=$.ajax({url:q,dataType:"json"});g.push(r),r.done(function(a){m.push({badges:n.badges,dbName:e,lang:n.lang,title:n.title,url:n.url,items:a.items})}).fail(function(a){var c="Error in Cassandra table storage backend"===a.responseJSON.title,d=b.getPageLink(n.title,n.lang+"."+b.baseProject+".org");if(c){if(j[e]?j[e]++:j[e]=1,j[e]<3)return k++,b.rateLimit(p,100,b)(e);l.push(d)}else b.writeMessage(d+": "+$.i18n("api-error","Pageviews API")+" - "+a.responseJSON.title);i=!0}).always(function(){b.updateProgressBar(++h/k*100),h===k&&(f.resolve(m),l.length&&b.writeMessage($.i18n("api-error-timeout","
      "+l.map(function(a){return"
    • "+a+"
    • "}).join("")+"
    ")),i||simpleStorage.set(b.getCacheKey(),!0,{TTL:6e5}))})},o=this.isRequestCached()?n:this.rateLimit(n,100,this);return e.forEach(function(a,b){o(a)}),f}},{key:"getInterwikiData",value:function(a,b){var c=this,d=$.Deferred(),e="https://www.wikidata.org/w/api.php?action=wbgetentities&sites="+a+("&titles="+encodeURIComponent(b)+"&props=sitelinks/urls|datatype&format=json&callback=?");return $.getJSON(e).done(function(a){if(a.error)return d.reject($.i18n("api-error","Wikidata")+": "+a.error.info);if(a.entities[-1])return d.reject(""+b.descore().escape()+" - "+$.i18n("api-error-no-data"));var e=Object.keys(a.entities)[0],f=a.entities[e].sitelinks,g={},h=new RegExp("^https://[\\w-]+\\."+c.baseProject+"\\.org");return Object.keys(f).forEach(function(a){var b=f[a].site.replace(/-/g,"_");h.test(f[a].url)&&k[b]&&(f[a].lang=k[b].replace(/\.wiki.*$/,""),g[a]=f[a])}),d.resolve(g)}),d}},{key:"getPageNameFromURL",value:function(a){return a.includes("?")?a.match(/\?(?:.*\b)?title=(.*?)(?:&|$)/)[1]:a.match(/\/wiki\/(.*?)(?:\?|$)/)[1]}},{key:"popParams",value:function(){var a=this,b=this.parseQueryString("pages");$(this.config.projectInput).val(b.project||this.config.defaults.project),this.validateProject()||(this.patchUsage("lv"),this.checkDateRange(b)||delete b.page,$(this.config.platformSelector).val(b.platform||"all-access"),$(this.config.agentSelector).val(b.agent||"user"),["sort","direction","view"].forEach(function(c){var d=b[c];d&&a.config.validParams[c].includes(d)?(b[c]=d,a[c]=d):(b[c]=a.config.defaults.params[c],a[c]=a.config.defaults.params[c])}),b.page&&($(this.config.sourceInput).val(decodeURIComponent(b.page).descore()),this.processInput()))}},{key:"setState",value:function(a){switch($("main").removeClass(this.config.formStates.join(" ")).addClass(a),a){case"initial":this.clearMessages(),this.assignDefaults(),this.destroyChart(),$("output").removeClass("list-mode").removeClass("chart-mode"),$(".data-links").addClass("invisible"),this.typeahead&&this.typeahead.hide(),$(this.config.sourceInput).val("").focus();break;case"processing":this.processStarted(),this.clearMessages(),document.activeElement.blur(),$(".progress-bar").addClass("active");break;case"complete":this.processEnded(),this.updateProgressBar(0),$(".progress-bar").removeClass("active"),$(".data-links").removeClass("invisible");break;case"invalid":}}},{key:"processInput",value:function(){var a=this;if(!this.isRequestCached()&&simpleStorage.hasKey("pageviews-throttle")){var b=Math.round(simpleStorage.getTTL("pageviews-throttle")/1e3);if(b>0)return this.writeMessage($.i18n("api-throttle-wait",""+b+"",'phab:T124314'),!0)}var c=$(this.config.sourceInput).val();this.setState("processing");var d=Object.keys(k).find(function(b){return k[b]===$(a.config.projectInput).val()});this.getInterwikiData(d,c).done(function(b){var d=Object.keys(b).length;d>10&&a.setThrottle(),a.getPageViewsData(b).done(function(b){var e=a.getPageLink(decodeURIComponent(c),a.project);$(".output-title").html(e),$(".output-params").text($(a.config.dateRangeSelector).val()),a.buildMotherDataset(c,e,b),a.updateProgressBar(100),a.setInitialChartType(),a.renderData(),d>10&&a.setThrottle()})}).fail(function(b){a.setState("initial"),"string"==typeof b?a.writeMessage(b):a.writeMessage($.i18n("api-error-unknown","Wikidata"))})}},{key:"setupsourceInput",value:function(){this.typeahead&&this.typeahead.destroy(),$(this.config.sourceInput).typeahead({ajax:{url:"https://"+this.project+".org/w/api.php",timeout:200,triggerLength:1,method:"get",preDispatch:function(a){return{action:"query",list:"prefixsearch",format:"json",pssearch:a}},preProcess:function(a){var b=a.query.prefixsearch.map(function(a){return a.title});return b}}})}},{key:"validateProject",value:function(){var a=$(this.config.projectInput).val();return this.isMultilangProject()?(this.setState("initial"),this.setupsourceInput(),!1):(this.writeMessage($.i18n("invalid-lang-project",""+a.escape()+""),!0),this.setState("invalid"),!0)}},{key:"exportCSV",value:function(){var a=this,b="data:text/csv;charset=utf-8,Language,Title,Badges,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(c){var d='"'+c.label.descore().replace(/"/g,'""')+'"',e='"'+c.badges.map(function(b){return a.config.badges[b].name.replace(/"/g,'""')})+'"';b+=[c.lang,d,e].concat(c.data).join(",")+"\n"}),this.downloadData(b,"csv")}},{key:"baseProject",get:function(){return this.project.split(".")[1]}},{key:"typeahead",get:function(){return $(this.config.sourceInput).data("typeahead")}}]),b}(mix(l)["with"](m,n));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new o})},{"../shared/chart_helpers":3,"../shared/list_helpers":5,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
      "+i.map(function(a){return"
    • "+b.getPageLink(a,b.project.escape())+"
    • "}).join("")+"
    ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
  • "+a+"
  • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
      "+c+"
    "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"); +var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],6:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],7:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"checkDateRange",value:function(a){if(a.range)this.setSpecialRange(a.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(a.start){var b=moment(a.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(a.end||Date.now());if(bc)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),!1;this.daterangepicker.startDate=b,this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);return!0}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
    "+a+"
    ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":8}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],9:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org", +cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}]},{},[3,4,5,6,7,8,9,2]); \ No newline at end of file diff --git a/public_html/langviews/langviews.js b/public_html/langviews/langviews.js index 11be3df72..220f24782 100644 --- a/public_html/langviews/langviews.js +++ b/public_html/langviews/langviews.js @@ -645,38 +645,16 @@ var LangViews = function (_mix$with) { value: function popParams() { var _this7 = this; - var startDate = void 0, - endDate = void 0, - params = this.parseQueryString('pages'); + var params = this.parseQueryString('pages'); $(this.config.projectInput).val(params.project || this.config.defaults.project); if (this.validateProject()) return; this.patchUsage('lv'); - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < this.config.minDate || endDate < this.config.minDate) { - this.addSiteNotice('danger', $.i18n('param-error-1', $.i18n('july') + ' 2015'), $.i18n('invalid-params'), true); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - return; - } - this.daterangepicker.setStartDate(startDate); - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); + // if date range is invalid, remove page from params so we don't process the default date range + if (!this.checkDateRange(params)) { + delete params.page; } $(this.config.platformSelector).val(params.platform || 'all-access'); @@ -2426,6 +2404,42 @@ var Pv = function (_PvConfig) { $('.site-notice').append('
    ' + markup + '
    '); } + + /** + * Check the validity of the date range of given params + * and throw errors as necessary and/or set defaults + * @param {Object} params - as returned by this.parseQueryString() + * @returns {Boolean} true if there were no errors, false otherwise + */ + + }, { + key: 'checkDateRange', + value: function checkDateRange(params) { + if (params.range) { + if (!this.setSpecialRange(params.range)) { + this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); + this.setSpecialRange(this.config.defaults.dateRange); + } + } else if (params.start) { + var startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')), + endDate = moment(params.end || Date.now()); + + if (startDate < this.config.minDate || endDate < this.config.minDate) { + this.addSiteNotice('danger', $.i18n('param-error-1', moment(this.config.minDate).format(this.dateFormat)), $.i18n('invalid-params'), true); + return false; + } else if (startDate > endDate) { + this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); + return false; + } + /** directly assign startDate before calling setEndDate so events will be fired once */ + this.daterangepicker.startDate = startDate; + this.daterangepicker.setEndDate(endDate); + } else { + this.setSpecialRange(this.config.defaults.dateRange); + } + + return true; + } }, { key: 'clearSiteNotices', value: function clearSiteNotices() { diff --git a/public_html/massviews/application.js b/public_html/massviews/application.js index e2ff49d08..3444bd75e 100644 --- a/public_html/massviews/application.js +++ b/public_html/massviews/application.js @@ -9,6 +9,6 @@ if(0==h)return f=255*i,[f,f,f];c=.5>i?i*(1+h):i+h-i*h,b=2*i-c,e=[0,0,0];for(var }},calculatePointY:function(a,b,c,d){var e,f,g,h=this,i=h.chart,j=h.getMeta(),k=h.getScaleForId(j.yAxisID),l=0,m=0;if(k.options.stacked){for(e=0;c>e;e++)f=i.data.datasets[e],g=i.getDatasetMeta(e),"line"===g.type&&i.isDatasetVisible(e)&&(f.data[b]<0?m+=f.data[b]||0:l+=f.data[b]||0);return 0>a?k.getPixelForValue(m+a):k.getPixelForValue(l+a)}return k.getPixelForValue(a)},updateBezierControlPoints:function(){var a,b,d,e,f,g=this.getMeta(),h=(this.chart.chartArea,g.data||[]);for(a=0,b=h.length;b>a;++a)d=h[a],e=d._model,f=c.splineCurve(c.previousItem(h,a)._model,e,c.nextItem(h,a)._model,g.dataset._model.tension),e.controlPointPreviousX=f.previous.x,e.controlPointPreviousY=f.previous.y,e.controlPointNextX=f.next.x,e.controlPointNextY=f.next.y},draw:function(a){var c,d,e=this,f=e.getMeta(),g=f.data||[],h=a||1;for(c=0,d=g.length;d>c;++c)g[c].transition(h);for(b(e.getDataset(),e.chart.options)&&f.dataset.transition(h).draw(),c=0,d=g.length;d>c;++c)g[c].draw()},setHoverStyle:function(a){var b=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=a._model;f.radius=e.hoverRadius||c.getValueAtIndexOrDefault(b.pointHoverRadius,d,this.chart.options.elements.point.hoverRadius),f.backgroundColor=e.hoverBackgroundColor||c.getValueAtIndexOrDefault(b.pointHoverBackgroundColor,d,c.getHoverColor(f.backgroundColor)),f.borderColor=e.hoverBorderColor||c.getValueAtIndexOrDefault(b.pointHoverBorderColor,d,c.getHoverColor(f.borderColor)),f.borderWidth=e.hoverBorderWidth||c.getValueAtIndexOrDefault(b.pointHoverBorderWidth,d,f.borderWidth)},removeHoverStyle:function(a){var b=this,d=b.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=a._model;void 0!==d.radius&&void 0===d.pointRadius&&(d.pointRadius=d.radius),g.radius=f.radius||c.getValueAtIndexOrDefault(d.pointRadius,e,b.chart.options.elements.point.radius),g.backgroundColor=b.getPointBackgroundColor(a,e),g.borderColor=b.getPointBorderColor(a,e),g.borderWidth=b.getPointBorderWidth(a,e)}})}},{}],19:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0},animation:{animateRotate:!0,animateScale:!0},aspectRatio:1,legendCallback:function(a){var b=[];b.push('
      ');var c=a.data,d=c.datasets,e=c.labels;if(d.length)for(var f=0;f'),e[f]&&b.push(e[f]),b.push("");return b.push("
    "),b.join("")},legend:{labels:{generateLabels:function(a){var c=a.data;return c.labels.length&&c.datasets.length?c.labels.map(function(d,e){var f=a.getDatasetMeta(0),g=c.datasets[0],h=f.data[e],i=h.custom||{},j=b.getValueAtIndexOrDefault,k=a.options.elements.arc,l=i.backgroundColor?i.backgroundColor:j(g.backgroundColor,e,k.backgroundColor),m=i.borderColor?i.borderColor:j(g.borderColor,e,k.borderColor),n=i.borderWidth?i.borderWidth:j(g.borderWidth,e,k.borderWidth);return{text:d,fillStyle:l,strokeStyle:m,lineWidth:n,hidden:isNaN(g.data[e])||f.data[e].hidden,index:e}}):[]}},onClick:function(a,b){var c,d,e,f=b.index,g=this.chart;for(c=0,d=(g.data.datasets||[]).length;d>c;++c)e=g.getDatasetMeta(c),e.data[f].hidden=!e.data[f].hidden;g.update()}},tooltips:{callbacks:{title:function(){return""},label:function(a,b){return b.labels[a.index]+": "+a.yLabel}}}},a.controllers.polarArea=a.DatasetController.extend({dataElementType:a.elements.Arc,linkScales:b.noop,update:function(a){var c=this,d=c.chart,e=d.chartArea,f=c.getMeta(),g=d.options,h=g.elements.arc,i=Math.min(e.right-e.left,e.bottom-e.top);d.outerRadius=Math.max((i-h.borderWidth/2)/2,0),d.innerRadius=Math.max(g.cutoutPercentage?d.outerRadius/100*g.cutoutPercentage:1,0),d.radiusLength=(d.outerRadius-d.innerRadius)/d.getVisibleDatasetCount(),c.outerRadius=d.outerRadius-d.radiusLength*c.index,c.innerRadius=c.outerRadius-d.radiusLength,f.count=c.countVisibleElements(),b.each(f.data,function(b,d){c.updateElement(b,d,a)})},updateElement:function(a,c,d){for(var e=this,f=e.chart,g=f.chartArea,h=e.getDataset(),i=f.options,j=i.animation,k=(i.elements.arc,a.custom||{},f.scale),l=b.getValueAtIndexOrDefault,m=f.data.labels,n=e.calculateCircumference(h.data[c]),o=(g.left+g.right)/2,p=(g.top+g.bottom)/2,q=0,r=e.getMeta(),s=0;c>s;++s)isNaN(h.data[s])||r.data[s].hidden||++q;var t=-.5*Math.PI,u=a.hidden?0:k.getDistanceFromCenterForValue(h.data[c]),v=t+n*q,w=v+(a.hidden?0:n),x=j.animateScale?0:k.getDistanceFromCenterForValue(h.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:k,_model:{x:o,y:p,innerRadius:0,outerRadius:d?x:u,startAngle:d&&j.animateRotate?t:v,endAngle:d&&j.animateRotate?t:w,label:l(m,c,m[c])}}),e.removeHoverStyle(a),a.pivot()},removeHoverStyle:function(b){a.DatasetController.prototype.removeHoverStyle.call(this,b,this.chart.options.elements.arc)},countVisibleElements:function(){var a=this.getDataset(),c=this.getMeta(),d=0;return b.each(c.data,function(b,c){isNaN(a.data[c])||b.hidden||d++}),d},calculateCircumference:function(a){var b=this.getMeta().count;return b>0&&!isNaN(a)?2*Math.PI/b:0}})}},{}],20:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},a.controllers.radar=a.DatasetController.extend({datasetElementType:a.elements.Line,dataElementType:a.elements.Point,linkScales:b.noop,addElementAndReset:function(b){a.DatasetController.prototype.addElementAndReset.call(this,b),this.updateBezierControlPoints()},update:function(a){var c=this,d=c.getMeta(),e=d.dataset,f=d.data,g=e.custom||{},h=c.getDataset(),i=c.chart.options.elements.line,j=c.chart.scale;void 0!==h.tension&&void 0===h.lineTension&&(h.lineTension=h.tension),b.extend(d.dataset,{_datasetIndex:c.index,_children:f,_loop:!0,_model:{tension:g.tension?g.tension:b.getValueOrDefault(h.lineTension,i.tension),backgroundColor:g.backgroundColor?g.backgroundColor:h.backgroundColor||i.backgroundColor,borderWidth:g.borderWidth?g.borderWidth:h.borderWidth||i.borderWidth,borderColor:g.borderColor?g.borderColor:h.borderColor||i.borderColor,fill:g.fill?g.fill:void 0!==h.fill?h.fill:i.fill,borderCapStyle:g.borderCapStyle?g.borderCapStyle:h.borderCapStyle||i.borderCapStyle,borderDash:g.borderDash?g.borderDash:h.borderDash||i.borderDash,borderDashOffset:g.borderDashOffset?g.borderDashOffset:h.borderDashOffset||i.borderDashOffset,borderJoinStyle:g.borderJoinStyle?g.borderJoinStyle:h.borderJoinStyle||i.borderJoinStyle,scaleTop:j.top,scaleBottom:j.bottom,scaleZero:j.getBasePosition()}}),d.dataset.pivot(),b.each(f,function(b,d){c.updateElement(b,d,a)},c),c.updateBezierControlPoints()},updateElement:function(a,c,d){var e=this,f=a.custom||{},g=e.getDataset(),h=e.chart.scale,i=e.chart.options.elements.point,j=h.getPointPositionForValue(c,g.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:h,_model:{x:d?h.xCenter:j.x,y:d?h.yCenter:j.y,tension:f.tension?f.tension:b.getValueOrDefault(g.tension,e.chart.options.elements.line.tension),radius:f.radius?f.radius:b.getValueAtIndexOrDefault(g.pointRadius,c,i.radius),backgroundColor:f.backgroundColor?f.backgroundColor:b.getValueAtIndexOrDefault(g.pointBackgroundColor,c,i.backgroundColor),borderColor:f.borderColor?f.borderColor:b.getValueAtIndexOrDefault(g.pointBorderColor,c,i.borderColor),borderWidth:f.borderWidth?f.borderWidth:b.getValueAtIndexOrDefault(g.pointBorderWidth,c,i.borderWidth),pointStyle:f.pointStyle?f.pointStyle:b.getValueAtIndexOrDefault(g.pointStyle,c,i.pointStyle),hitRadius:f.hitRadius?f.hitRadius:b.getValueAtIndexOrDefault(g.hitRadius,c,i.hitRadius)}}),a._model.skip=f.skip?f.skip:isNaN(a._model.x)||isNaN(a._model.y)},updateBezierControlPoints:function(){var a=this.chart.chartArea,c=this.getMeta();b.each(c.data,function(d,e){var f=d._model,g=b.splineCurve(b.previousItem(c.data,e,!0)._model,f,b.nextItem(c.data,e,!0)._model,f.tension);f.controlPointPreviousX=Math.max(Math.min(g.previous.x,a.right),a.left),f.controlPointPreviousY=Math.max(Math.min(g.previous.y,a.bottom),a.top),f.controlPointNextX=Math.max(Math.min(g.next.x,a.right),a.left),f.controlPointNextY=Math.max(Math.min(g.next.y,a.bottom),a.top),d.pivot()})},draw:function(a){var c=this.getMeta(),d=a||1;b.each(c.data,function(a,b){a.transition(d)}),c.dataset.transition(d).draw(),b.each(c.data,function(a){a.draw()})},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model;f.radius=d.hoverRadius?d.hoverRadius:b.getValueAtIndexOrDefault(c.pointHoverRadius,e,this.chart.options.elements.point.hoverRadius),f.backgroundColor=d.hoverBackgroundColor?d.hoverBackgroundColor:b.getValueAtIndexOrDefault(c.pointHoverBackgroundColor,e,b.getHoverColor(f.backgroundColor)),f.borderColor=d.hoverBorderColor?d.hoverBorderColor:b.getValueAtIndexOrDefault(c.pointHoverBorderColor,e,b.getHoverColor(f.borderColor)),f.borderWidth=d.hoverBorderWidth?d.hoverBorderWidth:b.getValueAtIndexOrDefault(c.pointHoverBorderWidth,e,f.borderWidth)},removeHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model,g=this.chart.options.elements.point;f.radius=d.radius?d.radius:b.getValueAtIndexOrDefault(c.radius,e,g.radius),f.backgroundColor=d.backgroundColor?d.backgroundColor:b.getValueAtIndexOrDefault(c.pointBackgroundColor,e,g.backgroundColor),f.borderColor=d.borderColor?d.borderColor:b.getValueAtIndexOrDefault(c.pointBorderColor,e,g.borderColor),f.borderWidth=d.borderWidth?d.borderWidth:b.getValueAtIndexOrDefault(c.pointBorderWidth,e,g.borderWidth)}})}},{}],21:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:b.noop,onComplete:b.noop},a.Animation=a.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),a.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(a,b,c,d){var e=this;d||(a.animating=!0);for(var f=0;f1&&(c=Math.floor(a.dropFrames),a.dropFrames=a.dropFrames%1);for(var d=0;da.animations[d].animationObject.numSteps&&(a.animations[d].animationObject.currentStep=a.animations[d].animationObject.numSteps),a.animations[d].animationObject.render(a.animations[d].chartInstance,a.animations[d].animationObject),a.animations[d].animationObject.onAnimationProgress&&a.animations[d].animationObject.onAnimationProgress.call&&a.animations[d].animationObject.onAnimationProgress.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].animationObject.currentStep===a.animations[d].animationObject.numSteps?(a.animations[d].animationObject.onAnimationComplete&&a.animations[d].animationObject.onAnimationComplete.call&&a.animations[d].animationObject.onAnimationComplete.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].chartInstance.animating=!1,a.animations.splice(d,1)):++d;var e=Date.now(),f=(e-b)/a.frameDuration;a.dropFrames+=f,a.animations.length>0&&a.requestAnimationFrame()}}}},{}],22:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.types={},a.instances={},a.controllers={},a.Controller=function(c){return this.chart=c,this.config=c.config,this.options=this.config.options=b.configMerge(a.defaults.global,a.defaults[this.config.type],this.config.options||{}),this.id=b.uid(),Object.defineProperty(this,"data",{get:function(){return this.config.data}}),a.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},b.extend(a.Controller.prototype,{initialize:function(){var b=this;return a.plugins.notify("beforeInit",[b]),b.bindEvents(),b.ensureScalesHaveIDs(),b.buildOrUpdateControllers(),b.buildScales(),b.updateLayout(),b.resetElements(),b.initToolTip(),b.update(),a.plugins.notify("afterInit",[b]),b},clear:function(){return b.clear(this.chart),this},stop:function(){return a.animationService.cancelAnimation(this),this},resize:function(c){var d=this,e=d.chart,f=e.canvas,g=b.getMaximumWidth(f),h=e.aspectRatio,i=d.options.maintainAspectRatio&&isNaN(h)===!1&&isFinite(h)&&0!==h?g/h:b.getMaximumHeight(f),j=e.width!==g||e.height!==i;if(!j)return d;f.width=e.width=g,f.height=e.height=i,b.retinaScale(e);var k={width:g,height:i};return a.plugins.notify("resize",[d,k]),d.options.onResize&&d.options.onResize(d,k),c||(d.stop(),d.update(d.options.responsiveAnimationDuration)),d},ensureScalesHaveIDs:function(){var a=this.options,c=a.scales||{},d=a.scale;b.each(c.xAxes,function(a,b){a.id=a.id||"x-axis-"+b}),b.each(c.yAxes,function(a,b){a.id=a.id||"y-axis-"+b}),d&&(d.id=d.id||"scale")},buildScales:function(){var c=this,d=c.options,e=c.scales={},f=[];d.scales&&(f=f.concat((d.scales.xAxes||[]).map(function(a){return{options:a,dtype:"category"}}),(d.scales.yAxes||[]).map(function(a){return{options:a,dtype:"linear"}}))),d.scale&&f.push({options:d.scale,dtype:"radialLinear",isDefault:!0}),b.each(f,function(d,f){var g=d.options,h=b.getValueOrDefault(g.type,d.dtype),i=a.scaleService.getScaleConstructor(h);if(i){var j=new i({id:g.id,options:g,ctx:c.chart.ctx,chart:c});e[j.id]=j,d.isDefault&&(c.scale=j)}}),a.scaleService.addScalesToLayout(this)},updateLayout:function(){a.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var c=this,d=[],e=[];if(b.each(c.data.datasets,function(b,f){var g=c.getDatasetMeta(f);g.type||(g.type=b.type||c.config.type),d.push(g.type),g.controller?g.controller.updateIndex(f):(g.controller=new a.controllers[g.type](c,f),e.push(g.controller))},c),d.length>1)for(var f=1;fb;++b)d.getDatasetMeta(b).controller.update();a.plugins.notify("afterDatasetsUpdate",[d])}},render:function(c,d){var e=this;a.plugins.notify("beforeRender",[e]);var f=e.options.animation;if(f&&("undefined"!=typeof c&&0!==c||"undefined"==typeof c&&0!==f.duration)){var g=new a.Animation;g.numSteps=(c||f.duration)/16.66,g.easing=f.easing,g.render=function(a,c){var d=b.easingEffects[c.easing],e=c.currentStep/c.numSteps,f=d(e);a.draw(f,e,c.currentStep)},g.onAnimationProgress=f.onProgress,g.onAnimationComplete=f.onComplete,a.animationService.addAnimation(e,g,c,d)}else e.draw(),f&&f.onComplete&&f.onComplete.call&&f.onComplete.call(e);return e},draw:function(c){var d=this,e=c||1;d.clear(),a.plugins.notify("beforeDraw",[d,e]),b.each(d.boxes,function(a){a.draw(d.chartArea)},d),d.scale&&d.scale.draw(),a.plugins.notify("beforeDatasetsDraw",[d,e]),b.each(d.data.datasets,function(a,b){d.isDatasetVisible(b)&&d.getDatasetMeta(b).controller.draw(c)},d,!0),a.plugins.notify("afterDatasetsDraw",[d,e]),d.tooltip.transition(e).draw(),a.plugins.notify("afterDraw",[d,e])},getElementAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[];return b.each(c.data.datasets,function(a,f){if(c.isDatasetVisible(f)){var g=c.getDatasetMeta(f);b.each(g.data,function(a,b){return a.inRange(d.x,d.y)?(e.push(a),e):void 0})}}),e},getElementsAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[],f=function(){if(c.data.datasets)for(var a=0;a0&&(b=this.getDatasetMeta(b[0]._datasetIndex).data),b},getDatasetMeta:function(a){var b=this,c=b.data.datasets[a];c._meta||(c._meta={});var d=c._meta[b.id];return d||(d=c._meta[b.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),d},getVisibleDatasetCount:function(){for(var a=0,b=0,c=this.data.datasets.length;c>b;++b)this.isDatasetVisible(b)&&a++;return a},isDatasetVisible:function(a){var b=this.getDatasetMeta(a);return"boolean"==typeof b.hidden?!b.hidden:!this.data.datasets[a].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var c=this;c.stop(),c.clear(),b.unbindEvents(c,c.events),b.removeResizeListener(c.chart.canvas.parentNode);var d=c.chart.canvas;d.width=c.chart.width,d.height=c.chart.height,void 0!==c.chart.originalDevicePixelRatio&&c.chart.ctx.scale(1/c.chart.originalDevicePixelRatio,1/c.chart.originalDevicePixelRatio),d.style.width=c.chart.originalCanvasStyleWidth,d.style.height=c.chart.originalCanvasStyleHeight,a.plugins.notify("destroy",[c]),delete a.instances[c.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var b=this;b.tooltip=new a.Tooltip({_chart:b.chart,_chartInstance:b,_data:b.data,_options:b.options.tooltips},b)},bindEvents:function(){var a=this;b.bindEvents(a,a.options.events,function(b){a.eventHandler(b)})},updateHoverStyle:function(a,b,c){var d,e,f,g=c?"setHoverStyle":"removeHoverStyle";switch(b){case"single":a=[a[0]];break;case"label":case"dataset":break;default:return}for(e=0,f=a.length;f>e;++e)d=a[e],d&&this.getDatasetMeta(d._datasetIndex).controller[g](d)},eventHandler:function(a){var c=this,d=c.tooltip,e=c.options||{},f=e.hover,g=e.tooltips;return c.lastActive=c.lastActive||[],c.lastTooltipActive=c.lastTooltipActive||[],"mouseout"===a.type?(c.active=[],c.tooltipActive=[]):(c.active=c.getElementsAtEventForMode(a,f.mode),c.tooltipActive=c.getElementsAtEventForMode(a,g.mode)),f.onHover&&f.onHover.call(c,c.active),("mouseup"===a.type||"click"===a.type)&&(e.onClick&&e.onClick.call(c,a,c.active),c.legend&&c.legend.handleEvent&&c.legend.handleEvent(a)),c.lastActive.length&&c.updateHoverStyle(c.lastActive,f.mode,!1),c.active.length&&f.mode&&c.updateHoverStyle(c.active,f.mode,!0),(g.enabled||g.custom)&&(d.initialize(),d._active=c.tooltipActive,d.update(!0)),d.pivot(),c.animating||b.arrayEquals(c.active,c.lastActive)&&b.arrayEquals(c.tooltipActive,c.lastTooltipActive)||(c.stop(),(g.enabled||g.custom)&&d.update(!0),c.render(f.animationDuration,!0)),c.lastActive=c.active,c.lastTooltipActive=c.tooltipActive,c}})}},{}],23:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.DatasetController=function(a,b){this.initialize.call(this,a,b)},b.extend(a.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(a,b){var c=this;c.chart=a,c.index=b,c.linkScales(),c.addElements()},updateIndex:function(a){this.index=a},linkScales:function(){var a=this,b=a.getMeta(),c=a.getDataset();null===b.xAxisID&&(b.xAxisID=c.xAxisID||a.chart.options.scales.xAxes[0].id),null===b.yAxisID&&(b.yAxisID=c.yAxisID||a.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(a){return this.chart.scales[a]},reset:function(){this.update(!0)},createMetaDataset:function(){var a=this,b=a.datasetElementType;return b&&new b({_chart:a.chart.chart,_datasetIndex:a.index})},createMetaData:function(a){var b=this,c=b.dataElementType;return c&&new c({_chart:b.chart.chart,_datasetIndex:b.index,_index:a})},addElements:function(){var a,b,c=this,d=c.getMeta(),e=c.getDataset().data||[],f=d.data;for(a=0,b=e.length;b>a;++a)f[a]=f[a]||c.createMetaData(d,a);d.dataset=d.dataset||c.createMetaDataset()},addElementAndReset:function(a){var b=this,c=b.createMetaData(a);b.getMeta().data.splice(a,0,c),b.updateElement(c,a,!0)},buildOrUpdateElements:function(){var a=this.getMeta(),b=a.data,c=this.getDataset().data.length,d=b.length;if(d>c)b.splice(c,d-c);else if(c>d)for(var e=d;c>e;++e)this.addElementAndReset(e)},update:c,draw:function(a){var c=a||1;b.each(this.getMeta().data,function(a,b){a.transition(c).draw()})},removeHoverStyle:function(a,c){var d=this.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=b.getValueAtIndexOrDefault,h=(b.color,a._model);h.backgroundColor=f.backgroundColor?f.backgroundColor:g(d.backgroundColor,e,c.backgroundColor),h.borderColor=f.borderColor?f.borderColor:g(d.borderColor,e,c.borderColor),h.borderWidth=f.borderWidth?f.borderWidth:g(d.borderWidth,e,c.borderWidth)},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=b.getValueAtIndexOrDefault,g=(b.color,b.getHoverColor),h=a._model;h.backgroundColor=e.hoverBackgroundColor?e.hoverBackgroundColor:f(c.hoverBackgroundColor,d,g(h.backgroundColor)),h.borderColor=e.hoverBorderColor?e.hoverBorderColor:f(c.hoverBorderColor,d,g(h.borderColor)),h.borderWidth=e.hoverBorderWidth?e.hoverBorderWidth:f(c.hoverBorderWidth,d,h.borderWidth)}}),a.DatasetController.extend=b.inherits}},{}],24:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.elements={},a.Element=function(a){b.extend(this,a),this.initialize.apply(this,arguments)},b.extend(a.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var a=this;return a._view||(a._view=b.clone(a._model)),a._start=b.clone(a._view),a},transition:function(a){var c=this;return c._view||(c._view=b.clone(c._model)),1===a?(c._view=c._model,c._start=null,c):(c._start||c.pivot(),b.each(c._model,function(d,e){if("_"===e[0]);else if(c._view.hasOwnProperty(e))if(d===c._view[e]);else if("string"==typeof d)try{var f=b.color(c._model[e]).mix(b.color(c._start[e]),a);c._view[e]=f.rgbString()}catch(g){c._view[e]=d}else if("number"==typeof d){var h=void 0!==c._start[e]&&isNaN(c._start[e])===!1?c._start[e]:0;c._view[e]=(c._model[e]-h)*a+h}else c._view[e]=d;else"number"!=typeof d||isNaN(c._view[e])?c._view[e]=d:c._view[e]=d*a},c),c)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return b.isNumber(this._model.x)&&b.isNumber(this._model.y)}}),a.Element.extend=b.inherits}},{}],25:[function(a,b,c){"use strict";var d=a(3);b.exports=function(a){function b(a,b,c){var d;return"string"==typeof a?(d=parseInt(a,10),-1!=a.indexOf("%")&&(d=d/100*b.parentNode[c])):d=a,d}function c(a){return void 0!==a&&null!==a&&"none"!==a}function e(a,d,e){var f=document.defaultView,g=a.parentNode,h=f.getComputedStyle(a)[d],i=f.getComputedStyle(g)[d],j=c(h),k=c(i),l=Number.POSITIVE_INFINITY;return j||k?Math.min(j?b(h,a,e):l,k?b(i,g,e):l):"none"}var f=a.helpers={};f.each=function(a,b,c,d){var e,g;if(f.isArray(a))if(g=a.length,d)for(e=g-1;e>=0;e--)b.call(c,a[e],e);else for(e=0;g>e;e++)b.call(c,a[e],e);else if("object"==typeof a){var h=Object.keys(a);for(g=h.length,e=0;g>e;e++)b.call(c,a[h[e]],h[e])}},f.clone=function(a){var b={};return f.each(a,function(a,c){f.isArray(a)?b[c]=a.slice(0):"object"==typeof a&&null!==a?b[c]=f.clone(a):b[c]=a}),b},f.extend=function(a){for(var b=function(b,c){a[c]=b},c=1,d=arguments.length;d>c;c++)f.each(arguments[c],b);return a},f.configMerge=function(b){var c=f.clone(b);return f.each(Array.prototype.slice.call(arguments,1),function(b){f.each(b,function(b,d){if("scales"===d)c[d]=f.scaleMerge(c.hasOwnProperty(d)?c[d]:{},b);else if("scale"===d)c[d]=f.configMerge(c.hasOwnProperty(d)?c[d]:{},a.scaleService.getScaleDefaults(b.type),b);else if(c.hasOwnProperty(d)&&f.isArray(c[d])&&f.isArray(b)){var e=c[d];f.each(b,function(a,b){b=d[c].length||!d[c][e].type?d[c].push(f.configMerge(h,b)):b.type&&b.type!==d[c][e].type?d[c][e]=f.configMerge(d[c][e],h,b):d[c][e]=f.configMerge(d[c][e],b)}):(d[c]=[],f.each(b,function(b){var e=f.getValueOrDefault(b.type,"xAxes"===c?"category":"linear");d[c].push(f.configMerge(a.scaleService.getScaleDefaults(e),b))})):d.hasOwnProperty(c)&&"object"==typeof d[c]&&null!==d[c]&&"object"==typeof b?d[c]=f.configMerge(d[c],b):d[c]=b}),d},f.getValueAtIndexOrDefault=function(a,b,c){return void 0===a||null===a?c:f.isArray(a)?bc;++c)if(a[c]===b)return c;return-1},f.where=function(a,b){if(f.isArray(a)&&Array.prototype.filter)return a.filter(b);var c=[];return f.each(a,function(a){b(a)&&c.push(a)}),c},f.findIndex=Array.prototype.findIndex?function(a,b,c){return a.findIndex(b,c)}:function(a,b,c){c=void 0===c?a:c;for(var d=0,e=a.length;e>d;++d)if(b.call(c,a[d],d,a))return d;return-1},f.findNextWhere=function(a,b,c){(void 0===c||null===c)&&(c=-1);for(var d=c+1;d=0;d--){var e=a[d];if(b(e))return e}},f.inherits=function(a){var b=this,c=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return b.apply(this,arguments)},d=function(){this.constructor=c};return d.prototype=b.prototype,c.prototype=new d,c.extend=f.inherits,a&&f.extend(c.prototype,a),c.__super__=b.prototype,c},f.noop=function(){},f.uid=function(){var a=0;return function(){return a++}}(),f.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},f.almostEquals=function(a,b,c){return Math.abs(a-b)0?1:-1},f.log10=Math.log10?function(a){return Math.log10(a)}:function(a){return Math.log(a)/Math.LN10},f.toRadians=function(a){return a*(Math.PI/180)},f.toDegrees=function(a){return a*(180/Math.PI)},f.getAngleFromPoint=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=Math.sqrt(c*c+d*d),f=Math.atan2(d,c);return f<-.5*Math.PI&&(f+=2*Math.PI),{angle:f,distance:e}},f.aliasPixel=function(a){return a%2===0?0:.5},f.splineCurve=function(a,b,c,d){var e=a.skip?b:a,f=b,g=c.skip?b:c,h=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),i=Math.sqrt(Math.pow(g.x-f.x,2)+Math.pow(g.y-f.y,2)),j=h/(h+i),k=i/(h+i);j=isNaN(j)?0:j,k=isNaN(k)?0:k;var l=d*j,m=d*k;return{previous:{x:f.x-l*(g.x-e.x),y:f.y-l*(g.y-e.y)},next:{x:f.x+m*(g.x-e.x),y:f.y+m*(g.y-e.y)}}},f.nextItem=function(a,b,c){return c?b>=a.length-1?a[0]:a[b+1]:b>=a.length-1?a[a.length-1]:a[b+1]},f.previousItem=function(a,b,c){return c?0>=b?a[a.length-1]:a[b-1]:0>=b?a[0]:a[b-1]},f.niceNum=function(a,b){var c,d=Math.floor(f.log10(a)),e=a/Math.pow(10,d);return c=b?1.5>e?1:3>e?2:7>e?5:10:1>=e?1:2>=e?2:5>=e?5:10,c*Math.pow(10,d)};var g=f.easingEffects={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return(a/=.5)<1?.5*a*a:-.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var b=1.70158,c=0,d=1;return 0===a?0:1===(a/=1)?1:(c||(c=.3),da?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)):d*Math.pow(2,-10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)*.5+1)},easeInBack:function(a){var b=1.70158;return 1*(a/=1)*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return 1*((a=a/1-1)*a*((b+1)*a+b)+1)},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},easeInBounce:function(a){return 1-g.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):2/2.75>a?1*(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},easeInOutBounce:function(a){return.5>a?.5*g.easeInBounce(2*a):.5*g.easeOutBounce(2*a-1)+.5}};f.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),f.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1e3/60)}}(),f.getRelativePosition=function(a,b){var c,d,e=a.originalEvent||a,g=a.currentTarget||a.srcElement,h=g.getBoundingClientRect(),i=e.touches;i&&i.length>0?(c=i[0].clientX,d=i[0].clientY):(c=e.clientX,d=e.clientY);var j=parseFloat(f.getStyle(g,"padding-left")),k=parseFloat(f.getStyle(g,"padding-top")),l=parseFloat(f.getStyle(g,"padding-right")),m=parseFloat(f.getStyle(g,"padding-bottom")),n=h.right-h.left-j-l,o=h.bottom-h.top-k-m; return c=Math.round((c-h.left-j)/n*g.width/b.currentDevicePixelRatio),d=Math.round((d-h.top-k)/o*g.height/b.currentDevicePixelRatio),{x:c,y:d}},f.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},f.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=f.noop},f.bindEvents=function(a,b,c){var d=a.events=a.events||{};f.each(b,function(b){d[b]=function(){c.apply(a,arguments)},f.addEvent(a.chart.canvas,b,d[b])})},f.unbindEvents=function(a,b){var c=a.chart.canvas;f.each(b,function(a,b){f.removeEvent(c,b,a)})},f.getConstraintWidth=function(a){return e(a,"max-width","clientWidth")},f.getConstraintHeight=function(a){return e(a,"max-height","clientHeight")},f.getMaximumWidth=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-left"))+parseInt(f.getStyle(b,"padding-right")),d=b.clientWidth-c,e=f.getConstraintWidth(a);return isNaN(e)?d:Math.min(d,e)},f.getMaximumHeight=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-top"))+parseInt(f.getStyle(b,"padding-bottom")),d=b.clientHeight-c,e=f.getConstraintHeight(a);return isNaN(e)?d:Math.min(d,e)},f.getStyle=function(a,b){return a.currentStyle?a.currentStyle[b]:document.defaultView.getComputedStyle(a,null).getPropertyValue(b)},f.retinaScale=function(a){var b=a.ctx,c=a.canvas,d=c.width,e=c.height,f=a.currentDevicePixelRatio=window.devicePixelRatio||1;1!==f&&(c.height=e*f,c.width=d*f,b.scale(f,f),a.originalDevicePixelRatio=a.originalDevicePixelRatio||f),c.style.width=d+"px",c.style.height=e+"px"},f.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},f.fontString=function(a,b,c){return b+" "+a+"px "+c},f.longestText=function(a,b,c,d){d=d||{};var e=d.data=d.data||{},g=d.garbageCollect=d.garbageCollect||[];d.font!==b&&(e=d.data={},g=d.garbageCollect=[],d.font=b),a.font=b;var h=0;f.each(c,function(b){void 0!==b&&null!==b&&f.isArray(b)!==!0?h=f.measureText(a,e,g,h,b):f.isArray(b)&&f.each(b,function(b){void 0===b||null===b||f.isArray(b)||(h=f.measureText(a,e,g,h,b))})});var i=g.length/2;if(i>c.length){for(var j=0;i>j;j++)delete e[g[j]];g.splice(0,i)}return h},f.measureText=function(a,b,c,d,e){var f=b[e];return f||(f=b[e]=a.measureText(e).width,c.push(e)),f>d&&(d=f),d},f.numberOfLabelLines=function(a){var b=1;return f.each(a,function(a){f.isArray(a)&&a.length>b&&(b=a.length)}),b},f.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()},f.color=function(b){return d?d(b instanceof CanvasGradient?a.defaults.global.defaultColor:b):(console.log("Color.js not found!"),b)},f.addResizeListener=function(a,b){var c=document.createElement("iframe"),d="chartjs-hidden-iframe";c.classlist?c.classlist.add(d):c.setAttribute("class",d);var e=c.style;e.width="100%",e.display="block",e.border=0,e.height=0,e.margin=0,e.position="absolute",e.left=0,e.right=0,e.top=0,e.bottom=0,a.insertBefore(c,a.firstChild),(c.contentWindow||c).onresize=function(){b&&b()}},f.removeResizeListener=function(a){var b=a.querySelector(".chartjs-hidden-iframe");b&&b.parentNode.removeChild(b)},f.isArray=Array.isArray?function(a){return Array.isArray(a)}:function(a){return"[object Array]"===Object.prototype.toString.call(a)},f.arrayEquals=function(a,b){var c,d,e,g;if(!a||!b||a.length!=b.length)return!1;for(c=0,d=a.length;d>c;++c)if(e=a[c],g=b[c],e instanceof Array&&g instanceof Array){if(!f.arrayEquals(e,g))return!1}else if(e!=g)return!1;return!0},f.callCallback=function(a,b,c){a&&"function"==typeof a.call&&a.apply(c,b)},f.getHoverColor=function(a){return a instanceof CanvasPattern?a:f.color(a).saturate(.5).darken(.1).rgbString()}}},{3:3}],26:[function(a,b,c){"use strict";b.exports=function(){var a=function(b,c){var d=this,e=a.helpers;return d.config=c,b.length&&b[0].getContext&&(b=b[0]),b.getContext&&(b=b.getContext("2d")),d.ctx=b,d.canvas=b.canvas,b.canvas.style.display=b.canvas.style.display||"block",d.width=b.canvas.width||parseInt(e.getStyle(b.canvas,"width"),10)||e.getMaximumWidth(b.canvas),d.height=b.canvas.height||parseInt(e.getStyle(b.canvas,"height"),10)||e.getMaximumHeight(b.canvas),d.aspectRatio=d.width/d.height,(isNaN(d.aspectRatio)||isFinite(d.aspectRatio)===!1)&&(d.aspectRatio=void 0!==c.aspectRatio?c.aspectRatio:2),d.originalCanvasStyleWidth=b.canvas.style.width,d.originalCanvasStyleHeight=b.canvas.style.height,e.retinaScale(d),c&&(d.controller=new a.Controller(d)),e.addResizeListener(b.canvas.parentNode,function(){d.controller&&d.controller.config.options.responsive&&d.controller.resize()}),d.controller?d.controller:d};return a.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(a){var b=[];b.push('
      ');for(var c=0;c'),a.data.datasets[c].label&&b.push(a.data.datasets[c].label),b.push("");return b.push("
    "),b.join("")}}},a.Chart=a,a}},{}],27:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.layoutService={defaults:{},addBox:function(a,b){a.boxes||(a.boxes=[]),a.boxes.push(b)},removeBox:function(a,b){a.boxes&&a.boxes.splice(a.boxes.indexOf(b),1)},update:function(a,c,d){function e(a){var b,c=a.isHorizontal();c?(b=a.update(a.options.fullWidth?p:v,u),w-=b.height):(b=a.update(t,s),v-=b.width),x.push({horizontal:c,minSize:b,box:a})}function f(a){var c=b.findNextWhere(x,function(b){return b.box===a});if(c)if(a.isHorizontal()){var d={left:y,right:z,top:0,bottom:0};a.update(a.options.fullWidth?p:v,q/2,d)}else a.update(c.minSize.width,w)}function g(a){var c=b.findNextWhere(x,function(b){return b.box===a}),d={left:0,right:0,top:A,bottom:B};c&&a.update(c.minSize.width,w,d)}function h(a){a.isHorizontal()?(a.left=a.options.fullWidth?i:y,a.right=a.options.fullWidth?c-i:y+v,a.top=F,a.bottom=F+a.height,F=a.bottom):(a.left=E,a.right=E+a.width,a.top=A,a.bottom=A+w,E=a.right)}if(a){var i=0,j=0,k=b.where(a.boxes,function(a){return"left"===a.options.position}),l=b.where(a.boxes,function(a){return"right"===a.options.position}),m=b.where(a.boxes,function(a){return"top"===a.options.position}),n=b.where(a.boxes,function(a){return"bottom"===a.options.position}),o=b.where(a.boxes,function(a){return"chartArea"===a.options.position});m.sort(function(a,b){return(b.options.fullWidth?1:0)-(a.options.fullWidth?1:0)}),n.sort(function(a,b){return(a.options.fullWidth?1:0)-(b.options.fullWidth?1:0)});var p=c-2*i,q=d-2*j,r=p/2,s=q/2,t=(c-r)/(k.length+l.length),u=(d-s)/(m.length+n.length),v=p,w=q,x=[];b.each(k.concat(l,m,n),e);var y=i,z=i,A=j,B=j;b.each(k.concat(l),f),b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m.concat(n),f),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height}),b.each(k.concat(l),g),y=i,z=i,A=j,B=j,b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height});var C=d-A-B,D=c-y-z;(D!==v||C!==w)&&(b.each(k,function(a){a.height=C}),b.each(l,function(a){a.height=C}),b.each(m,function(a){a.options.fullWidth||(a.width=D)}),b.each(n,function(a){a.options.fullWidth||(a.width=D)}),w=C,v=D);var E=i,F=j;b.each(k.concat(m),h),E+=v,F+=w,b.each(l,h),b.each(n,h),a.chartArea={left:y,top:A,right:y+v,bottom:A+w},b.each(o,function(b){b.left=a.chartArea.left,b.top=a.chartArea.top,b.right=a.chartArea.right,b.bottom=a.chartArea.bottom,b.update(v,w)})}}}}},{}],28:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(a,b){var c=b.datasetIndex,d=this.chart,e=d.getDatasetMeta(c);e.hidden=null===e.hidden?!d.data.datasets[c].hidden:null,d.update()},labels:{boxWidth:40,padding:10,generateLabels:function(a){var c=a.data;return b.isArray(c.datasets)?c.datasets.map(function(c,d){return{text:c.label,fillStyle:b.isArray(c.backgroundColor)?c.backgroundColor[0]:c.backgroundColor,hidden:!a.isDatasetVisible(d),lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,datasetIndex:d}},this):[]}}},a.Legend=a.Element.extend({initialize:function(a){b.extend(this,a),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:c,update:function(a,b,c){var d=this;return d.beforeUpdate(),d.maxWidth=a,d.maxHeight=b,d.margins=c,d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeBuildLabels(),d.buildLabels(),d.afterBuildLabels(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:c,beforeSetDimensions:c,setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0,a.minSize={width:0,height:0}},afterSetDimensions:c,beforeBuildLabels:c,buildLabels:function(){var a=this;a.legendItems=a.options.labels.generateLabels.call(a,a.chart),a.options.reverse&&a.legendItems.reverse()},afterBuildLabels:c,beforeFit:c,fit:function(){var c=this,d=c.options,e=d.labels,f=d.display,g=c.ctx,h=a.defaults.global,i=b.getValueOrDefault,j=i(e.fontSize,h.defaultFontSize),k=i(e.fontStyle,h.defaultFontStyle),l=i(e.fontFamily,h.defaultFontFamily),m=b.fontString(j,k,l),n=c.legendHitBoxes=[],o=c.minSize,p=c.isHorizontal();if(p?(o.width=c.maxWidth,o.height=f?10:0):(o.width=f?10:0,o.height=c.maxHeight),f)if(g.font=m,p){var q=c.lineWidths=[0],r=c.legendItems.length?j+e.padding:0;g.textAlign="left",g.textBaseline="top",b.each(c.legendItems,function(a,b){var d=e.boxWidth+j/2+g.measureText(a.text).width;q[q.length-1]+d+e.padding>=c.width&&(r+=j+e.padding,q[q.length]=c.left),n[b]={left:0,top:0,width:d,height:j},q[q.length-1]+=d+e.padding}),o.height+=r}else{var s=e.padding,t=c.columnWidths=[],u=e.padding,v=0,w=0,x=j+s;b.each(c.legendItems,function(a,b){var c=e.boxWidth+j/2+g.measureText(a.text).width;w+x>o.height&&(u+=v+e.padding,t.push(v),v=0,w=0),v=Math.max(v,c),w+=x,n[b]={left:0,top:0,width:c,height:j}}),u+=v,t.push(v),o.width+=u}c.width=o.width,c.height=o.height},afterFit:c,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var c=this,d=c.options,e=d.labels,f=a.defaults.global,g=f.elements.line,h=c.width,i=(c.height,c.lineWidths);if(d.display){var j,k=c.ctx,l=b.getValueOrDefault,m=l(e.fontColor,f.defaultFontColor),n=l(e.fontSize,f.defaultFontSize),o=l(e.fontStyle,f.defaultFontStyle),p=l(e.fontFamily,f.defaultFontFamily),q=b.fontString(n,o,p);k.textAlign="left",k.textBaseline="top",k.lineWidth=.5,k.strokeStyle=m,k.fillStyle=m,k.font=q;var r=e.boxWidth,s=c.legendHitBoxes,t=function(a,b,c){k.save(),k.fillStyle=l(c.fillStyle,f.defaultColor),k.lineCap=l(c.lineCap,g.borderCapStyle),k.lineDashOffset=l(c.lineDashOffset,g.borderDashOffset),k.lineJoin=l(c.lineJoin,g.borderJoinStyle),k.lineWidth=l(c.lineWidth,g.borderWidth),k.strokeStyle=l(c.strokeStyle,f.defaultColor),k.setLineDash&&k.setLineDash(l(c.lineDash,g.borderDash)),k.strokeRect(a,b,r,n),k.fillRect(a,b,r,n),k.restore()},u=function(a,b,c,d){k.fillText(c.text,r+n/2+a,b),c.hidden&&(k.beginPath(),k.lineWidth=2,k.moveTo(r+n/2+a,b+n/2),k.lineTo(r+n/2+a+d,b+n/2),k.stroke())},v=c.isHorizontal();j=v?{x:c.left+(h-i[0])/2,y:c.top+e.padding,line:0}:{x:c.left+e.padding,y:c.top,line:0};var w=n+e.padding;b.each(c.legendItems,function(a,b){var d=k.measureText(a.text).width,f=r+n/2+d,g=j.x,l=j.y;v?g+f>=h&&(l=j.y+=n+e.padding,j.line++,g=j.x=c.left+(h-i[j.line])/2):l+w>c.bottom&&(g=j.x=g+c.columnWidths[j.line]+e.padding,l=j.y=c.top,j.line++),t(g,l,a),s[b].left=g,s[b].top=l,u(g,l,a,d),v?j.x+=f+e.padding:j.y+=w})}},handleEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart.chart),e=d.x,f=d.y,g=c.options;if(e>=c.left&&e<=c.right&&f>=c.top&&f<=c.bottom)for(var h=c.legendHitBoxes,i=0;i=j.left&&e<=j.left+j.width&&f>=j.top&&f<=j.top+j.height){g.onClick&&g.onClick.call(c,a,c.legendItems[i]);break}}}}),a.plugins.register({beforeInit:function(b){var c=b.options,d=c.legend;d&&(b.legend=new a.Legend({ctx:b.chart.ctx,options:d,chart:b}),a.layoutService.addBox(b,b.legend))}})}},{}],29:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers.noop;a.plugins={_plugins:[],register:function(a){var b=this._plugins;[].concat(a).forEach(function(a){-1===b.indexOf(a)&&b.push(a)})},unregister:function(a){var b=this._plugins;[].concat(a).forEach(function(a){var c=b.indexOf(a);-1!==c&&b.splice(c,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(a,b){var c,d,e=this._plugins,f=e.length;for(c=0;f>c;++c)if(d=e[c],"function"==typeof d[a]&&d[a].apply(d,b||[])===!1)return!1;return!0}},a.PluginBase=a.Element.extend({beforeInit:b,afterInit:b,beforeUpdate:b,afterUpdate:b,beforeDraw:b,afterDraw:b,destroy:b}),a.pluginService=a.plugins}},{}],30:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(a){return b.isArray(a)?a:""+a}}},a.Scale=a.Element.extend({beforeUpdate:function(){b.callCallback(this.options.beforeUpdate,[this])},update:function(a,c,d){var e=this;return e.beforeUpdate(),e.maxWidth=a,e.maxHeight=c,e.margins=b.extend({left:0,right:0,top:0,bottom:0},d),e.beforeSetDimensions(),e.setDimensions(),e.afterSetDimensions(),e.beforeDataLimits(),e.determineDataLimits(),e.afterDataLimits(),e.beforeBuildTicks(),e.buildTicks(),e.afterBuildTicks(),e.beforeTickToLabelConversion(),e.convertTicksToLabels(),e.afterTickToLabelConversion(),e.beforeCalculateTickRotation(),e.calculateTickRotation(),e.afterCalculateTickRotation(),e.beforeFit(),e.fit(),e.afterFit(),e.afterUpdate(),e.minSize},afterUpdate:function(){b.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){b.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0},afterSetDimensions:function(){b.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){b.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:b.noop,afterDataLimits:function(){b.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){b.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:b.noop,afterBuildTicks:function(){b.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){b.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var a=this;a.ticks=a.ticks.map(function(b,c,d){return a.options.ticks.userCallback?a.options.ticks.userCallback(b,c,d):a.options.ticks.callback(b,c,d)},a)},afterTickToLabelConversion:function(){b.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){b.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var c=this,d=c.ctx,e=a.defaults.global,f=c.options.ticks,g=b.getValueOrDefault(f.fontSize,e.defaultFontSize),h=b.getValueOrDefault(f.fontStyle,e.defaultFontStyle),i=b.getValueOrDefault(f.fontFamily,e.defaultFontFamily),j=b.fontString(g,h,i);d.font=j;var k,l=d.measureText(c.ticks[0]).width,m=d.measureText(c.ticks[c.ticks.length-1]).width;if(c.labelRotation=f.minRotation||0,c.paddingRight=0,c.paddingLeft=0,c.options.display&&c.isHorizontal()){c.paddingRight=m/2+3,c.paddingLeft=l/2+3,c.longestTextCache||(c.longestTextCache={});for(var n,o,p=b.longestText(d,j,c.ticks,c.longestTextCache),q=p,r=c.getPixelForTick(1)-c.getPixelForTick(0)-6;q>r&&c.labelRotationc.yLabelWidth&&(c.paddingLeft=k+g/2),c.paddingRight=g/2,o*p>c.maxHeight){c.labelRotation--;break}c.labelRotation++,q=n*p}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0))},afterCalculateTickRotation:function(){b.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){b.callCallback(this.options.beforeFit,[this])},fit:function(){var c=this,d=c.minSize={width:0,height:0},e=c.options,f=a.defaults.global,g=e.ticks,h=e.scaleLabel,i=e.display,j=c.isHorizontal(),k=b.getValueOrDefault(g.fontSize,f.defaultFontSize),l=b.getValueOrDefault(g.fontStyle,f.defaultFontStyle),m=b.getValueOrDefault(g.fontFamily,f.defaultFontFamily),n=b.fontString(k,l,m),o=b.getValueOrDefault(h.fontSize,f.defaultFontSize),p=b.getValueOrDefault(h.fontStyle,f.defaultFontStyle),q=b.getValueOrDefault(h.fontFamily,f.defaultFontFamily),r=(b.fontString(o,p,q),e.gridLines.tickMarkLength);if(j?d.width=c.isFullWidth()?c.maxWidth-c.margins.left-c.margins.right:c.maxWidth:d.width=i?r:0,j?d.height=i?r:0:d.height=c.maxHeight,h.display&&i&&(j?d.height+=1.5*o:d.width+=1.5*o),g.display&&i){c.longestTextCache||(c.longestTextCache={});var s=b.longestText(c.ctx,n,c.ticks,c.longestTextCache),t=b.numberOfLabelLines(c.ticks),u=.5*k;if(j){c.longestLabelWidth=s;var v=Math.sin(b.toRadians(c.labelRotation))*c.longestLabelWidth+k*t+u*t;d.height=Math.min(c.maxHeight,d.height+v),c.ctx.font=n;var w=c.ctx.measureText(c.ticks[0]).width,x=c.ctx.measureText(c.ticks[c.ticks.length-1]).width,y=Math.cos(b.toRadians(c.labelRotation)),z=Math.sin(b.toRadians(c.labelRotation));c.paddingLeft=0!==c.labelRotation?y*w+3:w/2+3,c.paddingRight=0!==c.labelRotation?z*(k/2)+3:x/2+3}else{var A=c.maxWidth-d.width,B=g.mirror;B?s=0:s+=c.options.ticks.padding,A>s?d.width+=s:d.width=c.maxWidth,c.paddingTop=k/2,c.paddingBottom=k/2}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingTop=Math.max(c.paddingTop-c.margins.top,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0),c.paddingBottom=Math.max(c.paddingBottom-c.margins.bottom,0)),c.width=d.width,c.height=d.height},afterFit:function(){b.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function c(a){return null===a||"undefined"==typeof a?NaN:"number"==typeof a&&isNaN(a)?NaN:"object"==typeof a?a instanceof Date||a.isValid?a:c(this.isHorizontal()?a.x:a.y):a},getLabelForIndex:b.noop,getPixelForValue:b.noop,getValueForPixel:b.noop,getPixelForTick:function(a,b){var c=this;if(c.isHorizontal()){var d=c.width-(c.paddingLeft+c.paddingRight),e=d/Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),f=e*a+c.paddingLeft;b&&(f+=e/2);var g=c.left+Math.round(f);return g+=c.isFullWidth()?c.margins.left:0}var h=c.height-(c.paddingTop+c.paddingBottom);return c.top+a*(h/(c.ticks.length-1))},getPixelForDecimal:function(a){var b=this;if(b.isHorizontal()){var c=b.width-(b.paddingLeft+b.paddingRight),d=c*a+b.paddingLeft,e=b.left+Math.round(d);return e+=b.isFullWidth()?b.margins.left:0}return b.top+a*b.height},getBasePixel:function(){var a=this,b=a.min,c=a.max;return a.getPixelForValue(a.beginAtZero?0:0>b&&0>c?c:b>0&&c>0?b:0)},draw:function(c){var d=this,e=d.options;if(e.display){var f,g,h=d.ctx,i=a.defaults.global,j=e.ticks,k=e.gridLines,l=e.scaleLabel,m=0!==d.labelRotation,n=j.autoSkip,o=d.isHorizontal();j.maxTicksLimit&&(g=j.maxTicksLimit);var p=b.getValueOrDefault(j.fontColor,i.defaultFontColor),q=b.getValueOrDefault(j.fontSize,i.defaultFontSize),r=b.getValueOrDefault(j.fontStyle,i.defaultFontStyle),s=b.getValueOrDefault(j.fontFamily,i.defaultFontFamily),t=b.fontString(q,r,s),u=k.tickMarkLength,v=b.getValueOrDefault(l.fontColor,i.defaultFontColor),w=b.getValueOrDefault(l.fontSize,i.defaultFontSize),x=b.getValueOrDefault(l.fontStyle,i.defaultFontStyle),y=b.getValueOrDefault(l.fontFamily,i.defaultFontFamily),z=b.fontString(w,x,y),A=b.toRadians(d.labelRotation),B=Math.cos(A),C=(Math.sin(A),d.longestLabelWidth*B);h.fillStyle=p;var D=[];if(o){if(f=!1,m&&(C/=2),(C+j.autoSkipPadding)*d.ticks.length>d.width-(d.paddingLeft+d.paddingRight)&&(f=1+Math.floor((C+j.autoSkipPadding)*d.ticks.length/(d.width-(d.paddingLeft+d.paddingRight)))),g&&d.ticks.length>g)for(;!f||d.ticks.length/(f||1)>g;)f||(f=1),f+=1;n||(f=!1)}var E="right"===e.position?d.left:d.right-u,F="right"===e.position?d.left+u:d.right,G="bottom"===e.position?d.top:d.bottom-u,H="bottom"===e.position?d.top+u:d.bottom;if(b.each(d.ticks,function(a,g){if(void 0!==a&&null!==a){var h=d.ticks.length===g+1,i=f>1&&g%f>0||g%f===0&&g+f>=d.ticks.length;if((!i||h)&&void 0!==a&&null!==a){var l,n;g===("undefined"!=typeof d.zeroLineIndex?d.zeroLineIndex:0)?(l=k.zeroLineWidth,n=k.zeroLineColor):(l=b.getValueAtIndexOrDefault(k.lineWidth,g),n=b.getValueAtIndexOrDefault(k.color,g));var p,q,r,s,t,v,w,x,y,z,B,C="middle";if(o){m||(C="top"===e.position?"bottom":"top"),B=m?"right":"center";var I=d.getPixelForTick(g)+b.aliasPixel(l);y=d.getPixelForTick(g,k.offsetGridLines)+j.labelOffset,z=m?d.top+12:"top"===e.position?d.bottom-u:d.top+u,p=r=t=w=I,q=G,s=H,v=c.top,x=c.bottom}else{"left"===e.position?j.mirror?(y=d.right+j.padding,B="left"):(y=d.right-j.padding,B="right"):j.mirror?(y=d.left-j.padding,B="right"):(y=d.left+j.padding,B="left");var J=d.getPixelForTick(g);J+=b.aliasPixel(l),z=d.getPixelForTick(g,k.offsetGridLines),p=E,r=F,t=c.left,w=c.right,q=s=v=x=J}D.push({tx1:p,ty1:q,tx2:r,ty2:s,x1:t,y1:v,x2:w,y2:x,labelX:y,labelY:z,glWidth:l,glColor:n,rotation:-1*A,label:a,textBaseline:C,textAlign:B})}}}),b.each(D,function(a){if(k.display&&(h.lineWidth=a.glWidth,h.strokeStyle=a.glColor,h.beginPath(),k.drawTicks&&(h.moveTo(a.tx1,a.ty1),h.lineTo(a.tx2,a.ty2)),k.drawOnChartArea&&(h.moveTo(a.x1,a.y1),h.lineTo(a.x2,a.y2)),h.stroke()),j.display){h.save(),h.translate(a.labelX,a.labelY),h.rotate(a.rotation),h.font=t,h.textBaseline=a.textBaseline,h.textAlign=a.textAlign;var c=a.label;if(b.isArray(c))for(var d=0,e=0;db;++b){var f=a[b];if(f&&f.hasValue()){var g=f.tooltipPosition();d.push(g.x),e.push(g.y)}}var h=0,i=0;for(b=0,c-d.length;c>b;++b)h+=d[b],i+=e[b];return{x:Math.round(h/d.length),y:Math.round(i/d.length)}}function d(a){var b=a._xScale,c=a._yScale||a._scale,d=a._index,e=a._datasetIndex;return{xLabel:b?b.getLabelForIndex(d,e):"",yLabel:c?c.getLabelForIndex(d,e):"",index:d,datasetIndex:e}}var e=a.helpers;a.defaults.global.tooltips={enabled:!0,custom:null,mode:"single",backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:e.noop,title:function(a,b){var c="",d=b.labels,e=d?d.length:0;if(a.length>0){var f=a[0];f.xLabel?c=f.xLabel:e>0&&f.indexb;++b)o.push(d(j[b]));h.itemSort&&(o=o.sort(h.itemSort)),j.length>1&&e.each(o,function(a){m.push(h.callbacks.labelColor.call(g,a,l))}),e.extend(i,{title:g.getTitle(o,k),beforeBody:g.getBeforeBody(o,k),body:g.getBody(o,k),afterBody:g.getAfterBody(o,k),footer:g.getFooter(o,k),x:Math.round(n.x),y:Math.round(n.y),caretPadding:e.getValueOrDefault(n.padding,2),labelColors:m});var p=g.getTooltipSize(i);g.determineAlignment(p),e.extend(i,g.getBackgroundPoint(i,p))}else g._model.opacity=0;return a&&h.custom&&h.custom.call(g,i),g},getTooltipSize:function(a){var b=this._chart.ctx,c={height:2*a.yPadding,width:0},d=a.body,f=d.reduce(function(a,b){return a+b.before.length+b.lines.length+b.after.length},0);f+=a.beforeBody.length+a.afterBody.length;var g=a.title.length,h=a.footer.length,i=a.titleFontSize,j=a.bodyFontSize,k=a.footerFontSize;c.height+=g*i,c.height+=(g-1)*a.titleSpacing,c.height+=g?a.titleMarginBottom:0,c.height+=f*j,c.height+=f?(f-1)*a.bodySpacing:0,c.height+=h?a.footerMarginTop:0,c.height+=h*k,c.height+=h?(h-1)*a.footerSpacing:0;var l=0,m=function(a){c.width=Math.max(c.width,b.measureText(a).width+l)};return b.font=e.fontString(i,a._titleFontStyle,a._titleFontFamily),e.each(a.title,m),b.font=e.fontString(j,a._bodyFontStyle,a._bodyFontFamily),e.each(a.beforeBody.concat(a.afterBody),m),l=d.length>1?j+2:0,e.each(d,function(a){e.each(a.before,m),e.each(a.lines,m),e.each(a.after,m)}),l=0,b.font=e.fontString(k,a._footerFontStyle,a._footerFontFamily), e.each(a.footer,m),c.width+=2*a.xPadding,c},determineAlignment:function(a){var b=this,c=b._model,d=b._chart,e=b._chartInstance.chartArea;c.yd.height-a.height&&(c.yAlign="bottom");var f,g,h,i,j,k=(e.left+e.right)/2,l=(e.top+e.bottom)/2;"center"===c.yAlign?(f=function(a){return k>=a},g=function(a){return a>k}):(f=function(b){return b<=a.width/2},g=function(b){return b>=d.width-a.width/2}),h=function(b){return b+a.width>d.width},i=function(b){return b-a.width<0},j=function(a){return l>=a?"top":"bottom"},f(c.x)?(c.xAlign="left",h(c.x)&&(c.xAlign="center",c.yAlign=j(c.y))):g(c.x)&&(c.xAlign="right",i(c.x)&&(c.xAlign="center",c.yAlign=j(c.y)))},getBackgroundPoint:function(a,b){var c={x:a.x,y:a.y},d=a.caretSize,e=a.caretPadding,f=a.cornerRadius,g=a.xAlign,h=a.yAlign,i=d+e,j=f+e;return"right"===g?c.x-=b.width:"center"===g&&(c.x-=b.width/2),"top"===h?c.y+=i:"bottom"===h?c.y-=b.height+i:c.y-=b.height/2,"center"===h?"left"===g?c.x+=i:"right"===g&&(c.x-=i):"left"===g?c.x-=j:"right"===g&&(c.x+=j),c},drawCaret:function(a,b,c,d){var f,g,h,i,j,k,l=this._view,m=this._chart.ctx,n=l.caretSize,o=l.cornerRadius,p=l.xAlign,q=l.yAlign,r=a.x,s=a.y,t=b.width,u=b.height;"center"===q?("left"===p?(f=r,g=f-n,h=f):(f=r+t,g=f+n,h=f),j=s+u/2,i=j-n,k=j+n):("left"===p?(f=r+o,g=f+n,h=g+n):"right"===p?(f=r+t-o,g=f-n,h=g-n):(g=r+t/2,f=g-n,h=g+n),"top"===q?(i=s,j=i-n,k=i):(i=s+u,j=i+n,k=i));var v=e.color(l.backgroundColor);m.fillStyle=v.alpha(c*v.alpha()).rgbString(),m.beginPath(),m.moveTo(f,i),m.lineTo(g,j),m.lineTo(h,k),m.closePath(),m.fill()},drawTitle:function(a,b,c,d){var f=b.title;if(f.length){c.textAlign=b._titleAlign,c.textBaseline="top";var g=b.titleFontSize,h=b.titleSpacing,i=e.color(b.titleFontColor);c.fillStyle=i.alpha(d*i.alpha()).rgbString(),c.font=e.fontString(g,b._titleFontStyle,b._titleFontFamily);var j,k;for(j=0,k=f.length;k>j;++j)c.fillText(f[j],a.x,a.y),a.y+=g+h,j+1===f.length&&(a.y+=b.titleMarginBottom-h)}},drawBody:function(a,b,c,d){var f=b.bodyFontSize,g=b.bodySpacing,h=b.body;c.textAlign=b._bodyAlign,c.textBaseline="top";var i=e.color(b.bodyFontColor),j=i.alpha(d*i.alpha()).rgbString();c.fillStyle=j,c.font=e.fontString(f,b._bodyFontStyle,b._bodyFontFamily);var k=0,l=function(b){c.fillText(b,a.x+k,a.y),a.y+=f+g};e.each(b.beforeBody,l);var m=h.length>1;k=m?f+2:0,e.each(h,function(g,h){e.each(g.before,l),e.each(g.lines,function(g){m&&(c.fillStyle=e.color(b.legendColorBackground).alpha(d).rgbaString(),c.fillRect(a.x,a.y,f,f),c.strokeStyle=e.color(b.labelColors[h].borderColor).alpha(d).rgbaString(),c.strokeRect(a.x,a.y,f,f),c.fillStyle=e.color(b.labelColors[h].backgroundColor).alpha(d).rgbaString(),c.fillRect(a.x+1,a.y+1,f-2,f-2),c.fillStyle=j),l(g)}),e.each(g.after,l)}),k=0,e.each(b.afterBody,l),a.y-=g},drawFooter:function(a,b,c,d){var f=b.footer;if(f.length){a.y+=b.footerMarginTop,c.textAlign=b._footerAlign,c.textBaseline="top";var g=e.color(b.footerFontColor);c.fillStyle=g.alpha(d*g.alpha()).rgbString(),c.font=e.fontString(b.footerFontSize,b._footerFontStyle,b._footerFontFamily),e.each(f,function(d){c.fillText(d,a.x,a.y),a.y+=b.footerFontSize+b.footerSpacing})}},draw:function(){var a=this._chart.ctx,b=this._view;if(0!==b.opacity){var c=this.getTooltipSize(b),d={x:b.x,y:b.y},f=Math.abs(b.opacity<.001)?0:b.opacity;if(this._options.enabled){var g=e.color(b.backgroundColor);a.fillStyle=g.alpha(f*g.alpha()).rgbString(),e.drawRoundedRectangle(a,d.x,d.y,c.width,c.height,b.cornerRadius),a.fill(),this.drawCaret(d,c,f,b.caretPadding),d.x+=b.xPadding,d.y+=b.yPadding,this.drawTitle(d,b,a,f),this.drawBody(d,b,a,f),this.drawFooter(d,b,a,f)}}}})}},{}],34:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.helpers,d=a.defaults.global;d.elements.arc={backgroundColor:d.defaultColor,borderColor:"#fff",borderWidth:2},a.elements.Arc=a.Element.extend({inLabelRange:function(a){var b=this._view;return b?Math.pow(a-b.x,2)i;)i+=2*Math.PI;for(;f>i;)f-=2*Math.PI;for(;h>f;)f+=2*Math.PI;var j=f>=h&&i>=f,k=g>=d.innerRadius&&g<=d.outerRadius;return j&&k}return!1},tooltipPosition:function(){var a=this._view,b=a.startAngle+(a.endAngle-a.startAngle)/2,c=(a.outerRadius-a.innerRadius)/2+a.innerRadius;return{x:a.x+Math.cos(b)*c,y:a.y+Math.sin(b)*c}},draw:function(){var a=this._chart.ctx,b=this._view,c=b.startAngle,d=b.endAngle;a.beginPath(),a.arc(b.x,b.y,b.outerRadius,c,d),a.arc(b.x,b.y,b.innerRadius,d,c,!0),a.closePath(),a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth,a.fillStyle=b.backgroundColor,a.fill(),a.lineJoin="bevel",b.borderWidth&&a.stroke()}})}},{}],35:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global;a.defaults.global.elements.line={tension:.4,backgroundColor:c.defaultColor,borderWidth:3,borderColor:c.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0},a.elements.Line=a.Element.extend({lineToNextPoint:function(a,b,c,d,e){var f=this,g=f._chart.ctx,h=f._view?f._view.spanGaps:!1;b._view.skip&&!h?d.call(f,a,b,c):a._view.skip&&!h?e.call(f,a,b,c):0===b._view.tension?g.lineTo(b._view.x,b._view.y):g.bezierCurveTo(a._view.controlPointNextX,a._view.controlPointNextY,b._view.controlPointPreviousX,b._view.controlPointPreviousY,b._view.x,b._view.y)},draw:function(){function a(a){g._view.skip||h._view.skip?a&&f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):f.bezierCurveTo(h._view.controlPointNextX,h._view.controlPointNextY,g._view.controlPointPreviousX,g._view.controlPointPreviousY,g._view.x,g._view.y)}var d=this,e=d._view,f=d._chart.ctx,g=d._children[0],h=d._children[d._children.length-1];f.save(),d._children.length>0&&e.fill&&(f.beginPath(),b.each(d._children,function(a,c){var g=b.previousItem(d._children,c),h=b.nextItem(d._children,c);0===c?(d._loop?f.moveTo(e.scaleZero.x,e.scaleZero.y):f.moveTo(a._view.x,e.scaleZero),a._view.skip?d._loop||f.moveTo(h._view.x,d._view.scaleZero):f.lineTo(a._view.x,a._view.y)):d.lineToNextPoint(g,a,h,function(a,b,c){d._loop?f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):(f.lineTo(a._view.x,d._view.scaleZero),f.moveTo(c._view.x,d._view.scaleZero))},function(a,b){f.lineTo(b._view.x,b._view.y)})},d),d._loop?a(!0):(f.lineTo(d._children[d._children.length-1]._view.x,e.scaleZero),f.lineTo(d._children[0]._view.x,e.scaleZero)),f.fillStyle=e.backgroundColor||c.defaultColor,f.closePath(),f.fill());var i=c.elements.line;f.lineCap=e.borderCapStyle||i.borderCapStyle,f.setLineDash&&f.setLineDash(e.borderDash||i.borderDash),f.lineDashOffset=e.borderDashOffset||i.borderDashOffset,f.lineJoin=e.borderJoinStyle||i.borderJoinStyle,f.lineWidth=e.borderWidth||i.borderWidth,f.strokeStyle=e.borderColor||c.defaultColor,f.beginPath(),b.each(d._children,function(a,c){var e=b.previousItem(d._children,c),g=b.nextItem(d._children,c);0===c?f.moveTo(a._view.x,a._view.y):d.lineToNextPoint(e,a,g,function(a,b,c){f.moveTo(c._view.x,c._view.y)},function(a,b){f.moveTo(b._view.x,b._view.y)})},d),d._loop&&d._children.length>0&&a(),f.stroke(),f.restore()}})}},{}],36:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global,d=c.defaultColor;c.elements.point={radius:3,pointStyle:"circle",backgroundColor:d,borderWidth:1,borderColor:d,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},a.elements.Point=a.Element.extend({inRange:function(a,b){var c=this._view;return c?Math.pow(a-c.x,2)+Math.pow(b-c.y,2)=m)){switch(k.strokeStyle=j.borderColor||d,k.lineWidth=b.getValueOrDefault(j.borderWidth,c.elements.point.borderWidth),k.fillStyle=j.backgroundColor||d,l){default:k.beginPath(),k.arc(n,o,m,0,2*Math.PI),k.closePath(),k.fill();break;case"triangle":k.beginPath(),e=3*m/Math.sqrt(3),h=e*Math.sqrt(3)/2,k.moveTo(n-e/2,o+h/3),k.lineTo(n+e/2,o+h/3),k.lineTo(n,o-2*h/3),k.closePath(),k.fill();break;case"rect":i=1/Math.SQRT2*m,k.fillRect(n-i,o-i,2*i,2*i),k.strokeRect(n-i,o-i,2*i,2*i);break;case"rectRot":i=1/Math.SQRT2*m,k.beginPath(),k.moveTo(n-i,o),k.lineTo(n,o+i),k.lineTo(n+i,o),k.lineTo(n,o-i),k.closePath(),k.fill();break;case"cross":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"crossRot":k.beginPath(),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"star":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"line":k.beginPath(),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"dash":k.beginPath(),k.moveTo(n,o),k.lineTo(n+m,o),k.closePath()}k.stroke()}}}})}},{}],37:[function(a,b,c){"use strict";b.exports=function(a){var b=(a.helpers,a.defaults.global);b.elements.rectangle={backgroundColor:b.defaultColor,borderWidth:0,borderColor:b.defaultColor,borderSkipped:"bottom"},a.elements.Rectangle=a.Element.extend({draw:function(){function a(a){return i[(k+a)%4]}var b=this._chart.ctx,c=this._view,d=c.width/2,e=c.x-d,f=c.x+d,g=c.base-(c.base-c.y),h=c.borderWidth/2;c.borderWidth&&(e+=h,f-=h,g+=h),b.beginPath(),b.fillStyle=c.backgroundColor,b.strokeStyle=c.borderColor,b.lineWidth=c.borderWidth;var i=[[e,c.base],[e,g],[f,g],[f,c.base]],j=["bottom","left","top","right"],k=j.indexOf(c.borderSkipped,0);-1===k&&(k=0),b.moveTo.apply(b,a(0));for(var l=1;4>l;l++)b.lineTo.apply(b,a(l));b.fill(),c.borderWidth&&b.stroke()},height:function(){var a=this._view;return a.base-a.y},inRange:function(a,b){var c=this._view;return c?c.y=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.y&&b<=c.base:a>=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.base&&b<=c.y:!1},inLabelRange:function(a){var b=this._view;return b?a>=b.x-b.width/2&&a<=b.x+b.width/2:!1},tooltipPosition:function(){var a=this._view;return{x:a.x,y:a.y}}})}},{}],38:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"bottom"},d=a.Scale.extend({determineDataLimits:function(){var a=this;a.minIndex=0,a.maxIndex=a.chart.data.labels.length-1;var c;void 0!==a.options.ticks.min&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.min),a.minIndex=-1!==c?c:a.minIndex),void 0!==a.options.ticks.max&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.max),a.maxIndex=-1!==c?c:a.maxIndex),a.min=a.chart.data.labels[a.minIndex],a.max=a.chart.data.labels[a.maxIndex]},buildTicks:function(a){var b=this;b.ticks=0===b.minIndex&&b.maxIndex===b.chart.data.labels.length-1?b.chart.data.labels:b.chart.data.labels.slice(b.minIndex,b.maxIndex+1)},getLabelForIndex:function(a,b){return this.ticks[a]},getPixelForValue:function(a,b,c,d){var e=this,f=Math.max(e.maxIndex+1-e.minIndex-(e.options.gridLines.offsetGridLines?0:1),1);if(e.isHorizontal()){var g=e.width-(e.paddingLeft+e.paddingRight),h=g/f,i=h*(b-e.minIndex)+e.paddingLeft;return e.options.gridLines.offsetGridLines&&d&&(i+=h/2),e.left+Math.round(i)}var j=e.height-(e.paddingTop+e.paddingBottom),k=j/f,l=k*(b-e.minIndex)+e.paddingTop;return e.options.gridLines.offsetGridLines&&d&&(l+=k/2),e.top+Math.round(l)},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticks[a],a+this.minIndex,null,b)},getValueForPixel:function(a){var b,c=this,d=Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),e=c.isHorizontal(),f=e?c.width-(c.paddingLeft+c.paddingRight):c.height-(c.paddingTop+c.paddingBottom),g=f/d;return c.options.gridLines.offsetGridLines&&(a-=g/2),a-=e?c.paddingLeft:c.paddingTop,b=0>=a?0:Math.round(a/g)}});a.scaleService.registerScaleType("category",d,c)}},{}],39:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=d.length>3?d[2]-d[1]:d[1]-d[0];Math.abs(e)>1&&a!==Math.floor(a)&&(e=a-Math.floor(a));var f=b.log10(Math.abs(e)),g="";if(0!==a){var h=-1*Math.floor(f);h=Math.max(Math.min(h,20),0),g=a.toFixed(h)}else g="0";return g}}},d=a.LinearScaleBase.extend({determineDataLimits:function(){function a(a){return h?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=(d.ticks,c.chart),f=e.data,g=f.datasets,h=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var i={},j=!1,k=!1;b.each(g,function(f,g){var h=e.getDatasetMeta(g);void 0===i[h.type]&&(i[h.type]={positiveValues:[],negativeValues:[]});var l=i[h.type].positiveValues,m=i[h.type].negativeValues;e.isDatasetVisible(g)&&a(h)&&b.each(f.data,function(a,b){var e=+c.getRightValue(a);isNaN(e)||h.data[b].hidden||(l[b]=l[b]||0,m[b]=m[b]||0,d.relativePoints?l[b]=100:0>e?(k=!0,m[b]+=e):(j=!0,l[b]+=e))})}),b.each(i,function(a){var d=a.positiveValues.concat(a.negativeValues),e=b.min(d),f=b.max(d);c.min=null===c.min?e:Math.min(c.min,e),c.max=null===c.max?f:Math.max(c.max,f)})}else b.each(g,function(d,f){var g=e.getDatasetMeta(f);e.isDatasetVisible(f)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});this.handleTickRangeOptions()},getTickLimit:function(){var c,d=this,e=d.options.ticks;if(d.isHorizontal())c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.width/50));else{var f=b.getValueOrDefault(e.fontSize,a.defaults.global.defaultFontSize);c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.height/(2*f)))}return c},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},getPixelForValue:function(a,b,c,d){var e,f,g=this,h=g.paddingLeft,i=g.paddingBottom,j=g.start,k=+g.getRightValue(a),l=g.end-j;return g.isHorizontal()?(f=g.width-(h+g.paddingRight),e=g.left+f/l*(k-j),Math.round(e+h)):(f=g.height-(g.paddingTop+i),e=g.bottom-i-f/l*(k-j),Math.round(e))},getValueForPixel:function(a){var b=this,c=b.isHorizontal(),d=b.paddingLeft,e=b.paddingBottom,f=c?b.width-(d+b.paddingRight):b.height-(b.paddingTop+e),g=(c?a-b.left-d:b.bottom-e-a)/f;return b.start+(b.end-b.start)*g},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticksAsNumbers[a],null,null,b)}});a.scaleService.registerScaleType("linear",d,c)}},{}],40:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.LinearScaleBase=a.Scale.extend({handleTickRangeOptions:function(){var a=this,c=a.options,d=c.ticks;if(d.beginAtZero){var e=b.sign(a.min),f=b.sign(a.max);0>e&&0>f?a.max=0:e>0&&f>0&&(a.min=0)}void 0!==d.min?a.min=d.min:void 0!==d.suggestedMin&&(a.min=Math.min(a.min,d.suggestedMin)),void 0!==d.max?a.max=d.max:void 0!==d.suggestedMax&&(a.max=Math.max(a.max,d.suggestedMax)),a.min===a.max&&(a.max++,d.beginAtZero||a.min--)},getTickLimit:c,handleDirectionalChanges:c,buildTicks:function(){var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=(a.isHorizontal(),a.ticks=[]),g=a.getTickLimit();g=Math.max(2,g);var h,i=d.fixedStepSize&&d.fixedStepSize>0||d.stepSize&&d.stepSize>0;if(i)h=e(d.fixedStepSize,d.stepSize);else{var j=b.niceNum(a.max-a.min,!1);h=b.niceNum(j/(g-1),!0)}var k=Math.floor(a.min/h)*h,l=Math.ceil(a.max/h)*h,m=(l-k)/h;m=b.almostEquals(m,Math.round(m),h/1e3)?Math.round(m):Math.ceil(m),f.push(void 0!==d.min?d.min:k);for(var n=1;m>n;++n)f.push(k+n*h);f.push(void 0!==d.max?d.max:l),a.handleDirectionalChanges(),a.max=b.max(f),a.min=b.min(f),d.reverse?(f.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){var b=this;b.ticksAsNumbers=b.ticks.slice(),b.zeroLineIndex=b.ticks.indexOf(0),a.Scale.prototype.convertTicksToLabels.call(b)}})}},{}],41:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(b.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?a.toExponential():""}}},d=a.Scale.extend({determineDataLimits:function(){function a(a){return j?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=d.ticks,f=c.chart,g=f.data,h=g.datasets,i=b.getValueOrDefault,j=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var k={};b.each(h,function(e,g){var h=f.getDatasetMeta(g);f.isDatasetVisible(g)&&a(h)&&(void 0===k[h.type]&&(k[h.type]=[]),b.each(e.data,function(a,b){var e=k[h.type],f=+c.getRightValue(a);isNaN(f)||h.data[b].hidden||(e[b]=e[b]||0,d.relativePoints?e[b]=100:e[b]+=f)}))}),b.each(k,function(a){var d=b.min(a),e=b.max(a);c.min=null===c.min?d:Math.min(c.min,d),c.max=null===c.max?e:Math.max(c.max,e)})}else b.each(h,function(d,e){var g=f.getDatasetMeta(e);f.isDatasetVisible(e)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});c.min=i(e.min,c.min),c.max=i(e.max,c.max),c.min===c.max&&(0!==c.min&&null!==c.min?(c.min=Math.pow(10,Math.floor(b.log10(c.min))-1),c.max=Math.pow(10,Math.floor(b.log10(c.max))+1)):(c.min=1,c.max=10))},buildTicks:function(){for(var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=a.ticks=[],g=e(d.min,Math.pow(10,Math.floor(b.log10(a.min))));ga.max&&(a.max=d))})}}),a.handleTickRangeOptions()},getTickLimit:function(){var a=this.options.ticks,d=b.getValueOrDefault(a.fontSize,c.defaultFontSize);return Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*d)))},convertTicksToLabels:function(){var b=this;a.LinearScaleBase.prototype.convertTicksToLabels.call(b),b.pointLabels=b.chart.data.labels.map(b.options.pointLabels.callback,b)},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},fit:function(){var a,d,e,f,g,h,i,j,k,l,m,n,o=this.options.pointLabels,p=b.getValueOrDefault(o.fontSize,c.defaultFontSize),q=b.getValueOrDefault(o.fontStyle,c.defaultFontStyle),r=b.getValueOrDefault(o.fontFamily,c.defaultFontFamily),s=b.fontString(p,q,r),t=b.min([this.height/2-p-5,this.width/2]),u=this.width,v=0;for(this.ctx.font=s,d=0;du&&(u=a.x+f,g=d),a.x-fu&&(u=a.x+e,g=d):d>this.getValueCount()/2&&a.x-eb&&0>c?c:b>0&&c>0?b:0)},draw:function(){var a=this,d=a.options,e=d.gridLines,f=d.ticks,g=d.angleLines,h=d.pointLabels,i=b.getValueOrDefault;if(d.display){var j=a.ctx,k=i(f.fontSize,c.defaultFontSize),l=i(f.fontStyle,c.defaultFontStyle),m=i(f.fontFamily,c.defaultFontFamily),n=b.fontString(k,l,m);if(b.each(a.ticks,function(g,h){if(h>0||d.reverse){var l=a.getDistanceFromCenterForValue(a.ticksAsNumbers[h]),m=a.yCenter-l;if(e.display&&0!==h)if(j.strokeStyle=b.getValueAtIndexOrDefault(e.color,h-1),j.lineWidth=b.getValueAtIndexOrDefault(e.lineWidth,h-1),d.lineArc)j.beginPath(),j.arc(a.xCenter,a.yCenter,l,0,2*Math.PI),j.closePath(),j.stroke();else{j.beginPath();for(var o=0;o=0;t--){if(g.display){var u=a.getPointPosition(t,o);j.beginPath(),j.moveTo(a.xCenter,a.yCenter),j.lineTo(u.x,u.y),j.stroke(),j.closePath()}var v=a.getPointPosition(t,o+5),w=i(h.fontColor,c.defaultFontColor);j.font=s,j.fillStyle=w;var x=a.pointLabels,y=x.length,z=x.length/2,A=z/2,B=A>t||t>y-A,C=t===A||t===y-A;0===t?j.textAlign="center":t===z?j.textAlign="center":z>t?j.textAlign="left":j.textAlign="right",C?j.textBaseline="middle":B?j.textBaseline="bottom":j.textBaseline="top",j.fillText(x[t]?x[t]:"",v.x,v.y)}}}}});a.scaleService.registerScaleType("radialLinear",e,d)}},{}],43:[function(a,b,c){"use strict";var d=a(1);d="function"==typeof d?d:window.moment,b.exports=function(a){var b=a.helpers,c={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},e={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},f=a.Scale.extend({initialize:function(){if(!d)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");a.Scale.prototype.initialize.call(this)},getLabelMoment:function(a,b){return this.labelMoments[a][b]},getMomentStartOf:function(a){var b=this;return"week"===b.options.time.unit&&b.options.time.isoWeekday!==!1?a.clone().startOf("isoWeek").isoWeekday(b.options.time.isoWeekday):a.clone().startOf(b.tickUnit)},determineDataLimits:function(){var a=this;a.labelMoments=[];var c=[];a.chart.data.labels&&a.chart.data.labels.length>0?(b.each(a.chart.data.labels,function(b,d){var e=a.parseTime(b);e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),c.push(e))},a),a.firstTick=d.min.call(a,c),a.lastTick=d.max.call(a,c)):(a.firstTick=null,a.lastTick=null),b.each(a.chart.data.datasets,function(e,f){var g=[],h=a.chart.isDatasetVisible(f);"object"==typeof e.data[0]&&null!==e.data[0]?b.each(e.data,function(b,c){var e=a.parseTime(a.getRightValue(b));e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),g.push(e),h&&(a.firstTick=null!==a.firstTick?d.min(a.firstTick,e):e,a.lastTick=null!==a.lastTick?d.max(a.lastTick,e):e))},a):g=c,a.labelMoments.push(g)},a),a.options.time.min&&(a.firstTick=a.parseTime(a.options.time.min)),a.options.time.max&&(a.lastTick=a.parseTime(a.options.time.max)),a.firstTick=(a.firstTick||d()).clone(),a.lastTick=(a.lastTick||d()).clone()},buildTicks:function(d){var e=this;e.ctx.save();var f=b.getValueOrDefault(e.options.ticks.fontSize,a.defaults.global.defaultFontSize),g=b.getValueOrDefault(e.options.ticks.fontStyle,a.defaults.global.defaultFontStyle),h=b.getValueOrDefault(e.options.ticks.fontFamily,a.defaults.global.defaultFontFamily),i=b.fontString(f,g,h);if(e.ctx.font=i,e.ticks=[],e.unitScale=1,e.scaleSizeInUnits=0,e.options.time.unit)e.tickUnit=e.options.time.unit||"day",e.displayFormat=e.options.time.displayFormats[e.tickUnit],e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,1);else{var j=e.isHorizontal()?e.width-(e.paddingLeft+e.paddingRight):e.height-(e.paddingTop+e.paddingBottom),k=e.tickFormatFunction(e.firstTick,0,[]),l=e.ctx.measureText(k).width,m=Math.cos(b.toRadians(e.options.ticks.maxRotation)),n=Math.sin(b.toRadians(e.options.ticks.maxRotation));l=l*m+f*n;var o=j/l;e.tickUnit="millisecond",e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.displayFormat=e.options.time.displayFormats[e.tickUnit];for(var p=0,q=c.units[p];p=Math.ceil(e.scaleSizeInUnits/o)){e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,q.steps[r]);break}break}if(q.maxStep===!1||Math.ceil(e.scaleSizeInUnits/o)=0)break;w%e.unitScale===0&&e.ticks.push(x)}var y=e.ticks[e.ticks.length-1].diff(e.lastTick,e.tickUnit);(0!==y||0===e.scaleSizeInUnits)&&(e.options.time.max?(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.ticks[0],e.tickUnit,!0)):(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0))),e.ctx.restore()},getLabelForIndex:function(a,b){var c=this,d=c.chart.data.labels&&a"+$.i18n("totals")+": "+b.formatNumber(b.outputData.sum)+"\n ("+b.formatNumber(Math.round(b.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",pageLimit:500,sources:{category:{placeholder:"https://en.wikipedia.org/wiki/Category:Folk_musicians_from_New_York",type:"text"},pagepile:{placeholder:"12345",type:"number"},transclusions:{placeholder:"https://en.wikipedia.org/wiki/Template:Infobox_Olympic_games",type:"text"},quarry:{placeholder:"12345",type:"number"}},platformSelector:"#platform_select",sourceButton:"#source_button",sourceInput:"#source_input",formStates:["initial","processing","complete","invalid"],timestampFormat:"YYYYMMDD00",validParams:{direction:["-1","1"],sort:["title","views","original"],source:["pagepile","category","transclusions","quarry"],view:["list","chart"],subjectpage:["0","1"]}};b.exports=d},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function a(a,b){for(var c=0;c"),$(this.config.sourceInput).prop("type",this.config.sources[b].type).prop("placeholder",this.config.sources[b].placeholder).val(""),"category"===b?$(".category-subject-toggle").show():$(".category-subject-toggle").hide(),"quarry"===b?($(".massviews-source-input").addClass("quarry"),$(".quarry-project").prop("disabled",!1)):($(".massviews-source-input").removeClass("quarry"),$(".quarry-project").prop("disabled",!0)),$(this.config.sourceInput).focus()}},{key:"getParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],b={platform:$(this.config.platformSelector).val(),agent:$(this.config.agentSelector).val(),source:$(this.config.sourceButton).data("value"),target:$(this.config.sourceInput).val().score()};return this.specialRange&&!a?b.range=this.specialRange.range:(b.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),b.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),"category"===b.source?b.subjectpage=$(".category-subject-toggle--input").is(":checked")?"1":"0":"quarry"===b.source&&(b.project=$(".quarry-project").val()),a||(b.sort=this.sort,b.direction=this.direction,b.view=this.view),b}},{key:"pushParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(window.history&&window.history.replaceState){if(a)return history.replaceState(null,document.title,location.href.split("?")[0]);window.history.replaceState({},document.title,"?"+$.param(this.getParams())),$(".permalink").prop("href","/massviews?"+$.param(this.getPermaLink()))}}},{key:"renderData",value:function(){var a=this;i(Object.getPrototypeOf(b.prototype),"renderData",this).call(this,function(b){$(".output-totals").html(""+$.i18n("totals")+"\n "+$.i18n("num-pages",b.length)+"\n "+a.formatNumber(a.outputData.sum)+"\n "+a.formatNumber(Math.round(a.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),b.forEach(function(b,c){$("#output_list").append("\n "+(c+1)+'\n '+b.label.descore()+'\n "+a.formatNumber(b.sum)+"\n "+a.formatNumber(Math.round(b.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(a,b){switch(b){case"original":return a.index;case"title":return a.label;case"views":return Number(a.sum)}}},{key:"getPageViewsData",value:function(a,b){var c=this,d=this.daterangepicker.startDate.startOf("day"),e=this.daterangepicker.endDate.startOf("day"),f=$.Deferred(),g=[],h=0,i=void 0,j={},k=b.length,l=[],m=[],n=function p(b){var n=encodeURIComponent(b),o="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+a+("/"+$(c.config.platformSelector).val()+"/"+$(c.config.agentSelector).val()+"/"+n+"/daily")+("/"+d.format(c.config.timestampFormat)+"/"+e.format(c.config.timestampFormat)),q=$.ajax({url:o,dataType:"json"});g.push(q),q.done(function(a){m.push({title:b,items:a.items})}).fail(function(d){var e="Error in Cassandra table storage backend"===d.responseJSON.title;return e&&(j[a]?j[a]++:j[a]=1,j[a]<3)?(k++,c.rateLimit(p,100,c)(b)):(e?l.push(b):c.writeMessage(c.getPageLink(b,a)+": "+$.i18n("api-error","Pageviews API")+" - "+d.responseJSON.title),void(i=!0))}).always(function(){c.updateProgressBar(++h/k*100),h===k&&(f.resolve(m),l.length&&c.writeMessage($.i18n("api-error-timeout","
      "+l.map(function(b){return"
    • "+c.getPageLink(b,a)+"
    • "}).join("")+"
    ")),i||simpleStorage.set(c.getCacheKey(),!0,{TTL:6e5}))})},o=this.isRequestCached()?n:this.rateLimit(n,100,this);return b.forEach(function(a,b){o(a)}),f}},{key:"buildMotherDataset",value:function(a,b,c){var d=this;this.outputData={labels:this.getDateHeadings(!0),link:b,listData:[]};var e=moment(this.daterangepicker.startDate),f=moment(this.daterangepicker.endDate),h=this.numDaysInRange(),i=new Array(h).fill(0),j=[];c.forEach(function(a,b){var c=a.items.map(function(a){return a.views}),k=c.reduce(function(a,b){return a+b});d.outputData.listData.push({data:c,label:a.title,sum:k,average:k/h,index:b});var l=d.fillInZeros(a.items,e,f),m=g(l,2),n=m[0],o=m[1];o.forEach(function(a){j.includes(a)||j.push(a)}),i=i.map(function(a,b){return a+n[b].views})});var k=i.reduce(function(a,b){return(a||0)+(b||0)});if(Object.assign(this.outputData,{datasets:[{label:a,data:i,sum:k,average:k/h}],datesWithoutData:j,sum:k,average:k/h}),j.length){var l=j.map(function(a){return moment(a).format(d.dateFormat)});this.writeMessage($.i18n("api-incomplete-data",l.sort().join(" · "),l.length))}return this.outputData}},{key:"getPileURL",value:function(a){return"http://tools.wmflabs.org/pagepile/api.php?action=get_data&id="+a}},{key:"getPileLink",value:function(a){return"Page Pile "+a+""}},{key:"getPagePile",value:function(a){var b=this,c=$.Deferred(),d="https://tools.wmflabs.org/pagepile/api.php?id="+a+"&action=get_data&format=json&metadata=1";return $.ajax({url:d,dataType:"jsonp"}).done(function(d){var e=Object.keys(d.pages);return e.length>500&&(b.writeMessage($.i18n("massviews-oversized-set",b.getPileLink(a),b.formatNumber(e.length),b.config.pageLimit)),e=e.slice(0,b.config.pageLimit)),c.resolve({id:d.id,wiki:d.wiki,pages:e})}).fail(function(d){return c.reject(b.getPileLink(a)+": "+$.i18n("api-error-no-data"))}),c}},{key:"getWikiPageFromURL",value:function(a){var b=void 0;return b=a.includes("?")?a.match(/\/\/(.*?)\/w\/.*\?(?:.*\b)?title=(.*?)(?:&|$)/):a.match(/\/\/(.*?)\/wiki\/(.*?)(?:\?|$)/),b?b.slice(1):[null,null]}},{key:"popParams",value:function(){var a=this,b=void 0,c=void 0,d=this.parseQueryString();if(this.patchUsage("mv"),d.overflow&&"pagepile"===d.source&&d.target&&this.addSiteNotice("info",$.i18n("massviews-redirect",$.i18n("title"),10,this.getPileLink(d.target)),"",!0),d.range)this.setSpecialRange(d.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(d.start){if(b=moment(d.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(d.end||Date.now()),bc)return void this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0);this.daterangepicker.setStartDate(b),this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);$(this.config.platformSelector).val(d.platform||"all-access"),$(this.config.agentSelector).val(d.agent||"user"),["sort","direction","view","source","subjectpage"].forEach(function(b){var c=d[b];c&&a.config.validParams[b].includes(c)?(d[b]=c,a[b]=c):(d[b]=a.config.defaults.params[b],a[b]=a.config.defaults.params[b])}),"quarry"===d.source&&(d.project?$(".quarry-project").val(d.project):delete d.target),"1"===d.subjectpage&&$(".category-subject-toggle--input").prop("checked",!0),this.updateSourceInput($(".source-option[data-value="+d.source+"]")[0]),d.target?($(this.config.sourceInput).val(decodeURIComponent(d.target).descore()),this.processInput()):this.setState("initial")}},{key:"setState",value:function(a,b){switch($("main").removeClass(this.config.formStates.join(" ")).addClass(a),a){case"initial":this.clearMessages(),this.assignDefaults(),this.destroyChart(),$("output").removeClass("list-mode").removeClass("chart-mode"),$(".data-links").addClass("invisible"),this.typeahead&&this.typeahead.hide(),$(this.config.sourceInput).val("").focus(),"function"==typeof b&&b.call(this);break;case"processing":this.processStarted(),this.clearMessages(),document.activeElement.blur(),$(".progress-bar").addClass("active");break;case"complete":this.processEnded(),this.updateProgressBar(0),$(".progress-bar").removeClass("active"),$(".data-links").removeClass("invisible");break;case"invalid":}}},{key:"processPagePile",value:function(a){var b=this,c=$(this.config.sourceInput).val();this.getPagePile(c).done(function(d){return d.pages.length?(b.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4}),b.sourceProject=k[d.wiki],"en.wikipedia.org"===b.sourceProject&&(d.pages=d.pages.map(function(a){return a.replace(/^Project:Wikipedia:/,"Wikipedia:")})),void b.getPageViewsData(b.sourceProject,d.pages).done(function(c){var e="Page Pile #"+d.id;$(".output-title").text(e).prop("href",b.getPileURL(d.id)),$(".output-params").html("\n "+$(b.config.dateRangeSelector).val()+'\n —\n '+b.sourceProject.replace(/.org$/,"").escape()+"\n "),b.buildMotherDataset(e,b.getPileLink(d.id),c),a()})):b.setState("initial",function(){b.writeMessage($.i18n("massviews-empty-set",b.getPileLink(c)))})}).fail(function(a){b.setState("initial"),"string"==typeof a?b.writeMessage(a):b.writeMessage($.i18n("api-error-unknown","Page Pile"))})}},{key:"processCategory",value:function(a){var b=this,c=this.getWikiPageFromURL($(this.config.sourceInput).val()),d=g(c,2),e=d[0],f=d[1];if(this.validateProject(e)){if(!f)return this.setState("initial",function(){b.writeMessage($.i18n("invalid-category-url"))});var h={action:"query",format:"json",list:"categorymembers",cmlimit:500,cmtitle:decodeURIComponent(f),prop:"categoryinfo",titles:decodeURIComponent(f)};$(".category-subject-toggle--input").is(":checked")&&(h.meta="siteinfo",h.siprop="namespaces");var i=$.ajax({url:"https://"+e+"/w/api.php",jsonp:"callback",dataType:"jsonp",data:h}),j=this.getPageLink(decodeURIComponent(f),e);this.sourceProject=e,i.done(function(c){if(c.error)return b.setState("initial",function(){b.writeMessage($.i18n("api-error","Category API")+": "+c.error.info.escape())});var d=Object.keys(c.query.pages)[0];if("-1"===d)return b.setState("initial",function(){b.writeMessage($.i18n("api-error-no-data"))});var g=c.query.pages[d].categoryinfo.size,h=c.query.namespaces,i=c.query.categorymembers;if(!i.length)return b.setState("initial",function(){b.writeMessage($.i18n("massviews-empty-set",j))});g>b.config.pageLimit&&(b.writeMessage($.i18n("massviews-oversized-set",j,b.formatNumber(g),b.config.pageLimit)),i=i.slice(0,b.config.pageLimit)),g>10&&b.setThrottle();var k=b.mapCategoryPageNames(i,h);b.getPageViewsData(e,k).done(function(c){$(".output-title").html(j),$(".output-params").html($(b.config.dateRangeSelector).val()),b.buildMotherDataset(f,j,c),a()})}).fail(function(a){b.setState("initial"),a&&"string"==typeof a.error?b.writeMessage($.i18n("api-error",j+": "+a.error)):b.writeMessage($.i18n("api-error-unknown",j))})}}},{key:"processTemplate",value:function(a){var b=this,c=this.getWikiPageFromURL($(this.config.sourceInput).val()),d=g(c,2),e=d[0],f=d[1];if(this.validateProject(e)){if(!f)return this.setState("initial",function(){b.writeMessage($.i18n("invalid-template-url"))});var h=$.ajax({url:"https://"+e+"/w/api.php",jsonp:"callback",dataType:"jsonp",data:{action:"query",format:"json",tilimit:500,titles:decodeURIComponent(f),prop:"transcludedin"}}),i=this.getPageLink(decodeURIComponent(f),e);this.sourceProject=e,h.done(function(c){if(c.error)return b.setState("initial",function(){b.writeMessage($.i18n("api-error","Transclusion API")+": "+c.error.info.escape())});var d=Object.keys(c.query.pages)[0];if("-1"===d)return b.setState("initial",function(){b.writeMessage($.i18n("api-error-no-data"))});var g=c.query.pages[d].transcludedin.map(function(a){return a.title});return g.length?(c["continue"]&&b.writeMessage($.i18n("massviews-oversized-set-unknown",i,500)),g.length>10&&b.setThrottle(),void b.getPageViewsData(e,g).done(function(c){$(".output-title").html(i),$(".output-params").html($(b.config.dateRangeSelector).val()),b.buildMotherDataset(f,i,c),a()})):b.setState("initial",function(){b.writeMessage($.i18n("massviews-empty-set",i))})}).fail(function(a){b.setState("initial"),a&&"string"==typeof a.error?b.writeMessage($.i18n("api-error",i+": "+a.error)):b.writeMessage($.i18n("api-error-unknown",i))})}}},{key:"processQuarry",value:function(a){var b=this,c=$(".quarry-project").val(),d=$(this.config.sourceInput).val();if(this.validateProject(c)){var e="https://quarry.wmflabs.org/query/"+d+"/result/latest/0/json",f="Quarry "+d+"";$.getJSON(e).done(function(e){var g=e.headers.indexOf("page_title");if(-1===g)return b.setState("initial"),b.writeMessage($.i18n("invalid-quarry-dataset","page_title"));var h=e.rows.map(function(a){return a[g]});h.length>500&&(b.writeMessage($.i18n("massviews-oversized-set",f,b.formatNumber(h.length),b.config.pageLimit)),h=h.slice(0,b.config.pageLimit)),h.length>10&&b.setThrottle(),b.getPageViewsData(c,h).done(function(c){$(".output-title").html(f),$(".output-params").html($(b.config.dateRangeSelector).val()),b.buildMotherDataset(d,f,c),a()})}).error(function(a){return b.setState("initial"),b.writeMessage($.i18n("api-error-unknown","Quarry API"),!0)})}}},{key:"validateProject",value:function(a){return a?(a=a.replace(/^www\./,""),l.includes(a)?!0:(this.setState("initial"),this.writeMessage($.i18n("invalid-project",""+a.escape()+""),!0),!1)):!0}},{key:"mapCategoryPageNames",value:function(a,b){var c=[];return a.forEach(function(a){if(b&&a.ns%2===1){var d=b[a.ns].canonical,e=b[a.ns-1].canonical||"";c.push(a.title.replace(d,e).replace(/^\:/,""))}else c.push(a.title)}),c}},{key:"processInput",value:function(){var a=this;if(!this.isRequestCached()&&simpleStorage.hasKey("pageviews-throttle")){var b=Math.round(simpleStorage.getTTL("pageviews-throttle")/1e3);if(b>0)return this.writeMessage($.i18n("api-throttle-wait",""+b+"",'phab:T124314'),!0)}this.setState("processing");var c=function(){a.updateProgressBar(100),a.setInitialChartType(),a.renderData()};switch($("#source_button").data("value")){case"pagepile":this.processPagePile(c);break;case"category":this.processCategory(c);break;case"transclusions":this.processTemplate(c);break;case"quarry":this.processQuarry(c)}}},{key:"exportCSV",value:function(){var a="data:text/csv;charset=utf-8,Title,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(b){var c='"'+b.label.descore().replace(/"/g,'""')+'"';a+=[c].concat(b.data).join(",")+"\n"}),this.downloadData(a,"csv")}},{key:"baseProject",get:function(){return this.project.split(".")[1]}}]),b}(mix(m)["with"](n,o));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new p})},{"../shared/chart_helpers":3,"../shared/list_helpers":5,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
      "+i.map(function(a){return"
    • "+b.getPageLink(a,b.project.escape())+"
    • "}).join("")+"
    ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
  • "+a+"
  • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
      "+c+"
    "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],6:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],7:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
    "+a+"
    ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":8}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],9:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org", +sort:"views",source:"category",sourceProject:"",direction:1,outputData:[],total:0,view:"list",subjectpage:0}},linearLegend:function(a,b){return""+$.i18n("totals")+": "+b.formatNumber(b.outputData.sum)+"\n ("+b.formatNumber(Math.round(b.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",pageLimit:500,sources:{category:{placeholder:"https://en.wikipedia.org/wiki/Category:Folk_musicians_from_New_York",type:"text"},pagepile:{placeholder:"12345",type:"number"},transclusions:{placeholder:"https://en.wikipedia.org/wiki/Template:Infobox_Olympic_games",type:"text"},quarry:{placeholder:"12345",type:"number"}},platformSelector:"#platform_select",sourceButton:"#source_button",sourceInput:"#source_input",formStates:["initial","processing","complete","invalid"],timestampFormat:"YYYYMMDD00",validParams:{direction:["-1","1"],sort:["title","views","original"],source:["pagepile","category","transclusions","quarry"],view:["list","chart"],subjectpage:["0","1"]}};b.exports=d},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function a(a,b){for(var c=0;c"),$(this.config.sourceInput).prop("type",this.config.sources[b].type).prop("placeholder",this.config.sources[b].placeholder).val(""),"category"===b?$(".category-subject-toggle").show():$(".category-subject-toggle").hide(),"quarry"===b?($(".massviews-source-input").addClass("quarry"),$(".quarry-project").prop("disabled",!1)):($(".massviews-source-input").removeClass("quarry"),$(".quarry-project").prop("disabled",!0)),$(this.config.sourceInput).focus()}},{key:"getParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],b={platform:$(this.config.platformSelector).val(),agent:$(this.config.agentSelector).val(),source:$(this.config.sourceButton).data("value"),target:$(this.config.sourceInput).val().score()};return this.specialRange&&!a?b.range=this.specialRange.range:(b.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),b.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),"category"===b.source?b.subjectpage=$(".category-subject-toggle--input").is(":checked")?"1":"0":"quarry"===b.source&&(b.project=$(".quarry-project").val()),a||(b.sort=this.sort,b.direction=this.direction,b.view=this.view),b}},{key:"pushParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(window.history&&window.history.replaceState){if(a)return history.replaceState(null,document.title,location.href.split("?")[0]);window.history.replaceState({},document.title,"?"+$.param(this.getParams())),$(".permalink").prop("href","/massviews?"+$.param(this.getPermaLink()))}}},{key:"renderData",value:function(){var a=this;i(Object.getPrototypeOf(b.prototype),"renderData",this).call(this,function(b){$(".output-totals").html(""+$.i18n("totals")+"\n "+$.i18n("num-pages",b.length)+"\n "+a.formatNumber(a.outputData.sum)+"\n "+a.formatNumber(Math.round(a.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),b.forEach(function(b,c){$("#output_list").append("\n "+(c+1)+'\n '+b.label.descore()+'\n "+a.formatNumber(b.sum)+"\n "+a.formatNumber(Math.round(b.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(a,b){switch(b){case"original":return a.index;case"title":return a.label;case"views":return Number(a.sum)}}},{key:"getPageViewsData",value:function(a,b){var c=this,d=this.daterangepicker.startDate.startOf("day"),e=this.daterangepicker.endDate.startOf("day"),f=$.Deferred(),g=[],h=0,i=void 0,j={},k=b.length,l=[],m=[],n=function p(b){var n=encodeURIComponent(b),o="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+a+("/"+$(c.config.platformSelector).val()+"/"+$(c.config.agentSelector).val()+"/"+n+"/daily")+("/"+d.format(c.config.timestampFormat)+"/"+e.format(c.config.timestampFormat)),q=$.ajax({url:o,dataType:"json"});g.push(q),q.done(function(a){m.push({title:b,items:a.items})}).fail(function(d){var e="Error in Cassandra table storage backend"===d.responseJSON.title;return e&&(j[a]?j[a]++:j[a]=1,j[a]<3)?(k++,c.rateLimit(p,100,c)(b)):(e?l.push(b):c.writeMessage(c.getPageLink(b,a)+": "+$.i18n("api-error","Pageviews API")+" - "+d.responseJSON.title),void(i=!0))}).always(function(){c.updateProgressBar(++h/k*100),h===k&&(f.resolve(m),l.length&&c.writeMessage($.i18n("api-error-timeout","
      "+l.map(function(b){return"
    • "+c.getPageLink(b,a)+"
    • "}).join("")+"
    ")),i||simpleStorage.set(c.getCacheKey(),!0,{TTL:6e5}))})},o=this.isRequestCached()?n:this.rateLimit(n,100,this);return b.forEach(function(a,b){o(a)}),f}},{key:"buildMotherDataset",value:function(a,b,c){var d=this;this.outputData={labels:this.getDateHeadings(!0),link:b,listData:[]};var e=moment(this.daterangepicker.startDate),f=moment(this.daterangepicker.endDate),h=this.numDaysInRange(),i=new Array(h).fill(0),j=[];c.forEach(function(a,b){var c=a.items.map(function(a){return a.views}),k=c.reduce(function(a,b){return a+b});d.outputData.listData.push({data:c,label:a.title,sum:k,average:k/h,index:b});var l=d.fillInZeros(a.items,e,f),m=g(l,2),n=m[0],o=m[1];o.forEach(function(a){j.includes(a)||j.push(a)}),i=i.map(function(a,b){return a+n[b].views})});var k=i.reduce(function(a,b){return(a||0)+(b||0)});if(Object.assign(this.outputData,{datasets:[{label:a,data:i,sum:k,average:k/h}],datesWithoutData:j,sum:k,average:k/h}),j.length){var l=j.map(function(a){return moment(a).format(d.dateFormat)});this.writeMessage($.i18n("api-incomplete-data",l.sort().join(" · "),l.length))}return this.outputData}},{key:"getPileURL",value:function(a){return"http://tools.wmflabs.org/pagepile/api.php?action=get_data&id="+a}},{key:"getPileLink",value:function(a){return"Page Pile "+a+""}},{key:"getPagePile",value:function(a){var b=this,c=$.Deferred(),d="https://tools.wmflabs.org/pagepile/api.php?id="+a+"&action=get_data&format=json&metadata=1";return $.ajax({url:d,dataType:"jsonp"}).done(function(d){var e=Object.keys(d.pages);return e.length>500&&(b.writeMessage($.i18n("massviews-oversized-set",b.getPileLink(a),b.formatNumber(e.length),b.config.pageLimit)),e=e.slice(0,b.config.pageLimit)),c.resolve({id:d.id,wiki:d.wiki,pages:e})}).fail(function(d){return c.reject(b.getPileLink(a)+": "+$.i18n("api-error-no-data"))}),c}},{key:"getWikiPageFromURL",value:function(a){var b=void 0;return b=a.includes("?")?a.match(/\/\/(.*?)\/w\/.*\?(?:.*\b)?title=(.*?)(?:&|$)/):a.match(/\/\/(.*?)\/wiki\/(.*?)(?:\?|$)/),b?b.slice(1):[null,null]}},{key:"popParams",value:function(){var a=this,b=this.parseQueryString();this.patchUsage("mv"),b.overflow&&"pagepile"===b.source&&b.target&&this.addSiteNotice("info",$.i18n("massviews-redirect",$.i18n("title"),10,this.getPileLink(b.target)),"",!0),this.checkDateRange(b)||delete b.target,$(this.config.platformSelector).val(b.platform||"all-access"),$(this.config.agentSelector).val(b.agent||"user"),["sort","direction","view","source","subjectpage"].forEach(function(c){var d=b[c];d&&a.config.validParams[c].includes(d)?(b[c]=d,a[c]=d):(b[c]=a.config.defaults.params[c],a[c]=a.config.defaults.params[c])}),"quarry"===b.source&&(b.project?$(".quarry-project").val(b.project):delete b.target),"1"===b.subjectpage&&$(".category-subject-toggle--input").prop("checked",!0),this.updateSourceInput($(".source-option[data-value="+b.source+"]")[0]),b.target?($(this.config.sourceInput).val(decodeURIComponent(b.target).descore()),this.processInput()):this.setState("initial")}},{key:"setState",value:function(a,b){switch($("main").removeClass(this.config.formStates.join(" ")).addClass(a),a){case"initial":this.clearMessages(),this.assignDefaults(),this.destroyChart(),$("output").removeClass("list-mode").removeClass("chart-mode"),$(".data-links").addClass("invisible"),this.typeahead&&this.typeahead.hide(),$(this.config.sourceInput).val("").focus(),"function"==typeof b&&b.call(this);break;case"processing":this.processStarted(),this.clearMessages(),document.activeElement.blur(),$(".progress-bar").addClass("active");break;case"complete":this.processEnded(),this.updateProgressBar(0),$(".progress-bar").removeClass("active"),$(".data-links").removeClass("invisible");break;case"invalid":}}},{key:"processPagePile",value:function(a){var b=this,c=$(this.config.sourceInput).val();this.getPagePile(c).done(function(d){return d.pages.length?(b.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4}),b.sourceProject=k[d.wiki],"en.wikipedia.org"===b.sourceProject&&(d.pages=d.pages.map(function(a){return a.replace(/^Project:Wikipedia:/,"Wikipedia:")})),void b.getPageViewsData(b.sourceProject,d.pages).done(function(c){var e="Page Pile #"+d.id;$(".output-title").text(e).prop("href",b.getPileURL(d.id)),$(".output-params").html("\n "+$(b.config.dateRangeSelector).val()+'\n —\n '+b.sourceProject.replace(/.org$/,"").escape()+"\n "),b.buildMotherDataset(e,b.getPileLink(d.id),c),a()})):b.setState("initial",function(){b.writeMessage($.i18n("massviews-empty-set",b.getPileLink(c)))})}).fail(function(a){b.setState("initial"),"string"==typeof a?b.writeMessage(a):b.writeMessage($.i18n("api-error-unknown","Page Pile"))})}},{key:"processCategory",value:function(a){var b=this,c=this.getWikiPageFromURL($(this.config.sourceInput).val()),d=g(c,2),e=d[0],f=d[1];if(this.validateProject(e)){if(!f)return this.setState("initial",function(){b.writeMessage($.i18n("invalid-category-url"))});var h={action:"query",format:"json",list:"categorymembers",cmlimit:500,cmtitle:decodeURIComponent(f),prop:"categoryinfo",titles:decodeURIComponent(f)};$(".category-subject-toggle--input").is(":checked")&&(h.meta="siteinfo",h.siprop="namespaces");var i=$.ajax({url:"https://"+e+"/w/api.php",jsonp:"callback",dataType:"jsonp",data:h}),j=this.getPageLink(decodeURIComponent(f),e);this.sourceProject=e,i.done(function(c){if(c.error)return b.setState("initial",function(){b.writeMessage($.i18n("api-error","Category API")+": "+c.error.info.escape())});var d=Object.keys(c.query.pages)[0];if("-1"===d)return b.setState("initial",function(){b.writeMessage($.i18n("api-error-no-data"))});var g=c.query.pages[d].categoryinfo.size,h=c.query.namespaces,i=c.query.categorymembers;if(!i.length)return b.setState("initial",function(){b.writeMessage($.i18n("massviews-empty-set",j))});g>b.config.pageLimit&&(b.writeMessage($.i18n("massviews-oversized-set",j,b.formatNumber(g),b.config.pageLimit)),i=i.slice(0,b.config.pageLimit)),g>10&&b.setThrottle();var k=b.mapCategoryPageNames(i,h);b.getPageViewsData(e,k).done(function(c){$(".output-title").html(j),$(".output-params").html($(b.config.dateRangeSelector).val()),b.buildMotherDataset(f,j,c),a()})}).fail(function(a){b.setState("initial"),a&&"string"==typeof a.error?b.writeMessage($.i18n("api-error",j+": "+a.error)):b.writeMessage($.i18n("api-error-unknown",j))})}}},{key:"processTemplate",value:function(a){var b=this,c=this.getWikiPageFromURL($(this.config.sourceInput).val()),d=g(c,2),e=d[0],f=d[1];if(this.validateProject(e)){if(!f)return this.setState("initial",function(){b.writeMessage($.i18n("invalid-template-url"))});var h=$.ajax({url:"https://"+e+"/w/api.php",jsonp:"callback",dataType:"jsonp",data:{action:"query",format:"json",tilimit:500,titles:decodeURIComponent(f),prop:"transcludedin"}}),i=this.getPageLink(decodeURIComponent(f),e);this.sourceProject=e,h.done(function(c){if(c.error)return b.setState("initial",function(){b.writeMessage($.i18n("api-error","Transclusion API")+": "+c.error.info.escape())});var d=Object.keys(c.query.pages)[0];if("-1"===d)return b.setState("initial",function(){b.writeMessage($.i18n("api-error-no-data"))});var g=c.query.pages[d].transcludedin.map(function(a){return a.title});return g.length?(c["continue"]&&b.writeMessage($.i18n("massviews-oversized-set-unknown",i,500)),g.length>10&&b.setThrottle(),void b.getPageViewsData(e,g).done(function(c){$(".output-title").html(i),$(".output-params").html($(b.config.dateRangeSelector).val()),b.buildMotherDataset(f,i,c),a()})):b.setState("initial",function(){b.writeMessage($.i18n("massviews-empty-set",i))})}).fail(function(a){b.setState("initial"),a&&"string"==typeof a.error?b.writeMessage($.i18n("api-error",i+": "+a.error)):b.writeMessage($.i18n("api-error-unknown",i))})}}},{key:"processQuarry",value:function(a){var b=this,c=$(".quarry-project").val(),d=$(this.config.sourceInput).val();if(this.validateProject(c)){var e="https://quarry.wmflabs.org/query/"+d+"/result/latest/0/json",f="Quarry "+d+"";$.getJSON(e).done(function(e){var g=e.headers.indexOf("page_title");if(-1===g)return b.setState("initial"),b.writeMessage($.i18n("invalid-quarry-dataset","page_title"));var h=e.rows.map(function(a){return a[g]});h.length>500&&(b.writeMessage($.i18n("massviews-oversized-set",f,b.formatNumber(h.length),b.config.pageLimit)),h=h.slice(0,b.config.pageLimit)),h.length>10&&b.setThrottle(),b.getPageViewsData(c,h).done(function(c){$(".output-title").html(f),$(".output-params").html($(b.config.dateRangeSelector).val()),b.buildMotherDataset(d,f,c),a()})}).error(function(a){return b.setState("initial"),b.writeMessage($.i18n("api-error-unknown","Quarry API"),!0)})}}},{key:"validateProject",value:function(a){return a?(a=a.replace(/^www\./,""),l.includes(a)?!0:(this.setState("initial"),this.writeMessage($.i18n("invalid-project",""+a.escape()+""),!0),!1)):!0}},{key:"mapCategoryPageNames",value:function(a,b){var c=[];return a.forEach(function(a){if(b&&a.ns%2===1){var d=b[a.ns].canonical,e=b[a.ns-1].canonical||"";c.push(a.title.replace(d,e).replace(/^\:/,""))}else c.push(a.title)}),c}},{key:"processInput",value:function(){var a=this;if(!this.isRequestCached()&&simpleStorage.hasKey("pageviews-throttle")){var b=Math.round(simpleStorage.getTTL("pageviews-throttle")/1e3);if(b>0)return this.writeMessage($.i18n("api-throttle-wait",""+b+"",'phab:T124314'),!0)}this.setState("processing");var c=function(){a.updateProgressBar(100),a.setInitialChartType(),a.renderData()};switch($("#source_button").data("value")){case"pagepile":this.processPagePile(c);break;case"category":this.processCategory(c);break;case"transclusions":this.processTemplate(c);break;case"quarry":this.processQuarry(c)}}},{key:"exportCSV",value:function(){var a="data:text/csv;charset=utf-8,Title,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(b){var c='"'+b.label.descore().replace(/"/g,'""')+'"';a+=[c].concat(b.data).join(",")+"\n"}),this.downloadData(a,"csv")}},{key:"baseProject",get:function(){return this.project.split(".")[1]}}]),b}(mix(m)["with"](n,o));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new p})},{"../shared/chart_helpers":3,"../shared/list_helpers":5,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
      "+i.map(function(a){return"
    • "+b.getPageLink(a,b.project.escape())+"
    • "}).join("")+"
    ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
  • "+a+"
  • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
      "+c+"
    "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],6:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],7:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"checkDateRange",value:function(a){if(a.range)this.setSpecialRange(a.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(a.start){var b=moment(a.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(a.end||Date.now());if(bc)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),!1;this.daterangepicker.startDate=b,this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);return!0}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
    "+a+"
    ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":8}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],9:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org", afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}]},{},[3,4,5,6,7,8,9,2]); \ No newline at end of file diff --git a/public_html/massviews/massviews.js b/public_html/massviews/massviews.js index 976ae4e3a..e8475667c 100644 --- a/public_html/massviews/massviews.js +++ b/public_html/massviews/massviews.js @@ -628,9 +628,7 @@ var MassViews = function (_mix$with) { value: function popParams() { var _this7 = this; - var startDate = void 0, - endDate = void 0, - params = this.parseQueryString(); + var params = this.parseQueryString(); this.patchUsage('mv'); @@ -643,29 +641,9 @@ var MassViews = function (_mix$with) { this.addSiteNotice('info', $.i18n('massviews-redirect', $.i18n('title'), 10, this.getPileLink(params.target)), '', true); } - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < moment('2015-08-01') || endDate < moment('2015-08-01')) { - this.addSiteNotice('danger', $.i18n('param-error-1'), $.i18n('invalid-params'), true); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - return; - } - this.daterangepicker.setStartDate(startDate); - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); + // if date range is invalid, remove target so we don't process the default date range + if (!this.checkDateRange(params)) { + delete params.target; } $(this.config.platformSelector).val(params.platform || 'all-access'); @@ -2666,6 +2644,42 @@ var Pv = function (_PvConfig) { $('.site-notice').append('
    ' + markup + '
    '); } + + /** + * Check the validity of the date range of given params + * and throw errors as necessary and/or set defaults + * @param {Object} params - as returned by this.parseQueryString() + * @returns {Boolean} true if there were no errors, false otherwise + */ + + }, { + key: 'checkDateRange', + value: function checkDateRange(params) { + if (params.range) { + if (!this.setSpecialRange(params.range)) { + this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); + this.setSpecialRange(this.config.defaults.dateRange); + } + } else if (params.start) { + var startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')), + endDate = moment(params.end || Date.now()); + + if (startDate < this.config.minDate || endDate < this.config.minDate) { + this.addSiteNotice('danger', $.i18n('param-error-1', moment(this.config.minDate).format(this.dateFormat)), $.i18n('invalid-params'), true); + return false; + } else if (startDate > endDate) { + this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); + return false; + } + /** directly assign startDate before calling setEndDate so events will be fired once */ + this.daterangepicker.startDate = startDate; + this.daterangepicker.setEndDate(endDate); + } else { + this.setSpecialRange(this.config.defaults.dateRange); + } + + return true; + } }, { key: 'clearSiteNotices', value: function clearSiteNotices() { diff --git a/public_html/pageviews.js b/public_html/pageviews.js index d952b4f45..8d0290b8f 100644 --- a/public_html/pageviews.js +++ b/public_html/pageviews.js @@ -172,42 +172,13 @@ var PageViews = function (_mix$with) { /** show loading indicator and add error handling for timeouts */ this.startSpinny(); - var startDate = void 0, - endDate = void 0, - params = this.parseQueryString('pages'); + var params = this.parseQueryString('pages'); $(this.config.projectInput).val(params.project || this.config.defaults.project); if (this.validateProject()) return; this.patchUsage('pv'); - - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < this.config.minDate || endDate < this.config.minDate) { - this.addSiteNotice('danger', $.i18n('param-error-1', $.i18n('july') + ' 2015'), $.i18n('invalid-params'), true); - this.resetView(); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - this.resetView(); - return; - } - /** directly assign startDate before calling setEndDate so events will be fired once */ - this.daterangepicker.startDate = startDate; - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); - } + this.checkDateRange(params); $(this.config.platformSelector).val(params.platform || 'all-access'); $('#agent-select').val(params.agent || 'user'); @@ -2064,6 +2035,42 @@ var Pv = function (_PvConfig) { $('.site-notice').append('
    ' + markup + '
    '); } + + /** + * Check the validity of the date range of given params + * and throw errors as necessary and/or set defaults + * @param {Object} params - as returned by this.parseQueryString() + * @returns {Boolean} true if there were no errors, false otherwise + */ + + }, { + key: 'checkDateRange', + value: function checkDateRange(params) { + if (params.range) { + if (!this.setSpecialRange(params.range)) { + this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); + this.setSpecialRange(this.config.defaults.dateRange); + } + } else if (params.start) { + var startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')), + endDate = moment(params.end || Date.now()); + + if (startDate < this.config.minDate || endDate < this.config.minDate) { + this.addSiteNotice('danger', $.i18n('param-error-1', moment(this.config.minDate).format(this.dateFormat)), $.i18n('invalid-params'), true); + return false; + } else if (startDate > endDate) { + this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); + return false; + } + /** directly assign startDate before calling setEndDate so events will be fired once */ + this.daterangepicker.startDate = startDate; + this.daterangepicker.setEndDate(endDate); + } else { + this.setSpecialRange(this.config.defaults.dateRange); + } + + return true; + } }, { key: 'clearSiteNotices', value: function clearSiteNotices() { diff --git a/public_html/redirectviews/application.js b/public_html/redirectviews/application.js index 750d27cb5..36ab3e6ae 100644 --- a/public_html/redirectviews/application.js +++ b/public_html/redirectviews/application.js @@ -9,6 +9,6 @@ if(0==h)return f=255*i,[f,f,f];c=.5>i?i*(1+h):i+h-i*h,b=2*i-c,e=[0,0,0];for(var }},calculatePointY:function(a,b,c,d){var e,f,g,h=this,i=h.chart,j=h.getMeta(),k=h.getScaleForId(j.yAxisID),l=0,m=0;if(k.options.stacked){for(e=0;c>e;e++)f=i.data.datasets[e],g=i.getDatasetMeta(e),"line"===g.type&&i.isDatasetVisible(e)&&(f.data[b]<0?m+=f.data[b]||0:l+=f.data[b]||0);return 0>a?k.getPixelForValue(m+a):k.getPixelForValue(l+a)}return k.getPixelForValue(a)},updateBezierControlPoints:function(){var a,b,d,e,f,g=this.getMeta(),h=(this.chart.chartArea,g.data||[]);for(a=0,b=h.length;b>a;++a)d=h[a],e=d._model,f=c.splineCurve(c.previousItem(h,a)._model,e,c.nextItem(h,a)._model,g.dataset._model.tension),e.controlPointPreviousX=f.previous.x,e.controlPointPreviousY=f.previous.y,e.controlPointNextX=f.next.x,e.controlPointNextY=f.next.y},draw:function(a){var c,d,e=this,f=e.getMeta(),g=f.data||[],h=a||1;for(c=0,d=g.length;d>c;++c)g[c].transition(h);for(b(e.getDataset(),e.chart.options)&&f.dataset.transition(h).draw(),c=0,d=g.length;d>c;++c)g[c].draw()},setHoverStyle:function(a){var b=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=a._model;f.radius=e.hoverRadius||c.getValueAtIndexOrDefault(b.pointHoverRadius,d,this.chart.options.elements.point.hoverRadius),f.backgroundColor=e.hoverBackgroundColor||c.getValueAtIndexOrDefault(b.pointHoverBackgroundColor,d,c.getHoverColor(f.backgroundColor)),f.borderColor=e.hoverBorderColor||c.getValueAtIndexOrDefault(b.pointHoverBorderColor,d,c.getHoverColor(f.borderColor)),f.borderWidth=e.hoverBorderWidth||c.getValueAtIndexOrDefault(b.pointHoverBorderWidth,d,f.borderWidth)},removeHoverStyle:function(a){var b=this,d=b.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=a._model;void 0!==d.radius&&void 0===d.pointRadius&&(d.pointRadius=d.radius),g.radius=f.radius||c.getValueAtIndexOrDefault(d.pointRadius,e,b.chart.options.elements.point.radius),g.backgroundColor=b.getPointBackgroundColor(a,e),g.borderColor=b.getPointBorderColor(a,e),g.borderWidth=b.getPointBorderWidth(a,e)}})}},{}],19:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0},animation:{animateRotate:!0,animateScale:!0},aspectRatio:1,legendCallback:function(a){var b=[];b.push('
      ');var c=a.data,d=c.datasets,e=c.labels;if(d.length)for(var f=0;f'),e[f]&&b.push(e[f]),b.push("");return b.push("
    "),b.join("")},legend:{labels:{generateLabels:function(a){var c=a.data;return c.labels.length&&c.datasets.length?c.labels.map(function(d,e){var f=a.getDatasetMeta(0),g=c.datasets[0],h=f.data[e],i=h.custom||{},j=b.getValueAtIndexOrDefault,k=a.options.elements.arc,l=i.backgroundColor?i.backgroundColor:j(g.backgroundColor,e,k.backgroundColor),m=i.borderColor?i.borderColor:j(g.borderColor,e,k.borderColor),n=i.borderWidth?i.borderWidth:j(g.borderWidth,e,k.borderWidth);return{text:d,fillStyle:l,strokeStyle:m,lineWidth:n,hidden:isNaN(g.data[e])||f.data[e].hidden,index:e}}):[]}},onClick:function(a,b){var c,d,e,f=b.index,g=this.chart;for(c=0,d=(g.data.datasets||[]).length;d>c;++c)e=g.getDatasetMeta(c),e.data[f].hidden=!e.data[f].hidden;g.update()}},tooltips:{callbacks:{title:function(){return""},label:function(a,b){return b.labels[a.index]+": "+a.yLabel}}}},a.controllers.polarArea=a.DatasetController.extend({dataElementType:a.elements.Arc,linkScales:b.noop,update:function(a){var c=this,d=c.chart,e=d.chartArea,f=c.getMeta(),g=d.options,h=g.elements.arc,i=Math.min(e.right-e.left,e.bottom-e.top);d.outerRadius=Math.max((i-h.borderWidth/2)/2,0),d.innerRadius=Math.max(g.cutoutPercentage?d.outerRadius/100*g.cutoutPercentage:1,0),d.radiusLength=(d.outerRadius-d.innerRadius)/d.getVisibleDatasetCount(),c.outerRadius=d.outerRadius-d.radiusLength*c.index,c.innerRadius=c.outerRadius-d.radiusLength,f.count=c.countVisibleElements(),b.each(f.data,function(b,d){c.updateElement(b,d,a)})},updateElement:function(a,c,d){for(var e=this,f=e.chart,g=f.chartArea,h=e.getDataset(),i=f.options,j=i.animation,k=(i.elements.arc,a.custom||{},f.scale),l=b.getValueAtIndexOrDefault,m=f.data.labels,n=e.calculateCircumference(h.data[c]),o=(g.left+g.right)/2,p=(g.top+g.bottom)/2,q=0,r=e.getMeta(),s=0;c>s;++s)isNaN(h.data[s])||r.data[s].hidden||++q;var t=-.5*Math.PI,u=a.hidden?0:k.getDistanceFromCenterForValue(h.data[c]),v=t+n*q,w=v+(a.hidden?0:n),x=j.animateScale?0:k.getDistanceFromCenterForValue(h.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:k,_model:{x:o,y:p,innerRadius:0,outerRadius:d?x:u,startAngle:d&&j.animateRotate?t:v,endAngle:d&&j.animateRotate?t:w,label:l(m,c,m[c])}}),e.removeHoverStyle(a),a.pivot()},removeHoverStyle:function(b){a.DatasetController.prototype.removeHoverStyle.call(this,b,this.chart.options.elements.arc)},countVisibleElements:function(){var a=this.getDataset(),c=this.getMeta(),d=0;return b.each(c.data,function(b,c){isNaN(a.data[c])||b.hidden||d++}),d},calculateCircumference:function(a){var b=this.getMeta().count;return b>0&&!isNaN(a)?2*Math.PI/b:0}})}},{}],20:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},a.controllers.radar=a.DatasetController.extend({datasetElementType:a.elements.Line,dataElementType:a.elements.Point,linkScales:b.noop,addElementAndReset:function(b){a.DatasetController.prototype.addElementAndReset.call(this,b),this.updateBezierControlPoints()},update:function(a){var c=this,d=c.getMeta(),e=d.dataset,f=d.data,g=e.custom||{},h=c.getDataset(),i=c.chart.options.elements.line,j=c.chart.scale;void 0!==h.tension&&void 0===h.lineTension&&(h.lineTension=h.tension),b.extend(d.dataset,{_datasetIndex:c.index,_children:f,_loop:!0,_model:{tension:g.tension?g.tension:b.getValueOrDefault(h.lineTension,i.tension),backgroundColor:g.backgroundColor?g.backgroundColor:h.backgroundColor||i.backgroundColor,borderWidth:g.borderWidth?g.borderWidth:h.borderWidth||i.borderWidth,borderColor:g.borderColor?g.borderColor:h.borderColor||i.borderColor,fill:g.fill?g.fill:void 0!==h.fill?h.fill:i.fill,borderCapStyle:g.borderCapStyle?g.borderCapStyle:h.borderCapStyle||i.borderCapStyle,borderDash:g.borderDash?g.borderDash:h.borderDash||i.borderDash,borderDashOffset:g.borderDashOffset?g.borderDashOffset:h.borderDashOffset||i.borderDashOffset,borderJoinStyle:g.borderJoinStyle?g.borderJoinStyle:h.borderJoinStyle||i.borderJoinStyle,scaleTop:j.top,scaleBottom:j.bottom,scaleZero:j.getBasePosition()}}),d.dataset.pivot(),b.each(f,function(b,d){c.updateElement(b,d,a)},c),c.updateBezierControlPoints()},updateElement:function(a,c,d){var e=this,f=a.custom||{},g=e.getDataset(),h=e.chart.scale,i=e.chart.options.elements.point,j=h.getPointPositionForValue(c,g.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:h,_model:{x:d?h.xCenter:j.x,y:d?h.yCenter:j.y,tension:f.tension?f.tension:b.getValueOrDefault(g.tension,e.chart.options.elements.line.tension),radius:f.radius?f.radius:b.getValueAtIndexOrDefault(g.pointRadius,c,i.radius),backgroundColor:f.backgroundColor?f.backgroundColor:b.getValueAtIndexOrDefault(g.pointBackgroundColor,c,i.backgroundColor),borderColor:f.borderColor?f.borderColor:b.getValueAtIndexOrDefault(g.pointBorderColor,c,i.borderColor),borderWidth:f.borderWidth?f.borderWidth:b.getValueAtIndexOrDefault(g.pointBorderWidth,c,i.borderWidth),pointStyle:f.pointStyle?f.pointStyle:b.getValueAtIndexOrDefault(g.pointStyle,c,i.pointStyle),hitRadius:f.hitRadius?f.hitRadius:b.getValueAtIndexOrDefault(g.hitRadius,c,i.hitRadius)}}),a._model.skip=f.skip?f.skip:isNaN(a._model.x)||isNaN(a._model.y)},updateBezierControlPoints:function(){var a=this.chart.chartArea,c=this.getMeta();b.each(c.data,function(d,e){var f=d._model,g=b.splineCurve(b.previousItem(c.data,e,!0)._model,f,b.nextItem(c.data,e,!0)._model,f.tension);f.controlPointPreviousX=Math.max(Math.min(g.previous.x,a.right),a.left),f.controlPointPreviousY=Math.max(Math.min(g.previous.y,a.bottom),a.top),f.controlPointNextX=Math.max(Math.min(g.next.x,a.right),a.left),f.controlPointNextY=Math.max(Math.min(g.next.y,a.bottom),a.top),d.pivot()})},draw:function(a){var c=this.getMeta(),d=a||1;b.each(c.data,function(a,b){a.transition(d)}),c.dataset.transition(d).draw(),b.each(c.data,function(a){a.draw()})},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model;f.radius=d.hoverRadius?d.hoverRadius:b.getValueAtIndexOrDefault(c.pointHoverRadius,e,this.chart.options.elements.point.hoverRadius),f.backgroundColor=d.hoverBackgroundColor?d.hoverBackgroundColor:b.getValueAtIndexOrDefault(c.pointHoverBackgroundColor,e,b.getHoverColor(f.backgroundColor)),f.borderColor=d.hoverBorderColor?d.hoverBorderColor:b.getValueAtIndexOrDefault(c.pointHoverBorderColor,e,b.getHoverColor(f.borderColor)),f.borderWidth=d.hoverBorderWidth?d.hoverBorderWidth:b.getValueAtIndexOrDefault(c.pointHoverBorderWidth,e,f.borderWidth)},removeHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model,g=this.chart.options.elements.point;f.radius=d.radius?d.radius:b.getValueAtIndexOrDefault(c.radius,e,g.radius),f.backgroundColor=d.backgroundColor?d.backgroundColor:b.getValueAtIndexOrDefault(c.pointBackgroundColor,e,g.backgroundColor),f.borderColor=d.borderColor?d.borderColor:b.getValueAtIndexOrDefault(c.pointBorderColor,e,g.borderColor),f.borderWidth=d.borderWidth?d.borderWidth:b.getValueAtIndexOrDefault(c.pointBorderWidth,e,g.borderWidth)}})}},{}],21:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:b.noop,onComplete:b.noop},a.Animation=a.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),a.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(a,b,c,d){var e=this;d||(a.animating=!0);for(var f=0;f1&&(c=Math.floor(a.dropFrames),a.dropFrames=a.dropFrames%1);for(var d=0;da.animations[d].animationObject.numSteps&&(a.animations[d].animationObject.currentStep=a.animations[d].animationObject.numSteps),a.animations[d].animationObject.render(a.animations[d].chartInstance,a.animations[d].animationObject),a.animations[d].animationObject.onAnimationProgress&&a.animations[d].animationObject.onAnimationProgress.call&&a.animations[d].animationObject.onAnimationProgress.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].animationObject.currentStep===a.animations[d].animationObject.numSteps?(a.animations[d].animationObject.onAnimationComplete&&a.animations[d].animationObject.onAnimationComplete.call&&a.animations[d].animationObject.onAnimationComplete.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].chartInstance.animating=!1,a.animations.splice(d,1)):++d;var e=Date.now(),f=(e-b)/a.frameDuration;a.dropFrames+=f,a.animations.length>0&&a.requestAnimationFrame()}}}},{}],22:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.types={},a.instances={},a.controllers={},a.Controller=function(c){return this.chart=c,this.config=c.config,this.options=this.config.options=b.configMerge(a.defaults.global,a.defaults[this.config.type],this.config.options||{}),this.id=b.uid(),Object.defineProperty(this,"data",{get:function(){return this.config.data}}),a.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},b.extend(a.Controller.prototype,{initialize:function(){var b=this;return a.plugins.notify("beforeInit",[b]),b.bindEvents(),b.ensureScalesHaveIDs(),b.buildOrUpdateControllers(),b.buildScales(),b.updateLayout(),b.resetElements(),b.initToolTip(),b.update(),a.plugins.notify("afterInit",[b]),b},clear:function(){return b.clear(this.chart),this},stop:function(){return a.animationService.cancelAnimation(this),this},resize:function(c){var d=this,e=d.chart,f=e.canvas,g=b.getMaximumWidth(f),h=e.aspectRatio,i=d.options.maintainAspectRatio&&isNaN(h)===!1&&isFinite(h)&&0!==h?g/h:b.getMaximumHeight(f),j=e.width!==g||e.height!==i;if(!j)return d;f.width=e.width=g,f.height=e.height=i,b.retinaScale(e);var k={width:g,height:i};return a.plugins.notify("resize",[d,k]),d.options.onResize&&d.options.onResize(d,k),c||(d.stop(),d.update(d.options.responsiveAnimationDuration)),d},ensureScalesHaveIDs:function(){var a=this.options,c=a.scales||{},d=a.scale;b.each(c.xAxes,function(a,b){a.id=a.id||"x-axis-"+b}),b.each(c.yAxes,function(a,b){a.id=a.id||"y-axis-"+b}),d&&(d.id=d.id||"scale")},buildScales:function(){var c=this,d=c.options,e=c.scales={},f=[];d.scales&&(f=f.concat((d.scales.xAxes||[]).map(function(a){return{options:a,dtype:"category"}}),(d.scales.yAxes||[]).map(function(a){return{options:a,dtype:"linear"}}))),d.scale&&f.push({options:d.scale,dtype:"radialLinear",isDefault:!0}),b.each(f,function(d,f){var g=d.options,h=b.getValueOrDefault(g.type,d.dtype),i=a.scaleService.getScaleConstructor(h);if(i){var j=new i({id:g.id,options:g,ctx:c.chart.ctx,chart:c});e[j.id]=j,d.isDefault&&(c.scale=j)}}),a.scaleService.addScalesToLayout(this)},updateLayout:function(){a.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var c=this,d=[],e=[];if(b.each(c.data.datasets,function(b,f){var g=c.getDatasetMeta(f);g.type||(g.type=b.type||c.config.type),d.push(g.type),g.controller?g.controller.updateIndex(f):(g.controller=new a.controllers[g.type](c,f),e.push(g.controller))},c),d.length>1)for(var f=1;fb;++b)d.getDatasetMeta(b).controller.update();a.plugins.notify("afterDatasetsUpdate",[d])}},render:function(c,d){var e=this;a.plugins.notify("beforeRender",[e]);var f=e.options.animation;if(f&&("undefined"!=typeof c&&0!==c||"undefined"==typeof c&&0!==f.duration)){var g=new a.Animation;g.numSteps=(c||f.duration)/16.66,g.easing=f.easing,g.render=function(a,c){var d=b.easingEffects[c.easing],e=c.currentStep/c.numSteps,f=d(e);a.draw(f,e,c.currentStep)},g.onAnimationProgress=f.onProgress,g.onAnimationComplete=f.onComplete,a.animationService.addAnimation(e,g,c,d)}else e.draw(),f&&f.onComplete&&f.onComplete.call&&f.onComplete.call(e);return e},draw:function(c){var d=this,e=c||1;d.clear(),a.plugins.notify("beforeDraw",[d,e]),b.each(d.boxes,function(a){a.draw(d.chartArea)},d),d.scale&&d.scale.draw(),a.plugins.notify("beforeDatasetsDraw",[d,e]),b.each(d.data.datasets,function(a,b){d.isDatasetVisible(b)&&d.getDatasetMeta(b).controller.draw(c)},d,!0),a.plugins.notify("afterDatasetsDraw",[d,e]),d.tooltip.transition(e).draw(),a.plugins.notify("afterDraw",[d,e])},getElementAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[];return b.each(c.data.datasets,function(a,f){if(c.isDatasetVisible(f)){var g=c.getDatasetMeta(f);b.each(g.data,function(a,b){return a.inRange(d.x,d.y)?(e.push(a),e):void 0})}}),e},getElementsAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[],f=function(){if(c.data.datasets)for(var a=0;a0&&(b=this.getDatasetMeta(b[0]._datasetIndex).data),b},getDatasetMeta:function(a){var b=this,c=b.data.datasets[a];c._meta||(c._meta={});var d=c._meta[b.id];return d||(d=c._meta[b.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),d},getVisibleDatasetCount:function(){for(var a=0,b=0,c=this.data.datasets.length;c>b;++b)this.isDatasetVisible(b)&&a++;return a},isDatasetVisible:function(a){var b=this.getDatasetMeta(a);return"boolean"==typeof b.hidden?!b.hidden:!this.data.datasets[a].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var c=this;c.stop(),c.clear(),b.unbindEvents(c,c.events),b.removeResizeListener(c.chart.canvas.parentNode);var d=c.chart.canvas;d.width=c.chart.width,d.height=c.chart.height,void 0!==c.chart.originalDevicePixelRatio&&c.chart.ctx.scale(1/c.chart.originalDevicePixelRatio,1/c.chart.originalDevicePixelRatio),d.style.width=c.chart.originalCanvasStyleWidth,d.style.height=c.chart.originalCanvasStyleHeight,a.plugins.notify("destroy",[c]),delete a.instances[c.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var b=this;b.tooltip=new a.Tooltip({_chart:b.chart,_chartInstance:b,_data:b.data,_options:b.options.tooltips},b)},bindEvents:function(){var a=this;b.bindEvents(a,a.options.events,function(b){a.eventHandler(b)})},updateHoverStyle:function(a,b,c){var d,e,f,g=c?"setHoverStyle":"removeHoverStyle";switch(b){case"single":a=[a[0]];break;case"label":case"dataset":break;default:return}for(e=0,f=a.length;f>e;++e)d=a[e],d&&this.getDatasetMeta(d._datasetIndex).controller[g](d)},eventHandler:function(a){var c=this,d=c.tooltip,e=c.options||{},f=e.hover,g=e.tooltips;return c.lastActive=c.lastActive||[],c.lastTooltipActive=c.lastTooltipActive||[],"mouseout"===a.type?(c.active=[],c.tooltipActive=[]):(c.active=c.getElementsAtEventForMode(a,f.mode),c.tooltipActive=c.getElementsAtEventForMode(a,g.mode)),f.onHover&&f.onHover.call(c,c.active),("mouseup"===a.type||"click"===a.type)&&(e.onClick&&e.onClick.call(c,a,c.active),c.legend&&c.legend.handleEvent&&c.legend.handleEvent(a)),c.lastActive.length&&c.updateHoverStyle(c.lastActive,f.mode,!1),c.active.length&&f.mode&&c.updateHoverStyle(c.active,f.mode,!0),(g.enabled||g.custom)&&(d.initialize(),d._active=c.tooltipActive,d.update(!0)),d.pivot(),c.animating||b.arrayEquals(c.active,c.lastActive)&&b.arrayEquals(c.tooltipActive,c.lastTooltipActive)||(c.stop(),(g.enabled||g.custom)&&d.update(!0),c.render(f.animationDuration,!0)),c.lastActive=c.active,c.lastTooltipActive=c.tooltipActive,c}})}},{}],23:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.DatasetController=function(a,b){this.initialize.call(this,a,b)},b.extend(a.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(a,b){var c=this;c.chart=a,c.index=b,c.linkScales(),c.addElements()},updateIndex:function(a){this.index=a},linkScales:function(){var a=this,b=a.getMeta(),c=a.getDataset();null===b.xAxisID&&(b.xAxisID=c.xAxisID||a.chart.options.scales.xAxes[0].id),null===b.yAxisID&&(b.yAxisID=c.yAxisID||a.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(a){return this.chart.scales[a]},reset:function(){this.update(!0)},createMetaDataset:function(){var a=this,b=a.datasetElementType;return b&&new b({_chart:a.chart.chart,_datasetIndex:a.index})},createMetaData:function(a){var b=this,c=b.dataElementType;return c&&new c({_chart:b.chart.chart,_datasetIndex:b.index,_index:a})},addElements:function(){var a,b,c=this,d=c.getMeta(),e=c.getDataset().data||[],f=d.data;for(a=0,b=e.length;b>a;++a)f[a]=f[a]||c.createMetaData(d,a);d.dataset=d.dataset||c.createMetaDataset()},addElementAndReset:function(a){var b=this,c=b.createMetaData(a);b.getMeta().data.splice(a,0,c),b.updateElement(c,a,!0)},buildOrUpdateElements:function(){var a=this.getMeta(),b=a.data,c=this.getDataset().data.length,d=b.length;if(d>c)b.splice(c,d-c);else if(c>d)for(var e=d;c>e;++e)this.addElementAndReset(e)},update:c,draw:function(a){var c=a||1;b.each(this.getMeta().data,function(a,b){a.transition(c).draw()})},removeHoverStyle:function(a,c){var d=this.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=b.getValueAtIndexOrDefault,h=(b.color,a._model);h.backgroundColor=f.backgroundColor?f.backgroundColor:g(d.backgroundColor,e,c.backgroundColor),h.borderColor=f.borderColor?f.borderColor:g(d.borderColor,e,c.borderColor),h.borderWidth=f.borderWidth?f.borderWidth:g(d.borderWidth,e,c.borderWidth)},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=b.getValueAtIndexOrDefault,g=(b.color,b.getHoverColor),h=a._model;h.backgroundColor=e.hoverBackgroundColor?e.hoverBackgroundColor:f(c.hoverBackgroundColor,d,g(h.backgroundColor)),h.borderColor=e.hoverBorderColor?e.hoverBorderColor:f(c.hoverBorderColor,d,g(h.borderColor)),h.borderWidth=e.hoverBorderWidth?e.hoverBorderWidth:f(c.hoverBorderWidth,d,h.borderWidth)}}),a.DatasetController.extend=b.inherits}},{}],24:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.elements={},a.Element=function(a){b.extend(this,a),this.initialize.apply(this,arguments)},b.extend(a.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var a=this;return a._view||(a._view=b.clone(a._model)),a._start=b.clone(a._view),a},transition:function(a){var c=this;return c._view||(c._view=b.clone(c._model)),1===a?(c._view=c._model,c._start=null,c):(c._start||c.pivot(),b.each(c._model,function(d,e){if("_"===e[0]);else if(c._view.hasOwnProperty(e))if(d===c._view[e]);else if("string"==typeof d)try{var f=b.color(c._model[e]).mix(b.color(c._start[e]),a);c._view[e]=f.rgbString()}catch(g){c._view[e]=d}else if("number"==typeof d){var h=void 0!==c._start[e]&&isNaN(c._start[e])===!1?c._start[e]:0;c._view[e]=(c._model[e]-h)*a+h}else c._view[e]=d;else"number"!=typeof d||isNaN(c._view[e])?c._view[e]=d:c._view[e]=d*a},c),c)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return b.isNumber(this._model.x)&&b.isNumber(this._model.y)}}),a.Element.extend=b.inherits}},{}],25:[function(a,b,c){"use strict";var d=a(3);b.exports=function(a){function b(a,b,c){var d;return"string"==typeof a?(d=parseInt(a,10),-1!=a.indexOf("%")&&(d=d/100*b.parentNode[c])):d=a,d}function c(a){return void 0!==a&&null!==a&&"none"!==a}function e(a,d,e){var f=document.defaultView,g=a.parentNode,h=f.getComputedStyle(a)[d],i=f.getComputedStyle(g)[d],j=c(h),k=c(i),l=Number.POSITIVE_INFINITY;return j||k?Math.min(j?b(h,a,e):l,k?b(i,g,e):l):"none"}var f=a.helpers={};f.each=function(a,b,c,d){var e,g;if(f.isArray(a))if(g=a.length,d)for(e=g-1;e>=0;e--)b.call(c,a[e],e);else for(e=0;g>e;e++)b.call(c,a[e],e);else if("object"==typeof a){var h=Object.keys(a);for(g=h.length,e=0;g>e;e++)b.call(c,a[h[e]],h[e])}},f.clone=function(a){var b={};return f.each(a,function(a,c){f.isArray(a)?b[c]=a.slice(0):"object"==typeof a&&null!==a?b[c]=f.clone(a):b[c]=a}),b},f.extend=function(a){for(var b=function(b,c){a[c]=b},c=1,d=arguments.length;d>c;c++)f.each(arguments[c],b);return a},f.configMerge=function(b){var c=f.clone(b);return f.each(Array.prototype.slice.call(arguments,1),function(b){f.each(b,function(b,d){if("scales"===d)c[d]=f.scaleMerge(c.hasOwnProperty(d)?c[d]:{},b);else if("scale"===d)c[d]=f.configMerge(c.hasOwnProperty(d)?c[d]:{},a.scaleService.getScaleDefaults(b.type),b);else if(c.hasOwnProperty(d)&&f.isArray(c[d])&&f.isArray(b)){var e=c[d];f.each(b,function(a,b){b=d[c].length||!d[c][e].type?d[c].push(f.configMerge(h,b)):b.type&&b.type!==d[c][e].type?d[c][e]=f.configMerge(d[c][e],h,b):d[c][e]=f.configMerge(d[c][e],b)}):(d[c]=[],f.each(b,function(b){var e=f.getValueOrDefault(b.type,"xAxes"===c?"category":"linear");d[c].push(f.configMerge(a.scaleService.getScaleDefaults(e),b))})):d.hasOwnProperty(c)&&"object"==typeof d[c]&&null!==d[c]&&"object"==typeof b?d[c]=f.configMerge(d[c],b):d[c]=b}),d},f.getValueAtIndexOrDefault=function(a,b,c){return void 0===a||null===a?c:f.isArray(a)?bc;++c)if(a[c]===b)return c;return-1},f.where=function(a,b){if(f.isArray(a)&&Array.prototype.filter)return a.filter(b);var c=[];return f.each(a,function(a){b(a)&&c.push(a)}),c},f.findIndex=Array.prototype.findIndex?function(a,b,c){return a.findIndex(b,c)}:function(a,b,c){c=void 0===c?a:c;for(var d=0,e=a.length;e>d;++d)if(b.call(c,a[d],d,a))return d;return-1},f.findNextWhere=function(a,b,c){(void 0===c||null===c)&&(c=-1);for(var d=c+1;d=0;d--){var e=a[d];if(b(e))return e}},f.inherits=function(a){var b=this,c=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return b.apply(this,arguments)},d=function(){this.constructor=c};return d.prototype=b.prototype,c.prototype=new d,c.extend=f.inherits,a&&f.extend(c.prototype,a),c.__super__=b.prototype,c},f.noop=function(){},f.uid=function(){var a=0;return function(){return a++}}(),f.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},f.almostEquals=function(a,b,c){return Math.abs(a-b)0?1:-1},f.log10=Math.log10?function(a){return Math.log10(a)}:function(a){return Math.log(a)/Math.LN10},f.toRadians=function(a){return a*(Math.PI/180)},f.toDegrees=function(a){return a*(180/Math.PI)},f.getAngleFromPoint=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=Math.sqrt(c*c+d*d),f=Math.atan2(d,c);return f<-.5*Math.PI&&(f+=2*Math.PI),{angle:f,distance:e}},f.aliasPixel=function(a){return a%2===0?0:.5},f.splineCurve=function(a,b,c,d){var e=a.skip?b:a,f=b,g=c.skip?b:c,h=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),i=Math.sqrt(Math.pow(g.x-f.x,2)+Math.pow(g.y-f.y,2)),j=h/(h+i),k=i/(h+i);j=isNaN(j)?0:j,k=isNaN(k)?0:k;var l=d*j,m=d*k;return{previous:{x:f.x-l*(g.x-e.x),y:f.y-l*(g.y-e.y)},next:{x:f.x+m*(g.x-e.x),y:f.y+m*(g.y-e.y)}}},f.nextItem=function(a,b,c){return c?b>=a.length-1?a[0]:a[b+1]:b>=a.length-1?a[a.length-1]:a[b+1]},f.previousItem=function(a,b,c){return c?0>=b?a[a.length-1]:a[b-1]:0>=b?a[0]:a[b-1]},f.niceNum=function(a,b){var c,d=Math.floor(f.log10(a)),e=a/Math.pow(10,d);return c=b?1.5>e?1:3>e?2:7>e?5:10:1>=e?1:2>=e?2:5>=e?5:10,c*Math.pow(10,d)};var g=f.easingEffects={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return(a/=.5)<1?.5*a*a:-.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var b=1.70158,c=0,d=1;return 0===a?0:1===(a/=1)?1:(c||(c=.3),da?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)):d*Math.pow(2,-10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)*.5+1)},easeInBack:function(a){var b=1.70158;return 1*(a/=1)*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return 1*((a=a/1-1)*a*((b+1)*a+b)+1)},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},easeInBounce:function(a){return 1-g.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):2/2.75>a?1*(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},easeInOutBounce:function(a){return.5>a?.5*g.easeInBounce(2*a):.5*g.easeOutBounce(2*a-1)+.5}};f.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),f.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1e3/60)}}(),f.getRelativePosition=function(a,b){var c,d,e=a.originalEvent||a,g=a.currentTarget||a.srcElement,h=g.getBoundingClientRect(),i=e.touches;i&&i.length>0?(c=i[0].clientX,d=i[0].clientY):(c=e.clientX,d=e.clientY);var j=parseFloat(f.getStyle(g,"padding-left")),k=parseFloat(f.getStyle(g,"padding-top")),l=parseFloat(f.getStyle(g,"padding-right")),m=parseFloat(f.getStyle(g,"padding-bottom")),n=h.right-h.left-j-l,o=h.bottom-h.top-k-m; return c=Math.round((c-h.left-j)/n*g.width/b.currentDevicePixelRatio),d=Math.round((d-h.top-k)/o*g.height/b.currentDevicePixelRatio),{x:c,y:d}},f.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},f.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=f.noop},f.bindEvents=function(a,b,c){var d=a.events=a.events||{};f.each(b,function(b){d[b]=function(){c.apply(a,arguments)},f.addEvent(a.chart.canvas,b,d[b])})},f.unbindEvents=function(a,b){var c=a.chart.canvas;f.each(b,function(a,b){f.removeEvent(c,b,a)})},f.getConstraintWidth=function(a){return e(a,"max-width","clientWidth")},f.getConstraintHeight=function(a){return e(a,"max-height","clientHeight")},f.getMaximumWidth=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-left"))+parseInt(f.getStyle(b,"padding-right")),d=b.clientWidth-c,e=f.getConstraintWidth(a);return isNaN(e)?d:Math.min(d,e)},f.getMaximumHeight=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-top"))+parseInt(f.getStyle(b,"padding-bottom")),d=b.clientHeight-c,e=f.getConstraintHeight(a);return isNaN(e)?d:Math.min(d,e)},f.getStyle=function(a,b){return a.currentStyle?a.currentStyle[b]:document.defaultView.getComputedStyle(a,null).getPropertyValue(b)},f.retinaScale=function(a){var b=a.ctx,c=a.canvas,d=c.width,e=c.height,f=a.currentDevicePixelRatio=window.devicePixelRatio||1;1!==f&&(c.height=e*f,c.width=d*f,b.scale(f,f),a.originalDevicePixelRatio=a.originalDevicePixelRatio||f),c.style.width=d+"px",c.style.height=e+"px"},f.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},f.fontString=function(a,b,c){return b+" "+a+"px "+c},f.longestText=function(a,b,c,d){d=d||{};var e=d.data=d.data||{},g=d.garbageCollect=d.garbageCollect||[];d.font!==b&&(e=d.data={},g=d.garbageCollect=[],d.font=b),a.font=b;var h=0;f.each(c,function(b){void 0!==b&&null!==b&&f.isArray(b)!==!0?h=f.measureText(a,e,g,h,b):f.isArray(b)&&f.each(b,function(b){void 0===b||null===b||f.isArray(b)||(h=f.measureText(a,e,g,h,b))})});var i=g.length/2;if(i>c.length){for(var j=0;i>j;j++)delete e[g[j]];g.splice(0,i)}return h},f.measureText=function(a,b,c,d,e){var f=b[e];return f||(f=b[e]=a.measureText(e).width,c.push(e)),f>d&&(d=f),d},f.numberOfLabelLines=function(a){var b=1;return f.each(a,function(a){f.isArray(a)&&a.length>b&&(b=a.length)}),b},f.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()},f.color=function(b){return d?d(b instanceof CanvasGradient?a.defaults.global.defaultColor:b):(console.log("Color.js not found!"),b)},f.addResizeListener=function(a,b){var c=document.createElement("iframe"),d="chartjs-hidden-iframe";c.classlist?c.classlist.add(d):c.setAttribute("class",d);var e=c.style;e.width="100%",e.display="block",e.border=0,e.height=0,e.margin=0,e.position="absolute",e.left=0,e.right=0,e.top=0,e.bottom=0,a.insertBefore(c,a.firstChild),(c.contentWindow||c).onresize=function(){b&&b()}},f.removeResizeListener=function(a){var b=a.querySelector(".chartjs-hidden-iframe");b&&b.parentNode.removeChild(b)},f.isArray=Array.isArray?function(a){return Array.isArray(a)}:function(a){return"[object Array]"===Object.prototype.toString.call(a)},f.arrayEquals=function(a,b){var c,d,e,g;if(!a||!b||a.length!=b.length)return!1;for(c=0,d=a.length;d>c;++c)if(e=a[c],g=b[c],e instanceof Array&&g instanceof Array){if(!f.arrayEquals(e,g))return!1}else if(e!=g)return!1;return!0},f.callCallback=function(a,b,c){a&&"function"==typeof a.call&&a.apply(c,b)},f.getHoverColor=function(a){return a instanceof CanvasPattern?a:f.color(a).saturate(.5).darken(.1).rgbString()}}},{3:3}],26:[function(a,b,c){"use strict";b.exports=function(){var a=function(b,c){var d=this,e=a.helpers;return d.config=c,b.length&&b[0].getContext&&(b=b[0]),b.getContext&&(b=b.getContext("2d")),d.ctx=b,d.canvas=b.canvas,b.canvas.style.display=b.canvas.style.display||"block",d.width=b.canvas.width||parseInt(e.getStyle(b.canvas,"width"),10)||e.getMaximumWidth(b.canvas),d.height=b.canvas.height||parseInt(e.getStyle(b.canvas,"height"),10)||e.getMaximumHeight(b.canvas),d.aspectRatio=d.width/d.height,(isNaN(d.aspectRatio)||isFinite(d.aspectRatio)===!1)&&(d.aspectRatio=void 0!==c.aspectRatio?c.aspectRatio:2),d.originalCanvasStyleWidth=b.canvas.style.width,d.originalCanvasStyleHeight=b.canvas.style.height,e.retinaScale(d),c&&(d.controller=new a.Controller(d)),e.addResizeListener(b.canvas.parentNode,function(){d.controller&&d.controller.config.options.responsive&&d.controller.resize()}),d.controller?d.controller:d};return a.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(a){var b=[];b.push('
      ');for(var c=0;c'),a.data.datasets[c].label&&b.push(a.data.datasets[c].label),b.push("");return b.push("
    "),b.join("")}}},a.Chart=a,a}},{}],27:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.layoutService={defaults:{},addBox:function(a,b){a.boxes||(a.boxes=[]),a.boxes.push(b)},removeBox:function(a,b){a.boxes&&a.boxes.splice(a.boxes.indexOf(b),1)},update:function(a,c,d){function e(a){var b,c=a.isHorizontal();c?(b=a.update(a.options.fullWidth?p:v,u),w-=b.height):(b=a.update(t,s),v-=b.width),x.push({horizontal:c,minSize:b,box:a})}function f(a){var c=b.findNextWhere(x,function(b){return b.box===a});if(c)if(a.isHorizontal()){var d={left:y,right:z,top:0,bottom:0};a.update(a.options.fullWidth?p:v,q/2,d)}else a.update(c.minSize.width,w)}function g(a){var c=b.findNextWhere(x,function(b){return b.box===a}),d={left:0,right:0,top:A,bottom:B};c&&a.update(c.minSize.width,w,d)}function h(a){a.isHorizontal()?(a.left=a.options.fullWidth?i:y,a.right=a.options.fullWidth?c-i:y+v,a.top=F,a.bottom=F+a.height,F=a.bottom):(a.left=E,a.right=E+a.width,a.top=A,a.bottom=A+w,E=a.right)}if(a){var i=0,j=0,k=b.where(a.boxes,function(a){return"left"===a.options.position}),l=b.where(a.boxes,function(a){return"right"===a.options.position}),m=b.where(a.boxes,function(a){return"top"===a.options.position}),n=b.where(a.boxes,function(a){return"bottom"===a.options.position}),o=b.where(a.boxes,function(a){return"chartArea"===a.options.position});m.sort(function(a,b){return(b.options.fullWidth?1:0)-(a.options.fullWidth?1:0)}),n.sort(function(a,b){return(a.options.fullWidth?1:0)-(b.options.fullWidth?1:0)});var p=c-2*i,q=d-2*j,r=p/2,s=q/2,t=(c-r)/(k.length+l.length),u=(d-s)/(m.length+n.length),v=p,w=q,x=[];b.each(k.concat(l,m,n),e);var y=i,z=i,A=j,B=j;b.each(k.concat(l),f),b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m.concat(n),f),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height}),b.each(k.concat(l),g),y=i,z=i,A=j,B=j,b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height});var C=d-A-B,D=c-y-z;(D!==v||C!==w)&&(b.each(k,function(a){a.height=C}),b.each(l,function(a){a.height=C}),b.each(m,function(a){a.options.fullWidth||(a.width=D)}),b.each(n,function(a){a.options.fullWidth||(a.width=D)}),w=C,v=D);var E=i,F=j;b.each(k.concat(m),h),E+=v,F+=w,b.each(l,h),b.each(n,h),a.chartArea={left:y,top:A,right:y+v,bottom:A+w},b.each(o,function(b){b.left=a.chartArea.left,b.top=a.chartArea.top,b.right=a.chartArea.right,b.bottom=a.chartArea.bottom,b.update(v,w)})}}}}},{}],28:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(a,b){var c=b.datasetIndex,d=this.chart,e=d.getDatasetMeta(c);e.hidden=null===e.hidden?!d.data.datasets[c].hidden:null,d.update()},labels:{boxWidth:40,padding:10,generateLabels:function(a){var c=a.data;return b.isArray(c.datasets)?c.datasets.map(function(c,d){return{text:c.label,fillStyle:b.isArray(c.backgroundColor)?c.backgroundColor[0]:c.backgroundColor,hidden:!a.isDatasetVisible(d),lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,datasetIndex:d}},this):[]}}},a.Legend=a.Element.extend({initialize:function(a){b.extend(this,a),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:c,update:function(a,b,c){var d=this;return d.beforeUpdate(),d.maxWidth=a,d.maxHeight=b,d.margins=c,d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeBuildLabels(),d.buildLabels(),d.afterBuildLabels(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:c,beforeSetDimensions:c,setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0,a.minSize={width:0,height:0}},afterSetDimensions:c,beforeBuildLabels:c,buildLabels:function(){var a=this;a.legendItems=a.options.labels.generateLabels.call(a,a.chart),a.options.reverse&&a.legendItems.reverse()},afterBuildLabels:c,beforeFit:c,fit:function(){var c=this,d=c.options,e=d.labels,f=d.display,g=c.ctx,h=a.defaults.global,i=b.getValueOrDefault,j=i(e.fontSize,h.defaultFontSize),k=i(e.fontStyle,h.defaultFontStyle),l=i(e.fontFamily,h.defaultFontFamily),m=b.fontString(j,k,l),n=c.legendHitBoxes=[],o=c.minSize,p=c.isHorizontal();if(p?(o.width=c.maxWidth,o.height=f?10:0):(o.width=f?10:0,o.height=c.maxHeight),f)if(g.font=m,p){var q=c.lineWidths=[0],r=c.legendItems.length?j+e.padding:0;g.textAlign="left",g.textBaseline="top",b.each(c.legendItems,function(a,b){var d=e.boxWidth+j/2+g.measureText(a.text).width;q[q.length-1]+d+e.padding>=c.width&&(r+=j+e.padding,q[q.length]=c.left),n[b]={left:0,top:0,width:d,height:j},q[q.length-1]+=d+e.padding}),o.height+=r}else{var s=e.padding,t=c.columnWidths=[],u=e.padding,v=0,w=0,x=j+s;b.each(c.legendItems,function(a,b){var c=e.boxWidth+j/2+g.measureText(a.text).width;w+x>o.height&&(u+=v+e.padding,t.push(v),v=0,w=0),v=Math.max(v,c),w+=x,n[b]={left:0,top:0,width:c,height:j}}),u+=v,t.push(v),o.width+=u}c.width=o.width,c.height=o.height},afterFit:c,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var c=this,d=c.options,e=d.labels,f=a.defaults.global,g=f.elements.line,h=c.width,i=(c.height,c.lineWidths);if(d.display){var j,k=c.ctx,l=b.getValueOrDefault,m=l(e.fontColor,f.defaultFontColor),n=l(e.fontSize,f.defaultFontSize),o=l(e.fontStyle,f.defaultFontStyle),p=l(e.fontFamily,f.defaultFontFamily),q=b.fontString(n,o,p);k.textAlign="left",k.textBaseline="top",k.lineWidth=.5,k.strokeStyle=m,k.fillStyle=m,k.font=q;var r=e.boxWidth,s=c.legendHitBoxes,t=function(a,b,c){k.save(),k.fillStyle=l(c.fillStyle,f.defaultColor),k.lineCap=l(c.lineCap,g.borderCapStyle),k.lineDashOffset=l(c.lineDashOffset,g.borderDashOffset),k.lineJoin=l(c.lineJoin,g.borderJoinStyle),k.lineWidth=l(c.lineWidth,g.borderWidth),k.strokeStyle=l(c.strokeStyle,f.defaultColor),k.setLineDash&&k.setLineDash(l(c.lineDash,g.borderDash)),k.strokeRect(a,b,r,n),k.fillRect(a,b,r,n),k.restore()},u=function(a,b,c,d){k.fillText(c.text,r+n/2+a,b),c.hidden&&(k.beginPath(),k.lineWidth=2,k.moveTo(r+n/2+a,b+n/2),k.lineTo(r+n/2+a+d,b+n/2),k.stroke())},v=c.isHorizontal();j=v?{x:c.left+(h-i[0])/2,y:c.top+e.padding,line:0}:{x:c.left+e.padding,y:c.top,line:0};var w=n+e.padding;b.each(c.legendItems,function(a,b){var d=k.measureText(a.text).width,f=r+n/2+d,g=j.x,l=j.y;v?g+f>=h&&(l=j.y+=n+e.padding,j.line++,g=j.x=c.left+(h-i[j.line])/2):l+w>c.bottom&&(g=j.x=g+c.columnWidths[j.line]+e.padding,l=j.y=c.top,j.line++),t(g,l,a),s[b].left=g,s[b].top=l,u(g,l,a,d),v?j.x+=f+e.padding:j.y+=w})}},handleEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart.chart),e=d.x,f=d.y,g=c.options;if(e>=c.left&&e<=c.right&&f>=c.top&&f<=c.bottom)for(var h=c.legendHitBoxes,i=0;i=j.left&&e<=j.left+j.width&&f>=j.top&&f<=j.top+j.height){g.onClick&&g.onClick.call(c,a,c.legendItems[i]);break}}}}),a.plugins.register({beforeInit:function(b){var c=b.options,d=c.legend;d&&(b.legend=new a.Legend({ctx:b.chart.ctx,options:d,chart:b}),a.layoutService.addBox(b,b.legend))}})}},{}],29:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers.noop;a.plugins={_plugins:[],register:function(a){var b=this._plugins;[].concat(a).forEach(function(a){-1===b.indexOf(a)&&b.push(a)})},unregister:function(a){var b=this._plugins;[].concat(a).forEach(function(a){var c=b.indexOf(a);-1!==c&&b.splice(c,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(a,b){var c,d,e=this._plugins,f=e.length;for(c=0;f>c;++c)if(d=e[c],"function"==typeof d[a]&&d[a].apply(d,b||[])===!1)return!1;return!0}},a.PluginBase=a.Element.extend({beforeInit:b,afterInit:b,beforeUpdate:b,afterUpdate:b,beforeDraw:b,afterDraw:b,destroy:b}),a.pluginService=a.plugins}},{}],30:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(a){return b.isArray(a)?a:""+a}}},a.Scale=a.Element.extend({beforeUpdate:function(){b.callCallback(this.options.beforeUpdate,[this])},update:function(a,c,d){var e=this;return e.beforeUpdate(),e.maxWidth=a,e.maxHeight=c,e.margins=b.extend({left:0,right:0,top:0,bottom:0},d),e.beforeSetDimensions(),e.setDimensions(),e.afterSetDimensions(),e.beforeDataLimits(),e.determineDataLimits(),e.afterDataLimits(),e.beforeBuildTicks(),e.buildTicks(),e.afterBuildTicks(),e.beforeTickToLabelConversion(),e.convertTicksToLabels(),e.afterTickToLabelConversion(),e.beforeCalculateTickRotation(),e.calculateTickRotation(),e.afterCalculateTickRotation(),e.beforeFit(),e.fit(),e.afterFit(),e.afterUpdate(),e.minSize},afterUpdate:function(){b.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){b.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0},afterSetDimensions:function(){b.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){b.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:b.noop,afterDataLimits:function(){b.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){b.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:b.noop,afterBuildTicks:function(){b.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){b.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var a=this;a.ticks=a.ticks.map(function(b,c,d){return a.options.ticks.userCallback?a.options.ticks.userCallback(b,c,d):a.options.ticks.callback(b,c,d)},a)},afterTickToLabelConversion:function(){b.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){b.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var c=this,d=c.ctx,e=a.defaults.global,f=c.options.ticks,g=b.getValueOrDefault(f.fontSize,e.defaultFontSize),h=b.getValueOrDefault(f.fontStyle,e.defaultFontStyle),i=b.getValueOrDefault(f.fontFamily,e.defaultFontFamily),j=b.fontString(g,h,i);d.font=j;var k,l=d.measureText(c.ticks[0]).width,m=d.measureText(c.ticks[c.ticks.length-1]).width;if(c.labelRotation=f.minRotation||0,c.paddingRight=0,c.paddingLeft=0,c.options.display&&c.isHorizontal()){c.paddingRight=m/2+3,c.paddingLeft=l/2+3,c.longestTextCache||(c.longestTextCache={});for(var n,o,p=b.longestText(d,j,c.ticks,c.longestTextCache),q=p,r=c.getPixelForTick(1)-c.getPixelForTick(0)-6;q>r&&c.labelRotationc.yLabelWidth&&(c.paddingLeft=k+g/2),c.paddingRight=g/2,o*p>c.maxHeight){c.labelRotation--;break}c.labelRotation++,q=n*p}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0))},afterCalculateTickRotation:function(){b.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){b.callCallback(this.options.beforeFit,[this])},fit:function(){var c=this,d=c.minSize={width:0,height:0},e=c.options,f=a.defaults.global,g=e.ticks,h=e.scaleLabel,i=e.display,j=c.isHorizontal(),k=b.getValueOrDefault(g.fontSize,f.defaultFontSize),l=b.getValueOrDefault(g.fontStyle,f.defaultFontStyle),m=b.getValueOrDefault(g.fontFamily,f.defaultFontFamily),n=b.fontString(k,l,m),o=b.getValueOrDefault(h.fontSize,f.defaultFontSize),p=b.getValueOrDefault(h.fontStyle,f.defaultFontStyle),q=b.getValueOrDefault(h.fontFamily,f.defaultFontFamily),r=(b.fontString(o,p,q),e.gridLines.tickMarkLength);if(j?d.width=c.isFullWidth()?c.maxWidth-c.margins.left-c.margins.right:c.maxWidth:d.width=i?r:0,j?d.height=i?r:0:d.height=c.maxHeight,h.display&&i&&(j?d.height+=1.5*o:d.width+=1.5*o),g.display&&i){c.longestTextCache||(c.longestTextCache={});var s=b.longestText(c.ctx,n,c.ticks,c.longestTextCache),t=b.numberOfLabelLines(c.ticks),u=.5*k;if(j){c.longestLabelWidth=s;var v=Math.sin(b.toRadians(c.labelRotation))*c.longestLabelWidth+k*t+u*t;d.height=Math.min(c.maxHeight,d.height+v),c.ctx.font=n;var w=c.ctx.measureText(c.ticks[0]).width,x=c.ctx.measureText(c.ticks[c.ticks.length-1]).width,y=Math.cos(b.toRadians(c.labelRotation)),z=Math.sin(b.toRadians(c.labelRotation));c.paddingLeft=0!==c.labelRotation?y*w+3:w/2+3,c.paddingRight=0!==c.labelRotation?z*(k/2)+3:x/2+3}else{var A=c.maxWidth-d.width,B=g.mirror;B?s=0:s+=c.options.ticks.padding,A>s?d.width+=s:d.width=c.maxWidth,c.paddingTop=k/2,c.paddingBottom=k/2}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingTop=Math.max(c.paddingTop-c.margins.top,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0),c.paddingBottom=Math.max(c.paddingBottom-c.margins.bottom,0)),c.width=d.width,c.height=d.height},afterFit:function(){b.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function c(a){return null===a||"undefined"==typeof a?NaN:"number"==typeof a&&isNaN(a)?NaN:"object"==typeof a?a instanceof Date||a.isValid?a:c(this.isHorizontal()?a.x:a.y):a},getLabelForIndex:b.noop,getPixelForValue:b.noop,getValueForPixel:b.noop,getPixelForTick:function(a,b){var c=this;if(c.isHorizontal()){var d=c.width-(c.paddingLeft+c.paddingRight),e=d/Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),f=e*a+c.paddingLeft;b&&(f+=e/2);var g=c.left+Math.round(f);return g+=c.isFullWidth()?c.margins.left:0}var h=c.height-(c.paddingTop+c.paddingBottom);return c.top+a*(h/(c.ticks.length-1))},getPixelForDecimal:function(a){var b=this;if(b.isHorizontal()){var c=b.width-(b.paddingLeft+b.paddingRight),d=c*a+b.paddingLeft,e=b.left+Math.round(d);return e+=b.isFullWidth()?b.margins.left:0}return b.top+a*b.height},getBasePixel:function(){var a=this,b=a.min,c=a.max;return a.getPixelForValue(a.beginAtZero?0:0>b&&0>c?c:b>0&&c>0?b:0)},draw:function(c){var d=this,e=d.options;if(e.display){var f,g,h=d.ctx,i=a.defaults.global,j=e.ticks,k=e.gridLines,l=e.scaleLabel,m=0!==d.labelRotation,n=j.autoSkip,o=d.isHorizontal();j.maxTicksLimit&&(g=j.maxTicksLimit);var p=b.getValueOrDefault(j.fontColor,i.defaultFontColor),q=b.getValueOrDefault(j.fontSize,i.defaultFontSize),r=b.getValueOrDefault(j.fontStyle,i.defaultFontStyle),s=b.getValueOrDefault(j.fontFamily,i.defaultFontFamily),t=b.fontString(q,r,s),u=k.tickMarkLength,v=b.getValueOrDefault(l.fontColor,i.defaultFontColor),w=b.getValueOrDefault(l.fontSize,i.defaultFontSize),x=b.getValueOrDefault(l.fontStyle,i.defaultFontStyle),y=b.getValueOrDefault(l.fontFamily,i.defaultFontFamily),z=b.fontString(w,x,y),A=b.toRadians(d.labelRotation),B=Math.cos(A),C=(Math.sin(A),d.longestLabelWidth*B);h.fillStyle=p;var D=[];if(o){if(f=!1,m&&(C/=2),(C+j.autoSkipPadding)*d.ticks.length>d.width-(d.paddingLeft+d.paddingRight)&&(f=1+Math.floor((C+j.autoSkipPadding)*d.ticks.length/(d.width-(d.paddingLeft+d.paddingRight)))),g&&d.ticks.length>g)for(;!f||d.ticks.length/(f||1)>g;)f||(f=1),f+=1;n||(f=!1)}var E="right"===e.position?d.left:d.right-u,F="right"===e.position?d.left+u:d.right,G="bottom"===e.position?d.top:d.bottom-u,H="bottom"===e.position?d.top+u:d.bottom;if(b.each(d.ticks,function(a,g){if(void 0!==a&&null!==a){var h=d.ticks.length===g+1,i=f>1&&g%f>0||g%f===0&&g+f>=d.ticks.length;if((!i||h)&&void 0!==a&&null!==a){var l,n;g===("undefined"!=typeof d.zeroLineIndex?d.zeroLineIndex:0)?(l=k.zeroLineWidth,n=k.zeroLineColor):(l=b.getValueAtIndexOrDefault(k.lineWidth,g),n=b.getValueAtIndexOrDefault(k.color,g));var p,q,r,s,t,v,w,x,y,z,B,C="middle";if(o){m||(C="top"===e.position?"bottom":"top"),B=m?"right":"center";var I=d.getPixelForTick(g)+b.aliasPixel(l);y=d.getPixelForTick(g,k.offsetGridLines)+j.labelOffset,z=m?d.top+12:"top"===e.position?d.bottom-u:d.top+u,p=r=t=w=I,q=G,s=H,v=c.top,x=c.bottom}else{"left"===e.position?j.mirror?(y=d.right+j.padding,B="left"):(y=d.right-j.padding,B="right"):j.mirror?(y=d.left-j.padding,B="right"):(y=d.left+j.padding,B="left");var J=d.getPixelForTick(g);J+=b.aliasPixel(l),z=d.getPixelForTick(g,k.offsetGridLines),p=E,r=F,t=c.left,w=c.right,q=s=v=x=J}D.push({tx1:p,ty1:q,tx2:r,ty2:s,x1:t,y1:v,x2:w,y2:x,labelX:y,labelY:z,glWidth:l,glColor:n,rotation:-1*A,label:a,textBaseline:C,textAlign:B})}}}),b.each(D,function(a){if(k.display&&(h.lineWidth=a.glWidth,h.strokeStyle=a.glColor,h.beginPath(),k.drawTicks&&(h.moveTo(a.tx1,a.ty1),h.lineTo(a.tx2,a.ty2)),k.drawOnChartArea&&(h.moveTo(a.x1,a.y1),h.lineTo(a.x2,a.y2)),h.stroke()),j.display){h.save(),h.translate(a.labelX,a.labelY),h.rotate(a.rotation),h.font=t,h.textBaseline=a.textBaseline,h.textAlign=a.textAlign;var c=a.label;if(b.isArray(c))for(var d=0,e=0;db;++b){var f=a[b];if(f&&f.hasValue()){var g=f.tooltipPosition();d.push(g.x),e.push(g.y)}}var h=0,i=0;for(b=0,c-d.length;c>b;++b)h+=d[b],i+=e[b];return{x:Math.round(h/d.length),y:Math.round(i/d.length)}}function d(a){var b=a._xScale,c=a._yScale||a._scale,d=a._index,e=a._datasetIndex;return{xLabel:b?b.getLabelForIndex(d,e):"",yLabel:c?c.getLabelForIndex(d,e):"",index:d,datasetIndex:e}}var e=a.helpers;a.defaults.global.tooltips={enabled:!0,custom:null,mode:"single",backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:e.noop,title:function(a,b){var c="",d=b.labels,e=d?d.length:0;if(a.length>0){var f=a[0];f.xLabel?c=f.xLabel:e>0&&f.indexb;++b)o.push(d(j[b]));h.itemSort&&(o=o.sort(h.itemSort)),j.length>1&&e.each(o,function(a){m.push(h.callbacks.labelColor.call(g,a,l))}),e.extend(i,{title:g.getTitle(o,k),beforeBody:g.getBeforeBody(o,k),body:g.getBody(o,k),afterBody:g.getAfterBody(o,k),footer:g.getFooter(o,k),x:Math.round(n.x),y:Math.round(n.y),caretPadding:e.getValueOrDefault(n.padding,2),labelColors:m});var p=g.getTooltipSize(i);g.determineAlignment(p),e.extend(i,g.getBackgroundPoint(i,p))}else g._model.opacity=0;return a&&h.custom&&h.custom.call(g,i),g},getTooltipSize:function(a){var b=this._chart.ctx,c={height:2*a.yPadding,width:0},d=a.body,f=d.reduce(function(a,b){return a+b.before.length+b.lines.length+b.after.length},0);f+=a.beforeBody.length+a.afterBody.length;var g=a.title.length,h=a.footer.length,i=a.titleFontSize,j=a.bodyFontSize,k=a.footerFontSize;c.height+=g*i,c.height+=(g-1)*a.titleSpacing,c.height+=g?a.titleMarginBottom:0,c.height+=f*j,c.height+=f?(f-1)*a.bodySpacing:0,c.height+=h?a.footerMarginTop:0,c.height+=h*k,c.height+=h?(h-1)*a.footerSpacing:0;var l=0,m=function(a){c.width=Math.max(c.width,b.measureText(a).width+l)};return b.font=e.fontString(i,a._titleFontStyle,a._titleFontFamily),e.each(a.title,m),b.font=e.fontString(j,a._bodyFontStyle,a._bodyFontFamily),e.each(a.beforeBody.concat(a.afterBody),m),l=d.length>1?j+2:0,e.each(d,function(a){e.each(a.before,m),e.each(a.lines,m),e.each(a.after,m)}),l=0,b.font=e.fontString(k,a._footerFontStyle,a._footerFontFamily), e.each(a.footer,m),c.width+=2*a.xPadding,c},determineAlignment:function(a){var b=this,c=b._model,d=b._chart,e=b._chartInstance.chartArea;c.yd.height-a.height&&(c.yAlign="bottom");var f,g,h,i,j,k=(e.left+e.right)/2,l=(e.top+e.bottom)/2;"center"===c.yAlign?(f=function(a){return k>=a},g=function(a){return a>k}):(f=function(b){return b<=a.width/2},g=function(b){return b>=d.width-a.width/2}),h=function(b){return b+a.width>d.width},i=function(b){return b-a.width<0},j=function(a){return l>=a?"top":"bottom"},f(c.x)?(c.xAlign="left",h(c.x)&&(c.xAlign="center",c.yAlign=j(c.y))):g(c.x)&&(c.xAlign="right",i(c.x)&&(c.xAlign="center",c.yAlign=j(c.y)))},getBackgroundPoint:function(a,b){var c={x:a.x,y:a.y},d=a.caretSize,e=a.caretPadding,f=a.cornerRadius,g=a.xAlign,h=a.yAlign,i=d+e,j=f+e;return"right"===g?c.x-=b.width:"center"===g&&(c.x-=b.width/2),"top"===h?c.y+=i:"bottom"===h?c.y-=b.height+i:c.y-=b.height/2,"center"===h?"left"===g?c.x+=i:"right"===g&&(c.x-=i):"left"===g?c.x-=j:"right"===g&&(c.x+=j),c},drawCaret:function(a,b,c,d){var f,g,h,i,j,k,l=this._view,m=this._chart.ctx,n=l.caretSize,o=l.cornerRadius,p=l.xAlign,q=l.yAlign,r=a.x,s=a.y,t=b.width,u=b.height;"center"===q?("left"===p?(f=r,g=f-n,h=f):(f=r+t,g=f+n,h=f),j=s+u/2,i=j-n,k=j+n):("left"===p?(f=r+o,g=f+n,h=g+n):"right"===p?(f=r+t-o,g=f-n,h=g-n):(g=r+t/2,f=g-n,h=g+n),"top"===q?(i=s,j=i-n,k=i):(i=s+u,j=i+n,k=i));var v=e.color(l.backgroundColor);m.fillStyle=v.alpha(c*v.alpha()).rgbString(),m.beginPath(),m.moveTo(f,i),m.lineTo(g,j),m.lineTo(h,k),m.closePath(),m.fill()},drawTitle:function(a,b,c,d){var f=b.title;if(f.length){c.textAlign=b._titleAlign,c.textBaseline="top";var g=b.titleFontSize,h=b.titleSpacing,i=e.color(b.titleFontColor);c.fillStyle=i.alpha(d*i.alpha()).rgbString(),c.font=e.fontString(g,b._titleFontStyle,b._titleFontFamily);var j,k;for(j=0,k=f.length;k>j;++j)c.fillText(f[j],a.x,a.y),a.y+=g+h,j+1===f.length&&(a.y+=b.titleMarginBottom-h)}},drawBody:function(a,b,c,d){var f=b.bodyFontSize,g=b.bodySpacing,h=b.body;c.textAlign=b._bodyAlign,c.textBaseline="top";var i=e.color(b.bodyFontColor),j=i.alpha(d*i.alpha()).rgbString();c.fillStyle=j,c.font=e.fontString(f,b._bodyFontStyle,b._bodyFontFamily);var k=0,l=function(b){c.fillText(b,a.x+k,a.y),a.y+=f+g};e.each(b.beforeBody,l);var m=h.length>1;k=m?f+2:0,e.each(h,function(g,h){e.each(g.before,l),e.each(g.lines,function(g){m&&(c.fillStyle=e.color(b.legendColorBackground).alpha(d).rgbaString(),c.fillRect(a.x,a.y,f,f),c.strokeStyle=e.color(b.labelColors[h].borderColor).alpha(d).rgbaString(),c.strokeRect(a.x,a.y,f,f),c.fillStyle=e.color(b.labelColors[h].backgroundColor).alpha(d).rgbaString(),c.fillRect(a.x+1,a.y+1,f-2,f-2),c.fillStyle=j),l(g)}),e.each(g.after,l)}),k=0,e.each(b.afterBody,l),a.y-=g},drawFooter:function(a,b,c,d){var f=b.footer;if(f.length){a.y+=b.footerMarginTop,c.textAlign=b._footerAlign,c.textBaseline="top";var g=e.color(b.footerFontColor);c.fillStyle=g.alpha(d*g.alpha()).rgbString(),c.font=e.fontString(b.footerFontSize,b._footerFontStyle,b._footerFontFamily),e.each(f,function(d){c.fillText(d,a.x,a.y),a.y+=b.footerFontSize+b.footerSpacing})}},draw:function(){var a=this._chart.ctx,b=this._view;if(0!==b.opacity){var c=this.getTooltipSize(b),d={x:b.x,y:b.y},f=Math.abs(b.opacity<.001)?0:b.opacity;if(this._options.enabled){var g=e.color(b.backgroundColor);a.fillStyle=g.alpha(f*g.alpha()).rgbString(),e.drawRoundedRectangle(a,d.x,d.y,c.width,c.height,b.cornerRadius),a.fill(),this.drawCaret(d,c,f,b.caretPadding),d.x+=b.xPadding,d.y+=b.yPadding,this.drawTitle(d,b,a,f),this.drawBody(d,b,a,f),this.drawFooter(d,b,a,f)}}}})}},{}],34:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.helpers,d=a.defaults.global;d.elements.arc={backgroundColor:d.defaultColor,borderColor:"#fff",borderWidth:2},a.elements.Arc=a.Element.extend({inLabelRange:function(a){var b=this._view;return b?Math.pow(a-b.x,2)i;)i+=2*Math.PI;for(;f>i;)f-=2*Math.PI;for(;h>f;)f+=2*Math.PI;var j=f>=h&&i>=f,k=g>=d.innerRadius&&g<=d.outerRadius;return j&&k}return!1},tooltipPosition:function(){var a=this._view,b=a.startAngle+(a.endAngle-a.startAngle)/2,c=(a.outerRadius-a.innerRadius)/2+a.innerRadius;return{x:a.x+Math.cos(b)*c,y:a.y+Math.sin(b)*c}},draw:function(){var a=this._chart.ctx,b=this._view,c=b.startAngle,d=b.endAngle;a.beginPath(),a.arc(b.x,b.y,b.outerRadius,c,d),a.arc(b.x,b.y,b.innerRadius,d,c,!0),a.closePath(),a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth,a.fillStyle=b.backgroundColor,a.fill(),a.lineJoin="bevel",b.borderWidth&&a.stroke()}})}},{}],35:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global;a.defaults.global.elements.line={tension:.4,backgroundColor:c.defaultColor,borderWidth:3,borderColor:c.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0},a.elements.Line=a.Element.extend({lineToNextPoint:function(a,b,c,d,e){var f=this,g=f._chart.ctx,h=f._view?f._view.spanGaps:!1;b._view.skip&&!h?d.call(f,a,b,c):a._view.skip&&!h?e.call(f,a,b,c):0===b._view.tension?g.lineTo(b._view.x,b._view.y):g.bezierCurveTo(a._view.controlPointNextX,a._view.controlPointNextY,b._view.controlPointPreviousX,b._view.controlPointPreviousY,b._view.x,b._view.y)},draw:function(){function a(a){g._view.skip||h._view.skip?a&&f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):f.bezierCurveTo(h._view.controlPointNextX,h._view.controlPointNextY,g._view.controlPointPreviousX,g._view.controlPointPreviousY,g._view.x,g._view.y)}var d=this,e=d._view,f=d._chart.ctx,g=d._children[0],h=d._children[d._children.length-1];f.save(),d._children.length>0&&e.fill&&(f.beginPath(),b.each(d._children,function(a,c){var g=b.previousItem(d._children,c),h=b.nextItem(d._children,c);0===c?(d._loop?f.moveTo(e.scaleZero.x,e.scaleZero.y):f.moveTo(a._view.x,e.scaleZero),a._view.skip?d._loop||f.moveTo(h._view.x,d._view.scaleZero):f.lineTo(a._view.x,a._view.y)):d.lineToNextPoint(g,a,h,function(a,b,c){d._loop?f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):(f.lineTo(a._view.x,d._view.scaleZero),f.moveTo(c._view.x,d._view.scaleZero))},function(a,b){f.lineTo(b._view.x,b._view.y)})},d),d._loop?a(!0):(f.lineTo(d._children[d._children.length-1]._view.x,e.scaleZero),f.lineTo(d._children[0]._view.x,e.scaleZero)),f.fillStyle=e.backgroundColor||c.defaultColor,f.closePath(),f.fill());var i=c.elements.line;f.lineCap=e.borderCapStyle||i.borderCapStyle,f.setLineDash&&f.setLineDash(e.borderDash||i.borderDash),f.lineDashOffset=e.borderDashOffset||i.borderDashOffset,f.lineJoin=e.borderJoinStyle||i.borderJoinStyle,f.lineWidth=e.borderWidth||i.borderWidth,f.strokeStyle=e.borderColor||c.defaultColor,f.beginPath(),b.each(d._children,function(a,c){var e=b.previousItem(d._children,c),g=b.nextItem(d._children,c);0===c?f.moveTo(a._view.x,a._view.y):d.lineToNextPoint(e,a,g,function(a,b,c){f.moveTo(c._view.x,c._view.y)},function(a,b){f.moveTo(b._view.x,b._view.y)})},d),d._loop&&d._children.length>0&&a(),f.stroke(),f.restore()}})}},{}],36:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global,d=c.defaultColor;c.elements.point={radius:3,pointStyle:"circle",backgroundColor:d,borderWidth:1,borderColor:d,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},a.elements.Point=a.Element.extend({inRange:function(a,b){var c=this._view;return c?Math.pow(a-c.x,2)+Math.pow(b-c.y,2)=m)){switch(k.strokeStyle=j.borderColor||d,k.lineWidth=b.getValueOrDefault(j.borderWidth,c.elements.point.borderWidth),k.fillStyle=j.backgroundColor||d,l){default:k.beginPath(),k.arc(n,o,m,0,2*Math.PI),k.closePath(),k.fill();break;case"triangle":k.beginPath(),e=3*m/Math.sqrt(3),h=e*Math.sqrt(3)/2,k.moveTo(n-e/2,o+h/3),k.lineTo(n+e/2,o+h/3),k.lineTo(n,o-2*h/3),k.closePath(),k.fill();break;case"rect":i=1/Math.SQRT2*m,k.fillRect(n-i,o-i,2*i,2*i),k.strokeRect(n-i,o-i,2*i,2*i);break;case"rectRot":i=1/Math.SQRT2*m,k.beginPath(),k.moveTo(n-i,o),k.lineTo(n,o+i),k.lineTo(n+i,o),k.lineTo(n,o-i),k.closePath(),k.fill();break;case"cross":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"crossRot":k.beginPath(),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"star":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"line":k.beginPath(),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"dash":k.beginPath(),k.moveTo(n,o),k.lineTo(n+m,o),k.closePath()}k.stroke()}}}})}},{}],37:[function(a,b,c){"use strict";b.exports=function(a){var b=(a.helpers,a.defaults.global);b.elements.rectangle={backgroundColor:b.defaultColor,borderWidth:0,borderColor:b.defaultColor,borderSkipped:"bottom"},a.elements.Rectangle=a.Element.extend({draw:function(){function a(a){return i[(k+a)%4]}var b=this._chart.ctx,c=this._view,d=c.width/2,e=c.x-d,f=c.x+d,g=c.base-(c.base-c.y),h=c.borderWidth/2;c.borderWidth&&(e+=h,f-=h,g+=h),b.beginPath(),b.fillStyle=c.backgroundColor,b.strokeStyle=c.borderColor,b.lineWidth=c.borderWidth;var i=[[e,c.base],[e,g],[f,g],[f,c.base]],j=["bottom","left","top","right"],k=j.indexOf(c.borderSkipped,0);-1===k&&(k=0),b.moveTo.apply(b,a(0));for(var l=1;4>l;l++)b.lineTo.apply(b,a(l));b.fill(),c.borderWidth&&b.stroke()},height:function(){var a=this._view;return a.base-a.y},inRange:function(a,b){var c=this._view;return c?c.y=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.y&&b<=c.base:a>=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.base&&b<=c.y:!1},inLabelRange:function(a){var b=this._view;return b?a>=b.x-b.width/2&&a<=b.x+b.width/2:!1},tooltipPosition:function(){var a=this._view;return{x:a.x,y:a.y}}})}},{}],38:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"bottom"},d=a.Scale.extend({determineDataLimits:function(){var a=this;a.minIndex=0,a.maxIndex=a.chart.data.labels.length-1;var c;void 0!==a.options.ticks.min&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.min),a.minIndex=-1!==c?c:a.minIndex),void 0!==a.options.ticks.max&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.max),a.maxIndex=-1!==c?c:a.maxIndex),a.min=a.chart.data.labels[a.minIndex],a.max=a.chart.data.labels[a.maxIndex]},buildTicks:function(a){var b=this;b.ticks=0===b.minIndex&&b.maxIndex===b.chart.data.labels.length-1?b.chart.data.labels:b.chart.data.labels.slice(b.minIndex,b.maxIndex+1)},getLabelForIndex:function(a,b){return this.ticks[a]},getPixelForValue:function(a,b,c,d){var e=this,f=Math.max(e.maxIndex+1-e.minIndex-(e.options.gridLines.offsetGridLines?0:1),1);if(e.isHorizontal()){var g=e.width-(e.paddingLeft+e.paddingRight),h=g/f,i=h*(b-e.minIndex)+e.paddingLeft;return e.options.gridLines.offsetGridLines&&d&&(i+=h/2),e.left+Math.round(i)}var j=e.height-(e.paddingTop+e.paddingBottom),k=j/f,l=k*(b-e.minIndex)+e.paddingTop;return e.options.gridLines.offsetGridLines&&d&&(l+=k/2),e.top+Math.round(l)},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticks[a],a+this.minIndex,null,b)},getValueForPixel:function(a){var b,c=this,d=Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),e=c.isHorizontal(),f=e?c.width-(c.paddingLeft+c.paddingRight):c.height-(c.paddingTop+c.paddingBottom),g=f/d;return c.options.gridLines.offsetGridLines&&(a-=g/2),a-=e?c.paddingLeft:c.paddingTop,b=0>=a?0:Math.round(a/g)}});a.scaleService.registerScaleType("category",d,c)}},{}],39:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=d.length>3?d[2]-d[1]:d[1]-d[0];Math.abs(e)>1&&a!==Math.floor(a)&&(e=a-Math.floor(a));var f=b.log10(Math.abs(e)),g="";if(0!==a){var h=-1*Math.floor(f);h=Math.max(Math.min(h,20),0),g=a.toFixed(h)}else g="0";return g}}},d=a.LinearScaleBase.extend({determineDataLimits:function(){function a(a){return h?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=(d.ticks,c.chart),f=e.data,g=f.datasets,h=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var i={},j=!1,k=!1;b.each(g,function(f,g){var h=e.getDatasetMeta(g);void 0===i[h.type]&&(i[h.type]={positiveValues:[],negativeValues:[]});var l=i[h.type].positiveValues,m=i[h.type].negativeValues;e.isDatasetVisible(g)&&a(h)&&b.each(f.data,function(a,b){var e=+c.getRightValue(a);isNaN(e)||h.data[b].hidden||(l[b]=l[b]||0,m[b]=m[b]||0,d.relativePoints?l[b]=100:0>e?(k=!0,m[b]+=e):(j=!0,l[b]+=e))})}),b.each(i,function(a){var d=a.positiveValues.concat(a.negativeValues),e=b.min(d),f=b.max(d);c.min=null===c.min?e:Math.min(c.min,e),c.max=null===c.max?f:Math.max(c.max,f)})}else b.each(g,function(d,f){var g=e.getDatasetMeta(f);e.isDatasetVisible(f)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});this.handleTickRangeOptions()},getTickLimit:function(){var c,d=this,e=d.options.ticks;if(d.isHorizontal())c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.width/50));else{var f=b.getValueOrDefault(e.fontSize,a.defaults.global.defaultFontSize);c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.height/(2*f)))}return c},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},getPixelForValue:function(a,b,c,d){var e,f,g=this,h=g.paddingLeft,i=g.paddingBottom,j=g.start,k=+g.getRightValue(a),l=g.end-j;return g.isHorizontal()?(f=g.width-(h+g.paddingRight),e=g.left+f/l*(k-j),Math.round(e+h)):(f=g.height-(g.paddingTop+i),e=g.bottom-i-f/l*(k-j),Math.round(e))},getValueForPixel:function(a){var b=this,c=b.isHorizontal(),d=b.paddingLeft,e=b.paddingBottom,f=c?b.width-(d+b.paddingRight):b.height-(b.paddingTop+e),g=(c?a-b.left-d:b.bottom-e-a)/f;return b.start+(b.end-b.start)*g},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticksAsNumbers[a],null,null,b)}});a.scaleService.registerScaleType("linear",d,c)}},{}],40:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.LinearScaleBase=a.Scale.extend({handleTickRangeOptions:function(){var a=this,c=a.options,d=c.ticks;if(d.beginAtZero){var e=b.sign(a.min),f=b.sign(a.max);0>e&&0>f?a.max=0:e>0&&f>0&&(a.min=0)}void 0!==d.min?a.min=d.min:void 0!==d.suggestedMin&&(a.min=Math.min(a.min,d.suggestedMin)),void 0!==d.max?a.max=d.max:void 0!==d.suggestedMax&&(a.max=Math.max(a.max,d.suggestedMax)),a.min===a.max&&(a.max++,d.beginAtZero||a.min--)},getTickLimit:c,handleDirectionalChanges:c,buildTicks:function(){var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=(a.isHorizontal(),a.ticks=[]),g=a.getTickLimit();g=Math.max(2,g);var h,i=d.fixedStepSize&&d.fixedStepSize>0||d.stepSize&&d.stepSize>0;if(i)h=e(d.fixedStepSize,d.stepSize);else{var j=b.niceNum(a.max-a.min,!1);h=b.niceNum(j/(g-1),!0)}var k=Math.floor(a.min/h)*h,l=Math.ceil(a.max/h)*h,m=(l-k)/h;m=b.almostEquals(m,Math.round(m),h/1e3)?Math.round(m):Math.ceil(m),f.push(void 0!==d.min?d.min:k);for(var n=1;m>n;++n)f.push(k+n*h);f.push(void 0!==d.max?d.max:l),a.handleDirectionalChanges(),a.max=b.max(f),a.min=b.min(f),d.reverse?(f.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){var b=this;b.ticksAsNumbers=b.ticks.slice(),b.zeroLineIndex=b.ticks.indexOf(0),a.Scale.prototype.convertTicksToLabels.call(b)}})}},{}],41:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(b.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?a.toExponential():""}}},d=a.Scale.extend({determineDataLimits:function(){function a(a){return j?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=d.ticks,f=c.chart,g=f.data,h=g.datasets,i=b.getValueOrDefault,j=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var k={};b.each(h,function(e,g){var h=f.getDatasetMeta(g);f.isDatasetVisible(g)&&a(h)&&(void 0===k[h.type]&&(k[h.type]=[]),b.each(e.data,function(a,b){var e=k[h.type],f=+c.getRightValue(a);isNaN(f)||h.data[b].hidden||(e[b]=e[b]||0,d.relativePoints?e[b]=100:e[b]+=f)}))}),b.each(k,function(a){var d=b.min(a),e=b.max(a);c.min=null===c.min?d:Math.min(c.min,d),c.max=null===c.max?e:Math.max(c.max,e)})}else b.each(h,function(d,e){var g=f.getDatasetMeta(e);f.isDatasetVisible(e)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});c.min=i(e.min,c.min),c.max=i(e.max,c.max),c.min===c.max&&(0!==c.min&&null!==c.min?(c.min=Math.pow(10,Math.floor(b.log10(c.min))-1),c.max=Math.pow(10,Math.floor(b.log10(c.max))+1)):(c.min=1,c.max=10))},buildTicks:function(){for(var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=a.ticks=[],g=e(d.min,Math.pow(10,Math.floor(b.log10(a.min))));ga.max&&(a.max=d))})}}),a.handleTickRangeOptions()},getTickLimit:function(){var a=this.options.ticks,d=b.getValueOrDefault(a.fontSize,c.defaultFontSize);return Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*d)))},convertTicksToLabels:function(){var b=this;a.LinearScaleBase.prototype.convertTicksToLabels.call(b),b.pointLabels=b.chart.data.labels.map(b.options.pointLabels.callback,b)},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},fit:function(){var a,d,e,f,g,h,i,j,k,l,m,n,o=this.options.pointLabels,p=b.getValueOrDefault(o.fontSize,c.defaultFontSize),q=b.getValueOrDefault(o.fontStyle,c.defaultFontStyle),r=b.getValueOrDefault(o.fontFamily,c.defaultFontFamily),s=b.fontString(p,q,r),t=b.min([this.height/2-p-5,this.width/2]),u=this.width,v=0;for(this.ctx.font=s,d=0;du&&(u=a.x+f,g=d),a.x-fu&&(u=a.x+e,g=d):d>this.getValueCount()/2&&a.x-eb&&0>c?c:b>0&&c>0?b:0)},draw:function(){var a=this,d=a.options,e=d.gridLines,f=d.ticks,g=d.angleLines,h=d.pointLabels,i=b.getValueOrDefault;if(d.display){var j=a.ctx,k=i(f.fontSize,c.defaultFontSize),l=i(f.fontStyle,c.defaultFontStyle),m=i(f.fontFamily,c.defaultFontFamily),n=b.fontString(k,l,m);if(b.each(a.ticks,function(g,h){if(h>0||d.reverse){var l=a.getDistanceFromCenterForValue(a.ticksAsNumbers[h]),m=a.yCenter-l;if(e.display&&0!==h)if(j.strokeStyle=b.getValueAtIndexOrDefault(e.color,h-1),j.lineWidth=b.getValueAtIndexOrDefault(e.lineWidth,h-1),d.lineArc)j.beginPath(),j.arc(a.xCenter,a.yCenter,l,0,2*Math.PI),j.closePath(),j.stroke();else{j.beginPath();for(var o=0;o=0;t--){if(g.display){var u=a.getPointPosition(t,o);j.beginPath(),j.moveTo(a.xCenter,a.yCenter),j.lineTo(u.x,u.y),j.stroke(),j.closePath()}var v=a.getPointPosition(t,o+5),w=i(h.fontColor,c.defaultFontColor);j.font=s,j.fillStyle=w;var x=a.pointLabels,y=x.length,z=x.length/2,A=z/2,B=A>t||t>y-A,C=t===A||t===y-A;0===t?j.textAlign="center":t===z?j.textAlign="center":z>t?j.textAlign="left":j.textAlign="right",C?j.textBaseline="middle":B?j.textBaseline="bottom":j.textBaseline="top",j.fillText(x[t]?x[t]:"",v.x,v.y)}}}}});a.scaleService.registerScaleType("radialLinear",e,d)}},{}],43:[function(a,b,c){"use strict";var d=a(1);d="function"==typeof d?d:window.moment,b.exports=function(a){var b=a.helpers,c={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},e={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},f=a.Scale.extend({initialize:function(){if(!d)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");a.Scale.prototype.initialize.call(this)},getLabelMoment:function(a,b){return this.labelMoments[a][b]},getMomentStartOf:function(a){var b=this;return"week"===b.options.time.unit&&b.options.time.isoWeekday!==!1?a.clone().startOf("isoWeek").isoWeekday(b.options.time.isoWeekday):a.clone().startOf(b.tickUnit)},determineDataLimits:function(){var a=this;a.labelMoments=[];var c=[];a.chart.data.labels&&a.chart.data.labels.length>0?(b.each(a.chart.data.labels,function(b,d){var e=a.parseTime(b);e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),c.push(e))},a),a.firstTick=d.min.call(a,c),a.lastTick=d.max.call(a,c)):(a.firstTick=null,a.lastTick=null),b.each(a.chart.data.datasets,function(e,f){var g=[],h=a.chart.isDatasetVisible(f);"object"==typeof e.data[0]&&null!==e.data[0]?b.each(e.data,function(b,c){var e=a.parseTime(a.getRightValue(b));e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),g.push(e),h&&(a.firstTick=null!==a.firstTick?d.min(a.firstTick,e):e,a.lastTick=null!==a.lastTick?d.max(a.lastTick,e):e))},a):g=c,a.labelMoments.push(g)},a),a.options.time.min&&(a.firstTick=a.parseTime(a.options.time.min)),a.options.time.max&&(a.lastTick=a.parseTime(a.options.time.max)),a.firstTick=(a.firstTick||d()).clone(),a.lastTick=(a.lastTick||d()).clone()},buildTicks:function(d){var e=this;e.ctx.save();var f=b.getValueOrDefault(e.options.ticks.fontSize,a.defaults.global.defaultFontSize),g=b.getValueOrDefault(e.options.ticks.fontStyle,a.defaults.global.defaultFontStyle),h=b.getValueOrDefault(e.options.ticks.fontFamily,a.defaults.global.defaultFontFamily),i=b.fontString(f,g,h);if(e.ctx.font=i,e.ticks=[],e.unitScale=1,e.scaleSizeInUnits=0,e.options.time.unit)e.tickUnit=e.options.time.unit||"day",e.displayFormat=e.options.time.displayFormats[e.tickUnit],e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,1);else{var j=e.isHorizontal()?e.width-(e.paddingLeft+e.paddingRight):e.height-(e.paddingTop+e.paddingBottom),k=e.tickFormatFunction(e.firstTick,0,[]),l=e.ctx.measureText(k).width,m=Math.cos(b.toRadians(e.options.ticks.maxRotation)),n=Math.sin(b.toRadians(e.options.ticks.maxRotation));l=l*m+f*n;var o=j/l;e.tickUnit="millisecond",e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.displayFormat=e.options.time.displayFormats[e.tickUnit];for(var p=0,q=c.units[p];p=Math.ceil(e.scaleSizeInUnits/o)){e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,q.steps[r]);break}break}if(q.maxStep===!1||Math.ceil(e.scaleSizeInUnits/o)=0)break;w%e.unitScale===0&&e.ticks.push(x)}var y=e.ticks[e.ticks.length-1].diff(e.lastTick,e.tickUnit);(0!==y||0===e.scaleSizeInUnits)&&(e.options.time.max?(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.ticks[0],e.tickUnit,!0)):(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0))),e.ctx.restore()},getLabelForIndex:function(a,b){var c=this,d=c.chart.data.labels&&a"+$.i18n("totals")+":\n "+$.i18n("num-redirects",b.outputData.listData.length-1)+"\n •\n "+$.i18n("num-pageviews",b.formatNumber(b.outputData.sum))+"\n ("+b.formatNumber(Math.round(b.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform_select",projectInput:"#project_input",formStates:["initial","processing","complete","invalid"],sourceInput:"#source_input",timestampFormat:"YYYYMMDD00",validParams:{direction:["-1","1"],sort:["title","views","section"],view:["list","chart"]}};b.exports=d},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function a(a,b){for(var c=0;c"+$.i18n("totals")+"\n "+$.i18n("num-redirects",a.outputData.titles.length-1)+"\n "+$.i18n("num-sections",a.outputData.sectionCount)+"\n "+a.formatNumber(a.outputData.sum)+"\n "+a.formatNumber(Math.round(a.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),b.forEach(function(b,c){var d=b.label===a.outputData.source,e="";if(b.section){var f=a.getPageURL(a.outputData.source)+"#"+encodeURIComponent(b.section.score());e='#'+b.section+""}$("#output_list").append("\n "+(c+1)+'\n '+b.label+" "+(d?"("+$.i18n("target")+")":"")+"\n "+e+"\n "+a.formatNumber(b.sum)+"\n "+a.formatNumber(Math.round(b.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(a,b){switch(b){case"title":return a.label;case"section":return a.section;case"views":return Number(a.sum)}}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=[],g=0,h=void 0,i={},j=a.length,k=[],l=[],m=function o(a){var m=encodeURIComponent(a.title),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),p=$.ajax({url:n,dataType:"json"});f.push(p),p.done(function(b){l.push({title:a.title,section:a.fragment,items:b.items})}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title,e=b.getPageLink(a.title,b.project+".org");if(d){if(i[a.title]?i[a.title]++:i[a.title]=1,i[a.title]<3)return j++,b.rateLimit(o,100,b)(a);k.push(e)}else b.writeMessage(e+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title);h=!0}).always(function(){b.updateProgressBar(++g/j*100),g===j&&(e.resolve(l),k.length&&b.writeMessage($.i18n("api-error-timeout","
      "+k.map(function(a){return"
    • "+a+"
    • "}).join("")+"
    ")),h||simpleStorage.set(b.getCacheKey(),!0,{TTL:6e5}))})},n=this.isRequestCached()?m:this.rateLimit(m,100,this);return a.forEach(function(a){n(a)}),e}},{key:"getRedirects",value:function(a){var b=this,c=$.Deferred(),d=$.ajax({url:"https://"+this.project+".org/w/api.php",jsonp:"callback",dataType:"jsonp",data:{action:"query",format:"json",formatversion:2,prop:"redirects",rdprop:"title|fragment",rdlimit:500,titles:a}});return d.done(function(d){if(d.error)return b.setState("initial",function(){b.writeMessage($.i18n("api-error","Redirect API")+": "+d.error.info.escape())});var e=[{title:a}].concat(d.query.pages[0].redirects||[]);return c.resolve(e)}),c}},{key:"popParams",value:function(){var a=this,b=void 0,c=void 0,d=this.parseQueryString("pages");if($(this.config.projectInput).val(d.project||this.config.defaults.project),!this.validateProject()){if(this.patchUsage("rv"),d.range)this.setSpecialRange(d.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(d.start){if(b=moment(d.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(d.end||Date.now()),bc)return void this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0);this.daterangepicker.setStartDate(b),this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);$(this.config.platformSelector).val(d.platform||"all-access"),$(this.config.agentSelector).val(d.agent||"user"),["sort","direction","view"].forEach(function(b){var c=d[b];c&&a.config.validParams[b].includes(c)?(d[b]=c,a[b]=c):(d[b]=a.config.defaults.params[b],a[b]=a.config.defaults.params[b])}),d.page&&($(this.config.sourceInput).val(decodeURIComponent(d.page).descore()),this.processInput())}}},{key:"setState",value:function(a){switch($("main").removeClass(this.config.formStates.join(" ")).addClass(a),a){case"initial":this.clearMessages(),this.assignDefaults(),this.destroyChart(),$("output").removeClass("list-mode").removeClass("chart-mode"),$(".data-links").addClass("invisible"),this.typeahead&&this.typeahead.hide(),$(this.config.sourceInput).val("").focus();break;case"processing":this.processStarted(),this.clearMessages(),document.activeElement.blur(),$(".progress-bar").addClass("active");break;case"complete":this.processEnded(),this.updateProgressBar(0),$(".progress-bar").removeClass("active"),$(".data-links").removeClass("invisible");break;case"invalid":}}},{key:"processInput",value:function(){var a=this;if(!this.isRequestCached()&&simpleStorage.hasKey("pageviews-throttle")){var b=Math.round(simpleStorage.getTTL("pageviews-throttle")/1e3);if(b>0)return this.writeMessage($.i18n("api-throttle-wait",""+b+"",'phab:T124314'),!0)}var c=$(this.config.sourceInput).val();this.setState("processing"),this.getRedirects(c).done(function(b){var d=b.length;d>10&&a.setThrottle(),a.getPageViewsData(b).done(function(b){var e=a.getPageLink(decodeURIComponent(c),a.project);$(".output-title").html(e),$(".output-params").text($(a.config.dateRangeSelector).val()),a.buildMotherDataset(c,e,b),a.updateProgressBar(100),a.setInitialChartType(),a.renderData(),d>10&&a.setThrottle()})}).fail(function(b){a.setState("initial"),"string"==typeof b?a.writeMessage(b):a.writeMessage($.i18n("api-error-unknown","Wikidata"))})}},{key:"setupsourceInput",value:function(){this.typeahead&&this.typeahead.destroy(),$(this.config.sourceInput).typeahead({ajax:{url:"https://"+this.project+".org/w/api.php",timeout:200,triggerLength:1,method:"get",preDispatch:function(a){return{action:"opensearch",redirects:"resolve",format:"json",search:a}},preProcess:function(a){return a[1]}}})}},{key:"validateProject",value:function(){var a=$(this.config.projectInput).val();return this.isMultilangProject()?(this.setState("initial"),this.setupsourceInput(),!1):(this.writeMessage($.i18n("invalid-lang-project",""+a.escape()+""),!0),this.setState("invalid"),!0)}},{key:"exportCSV",value:function(){var a="data:text/csv;charset=utf-8,Title,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(b){var c='"'+b.label.descore().replace(/"/g,'""')+'"';a+=[c].concat(b.data).join(",")+"\n"});var b=encodeURI(a);window.open(b)}},{key:"getExportFilename",value:function(){var a=this.getParams(!0);return this.outputData.source+"-"+a.start.replace(/-/g,"")+"-"+a.end.replace(/-/g,"")}},{key:"baseProject",get:function(){return this.project.split(".")[1]}},{key:"typeahead",get:function(){return $(this.config.sourceInput).data("typeahead")}}]),b}(mix(l)["with"](m,n));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new o})},{"../shared/chart_helpers":3,"../shared/list_helpers":5,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
      "+i.map(function(a){return"
    • "+b.getPageLink(a,b.project.escape())+"
    • "}).join("")+"
    ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
  • "+a+"
  • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
      "+c+"
    "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],6:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object"); -for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],7:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
    "+a+"
    ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":8}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],9:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org", -eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}]},{},[3,4,5,6,7,8,9,2]); \ No newline at end of file +sort:"views",direction:1,outputData:[],total:0,view:"list"}},linearLegend:function(a,b){return""+$.i18n("totals")+":\n "+$.i18n("num-redirects",b.outputData.listData.length-1)+"\n •\n "+$.i18n("num-pageviews",b.formatNumber(b.outputData.sum))+"\n ("+b.formatNumber(Math.round(b.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform_select",projectInput:"#project_input",formStates:["initial","processing","complete","invalid"],sourceInput:"#source_input",timestampFormat:"YYYYMMDD00",validParams:{direction:["-1","1"],sort:["title","views","section"],view:["list","chart"]}};b.exports=d},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function a(a,b){for(var c=0;c"+$.i18n("totals")+"\n "+$.i18n("num-redirects",a.outputData.titles.length-1)+"\n "+$.i18n("num-sections",a.outputData.sectionCount)+"\n "+a.formatNumber(a.outputData.sum)+"\n "+a.formatNumber(Math.round(a.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),b.forEach(function(b,c){var d=b.label===a.outputData.source,e="";if(b.section){var f=a.getPageURL(a.outputData.source)+"#"+encodeURIComponent(b.section.score());e='#'+b.section+""}$("#output_list").append("\n "+(c+1)+'\n '+b.label+" "+(d?"("+$.i18n("target")+")":"")+"\n "+e+"\n "+a.formatNumber(b.sum)+"\n "+a.formatNumber(Math.round(b.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(a,b){switch(b){case"title":return a.label;case"section":return a.section;case"views":return Number(a.sum)}}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=[],g=0,h=void 0,i={},j=a.length,k=[],l=[],m=function o(a){var m=encodeURIComponent(a.title),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),p=$.ajax({url:n,dataType:"json"});f.push(p),p.done(function(b){l.push({title:a.title,section:a.fragment,items:b.items})}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title,e=b.getPageLink(a.title,b.project+".org");if(d){if(i[a.title]?i[a.title]++:i[a.title]=1,i[a.title]<3)return j++,b.rateLimit(o,100,b)(a);k.push(e)}else b.writeMessage(e+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title);h=!0}).always(function(){b.updateProgressBar(++g/j*100),g===j&&(e.resolve(l),k.length&&b.writeMessage($.i18n("api-error-timeout","
      "+k.map(function(a){return"
    • "+a+"
    • "}).join("")+"
    ")),h||simpleStorage.set(b.getCacheKey(),!0,{TTL:6e5}))})},n=this.isRequestCached()?m:this.rateLimit(m,100,this);return a.forEach(function(a){n(a)}),e}},{key:"getRedirects",value:function(a){var b=this,c=$.Deferred(),d=$.ajax({url:"https://"+this.project+".org/w/api.php",jsonp:"callback",dataType:"jsonp",data:{action:"query",format:"json",formatversion:2,prop:"redirects",rdprop:"title|fragment",rdlimit:500,titles:a}});return d.done(function(d){if(d.error)return b.setState("initial",function(){b.writeMessage($.i18n("api-error","Redirect API")+": "+d.error.info.escape())});var e=[{title:a}].concat(d.query.pages[0].redirects||[]);return c.resolve(e)}),c}},{key:"popParams",value:function(){var a=this,b=this.parseQueryString("pages");$(this.config.projectInput).val(b.project||this.config.defaults.project),this.validateProject()||(this.patchUsage("rv"),this.checkDateRange(b)||delete b.page,$(this.config.platformSelector).val(b.platform||"all-access"),$(this.config.agentSelector).val(b.agent||"user"),["sort","direction","view"].forEach(function(c){var d=b[c];d&&a.config.validParams[c].includes(d)?(b[c]=d,a[c]=d):(b[c]=a.config.defaults.params[c],a[c]=a.config.defaults.params[c])}),b.page&&($(this.config.sourceInput).val(decodeURIComponent(b.page).descore()),this.processInput()))}},{key:"setState",value:function(a){switch($("main").removeClass(this.config.formStates.join(" ")).addClass(a),a){case"initial":this.clearMessages(),this.assignDefaults(),this.destroyChart(),$("output").removeClass("list-mode").removeClass("chart-mode"),$(".data-links").addClass("invisible"),this.typeahead&&this.typeahead.hide(),$(this.config.sourceInput).val("").focus();break;case"processing":this.processStarted(),this.clearMessages(),document.activeElement.blur(),$(".progress-bar").addClass("active");break;case"complete":this.processEnded(),this.updateProgressBar(0),$(".progress-bar").removeClass("active"),$(".data-links").removeClass("invisible");break;case"invalid":}}},{key:"processInput",value:function(){var a=this;if(!this.isRequestCached()&&simpleStorage.hasKey("pageviews-throttle")){var b=Math.round(simpleStorage.getTTL("pageviews-throttle")/1e3);if(b>0)return this.writeMessage($.i18n("api-throttle-wait",""+b+"",'phab:T124314'),!0)}var c=$(this.config.sourceInput).val();this.setState("processing"),this.getRedirects(c).done(function(b){var d=b.length;d>10&&a.setThrottle(),a.getPageViewsData(b).done(function(b){var e=a.getPageLink(decodeURIComponent(c),a.project);$(".output-title").html(e),$(".output-params").text($(a.config.dateRangeSelector).val()),a.buildMotherDataset(c,e,b),a.updateProgressBar(100),a.setInitialChartType(),a.renderData(),d>10&&a.setThrottle()})}).fail(function(b){a.setState("initial"),"string"==typeof b?a.writeMessage(b):a.writeMessage($.i18n("api-error-unknown","Wikidata"))})}},{key:"setupsourceInput",value:function(){this.typeahead&&this.typeahead.destroy(),$(this.config.sourceInput).typeahead({ajax:{url:"https://"+this.project+".org/w/api.php",timeout:200,triggerLength:1,method:"get",preDispatch:function(a){return{action:"opensearch",redirects:"resolve",format:"json",search:a}},preProcess:function(a){return a[1]}}})}},{key:"validateProject",value:function(){var a=$(this.config.projectInput).val();return this.isMultilangProject()?(this.setState("initial"),this.setupsourceInput(),!1):(this.writeMessage($.i18n("invalid-lang-project",""+a.escape()+""),!0),this.setState("invalid"),!0)}},{key:"exportCSV",value:function(){var a="data:text/csv;charset=utf-8,Title,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(b){var c='"'+b.label.descore().replace(/"/g,'""')+'"';a+=[c].concat(b.data).join(",")+"\n"});var b=encodeURI(a);window.open(b)}},{key:"getExportFilename",value:function(){var a=this.getParams(!0);return this.outputData.source+"-"+a.start.replace(/-/g,"")+"-"+a.end.replace(/-/g,"")}},{key:"baseProject",get:function(){return this.project.split(".")[1]}},{key:"typeahead",get:function(){return $(this.config.sourceInput).data("typeahead")}}]),b}(mix(l)["with"](m,n));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new o})},{"../shared/chart_helpers":3,"../shared/list_helpers":5,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
      "+i.map(function(a){return"
    • "+b.getPageLink(a,b.project.escape())+"
    • "}).join("")+"
    ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
  • "+a+"
  • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
      "+c+"
    "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],6:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],7:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"checkDateRange",value:function(a){if(a.range)this.setSpecialRange(a.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(a.start){var b=moment(a.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(a.end||Date.now());if(bc)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),!1;this.daterangepicker.startDate=b,this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);return!0}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
    "+a+"
    ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":8}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],9:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org", +eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}]},{},[3,4,5,6,7,8,9,2]); \ No newline at end of file diff --git a/public_html/redirectviews/redirectviews.js b/public_html/redirectviews/redirectviews.js index 746c66bec..4702c37f8 100644 --- a/public_html/redirectviews/redirectviews.js +++ b/public_html/redirectviews/redirectviews.js @@ -583,38 +583,16 @@ var RedirectViews = function (_mix$with) { value: function popParams() { var _this7 = this; - var startDate = void 0, - endDate = void 0, - params = this.parseQueryString('pages'); + var params = this.parseQueryString('pages'); $(this.config.projectInput).val(params.project || this.config.defaults.project); if (this.validateProject()) return; this.patchUsage('rv'); - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < this.config.minDate || endDate < this.config.minDate) { - this.addSiteNotice('danger', $.i18n('param-error-1', $.i18n('july') + ' 2015'), $.i18n('invalid-params'), true); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - return; - } - this.daterangepicker.setStartDate(startDate); - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); + // if date range is invalid, remove page from params so we don't process the default date range + if (!this.checkDateRange(params)) { + delete params.page; } $(this.config.platformSelector).val(params.platform || 'all-access'); @@ -2364,6 +2342,42 @@ var Pv = function (_PvConfig) { $('.site-notice').append('
    ' + markup + '
    '); } + + /** + * Check the validity of the date range of given params + * and throw errors as necessary and/or set defaults + * @param {Object} params - as returned by this.parseQueryString() + * @returns {Boolean} true if there were no errors, false otherwise + */ + + }, { + key: 'checkDateRange', + value: function checkDateRange(params) { + if (params.range) { + if (!this.setSpecialRange(params.range)) { + this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); + this.setSpecialRange(this.config.defaults.dateRange); + } + } else if (params.start) { + var startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')), + endDate = moment(params.end || Date.now()); + + if (startDate < this.config.minDate || endDate < this.config.minDate) { + this.addSiteNotice('danger', $.i18n('param-error-1', moment(this.config.minDate).format(this.dateFormat)), $.i18n('invalid-params'), true); + return false; + } else if (startDate > endDate) { + this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); + return false; + } + /** directly assign startDate before calling setEndDate so events will be fired once */ + this.daterangepicker.startDate = startDate; + this.daterangepicker.setEndDate(endDate); + } else { + this.setSpecialRange(this.config.defaults.dateRange); + } + + return true; + } }, { key: 'clearSiteNotices', value: function clearSiteNotices() { diff --git a/public_html/siteviews/application.js b/public_html/siteviews/application.js index d8ee20e70..4f478e8f3 100644 --- a/public_html/siteviews/application.js +++ b/public_html/siteviews/application.js @@ -11,6 +11,6 @@ if(this.timePicker){var h=parseInt(this.container.find(".left .hourselect").val( g.easing=f.easing,g.render=function(a,c){var d=b.easingEffects[c.easing],e=c.currentStep/c.numSteps,f=d(e);a.draw(f,e,c.currentStep)},g.onAnimationProgress=f.onProgress,g.onAnimationComplete=f.onComplete,a.animationService.addAnimation(e,g,c,d)}else e.draw(),f&&f.onComplete&&f.onComplete.call&&f.onComplete.call(e);return e},draw:function(c){var d=this,e=c||1;d.clear(),a.plugins.notify("beforeDraw",[d,e]),b.each(d.boxes,function(a){a.draw(d.chartArea)},d),d.scale&&d.scale.draw(),a.plugins.notify("beforeDatasetsDraw",[d,e]),b.each(d.data.datasets,function(a,b){d.isDatasetVisible(b)&&d.getDatasetMeta(b).controller.draw(c)},d,!0),a.plugins.notify("afterDatasetsDraw",[d,e]),d.tooltip.transition(e).draw(),a.plugins.notify("afterDraw",[d,e])},getElementAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[];return b.each(c.data.datasets,function(a,f){if(c.isDatasetVisible(f)){var g=c.getDatasetMeta(f);b.each(g.data,function(a,b){return a.inRange(d.x,d.y)?(e.push(a),e):void 0})}}),e},getElementsAtEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart),e=[],f=function(){if(c.data.datasets)for(var a=0;a0&&(b=this.getDatasetMeta(b[0]._datasetIndex).data),b},getDatasetMeta:function(a){var b=this,c=b.data.datasets[a];c._meta||(c._meta={});var d=c._meta[b.id];return d||(d=c._meta[b.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),d},getVisibleDatasetCount:function(){for(var a=0,b=0,c=this.data.datasets.length;c>b;++b)this.isDatasetVisible(b)&&a++;return a},isDatasetVisible:function(a){var b=this.getDatasetMeta(a);return"boolean"==typeof b.hidden?!b.hidden:!this.data.datasets[a].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var c=this;c.stop(),c.clear(),b.unbindEvents(c,c.events),b.removeResizeListener(c.chart.canvas.parentNode);var d=c.chart.canvas;d.width=c.chart.width,d.height=c.chart.height,void 0!==c.chart.originalDevicePixelRatio&&c.chart.ctx.scale(1/c.chart.originalDevicePixelRatio,1/c.chart.originalDevicePixelRatio),d.style.width=c.chart.originalCanvasStyleWidth,d.style.height=c.chart.originalCanvasStyleHeight,a.plugins.notify("destroy",[c]),delete a.instances[c.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var b=this;b.tooltip=new a.Tooltip({_chart:b.chart,_chartInstance:b,_data:b.data,_options:b.options.tooltips},b)},bindEvents:function(){var a=this;b.bindEvents(a,a.options.events,function(b){a.eventHandler(b)})},updateHoverStyle:function(a,b,c){var d,e,f,g=c?"setHoverStyle":"removeHoverStyle";switch(b){case"single":a=[a[0]];break;case"label":case"dataset":break;default:return}for(e=0,f=a.length;f>e;++e)d=a[e],d&&this.getDatasetMeta(d._datasetIndex).controller[g](d)},eventHandler:function(a){var c=this,d=c.tooltip,e=c.options||{},f=e.hover,g=e.tooltips;return c.lastActive=c.lastActive||[],c.lastTooltipActive=c.lastTooltipActive||[],"mouseout"===a.type?(c.active=[],c.tooltipActive=[]):(c.active=c.getElementsAtEventForMode(a,f.mode),c.tooltipActive=c.getElementsAtEventForMode(a,g.mode)),f.onHover&&f.onHover.call(c,c.active),("mouseup"===a.type||"click"===a.type)&&(e.onClick&&e.onClick.call(c,a,c.active),c.legend&&c.legend.handleEvent&&c.legend.handleEvent(a)),c.lastActive.length&&c.updateHoverStyle(c.lastActive,f.mode,!1),c.active.length&&f.mode&&c.updateHoverStyle(c.active,f.mode,!0),(g.enabled||g.custom)&&(d.initialize(),d._active=c.tooltipActive,d.update(!0)),d.pivot(),c.animating||b.arrayEquals(c.active,c.lastActive)&&b.arrayEquals(c.tooltipActive,c.lastTooltipActive)||(c.stop(),(g.enabled||g.custom)&&d.update(!0),c.render(f.animationDuration,!0)),c.lastActive=c.active,c.lastTooltipActive=c.tooltipActive,c}})}},{}],23:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.DatasetController=function(a,b){this.initialize.call(this,a,b)},b.extend(a.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(a,b){var c=this;c.chart=a,c.index=b,c.linkScales(),c.addElements()},updateIndex:function(a){this.index=a},linkScales:function(){var a=this,b=a.getMeta(),c=a.getDataset();null===b.xAxisID&&(b.xAxisID=c.xAxisID||a.chart.options.scales.xAxes[0].id),null===b.yAxisID&&(b.yAxisID=c.yAxisID||a.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(a){return this.chart.scales[a]},reset:function(){this.update(!0)},createMetaDataset:function(){var a=this,b=a.datasetElementType;return b&&new b({_chart:a.chart.chart,_datasetIndex:a.index})},createMetaData:function(a){var b=this,c=b.dataElementType;return c&&new c({_chart:b.chart.chart,_datasetIndex:b.index,_index:a})},addElements:function(){var a,b,c=this,d=c.getMeta(),e=c.getDataset().data||[],f=d.data;for(a=0,b=e.length;b>a;++a)f[a]=f[a]||c.createMetaData(d,a);d.dataset=d.dataset||c.createMetaDataset()},addElementAndReset:function(a){var b=this,c=b.createMetaData(a);b.getMeta().data.splice(a,0,c),b.updateElement(c,a,!0)},buildOrUpdateElements:function(){var a=this.getMeta(),b=a.data,c=this.getDataset().data.length,d=b.length;if(d>c)b.splice(c,d-c);else if(c>d)for(var e=d;c>e;++e)this.addElementAndReset(e)},update:c,draw:function(a){var c=a||1;b.each(this.getMeta().data,function(a,b){a.transition(c).draw()})},removeHoverStyle:function(a,c){var d=this.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=b.getValueAtIndexOrDefault,h=(b.color,a._model);h.backgroundColor=f.backgroundColor?f.backgroundColor:g(d.backgroundColor,e,c.backgroundColor),h.borderColor=f.borderColor?f.borderColor:g(d.borderColor,e,c.borderColor),h.borderWidth=f.borderWidth?f.borderWidth:g(d.borderWidth,e,c.borderWidth)},setHoverStyle:function(a){var c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=b.getValueAtIndexOrDefault,g=(b.color,b.getHoverColor),h=a._model;h.backgroundColor=e.hoverBackgroundColor?e.hoverBackgroundColor:f(c.hoverBackgroundColor,d,g(h.backgroundColor)),h.borderColor=e.hoverBorderColor?e.hoverBorderColor:f(c.hoverBorderColor,d,g(h.borderColor)),h.borderWidth=e.hoverBorderWidth?e.hoverBorderWidth:f(c.hoverBorderWidth,d,h.borderWidth)}}),a.DatasetController.extend=b.inherits}},{}],24:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.elements={},a.Element=function(a){b.extend(this,a),this.initialize.apply(this,arguments)},b.extend(a.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var a=this;return a._view||(a._view=b.clone(a._model)),a._start=b.clone(a._view),a},transition:function(a){var c=this;return c._view||(c._view=b.clone(c._model)),1===a?(c._view=c._model,c._start=null,c):(c._start||c.pivot(),b.each(c._model,function(d,e){if("_"===e[0]);else if(c._view.hasOwnProperty(e))if(d===c._view[e]);else if("string"==typeof d)try{var f=b.color(c._model[e]).mix(b.color(c._start[e]),a);c._view[e]=f.rgbString()}catch(g){c._view[e]=d}else if("number"==typeof d){var h=void 0!==c._start[e]&&isNaN(c._start[e])===!1?c._start[e]:0;c._view[e]=(c._model[e]-h)*a+h}else c._view[e]=d;else"number"!=typeof d||isNaN(c._view[e])?c._view[e]=d:c._view[e]=d*a},c),c)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return b.isNumber(this._model.x)&&b.isNumber(this._model.y)}}),a.Element.extend=b.inherits}},{}],25:[function(a,b,c){"use strict";var d=a(3);b.exports=function(a){function b(a,b,c){var d;return"string"==typeof a?(d=parseInt(a,10),-1!=a.indexOf("%")&&(d=d/100*b.parentNode[c])):d=a,d}function c(a){return void 0!==a&&null!==a&&"none"!==a}function e(a,d,e){var f=document.defaultView,g=a.parentNode,h=f.getComputedStyle(a)[d],i=f.getComputedStyle(g)[d],j=c(h),k=c(i),l=Number.POSITIVE_INFINITY;return j||k?Math.min(j?b(h,a,e):l,k?b(i,g,e):l):"none"}var f=a.helpers={};f.each=function(a,b,c,d){var e,g;if(f.isArray(a))if(g=a.length,d)for(e=g-1;e>=0;e--)b.call(c,a[e],e);else for(e=0;g>e;e++)b.call(c,a[e],e);else if("object"==typeof a){var h=Object.keys(a);for(g=h.length,e=0;g>e;e++)b.call(c,a[h[e]],h[e])}},f.clone=function(a){var b={};return f.each(a,function(a,c){f.isArray(a)?b[c]=a.slice(0):"object"==typeof a&&null!==a?b[c]=f.clone(a):b[c]=a}),b},f.extend=function(a){for(var b=function(b,c){a[c]=b},c=1,d=arguments.length;d>c;c++)f.each(arguments[c],b);return a},f.configMerge=function(b){var c=f.clone(b);return f.each(Array.prototype.slice.call(arguments,1),function(b){f.each(b,function(b,d){if("scales"===d)c[d]=f.scaleMerge(c.hasOwnProperty(d)?c[d]:{},b);else if("scale"===d)c[d]=f.configMerge(c.hasOwnProperty(d)?c[d]:{},a.scaleService.getScaleDefaults(b.type),b);else if(c.hasOwnProperty(d)&&f.isArray(c[d])&&f.isArray(b)){var e=c[d];f.each(b,function(a,b){b=d[c].length||!d[c][e].type?d[c].push(f.configMerge(h,b)):b.type&&b.type!==d[c][e].type?d[c][e]=f.configMerge(d[c][e],h,b):d[c][e]=f.configMerge(d[c][e],b)}):(d[c]=[],f.each(b,function(b){var e=f.getValueOrDefault(b.type,"xAxes"===c?"category":"linear");d[c].push(f.configMerge(a.scaleService.getScaleDefaults(e),b))})):d.hasOwnProperty(c)&&"object"==typeof d[c]&&null!==d[c]&&"object"==typeof b?d[c]=f.configMerge(d[c],b):d[c]=b}),d},f.getValueAtIndexOrDefault=function(a,b,c){return void 0===a||null===a?c:f.isArray(a)?bc;++c)if(a[c]===b)return c;return-1},f.where=function(a,b){if(f.isArray(a)&&Array.prototype.filter)return a.filter(b);var c=[];return f.each(a,function(a){b(a)&&c.push(a)}),c},f.findIndex=Array.prototype.findIndex?function(a,b,c){return a.findIndex(b,c)}:function(a,b,c){c=void 0===c?a:c;for(var d=0,e=a.length;e>d;++d)if(b.call(c,a[d],d,a))return d;return-1},f.findNextWhere=function(a,b,c){(void 0===c||null===c)&&(c=-1);for(var d=c+1;d=0;d--){var e=a[d];if(b(e))return e}},f.inherits=function(a){var b=this,c=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return b.apply(this,arguments)},d=function(){this.constructor=c};return d.prototype=b.prototype,c.prototype=new d,c.extend=f.inherits,a&&f.extend(c.prototype,a),c.__super__=b.prototype,c},f.noop=function(){},f.uid=function(){var a=0;return function(){return a++}}(),f.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},f.almostEquals=function(a,b,c){return Math.abs(a-b)0?1:-1},f.log10=Math.log10?function(a){return Math.log10(a)}:function(a){return Math.log(a)/Math.LN10},f.toRadians=function(a){return a*(Math.PI/180)},f.toDegrees=function(a){return a*(180/Math.PI)},f.getAngleFromPoint=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=Math.sqrt(c*c+d*d),f=Math.atan2(d,c);return f<-.5*Math.PI&&(f+=2*Math.PI),{angle:f,distance:e}},f.aliasPixel=function(a){return a%2===0?0:.5},f.splineCurve=function(a,b,c,d){var e=a.skip?b:a,f=b,g=c.skip?b:c,h=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),i=Math.sqrt(Math.pow(g.x-f.x,2)+Math.pow(g.y-f.y,2)),j=h/(h+i),k=i/(h+i);j=isNaN(j)?0:j,k=isNaN(k)?0:k;var l=d*j,m=d*k;return{previous:{x:f.x-l*(g.x-e.x),y:f.y-l*(g.y-e.y)},next:{x:f.x+m*(g.x-e.x),y:f.y+m*(g.y-e.y)}}},f.nextItem=function(a,b,c){return c?b>=a.length-1?a[0]:a[b+1]:b>=a.length-1?a[a.length-1]:a[b+1]},f.previousItem=function(a,b,c){return c?0>=b?a[a.length-1]:a[b-1]:0>=b?a[0]:a[b-1]},f.niceNum=function(a,b){var c,d=Math.floor(f.log10(a)),e=a/Math.pow(10,d);return c=b?1.5>e?1:3>e?2:7>e?5:10:1>=e?1:2>=e?2:5>=e?5:10,c*Math.pow(10,d)};var g=f.easingEffects={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return(a/=.5)<1?.5*a*a:-.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var b=1.70158,c=0,d=1;return 0===a?0:1===(a/=1)?1:(c||(c=.3),da?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)):d*Math.pow(2,-10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)*.5+1)},easeInBack:function(a){var b=1.70158;return 1*(a/=1)*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return 1*((a=a/1-1)*a*((b+1)*a+b)+1)},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},easeInBounce:function(a){return 1-g.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):2/2.75>a?1*(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},easeInOutBounce:function(a){return.5>a?.5*g.easeInBounce(2*a):.5*g.easeOutBounce(2*a-1)+.5}};f.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),f.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1e3/60)}}(),f.getRelativePosition=function(a,b){var c,d,e=a.originalEvent||a,g=a.currentTarget||a.srcElement,h=g.getBoundingClientRect(),i=e.touches;i&&i.length>0?(c=i[0].clientX,d=i[0].clientY):(c=e.clientX,d=e.clientY);var j=parseFloat(f.getStyle(g,"padding-left")),k=parseFloat(f.getStyle(g,"padding-top")),l=parseFloat(f.getStyle(g,"padding-right")),m=parseFloat(f.getStyle(g,"padding-bottom")),n=h.right-h.left-j-l,o=h.bottom-h.top-k-m;return c=Math.round((c-h.left-j)/n*g.width/b.currentDevicePixelRatio),d=Math.round((d-h.top-k)/o*g.height/b.currentDevicePixelRatio),{x:c,y:d}},f.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},f.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=f.noop},f.bindEvents=function(a,b,c){var d=a.events=a.events||{};f.each(b,function(b){d[b]=function(){c.apply(a,arguments)},f.addEvent(a.chart.canvas,b,d[b])})},f.unbindEvents=function(a,b){var c=a.chart.canvas;f.each(b,function(a,b){f.removeEvent(c,b,a)})},f.getConstraintWidth=function(a){return e(a,"max-width","clientWidth")},f.getConstraintHeight=function(a){return e(a,"max-height","clientHeight")},f.getMaximumWidth=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-left"))+parseInt(f.getStyle(b,"padding-right")),d=b.clientWidth-c,e=f.getConstraintWidth(a);return isNaN(e)?d:Math.min(d,e)},f.getMaximumHeight=function(a){var b=a.parentNode,c=parseInt(f.getStyle(b,"padding-top"))+parseInt(f.getStyle(b,"padding-bottom")),d=b.clientHeight-c,e=f.getConstraintHeight(a);return isNaN(e)?d:Math.min(d,e)},f.getStyle=function(a,b){return a.currentStyle?a.currentStyle[b]:document.defaultView.getComputedStyle(a,null).getPropertyValue(b)},f.retinaScale=function(a){var b=a.ctx,c=a.canvas,d=c.width,e=c.height,f=a.currentDevicePixelRatio=window.devicePixelRatio||1;1!==f&&(c.height=e*f,c.width=d*f,b.scale(f,f),a.originalDevicePixelRatio=a.originalDevicePixelRatio||f),c.style.width=d+"px",c.style.height=e+"px"},f.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},f.fontString=function(a,b,c){return b+" "+a+"px "+c},f.longestText=function(a,b,c,d){d=d||{};var e=d.data=d.data||{},g=d.garbageCollect=d.garbageCollect||[];d.font!==b&&(e=d.data={},g=d.garbageCollect=[],d.font=b),a.font=b;var h=0;f.each(c,function(b){void 0!==b&&null!==b&&f.isArray(b)!==!0?h=f.measureText(a,e,g,h,b):f.isArray(b)&&f.each(b,function(b){void 0===b||null===b||f.isArray(b)||(h=f.measureText(a,e,g,h,b))})});var i=g.length/2;if(i>c.length){for(var j=0;i>j;j++)delete e[g[j]];g.splice(0,i)}return h},f.measureText=function(a,b,c,d,e){var f=b[e];return f||(f=b[e]=a.measureText(e).width,c.push(e)),f>d&&(d=f),d},f.numberOfLabelLines=function(a){var b=1;return f.each(a,function(a){f.isArray(a)&&a.length>b&&(b=a.length)}),b},f.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()},f.color=function(b){return d?d(b instanceof CanvasGradient?a.defaults.global.defaultColor:b):(console.log("Color.js not found!"),b)},f.addResizeListener=function(a,b){var c=document.createElement("iframe"),d="chartjs-hidden-iframe";c.classlist?c.classlist.add(d):c.setAttribute("class",d);var e=c.style;e.width="100%",e.display="block",e.border=0,e.height=0,e.margin=0,e.position="absolute",e.left=0,e.right=0,e.top=0,e.bottom=0,a.insertBefore(c,a.firstChild),(c.contentWindow||c).onresize=function(){b&&b()}},f.removeResizeListener=function(a){var b=a.querySelector(".chartjs-hidden-iframe");b&&b.parentNode.removeChild(b)},f.isArray=Array.isArray?function(a){return Array.isArray(a)}:function(a){return"[object Array]"===Object.prototype.toString.call(a)},f.arrayEquals=function(a,b){var c,d,e,g;if(!a||!b||a.length!=b.length)return!1;for(c=0,d=a.length;d>c;++c)if(e=a[c],g=b[c],e instanceof Array&&g instanceof Array){if(!f.arrayEquals(e,g))return!1}else if(e!=g)return!1;return!0},f.callCallback=function(a,b,c){a&&"function"==typeof a.call&&a.apply(c,b)},f.getHoverColor=function(a){return a instanceof CanvasPattern?a:f.color(a).saturate(.5).darken(.1).rgbString()}}},{3:3}],26:[function(a,b,c){"use strict";b.exports=function(){var a=function(b,c){var d=this,e=a.helpers;return d.config=c,b.length&&b[0].getContext&&(b=b[0]),b.getContext&&(b=b.getContext("2d")),d.ctx=b,d.canvas=b.canvas,b.canvas.style.display=b.canvas.style.display||"block",d.width=b.canvas.width||parseInt(e.getStyle(b.canvas,"width"),10)||e.getMaximumWidth(b.canvas),d.height=b.canvas.height||parseInt(e.getStyle(b.canvas,"height"),10)||e.getMaximumHeight(b.canvas),d.aspectRatio=d.width/d.height,(isNaN(d.aspectRatio)||isFinite(d.aspectRatio)===!1)&&(d.aspectRatio=void 0!==c.aspectRatio?c.aspectRatio:2),d.originalCanvasStyleWidth=b.canvas.style.width,d.originalCanvasStyleHeight=b.canvas.style.height,e.retinaScale(d),c&&(d.controller=new a.Controller(d)),e.addResizeListener(b.canvas.parentNode,function(){d.controller&&d.controller.config.options.responsive&&d.controller.resize()}),d.controller?d.controller:d};return a.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(a){var b=[];b.push('
      ');for(var c=0;c'),a.data.datasets[c].label&&b.push(a.data.datasets[c].label),b.push("");return b.push("
    "),b.join("")}}},a.Chart=a,a}},{}],27:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.layoutService={defaults:{},addBox:function(a,b){a.boxes||(a.boxes=[]),a.boxes.push(b)},removeBox:function(a,b){a.boxes&&a.boxes.splice(a.boxes.indexOf(b),1)},update:function(a,c,d){function e(a){var b,c=a.isHorizontal();c?(b=a.update(a.options.fullWidth?p:v,u),w-=b.height):(b=a.update(t,s),v-=b.width),x.push({horizontal:c,minSize:b,box:a})}function f(a){var c=b.findNextWhere(x,function(b){return b.box===a});if(c)if(a.isHorizontal()){var d={left:y,right:z,top:0,bottom:0};a.update(a.options.fullWidth?p:v,q/2,d)}else a.update(c.minSize.width,w)}function g(a){var c=b.findNextWhere(x,function(b){return b.box===a}),d={left:0,right:0,top:A,bottom:B};c&&a.update(c.minSize.width,w,d)}function h(a){a.isHorizontal()?(a.left=a.options.fullWidth?i:y,a.right=a.options.fullWidth?c-i:y+v,a.top=F,a.bottom=F+a.height,F=a.bottom):(a.left=E,a.right=E+a.width,a.top=A,a.bottom=A+w,E=a.right)}if(a){var i=0,j=0,k=b.where(a.boxes,function(a){return"left"===a.options.position}),l=b.where(a.boxes,function(a){return"right"===a.options.position}),m=b.where(a.boxes,function(a){return"top"===a.options.position}),n=b.where(a.boxes,function(a){return"bottom"===a.options.position}),o=b.where(a.boxes,function(a){return"chartArea"===a.options.position});m.sort(function(a,b){return(b.options.fullWidth?1:0)-(a.options.fullWidth?1:0)}),n.sort(function(a,b){return(a.options.fullWidth?1:0)-(b.options.fullWidth?1:0)});var p=c-2*i,q=d-2*j,r=p/2,s=q/2,t=(c-r)/(k.length+l.length),u=(d-s)/(m.length+n.length),v=p,w=q,x=[];b.each(k.concat(l,m,n),e);var y=i,z=i,A=j,B=j;b.each(k.concat(l),f),b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m.concat(n),f),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height}),b.each(k.concat(l),g),y=i,z=i,A=j,B=j,b.each(k,function(a){y+=a.width}),b.each(l,function(a){z+=a.width}),b.each(m,function(a){A+=a.height}),b.each(n,function(a){B+=a.height});var C=d-A-B,D=c-y-z;(D!==v||C!==w)&&(b.each(k,function(a){a.height=C}),b.each(l,function(a){a.height=C}),b.each(m,function(a){a.options.fullWidth||(a.width=D)}),b.each(n,function(a){a.options.fullWidth||(a.width=D)}),w=C,v=D);var E=i,F=j;b.each(k.concat(m),h),E+=v,F+=w,b.each(l,h),b.each(n,h),a.chartArea={left:y,top:A,right:y+v,bottom:A+w},b.each(o,function(b){b.left=a.chartArea.left,b.top=a.chartArea.top,b.right=a.chartArea.right,b.bottom=a.chartArea.bottom,b.update(v,w)})}}}}},{}],28:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(a,b){var c=b.datasetIndex,d=this.chart,e=d.getDatasetMeta(c);e.hidden=null===e.hidden?!d.data.datasets[c].hidden:null,d.update()},labels:{boxWidth:40,padding:10,generateLabels:function(a){var c=a.data;return b.isArray(c.datasets)?c.datasets.map(function(c,d){return{text:c.label,fillStyle:b.isArray(c.backgroundColor)?c.backgroundColor[0]:c.backgroundColor,hidden:!a.isDatasetVisible(d),lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,datasetIndex:d}},this):[]}}},a.Legend=a.Element.extend({initialize:function(a){b.extend(this,a),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:c,update:function(a,b,c){var d=this;return d.beforeUpdate(),d.maxWidth=a,d.maxHeight=b,d.margins=c,d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeBuildLabels(),d.buildLabels(),d.afterBuildLabels(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:c,beforeSetDimensions:c,setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0,a.minSize={width:0,height:0}},afterSetDimensions:c,beforeBuildLabels:c,buildLabels:function(){var a=this;a.legendItems=a.options.labels.generateLabels.call(a,a.chart),a.options.reverse&&a.legendItems.reverse()},afterBuildLabels:c,beforeFit:c,fit:function(){var c=this,d=c.options,e=d.labels,f=d.display,g=c.ctx,h=a.defaults.global,i=b.getValueOrDefault,j=i(e.fontSize,h.defaultFontSize),k=i(e.fontStyle,h.defaultFontStyle),l=i(e.fontFamily,h.defaultFontFamily),m=b.fontString(j,k,l),n=c.legendHitBoxes=[],o=c.minSize,p=c.isHorizontal();if(p?(o.width=c.maxWidth,o.height=f?10:0):(o.width=f?10:0,o.height=c.maxHeight),f)if(g.font=m,p){var q=c.lineWidths=[0],r=c.legendItems.length?j+e.padding:0;g.textAlign="left",g.textBaseline="top",b.each(c.legendItems,function(a,b){var d=e.boxWidth+j/2+g.measureText(a.text).width;q[q.length-1]+d+e.padding>=c.width&&(r+=j+e.padding,q[q.length]=c.left),n[b]={left:0,top:0,width:d,height:j},q[q.length-1]+=d+e.padding}),o.height+=r}else{var s=e.padding,t=c.columnWidths=[],u=e.padding,v=0,w=0,x=j+s;b.each(c.legendItems,function(a,b){var c=e.boxWidth+j/2+g.measureText(a.text).width;w+x>o.height&&(u+=v+e.padding,t.push(v),v=0,w=0),v=Math.max(v,c),w+=x,n[b]={left:0,top:0,width:c,height:j}}),u+=v,t.push(v),o.width+=u}c.width=o.width,c.height=o.height},afterFit:c,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var c=this,d=c.options,e=d.labels,f=a.defaults.global,g=f.elements.line,h=c.width,i=(c.height,c.lineWidths);if(d.display){var j,k=c.ctx,l=b.getValueOrDefault,m=l(e.fontColor,f.defaultFontColor),n=l(e.fontSize,f.defaultFontSize),o=l(e.fontStyle,f.defaultFontStyle),p=l(e.fontFamily,f.defaultFontFamily),q=b.fontString(n,o,p);k.textAlign="left",k.textBaseline="top",k.lineWidth=.5,k.strokeStyle=m,k.fillStyle=m,k.font=q;var r=e.boxWidth,s=c.legendHitBoxes,t=function(a,b,c){k.save(),k.fillStyle=l(c.fillStyle,f.defaultColor),k.lineCap=l(c.lineCap,g.borderCapStyle),k.lineDashOffset=l(c.lineDashOffset,g.borderDashOffset),k.lineJoin=l(c.lineJoin,g.borderJoinStyle),k.lineWidth=l(c.lineWidth,g.borderWidth),k.strokeStyle=l(c.strokeStyle,f.defaultColor),k.setLineDash&&k.setLineDash(l(c.lineDash,g.borderDash)),k.strokeRect(a,b,r,n),k.fillRect(a,b,r,n),k.restore()},u=function(a,b,c,d){k.fillText(c.text,r+n/2+a,b),c.hidden&&(k.beginPath(),k.lineWidth=2,k.moveTo(r+n/2+a,b+n/2),k.lineTo(r+n/2+a+d,b+n/2),k.stroke())},v=c.isHorizontal();j=v?{x:c.left+(h-i[0])/2,y:c.top+e.padding,line:0}:{x:c.left+e.padding,y:c.top,line:0};var w=n+e.padding;b.each(c.legendItems,function(a,b){var d=k.measureText(a.text).width,f=r+n/2+d,g=j.x,l=j.y;v?g+f>=h&&(l=j.y+=n+e.padding,j.line++,g=j.x=c.left+(h-i[j.line])/2):l+w>c.bottom&&(g=j.x=g+c.columnWidths[j.line]+e.padding,l=j.y=c.top,j.line++),t(g,l,a),s[b].left=g,s[b].top=l,u(g,l,a,d),v?j.x+=f+e.padding:j.y+=w})}},handleEvent:function(a){var c=this,d=b.getRelativePosition(a,c.chart.chart),e=d.x,f=d.y,g=c.options;if(e>=c.left&&e<=c.right&&f>=c.top&&f<=c.bottom)for(var h=c.legendHitBoxes,i=0;i=j.left&&e<=j.left+j.width&&f>=j.top&&f<=j.top+j.height){g.onClick&&g.onClick.call(c,a,c.legendItems[i]);break}}}}),a.plugins.register({beforeInit:function(b){var c=b.options,d=c.legend;d&&(b.legend=new a.Legend({ctx:b.chart.ctx,options:d,chart:b}),a.layoutService.addBox(b,b.legend))}})}},{}],29:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers.noop;a.plugins={_plugins:[],register:function(a){var b=this._plugins;[].concat(a).forEach(function(a){-1===b.indexOf(a)&&b.push(a)})},unregister:function(a){var b=this._plugins;[].concat(a).forEach(function(a){var c=b.indexOf(a);-1!==c&&b.splice(c,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(a,b){var c,d,e=this._plugins,f=e.length;for(c=0;f>c;++c)if(d=e[c],"function"==typeof d[a]&&d[a].apply(d,b||[])===!1)return!1;return!0}},a.PluginBase=a.Element.extend({beforeInit:b,afterInit:b,beforeUpdate:b,afterUpdate:b,beforeDraw:b,afterDraw:b,destroy:b}),a.pluginService=a.plugins}},{}],30:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers;a.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(a){return b.isArray(a)?a:""+a}}},a.Scale=a.Element.extend({beforeUpdate:function(){b.callCallback(this.options.beforeUpdate,[this])},update:function(a,c,d){var e=this;return e.beforeUpdate(),e.maxWidth=a,e.maxHeight=c,e.margins=b.extend({left:0,right:0,top:0,bottom:0},d),e.beforeSetDimensions(),e.setDimensions(),e.afterSetDimensions(),e.beforeDataLimits(),e.determineDataLimits(),e.afterDataLimits(),e.beforeBuildTicks(),e.buildTicks(),e.afterBuildTicks(),e.beforeTickToLabelConversion(),e.convertTicksToLabels(),e.afterTickToLabelConversion(),e.beforeCalculateTickRotation(),e.calculateTickRotation(),e.afterCalculateTickRotation(),e.beforeFit(),e.fit(),e.afterFit(),e.afterUpdate(),e.minSize},afterUpdate:function(){b.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){b.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0},afterSetDimensions:function(){b.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){b.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:b.noop,afterDataLimits:function(){ b.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){b.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:b.noop,afterBuildTicks:function(){b.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){b.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var a=this;a.ticks=a.ticks.map(function(b,c,d){return a.options.ticks.userCallback?a.options.ticks.userCallback(b,c,d):a.options.ticks.callback(b,c,d)},a)},afterTickToLabelConversion:function(){b.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){b.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var c=this,d=c.ctx,e=a.defaults.global,f=c.options.ticks,g=b.getValueOrDefault(f.fontSize,e.defaultFontSize),h=b.getValueOrDefault(f.fontStyle,e.defaultFontStyle),i=b.getValueOrDefault(f.fontFamily,e.defaultFontFamily),j=b.fontString(g,h,i);d.font=j;var k,l=d.measureText(c.ticks[0]).width,m=d.measureText(c.ticks[c.ticks.length-1]).width;if(c.labelRotation=f.minRotation||0,c.paddingRight=0,c.paddingLeft=0,c.options.display&&c.isHorizontal()){c.paddingRight=m/2+3,c.paddingLeft=l/2+3,c.longestTextCache||(c.longestTextCache={});for(var n,o,p=b.longestText(d,j,c.ticks,c.longestTextCache),q=p,r=c.getPixelForTick(1)-c.getPixelForTick(0)-6;q>r&&c.labelRotationc.yLabelWidth&&(c.paddingLeft=k+g/2),c.paddingRight=g/2,o*p>c.maxHeight){c.labelRotation--;break}c.labelRotation++,q=n*p}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0))},afterCalculateTickRotation:function(){b.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){b.callCallback(this.options.beforeFit,[this])},fit:function(){var c=this,d=c.minSize={width:0,height:0},e=c.options,f=a.defaults.global,g=e.ticks,h=e.scaleLabel,i=e.display,j=c.isHorizontal(),k=b.getValueOrDefault(g.fontSize,f.defaultFontSize),l=b.getValueOrDefault(g.fontStyle,f.defaultFontStyle),m=b.getValueOrDefault(g.fontFamily,f.defaultFontFamily),n=b.fontString(k,l,m),o=b.getValueOrDefault(h.fontSize,f.defaultFontSize),p=b.getValueOrDefault(h.fontStyle,f.defaultFontStyle),q=b.getValueOrDefault(h.fontFamily,f.defaultFontFamily),r=(b.fontString(o,p,q),e.gridLines.tickMarkLength);if(j?d.width=c.isFullWidth()?c.maxWidth-c.margins.left-c.margins.right:c.maxWidth:d.width=i?r:0,j?d.height=i?r:0:d.height=c.maxHeight,h.display&&i&&(j?d.height+=1.5*o:d.width+=1.5*o),g.display&&i){c.longestTextCache||(c.longestTextCache={});var s=b.longestText(c.ctx,n,c.ticks,c.longestTextCache),t=b.numberOfLabelLines(c.ticks),u=.5*k;if(j){c.longestLabelWidth=s;var v=Math.sin(b.toRadians(c.labelRotation))*c.longestLabelWidth+k*t+u*t;d.height=Math.min(c.maxHeight,d.height+v),c.ctx.font=n;var w=c.ctx.measureText(c.ticks[0]).width,x=c.ctx.measureText(c.ticks[c.ticks.length-1]).width,y=Math.cos(b.toRadians(c.labelRotation)),z=Math.sin(b.toRadians(c.labelRotation));c.paddingLeft=0!==c.labelRotation?y*w+3:w/2+3,c.paddingRight=0!==c.labelRotation?z*(k/2)+3:x/2+3}else{var A=c.maxWidth-d.width,B=g.mirror;B?s=0:s+=c.options.ticks.padding,A>s?d.width+=s:d.width=c.maxWidth,c.paddingTop=k/2,c.paddingBottom=k/2}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingTop=Math.max(c.paddingTop-c.margins.top,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0),c.paddingBottom=Math.max(c.paddingBottom-c.margins.bottom,0)),c.width=d.width,c.height=d.height},afterFit:function(){b.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function c(a){return null===a||"undefined"==typeof a?NaN:"number"==typeof a&&isNaN(a)?NaN:"object"==typeof a?a instanceof Date||a.isValid?a:c(this.isHorizontal()?a.x:a.y):a},getLabelForIndex:b.noop,getPixelForValue:b.noop,getValueForPixel:b.noop,getPixelForTick:function(a,b){var c=this;if(c.isHorizontal()){var d=c.width-(c.paddingLeft+c.paddingRight),e=d/Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),f=e*a+c.paddingLeft;b&&(f+=e/2);var g=c.left+Math.round(f);return g+=c.isFullWidth()?c.margins.left:0}var h=c.height-(c.paddingTop+c.paddingBottom);return c.top+a*(h/(c.ticks.length-1))},getPixelForDecimal:function(a){var b=this;if(b.isHorizontal()){var c=b.width-(b.paddingLeft+b.paddingRight),d=c*a+b.paddingLeft,e=b.left+Math.round(d);return e+=b.isFullWidth()?b.margins.left:0}return b.top+a*b.height},getBasePixel:function(){var a=this,b=a.min,c=a.max;return a.getPixelForValue(a.beginAtZero?0:0>b&&0>c?c:b>0&&c>0?b:0)},draw:function(c){var d=this,e=d.options;if(e.display){var f,g,h=d.ctx,i=a.defaults.global,j=e.ticks,k=e.gridLines,l=e.scaleLabel,m=0!==d.labelRotation,n=j.autoSkip,o=d.isHorizontal();j.maxTicksLimit&&(g=j.maxTicksLimit);var p=b.getValueOrDefault(j.fontColor,i.defaultFontColor),q=b.getValueOrDefault(j.fontSize,i.defaultFontSize),r=b.getValueOrDefault(j.fontStyle,i.defaultFontStyle),s=b.getValueOrDefault(j.fontFamily,i.defaultFontFamily),t=b.fontString(q,r,s),u=k.tickMarkLength,v=b.getValueOrDefault(l.fontColor,i.defaultFontColor),w=b.getValueOrDefault(l.fontSize,i.defaultFontSize),x=b.getValueOrDefault(l.fontStyle,i.defaultFontStyle),y=b.getValueOrDefault(l.fontFamily,i.defaultFontFamily),z=b.fontString(w,x,y),A=b.toRadians(d.labelRotation),B=Math.cos(A),C=(Math.sin(A),d.longestLabelWidth*B);h.fillStyle=p;var D=[];if(o){if(f=!1,m&&(C/=2),(C+j.autoSkipPadding)*d.ticks.length>d.width-(d.paddingLeft+d.paddingRight)&&(f=1+Math.floor((C+j.autoSkipPadding)*d.ticks.length/(d.width-(d.paddingLeft+d.paddingRight)))),g&&d.ticks.length>g)for(;!f||d.ticks.length/(f||1)>g;)f||(f=1),f+=1;n||(f=!1)}var E="right"===e.position?d.left:d.right-u,F="right"===e.position?d.left+u:d.right,G="bottom"===e.position?d.top:d.bottom-u,H="bottom"===e.position?d.top+u:d.bottom;if(b.each(d.ticks,function(a,g){if(void 0!==a&&null!==a){var h=d.ticks.length===g+1,i=f>1&&g%f>0||g%f===0&&g+f>=d.ticks.length;if((!i||h)&&void 0!==a&&null!==a){var l,n;g===("undefined"!=typeof d.zeroLineIndex?d.zeroLineIndex:0)?(l=k.zeroLineWidth,n=k.zeroLineColor):(l=b.getValueAtIndexOrDefault(k.lineWidth,g),n=b.getValueAtIndexOrDefault(k.color,g));var p,q,r,s,t,v,w,x,y,z,B,C="middle";if(o){m||(C="top"===e.position?"bottom":"top"),B=m?"right":"center";var I=d.getPixelForTick(g)+b.aliasPixel(l);y=d.getPixelForTick(g,k.offsetGridLines)+j.labelOffset,z=m?d.top+12:"top"===e.position?d.bottom-u:d.top+u,p=r=t=w=I,q=G,s=H,v=c.top,x=c.bottom}else{"left"===e.position?j.mirror?(y=d.right+j.padding,B="left"):(y=d.right-j.padding,B="right"):j.mirror?(y=d.left-j.padding,B="right"):(y=d.left+j.padding,B="left");var J=d.getPixelForTick(g);J+=b.aliasPixel(l),z=d.getPixelForTick(g,k.offsetGridLines),p=E,r=F,t=c.left,w=c.right,q=s=v=x=J}D.push({tx1:p,ty1:q,tx2:r,ty2:s,x1:t,y1:v,x2:w,y2:x,labelX:y,labelY:z,glWidth:l,glColor:n,rotation:-1*A,label:a,textBaseline:C,textAlign:B})}}}),b.each(D,function(a){if(k.display&&(h.lineWidth=a.glWidth,h.strokeStyle=a.glColor,h.beginPath(),k.drawTicks&&(h.moveTo(a.tx1,a.ty1),h.lineTo(a.tx2,a.ty2)),k.drawOnChartArea&&(h.moveTo(a.x1,a.y1),h.lineTo(a.x2,a.y2)),h.stroke()),j.display){h.save(),h.translate(a.labelX,a.labelY),h.rotate(a.rotation),h.font=t,h.textBaseline=a.textBaseline,h.textAlign=a.textAlign;var c=a.label;if(b.isArray(c))for(var d=0,e=0;db;++b){var f=a[b];if(f&&f.hasValue()){var g=f.tooltipPosition();d.push(g.x),e.push(g.y)}}var h=0,i=0;for(b=0,c-d.length;c>b;++b)h+=d[b],i+=e[b];return{x:Math.round(h/d.length),y:Math.round(i/d.length)}}function d(a){var b=a._xScale,c=a._yScale||a._scale,d=a._index,e=a._datasetIndex;return{xLabel:b?b.getLabelForIndex(d,e):"",yLabel:c?c.getLabelForIndex(d,e):"",index:d,datasetIndex:e}}var e=a.helpers;a.defaults.global.tooltips={enabled:!0,custom:null,mode:"single",backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:e.noop,title:function(a,b){var c="",d=b.labels,e=d?d.length:0;if(a.length>0){var f=a[0];f.xLabel?c=f.xLabel:e>0&&f.indexb;++b)o.push(d(j[b]));h.itemSort&&(o=o.sort(h.itemSort)),j.length>1&&e.each(o,function(a){m.push(h.callbacks.labelColor.call(g,a,l))}),e.extend(i,{title:g.getTitle(o,k),beforeBody:g.getBeforeBody(o,k),body:g.getBody(o,k),afterBody:g.getAfterBody(o,k),footer:g.getFooter(o,k),x:Math.round(n.x),y:Math.round(n.y),caretPadding:e.getValueOrDefault(n.padding,2),labelColors:m});var p=g.getTooltipSize(i);g.determineAlignment(p),e.extend(i,g.getBackgroundPoint(i,p))}else g._model.opacity=0;return a&&h.custom&&h.custom.call(g,i),g},getTooltipSize:function(a){var b=this._chart.ctx,c={height:2*a.yPadding,width:0},d=a.body,f=d.reduce(function(a,b){return a+b.before.length+b.lines.length+b.after.length},0);f+=a.beforeBody.length+a.afterBody.length;var g=a.title.length,h=a.footer.length,i=a.titleFontSize,j=a.bodyFontSize,k=a.footerFontSize;c.height+=g*i,c.height+=(g-1)*a.titleSpacing,c.height+=g?a.titleMarginBottom:0,c.height+=f*j,c.height+=f?(f-1)*a.bodySpacing:0,c.height+=h?a.footerMarginTop:0,c.height+=h*k,c.height+=h?(h-1)*a.footerSpacing:0;var l=0,m=function(a){c.width=Math.max(c.width,b.measureText(a).width+l)};return b.font=e.fontString(i,a._titleFontStyle,a._titleFontFamily),e.each(a.title,m),b.font=e.fontString(j,a._bodyFontStyle,a._bodyFontFamily),e.each(a.beforeBody.concat(a.afterBody),m),l=d.length>1?j+2:0,e.each(d,function(a){e.each(a.before,m),e.each(a.lines,m),e.each(a.after,m)}),l=0,b.font=e.fontString(k,a._footerFontStyle,a._footerFontFamily),e.each(a.footer,m),c.width+=2*a.xPadding,c},determineAlignment:function(a){var b=this,c=b._model,d=b._chart,e=b._chartInstance.chartArea;c.yd.height-a.height&&(c.yAlign="bottom");var f,g,h,i,j,k=(e.left+e.right)/2,l=(e.top+e.bottom)/2;"center"===c.yAlign?(f=function(a){return k>=a},g=function(a){return a>k}):(f=function(b){return b<=a.width/2},g=function(b){return b>=d.width-a.width/2}),h=function(b){return b+a.width>d.width},i=function(b){return b-a.width<0},j=function(a){return l>=a?"top":"bottom"},f(c.x)?(c.xAlign="left",h(c.x)&&(c.xAlign="center",c.yAlign=j(c.y))):g(c.x)&&(c.xAlign="right",i(c.x)&&(c.xAlign="center",c.yAlign=j(c.y)))},getBackgroundPoint:function(a,b){var c={x:a.x,y:a.y},d=a.caretSize,e=a.caretPadding,f=a.cornerRadius,g=a.xAlign,h=a.yAlign,i=d+e,j=f+e;return"right"===g?c.x-=b.width:"center"===g&&(c.x-=b.width/2),"top"===h?c.y+=i:"bottom"===h?c.y-=b.height+i:c.y-=b.height/2,"center"===h?"left"===g?c.x+=i:"right"===g&&(c.x-=i):"left"===g?c.x-=j:"right"===g&&(c.x+=j),c},drawCaret:function(a,b,c,d){var f,g,h,i,j,k,l=this._view,m=this._chart.ctx,n=l.caretSize,o=l.cornerRadius,p=l.xAlign,q=l.yAlign,r=a.x,s=a.y,t=b.width,u=b.height;"center"===q?("left"===p?(f=r,g=f-n,h=f):(f=r+t,g=f+n,h=f),j=s+u/2,i=j-n,k=j+n):("left"===p?(f=r+o,g=f+n,h=g+n):"right"===p?(f=r+t-o,g=f-n,h=g-n):(g=r+t/2,f=g-n,h=g+n),"top"===q?(i=s,j=i-n,k=i):(i=s+u,j=i+n,k=i));var v=e.color(l.backgroundColor);m.fillStyle=v.alpha(c*v.alpha()).rgbString(),m.beginPath(),m.moveTo(f,i),m.lineTo(g,j),m.lineTo(h,k),m.closePath(),m.fill()},drawTitle:function(a,b,c,d){var f=b.title;if(f.length){c.textAlign=b._titleAlign,c.textBaseline="top";var g=b.titleFontSize,h=b.titleSpacing,i=e.color(b.titleFontColor);c.fillStyle=i.alpha(d*i.alpha()).rgbString(),c.font=e.fontString(g,b._titleFontStyle,b._titleFontFamily);var j,k;for(j=0,k=f.length;k>j;++j)c.fillText(f[j],a.x,a.y),a.y+=g+h,j+1===f.length&&(a.y+=b.titleMarginBottom-h)}},drawBody:function(a,b,c,d){var f=b.bodyFontSize,g=b.bodySpacing,h=b.body;c.textAlign=b._bodyAlign,c.textBaseline="top";var i=e.color(b.bodyFontColor),j=i.alpha(d*i.alpha()).rgbString();c.fillStyle=j,c.font=e.fontString(f,b._bodyFontStyle,b._bodyFontFamily);var k=0,l=function(b){c.fillText(b,a.x+k,a.y),a.y+=f+g};e.each(b.beforeBody,l);var m=h.length>1;k=m?f+2:0,e.each(h,function(g,h){e.each(g.before,l),e.each(g.lines,function(g){m&&(c.fillStyle=e.color(b.legendColorBackground).alpha(d).rgbaString(),c.fillRect(a.x,a.y,f,f),c.strokeStyle=e.color(b.labelColors[h].borderColor).alpha(d).rgbaString(),c.strokeRect(a.x,a.y,f,f),c.fillStyle=e.color(b.labelColors[h].backgroundColor).alpha(d).rgbaString(),c.fillRect(a.x+1,a.y+1,f-2,f-2),c.fillStyle=j),l(g)}),e.each(g.after,l)}),k=0,e.each(b.afterBody,l),a.y-=g},drawFooter:function(a,b,c,d){var f=b.footer;if(f.length){a.y+=b.footerMarginTop,c.textAlign=b._footerAlign,c.textBaseline="top";var g=e.color(b.footerFontColor);c.fillStyle=g.alpha(d*g.alpha()).rgbString(),c.font=e.fontString(b.footerFontSize,b._footerFontStyle,b._footerFontFamily),e.each(f,function(d){c.fillText(d,a.x,a.y),a.y+=b.footerFontSize+b.footerSpacing})}},draw:function(){var a=this._chart.ctx,b=this._view;if(0!==b.opacity){var c=this.getTooltipSize(b),d={x:b.x,y:b.y},f=Math.abs(b.opacity<.001)?0:b.opacity;if(this._options.enabled){var g=e.color(b.backgroundColor);a.fillStyle=g.alpha(f*g.alpha()).rgbString(),e.drawRoundedRectangle(a,d.x,d.y,c.width,c.height,b.cornerRadius),a.fill(),this.drawCaret(d,c,f,b.caretPadding),d.x+=b.xPadding,d.y+=b.yPadding,this.drawTitle(d,b,a,f),this.drawBody(d,b,a,f),this.drawFooter(d,b,a,f)}}}})}},{}],34:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.helpers,d=a.defaults.global;d.elements.arc={backgroundColor:d.defaultColor,borderColor:"#fff",borderWidth:2},a.elements.Arc=a.Element.extend({inLabelRange:function(a){var b=this._view;return b?Math.pow(a-b.x,2)i;)i+=2*Math.PI;for(;f>i;)f-=2*Math.PI;for(;h>f;)f+=2*Math.PI;var j=f>=h&&i>=f,k=g>=d.innerRadius&&g<=d.outerRadius;return j&&k}return!1},tooltipPosition:function(){var a=this._view,b=a.startAngle+(a.endAngle-a.startAngle)/2,c=(a.outerRadius-a.innerRadius)/2+a.innerRadius;return{x:a.x+Math.cos(b)*c,y:a.y+Math.sin(b)*c}},draw:function(){var a=this._chart.ctx,b=this._view,c=b.startAngle,d=b.endAngle;a.beginPath(),a.arc(b.x,b.y,b.outerRadius,c,d),a.arc(b.x,b.y,b.innerRadius,d,c,!0),a.closePath(),a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth,a.fillStyle=b.backgroundColor,a.fill(),a.lineJoin="bevel",b.borderWidth&&a.stroke()}})}},{}],35:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global;a.defaults.global.elements.line={tension:.4,backgroundColor:c.defaultColor,borderWidth:3,borderColor:c.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0},a.elements.Line=a.Element.extend({lineToNextPoint:function(a,b,c,d,e){var f=this,g=f._chart.ctx,h=f._view?f._view.spanGaps:!1;b._view.skip&&!h?d.call(f,a,b,c):a._view.skip&&!h?e.call(f,a,b,c):0===b._view.tension?g.lineTo(b._view.x,b._view.y):g.bezierCurveTo(a._view.controlPointNextX,a._view.controlPointNextY,b._view.controlPointPreviousX,b._view.controlPointPreviousY,b._view.x,b._view.y)},draw:function(){function a(a){g._view.skip||h._view.skip?a&&f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):f.bezierCurveTo(h._view.controlPointNextX,h._view.controlPointNextY,g._view.controlPointPreviousX,g._view.controlPointPreviousY,g._view.x,g._view.y)}var d=this,e=d._view,f=d._chart.ctx,g=d._children[0],h=d._children[d._children.length-1];f.save(),d._children.length>0&&e.fill&&(f.beginPath(),b.each(d._children,function(a,c){var g=b.previousItem(d._children,c),h=b.nextItem(d._children,c);0===c?(d._loop?f.moveTo(e.scaleZero.x,e.scaleZero.y):f.moveTo(a._view.x,e.scaleZero),a._view.skip?d._loop||f.moveTo(h._view.x,d._view.scaleZero):f.lineTo(a._view.x,a._view.y)):d.lineToNextPoint(g,a,h,function(a,b,c){d._loop?f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):(f.lineTo(a._view.x,d._view.scaleZero),f.moveTo(c._view.x,d._view.scaleZero))},function(a,b){f.lineTo(b._view.x,b._view.y)})},d),d._loop?a(!0):(f.lineTo(d._children[d._children.length-1]._view.x,e.scaleZero),f.lineTo(d._children[0]._view.x,e.scaleZero)),f.fillStyle=e.backgroundColor||c.defaultColor,f.closePath(),f.fill());var i=c.elements.line;f.lineCap=e.borderCapStyle||i.borderCapStyle,f.setLineDash&&f.setLineDash(e.borderDash||i.borderDash),f.lineDashOffset=e.borderDashOffset||i.borderDashOffset,f.lineJoin=e.borderJoinStyle||i.borderJoinStyle,f.lineWidth=e.borderWidth||i.borderWidth,f.strokeStyle=e.borderColor||c.defaultColor,f.beginPath(),b.each(d._children,function(a,c){var e=b.previousItem(d._children,c),g=b.nextItem(d._children,c);0===c?f.moveTo(a._view.x,a._view.y):d.lineToNextPoint(e,a,g,function(a,b,c){f.moveTo(c._view.x,c._view.y)},function(a,b){f.moveTo(b._view.x,b._view.y)})},d),d._loop&&d._children.length>0&&a(),f.stroke(),f.restore()}})}},{}],36:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=a.defaults.global,d=c.defaultColor;c.elements.point={radius:3,pointStyle:"circle",backgroundColor:d,borderWidth:1,borderColor:d,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},a.elements.Point=a.Element.extend({inRange:function(a,b){var c=this._view;return c?Math.pow(a-c.x,2)+Math.pow(b-c.y,2)=m)){switch(k.strokeStyle=j.borderColor||d,k.lineWidth=b.getValueOrDefault(j.borderWidth,c.elements.point.borderWidth),k.fillStyle=j.backgroundColor||d,l){default:k.beginPath(),k.arc(n,o,m,0,2*Math.PI),k.closePath(),k.fill();break;case"triangle":k.beginPath(),e=3*m/Math.sqrt(3),h=e*Math.sqrt(3)/2,k.moveTo(n-e/2,o+h/3),k.lineTo(n+e/2,o+h/3),k.lineTo(n,o-2*h/3),k.closePath(),k.fill();break;case"rect":i=1/Math.SQRT2*m,k.fillRect(n-i,o-i,2*i,2*i),k.strokeRect(n-i,o-i,2*i,2*i);break;case"rectRot":i=1/Math.SQRT2*m,k.beginPath(),k.moveTo(n-i,o),k.lineTo(n,o+i),k.lineTo(n+i,o),k.lineTo(n,o-i),k.closePath(),k.fill();break;case"cross":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"crossRot":k.beginPath(),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"star":k.beginPath(),k.moveTo(n,o+m),k.lineTo(n,o-m),k.moveTo(n-m,o),k.lineTo(n+m,o),f=Math.cos(Math.PI/4)*m,g=Math.sin(Math.PI/4)*m,k.moveTo(n-f,o-g),k.lineTo(n+f,o+g),k.moveTo(n-f,o+g),k.lineTo(n+f,o-g),k.closePath();break;case"line":k.beginPath(),k.moveTo(n-m,o),k.lineTo(n+m,o),k.closePath();break;case"dash":k.beginPath(),k.moveTo(n,o),k.lineTo(n+m,o),k.closePath()}k.stroke()}}}})}},{}],37:[function(a,b,c){"use strict";b.exports=function(a){var b=(a.helpers,a.defaults.global);b.elements.rectangle={backgroundColor:b.defaultColor,borderWidth:0,borderColor:b.defaultColor,borderSkipped:"bottom"},a.elements.Rectangle=a.Element.extend({draw:function(){function a(a){return i[(k+a)%4]}var b=this._chart.ctx,c=this._view,d=c.width/2,e=c.x-d,f=c.x+d,g=c.base-(c.base-c.y),h=c.borderWidth/2;c.borderWidth&&(e+=h,f-=h,g+=h),b.beginPath(),b.fillStyle=c.backgroundColor,b.strokeStyle=c.borderColor,b.lineWidth=c.borderWidth;var i=[[e,c.base],[e,g],[f,g],[f,c.base]],j=["bottom","left","top","right"],k=j.indexOf(c.borderSkipped,0);-1===k&&(k=0),b.moveTo.apply(b,a(0));for(var l=1;4>l;l++)b.lineTo.apply(b,a(l));b.fill(),c.borderWidth&&b.stroke()},height:function(){var a=this._view;return a.base-a.y},inRange:function(a,b){var c=this._view;return c?c.y=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.y&&b<=c.base:a>=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.base&&b<=c.y:!1},inLabelRange:function(a){var b=this._view;return b?a>=b.x-b.width/2&&a<=b.x+b.width/2:!1},tooltipPosition:function(){var a=this._view;return{x:a.x,y:a.y}}})}},{}],38:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"bottom"},d=a.Scale.extend({determineDataLimits:function(){var a=this;a.minIndex=0,a.maxIndex=a.chart.data.labels.length-1;var c;void 0!==a.options.ticks.min&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.min),a.minIndex=-1!==c?c:a.minIndex),void 0!==a.options.ticks.max&&(c=b.indexOf(a.chart.data.labels,a.options.ticks.max),a.maxIndex=-1!==c?c:a.maxIndex),a.min=a.chart.data.labels[a.minIndex],a.max=a.chart.data.labels[a.maxIndex]},buildTicks:function(a){var b=this;b.ticks=0===b.minIndex&&b.maxIndex===b.chart.data.labels.length-1?b.chart.data.labels:b.chart.data.labels.slice(b.minIndex,b.maxIndex+1)},getLabelForIndex:function(a,b){return this.ticks[a]},getPixelForValue:function(a,b,c,d){var e=this,f=Math.max(e.maxIndex+1-e.minIndex-(e.options.gridLines.offsetGridLines?0:1),1);if(e.isHorizontal()){var g=e.width-(e.paddingLeft+e.paddingRight),h=g/f,i=h*(b-e.minIndex)+e.paddingLeft;return e.options.gridLines.offsetGridLines&&d&&(i+=h/2),e.left+Math.round(i)}var j=e.height-(e.paddingTop+e.paddingBottom),k=j/f,l=k*(b-e.minIndex)+e.paddingTop;return e.options.gridLines.offsetGridLines&&d&&(l+=k/2),e.top+Math.round(l)},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticks[a],a+this.minIndex,null,b)},getValueForPixel:function(a){var b,c=this,d=Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),e=c.isHorizontal(),f=e?c.width-(c.paddingLeft+c.paddingRight):c.height-(c.paddingTop+c.paddingBottom),g=f/d;return c.options.gridLines.offsetGridLines&&(a-=g/2),a-=e?c.paddingLeft:c.paddingTop,b=0>=a?0:Math.round(a/g)}});a.scaleService.registerScaleType("category",d,c)}},{}],39:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=d.length>3?d[2]-d[1]:d[1]-d[0];Math.abs(e)>1&&a!==Math.floor(a)&&(e=a-Math.floor(a));var f=b.log10(Math.abs(e)),g="";if(0!==a){var h=-1*Math.floor(f);h=Math.max(Math.min(h,20),0),g=a.toFixed(h)}else g="0";return g}}},d=a.LinearScaleBase.extend({determineDataLimits:function(){function a(a){return h?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=(d.ticks,c.chart),f=e.data,g=f.datasets,h=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var i={},j=!1,k=!1;b.each(g,function(f,g){var h=e.getDatasetMeta(g);void 0===i[h.type]&&(i[h.type]={positiveValues:[],negativeValues:[]});var l=i[h.type].positiveValues,m=i[h.type].negativeValues;e.isDatasetVisible(g)&&a(h)&&b.each(f.data,function(a,b){var e=+c.getRightValue(a);isNaN(e)||h.data[b].hidden||(l[b]=l[b]||0,m[b]=m[b]||0,d.relativePoints?l[b]=100:0>e?(k=!0,m[b]+=e):(j=!0,l[b]+=e))})}),b.each(i,function(a){var d=a.positiveValues.concat(a.negativeValues),e=b.min(d),f=b.max(d);c.min=null===c.min?e:Math.min(c.min,e),c.max=null===c.max?f:Math.max(c.max,f)})}else b.each(g,function(d,f){var g=e.getDatasetMeta(f);e.isDatasetVisible(f)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});this.handleTickRangeOptions()},getTickLimit:function(){var c,d=this,e=d.options.ticks;if(d.isHorizontal())c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.width/50));else{var f=b.getValueOrDefault(e.fontSize,a.defaults.global.defaultFontSize);c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.height/(2*f)))}return c},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},getPixelForValue:function(a,b,c,d){var e,f,g=this,h=g.paddingLeft,i=g.paddingBottom,j=g.start,k=+g.getRightValue(a),l=g.end-j;return g.isHorizontal()?(f=g.width-(h+g.paddingRight),e=g.left+f/l*(k-j),Math.round(e+h)):(f=g.height-(g.paddingTop+i),e=g.bottom-i-f/l*(k-j),Math.round(e))},getValueForPixel:function(a){var b=this,c=b.isHorizontal(),d=b.paddingLeft,e=b.paddingBottom,f=c?b.width-(d+b.paddingRight):b.height-(b.paddingTop+e),g=(c?a-b.left-d:b.bottom-e-a)/f;return b.start+(b.end-b.start)*g},getPixelForTick:function(a,b){return this.getPixelForValue(this.ticksAsNumbers[a],null,null,b)}});a.scaleService.registerScaleType("linear",d,c)}},{}],40:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c=b.noop;a.LinearScaleBase=a.Scale.extend({handleTickRangeOptions:function(){var a=this,c=a.options,d=c.ticks;if(d.beginAtZero){var e=b.sign(a.min),f=b.sign(a.max);0>e&&0>f?a.max=0:e>0&&f>0&&(a.min=0)}void 0!==d.min?a.min=d.min:void 0!==d.suggestedMin&&(a.min=Math.min(a.min,d.suggestedMin)),void 0!==d.max?a.max=d.max:void 0!==d.suggestedMax&&(a.max=Math.max(a.max,d.suggestedMax)),a.min===a.max&&(a.max++,d.beginAtZero||a.min--)},getTickLimit:c,handleDirectionalChanges:c,buildTicks:function(){var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=(a.isHorizontal(), a.ticks=[]),g=a.getTickLimit();g=Math.max(2,g);var h,i=d.fixedStepSize&&d.fixedStepSize>0||d.stepSize&&d.stepSize>0;if(i)h=e(d.fixedStepSize,d.stepSize);else{var j=b.niceNum(a.max-a.min,!1);h=b.niceNum(j/(g-1),!0)}var k=Math.floor(a.min/h)*h,l=Math.ceil(a.max/h)*h,m=(l-k)/h;m=b.almostEquals(m,Math.round(m),h/1e3)?Math.round(m):Math.ceil(m),f.push(void 0!==d.min?d.min:k);for(var n=1;m>n;++n)f.push(k+n*h);f.push(void 0!==d.max?d.max:l),a.handleDirectionalChanges(),a.max=b.max(f),a.min=b.min(f),d.reverse?(f.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){var b=this;b.ticksAsNumbers=b.ticks.slice(),b.zeroLineIndex=b.ticks.indexOf(0),a.Scale.prototype.convertTicksToLabels.call(b)}})}},{}],41:[function(a,b,c){"use strict";b.exports=function(a){var b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(b.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?a.toExponential():""}}},d=a.Scale.extend({determineDataLimits:function(){function a(a){return j?a.xAxisID===c.id:a.yAxisID===c.id}var c=this,d=c.options,e=d.ticks,f=c.chart,g=f.data,h=g.datasets,i=b.getValueOrDefault,j=c.isHorizontal();if(c.min=null,c.max=null,d.stacked){var k={};b.each(h,function(e,g){var h=f.getDatasetMeta(g);f.isDatasetVisible(g)&&a(h)&&(void 0===k[h.type]&&(k[h.type]=[]),b.each(e.data,function(a,b){var e=k[h.type],f=+c.getRightValue(a);isNaN(f)||h.data[b].hidden||(e[b]=e[b]||0,d.relativePoints?e[b]=100:e[b]+=f)}))}),b.each(k,function(a){var d=b.min(a),e=b.max(a);c.min=null===c.min?d:Math.min(c.min,d),c.max=null===c.max?e:Math.max(c.max,e)})}else b.each(h,function(d,e){var g=f.getDatasetMeta(e);f.isDatasetVisible(e)&&a(g)&&b.each(d.data,function(a,b){var d=+c.getRightValue(a);isNaN(d)||g.data[b].hidden||(null===c.min?c.min=d:dc.max&&(c.max=d))})});c.min=i(e.min,c.min),c.max=i(e.max,c.max),c.min===c.max&&(0!==c.min&&null!==c.min?(c.min=Math.pow(10,Math.floor(b.log10(c.min))-1),c.max=Math.pow(10,Math.floor(b.log10(c.max))+1)):(c.min=1,c.max=10))},buildTicks:function(){for(var a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=a.ticks=[],g=e(d.min,Math.pow(10,Math.floor(b.log10(a.min))));ga.max&&(a.max=d))})}}),a.handleTickRangeOptions()},getTickLimit:function(){var a=this.options.ticks,d=b.getValueOrDefault(a.fontSize,c.defaultFontSize);return Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*d)))},convertTicksToLabels:function(){var b=this;a.LinearScaleBase.prototype.convertTicksToLabels.call(b),b.pointLabels=b.chart.data.labels.map(b.options.pointLabels.callback,b)},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},fit:function(){var a,d,e,f,g,h,i,j,k,l,m,n,o=this.options.pointLabels,p=b.getValueOrDefault(o.fontSize,c.defaultFontSize),q=b.getValueOrDefault(o.fontStyle,c.defaultFontStyle),r=b.getValueOrDefault(o.fontFamily,c.defaultFontFamily),s=b.fontString(p,q,r),t=b.min([this.height/2-p-5,this.width/2]),u=this.width,v=0;for(this.ctx.font=s,d=0;du&&(u=a.x+f,g=d),a.x-fu&&(u=a.x+e,g=d):d>this.getValueCount()/2&&a.x-eb&&0>c?c:b>0&&c>0?b:0)},draw:function(){var a=this,d=a.options,e=d.gridLines,f=d.ticks,g=d.angleLines,h=d.pointLabels,i=b.getValueOrDefault;if(d.display){var j=a.ctx,k=i(f.fontSize,c.defaultFontSize),l=i(f.fontStyle,c.defaultFontStyle),m=i(f.fontFamily,c.defaultFontFamily),n=b.fontString(k,l,m);if(b.each(a.ticks,function(g,h){if(h>0||d.reverse){var l=a.getDistanceFromCenterForValue(a.ticksAsNumbers[h]),m=a.yCenter-l;if(e.display&&0!==h)if(j.strokeStyle=b.getValueAtIndexOrDefault(e.color,h-1),j.lineWidth=b.getValueAtIndexOrDefault(e.lineWidth,h-1),d.lineArc)j.beginPath(),j.arc(a.xCenter,a.yCenter,l,0,2*Math.PI),j.closePath(),j.stroke();else{j.beginPath();for(var o=0;o=0;t--){if(g.display){var u=a.getPointPosition(t,o);j.beginPath(),j.moveTo(a.xCenter,a.yCenter),j.lineTo(u.x,u.y),j.stroke(),j.closePath()}var v=a.getPointPosition(t,o+5),w=i(h.fontColor,c.defaultFontColor);j.font=s,j.fillStyle=w;var x=a.pointLabels,y=x.length,z=x.length/2,A=z/2,B=A>t||t>y-A,C=t===A||t===y-A;0===t?j.textAlign="center":t===z?j.textAlign="center":z>t?j.textAlign="left":j.textAlign="right",C?j.textBaseline="middle":B?j.textBaseline="bottom":j.textBaseline="top",j.fillText(x[t]?x[t]:"",v.x,v.y)}}}}});a.scaleService.registerScaleType("radialLinear",e,d)}},{}],43:[function(a,b,c){"use strict";var d=a(1);d="function"==typeof d?d:window.moment,b.exports=function(a){var b=a.helpers,c={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},e={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},f=a.Scale.extend({initialize:function(){if(!d)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");a.Scale.prototype.initialize.call(this)},getLabelMoment:function(a,b){return this.labelMoments[a][b]},getMomentStartOf:function(a){var b=this;return"week"===b.options.time.unit&&b.options.time.isoWeekday!==!1?a.clone().startOf("isoWeek").isoWeekday(b.options.time.isoWeekday):a.clone().startOf(b.tickUnit)},determineDataLimits:function(){var a=this;a.labelMoments=[];var c=[];a.chart.data.labels&&a.chart.data.labels.length>0?(b.each(a.chart.data.labels,function(b,d){var e=a.parseTime(b);e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),c.push(e))},a),a.firstTick=d.min.call(a,c),a.lastTick=d.max.call(a,c)):(a.firstTick=null,a.lastTick=null),b.each(a.chart.data.datasets,function(e,f){var g=[],h=a.chart.isDatasetVisible(f);"object"==typeof e.data[0]&&null!==e.data[0]?b.each(e.data,function(b,c){var e=a.parseTime(a.getRightValue(b));e.isValid()&&(a.options.time.round&&e.startOf(a.options.time.round),g.push(e),h&&(a.firstTick=null!==a.firstTick?d.min(a.firstTick,e):e,a.lastTick=null!==a.lastTick?d.max(a.lastTick,e):e))},a):g=c,a.labelMoments.push(g)},a),a.options.time.min&&(a.firstTick=a.parseTime(a.options.time.min)),a.options.time.max&&(a.lastTick=a.parseTime(a.options.time.max)),a.firstTick=(a.firstTick||d()).clone(),a.lastTick=(a.lastTick||d()).clone()},buildTicks:function(d){var e=this;e.ctx.save();var f=b.getValueOrDefault(e.options.ticks.fontSize,a.defaults.global.defaultFontSize),g=b.getValueOrDefault(e.options.ticks.fontStyle,a.defaults.global.defaultFontStyle),h=b.getValueOrDefault(e.options.ticks.fontFamily,a.defaults.global.defaultFontFamily),i=b.fontString(f,g,h);if(e.ctx.font=i,e.ticks=[],e.unitScale=1,e.scaleSizeInUnits=0,e.options.time.unit)e.tickUnit=e.options.time.unit||"day",e.displayFormat=e.options.time.displayFormats[e.tickUnit],e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,1);else{var j=e.isHorizontal()?e.width-(e.paddingLeft+e.paddingRight):e.height-(e.paddingTop+e.paddingBottom),k=e.tickFormatFunction(e.firstTick,0,[]),l=e.ctx.measureText(k).width,m=Math.cos(b.toRadians(e.options.ticks.maxRotation)),n=Math.sin(b.toRadians(e.options.ticks.maxRotation));l=l*m+f*n;var o=j/l;e.tickUnit="millisecond",e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0),e.displayFormat=e.options.time.displayFormats[e.tickUnit];for(var p=0,q=c.units[p];p=Math.ceil(e.scaleSizeInUnits/o)){e.unitScale=b.getValueOrDefault(e.options.time.unitStepSize,q.steps[r]);break}break}if(q.maxStep===!1||Math.ceil(e.scaleSizeInUnits/o)=0)break;w%e.unitScale===0&&e.ticks.push(x)}var y=e.ticks[e.ticks.length-1].diff(e.lastTick,e.tickUnit);(0!==y||0===e.scaleSizeInUnits)&&(e.options.time.max?(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.ticks[0],e.tickUnit,!0)):(e.ticks.push(e.lastTick.clone()),e.scaleSizeInUnits=e.lastTick.diff(e.firstTick,e.tickUnit,!0))),e.ctx.restore()},getLabelForIndex:function(a,b){var c=this,d=c.chart.data.labels&&a=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
      "+i.map(function(a){return"
    • "+b.getPageLink(a,b.project.escape())+"
    • "}).join("")+"
    ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
  • "+a+"
  • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
      "+c+"
    "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val(); -return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],4:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],5:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
    "+a+"
    ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":6}],6:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],7:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org", -bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}],8:[function(a,b,c){"use strict";var d=a("./templates"),e={agentSelector:"#agent-select",chart:".aqs-chart",circularLegend:d.circularLegend,dataSourceSelector:"#data-source-select",dateRangeSelector:".aqs-date-range-selector",defaults:{dateRange:"latest-20",projects:["fr.wikipedia.org","de.wikipedia.org"]},linearLegend:d.linearLegend,logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform-select",projectInput:".aqs-project-input",select2Input:".aqs-select2-selector"};b.exports=e},{"./templates":10}],9:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);bb)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),void this.resetView();this.daterangepicker.startDate=a,this.daterangepicker.setEndDate(b)}else this.setSpecialRange(this.config.defaults.dateRange);$(this.config.dataSourceSelector).val(c.source||"pageviews"),this.setupDataSourceSelector(),$(this.config.platformSelector).val(c.platform||"all-access"),"pageviews"===c.source?$(this.config.agentSelector).val():$(this.config.dataSourceSelector).trigger("change"),this.resetSelect2(),!c.sites||1===c.sites.length&&!c.sites[0]?c.sites=this.config.defaults.projects:c.sites.length>10&&(c.sites=c.sites.slice(0,10)),this.setInitialChartType(c.sites.length),this.setSelect2Defaults(c.sites)}},{key:"getParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],b={platform:$(this.config.platformSelector).val(),source:$(this.config.dataSourceSelector).val()};return this.isPageviews()&&(b.agent=$(this.config.agentSelector).val()),this.specialRange&&a?b.range=this.specialRange.range:(b.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),b.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),this.noLogScale&&(b.autolog="false"),b}},{key:"pushParams",value:function(){var a=$(this.config.select2Input).select2("val")||[];window.history&&window.history.replaceState&&window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&sites="+a.join("|")),$(".permalink").prop("href","?"+$.param(this.getPermaLink())+"&sites="+a.join("|"))}},{key:"setupSelect2",value:function(){var a=$(this.config.select2Input),b={ajax:{transport:function(a,b,c){var d=l.filter(function(b){return b.startsWith(a.data.q)});b({results:d.slice(0,10)})},processResults:function(a){var b=a.results.map(function(a){return{id:a,text:a}});return{results:b}}},placeholder:$.i18n("projects-placeholder"),maximumSelectionLength:10,minimumInputLength:1};a.select2(b),a.on("change",this.processInput.bind(this))}},{key:"setPlatformOptionValues",value:function(){var a=this;$(this.config.platformSelector).find("option").each(function(b,c){$(c).prop("value",a.isPageviews()?$(c).data("value"):$(c).data("ud-value"))})}},{key:"setupDataSourceSelector",value:function(){var a=this;this.setPlatformOptionValues(),$(this.config.dataSourceSelector).on("change",function(b){a.isPageviews()?($(".platform-select--mobile-web").show(),$(a.config.agentSelector).prop("disabled",!1)):($(".platform-select--mobile-web").hide(),$(a.config.agentSelector).val("user").prop("disabled",!0)),a.setPlatformOptionValues(),"mobile-app"!==$(a.config.platformSelector).val()||a.isPageviews()?a.processInput():$(a.config.platformSelector).val("all-sites")})}},{key:"setupListeners",value:function(){i(Object.getPrototypeOf(b.prototype),"setupListeners",this).call(this),$("#platform-select, #agent-select").on("change",this.processInput.bind(this))}},{key:"processInput",value:function(a){var b,c=this;if(this.pushParams(),a||location.search!==this.params||this.prevChartType!==this.chartType){var e={entities:$(j.select2Input).select2("val")||[],labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]};if(!e.entities.length)return this.resetView();this.params=location.search,this.prevChartType=this.chartType,this.clearMessages(),this.destroyChart(),this.startSpinny();var f=this.daterangepicker.startDate.startOf("day"),g=this.daterangepicker.endDate.startOf("day");e.entities.forEach(function(a,b){var d=encodeURIComponent(a),h=c.isPageviews()?"https://wikimedia.org/api/rest_v1/metrics/pageviews/aggregate/"+d+("/"+$(c.config.platformSelector).val()+"/"+$(c.config.agentSelector).val()+"/daily")+("/"+f.format(c.config.timestampFormat)+"/"+g.format(c.config.timestampFormat)):"https://wikimedia.org/api/rest_v1/metrics/unique-devices/"+d+"/"+$(c.config.platformSelector).val()+"/daily"+("/"+f.format(c.config.timestampFormat)+"/"+g.format(c.config.timestampFormat)),i=$.ajax({url:h,dataType:"json"});e.promises.push(i), -i.success(function(d){try{c.isPageviews()&&(d=c.fillInZeros(d,f,g)),c.config.linearCharts.includes(c.chartType)?e.datasets.push(c.getLinearData(d,a,b)):e.datasets.push(c.getCircularData(d,a,b)),d.items&&!e.labels.length&&(e.labels=d.items.map(function(a){return moment(a.timestamp,c.config.timestampFormat).format(c.dateFormat)}))}catch(h){return e.fatalErrors.push(h)}}).fail(function(b){404===b.status?(c.writeMessage(""+a.escape()+" - "+$.i18n("api-error-no-data")),e.entities=e.entities.filter(function(b){return b!==a})):e.errors.push(b.responseJSON.detail[0])})}),(b=$).whenAll.apply(b,d(e.promises)).always(this.updateChart.bind(this,e))}}},{key:"validateProjects",value:function(){var a=this,b=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];return b.filter(function(b){return l.includes(b)?!0:(a.writeMessage($.i18n("invalid-project",""+b.escape()+"")),!1)})}}]),b}(mix(m)["with"](n));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new o})},{"../shared/chart_helpers":1,"../shared/pv":5,"../shared/site_map":7,"./config":8}],10:[function(a,b,c){"use strict";var d={linearLegend:function(a,b){var c="";if(1===a.length){var d=a[0];return'
    \n '+$.i18n("totals")+":\n "+b.formatNumber(d.sum)+" ("+b.formatNumber(d.average)+"/"+$.i18n("day")+')\n •\n '+$.i18n("statistics")+'\n •\n '+$.i18n("most-viewed-pages")+"\n
    "}if(a.length>1){var e=a.reduce(function(a,b){return a+b.sum},0);c='
    \n '+$.i18n("totals")+":\n "+b.formatNumber(e)+" ("+b.formatNumber(Math.round(e/b.numDaysInRange()))+"/"+$.i18n("day")+")\n
    "}c+='
    ';for(var f=0;f\n \n
    \n '+b.formatNumber(a[f].sum)+" ("+b.formatNumber(a[f].average)+"/"+$.i18n("day")+')\n
    \n \n \n ";return c+="
    "},circularLegend:function(a,b){var c=a[0],d=c.data.reduce(function(a,b){return a+b}),e='
    \n '+$.i18n("totals")+":\n "+b.formatNumber(d)+" ("+b.formatNumber(Math.round(d/b.numDaysInRange()))+"/"+$.i18n("day")+")\n
    ";e+='
    ';for(var f=0;f\n
    \n '+h+'\n
    \n
    \n '+b.formatNumber(c.data[f])+" ("+b.formatNumber(c.averages[f])+"/"+$.i18n("day")+')\n
    \n \n \n "}return e+="
    "}};b.exports=d},{}]},{},[1,2,3,4,5,6,7,9]); \ No newline at end of file +return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],4:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],5:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
    "+e+"
    ")}},{key:"checkDateRange",value:function(a){if(a.range)this.setSpecialRange(a.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(a.start){var b=moment(a.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(a.end||Date.now());if(bc)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),!1;this.daterangepicker.startDate=b,this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);return!0}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
    ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
    "+a+"
    ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":6}],6:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],7:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org", +bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}],8:[function(a,b,c){"use strict";var d=a("./templates"),e={agentSelector:"#agent-select",chart:".aqs-chart",circularLegend:d.circularLegend,dataSourceSelector:"#data-source-select",dateRangeSelector:".aqs-date-range-selector",defaults:{dateRange:"latest-20",projects:["fr.wikipedia.org","de.wikipedia.org"]},linearLegend:d.linearLegend,logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform-select",projectInput:".aqs-project-input",select2Input:".aqs-select2-selector"};b.exports=e},{"./templates":10}],9:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b10&&(a.sites=a.sites.slice(0,10)),this.setInitialChartType(a.sites.length),this.setSelect2Defaults(a.sites)}},{key:"getParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],b={platform:$(this.config.platformSelector).val(),source:$(this.config.dataSourceSelector).val()};return this.isPageviews()&&(b.agent=$(this.config.agentSelector).val()),this.specialRange&&a?b.range=this.specialRange.range:(b.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),b.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),this.noLogScale&&(b.autolog="false"),b}},{key:"pushParams",value:function(){var a=$(this.config.select2Input).select2("val")||[];window.history&&window.history.replaceState&&window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&sites="+a.join("|")),$(".permalink").prop("href","?"+$.param(this.getPermaLink())+"&sites="+a.join("|"))}},{key:"setupSelect2",value:function(){var a=$(this.config.select2Input),b={ajax:{transport:function(a,b,c){var d=l.filter(function(b){return b.startsWith(a.data.q)});b({results:d.slice(0,10)})},processResults:function(a){var b=a.results.map(function(a){return{id:a,text:a}});return{results:b}}},placeholder:$.i18n("projects-placeholder"),maximumSelectionLength:10,minimumInputLength:1};a.select2(b),a.on("change",this.processInput.bind(this))}},{key:"setPlatformOptionValues",value:function(){var a=this;$(this.config.platformSelector).find("option").each(function(b,c){$(c).prop("value",a.isPageviews()?$(c).data("value"):$(c).data("ud-value"))})}},{key:"setupDataSourceSelector",value:function(){var a=this;this.setPlatformOptionValues(),$(this.config.dataSourceSelector).on("change",function(b){a.isPageviews()?($(".platform-select--mobile-web").show(),$(a.config.agentSelector).prop("disabled",!1)):($(".platform-select--mobile-web").hide(),$(a.config.agentSelector).val("user").prop("disabled",!0)),a.setPlatformOptionValues(),"mobile-app"!==$(a.config.platformSelector).val()||a.isPageviews()?a.processInput():$(a.config.platformSelector).val("all-sites")})}},{key:"setupListeners",value:function(){i(Object.getPrototypeOf(b.prototype),"setupListeners",this).call(this),$("#platform-select, #agent-select").on("change",this.processInput.bind(this))}},{key:"processInput",value:function(a){var b,c=this;if(this.pushParams(),a||location.search!==this.params||this.prevChartType!==this.chartType){var e={entities:$(j.select2Input).select2("val")||[],labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]};if(!e.entities.length)return this.resetView();this.params=location.search,this.prevChartType=this.chartType,this.clearMessages(),this.destroyChart(),this.startSpinny();var f=this.daterangepicker.startDate.startOf("day"),g=this.daterangepicker.endDate.startOf("day");e.entities.forEach(function(a,b){var d=encodeURIComponent(a),h=c.isPageviews()?"https://wikimedia.org/api/rest_v1/metrics/pageviews/aggregate/"+d+("/"+$(c.config.platformSelector).val()+"/"+$(c.config.agentSelector).val()+"/daily")+("/"+f.format(c.config.timestampFormat)+"/"+g.format(c.config.timestampFormat)):"https://wikimedia.org/api/rest_v1/metrics/unique-devices/"+d+"/"+$(c.config.platformSelector).val()+"/daily"+("/"+f.format(c.config.timestampFormat)+"/"+g.format(c.config.timestampFormat)),i=$.ajax({ +url:h,dataType:"json"});e.promises.push(i),i.success(function(d){try{c.isPageviews()&&(d=c.fillInZeros(d,f,g)),c.config.linearCharts.includes(c.chartType)?e.datasets.push(c.getLinearData(d,a,b)):e.datasets.push(c.getCircularData(d,a,b)),d.items&&!e.labels.length&&(e.labels=d.items.map(function(a){return moment(a.timestamp,c.config.timestampFormat).format(c.dateFormat)}))}catch(h){return e.fatalErrors.push(h)}}).fail(function(b){404===b.status?(c.writeMessage(""+a.escape()+" - "+$.i18n("api-error-no-data")),e.entities=e.entities.filter(function(b){return b!==a})):e.errors.push(b.responseJSON.detail[0])})}),(b=$).whenAll.apply(b,d(e.promises)).always(this.updateChart.bind(this,e))}}},{key:"validateProjects",value:function(){var a=this,b=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];return b.filter(function(b){return l.includes(b)?!0:(a.writeMessage($.i18n("invalid-project",""+b.escape()+"")),!1)})}}]),b}(mix(m)["with"](n));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new o})},{"../shared/chart_helpers":1,"../shared/pv":5,"../shared/site_map":7,"./config":8}],10:[function(a,b,c){"use strict";var d={linearLegend:function(a,b){var c="";if(1===a.length){var d=a[0];return'
    \n '+$.i18n("totals")+":\n "+b.formatNumber(d.sum)+" ("+b.formatNumber(d.average)+"/"+$.i18n("day")+')\n •\n '+$.i18n("statistics")+'\n •\n '+$.i18n("most-viewed-pages")+"\n
    "}if(a.length>1){var e=a.reduce(function(a,b){return a+b.sum},0);c='
    \n '+$.i18n("totals")+":\n "+b.formatNumber(e)+" ("+b.formatNumber(Math.round(e/b.numDaysInRange()))+"/"+$.i18n("day")+")\n
    "}c+='
    ';for(var f=0;f\n \n
    \n '+b.formatNumber(a[f].sum)+" ("+b.formatNumber(a[f].average)+"/"+$.i18n("day")+')\n
    \n \n \n ";return c+="
    "},circularLegend:function(a,b){var c=a[0],d=c.data.reduce(function(a,b){return a+b}),e='
    \n '+$.i18n("totals")+":\n "+b.formatNumber(d)+" ("+b.formatNumber(Math.round(d/b.numDaysInRange()))+"/"+$.i18n("day")+")\n
    ";e+='
    ';for(var f=0;f\n
    \n '+h+'\n
    \n
    \n '+b.formatNumber(c.data[f])+" ("+b.formatNumber(c.averages[f])+"/"+$.i18n("day")+')\n
    \n \n \n "}return e+="
    "}};b.exports=d},{}]},{},[1,2,3,4,5,6,7,9]); \ No newline at end of file diff --git a/public_html/siteviews/siteviews.js b/public_html/siteviews/siteviews.js index 879027ab5..c63bd1920 100644 --- a/public_html/siteviews/siteviews.js +++ b/public_html/siteviews/siteviews.js @@ -1495,6 +1495,42 @@ var Pv = function (_PvConfig) { $('.site-notice').append('
    ' + markup + '
    '); } + + /** + * Check the validity of the date range of given params + * and throw errors as necessary and/or set defaults + * @param {Object} params - as returned by this.parseQueryString() + * @returns {Boolean} true if there were no errors, false otherwise + */ + + }, { + key: 'checkDateRange', + value: function checkDateRange(params) { + if (params.range) { + if (!this.setSpecialRange(params.range)) { + this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); + this.setSpecialRange(this.config.defaults.dateRange); + } + } else if (params.start) { + var startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')), + endDate = moment(params.end || Date.now()); + + if (startDate < this.config.minDate || endDate < this.config.minDate) { + this.addSiteNotice('danger', $.i18n('param-error-1', moment(this.config.minDate).format(this.dateFormat)), $.i18n('invalid-params'), true); + return false; + } else if (startDate > endDate) { + this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); + return false; + } + /** directly assign startDate before calling setEndDate so events will be fired once */ + this.daterangepicker.startDate = startDate; + this.daterangepicker.setEndDate(endDate); + } else { + this.setSpecialRange(this.config.defaults.dateRange); + } + + return true; + } }, { key: 'clearSiteNotices', value: function clearSiteNotices() { @@ -4022,39 +4058,10 @@ var SiteViews = function (_mix$with) { value: function popParams() { this.startSpinny(); - var startDate = void 0, - endDate = void 0, - params = this.parseQueryString('sites'); + var params = this.parseQueryString('sites'); this.patchUsage('sv'); - - /** - * Check if we're using a valid range, and if so ignore any start/end dates. - * If an invalid range, throw and error and use default dates. - */ - if (params.range) { - if (!this.setSpecialRange(params.range)) { - this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); - this.setSpecialRange(this.config.defaults.dateRange); - } - } else if (params.start) { - startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')); - endDate = moment(params.end || Date.now()); - if (startDate < this.config.minDate || endDate < this.config.minDate) { - this.addSiteNotice('danger', $.i18n('param-error-1', $.i18n('july') + ' 2015'), $.i18n('invalid-params'), true); - this.resetView(); - return; - } else if (startDate > endDate) { - this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); - this.resetView(); - return; - } - /** directly assign startDate before calling setEndDate so events will be fired once */ - this.daterangepicker.startDate = startDate; - this.daterangepicker.setEndDate(endDate); - } else { - this.setSpecialRange(this.config.defaults.dateRange); - } + this.checkDateRange(params); $(this.config.dataSourceSelector).val(params.source || 'pageviews'); diff --git a/public_html/topviews/application.js b/public_html/topviews/application.js index 234e1615d..94cbe98c3 100644 --- a/public_html/topviews/application.js +++ b/public_html/topviews/application.js @@ -6,6 +6,6 @@ Nd.isoWeek=Nd.isoWeeks=oa,Nd.weeksInYear=Ib,Nd.isoWeeksInYear=Hb,Nd.date=Dd,Nd.d (e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){return n.apply(b,v.call(arguments,0).concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;hc;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('
      ');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('
    • '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),this.$results.append(d)},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group",a(h),this.template(b,h);for(var i=[],j=0;j",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b){var c=this,d=b.id+"-results";this.$results.attr("id",d),b.on("results:all",function(a){c.clear(),c.append(a.data),b.isOpen()&&c.setClasses()}),b.on("results:append",function(a){c.append(a.data),b.isOpen()&&c.setClasses()}),b.on("query",function(a){c.showLoading(a)}),b.on("select",function(){b.isOpen()&&c.setClasses()}),b.on("unselect",function(){b.isOpen()&&c.setClasses()}),b.on("open",function(){c.$results.attr("aria-expanded","true"),c.$results.attr("aria-hidden","false"),c.setClasses(),c.ensureHighlightVisible()}),b.on("close",function(){c.$results.attr("aria-expanded","false"),c.$results.attr("aria-hidden","true"),c.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=c.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=c.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?c.trigger("close"):c.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=c.getHighlightedResults(),b=c.$results.find("[aria-selected]"),d=b.index(a);if(0!==d){var e=d-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=c.$results.offset().top,h=f.offset().top,i=c.$results.scrollTop()+(h-g);0===e?c.$results.scrollTop(0):0>h-g&&c.$results.scrollTop(i)}}),b.on("results:next",function(){var a=c.getHighlightedResults(),b=c.$results.find("[aria-selected]"),d=b.index(a),e=d+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=c.$results.offset().top+c.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=c.$results.scrollTop()+h-g;0===e?c.$results.scrollTop(0):h>g&&c.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){c.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=c.$results.scrollTop(),d=c.$results.get(0).scrollHeight-c.$results.scrollTop()+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&d<=c.$results.height();e?(c.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(c.$results.scrollTop(c.$results.get(0).scrollHeight-c.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var d=a(this),e=d.data("data");return"true"===d.attr("aria-selected")?void(c.options.get("multiple")?c.trigger("unselect",{originalEvent:b,data:e}):c.trigger("close")):void c.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(){var b=a(this).data("data");c.getHighlightedResults().removeClass("select2-results__option--highlighted"),c.trigger("results:focus",{data:b,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a){var b=this,d=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){b.trigger("focus",a)}),this.$selection.on("blur",function(a){b.trigger("blur",a)}),this.$selection.on("keydown",function(a){b.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){b.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){b.update(a.data)}),a.on("open",function(){b.$selection.attr("aria-expanded","true"),b.$selection.attr("aria-owns",d),b._attachCloseHandler(a)}),a.on("close",function(){b.$selection.attr("aria-expanded","false"),b.$selection.removeAttr("aria-activedescendant"),b.$selection.removeAttr("aria-owns"),b.$selection.focus(),b._detachCloseHandler(a)}),a.on("enable",function(){b.$selection.attr("tabindex",b._tabindex)}),a.on("disable",function(){b.$selection.attr("tabindex","-1")})},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c){function d(){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},d.prototype.bind=function(a){var b=this;d.__super__.bind.apply(this,arguments);var c=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",c),this.$selection.attr("aria-labelledby",c),this.$selection.on("mousedown",function(a){1===a.which&&b.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(){}),this.$selection.on("blur",function(){}),a.on("selection:update",function(a){b.update(a.data)})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a){var b=this.options.get("templateSelection"),c=this.options.get("escapeMarkup");return c(b(a))},d.prototype.selectionContainer=function(){return a("")},d.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.display(b),d=this.$selection.find(".select2-selection__rendered");d.empty().append(c),d.prop("title",b.title||b.text)},d}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
        '),a},d.prototype.bind=function(){var b=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){b.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(c){var d=a(this),e=d.parent(),f=e.data("data");b.trigger("unselect",{originalEvent:c,data:f})})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a){var b=this.options.get("templateSelection"),c=this.options.get("escapeMarkup");return c(b(a))},d.prototype.selectionContainer=function(){var b=a('
      • ×
      • ');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},a}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('×');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus()}),b.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val(""),e.$search.focus()}),b.on("enable",function(){e.$search.prop("disabled",!1)}),b.on("disable",function(){e.$search.prop("disabled",!0)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e.trigger("blur",a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}}),this.$selection.on("input",".select2-search--inline",function(){e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input",".select2-search--inline",function(a){e.handleSearch(a)})},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.trigger("open"),this.$search.val(b.text+" ")},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I", "Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=(c.extend(!0,{},l,j),this.option(l));k.replaceWith(m)}else{var n=this.option(j);if(j.children){var o=this.convertToOptions(j.children);b.appendMany(n,o)}h.push(n)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(b,c){this.ajaxOptions=this._applyDefaults(c.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),a.__super__.constructor.call(this,b,c)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return{q:a.term}},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url(a)),"function"==typeof f.data&&(f.data=f.data(a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");if(void 0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(var g=0;g0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.position=function(){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a){function b(){}return b.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},b.prototype.handleSearch=function(){if(!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},b.prototype.showSearch=function(){return!0},b}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
      • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(a,b,c){this.$dropdownParent=c.get("dropdownParent")||document.body,a.call(this,b,c)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c){var d=this,e="scroll.select2."+c.id,f="resize.select2."+c.id,g="orientationchange.select2."+c.id,h=this.$container.parents().filter(b.hasScroll);h.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),h.on(e,function(){var b=a(this).data("select2-scroll-position");a(this).scrollTop(b.y)}),a(window).on(e+" "+f+" "+g,function(){d._positionDropdown(),d._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c){var d="scroll.select2."+c.id,e="resize.select2."+c.id,f="orientationchange.select2."+c.id,g=this.$container.parents().filter(b.hasScroll);g.off(d),a(window).off(d+" "+e+" "+f)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=(this.$container.position(),this.$container.offset());f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom};c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){this.$dropdownContainer.width();var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.selectionAdapter=l.multiple?e:d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(this.options.dir=a.prop("dir")?a.prop("dir"):a.closest("[dir]").prop("dir")?a.closest("[dir]").prop("dir"):"ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){ var b=this,c=["toggle"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("focus",function(){a.$container.addClass("select2-container--focus")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open"),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ENTER?(a.trigger("results:select"),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle"),b.preventDefault()):c===d.UP?(a.trigger("results:previous"),b.preventDefault()):c===d.DOWN?(a.trigger("results:next"),b.preventDefault()):(c===d.ESC||c===d.TAB)&&(a.close(),b.preventDefault()):(c===d.ENTER||c===d.SPACE||(c===d.DOWN||c===d.UP)&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable")):this.trigger("enable")},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||(this.trigger("query",{}),this.trigger("open"))},e.prototype.close=function(){this.isOpen()&&this.trigger("close")},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery.select2",["jquery","require","./select2/core","./select2/defaults"],function(a,b,c,d){if(b("jquery.mousewheel"),null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend({},b,!0);new c(a(this),d)}),this;if("string"==typeof b){var d=this.data("select2");null==d&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var f=Array.prototype.slice.call(arguments,1),g=d[b](f);return a.inArray(b,e)>-1?this:g}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),b.define("jquery.mousewheel",["jquery"],function(a){return a}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}),function(a,b){if("function"==typeof define&&define.amd)define(["moment","jquery","exports"],function(c,d,e){a.daterangepicker=b(a,e,c,d)});else if("undefined"!=typeof exports){var c=require("moment"),d="undefined"!=typeof window?window.jQuery:void 0;if(!d)try{d=require("jquery"),d.fn||(d.fn={})}catch(e){if(!d)throw new Error("jQuery dependency not found")}b(a,exports,c,d)}else a.daterangepicker=b(a,{},a.moment||moment,a.jQuery||a.Zepto||a.ender||a.$)}(this||{},function(a,b,c,d){var e=function(a,b,e){if(this.parentEl="body",this.element=d(a),this.startDate=c().startOf("day"),this.endDate=c().endOf("day"),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyClass="btn-success",this.cancelClass="btn-default",this.locale={format:"MM/DD/YYYY",separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:c.weekdaysMin(),monthNames:c.monthsShort(),firstDay:c.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof b&&null!==b||(b={}),b=d.extend(this.element.data(),b),"string"!=typeof b.template&&(b.template=''),this.parentEl=d(b.parentEl&&d(b.parentEl).length?b.parentEl:this.parentEl),this.container=d(b.template).appendTo(this.parentEl),"object"==typeof b.locale&&("string"==typeof b.locale.format&&(this.locale.format=b.locale.format),"string"==typeof b.locale.separator&&(this.locale.separator=b.locale.separator),"object"==typeof b.locale.daysOfWeek&&(this.locale.daysOfWeek=b.locale.daysOfWeek.slice()),"object"==typeof b.locale.monthNames&&(this.locale.monthNames=b.locale.monthNames.slice()),"number"==typeof b.locale.firstDay&&(this.locale.firstDay=b.locale.firstDay),"string"==typeof b.locale.applyLabel&&(this.locale.applyLabel=b.locale.applyLabel),"string"==typeof b.locale.cancelLabel&&(this.locale.cancelLabel=b.locale.cancelLabel),"string"==typeof b.locale.weekLabel&&(this.locale.weekLabel=b.locale.weekLabel),"string"==typeof b.locale.customRangeLabel&&(this.locale.customRangeLabel=b.locale.customRangeLabel)),"string"==typeof b.startDate&&(this.startDate=c(b.startDate,this.locale.format)),"string"==typeof b.endDate&&(this.endDate=c(b.endDate,this.locale.format)),"string"==typeof b.minDate&&(this.minDate=c(b.minDate,this.locale.format)),"string"==typeof b.maxDate&&(this.maxDate=c(b.maxDate,this.locale.format)),"object"==typeof b.startDate&&(this.startDate=c(b.startDate)),"object"==typeof b.endDate&&(this.endDate=c(b.endDate)),"object"==typeof b.minDate&&(this.minDate=c(b.minDate)),"object"==typeof b.maxDate&&(this.maxDate=c(b.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof b.applyClass&&(this.applyClass=b.applyClass),"string"==typeof b.cancelClass&&(this.cancelClass=b.cancelClass),"object"==typeof b.dateLimit&&(this.dateLimit=b.dateLimit),"string"==typeof b.opens&&(this.opens=b.opens),"string"==typeof b.drops&&(this.drops=b.drops),"boolean"==typeof b.showWeekNumbers&&(this.showWeekNumbers=b.showWeekNumbers),"string"==typeof b.buttonClasses&&(this.buttonClasses=b.buttonClasses),"object"==typeof b.buttonClasses&&(this.buttonClasses=b.buttonClasses.join(" ")),"boolean"==typeof b.showDropdowns&&(this.showDropdowns=b.showDropdowns),"boolean"==typeof b.singleDatePicker&&(this.singleDatePicker=b.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof b.timePicker&&(this.timePicker=b.timePicker),"boolean"==typeof b.timePickerSeconds&&(this.timePickerSeconds=b.timePickerSeconds),"number"==typeof b.timePickerIncrement&&(this.timePickerIncrement=b.timePickerIncrement),"boolean"==typeof b.timePicker24Hour&&(this.timePicker24Hour=b.timePicker24Hour),"boolean"==typeof b.autoApply&&(this.autoApply=b.autoApply),"boolean"==typeof b.autoUpdateInput&&(this.autoUpdateInput=b.autoUpdateInput),"boolean"==typeof b.linkedCalendars&&(this.linkedCalendars=b.linkedCalendars),"function"==typeof b.isInvalidDate&&(this.isInvalidDate=b.isInvalidDate),0!=this.locale.firstDay)for(var f=this.locale.firstDay;f>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),f--;var g,h,i;if("undefined"==typeof b.startDate&&"undefined"==typeof b.endDate&&d(this.element).is("input[type=text]")){var j=d(this.element).val(),k=j.split(this.locale.separator);g=h=null,2==k.length?(g=c(k[0],this.locale.format),h=c(k[1],this.locale.format)):this.singleDatePicker&&""!==j&&(g=c(j,this.locale.format),h=c(j,this.locale.format)),null!==g&&null!==h&&(this.setStartDate(g),this.setEndDate(h))}if("object"==typeof b.ranges){for(i in b.ranges){g="string"==typeof b.ranges[i][0]?c(b.ranges[i][0],this.locale.format):c(b.ranges[i][0]),h="string"==typeof b.ranges[i][1]?c(b.ranges[i][1],this.locale.format):c(b.ranges[i][1]),this.minDate&&g.isBefore(this.minDate)&&(g=this.minDate.clone());var l=this.maxDate;if(this.dateLimit&&g.clone().add(this.dateLimit).isAfter(l)&&(l=g.clone().add(this.dateLimit)),l&&h.isAfter(l)&&(h=l.clone()),!(this.minDate&&h.isBefore(this.minDate)||l&&g.isAfter(l))){var m=document.createElement("textarea");m.innerHTML=i,rangeHtml=m.value,this.ranges[rangeHtml]=[g,h]}}var n="
          ";for(i in this.ranges)n+="
        • "+i+"
        • ";n+="
        • "+this.locale.customRangeLabel+"
        • ",n+="
        ",this.container.find(".ranges").prepend(n)}if("function"==typeof e&&(this.callback=e),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&"object"!=typeof b.ranges?this.container.find(".ranges").hide():this.autoApply&&this.container.find(".applyBtn, .cancelBtn").addClass("hide"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".calendar.left").addClass("single"),this.container.find(".calendar.left").show(),this.container.find(".calendar.right").hide(),this.container.find(".daterangepicker_input input, .daterangepicker_input i").hide(),this.timePicker||this.container.find(".ranges").hide()),"undefined"!=typeof b.ranges||this.singleDatePicker||this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),"undefined"!=typeof b.ranges&&"right"==this.opens){var o=this.container.find(".ranges"),p=o.clone();o.remove(),this.container.find(".calendar.left").parent().prepend(p)}this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",d.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",d.proxy(this.clickNext,this)).on("click.daterangepicker","td.available",d.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",d.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",d.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",d.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",d.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",d.proxy(this.timeChanged,this)).on("click.daterangepicker",".daterangepicker_input input",d.proxy(this.showCalendars,this)).on("change.daterangepicker",".daterangepicker_input input",d.proxy(this.formInputsChanged,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",d.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",d.proxy(this.clickCancel,this)).on("click.daterangepicker","li",d.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",d.proxy(this.hoverRange,this)).on("mouseleave.daterangepicker","li",d.proxy(this.updateFormInputs,this)),this.element.is("input")?this.element.on({"click.daterangepicker":d.proxy(this.show,this),"focus.daterangepicker":d.proxy(this.show,this),"keyup.daterangepicker":d.proxy(this.elementChanged,this),"keydown.daterangepicker":d.proxy(this.keydown,this)}):this.element.on("click.daterangepicker",d.proxy(this.toggle,this)),this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))};e.prototype={constructor:e,setStartDate:function(a){"string"==typeof a&&(this.startDate=c(a,this.locale.format)),"object"==typeof a&&(this.startDate=c(a)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(a){"string"==typeof a&&(this.endDate=c(a,this.locale.format)),"object"==typeof a&&(this.endDate=c(a)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate),this.dateLimit&&this.startDate.clone().add(this.dateLimit).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.dateLimit)),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled")),this.endDate?(this.container.find('input[name="daterangepicker_end"]').removeClass("active"),this.container.find('input[name="daterangepicker_start"]').addClass("active")):(this.container.find('input[name="daterangepicker_end"]').addClass("active"),this.container.find('input[name="daterangepicker_start"]').removeClass("active")),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"))},updateCalendars:function(){if(this.timePicker){var a,b,c;if(this.endDate){if(a=parseInt(this.container.find(".left .hourselect").val(),10),b=parseInt(this.container.find(".left .minuteselect").val(),10),c=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,!this.timePicker24Hour){var d=this.container.find(".left .ampmselect").val();"PM"===d&&12>a&&(a+=12),"AM"===d&&12===a&&(a=0)}}else if(a=parseInt(this.container.find(".right .hourselect").val(),10),b=parseInt(this.container.find(".right .minuteselect").val(),10),c=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,!this.timePicker24Hour){var d=this.container.find(".left .ampmselect").val();"PM"===d&&12>a&&(a+=12),"AM"===d&&12===a&&(a=0)}this.leftCalendar.month.hour(a).minute(b).second(c),this.rightCalendar.month.hour(a).minute(b).second(c)}if(this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate){var e=!0,f=0;for(var g in this.ranges){if(this.timePicker){if(this.startDate.isSame(this.ranges[g][0])&&this.endDate.isSame(this.ranges[g][1])){e=!1,this.chosenLabel=this.container.find(".ranges li:eq("+f+")").addClass("active").html();break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[g][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[g][1].format("YYYY-MM-DD")){e=!1,this.chosenLabel=this.container.find(".ranges li:eq("+f+")").addClass("active").html();break}f++}e&&(this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html(),this.showCalendars())}},renderCalendar:function(a){var b="left"==a?this.leftCalendar:this.rightCalendar,e=b.month.month(),f=b.month.year(),g=b.month.hour(),h=b.month.minute(),i=b.month.second(),j=c([f,e]).daysInMonth(),k=c([f,e,1]),l=c([f,e,j]),m=c(k).subtract(1,"month").month(),n=c(k).subtract(1,"month").year(),o=c([n,m]).daysInMonth(),p=k.day(),b=[];b.firstDay=k,b.lastDay=l;for(var q=0;6>q;q++)b[q]=[];var r=o-p+this.locale.firstDay+1;r>o&&(r-=7),p==this.locale.firstDay&&(r=o-6);for(var s,t,u=c([n,m,r,12,h,i]),q=0,s=0,t=0;42>q;q++,s++,u=c(u).add(24,"hour"))q>0&&s%7===0&&(s=0,t++),b[t][s]=u.clone().hour(g).minute(h).second(i),u.hour(12),this.minDate&&b[t][s].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&b[t][s].isBefore(this.minDate)&&"left"==a&&(b[t][s]=this.minDate.clone()),this.maxDate&&b[t][s].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&b[t][s].isAfter(this.maxDate)&&"right"==a&&(b[t][s]=this.maxDate.clone());"left"==a?this.leftCalendar.calendar=b:this.rightCalendar.calendar=b;var v="left"==a?this.minDate:this.startDate,w=this.maxDate,x=("left"==a?this.startDate:this.endDate,'');x+="",x+="",this.showWeekNumbers&&(x+=""),x+=v&&!v.isBefore(b.firstDay)||this.linkedCalendars&&"left"!=a?"":'';var y=this.locale.monthNames[b[1][1].month()]+b[1][1].format(" YYYY");if(this.showDropdowns){for(var z=b[1][1].month(),A=b[1][1].year(),B=w&&w.year()||A+5,C=v&&v.year()||A-50,D=A==C,E=A==B,F='";for(var H='",y=F+H}if(x+='",x+=w&&!w.isAfter(b.lastDay)||this.linkedCalendars&&"right"!=a&&!this.singleDatePicker?"":'',x+="",x+="",this.showWeekNumbers&&(x+='"),d.each(this.locale.daysOfWeek,function(a,b){x+=""}),x+="",x+="",x+="",null==this.endDate&&this.dateLimit){var J=this.startDate.clone().add(this.dateLimit).endOf("day");w&&!J.isBefore(w)||(w=J)}for(var t=0;6>t;t++){x+="",this.showWeekNumbers&&(x+='");for(var s=0;7>s;s++){var K=[];b[t][s].isSame(new Date,"day")&&K.push("today"),b[t][s].isoWeekday()>5&&K.push("weekend"),b[t][s].month()!=b[1][1].month()&&K.push("off"),this.minDate&&b[t][s].isBefore(this.minDate,"day")&&K.push("off","disabled"),w&&b[t][s].isAfter(w,"day")&&K.push("off","disabled"),this.isInvalidDate(b[t][s])&&K.push("off","disabled"),b[t][s].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&K.push("active","start-date"),null!=this.endDate&&b[t][s].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&K.push("active","end-date"),null!=this.endDate&&b[t][s]>this.startDate&&b[t][s]'+b[t][s].date()+""}x+=""}x+="",x+="
        '+y+"
        '+this.locale.weekLabel+""+b+"
        '+b[t][0].week()+"
        ",this.container.find(".calendar."+a+" .calendar-table").html(x)},renderTimePicker:function(a){var b,c,d,e=this.maxDate;!this.dateLimit||this.maxDate&&!this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)||(e=this.startDate.clone().add(this.dateLimit)),"left"==a?(c=this.startDate.clone(),d=this.minDate):"right"==a&&(c=this.endDate?this.endDate.clone():this.startDate.clone(),d=this.startDate),b=' ",b+=': ",this.timePickerSeconds){b+=': "}if(!this.timePicker24Hour){b+='"}this.container.find(".calendar."+a+" .calendar-time div").html(b)},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").is(":focus")||this.container.find("input[name=daterangepicker_end]").is(":focus")||(this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.locale.format)),this.endDate&&this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.locale.format)),this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled"))},move:function(){var a,b={top:0,left:0},c=d(window).width();this.parentEl.is("body")||(b={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},c=this.parentEl[0].clientWidth+this.parentEl.offset().left),a="up"==this.drops?this.element.offset().top-this.container.outerHeight()-b.top:this.element.offset().top+this.element.outerHeight()-b.top,this.container["up"==this.drops?"addClass":"removeClass"]("dropup"),"left"==this.opens?(this.container.css({top:a,right:c-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:a,left:this.element.offset().left-b.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:a,left:this.element.offset().left-b.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>d(window).width()&&this.container.css({left:"auto",right:0}))},show:function(a){this.isShowing||(this._outsideClickProxy=d.proxy(function(a){this.outsideClick(a)},this),d(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),d(window).on("resize.daterangepicker",d.proxy(function(a){this.move(a)},this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(a){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate,this.endDate,this.chosenLabel),this.updateElement(),d(document).off(".daterangepicker"),d(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(a){this.isShowing?this.hide():this.show()},outsideClick:function(a){var b=d(a.target);"focusin"==a.type||b.closest(this.element).length||b.closest(this.container).length||b.closest(".calendar-table").length||this.hide()},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},hoverRange:function(a){if(!this.container.find("input[name=daterangepicker_start]").is(":focus")&&!this.container.find("input[name=daterangepicker_end]").is(":focus")){var b=a.target.innerHTML;if(b==this.locale.customRangeLabel)this.updateView();else{var c=this.ranges[b];this.container.find("input[name=daterangepicker_start]").val(c[0].format(this.locale.format)),this.container.find("input[name=daterangepicker_end]").val(c[1].format(this.locale.format))}}},clickRange:function(a){var b=a.target.innerHTML;if(this.chosenLabel=b,b==this.locale.customRangeLabel)this.showCalendars();else{var c=this.ranges[b];this.startDate=c[0],this.endDate=c[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.hideCalendars(),this.clickApply()}},clickPrev:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(a){if(!this.container.find("input[name=daterangepicker_start]").is(":focus")&&!this.container.find("input[name=daterangepicker_end]").is(":focus")&&d(a.target).hasClass("available")){var b=d(a.target).attr("data-title"),c=b.substr(1,1),e=b.substr(3,1),f=d(a.target).parents(".calendar"),g=f.hasClass("left")?this.leftCalendar.calendar[c][e]:this.rightCalendar.calendar[c][e];this.endDate?this.container.find("input[name=daterangepicker_start]").val(g.format(this.locale.format)):this.container.find("input[name=daterangepicker_end]").val(g.format(this.locale.format));var h=this.leftCalendar,i=this.rightCalendar,j=this.startDate;this.endDate||this.container.find(".calendar td").each(function(a,b){if(!d(b).hasClass("week")){var c=d(b).attr("data-title"),e=c.substr(1,1),f=c.substr(3,1),k=d(b).parents(".calendar"),l=k.hasClass("left")?h.calendar[e][f]:i.calendar[e][f];l.isAfter(j)&&l.isBefore(g)?d(b).addClass("in-range"):d(b).removeClass("in-range")}})}},clickDate:function(a){if(d(a.target).hasClass("available")){var b=d(a.target).attr("data-title"),c=b.substr(1,1),e=b.substr(3,1),f=d(a.target).parents(".calendar"),g=f.hasClass("left")?this.leftCalendar.calendar[c][e]:this.rightCalendar.calendar[c][e];if(this.endDate||g.isBefore(this.startDate)){ -if(this.timePicker){var h=parseInt(this.container.find(".left .hourselect").val(),10);if(!this.timePicker24Hour){var i=f.find(".ampmselect").val();"PM"===i&&12>h&&(h+=12),"AM"===i&&12===h&&(h=0)}var j=parseInt(this.container.find(".left .minuteselect").val(),10),k=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;g=g.clone().hour(h).minute(j).second(k)}this.endDate=null,this.setStartDate(g.clone())}else{if(this.timePicker){var h=parseInt(this.container.find(".right .hourselect").val(),10);if(!this.timePicker24Hour){var i=this.container.find(".right .ampmselect").val();"PM"===i&&12>h&&(h+=12),"AM"===i&&12===h&&(h=0)}var j=parseInt(this.container.find(".right .minuteselect").val(),10),k=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;g=g.clone().hour(h).minute(j).second(k)}this.setEndDate(g.clone()),this.autoApply&&this.clickApply()}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView()}},clickApply:function(a){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(a){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(a){var b=d(a.target).closest(".calendar").hasClass("left"),c=b?"left":"right",e=this.container.find(".calendar."+c),f=parseInt(e.find(".monthselect").val(),10),g=e.find(".yearselect").val();b||(gthis.maxDate.year()||g==this.maxDate.year()&&f>this.maxDate.month())&&(f=this.maxDate.month(),g=this.maxDate.year()),b?(this.leftCalendar.month.month(f).year(g),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(f).year(g),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(a){var b=d(a.target).closest(".calendar"),c=b.hasClass("left"),e=parseInt(b.find(".hourselect").val(),10),f=parseInt(b.find(".minuteselect").val(),10),g=this.timePickerSeconds?parseInt(b.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var h=b.find(".ampmselect").val();"PM"===h&&12>e&&(e+=12),"AM"===h&&12===e&&(e=0)}if(c){var i=this.startDate.clone();i.hour(e),i.minute(f),i.second(g),this.setStartDate(i),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==i.format("YYYY-MM-DD")&&this.endDate.isBefore(i)&&this.setEndDate(i.clone())}else if(this.endDate){var j=this.endDate.clone();j.hour(e),j.minute(f),j.second(g),this.setEndDate(j)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},formInputsChanged:function(a){var b=d(a.target).closest(".calendar").hasClass("right"),e=c(this.container.find('input[name="daterangepicker_start"]').val(),this.locale.format),f=c(this.container.find('input[name="daterangepicker_end"]').val(),this.locale.format);e.isValid()&&f.isValid()&&(b&&f.isBefore(e)&&(e=f.clone()),this.setStartDate(e),this.setEndDate(f),b?this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)):this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format))),this.updateCalendars(),this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"))},elementChanged:function(){if(this.element.is("input")&&this.element.val().length&&!(this.element.val().length=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
          "+i.map(function(a){return"
        • "+b.getPageLink(a,b.project.escape())+"
        • "}).join("")+"
        ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
      • "+a+"
      • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
          "+c+"
        "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],4:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],5:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
        "+e+"
        ")}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY", -"fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
        ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
        "+a+"
        ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":6}],6:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],7:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org", -mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}],8:[function(a,b,c){"use strict";var d=(a("../shared/pv"),{articleSelector:".aqs-select2-selector",dateRangeSelector:".aqs-date-range-selector",dateLimit:31,defaults:{dateRange:"last-week",daysAgo:7,excludes:[],project:"en.wikipedia.org"},pageSize:20,platformSelector:"#platform-select",projectInput:".aqs-project-input",timestampFormat:"YYYYMMDD00"});b.exports=d},{"../shared/pv":5}],9:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var g=function(){function a(a,b){for(var c=0;c\n \n "+ ++b+"\n \n \n "+this.formatNumber(d.views)+"
        ")}}this.pushParams(),$(".data-links").removeClass("invisible"),$(".search-topviews").removeClass("invisible"),$(".topview-entry--remove").off("click").on("click",function(b){var c=a.pageNames[$(b.target).data("article-id")];a.addExclude(c),a.pushParams()})}},{key:"addExclude",value:function(a){var b=this,c=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];Array.isArray(a)||(a=[a]),a.forEach(function(a){b.excludes.includes(a)||b.excludes.push(a)}),$(i.articleSelector).html(""),this.excludes.forEach(function(a){var c=$("
        ").text(a).html();$("").appendTo(b.config.articleSelector)}),c&&$(this.config.articleSelector).val(this.excludes).trigger("change")}},{key:"clearSearch",value:function(){$(".topviews-search-icon").hasClass("glyphicon-remove")&&($("#topviews_search_field").val(""),$(".topviews-search-icon").removeClass("glyphicon-remove").addClass("glyphicon-search"),this.drawData())}},{key:"exportCSV",value:function(){var a=this,b="data:text/csv;charset=utf-8,Page,Views\n";this.pageData.forEach(function(c){if(!a.excludes.includes(c.article)){var d='"'+c.article.replace(/"/g,'""')+'"';b+=d+","+c.views+"\n"}}),this.downloadData(b,"csv")}},{key:"exportJSON",value:function(){var a=this,b=[];this.pageData.forEach(function(c,d){a.excludes.includes(c.article)||b.push({page:c.article,views:c.views})});var c="data:text/json;charset=utf-8,"+JSON.stringify(b);this.downloadData(c,"json")}},{key:"getPageviewsURL",value:function(a){var b=moment(this.daterangepicker.startDate),c=moment(this.daterangepicker.endDate),d=$(this.config.platformSelector).val(),e=$(this.config.projectInput).val();return 0===c.diff(b,"days")&&(b.subtract(3,"days"),c.add(3,"days")),"/pageviews#start="+b.format("YYYY-MM-DD")+("&end="+c.format("YYYY-MM-DD")+"&project="+e+"&platform="+d+"&pages="+a)}},{key:"getParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],b={project:$(this.config.projectInput).val(),platform:$(this.config.platformSelector).val()};return this.specialRange&&a?b.range=this.specialRange.range:(b.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),b.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),b}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"popParams",value:function(){var a=this;this.startSpinny();var b=void 0,c=void 0,d=this.parseQueryString("excludes");if($(this.config.projectInput).val(d.project||this.config.defaults.project),!this.validateProject()){if(this.patchUsage("tv"),d.range)this.setSpecialRange(d.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(d.start){if(b=moment(d.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(d.end||Date.now()),bc)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),void this.resetView();this.daterangepicker.startDate=b,this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);$(this.config.platformSelector).val(d.platform||"all-access"),!d.excludes||1===d.excludes.length&&!d.excludes[0]?this.excludes=this.config.defaults.excludes:this.excludes=d.excludes.map(function(a){return a.descore()}),this.params=location.search,this.initData().then(function(){a.setupArticleSelector(),a.drawData(),a.setupListeners()})}}},{key:"pushParams",value:function(){var a=this.underscorePageNames(this.excludes).join("|").replace(/[&%]/g,escape);window.history&&window.history.replaceState&&window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&excludes="+a),$(".permalink").prop("href","?"+$.param(this.getPermaLink())+"&excludes="+a)}},{key:"resetArticleSelector",value:function(){var a=$(this.config.articleSelector);a.off("change"),a.val(null),a.html(""),a.select2("data",null),a.select2("destroy"),this.setupArticleSelector()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.max=null,this.offset=0,this.pageData=[],this.pageNames=[],this.stopSpinny(),$(".chart-container").html(""),$(".expand-chart").hide(),$(".data-links").addClass("invisible"),$(".search-topviews").addClass("invisible"),$(".message-container").html(""),a&&(this.resetArticleSelector(),this.excludes=[])}},{key:"searchTopviews",value:function(){var a=this,b=$("#topviews_search_field").val();if(!b)return this.clearSearch();var c=[],d=0;this.pageData.forEach(function(e,f){a.excludes.includes(e.article)||(d++,new RegExp(b,"i").test(e.article)&&(e.rank=d,e.index=f,c.push(e)))}),$(".chart-container").html(""),$(".expand-chart").hide(),$(".topviews-search-icon").removeClass("glyphicon-search").addClass("glyphicon-remove"),c.forEach(function(b){var c=100*(b.views/a.max),d=i18nRtl?"to left":"to right";$(".chart-container").append("
        \n \n "+b.rank+"\n \n \n "+a.formatNumber(b.views)+"
        ")}),$(".topview-entry--remove").off("click").on("click",function(c){var d=a.pageNames[$(c.target).data("article-id")];a.addExclude(d),a.searchTopviews(b,!1)})}},{key:"setupArticleSelector",value:function(){var a=this,b=arguments.length<=0||void 0===arguments[0]?this.excludes:arguments[0],c=$(this.config.articleSelector);c.select2({data:[],maximumSelectionLength:50,minimumInputLength:0,placeholder:$.i18n("hover-to-exclude")}),b.length&&this.setArticleSelectorDefaults(b),c.on("change",function(b){a.excludes=$(b.target).val()||[],a.max=null,a.drawData()}),setTimeout(function(){$(".select2-search__field").prop("disabled",!0)})}},{key:"setArticleSelectorDefaults",value:function(a){var b=this;return a=a.map(function(a){var c=$("
        ").text(a).html();return $("").appendTo(b.config.articleSelector),a}),$(this.config.articleSelector).select2("val",a),$(this.config.articleSelector).select2("close"),a}},{key:"setupDateRangeSelector",value:function(){var a=this;h(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this);var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(a){this.setSpecialRange("latest-"+$(this).data("value"))}),c.on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setupListeners",value:function(){var a=this;h(Object.getPrototypeOf(b.prototype),"setupListeners",this).call(this),$(this.config.platformSelector).on("change",this.processInput.bind(this)),$(".expand-chart").on("click",function(){a.offset+=a.config.pageSize,a.drawData()}),$(this.config.dateRangeSelector).on("change",function(b){a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null),a.processInput()}),$("#topviews_search_field").on("keyup",this.searchTopviews.bind(this)),$(".topviews-search-icon").on("click",this.clearSearch.bind(this))}},{key:"setupProjectInput",value:function(){var a=this;$(this.config.projectInput).on("change",function(b){return b.target.value?void(a.validateProject()||(a.resetView(!1),a.processInput(!0).then(resetArticleSelector))):void(b.target.value=a.config.defaults.project)})}},{key:"initData",value:function(){var a,b=this,c=$.Deferred();this.startSpinny(),$(".expand-chart").hide();for(var d=this.daterangepicker.startDate,e=this.daterangepicker.endDate,f=$(this.config.platformSelector).val(),g=[],h={},i=moment(d);i.isBefore(e);i.add(1,"d"))g.push($.ajax({url:"https://wikimedia.org/api/rest_v1/metrics/pageviews/top/"+this.project+"/"+f+"/"+i.format("YYYY/MM/DD"),dataType:"json"}));return(a=$).when.apply(a,g).then(function(){for(var a=arguments.length,d=Array(a),e=0;a>e;e++)d[e]=arguments[e];1===g.length&&(d=[d]),d.forEach(function(a){a[0].items[0].articles.forEach(function(a){var b=a.article.replace(/_/g," ");h[b]?h[b]+=a.views:h[b]=a.views})});var f=[];for(var i in h)f.push({article:i,views:h[i]});return b.pageData=f.sort(function(a,b){return b.views-a.views}),b.pageNames=b.pageData.map(function(a){return a.article}),b.excludes.length?c.resolve(b.pageData):void b.filterByNamespace(b.pageNames.slice(0,30)).done(function(){return c.resolve(b.pageData)})})}},{key:"filterByNamespace",value:function(a){var b=this,c=arguments.length<=1||void 0===arguments[1]?0:arguments[1],d=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php",data:{action:"query",titles:a.join("|"),meta:"siteinfo",siprop:"general",format:"json"},prop:"info",dataType:"jsonp"}).always(function(a){a&&a.query&&a.query.pages&&!function(){var d={};(a.query.normalized||[]).map(function(a){d[a.to]=a.from});var e=[a.query.general.mainpage];Object.keys(a.query.pages).forEach(function(b){var f=a.query.pages[b];if(f.ns!==c||""===f.missing){var g=a.query.pages[b].title,h=d[g];delete d[g],e.push(h||g)}}),b.addExclude(e)}(),d.resolve()})}},{key:"validateProject",value:function(){var a=$(this.config.projectInput).val();return k.includes(a)?void $("body").removeClass("invalid-project"):(this.resetView(),this.writeMessage($.i18n("invalid-project",""+a+""),!0),$("body").addClass("invalid-project"),!0)}}]),b}(l);$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new m})},{"../shared/pv":5,"../shared/site_map":7,"./config":8}]},{},[1,2,3,4,5,6,7,9]); \ No newline at end of file +if(this.timePicker){var h=parseInt(this.container.find(".left .hourselect").val(),10);if(!this.timePicker24Hour){var i=f.find(".ampmselect").val();"PM"===i&&12>h&&(h+=12),"AM"===i&&12===h&&(h=0)}var j=parseInt(this.container.find(".left .minuteselect").val(),10),k=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;g=g.clone().hour(h).minute(j).second(k)}this.endDate=null,this.setStartDate(g.clone())}else{if(this.timePicker){var h=parseInt(this.container.find(".right .hourselect").val(),10);if(!this.timePicker24Hour){var i=this.container.find(".right .ampmselect").val();"PM"===i&&12>h&&(h+=12),"AM"===i&&12===h&&(h=0)}var j=parseInt(this.container.find(".right .minuteselect").val(),10),k=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;g=g.clone().hour(h).minute(j).second(k)}this.setEndDate(g.clone()),this.autoApply&&this.clickApply()}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView()}},clickApply:function(a){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(a){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(a){var b=d(a.target).closest(".calendar").hasClass("left"),c=b?"left":"right",e=this.container.find(".calendar."+c),f=parseInt(e.find(".monthselect").val(),10),g=e.find(".yearselect").val();b||(gthis.maxDate.year()||g==this.maxDate.year()&&f>this.maxDate.month())&&(f=this.maxDate.month(),g=this.maxDate.year()),b?(this.leftCalendar.month.month(f).year(g),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(f).year(g),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(a){var b=d(a.target).closest(".calendar"),c=b.hasClass("left"),e=parseInt(b.find(".hourselect").val(),10),f=parseInt(b.find(".minuteselect").val(),10),g=this.timePickerSeconds?parseInt(b.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var h=b.find(".ampmselect").val();"PM"===h&&12>e&&(e+=12),"AM"===h&&12===e&&(e=0)}if(c){var i=this.startDate.clone();i.hour(e),i.minute(f),i.second(g),this.setStartDate(i),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==i.format("YYYY-MM-DD")&&this.endDate.isBefore(i)&&this.setEndDate(i.clone())}else if(this.endDate){var j=this.endDate.clone();j.hour(e),j.minute(f),j.second(g),this.setEndDate(j)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},formInputsChanged:function(a){var b=d(a.target).closest(".calendar").hasClass("right"),e=c(this.container.find('input[name="daterangepicker_start"]').val(),this.locale.format),f=c(this.container.find('input[name="daterangepicker_end"]').val(),this.locale.format);e.isValid()&&f.isValid()&&(b&&f.isBefore(e)&&(e=f.clone()),this.setStartDate(e),this.setEndDate(f),b?this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)):this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format))),this.updateCalendars(),this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"))},elementChanged:function(){if(this.element.is("input")&&this.element.val().length&&!(this.element.val().length=g;g.add(1,"d"))if(f[g])a.items.push(f[g]);else{var h=g.isSame(this.config.maxDate)||g.isSame(moment(this.config.maxDate).subtract(1,"days"));a.items.push(e({timestamp:g.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",h?null:0))}return a}},{key:"getCircularData",value:function(a,b,c){var d=this,e=a.items.map(function(a){return d.isPageviews()?a.views:a.devices}),f=this.config.colors[c],g=e.reduce(function(a,b){return a+b}),h=Math.round(g/e.length);return Object.assign({label:b.descore(),value:g,average:h},this.config.chartConfig[this.chartType].dataset(f))}},{key:"getLinearData",value:function(a,b,c){var e=this,f=a.items.map(function(a){return e.isPageviews()?a.views:a.devices}),g=f.reduce(function(a,b){return a+b}),h=Math.round(g/f.length),i=Math.max.apply(Math,d(f)),j=Math.min.apply(Math,d(f)),k=this.config.colors[c%10];return Object.assign({label:b.descore(),data:f,sum:g,average:h,max:i,min:j,color:k},this.config.chartConfig[this.chartType].dataset(k))}},{key:"getPageViewsData",value:function(a){var b=this,c=this.daterangepicker.startDate.startOf("day"),d=this.daterangepicker.endDate.startOf("day"),e=$.Deferred(),f=0,g={},h=a.length,i=[],j={entities:a,labels:[],datasets:[],errors:[],fatalErrors:[],promises:[]},k=function l(a,k){var m=encodeURIComponent(a),n="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+b.project+("/"+$(b.config.platformSelector).val()+"/"+$(b.config.agentSelector).val()+"/"+m+"/daily")+("/"+c.format(b.config.timestampFormat)+"/"+d.format(b.config.timestampFormat)),o=$.ajax({url:n,dataType:"json"});j.promises.push(o),o.done(function(e){try{e=b.fillInZeros(e,c,d),b.config.linearCharts.includes(b.chartType)?j.datasets.push(b.getLinearData(e,a,k)):j.datasets.push(b.getCircularData(e,a,k)),e.items&&!j.labels.length&&(j.labels=e.items.map(function(a){return moment(a.timestamp,b.config.timestampFormat).format(b.dateFormat)}))}catch(f){return j.fatalErrors.push(f)}}).fail(function(c){var d="Error in Cassandra table storage backend"===c.responseJSON.title;return d&&(g[b.project]?g[b.project]++:g[b.project]=1,g[b.project]<3)?(h++,b.rateLimit(l,100,b)(a,k)):(j.entities=j.entities.filter(function(b){return b!==a}),void(d?i.push(a):b.writeMessage(b.getPageLink(a,b.project)+": "+$.i18n("api-error","Pageviews API")+" - "+c.responseJSON.title)))}).always(function(){++f===h&&(e.resolve(j),i.length&&b.writeMessage($.i18n("api-error-timeout","
          "+i.map(function(a){return"
        • "+b.getPageLink(a,b.project.escape())+"
        • "}).join("")+"
        ")))})};return a.forEach(function(a,b){return k(a,b)}),e}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"printChart",value:function(){var a=window.open();a.document.write(''),a.print(),a.close()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];try{this.destroyChart(),a&&this.resetSelect2()}catch(b){}finally{this.stopSpinny(),$(".data-links").addClass("invisible"),$(this.config.chart).hide(),this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30)}},{key:"shouldBeLogarithmic",value:function(a){var b;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var c=[];a.forEach(function(a){c.push(a.map(function(a){return a||0}))});var e=Math.max.apply(Math,d((b=[]).concat.apply(b,c)));if(10>=e)return!1;var f=!1;return c.forEach(function(a){a.push(e);var b=a.reduce(function(a,b){return a+b}),c=b/a.length,d=0;return a.forEach(function(a){return d+=a?a*Math.log(a/c):0}),d/b>.5?f=!0:void 0}),f}},{key:"setupDateRangeSelector",value:function(){var a=this;if(j(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(b){a.setSpecialRange("latest-"+$(b.target).data("value"))}),c.on("change",function(b){a.setChartPointDetectionRadius(),a.processInput(),a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null)})}}},{key:"updateChart",value:function(a){var b=this;if($("#chart-legend").html(""),!this.showErrors(a)){if(!a.entities.length)return this.stopSpinny();if(1===a.entities.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),"true"===this.autoLogDetection){var c=this.shouldBeLogarithmic(a.datasets.map(function(a){return a.data}));$(this.config.logarithmicCheckbox).prop("checked",c),$(".begin-at-zero").toggleClass("disabled",c)}var d=new Array(a.entities.length);a.datasets.forEach(function(c){b.isLogarithmic()&&(c.data=c.data.map(function(a){return a||null})),d[a.entities.indexOf(c.label.score())]=c});var e=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(e.scales=Object.assign({},e.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var f=$(this.config.chart)[0].getContext("2d");if(this.config.linearCharts.includes(this.chartType)){var g={labels:a.labels,datasets:d};"radar"===this.chartType?e.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):e.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"),this.chartObj=new Chart(f,{type:this.chartType,data:g,options:e})}else this.chartObj=new Chart(f,{type:this.chartType,data:{labels:d.map(function(a){return a.label}),datasets:[{data:d.map(function(a){return a.value}),backgroundColor:d.map(function(a){return a.backgroundColor}),hoverBackgroundColor:d.map(function(a){return a.hoverBackgroundColor}),averages:d.map(function(a){return a.average})}]},options:e})}catch(h){return this.showErrors({errors:[],fatalErrors:[h]})}$("#chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible")}}},{key:"showErrors",value:function(a){if(a.fatalErrors.length){this.resetView(!0);var b=a.fatalErrors.unique();return this.showFatalErrors(b),!0}if(a.errors.length){var c=a.errors.unique().map(function(a){return"
      • "+a+"
      • "}).join("");if(this.writeMessage($.i18n("api-error","Pageviews API")+"
          "+c+"
        "),a.entities&&a.errors.length===a.entities.length)return!1}return!1}}]),b}(a)};b.exports=k},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(b){return a[b]})},Array.prototype.unique=function(){return this.filter(function(a,b,c){return c.indexOf(a)===b})},window.mix=function(a){return new f(a)};var f=function(){function a(b){d(this,a),this.superclass=b}return e(a,[{key:"with",value:function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.reduce(function(a,b){return b(a)},this.superclass)}}]),a}();"undefined"!=typeof Chart&&(Chart.Controller.prototype.getElementsAtEvent=function(a){var b=Chart.helpers,c=b.getRelativePosition(a,this.chart),d=[],e=function(){if(this.data.datasets)for(var a=0;a=h;h.add(1,"d"))if(e[h])f.push(e[h]);else{var i=h.isSame(this.config.maxDate)||h.isSame(moment(this.config.maxDate).subtract(1,"days"));f.push({timestamp:h.format(this.config.timestampFormat),views:i?null:0}),i&&g.push(h.format())}return[f,g]}},{key:"getCacheKey",value:function(){return"lv-cache-"+this.hashCode(JSON.stringify(this.getParams(!0)))}},{key:"getPageviewsURL",value:function(a,b){var c=moment(this.daterangepicker.startDate),d=moment(this.daterangepicker.endDate),e=$(this.config.platformSelector).val();return 0===d.diff(c,"days")&&(c.subtract(3,"days"),d.add(3,"days")),"/pageviews?start="+c.format("YYYY-MM-DD")+("&end="+d.format("YYYY-MM-DD")+"&project="+a+"&platform="+e+"&pages="+b)}},{key:"getPermaLink",value:function(){var a=this.getParams(!0);return a.sort=this.sort,a.direction=this.direction,a}},{key:"getState",value:function(){var a=$("main")[0].classList;return this.config.formStates.filter(function(b){return a.contains(b)})[0]}},{key:"isRequestCached",value:function(){return simpleStorage.hasKey(this.getCacheKey())}},{key:"renderData",value:function(a){var b=this,c=this.outputData.listData,d=c.sort(function(a,c){var d=b.getSortProperty(a,b.sort),e=b.getSortProperty(c,b.sort);return e>d?b.direction:d>e?-b.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var e=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" span").addClass(e).removeClass("glyphicon-sort");try{a(d)}catch(f){this.setState("complete"),this.showFatalErrors([f])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(a){var b=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+a).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(a+"-mode"),"chart"===a){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var c=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var d=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",d)}this.isLogarithmic()&&(c.scales=Object.assign({},c.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(a,c,d){var e=a/Math.pow(10,Math.floor(Chart.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?b.formatNumber(a):""}}}]})),"radar"===this.chartType?c.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):c.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var e=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(e,{type:this.chartType,data:this.outputData,options:c}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(a){$(".progress-bar").css("width",a.toFixed(2)+"%")}}]),b}(a)};b.exports=h},{}],4:[function(a,b,c){"use strict";Array.prototype.includes||(Array.prototype.includes=function(a){return-1!==this.indexOf(a)}),String.prototype.includes||(String.prototype.includes=function(a,b){return"number"!=typeof b&&(b=0),b+a.length>this.length?!1:-1!==this.indexOf(a,b)}),"function"!=typeof Object.assign&&!function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c>>0,d=arguments[1],e=void 0,f=0;c>f;f++)if(e=b[f],a.call(d,e,f,b))return e}),Array.prototype.fill||(Array.prototype.fill=function(a){if(null===this)throw new TypeError("this is null or not defined");for(var b=Object(this),c=b.length>>>0,d=arguments[1],e=d>>0,f=0>e?Math.max(c+e,0):Math.min(e,c),g=arguments[2],h=void 0===g?c:g>>0,i=0>h?Math.max(c+h,0):Math.min(h,c);i>f;)b[f]=a,f++;return b})},{}],5:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function a(a,b){for(var c=0;c"+location.hostname+h+"")}var i=d({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(i.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(i).then(c.initialize.bind(c)),c}return g(b,a),i(b,[{key:"addSiteNotice",value:function(a,b,c,d){c=c?""+c+" ":"";var e=c+b;d?(d=" alert-dismissable",e='\n '+e):d="",$(".site-notice").append("
        "+e+"
        ")}},{key:"checkDateRange",value:function(a){if(a.range)this.setSpecialRange(a.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(a.start){var b=moment(a.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(a.end||Date.now());if(bc)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),!1;this.daterangepicker.startDate=b,this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);return!0}},{key:"clearSiteNotices",value:function(){$(".site-notice").html("")}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"downloadData",value:function(a,b){var c=encodeURI(a),d=document.createElement("a");if("string"==typeof d.download){document.body.appendChild(d);var e=this.getExportFilename()+"."+b;d.download=e,d.href=c,d.click(),document.body.removeChild(d)}else window.open(c)}},{key:"fillInSettings",value:function(){var a=this;$.each($("#settings-modal input"),function(b,c){"checkbox"===c.type?c.checked="true"===a[c.name]:c.checked=a[c.name]===c.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(a){var b=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===b?this.n(a):a}},{key:"formatYAxisNumber",value:function(a){return a%1===0?this.formatNumber(a):null}},{key:"getDateHeadings",value:function(a){for(var b=[],c=moment(this.daterangepicker.endDate).add(1,"d"),d=moment(this.daterangepicker.startDate);d.isBefore(c);d.add(1,"d"))a?b.push(d.format(this.dateFormat)):b.push(d.format("YYYY-MM-DD"));return b}},{key:"getExpandedPageURL",value:function(a){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getExportFilename",value:function(){var a=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),b=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+a+"-"+b}},{key:"getPageLink",value:function(a,b){return''+a.descore().escape()+""}},{key:"getPageURL",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.project:arguments[1];return"//"+b.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(a.score()).replace(/'/,escape)}},{key:"getLocaleDateString",value:function(){var a={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY", +"ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"};if(!navigator.language)return this.config.defaults.dateFormat;var b=navigator.language.toLowerCase();return a[b]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(a){try{return localStorage.getItem(a)}catch(b){return storage[a]}}},{key:"getBugReportURL",value:function(a){var b="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit"+("§ion=new&preloadtitle="+this.app.upcase()+" bug report");return a?b+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+a:b}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(a,b){try{return localStorage.setItem(a,b)}catch(c){return storage[a]=b}}},{key:"hashCode",value:function(a){return a.split("").reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!["langviews","massviews","redirectviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+b.multilangProjects.join("|")+")").test(this.project)}},{key:"mapNormalizedPageNames",value:function(a,b){return b.forEach(function(b){a=a.map(function(a){return b.from===a?b.to:a})}),a}},{key:"n",value:function(a){return new Number(a).toLocaleString()}},{key:"normalizePageNames",value:function(a){var b=this,c=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&format=json&titles="+a.join("|"),dataType:"jsonp"}).then(function(d){return d.query.normalized&&(a=b.mapNormalizedPageNames(a,d.query.normalized)),c.resolve(a)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(a){for(var b=decodeURI(location.search.slice(1)),c=b.split("&"),d={},e=0;e").text(a).html();$("").appendTo(b.config.select2Input)}),$(this.config.select2Input).select2("val",a),$(this.config.select2Input).select2("close"),a}},{key:"setSpecialRange",value:function(a){var b=Object.keys(this.config.specialRanges).indexOf(a),c=void 0,d=void 0;if(a.includes("latest-")){var e=parseInt(a.replace("latest-",""),10)||20,f=this.config.specialRanges.latest(e),g=h(f,2);c=g[0],d=g[1]}else{if(!(b>=0))return;var i="latest"===a?this.config.specialRanges.latest():this.config.specialRanges[a],j=h(i,2);c=j[0],d=j[1],$(".daterangepicker .ranges li").eq(b).trigger("click")}return this.specialRange={range:a,value:c.format(this.dateFormat)+" - "+d.format(this.dateFormat)},this.daterangepicker.startDate=c,this.daterangepicker.setEndDate(d),this.specialRange}},{key:"setupSelect2Colors",value:function(){var a=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(b,c){a.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(c+1)+") { background: "+b+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var a=this;$("a[href='#']").on("click",function(a){return a.preventDefault()}),$(".lang-link").on("click",function(b){var c=moment().add(a.config.cookieExpiry,"days").toDate().toGMTString();document.cookie="TsIntuition_userlang="+$(b.target).data("lang")+"; expires="+c+"; path=/";var d=Math.floor(Date.now()/1e3)+24*a.config.cookieExpiry*60*60;document.cookie="TsIntuition_expiry="+d+"; expires="+c+"; path=/",location.reload()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this))}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var a=this,b=$(this.config.dateRangeSelector),c={};Object.keys(this.config.specialRanges).forEach(function(b){"latest"!==b&&(c[$.i18n(b)]=a.config.specialRanges[b])});var d={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.defaults.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:c};this.config.dateLimit&&(d.dateLimit={days:this.config.dateLimit}),b.daterangepicker(d),$(".daterangepicker").append($("
        ").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(b){var c=$(".daterangepicker .ranges li").index(b.target),d=a.daterangepicker.container,e=d.find(".daterangepicker_input input");a.specialRange={range:Object.keys(a.config.specialRanges)[c],value:e[0].value+" - "+e[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setThrottle",value:function(){this.isRequestCached()||simpleStorage.set("pageviews-throttle",!0,{TTL:9e4})}},{key:"showFatalErrors",value:function(a){var b=this;if(this.clearMessages(),a.forEach(function(a){b.writeMessage(""+$.i18n("fatal-error")+": "+a+"")}),this.debug)throw a[0];a&&a[0]&&a[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+a[0].stack),title:"Pageviews Analysis error report: "+a[0]}}).done(function(a){a&&a.result&&a.result.objectName?b.writeMessage($.i18n("error-please-report",b.getBugReportURL(a.result.objectName))):b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))}).fail(function(){b.writeMessage($.i18n("error-please-report",b.getBugReportURL()))})}},{key:"splash",value:function(){var a="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",a),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",a),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",a),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",a),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ___ _ _ _ _ ",a),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",a),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",a),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",a),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',a),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",a),console.log("%c ",a),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",a)}},{key:"startSpinny",value:function(){var a=this;$(".chart-container").addClass("loading"),clearTimeout(this.timeout),this.timeout=setTimeout(function(b){a.resetView(),a.writeMessage(""+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",a.getBugReportURL())+"\n ",!0)},2e4)}},{key:"stopSpinny",value:function(){$(".chart-container").removeClass("loading"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(a){return a.map(function(a){return decodeURIComponent(a).score()})}},{key:"updateInterAppLinks",value:function(){var a=this;$(".interapp-link").each(function(b,c){var d=c.href.split("?")[0];c.classList.contains("interapp-link--siteviews")?c.href=d+"?sites="+a.project.escape()+".org":c.href=d+"?project="+a.project.escape()+".org"})}},{key:"writeMessage",value:function(a,b){return b&&this.clearMessages(),$(".message-container").append("
        "+a+"
        ")}},{key:"dateFormat",get:function(){return"true"===this.localizeDateFormat?this.getLocaleDateString():this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var a=$(this.config.projectInput).val();return a?a.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),b}(j);b.exports=k},{"./pv_config":6}],6:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c1?"line":"bar"},daysAgo:20,dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"true",beginAtZero:"false",rememberChart:"true"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(a){return b.formatNumber(a)}}}]},legendCallback:function(a){return b.config.linearLegend(a.data.datasets,c)}},minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],latest:function(){var a=arguments.length<=0||void 0===arguments[0]?c.config.defaults.daysAgo:arguments[0];return[moment().subtract(a,"days").startOf("day"),c.config.maxDate]}},timestampFormat:"YYYYMMDD00"}}return e(a,[{key:"linearTooltips",get:function(){var a=this;return{mode:"label",callbacks:{label:function(b){return Number.isNaN(b.yLabel)?" "+$.i18n("unknown"):" "+a.formatNumber(b.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var a=this;return{callbacks:{label:function b(c,d){var e=d.datasets[c.datasetIndex].data[c.index],b=d.labels[c.index];return Number.isNaN(e)?b+": "+$.i18n("unknown"):b+": "+a.formatNumber(e)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),a}();b.exports=f},{}],7:[function(a,b,c){"use strict";var d={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org", +lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};b.exports=d},{}],8:[function(a,b,c){"use strict";var d=(a("../shared/pv"),{articleSelector:".aqs-select2-selector",dateRangeSelector:".aqs-date-range-selector",dateLimit:31,defaults:{dateRange:"last-week",daysAgo:7,excludes:[],project:"en.wikipedia.org"},pageSize:20,platformSelector:"#platform-select",projectInput:".aqs-project-input",timestampFormat:"YYYYMMDD00"});b.exports=d},{"../shared/pv":5}],9:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var g=function(){function a(a,b){for(var c=0;c\n \n "+ ++b+"\n \n \n "+this.formatNumber(d.views)+"
        ")}}this.pushParams(),$(".data-links").removeClass("invisible"),$(".search-topviews").removeClass("invisible"),$(".topview-entry--remove").off("click").on("click",function(b){var c=a.pageNames[$(b.target).data("article-id")];a.addExclude(c),a.pushParams()})}},{key:"addExclude",value:function(a){var b=this,c=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];Array.isArray(a)||(a=[a]),a.forEach(function(a){b.excludes.includes(a)||b.excludes.push(a)}),$(i.articleSelector).html(""),this.excludes.forEach(function(a){var c=$("
        ").text(a).html();$("").appendTo(b.config.articleSelector)}),c&&$(this.config.articleSelector).val(this.excludes).trigger("change")}},{key:"clearSearch",value:function(){$(".topviews-search-icon").hasClass("glyphicon-remove")&&($("#topviews_search_field").val(""),$(".topviews-search-icon").removeClass("glyphicon-remove").addClass("glyphicon-search"),this.drawData())}},{key:"exportCSV",value:function(){var a=this,b="data:text/csv;charset=utf-8,Page,Views\n";this.pageData.forEach(function(c){if(!a.excludes.includes(c.article)){var d='"'+c.article.replace(/"/g,'""')+'"';b+=d+","+c.views+"\n"}}),this.downloadData(b,"csv")}},{key:"exportJSON",value:function(){var a=this,b=[];this.pageData.forEach(function(c,d){a.excludes.includes(c.article)||b.push({page:c.article,views:c.views})});var c="data:text/json;charset=utf-8,"+JSON.stringify(b);this.downloadData(c,"json")}},{key:"getPageviewsURL",value:function(a){var b=moment(this.daterangepicker.startDate),c=moment(this.daterangepicker.endDate),d=$(this.config.platformSelector).val(),e=$(this.config.projectInput).val();return 0===c.diff(b,"days")&&(b.subtract(3,"days"),c.add(3,"days")),"/pageviews#start="+b.format("YYYY-MM-DD")+("&end="+c.format("YYYY-MM-DD")+"&project="+e+"&platform="+d+"&pages="+a)}},{key:"getParams",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],b={project:$(this.config.projectInput).val(),platform:$(this.config.platformSelector).val()};return this.specialRange&&a?b.range=this.specialRange.range:(b.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),b.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),b}},{key:"getPermaLink",value:function(){var a=this.getParams(!1);return delete a.range,a}},{key:"popParams",value:function(){var a=this;this.startSpinny();var b=void 0,c=void 0,d=this.parseQueryString("excludes");if($(this.config.projectInput).val(d.project||this.config.defaults.project),!this.validateProject()){if(this.patchUsage("tv"),d.range)this.setSpecialRange(d.range)||(this.addSiteNotice("danger",$.i18n("param-error-3"),$.i18n("invalid-params"),!0),this.setSpecialRange(this.config.defaults.dateRange));else if(d.start){if(b=moment(d.start||moment().subtract(this.config.defaults.daysAgo,"days")),c=moment(d.end||Date.now()),bc)return this.addSiteNotice("warning",$.i18n("param-error-2"),$.i18n("invalid-params"),!0),void this.resetView();this.daterangepicker.startDate=b,this.daterangepicker.setEndDate(c)}else this.setSpecialRange(this.config.defaults.dateRange);$(this.config.platformSelector).val(d.platform||"all-access"),!d.excludes||1===d.excludes.length&&!d.excludes[0]?this.excludes=this.config.defaults.excludes:this.excludes=d.excludes.map(function(a){return a.descore()}),this.params=location.search,this.initData().then(function(){a.setupArticleSelector(),a.drawData(),a.setupListeners()})}}},{key:"pushParams",value:function(){var a=this.underscorePageNames(this.excludes).join("|").replace(/[&%]/g,escape);window.history&&window.history.replaceState&&window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&excludes="+a),$(".permalink").prop("href","?"+$.param(this.getPermaLink())+"&excludes="+a)}},{key:"resetArticleSelector",value:function(){var a=$(this.config.articleSelector);a.off("change"),a.val(null),a.html(""),a.select2("data",null),a.select2("destroy"),this.setupArticleSelector()}},{key:"resetView",value:function(){var a=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.max=null,this.offset=0,this.pageData=[],this.pageNames=[],this.stopSpinny(),$(".chart-container").html(""),$(".expand-chart").hide(),$(".data-links").addClass("invisible"),$(".search-topviews").addClass("invisible"),$(".message-container").html(""),a&&(this.resetArticleSelector(),this.excludes=[])}},{key:"searchTopviews",value:function(){var a=this,b=$("#topviews_search_field").val();if(!b)return this.clearSearch();var c=[],d=0;this.pageData.forEach(function(e,f){a.excludes.includes(e.article)||(d++,new RegExp(b,"i").test(e.article)&&(e.rank=d,e.index=f,c.push(e)))}),$(".chart-container").html(""),$(".expand-chart").hide(),$(".topviews-search-icon").removeClass("glyphicon-search").addClass("glyphicon-remove"),c.forEach(function(b){var c=100*(b.views/a.max),d=i18nRtl?"to left":"to right";$(".chart-container").append("
        \n \n "+b.rank+"\n \n \n "+a.formatNumber(b.views)+"
        ")}),$(".topview-entry--remove").off("click").on("click",function(c){var d=a.pageNames[$(c.target).data("article-id")];a.addExclude(d),a.searchTopviews(b,!1)})}},{key:"setupArticleSelector",value:function(){var a=this,b=arguments.length<=0||void 0===arguments[0]?this.excludes:arguments[0],c=$(this.config.articleSelector);c.select2({data:[],maximumSelectionLength:50,minimumInputLength:0,placeholder:$.i18n("hover-to-exclude")}),b.length&&this.setArticleSelectorDefaults(b),c.on("change",function(b){a.excludes=$(b.target).val()||[],a.max=null,a.drawData()}),setTimeout(function(){$(".select2-search__field").prop("disabled",!0)})}},{key:"setArticleSelectorDefaults",value:function(a){var b=this;return a=a.map(function(a){var c=$("
        ").text(a).html();return $("").appendTo(b.config.articleSelector),a}),$(this.config.articleSelector).select2("val",a),$(this.config.articleSelector).select2("close"),a}},{key:"setupDateRangeSelector",value:function(){var a=this;h(Object.getPrototypeOf(b.prototype),"setupDateRangeSelector",this).call(this);var c=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(a){this.setSpecialRange("latest-"+$(this).data("value"))}),c.on("apply.daterangepicker",function(b,c){c.chosenLabel===$.i18n("custom-range")&&(a.specialRange=null,a.daterangepicker.updateElement())})}},{key:"setupListeners",value:function(){var a=this;h(Object.getPrototypeOf(b.prototype),"setupListeners",this).call(this),$(this.config.platformSelector).on("change",this.processInput.bind(this)),$(".expand-chart").on("click",function(){a.offset+=a.config.pageSize,a.drawData()}),$(this.config.dateRangeSelector).on("change",function(b){a.specialRange&&a.specialRange.value!==b.target.value&&(a.specialRange=null),a.processInput()}),$("#topviews_search_field").on("keyup",this.searchTopviews.bind(this)),$(".topviews-search-icon").on("click",this.clearSearch.bind(this))}},{key:"setupProjectInput",value:function(){var a=this;$(this.config.projectInput).on("change",function(b){return b.target.value?void(a.validateProject()||(a.resetView(!1),a.processInput(!0).then(resetArticleSelector))):void(b.target.value=a.config.defaults.project)})}},{key:"initData",value:function(){var a,b=this,c=$.Deferred();this.startSpinny(),$(".expand-chart").hide();for(var d=this.daterangepicker.startDate,e=this.daterangepicker.endDate,f=$(this.config.platformSelector).val(),g=[],h={},i=moment(d);i.isBefore(e);i.add(1,"d"))g.push($.ajax({url:"https://wikimedia.org/api/rest_v1/metrics/pageviews/top/"+this.project+"/"+f+"/"+i.format("YYYY/MM/DD"),dataType:"json"}));return(a=$).when.apply(a,g).then(function(){for(var a=arguments.length,d=Array(a),e=0;a>e;e++)d[e]=arguments[e];1===g.length&&(d=[d]),d.forEach(function(a){a[0].items[0].articles.forEach(function(a){var b=a.article.replace(/_/g," ");h[b]?h[b]+=a.views:h[b]=a.views})});var f=[];for(var i in h)f.push({article:i,views:h[i]});return b.pageData=f.sort(function(a,b){return b.views-a.views}),b.pageNames=b.pageData.map(function(a){return a.article}),b.excludes.length?c.resolve(b.pageData):void b.filterByNamespace(b.pageNames.slice(0,30)).done(function(){return c.resolve(b.pageData)})})}},{key:"filterByNamespace",value:function(a){var b=this,c=arguments.length<=1||void 0===arguments[1]?0:arguments[1],d=$.Deferred();return $.ajax({url:"https://"+this.project+".org/w/api.php",data:{action:"query",titles:a.join("|"),meta:"siteinfo",siprop:"general",format:"json"},prop:"info",dataType:"jsonp"}).always(function(a){a&&a.query&&a.query.pages&&!function(){var d={};(a.query.normalized||[]).map(function(a){d[a.to]=a.from});var e=[a.query.general.mainpage];Object.keys(a.query.pages).forEach(function(b){var f=a.query.pages[b];if(f.ns!==c||""===f.missing){var g=a.query.pages[b].title,h=d[g];delete d[g],e.push(h||g)}}),b.addExclude(e)}(),d.resolve()})}},{key:"validateProject",value:function(){var a=$(this.config.projectInput).val();return k.includes(a)?void $("body").removeClass("invalid-project"):(this.resetView(),this.writeMessage($.i18n("invalid-project",""+a+""),!0),$("body").addClass("invalid-project"),!0)}}]),b}(l);$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new m})},{"../shared/pv":5,"../shared/site_map":7,"./config":8}]},{},[1,2,3,4,5,6,7,9]); \ No newline at end of file diff --git a/public_html/topviews/topviews.js b/public_html/topviews/topviews.js index 34e452285..8cddd2629 100644 --- a/public_html/topviews/topviews.js +++ b/public_html/topviews/topviews.js @@ -1495,6 +1495,42 @@ var Pv = function (_PvConfig) { $('.site-notice').append('
        ' + markup + '
        '); } + + /** + * Check the validity of the date range of given params + * and throw errors as necessary and/or set defaults + * @param {Object} params - as returned by this.parseQueryString() + * @returns {Boolean} true if there were no errors, false otherwise + */ + + }, { + key: 'checkDateRange', + value: function checkDateRange(params) { + if (params.range) { + if (!this.setSpecialRange(params.range)) { + this.addSiteNotice('danger', $.i18n('param-error-3'), $.i18n('invalid-params'), true); + this.setSpecialRange(this.config.defaults.dateRange); + } + } else if (params.start) { + var startDate = moment(params.start || moment().subtract(this.config.defaults.daysAgo, 'days')), + endDate = moment(params.end || Date.now()); + + if (startDate < this.config.minDate || endDate < this.config.minDate) { + this.addSiteNotice('danger', $.i18n('param-error-1', moment(this.config.minDate).format(this.dateFormat)), $.i18n('invalid-params'), true); + return false; + } else if (startDate > endDate) { + this.addSiteNotice('warning', $.i18n('param-error-2'), $.i18n('invalid-params'), true); + return false; + } + /** directly assign startDate before calling setEndDate so events will be fired once */ + this.daterangepicker.startDate = startDate; + this.daterangepicker.setEndDate(endDate); + } else { + this.setSpecialRange(this.config.defaults.dateRange); + } + + return true; + } }, { key: 'clearSiteNotices', value: function clearSiteNotices() {