"}return r},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData("daterangepicker")}},i.fn.daterangepicker=function(t,e){return this.each(function(){var a=i(this);a.data("daterangepicker")&&a.data("daterangepicker").remove(),a.data("daterangepicker",new s(a,t,e))}),this}});
\ No newline at end of file
diff --git a/app/assets/javascripts/js/flot/curvedLines.js b/app/assets/javascripts/js/flot/curvedLines.js
deleted file mode 100755
index b242ea2..0000000
--- a/app/assets/javascripts/js/flot/curvedLines.js
+++ /dev/null
@@ -1,483 +0,0 @@
-/* The MIT License
-
- Copyright (c) 2011 by Michael Zinsmaier and nergal.dev
- Copyright (c) 2012 by Thomas Ritou
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-*/
-
-/*
-____________________________________________________
-
- what it is:
- ____________________________________________________
-
- curvedLines is a plugin for flot, that tries to display lines in a smoother way.
- This is achieved through adding of more data points. The plugin is a data processor and can thus be used
- in combination with standard line / point rendering options.
-
- => 1) with large data sets you may get trouble
- => 2) if you want to display the points too, you have to plot them as 2nd data series over the lines
- => 3) consecutive x data points are not allowed to have the same value
-
- Feel free to further improve the code
-
- ____________________________________________________
-
- how to use it:
- ____________________________________________________
-
- var d1 = [[5,5],[7,3],[9,12]];
-
- var options = { series: { curvedLines: { active: true }}};
-
- $.plot($("#placeholder"), [{data: d1, lines: { show: true}, curvedLines: {apply: true}}], options);
-
- _____________________________________________________
-
- options:
- _____________________________________________________
-
- active: bool true => plugin can be used
- apply: bool true => series will be drawn as curved line
- monotonicFit: bool true => uses monotone cubic interpolation (preserve monotonicity)
- tension: int defines the tension parameter of the hermite spline interpolation (no effect if monotonicFit is set)
- nrSplinePoints: int defines the number of sample points (of the spline) in between two consecutive points
-
- deprecated options from flot prior to 1.0.0:
- ------------------------------------------------
- legacyOverride bool true => use old default
- OR
- legacyOverride optionArray
- {
- fit: bool true => forces the max,mins of the curve to be on the datapoints
- curvePointFactor int defines how many "virtual" points are used per "real" data point to
- emulate the curvedLines (points total = real points * curvePointFactor)
- fitPointDist: int defines the x axis distance of the additional two points that are used
- } to enforce the min max condition.
- */
-
-/*
- * v0.1 initial commit
- * v0.15 negative values should work now (outcommented a negative -> 0 hook hope it does no harm)
- * v0.2 added fill option (thanks to monemihir) and multi axis support (thanks to soewono effendi)
- * v0.3 improved saddle handling and added basic handling of Dates
- * v0.4 rewritten fill option (thomas ritou) mostly from original flot code (now fill between points rather than to graph bottom), corrected fill Opacity bug
- * v0.5 rewritten instead of implementing a own draw function CurvedLines is now based on the processDatapoints flot hook (credits go to thomas ritou).
- * This change breakes existing code however CurvedLines are now just many tiny straight lines to flot and therefore all flot lines options (like gradient fill,
- * shadow) are now supported out of the box
- * v0.6 flot 0.8 compatibility and some bug fixes
- * v0.6.x changed versioning schema
- *
- * v1.0.0 API Break marked existing implementation/options as deprecated
- * v1.1.0 added the new curved line calculations based on hermite splines
- * v1.1.1 added a rough parameter check to make sure the new options are used
- */
-
-(function($) {
-
- var options = {
- series : {
- curvedLines : {
- active : false,
- apply : false,
- monotonicFit : false,
- tension : 0.5,
- nrSplinePoints : 20,
- legacyOverride : undefined
- }
- }
- };
-
- function init(plot) {
-
- plot.hooks.processOptions.push(processOptions);
-
- //if the plugin is active register processDatapoints method
- function processOptions(plot, options) {
- if (options.series.curvedLines.active) {
- plot.hooks.processDatapoints.unshift(processDatapoints);
- }
- }
-
- //only if the plugin is active
- function processDatapoints(plot, series, datapoints) {
- var nrPoints = datapoints.points.length / datapoints.pointsize;
- var EPSILON = 0.005;
-
- //detects missplaced legacy parameters (prior v1.x.x) in the options object
- //this can happen if somebody upgrades to v1.x.x without adjusting the parameters or uses old examples
- var invalidLegacyOptions = hasInvalidParameters(series.curvedLines);
-
- if (!invalidLegacyOptions && series.curvedLines.apply == true && series.originSeries === undefined && nrPoints > (1 + EPSILON)) {
- if (series.lines.fill) {
-
- var pointsTop = calculateCurvePoints(datapoints, series.curvedLines, 1);
- var pointsBottom = calculateCurvePoints(datapoints, series.curvedLines, 2);
- //flot makes sure for us that we've got a second y point if fill is true !
-
- //Merge top and bottom curve
- datapoints.pointsize = 3;
- datapoints.points = [];
- var j = 0;
- var k = 0;
- var i = 0;
- var ps = 2;
- while (i < pointsTop.length || j < pointsBottom.length) {
- if (pointsTop[i] == pointsBottom[j]) {
- datapoints.points[k] = pointsTop[i];
- datapoints.points[k + 1] = pointsTop[i + 1];
- datapoints.points[k + 2] = pointsBottom[j + 1];
- j += ps;
- i += ps;
-
- } else if (pointsTop[i] < pointsBottom[j]) {
- datapoints.points[k] = pointsTop[i];
- datapoints.points[k + 1] = pointsTop[i + 1];
- datapoints.points[k + 2] = k > 0 ? datapoints.points[k - 1] : null;
- i += ps;
- } else {
- datapoints.points[k] = pointsBottom[j];
- datapoints.points[k + 1] = k > 1 ? datapoints.points[k - 2] : null;
- datapoints.points[k + 2] = pointsBottom[j + 1];
- j += ps;
- }
- k += 3;
- }
- } else if (series.lines.lineWidth > 0) {
- datapoints.points = calculateCurvePoints(datapoints, series.curvedLines, 1);
- datapoints.pointsize = 2;
- }
- }
- }
-
- function calculateCurvePoints(datapoints, curvedLinesOptions, yPos) {
- if ( typeof curvedLinesOptions.legacyOverride != 'undefined' && curvedLinesOptions.legacyOverride != false) {
- var defaultOptions = {
- fit : false,
- curvePointFactor : 20,
- fitPointDist : undefined
- };
- var legacyOptions = jQuery.extend(defaultOptions, curvedLinesOptions.legacyOverride);
- return calculateLegacyCurvePoints(datapoints, legacyOptions, yPos);
- }
-
- return calculateSplineCurvePoints(datapoints, curvedLinesOptions, yPos);
- }
-
- function calculateSplineCurvePoints(datapoints, curvedLinesOptions, yPos) {
- var points = datapoints.points;
- var ps = datapoints.pointsize;
-
- //create interpolant fuction
- var splines = createHermiteSplines(datapoints, curvedLinesOptions, yPos);
- var result = [];
-
- //sample the function
- // (the result is intependent from the input data =>
- // it is ok to alter the input after this method)
- var j = 0;
- for (var i = 0; i < points.length - ps; i += ps) {
- var curX = i;
- var curY = i + yPos;
-
- var xStart = points[curX];
- var xEnd = points[curX + ps];
- var xStep = (xEnd - xStart) / Number(curvedLinesOptions.nrSplinePoints);
-
- //add point
- result.push(points[curX]);
- result.push(points[curY]);
-
- //add curve point
- for (var x = (xStart += xStep); x < xEnd; x += xStep) {
- result.push(x);
- result.push(splines[j](x));
- }
-
- j++;
- }
-
- //add last point
- result.push(points[points.length - ps]);
- result.push(points[points.length - ps + yPos]);
-
- return result;
- }
-
-
-
- // Creates an array of splines, one for each segment of the original curve. Algorithm based on the wikipedia articles:
- //
- // http://de.wikipedia.org/w/index.php?title=Kubisch_Hermitescher_Spline&oldid=130168003 and
- // http://en.wikipedia.org/w/index.php?title=Monotone_cubic_interpolation&oldid=622341725 and the description of Fritsch-Carlson from
- // http://math.stackexchange.com/questions/45218/implementation-of-monotone-cubic-interpolation
- // for a detailed description see https://github.com/MichaelZinsmaier/CurvedLines/docu
- function createHermiteSplines(datapoints, curvedLinesOptions, yPos) {
- var points = datapoints.points;
- var ps = datapoints.pointsize;
-
- // preparation get length (x_{k+1} - x_k) and slope s=(p_{k+1} - p_k) / (x_{k+1} - x_k) of the segments
- var segmentLengths = [];
- var segmentSlopes = [];
-
- for (var i = 0; i < points.length - ps; i += ps) {
- var curX = i;
- var curY = i + yPos;
- var dx = points[curX + ps] - points[curX];
- var dy = points[curY + ps] - points[curY];
-
- segmentLengths.push(dx);
- segmentSlopes.push(dy / dx);
- }
-
- //get the values for the desired gradients m_k for all points k
- //depending on the used method the formula is different
- var gradients = [segmentSlopes[0]];
- if (curvedLinesOptions.monotonicFit) {
- // Fritsch Carlson
- for (var i = 1; i < segmentLengths.length; i++) {
- var slope = segmentSlopes[i];
- var prev_slope = segmentSlopes[i - 1];
- if (slope * prev_slope <= 0) { // sign(prev_slope) != sign(slpe)
- gradients.push(0);
- } else {
- var length = segmentLengths[i];
- var prev_length = segmentLengths[i - 1];
- var common = length + prev_length;
- //m = 3 (prev_length + length) / ((2 length + prev_length) / prev_slope + (length + 2 prev_length) / slope)
- gradients.push(3 * common / ((common + length) / prev_slope + (common + prev_length) / slope));
- }
- }
- } else {
- // Cardinal spline with t € [0,1]
- // Catmull-Rom for t = 0
- for (var i = ps; i < points.length - ps; i += ps) {
- var curX = i;
- var curY = i + yPos;
- gradients.push(Number(curvedLinesOptions.tension) * (points[curY + ps] - points[curY - ps]) / (points[curX + ps] - points[curX - ps]));
- }
- }
- gradients.push(segmentSlopes[segmentSlopes.length - 1]);
-
- //get the two major coefficients (c'_{oef1} and c'_{oef2}) for each segment spline
- var coefs1 = [];
- var coefs2 = [];
- for (i = 0; i < segmentLengths.length; i++) {
- var m_k = gradients[i];
- var m_k_plus = gradients[i + 1];
- var slope = segmentSlopes[i];
- var invLength = 1 / segmentLengths[i];
- var common = m_k + m_k_plus - slope - slope;
-
- coefs1.push(common * invLength * invLength);
- coefs2.push((slope - common - m_k) * invLength);
- }
-
- //create functions with from the coefficients and capture the parameters
- var ret = [];
- for (var i = 0; i < segmentLengths.length; i ++) {
- var spline = function (x_k, coef1, coef2, coef3, coef4) {
- // spline for a segment
- return function (x) {
- var diff = x - x_k;
- var diffSq = diff * diff;
- return coef1 * diff * diffSq + coef2 * diffSq + coef3 * diff + coef4;
- };
- };
-
- ret.push(spline(points[i * ps], coefs1[i], coefs2[i], gradients[i], points[i * ps + yPos]));
- }
-
- return ret;
- };
-
- //no real idea whats going on here code mainly from https://code.google.com/p/flot/issues/detail?id=226
- //if fit option is selected additional datapoints get inserted before the curve calculations in nergal.dev s code.
- function calculateLegacyCurvePoints(datapoints, curvedLinesOptions, yPos) {
-
- var points = datapoints.points;
- var ps = datapoints.pointsize;
- var num = Number(curvedLinesOptions.curvePointFactor) * (points.length / ps);
-
- var xdata = new Array;
- var ydata = new Array;
-
- var curX = -1;
- var curY = -1;
- var j = 0;
-
- if (curvedLinesOptions.fit) {
- //insert a point before and after the "real" data point to force the line
- //to have a max,min at the data point.
-
- var fpDist;
- if ( typeof curvedLinesOptions.fitPointDist == 'undefined') {
- //estimate it
- var minX = points[0];
- var maxX = points[points.length - ps];
- fpDist = (maxX - minX) / (500 * 100);
- //x range / (estimated pixel length of placeholder * factor)
- } else {
- //use user defined value
- fpDist = Number(curvedLinesOptions.fitPointDist);
- }
-
- for (var i = 0; i < points.length; i += ps) {
-
- var frontX;
- var backX;
- curX = i;
- curY = i + yPos;
-
- //add point X s
- frontX = points[curX] - fpDist;
- backX = points[curX] + fpDist;
-
- var factor = 2;
- while (frontX == points[curX] || backX == points[curX]) {
- //inside the ulp
- frontX = points[curX] - (fpDist * factor);
- backX = points[curX] + (fpDist * factor);
- factor++;
- }
-
- //add curve points
- xdata[j] = frontX;
- ydata[j] = points[curY];
- j++;
-
- xdata[j] = points[curX];
- ydata[j] = points[curY];
- j++;
-
- xdata[j] = backX;
- ydata[j] = points[curY];
- j++;
- }
- } else {
- //just use the datapoints
- for (var i = 0; i < points.length; i += ps) {
- curX = i;
- curY = i + yPos;
-
- xdata[j] = points[curX];
- ydata[j] = points[curY];
- j++;
- }
- }
-
- var n = xdata.length;
-
- var y2 = new Array();
- var delta = new Array();
- y2[0] = 0;
- y2[n - 1] = 0;
- delta[0] = 0;
-
- for (var i = 1; i < n - 1; ++i) {
- var d = (xdata[i + 1] - xdata[i - 1]);
- if (d == 0) {
- //point before current point and after current point need some space in between
- return [];
- }
-
- var s = (xdata[i] - xdata[i - 1]) / d;
- var p = s * y2[i - 1] + 2;
- y2[i] = (s - 1) / p;
- delta[i] = (ydata[i + 1] - ydata[i]) / (xdata[i + 1] - xdata[i]) - (ydata[i] - ydata[i - 1]) / (xdata[i] - xdata[i - 1]);
- delta[i] = (6 * delta[i] / (xdata[i + 1] - xdata[i - 1]) - s * delta[i - 1]) / p;
- }
-
- for (var j = n - 2; j >= 0; --j) {
- y2[j] = y2[j] * y2[j + 1] + delta[j];
- }
-
- // xmax - xmin / #points
- var step = (xdata[n - 1] - xdata[0]) / (num - 1);
-
- var xnew = new Array;
- var ynew = new Array;
- var result = new Array;
-
- xnew[0] = xdata[0];
- ynew[0] = ydata[0];
-
- result.push(xnew[0]);
- result.push(ynew[0]);
-
- for ( j = 1; j < num; ++j) {
- //new x point (sampling point for the created curve)
- xnew[j] = xnew[0] + j * step;
-
- var max = n - 1;
- var min = 0;
-
- while (max - min > 1) {
- var k = Math.round((max + min) / 2);
- if (xdata[k] > xnew[j]) {
- max = k;
- } else {
- min = k;
- }
- }
-
- //found point one to the left and one to the right of generated new point
- var h = (xdata[max] - xdata[min]);
-
- if (h == 0) {
- //similar to above two points from original x data need some space between them
- return [];
- }
-
- var a = (xdata[max] - xnew[j]) / h;
- var b = (xnew[j] - xdata[min]) / h;
-
- ynew[j] = a * ydata[min] + b * ydata[max] + ((a * a * a - a) * y2[min] + (b * b * b - b) * y2[max]) * (h * h) / 6;
-
- result.push(xnew[j]);
- result.push(ynew[j]);
- }
-
- return result;
- }
-
- function hasInvalidParameters(curvedLinesOptions) {
- if (typeof curvedLinesOptions.fit != 'undefined' ||
- typeof curvedLinesOptions.curvePointFactor != 'undefined' ||
- typeof curvedLinesOptions.fitPointDist != 'undefined') {
- throw new Error("CurvedLines detected illegal parameters. The CurvedLines API changed with version 1.0.0 please check the options object.");
- return true;
- }
- return false;
- }
-
-
- }//end init
-
-
- $.plot.plugins.push({
- init : init,
- options : options,
- name : 'curvedLines',
- version : '1.1.1'
- });
-
-})(jQuery);
-
diff --git a/app/assets/javascripts/js/flot/date.js b/app/assets/javascripts/js/flot/date.js
deleted file mode 100755
index 77f4986..0000000
--- a/app/assets/javascripts/js/flot/date.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Version: 1.0 Alpha-1
- * Build Date: 13-Nov-2007
- * Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
- * License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
- * Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
- */
-Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
-Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;idate)?1:(this=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
-var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
-if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
-if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
-if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
-if(x.month||x.months){this.addMonths(x.month||x.months);}
-if(x.year||x.years){this.addYears(x.year||x.years);}
-if(x.day||x.days){this.addDays(x.day||x.days);}
-return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(valuemax){throw new RangeError(value+" is not a valid value for "+name+".");}
-return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
-if(!x.second&&x.second!==0){x.second=-1;}
-if(!x.minute&&x.minute!==0){x.minute=-1;}
-if(!x.hour&&x.hour!==0){x.hour=-1;}
-if(!x.day&&x.day!==0){x.day=-1;}
-if(!x.month&&x.month!==0){x.month=-1;}
-if(!x.year&&x.year!==0){x.year=-1;}
-if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
-if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
-if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
-if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
-if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
-if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
-if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
-if(x.timezone){this.setTimezone(x.timezone);}
-if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
-return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
-var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
-return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
-Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
-return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
-if(!last&&q[1].length===0){last=true;}
-if(!last){var qx=[];for(var j=0;j0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
-if(rx[1].length1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
-if(args){for(var i=0,px=args.shift();i2)?n:(n+(((n+2000)Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
-var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
-return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
-for(var i=0;i=1?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function t(t,i,e){return t>i?t:i>e?e:i}return a.r=t(0,parseInt(a.r),255),a.g=t(0,parseInt(a.g),255),a.b=t(0,parseInt(a.b),255),a.a=t(0,a.a,1),a},a.clone=function(){return t.color.make(a.r,a.b,a.g,a.a)},a.normalize()},t.color.extract=function(i,e){var o;do{if(o=i.css(e).toLowerCase(),""!=o&&"transparent"!=o)break;i=i.parent()}while(i.length&&!t.nodeName(i.get(0),"body"));return"rgba(0, 0, 0, 0)"==o&&(o="transparent"),t.color.parse(o)},t.color.parse=function(e){var o,n=t.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10));if(o=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4]));if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]));if(o=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]),parseFloat(o[4]));if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return n(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16));if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var a=t.trim(e).toLowerCase();return"transparent"==a?n(255,255,255,0):(o=i[a]||[0,0,0],n(o[0],o[1],o[2]))};var i={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(t){function i(i,e){var o=e.children("."+i)[0];if(null==o&&(o=document.createElement("canvas"),o.className=i,t(o).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(e),!o.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");o=window.G_vmlCanvasManager.initElement(o)}this.element=o;var n=this.context=o.getContext("2d"),a=window.devicePixelRatio||1,r=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;this.pixelRatio=a/r,this.resize(e.width(),e.height()),this.textContainer=null,this.text={},this._textCache={}}function e(e,n,a,r){function l(t,i){i=[xi].concat(i);for(var e=0;eo;++o)n=ni.xaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},ni.xaxis,n),ni.xaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=ni.yaxes.length||1,o=0;a>o;++o)n=ni.yaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},ni.yaxis,n),ni.yaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(ni.xaxis.noTicks&&null==ni.xaxis.ticks&&(ni.xaxis.ticks=ni.xaxis.noTicks),ni.yaxis.noTicks&&null==ni.yaxis.ticks&&(ni.yaxis.ticks=ni.yaxis.noTicks),ni.x2axis&&(ni.xaxes[1]=t.extend(!0,{},ni.xaxis,ni.x2axis),ni.xaxes[1].position="top",null==ni.x2axis.min&&(ni.xaxes[1].min=null),null==ni.x2axis.max&&(ni.xaxes[1].max=null)),ni.y2axis&&(ni.yaxes[1]=t.extend(!0,{},ni.yaxis,ni.y2axis),ni.yaxes[1].position="right",null==ni.y2axis.min&&(ni.yaxes[1].min=null),null==ni.y2axis.max&&(ni.yaxes[1].max=null)),ni.grid.coloredAreas&&(ni.grid.markings=ni.grid.coloredAreas),ni.grid.coloredAreasColor&&(ni.grid.markingsColor=ni.grid.coloredAreasColor),ni.lines&&t.extend(!0,ni.series.lines,ni.lines),ni.points&&t.extend(!0,ni.series.points,ni.points),ni.bars&&t.extend(!0,ni.series.bars,ni.bars),null!=ni.shadowSize&&(ni.series.shadowSize=ni.shadowSize),null!=ni.highlightColor&&(ni.series.highlightColor=ni.highlightColor),o=0;oo&&(o=n))}o>=e&&(e=o+1);var a,r=[],l=ni.colors,s=l.length,c=0;for(i=0;e>i;i++)a=t.color.parse(l[i%s]||"#666"),i%s==0&&i&&(c=c>=0?.5>c?-c-.2:0:-c),r[i]=a.scale("rgb",1+c);var h,f=0;for(i=0;it.datamax&&e!=b&&(t.datamax=e)}var e,o,n,a,r,s,c,h,f,u,p,m,x=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,b=Number.MAX_VALUE;for(t.each(d(),function(t,i){i.datamin=x,i.datamax=g,i.used=!1}),e=0;ea;++a)h=u[a],f=m[a],f&&(f.number&&null!=h&&(h=+h,isNaN(h)?h=null:1/0==h?h=b:h==-1/0&&(h=-b)),null==h&&(f.required&&(y=!0),null!=f.defaultValue&&(h=f.defaultValue))),s[n+a]=h;if(y)for(a=0;c>a;++a)h=s[n+a],null!=h&&(f=m[a],f.autoscale!==!1&&(f.x&&i(r.xaxis,h,h),f.y&&i(r.yaxis,h,h))),s[n+a]=null;else if(k&&n>0&&null!=s[n-c]&&s[n-c]!=s[n]&&s[n-c+1]!=s[n+1]){for(a=0;c>a;++a)s[n+c+a]=s[n+a];s[n+1]=s[n-c+1],n+=c}}}}for(e=0;ea;++a)h=s[o+a],f=m[a],f&&f.autoscale!==!1&&h!=b&&h!=-b&&(f.x&&(w>h&&(w=h),h>T&&(T=h)),f.y&&(M>h&&(M=h),h>C&&(C=h)));if(r.bars.show){var S;switch(r.bars.align){case"left":S=0;break;case"right":S=-r.bars.barWidth;break;default:S=-r.bars.barWidth/2}r.bars.horizontal?(M+=S,C+=S+r.bars.barWidth):(w+=S,T+=S+r.bars.barWidth)}i(r.xaxis,w,T),i(r.yaxis,M,C)}t.each(d(),function(t,i){i.datamin==x&&(i.datamin=null),i.datamax==g&&(i.datamax=null)})}function v(){e.css("padding",0).children().filter(function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")}).remove(),"static"==e.css("position")&&e.css("position","relative"),ai=new i("flot-base",e),ri=new i("flot-overlay",e),si=ai.context,ci=ri.context,li=t(ri.element).unbind();var o=e.data("plot");o&&(o.shutdown(),ri.clear()),e.data("plot",xi)}function k(){ni.grid.hoverable&&(li.mousemove(X),li.bind("mouseleave",Y)),ni.grid.clickable&&li.click(q),l(mi.bindEvents,[li])}function y(){bi&&clearTimeout(bi),li.unbind("mousemove",X),li.unbind("mouseleave",Y),li.unbind("click",q),l(mi.shutdown,[li])}function w(t){function i(t){return t}var e,o,n=t.options.transform||i,a=t.options.inverseTransform;"x"==t.direction?(e=t.scale=di/Math.abs(n(t.max)-n(t.min)),o=Math.min(n(t.max),n(t.min))):(e=t.scale=pi/Math.abs(n(t.max)-n(t.min)),e=-e,o=Math.max(n(t.max),n(t.min))),t.p2c=n==i?function(t){return(t-o)*e}:function(t){return(n(t)-o)*e},t.c2p=a?function(t){return a(o+t/e)}:function(t){return o+t/e}}function M(t){for(var i=t.options,e=t.ticks||[],o=i.labelWidth||0,n=i.labelHeight||0,a=o||("x"==t.direction?Math.floor(ai.width/(e.length||1)):null),r=t.direction+"Axis "+t.direction+t.n+"Axis",l="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=i.font||"flot-tick-label tickLabel",c=0;c=0;--i)T(r[i]);S(),t.each(r,function(t,i){C(i)})}di=ai.width-ui.left-ui.right,pi=ai.height-ui.bottom-ui.top,t.each(e,function(t,i){w(i)}),o&&O(),_()}function z(t){var i=t.options,e=+(null!=i.min?i.min:t.datamin),o=+(null!=i.max?i.max:t.datamax),n=o-e;if(0==n){var a=0==o?1:.01;null==i.min&&(e-=a),(null==i.max||null!=i.min)&&(o+=a)}else{var r=i.autoscaleMargin;null!=r&&(null==i.min&&(e-=n*r,0>e&&null!=t.datamin&&t.datamin>=0&&(e=0)),null==i.max&&(o+=n*r,o>0&&null!=t.datamax&&t.datamax<=0&&(o=0)))}t.min=e,t.max=o}function I(i){var e,n=i.options;e="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"==i.direction?ai.width:ai.height);var a=(i.max-i.min)/e,r=-Math.floor(Math.log(a)/Math.LN10),l=n.tickDecimals;null!=l&&r>l&&(r=l);var s,c=Math.pow(10,-r),h=a/c;if(1.5>h?s=1:3>h?(s=2,h>2.25&&(null==l||l>=r+1)&&(s=2.5,++r)):s=7.5>h?5:10,s*=c,null!=n.minTickSize&&s0&&(null==n.min&&(i.min=Math.min(i.min,u[0])),null==n.max&&u.length>1&&(i.max=Math.max(i.max,u[u.length-1]))),i.tickGenerator=function(t){var i,e,o=[];for(e=0;e1&&/\..*0$/.test((p[1]-p[0]).toFixed(d))||(i.tickDecimals=d)}}}}function A(i){var e=i.options.ticks,o=[];null==e||"number"==typeof e&&e>0?o=i.tickGenerator(i):e&&(o=t.isFunction(e)?e(i):e);var n,a;for(i.ticks=[],n=0;n1&&(r=l[1])):a=+l,null==r&&(r=i.tickFormatter(a,i)),isNaN(a)||i.ticks.push({v:a,label:r})}}function F(t,i){t.options.autoscaleMargin&&i.length>0&&(null==t.options.min&&(t.min=Math.min(t.min,i[0].v)),null==t.options.max&&i.length>1&&(t.max=Math.max(t.max,i[i.length-1].v)))}function P(){ai.clear(),l(mi.drawBackground,[si]);var t=ni.grid;t.show&&t.backgroundColor&&D(),t.show&&!t.aboveData&&L();for(var i=0;in){var s=o;o=n,n=s}return{from:o,to:n,axis:e}}function D(){si.save(),si.translate(ui.left,ui.top),si.fillStyle=ei(ni.grid.backgroundColor,pi,0,"rgba(255, 255, 255, 0)"),si.fillRect(0,0,di,pi),si.restore()}function L(){var i,e,o,n;si.save(),si.translate(ui.left,ui.top);var a=ni.grid.markings;if(a)for(t.isFunction(a)&&(e=xi.getAxes(),e.xmin=e.xaxis.min,e.xmax=e.xaxis.max,e.ymin=e.yaxis.min,e.ymax=e.yaxis.max,a=a(e)),i=0;il.axis.max||s.tos.axis.max)){l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),s.from=Math.max(s.from,s.axis.min),s.to=Math.min(s.to,s.axis.max);var c=l.from===l.to,h=s.from===s.to;if(!c||!h)if(l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),s.from=Math.floor(s.axis.p2c(s.from)),s.to=Math.floor(s.axis.p2c(s.to)),c||h){var f=r.lineWidth||ni.grid.markingsLineWidth,u=f%2?.5:0;si.beginPath(),si.strokeStyle=r.color||ni.grid.markingsColor,si.lineWidth=f,c?(si.moveTo(l.to+u,s.from),si.lineTo(l.to+u,s.to)):(si.moveTo(l.from,s.to+u),si.lineTo(l.to,s.to+u)),si.stroke()}else si.fillStyle=r.color||ni.grid.markingsColor,si.fillRect(l.from,s.to,l.to-l.from,s.from-s.to)}}e=d(),o=ni.grid.borderWidth;for(var p=0;pv.max||"full"==y&&("object"==typeof o&&o[v.position]>0||o>0)&&(w==v.min||w==v.max)||("x"==v.direction?(m=v.p2c(w),b="full"==y?-pi:y,"top"==v.position&&(b=-b)):(x=v.p2c(w),g="full"==y?-di:y,"left"==v.position&&(g=-g)),1==si.lineWidth&&("x"==v.direction?m=Math.floor(m)+.5:x=Math.floor(x)+.5),si.moveTo(m,x),si.lineTo(m+g,x+b))}si.stroke()}}o&&(n=ni.grid.borderColor,"object"==typeof o||"object"==typeof n?("object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),"object"!=typeof n&&(n={top:n,right:n,bottom:n,left:n}),o.top>0&&(si.strokeStyle=n.top,si.lineWidth=o.top,si.beginPath(),si.moveTo(0-o.left,0-o.top/2),si.lineTo(di,0-o.top/2),si.stroke()),o.right>0&&(si.strokeStyle=n.right,si.lineWidth=o.right,si.beginPath(),si.moveTo(di+o.right/2,0-o.top),si.lineTo(di+o.right/2,pi),si.stroke()),o.bottom>0&&(si.strokeStyle=n.bottom,si.lineWidth=o.bottom,si.beginPath(),si.moveTo(di+o.right,pi+o.bottom/2),si.lineTo(0,pi+o.bottom/2),si.stroke()),o.left>0&&(si.strokeStyle=n.left,si.lineWidth=o.left,si.beginPath(),si.moveTo(0-o.left/2,pi+o.bottom),si.lineTo(0-o.left/2,0),si.stroke())):(si.lineWidth=o,si.strokeStyle=ni.grid.borderColor,si.strokeRect(-o/2,-o/2,di+o,pi+o))),si.restore()}function O(){t.each(d(),function(t,i){var e,o,n,a,r,l=i.box,s=i.direction+"Axis "+i.direction+i.n+"Axis",c="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+s,h=i.options.font||"flot-tick-label tickLabel";if(ai.removeText(c),i.show&&0!=i.ticks.length)for(var f=0;fi.max||("x"==i.direction?(a="center",o=ui.left+i.p2c(e.v),"bottom"==i.position?n=l.top+l.padding:(n=l.top+l.height-l.padding,r="bottom")):(r="middle",n=ui.top+i.p2c(e.v),"left"==i.position?(o=l.left+l.width-l.padding,a="right"):o=l.left+l.padding),ai.addText(c,o,n,e.label,h,null,null,a,r))})}function R(t){t.lines.show&&H(t),t.bars.show&&B(t),t.points.show&&j(t)}function H(t){function i(t,i,e,o,n){var a=t.points,r=t.pointsize,l=null,s=null;si.beginPath();for(var c=r;c=f&&f=d&&d=d&&f>n.max){if(d>n.max)continue;h=(n.max-f)/(d-f)*(u-h)+h,f=n.max}else if(d>=f&&d>n.max){if(f>n.max)continue;u=(n.max-f)/(d-f)*(u-h)+h,d=n.max}if(u>=h&&h=u&&u=u&&h>o.max){if(u>o.max)continue;f=(o.max-h)/(u-h)*(d-f)+f,h=o.max}else if(u>=h&&u>o.max){if(h>o.max)continue;d=(o.max-h)/(u-h)*(d-f)+f,u=o.max}(h!=l||f!=s)&&si.moveTo(o.p2c(h)+i,n.p2c(f)+e),l=u,s=d,si.lineTo(o.p2c(u)+i,n.p2c(d)+e)}}si.stroke()}function e(t,i,e){for(var o=t.points,n=t.pointsize,a=Math.min(Math.max(0,e.min),e.max),r=0,l=!1,s=1,c=0,h=0;;){if(n>0&&r>o.length+n)break;r+=n;var f=o[r-n],u=o[r-n+s],d=o[r],p=o[r+s];if(l){if(n>0&&null!=f&&null==d){h=r,n=-n,s=2;continue}if(0>n&&r==c+n){si.fill(),l=!1,n=-n,s=1,r=c=h+n;continue}}if(null!=f&&null!=d){if(d>=f&&f=d&&d=d&&f>i.max){if(d>i.max)continue;u=(i.max-f)/(d-f)*(p-u)+u,f=i.max}else if(d>=f&&d>i.max){if(f>i.max)continue;p=(i.max-f)/(d-f)*(p-u)+u,d=i.max}if(l||(si.beginPath(),si.moveTo(i.p2c(f),e.p2c(a)),l=!0),u>=e.max&&p>=e.max)si.lineTo(i.p2c(f),e.p2c(e.max)),si.lineTo(i.p2c(d),e.p2c(e.max));else if(u<=e.min&&p<=e.min)si.lineTo(i.p2c(f),e.p2c(e.min)),si.lineTo(i.p2c(d),e.p2c(e.min));else{var m=f,x=d;p>=u&&u=e.min?(f=(e.min-u)/(p-u)*(d-f)+f,u=e.min):u>=p&&p=e.min&&(d=(e.min-u)/(p-u)*(d-f)+f,p=e.min),u>=p&&u>e.max&&p<=e.max?(f=(e.max-u)/(p-u)*(d-f)+f,u=e.max):p>=u&&p>e.max&&u<=e.max&&(d=(e.max-u)/(p-u)*(d-f)+f,p=e.max),f!=m&&si.lineTo(i.p2c(m),e.p2c(u)),si.lineTo(i.p2c(f),e.p2c(u)),si.lineTo(i.p2c(d),e.p2c(p)),d!=x&&(si.lineTo(i.p2c(d),e.p2c(p)),si.lineTo(i.p2c(x),e.p2c(p)))}}}}si.save(),si.translate(ui.left,ui.top),si.lineJoin="round";var o=t.lines.lineWidth,n=t.shadowSize;if(o>0&&n>0){si.lineWidth=n,si.strokeStyle="rgba(0,0,0,0.1)";var a=Math.PI/18;i(t.datapoints,Math.sin(a)*(o/2+n/2),Math.cos(a)*(o/2+n/2),t.xaxis,t.yaxis),si.lineWidth=n/2,i(t.datapoints,Math.sin(a)*(o/2+n/4),Math.cos(a)*(o/2+n/4),t.xaxis,t.yaxis)}si.lineWidth=o,si.strokeStyle=t.color;var r=G(t.lines,t.color,0,pi);r&&(si.fillStyle=r,e(t.datapoints,t.xaxis,t.yaxis)),o>0&&i(t.datapoints,0,0,t.xaxis,t.yaxis),si.restore()}function j(t){function i(t,i,e,o,n,a,r,l){for(var s=t.points,c=t.pointsize,h=0;ha.max||ur.max||(si.beginPath(),f=a.p2c(f),u=r.p2c(u)+o,"circle"==l?si.arc(f,u,i,0,n?Math.PI:2*Math.PI,!1):l(si,f,u,i,n),si.closePath(),e&&(si.fillStyle=e,si.fill()),si.stroke())}}si.save(),si.translate(ui.left,ui.top);var e=t.points.lineWidth,o=t.shadowSize,n=t.points.radius,a=t.points.symbol;if(0==e&&(e=1e-4),e>0&&o>0){var r=o/2;si.lineWidth=r,si.strokeStyle="rgba(0,0,0,0.1)",i(t.datapoints,n,null,r+r/2,!0,t.xaxis,t.yaxis,a),si.strokeStyle="rgba(0,0,0,0.2)",i(t.datapoints,n,null,r/2,!0,t.xaxis,t.yaxis,a)}si.lineWidth=e,si.strokeStyle=t.color,i(t.datapoints,n,G(t.points,t.color),0,!1,t.xaxis,t.yaxis,a),si.restore()}function E(t,i,e,o,n,a,r,l,s,c,h){var f,u,d,p,m,x,g,b,v;c?(b=x=g=!0,m=!1,f=e,u=t,p=i+o,d=i+n,f>u&&(v=u,u=f,f=v,m=!0,x=!1)):(m=x=g=!0,b=!1,f=t+o,u=t+n,d=e,p=i,d>p&&(v=p,p=d,d=v,b=!0,g=!1)),ur.max||pl.max||(fr.max&&(u=r.max,x=!1),dl.max&&(p=l.max,g=!1),f=r.p2c(f),d=l.p2c(d),u=r.p2c(u),p=l.p2c(p),a&&(s.fillStyle=a(d,p),s.fillRect(f,p,u-f,d-p)),h>0&&(m||x||g||b)&&(s.beginPath(),s.moveTo(f,d),m?s.lineTo(f,p):s.moveTo(f,p),g?s.lineTo(u,p):s.moveTo(u,p),x?s.lineTo(u,d):s.moveTo(u,d),b?s.lineTo(f,d):s.moveTo(f,d),s.stroke()))}function B(t){function i(i,e,o,n,a,r){for(var l=i.points,s=i.pointsize,c=0;c"),n.push("
').prependTo(m).css("opacity",ni.legend.backgroundOpacity)}}}}}function V(t,i,e){var o,n,a,r=ni.grid.mouseActiveRadius,l=r*r+1,s=null;for(o=oi.length-1;o>=0;--o)if(e(oi[o])){var c=oi[o],h=c.xaxis,f=c.yaxis,u=c.datapoints.points,d=h.c2p(t),p=f.c2p(i),m=r/h.scale,x=r/f.scale;if(a=c.datapoints.pointsize,h.options.inverseTransform&&(m=Number.MAX_VALUE),f.options.inverseTransform&&(x=Number.MAX_VALUE),c.lines.show||c.points.show)for(n=0;nm||-m>g-d||b-p>x||-x>b-p)){var v=Math.abs(h.p2c(g)-t),k=Math.abs(f.p2c(b)-i),y=v*v+k*k;l>y&&(l=y,s=[o,n/a])}}if(c.bars.show&&!s){var w,M;switch(c.bars.align){case"left":w=0;break;case"right":w=-c.bars.barWidth;break;default:w=-c.bars.barWidth/2}for(M=w+c.bars.barWidth,n=0;n=Math.min(T,g)&&p>=b+w&&b+M>=p:d>=g+w&&g+M>=d&&p>=Math.min(T,b)&&p<=Math.max(T,b))&&(s=[o,n/a])}}}return s?(o=s[0],n=s[1],a=oi[o].datapoints.pointsize,{datapoint:oi[o].datapoints.points.slice(n*a,(n+1)*a),dataIndex:n,series:oi[o],seriesIndex:o}):null}function X(t){ni.grid.hoverable&&Q("plothover",t,function(t){return 0!=t.hoverable})}function Y(t){ni.grid.hoverable&&Q("plothover",t,function(){return!1})}function q(t){Q("plotclick",t,function(t){return 0!=t.clickable})}function Q(t,i,o){var n=li.offset(),a=i.pageX-n.left-ui.left,r=i.pageY-n.top-ui.top,l=p({left:a,top:r});l.pageX=i.pageX,l.pageY=i.pageY;var s=V(a,r,o);if(s&&(s.pageX=parseInt(s.series.xaxis.p2c(s.datapoint[0])+n.left+ui.left,10),s.pageY=parseInt(s.series.yaxis.p2c(s.datapoint[1])+n.top+ui.top,10)),ni.grid.autoHighlight){for(var c=0;ca.max||nr.max)){var s=i.points.radius+i.points.lineWidth/2;ci.lineWidth=s,ci.strokeStyle=l;var c=1.5*s;o=a.p2c(o),n=r.p2c(n),ci.beginPath(),"circle"==i.points.symbol?ci.arc(o,n,c,0,2*Math.PI,!1):i.points.symbol(ci,o,n,c,!1),ci.closePath(),ci.stroke()}}function ii(i,e){var o,n="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString(),a=n;switch(i.bars.align){case"left":o=0;break;case"right":o=-i.bars.barWidth;break;default:o=-i.bars.barWidth/2}ci.lineWidth=i.bars.lineWidth,ci.strokeStyle=n,E(e[0],e[1],e[2]||0,o,o+i.bars.barWidth,function(){return a},i.xaxis,i.yaxis,ci,i.bars.horizontal,i.bars.lineWidth)}function ei(i,e,o,n){if("string"==typeof i)return i;for(var a=si.createLinearGradient(0,o,0,e),r=0,l=i.colors.length;l>r;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(n);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}var oi=[],ni={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},ai=null,ri=null,li=null,si=null,ci=null,hi=[],fi=[],ui={left:0,right:0,top:0,bottom:0},di=0,pi=0,mi={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},xi=this;
-xi.setData=h,xi.setupGrid=W,xi.draw=P,xi.getPlaceholder=function(){return e},xi.getCanvas=function(){return ai.element},xi.getPlotOffset=function(){return ui},xi.width=function(){return di},xi.height=function(){return pi},xi.offset=function(){var t=li.offset();return t.left+=ui.left,t.top+=ui.top,t},xi.getData=function(){return oi},xi.getAxes=function(){var i={};return t.each(hi.concat(fi),function(t,e){e&&(i[e.direction+(1!=e.n?e.n:"")+"axis"]=e)}),i},xi.getXAxes=function(){return hi},xi.getYAxes=function(){return fi},xi.c2p=p,xi.p2c=m,xi.getOptions=function(){return ni},xi.highlight=$,xi.unhighlight=K,xi.triggerRedrawOverlay=U,xi.pointOffset=function(t){return{left:parseInt(hi[u(t,"x")-1].p2c(+t.x)+ui.left,10),top:parseInt(fi[u(t,"y")-1].p2c(+t.y)+ui.top,10)}},xi.shutdown=y,xi.destroy=function(){y(),e.removeData("plot").empty(),oi=[],ni=null,ai=null,ri=null,li=null,si=null,ci=null,hi=[],fi=[],mi=null,gi=[],xi=null},xi.resize=function(){var t=e.width(),i=e.height();ai.resize(t,i),ri.resize(t,i)},xi.hooks=mi,s(xi),c(a),v(),h(n),W(),P(),k();var gi=[],bi=null}function o(t,i){return i*Math.floor(t/i)}var n=Object.prototype.hasOwnProperty;t.fn.detach||(t.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),i.prototype.resize=function(t,i){if(0>=t||0>=i)throw new Error("Invalid dimensions for plot, width = "+t+", height = "+i);var e=this.element,o=this.context,n=this.pixelRatio;this.width!=t&&(e.width=t*n,e.style.width=t+"px",this.width=t),this.height!=i&&(e.height=i*n,e.style.height=i+"px",this.height=i),o.restore(),o.save(),o.scale(n,n)},i.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},i.prototype.render=function(){var t=this._textCache;for(var i in t)if(n.call(t,i)){var e=this.getTextLayer(i),o=t[i];e.hide();for(var a in o)if(n.call(o,a)){var r=o[a];for(var l in r)if(n.call(r,l)){for(var s,c=r[l].positions,h=0;s=c[h];h++)s.active?s.rendered||(e.append(s.element),s.rendered=!0):(c.splice(h--,1),s.rendered&&s.element.detach());0==c.length&&delete r[l]}}e.show()}},i.prototype.getTextLayer=function(i){var e=this.text[i];return null==e&&(null==this.textContainer&&(this.textContainer=t("").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),e=this.text[i]=t("").addClass(i).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),e},i.prototype.getTextInfo=function(i,e,o,n,a){var r,l,s,c;if(e=""+e,r="object"==typeof o?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,l=this._textCache[i],null==l&&(l=this._textCache[i]={}),s=l[r],null==s&&(s=l[r]={}),c=s[e],null==c){var h=t("").html(e).css({position:"absolute","max-width":a,top:-9999}).appendTo(this.getTextLayer(i));"object"==typeof o?h.css({font:r,color:o.color}):"string"==typeof o&&h.addClass(o),c=s[e]={width:h.outerWidth(!0),height:h.outerHeight(!0),element:h,positions:[]},h.detach()}return c},i.prototype.addText=function(t,i,e,o,n,a,r,l,s){var c=this.getTextInfo(t,o,n,a,r),h=c.positions;"center"==l?i-=c.width/2:"right"==l&&(i-=c.width),"middle"==s?e-=c.height/2:"bottom"==s&&(e-=c.height);for(var f,u=0;f=h[u];u++)if(f.x==i&&f.y==e)return void(f.active=!0);f={active:!0,rendered:!1,element:h.length?c.element.clone():c.element,x:i,y:e},h.push(f),f.element.css({top:Math.round(e),left:Math.round(i),"text-align":l})},i.prototype.removeText=function(t,i,e,o,a,r){if(null==o){var l=this._textCache[t];if(null!=l)for(var s in l)if(n.call(l,s)){var c=l[s];for(var h in c)if(n.call(c,h))for(var f,u=c[h].positions,d=0;f=u[d];d++)f.active=!1}}else for(var f,u=this.getTextInfo(t,o,a,r).positions,d=0;f=u[d];d++)f.x==i&&f.y==e&&(f.active=!1)},t.plot=function(i,o,n){var a=new e(t(i),o,n,t.plot.plugins);return a},t.plot.version="0.8.3",t.plot.plugins=[],t.fn.plot=function(i,e){return this.each(function(){t.plot(this,i,e)})}}(jQuery);
\ No newline at end of file
diff --git a/app/assets/javascripts/js/flot/jquery.flot.orderBars.js b/app/assets/javascripts/js/flot/jquery.flot.orderBars.js
deleted file mode 100755
index 5aee07a..0000000
--- a/app/assets/javascripts/js/flot/jquery.flot.orderBars.js
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Flot plugin to order bars side by side.
- *
- * Released under the MIT license by Benjamin BUFFET, 20-Sep-2010.
- * Modifications made by Steven Hall , 01-May-2013.
- *
- * This plugin is an alpha version.
- *
- * To activate the plugin you must specify the parameter "order" for the specific serie :
- *
- * $.plot($("#placeholder"), [{ data: [ ... ], bars :{ order = null or integer }])
- *
- * If 2 series have the same order param, they are ordered by the position in the array;
- *
- * The plugin adjust the point by adding a value depanding of the barwidth
- * Exemple for 3 series (barwidth : 0.1) :
- *
- * first bar décalage : -0.15
- * second bar décalage : -0.05
- * third bar décalage : 0.05
- *
- */
-
-// INFO: decalage/decallage is French for gap. It's used to denote the spacing applied to each
-// bar.
-(function($){
- function init(plot){
- var orderedBarSeries;
- var nbOfBarsToOrder;
- var borderWidth;
- var borderWidthInXabsWidth;
- var pixelInXWidthEquivalent = 1;
- var isHorizontal = false;
-
- // A mapping of order integers to decallage.
- var decallageByOrder = {};
-
- /*
- * This method add shift to x values
- */
- function reOrderBars(plot, serie, datapoints){
- var shiftedPoints = null;
-
- if(serieNeedToBeReordered(serie)){
- checkIfGraphIsHorizontal(serie);
- calculPixel2XWidthConvert(plot);
- retrieveBarSeries(plot);
- calculBorderAndBarWidth(serie);
-
- if(nbOfBarsToOrder >= 2){
- var position = findPosition(serie);
- var decallage = 0;
-
- var centerBarShift = calculCenterBarShift();
-
- // If we haven't already calculated the decallage for this order value, do it.
- if(typeof decallageByOrder[serie.bars.order] === 'undefined') {
- if (isBarAtLeftOfCenter(position)){
- decallageByOrder[serie.bars.order] = -1*(sumWidth(orderedBarSeries,position-1,Math.floor(nbOfBarsToOrder / 2)-1)) - centerBarShift;
- }else{
- decallageByOrder[serie.bars.order] = sumWidth(orderedBarSeries,Math.ceil(nbOfBarsToOrder / 2),position-2) + centerBarShift + borderWidthInXabsWidth*2;
- }
- }
-
- // Lookup the decallage based on the series' order value.
- decallage = decallageByOrder[serie.bars.order];
-
- shiftedPoints = shiftPoints(datapoints,serie,decallage);
- datapoints.points = shiftedPoints;
- }
- }
- return shiftedPoints;
- }
-
- function serieNeedToBeReordered(serie){
- return serie.bars != null
- && serie.bars.show
- && serie.bars.order != null;
- }
-
- function calculPixel2XWidthConvert(plot){
- var gridDimSize = isHorizontal ? plot.getPlaceholder().innerHeight() : plot.getPlaceholder().innerWidth();
- var minMaxValues = isHorizontal ? getAxeMinMaxValues(plot.getData(),1) : getAxeMinMaxValues(plot.getData(),0);
- var AxeSize = minMaxValues[1] - minMaxValues[0];
- pixelInXWidthEquivalent = AxeSize / gridDimSize;
- }
-
- function getAxeMinMaxValues(series,AxeIdx){
- var minMaxValues = new Array();
- for(var i = 0; i < series.length; i++){
- minMaxValues[0] = (series[i].data[0]) ? series[i].data[0][AxeIdx]: null;
- minMaxValues[1] = (series[i].data[series[i].data.length - 1]) ? series[i].data[series[i].data.length - 1][AxeIdx]: null;
- }
- return minMaxValues;
- }
-
- function retrieveBarSeries(plot){
- orderedBarSeries = findOthersBarsToReOrders(plot.getData());
- nbOfBarsToOrder = orderedBarSeries.length;
- }
-
- function findOthersBarsToReOrders(series){
- var retSeries = new Array();
- var orderValuesSeen = [];
-
- for(var i = 0; i < series.length; i++){
- if(series[i].bars.order != null && series[i].bars.show &&
- orderValuesSeen.indexOf(series[i].bars.order) < 0){
-
- orderValuesSeen.push(series[i].bars.order);
- retSeries.push(series[i]);
- }
- }
- return retSeries.sort(sortByOrder);
- }
-
- function sortByOrder(serie1,serie2){
- var x = serie1.bars.order;
- var y = serie2.bars.order;
- return ((x < y) ? -1 : ((x > y) ? 1 : 0));
- }
-
- function calculBorderAndBarWidth(serie){
- borderWidth = typeof serie.bars.lineWidth !== 'undefined' ? serie.bars.lineWidth : 2;
- borderWidthInXabsWidth = borderWidth * pixelInXWidthEquivalent;
- }
-
- function checkIfGraphIsHorizontal(serie){
- if(serie.bars.horizontal){
- isHorizontal = true;
- }
- }
-
- function findPosition(serie){
- var pos = 0
- for (var i = 0; i < orderedBarSeries.length; ++i) {
- if (serie == orderedBarSeries[i]){
- pos = i;
- break;
- }
- }
-
- return pos+1;
- }
-
- function calculCenterBarShift(){
- var width = 0;
-
- if(nbOfBarsToOrder%2 != 0)
- width = (orderedBarSeries[Math.ceil(nbOfBarsToOrder / 2)].bars.barWidth)/2;
-
- return width;
- }
-
- function isBarAtLeftOfCenter(position){
- return position <= Math.ceil(nbOfBarsToOrder / 2);
- }
-
- function sumWidth(series,start,end){
- var totalWidth = 0;
-
- for(var i = start; i <= end; i++){
- totalWidth += series[i].bars.barWidth+borderWidthInXabsWidth*2;
- }
-
- return totalWidth;
- }
-
- function shiftPoints(datapoints,serie,dx){
- var ps = datapoints.pointsize;
- var points = datapoints.points;
- var j = 0;
- for(var i = isHorizontal ? 1 : 0;i < points.length; i += ps){
- points[i] += dx;
- //Adding the new x value in the serie to be abble to display the right tooltip value,
- //using the index 3 to not overide the third index.
- serie.data[j][3] = points[i];
- j++;
- }
-
- return points;
- }
-
- plot.hooks.processDatapoints.push(reOrderBars);
-
- }
-
- var options = {
- series : {
- bars: {order: null} // or number/string
- }
- };
-
- $.plot.plugins.push({
- init: init,
- options: options,
- name: "orderBars",
- version: "0.2"
- });
-
-})(jQuery);
\ No newline at end of file
diff --git a/app/assets/javascripts/js/flot/jquery.flot.pie.js b/app/assets/javascripts/js/flot/jquery.flot.pie.js
deleted file mode 100755
index 5a34c5c..0000000
--- a/app/assets/javascripts/js/flot/jquery.flot.pie.js
+++ /dev/null
@@ -1,820 +0,0 @@
-/* Flot plugin for rendering pie charts.
-
-Copyright (c) 2007-2014 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The plugin assumes that each series has a single data value, and that each
-value is a positive integer or zero. Negative numbers don't make sense for a
-pie chart, and have unpredictable results. The values do NOT need to be
-passed in as percentages; the plugin will calculate the total and per-slice
-percentages internally.
-
-* Created by Brian Medendorp
-
-* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
-
-The plugin supports these options:
-
- series: {
- pie: {
- show: true/false
- radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
- innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
- startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
- tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
- offset: {
- top: integer value to move the pie up or down
- left: integer value to move the pie left or right, or 'auto'
- },
- stroke: {
- color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
- width: integer pixel width of the stroke
- },
- label: {
- show: true/false, or 'auto'
- formatter: a user-defined function that modifies the text/style of the label text
- radius: 0-1 for percentage of fullsize, or a specified pixel length
- background: {
- color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
- opacity: 0-1
- },
- threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
- },
- combine: {
- threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
- color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
- label: any text value of what the combined slice should be labeled
- }
- highlight: {
- opacity: 0-1
- }
- }
- }
-
-More detail and specific examples can be found in the included HTML file.
-
-*/
-
-(function($) {
-
- // Maximum redraw attempts when fitting labels within the plot
-
- var REDRAW_ATTEMPTS = 10;
-
- // Factor by which to shrink the pie when fitting labels within the plot
-
- var REDRAW_SHRINK = 0.95;
-
- function init(plot) {
-
- var canvas = null,
- target = null,
- options = null,
- maxRadius = null,
- centerLeft = null,
- centerTop = null,
- processed = false,
- ctx = null;
-
- // interactive variables
-
- var highlights = [];
-
- // add hook to determine if pie plugin in enabled, and then perform necessary operations
-
- plot.hooks.processOptions.push(function(plot, options) {
- if (options.series.pie.show) {
-
- options.grid.show = false;
-
- // set labels.show
-
- if (options.series.pie.label.show == "auto") {
- if (options.legend.show) {
- options.series.pie.label.show = false;
- } else {
- options.series.pie.label.show = true;
- }
- }
-
- // set radius
-
- if (options.series.pie.radius == "auto") {
- if (options.series.pie.label.show) {
- options.series.pie.radius = 3/4;
- } else {
- options.series.pie.radius = 1;
- }
- }
-
- // ensure sane tilt
-
- if (options.series.pie.tilt > 1) {
- options.series.pie.tilt = 1;
- } else if (options.series.pie.tilt < 0) {
- options.series.pie.tilt = 0;
- }
- }
- });
-
- plot.hooks.bindEvents.push(function(plot, eventHolder) {
- var options = plot.getOptions();
- if (options.series.pie.show) {
- if (options.grid.hoverable) {
- eventHolder.unbind("mousemove").mousemove(onMouseMove);
- }
- if (options.grid.clickable) {
- eventHolder.unbind("click").click(onClick);
- }
- }
- });
-
- plot.hooks.processDatapoints.push(function(plot, series, data, datapoints) {
- var options = plot.getOptions();
- if (options.series.pie.show) {
- processDatapoints(plot, series, data, datapoints);
- }
- });
-
- plot.hooks.drawOverlay.push(function(plot, octx) {
- var options = plot.getOptions();
- if (options.series.pie.show) {
- drawOverlay(plot, octx);
- }
- });
-
- plot.hooks.draw.push(function(plot, newCtx) {
- var options = plot.getOptions();
- if (options.series.pie.show) {
- draw(plot, newCtx);
- }
- });
-
- function processDatapoints(plot, series, datapoints) {
- if (!processed) {
- processed = true;
- canvas = plot.getCanvas();
- target = $(canvas).parent();
- options = plot.getOptions();
- plot.setData(combine(plot.getData()));
- }
- }
-
- function combine(data) {
-
- var total = 0,
- combined = 0,
- numCombined = 0,
- color = options.series.pie.combine.color,
- newdata = [];
-
- // Fix up the raw data from Flot, ensuring the data is numeric
-
- for (var i = 0; i < data.length; ++i) {
-
- var value = data[i].data;
-
- // If the data is an array, we'll assume that it's a standard
- // Flot x-y pair, and are concerned only with the second value.
-
- // Note how we use the original array, rather than creating a
- // new one; this is more efficient and preserves any extra data
- // that the user may have stored in higher indexes.
-
- if ($.isArray(value) && value.length == 1) {
- value = value[0];
- }
-
- if ($.isArray(value)) {
- // Equivalent to $.isNumeric() but compatible with jQuery < 1.7
- if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) {
- value[1] = +value[1];
- } else {
- value[1] = 0;
- }
- } else if (!isNaN(parseFloat(value)) && isFinite(value)) {
- value = [1, +value];
- } else {
- value = [1, 0];
- }
-
- data[i].data = [value];
- }
-
- // Sum up all the slices, so we can calculate percentages for each
-
- for (var i = 0; i < data.length; ++i) {
- total += data[i].data[0][1];
- }
-
- // Count the number of slices with percentages below the combine
- // threshold; if it turns out to be just one, we won't combine.
-
- for (var i = 0; i < data.length; ++i) {
- var value = data[i].data[0][1];
- if (value / total <= options.series.pie.combine.threshold) {
- combined += value;
- numCombined++;
- if (!color) {
- color = data[i].color;
- }
- }
- }
-
- for (var i = 0; i < data.length; ++i) {
- var value = data[i].data[0][1];
- if (numCombined < 2 || value / total > options.series.pie.combine.threshold) {
- newdata.push(
- $.extend(data[i], { /* extend to allow keeping all other original data values
- and using them e.g. in labelFormatter. */
- data: [[1, value]],
- color: data[i].color,
- label: data[i].label,
- angle: value * Math.PI * 2 / total,
- percent: value / (total / 100)
- })
- );
- }
- }
-
- if (numCombined > 1) {
- newdata.push({
- data: [[1, combined]],
- color: color,
- label: options.series.pie.combine.label,
- angle: combined * Math.PI * 2 / total,
- percent: combined / (total / 100)
- });
- }
-
- return newdata;
- }
-
- function draw(plot, newCtx) {
-
- if (!target) {
- return; // if no series were passed
- }
-
- var canvasWidth = plot.getPlaceholder().width(),
- canvasHeight = plot.getPlaceholder().height(),
- legendWidth = target.children().filter(".legend").children().width() || 0;
-
- ctx = newCtx;
-
- // WARNING: HACK! REWRITE THIS CODE AS SOON AS POSSIBLE!
-
- // When combining smaller slices into an 'other' slice, we need to
- // add a new series. Since Flot gives plugins no way to modify the
- // list of series, the pie plugin uses a hack where the first call
- // to processDatapoints results in a call to setData with the new
- // list of series, then subsequent processDatapoints do nothing.
-
- // The plugin-global 'processed' flag is used to control this hack;
- // it starts out false, and is set to true after the first call to
- // processDatapoints.
-
- // Unfortunately this turns future setData calls into no-ops; they
- // call processDatapoints, the flag is true, and nothing happens.
-
- // To fix this we'll set the flag back to false here in draw, when
- // all series have been processed, so the next sequence of calls to
- // processDatapoints once again starts out with a slice-combine.
- // This is really a hack; in 0.9 we need to give plugins a proper
- // way to modify series before any processing begins.
-
- processed = false;
-
- // calculate maximum radius and center point
-
- maxRadius = Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2;
- centerTop = canvasHeight / 2 + options.series.pie.offset.top;
- centerLeft = canvasWidth / 2;
-
- if (options.series.pie.offset.left == "auto") {
- if (options.legend.position.match("w")) {
- centerLeft += legendWidth / 2;
- } else {
- centerLeft -= legendWidth / 2;
- }
- if (centerLeft < maxRadius) {
- centerLeft = maxRadius;
- } else if (centerLeft > canvasWidth - maxRadius) {
- centerLeft = canvasWidth - maxRadius;
- }
- } else {
- centerLeft += options.series.pie.offset.left;
- }
-
- var slices = plot.getData(),
- attempts = 0;
-
- // Keep shrinking the pie's radius until drawPie returns true,
- // indicating that all the labels fit, or we try too many times.
-
- do {
- if (attempts > 0) {
- maxRadius *= REDRAW_SHRINK;
- }
- attempts += 1;
- clear();
- if (options.series.pie.tilt <= 0.8) {
- drawShadow();
- }
- } while (!drawPie() && attempts < REDRAW_ATTEMPTS)
-
- if (attempts >= REDRAW_ATTEMPTS) {
- clear();
- target.prepend("
Could not draw pie with labels contained inside canvas
");
- }
-
- if (plot.setSeries && plot.insertLegend) {
- plot.setSeries(slices);
- plot.insertLegend();
- }
-
- // we're actually done at this point, just defining internal functions at this point
-
- function clear() {
- ctx.clearRect(0, 0, canvasWidth, canvasHeight);
- target.children().filter(".pieLabel, .pieLabelBackground").remove();
- }
-
- function drawShadow() {
-
- var shadowLeft = options.series.pie.shadow.left;
- var shadowTop = options.series.pie.shadow.top;
- var edge = 10;
- var alpha = options.series.pie.shadow.alpha;
- var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
-
- if (radius >= canvasWidth / 2 - shadowLeft || radius * options.series.pie.tilt >= canvasHeight / 2 - shadowTop || radius <= edge) {
- return; // shadow would be outside canvas, so don't draw it
- }
-
- ctx.save();
- ctx.translate(shadowLeft,shadowTop);
- ctx.globalAlpha = alpha;
- ctx.fillStyle = "#000";
-
- // center and rotate to starting position
-
- ctx.translate(centerLeft,centerTop);
- ctx.scale(1, options.series.pie.tilt);
-
- //radius -= edge;
-
- for (var i = 1; i <= edge; i++) {
- ctx.beginPath();
- ctx.arc(0, 0, radius, 0, Math.PI * 2, false);
- ctx.fill();
- radius -= i;
- }
-
- ctx.restore();
- }
-
- function drawPie() {
-
- var startAngle = Math.PI * options.series.pie.startAngle;
- var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
-
- // center and rotate to starting position
-
- ctx.save();
- ctx.translate(centerLeft,centerTop);
- ctx.scale(1, options.series.pie.tilt);
- //ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera
-
- // draw slices
-
- ctx.save();
- var currentAngle = startAngle;
- for (var i = 0; i < slices.length; ++i) {
- slices[i].startAngle = currentAngle;
- drawSlice(slices[i].angle, slices[i].color, true);
- }
- ctx.restore();
-
- // draw slice outlines
-
- if (options.series.pie.stroke.width > 0) {
- ctx.save();
- ctx.lineWidth = options.series.pie.stroke.width;
- currentAngle = startAngle;
- for (var i = 0; i < slices.length; ++i) {
- drawSlice(slices[i].angle, options.series.pie.stroke.color, false);
- }
- ctx.restore();
- }
-
- // draw donut hole
-
- drawDonutHole(ctx);
-
- ctx.restore();
-
- // Draw the labels, returning true if they fit within the plot
-
- if (options.series.pie.label.show) {
- return drawLabels();
- } else return true;
-
- function drawSlice(angle, color, fill) {
-
- if (angle <= 0 || isNaN(angle)) {
- return;
- }
-
- if (fill) {
- ctx.fillStyle = color;
- } else {
- ctx.strokeStyle = color;
- ctx.lineJoin = "round";
- }
-
- ctx.beginPath();
- if (Math.abs(angle - Math.PI * 2) > 0.000000001) {
- ctx.moveTo(0, 0); // Center of the pie
- }
-
- //ctx.arc(0, 0, radius, 0, angle, false); // This doesn't work properly in Opera
- ctx.arc(0, 0, radius,currentAngle, currentAngle + angle / 2, false);
- ctx.arc(0, 0, radius,currentAngle + angle / 2, currentAngle + angle, false);
- ctx.closePath();
- //ctx.rotate(angle); // This doesn't work properly in Opera
- currentAngle += angle;
-
- if (fill) {
- ctx.fill();
- } else {
- ctx.stroke();
- }
- }
-
- function drawLabels() {
-
- var currentAngle = startAngle;
- var radius = options.series.pie.label.radius > 1 ? options.series.pie.label.radius : maxRadius * options.series.pie.label.radius;
-
- for (var i = 0; i < slices.length; ++i) {
- if (slices[i].percent >= options.series.pie.label.threshold * 100) {
- if (!drawLabel(slices[i], currentAngle, i)) {
- return false;
- }
- }
- currentAngle += slices[i].angle;
- }
-
- return true;
-
- function drawLabel(slice, startAngle, index) {
-
- if (slice.data[0][1] == 0) {
- return true;
- }
-
- // format label text
-
- var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter;
-
- if (lf) {
- text = lf(slice.label, slice);
- } else {
- text = slice.label;
- }
-
- if (plf) {
- text = plf(text, slice);
- }
-
- var halfAngle = ((startAngle + slice.angle) + startAngle) / 2;
- var x = centerLeft + Math.round(Math.cos(halfAngle) * radius);
- var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt;
-
- var html = "" + text + "";
- target.append(html);
-
- var label = target.children("#pieLabel" + index);
- var labelTop = (y - label.height() / 2);
- var labelLeft = (x - label.width() / 2);
-
- label.css("top", labelTop);
- label.css("left", labelLeft);
-
- // check to make sure that the label is not outside the canvas
-
- if (0 - labelTop > 0 || 0 - labelLeft > 0 || canvasHeight - (labelTop + label.height()) < 0 || canvasWidth - (labelLeft + label.width()) < 0) {
- return false;
- }
-
- if (options.series.pie.label.background.opacity != 0) {
-
- // put in the transparent background separately to avoid blended labels and label boxes
-
- var c = options.series.pie.label.background.color;
-
- if (c == null) {
- c = slice.color;
- }
-
- var pos = "top:" + labelTop + "px;left:" + labelLeft + "px;";
- $("")
- .css("opacity", options.series.pie.label.background.opacity)
- .insertBefore(label);
- }
-
- return true;
- } // end individual label function
- } // end drawLabels function
- } // end drawPie function
- } // end draw function
-
- // Placed here because it needs to be accessed from multiple locations
-
- function drawDonutHole(layer) {
- if (options.series.pie.innerRadius > 0) {
-
- // subtract the center
-
- layer.save();
- var innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius;
- layer.globalCompositeOperation = "destination-out"; // this does not work with excanvas, but it will fall back to using the stroke color
- layer.beginPath();
- layer.fillStyle = options.series.pie.stroke.color;
- layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
- layer.fill();
- layer.closePath();
- layer.restore();
-
- // add inner stroke
-
- layer.save();
- layer.beginPath();
- layer.strokeStyle = options.series.pie.stroke.color;
- layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
- layer.stroke();
- layer.closePath();
- layer.restore();
-
- // TODO: add extra shadow inside hole (with a mask) if the pie is tilted.
- }
- }
-
- //-- Additional Interactive related functions --
-
- function isPointInPoly(poly, pt) {
- for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)
- ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1]))
- && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0])
- && (c = !c);
- return c;
- }
-
- function findNearbySlice(mouseX, mouseY) {
-
- var slices = plot.getData(),
- options = plot.getOptions(),
- radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius,
- x, y;
-
- for (var i = 0; i < slices.length; ++i) {
-
- var s = slices[i];
-
- if (s.pie.show) {
-
- ctx.save();
- ctx.beginPath();
- ctx.moveTo(0, 0); // Center of the pie
- //ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here.
- ctx.arc(0, 0, radius, s.startAngle, s.startAngle + s.angle / 2, false);
- ctx.arc(0, 0, radius, s.startAngle + s.angle / 2, s.startAngle + s.angle, false);
- ctx.closePath();
- x = mouseX - centerLeft;
- y = mouseY - centerTop;
-
- if (ctx.isPointInPath) {
- if (ctx.isPointInPath(mouseX - centerLeft, mouseY - centerTop)) {
- ctx.restore();
- return {
- datapoint: [s.percent, s.data],
- dataIndex: 0,
- series: s,
- seriesIndex: i
- };
- }
- } else {
-
- // excanvas for IE doesn;t support isPointInPath, this is a workaround.
-
- var p1X = radius * Math.cos(s.startAngle),
- p1Y = radius * Math.sin(s.startAngle),
- p2X = radius * Math.cos(s.startAngle + s.angle / 4),
- p2Y = radius * Math.sin(s.startAngle + s.angle / 4),
- p3X = radius * Math.cos(s.startAngle + s.angle / 2),
- p3Y = radius * Math.sin(s.startAngle + s.angle / 2),
- p4X = radius * Math.cos(s.startAngle + s.angle / 1.5),
- p4Y = radius * Math.sin(s.startAngle + s.angle / 1.5),
- p5X = radius * Math.cos(s.startAngle + s.angle),
- p5Y = radius * Math.sin(s.startAngle + s.angle),
- arrPoly = [[0, 0], [p1X, p1Y], [p2X, p2Y], [p3X, p3Y], [p4X, p4Y], [p5X, p5Y]],
- arrPoint = [x, y];
-
- // TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt?
-
- if (isPointInPoly(arrPoly, arrPoint)) {
- ctx.restore();
- return {
- datapoint: [s.percent, s.data],
- dataIndex: 0,
- series: s,
- seriesIndex: i
- };
- }
- }
-
- ctx.restore();
- }
- }
-
- return null;
- }
-
- function onMouseMove(e) {
- triggerClickHoverEvent("plothover", e);
- }
-
- function onClick(e) {
- triggerClickHoverEvent("plotclick", e);
- }
-
- // trigger click or hover event (they send the same parameters so we share their code)
-
- function triggerClickHoverEvent(eventname, e) {
-
- var offset = plot.offset();
- var canvasX = parseInt(e.pageX - offset.left);
- var canvasY = parseInt(e.pageY - offset.top);
- var item = findNearbySlice(canvasX, canvasY);
-
- if (options.grid.autoHighlight) {
-
- // clear auto-highlights
-
- for (var i = 0; i < highlights.length; ++i) {
- var h = highlights[i];
- if (h.auto == eventname && !(item && h.series == item.series)) {
- unhighlight(h.series);
- }
- }
- }
-
- // highlight the slice
-
- if (item) {
- highlight(item.series, eventname);
- }
-
- // trigger any hover bind events
-
- var pos = { pageX: e.pageX, pageY: e.pageY };
- target.trigger(eventname, [pos, item]);
- }
-
- function highlight(s, auto) {
- //if (typeof s == "number") {
- // s = series[s];
- //}
-
- var i = indexOfHighlight(s);
-
- if (i == -1) {
- highlights.push({ series: s, auto: auto });
- plot.triggerRedrawOverlay();
- } else if (!auto) {
- highlights[i].auto = false;
- }
- }
-
- function unhighlight(s) {
- if (s == null) {
- highlights = [];
- plot.triggerRedrawOverlay();
- }
-
- //if (typeof s == "number") {
- // s = series[s];
- //}
-
- var i = indexOfHighlight(s);
-
- if (i != -1) {
- highlights.splice(i, 1);
- plot.triggerRedrawOverlay();
- }
- }
-
- function indexOfHighlight(s) {
- for (var i = 0; i < highlights.length; ++i) {
- var h = highlights[i];
- if (h.series == s)
- return i;
- }
- return -1;
- }
-
- function drawOverlay(plot, octx) {
-
- var options = plot.getOptions();
-
- var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
-
- octx.save();
- octx.translate(centerLeft, centerTop);
- octx.scale(1, options.series.pie.tilt);
-
- for (var i = 0; i < highlights.length; ++i) {
- drawHighlight(highlights[i].series);
- }
-
- drawDonutHole(octx);
-
- octx.restore();
-
- function drawHighlight(series) {
-
- if (series.angle <= 0 || isNaN(series.angle)) {
- return;
- }
-
- //octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();
- octx.fillStyle = "rgba(255, 255, 255, " + options.series.pie.highlight.opacity + ")"; // this is temporary until we have access to parseColor
- octx.beginPath();
- if (Math.abs(series.angle - Math.PI * 2) > 0.000000001) {
- octx.moveTo(0, 0); // Center of the pie
- }
- octx.arc(0, 0, radius, series.startAngle, series.startAngle + series.angle / 2, false);
- octx.arc(0, 0, radius, series.startAngle + series.angle / 2, series.startAngle + series.angle, false);
- octx.closePath();
- octx.fill();
- }
- }
- } // end init (plugin body)
-
- // define pie specific options and their default values
-
- var options = {
- series: {
- pie: {
- show: false,
- radius: "auto", // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)
- innerRadius: 0, /* for donut */
- startAngle: 3/2,
- tilt: 1,
- shadow: {
- left: 5, // shadow left offset
- top: 15, // shadow top offset
- alpha: 0.02 // shadow alpha
- },
- offset: {
- top: 0,
- left: "auto"
- },
- stroke: {
- color: "#fff",
- width: 1
- },
- label: {
- show: "auto",
- formatter: function(label, slice) {
- return "
" + label + " " + Math.round(slice.percent) + "%
";
- }, // formatter function
- radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value)
- background: {
- color: null,
- opacity: 0
- },
- threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow)
- },
- combine: {
- threshold: -1, // percentage at which to combine little slices into one larger slice
- color: null, // color to give the new slice (auto-generated if null)
- label: "Other" // label to give the new slice
- },
- highlight: {
- //color: "#fff", // will add this functionality once parseColor is available
- opacity: 0.5
- }
- }
- }
- };
-
- $.plot.plugins.push({
- init: init,
- options: options,
- name: "pie",
- version: "1.1"
- });
-
-})(jQuery);
diff --git a/app/assets/javascripts/js/flot/jquery.flot.resize.js b/app/assets/javascripts/js/flot/jquery.flot.resize.js
deleted file mode 100755
index 300af52..0000000
--- a/app/assets/javascripts/js/flot/jquery.flot.resize.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-Flot plugin for automatically redrawing plots when the placeholder
-size changes, e.g. on window resizes.
-
-It works by listening for changes on the placeholder div (through the
-jQuery resize event plugin) - if the size changes, it will redraw the
-plot.
-
-There are no options. If you need to disable the plugin for some
-plots, you can just fix the size of their placeholders.
-*/
-
-
-/* Inline dependency:
- * jQuery resize event - v1.2 - 3/14/2010
- * http://benalman.com/projects/jquery-resize-plugin/
- *
- * Copyright (c) 2010 "Cowboy" Ben Alman
- * Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
- */
-(function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this);
-
-
-(function ($) {
- var redrawing = 0;
- var options = { }; // no options
-
- function init(plot) {
- function bindEvents(plot, eventHolder) {
- if (!redrawing)
- plot.getPlaceholder().resize(onResize);
-
- function onResize() {
- var placeholder = plot.getPlaceholder();
-
- // somebody might have hidden us and we can't plot
- // when we don't have the dimensions
- if (placeholder.width() == 0 || placeholder.height() == 0)
- return;
-
- ++redrawing;
- $.plot(placeholder, plot.getData(), plot.getOptions());
- --redrawing;
- }
- }
-
- plot.hooks.bindEvents.push(bindEvents);
- }
-
- $.plot.plugins.push({
- init: init,
- options: options,
- name: 'resize',
- version: '1.0'
- });
-})(jQuery);
diff --git a/app/assets/javascripts/js/flot/jquery.flot.spline.js b/app/assets/javascripts/js/flot/jquery.flot.spline.js
deleted file mode 100755
index aaa0f77..0000000
--- a/app/assets/javascripts/js/flot/jquery.flot.spline.js
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- * Flot plugin that provides spline interpolation for line graphs
- * author: Alex Bardas < alex.bardas@gmail.com >
- * modified by: Avi Kohn https://github.com/AMKohn
- * based on the spline interpolation described at:
- * http://scaledinnovation.com/analytics/splines/aboutSplines.html
- *
- * Example usage: (add in plot options series object)
- * for linespline:
- * series: {
- * ...
- * lines: {
- * show: false
- * },
- * splines: {
- * show: true,
- * tension: x, (float between 0 and 1, defaults to 0.5),
- * lineWidth: y (number, defaults to 2),
- * fill: z (float between 0 .. 1 or false, as in flot documentation)
- * },
- * ...
- * }
- * areaspline:
- * series: {
- * ...
- * lines: {
- * show: true,
- * lineWidth: 0, (line drawing will not execute)
- * fill: x, (float between 0 .. 1, as in flot documentation)
- * ...
- * },
- * splines: {
- * show: true,
- * tension: 0.5 (float between 0 and 1)
- * },
- * ...
- * }
- *
- */
-
-(function($) {
- 'use strict'
-
- /**
- * @param {Number} x0, y0, x1, y1: coordinates of the end (knot) points of the segment
- * @param {Number} x2, y2: the next knot (not connected, but needed to calculate p2)
- * @param {Number} tension: control how far the control points spread
- * @return {Array}: p1 -> control point, from x1 back toward x0
- * p2 -> the next control point, returned to become the next segment's p1
- *
- * @api private
- */
- function getControlPoints(x0, y0, x1, y1, x2, y2, tension) {
-
- var pow = Math.pow,
- sqrt = Math.sqrt,
- d01, d12, fa, fb, p1x, p1y, p2x, p2y;
-
- // Scaling factors: distances from this knot to the previous and following knots.
- d01 = sqrt(pow(x1 - x0, 2) + pow(y1 - y0, 2));
- d12 = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
-
- fa = tension * d01 / (d01 + d12);
- fb = tension - fa;
-
- p1x = x1 + fa * (x0 - x2);
- p1y = y1 + fa * (y0 - y2);
-
- p2x = x1 - fb * (x0 - x2);
- p2y = y1 - fb * (y0 - y2);
-
- return [p1x, p1y, p2x, p2y];
- }
-
- var line = [];
-
- function drawLine(points, ctx, height, fill, seriesColor) {
- var c = $.color.parse(seriesColor);
-
- c.a = typeof fill == "number" ? fill : .3;
- c.normalize();
- c = c.toString();
-
- ctx.beginPath();
- ctx.moveTo(points[0][0], points[0][1]);
-
- var plength = points.length;
-
- for (var i = 0; i < plength; i++) {
- ctx[points[i][3]].apply(ctx, points[i][2]);
- }
-
- ctx.stroke();
-
- ctx.lineWidth = 0;
- ctx.lineTo(points[plength - 1][0], height);
- ctx.lineTo(points[0][0], height);
-
- ctx.closePath();
-
- if (fill !== false) {
- ctx.fillStyle = c;
- ctx.fill();
- }
- }
-
- /**
- * @param {Object} ctx: canvas context
- * @param {String} type: accepted strings: 'bezier' or 'quadratic' (defaults to quadratic)
- * @param {Array} points: 2 points for which to draw the interpolation
- * @param {Array} cpoints: control points for those segment points
- *
- * @api private
- */
- function queue(ctx, type, points, cpoints) {
- if (type === void 0 || (type !== 'bezier' && type !== 'quadratic')) {
- type = 'quadratic';
- }
- type = type + 'CurveTo';
-
- if (line.length == 0) line.push([points[0], points[1], cpoints.concat(points.slice(2)), type]);
- else if (type == "quadraticCurveTo" && points.length == 2) {
- cpoints = cpoints.slice(0, 2).concat(points);
-
- line.push([points[0], points[1], cpoints, type]);
- }
- else line.push([points[2], points[3], cpoints.concat(points.slice(2)), type]);
- }
-
- /**
- * @param {Object} plot
- * @param {Object} ctx: canvas context
- * @param {Object} series
- *
- * @api private
- */
-
- function drawSpline(plot, ctx, series) {
- // Not interested if spline is not requested
- if (series.splines.show !== true) {
- return;
- }
-
- var cp = [],
- // array of control points
- tension = series.splines.tension || 0.5,
- idx, x, y, points = series.datapoints.points,
- ps = series.datapoints.pointsize,
- plotOffset = plot.getPlotOffset(),
- len = points.length,
- pts = [];
-
- line = [];
-
- // Cannot display a linespline/areaspline if there are less than 3 points
- if (len / ps < 4) {
- $.extend(series.lines, series.splines);
- return;
- }
-
- for (idx = 0; idx < len; idx += ps) {
- x = points[idx];
- y = points[idx + 1];
- if (x == null || x < series.xaxis.min || x > series.xaxis.max || y < series.yaxis.min || y > series.yaxis.max) {
- continue;
- }
-
- pts.push(series.xaxis.p2c(x) + plotOffset.left, series.yaxis.p2c(y) + plotOffset.top);
- }
-
- len = pts.length;
-
- // Draw an open curve, not connected at the ends
- for (idx = 0; idx < len - 2; idx += 2) {
- cp = cp.concat(getControlPoints.apply(this, pts.slice(idx, idx + 6).concat([tension])));
- }
-
- ctx.save();
- ctx.strokeStyle = series.color;
- ctx.lineWidth = series.splines.lineWidth;
-
- queue(ctx, 'quadratic', pts.slice(0, 4), cp.slice(0, 2));
-
- for (idx = 2; idx < len - 3; idx += 2) {
- queue(ctx, 'bezier', pts.slice(idx, idx + 4), cp.slice(2 * idx - 2, 2 * idx + 2));
- }
-
- queue(ctx, 'quadratic', pts.slice(len - 2, len), [cp[2 * len - 10], cp[2 * len - 9], pts[len - 4], pts[len - 3]]);
-
- drawLine(line, ctx, plot.height() + 10, series.splines.fill, series.color);
-
- ctx.restore();
- }
-
- $.plot.plugins.push({
- init: function(plot) {
- plot.hooks.drawSeries.push(drawSpline);
- },
- options: {
- series: {
- splines: {
- show: false,
- lineWidth: 2,
- tension: 0.5,
- fill: false
- }
- }
- },
- name: 'spline',
- version: '0.8.2'
- });
-})(jQuery);
diff --git a/app/assets/javascripts/js/flot/jquery.flot.stack.js b/app/assets/javascripts/js/flot/jquery.flot.stack.js
deleted file mode 100755
index e75a7df..0000000
--- a/app/assets/javascripts/js/flot/jquery.flot.stack.js
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Flot plugin for stacking data sets rather than overlyaing them.
-
-Copyright (c) 2007-2014 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The plugin assumes the data is sorted on x (or y if stacking horizontally).
-For line charts, it is assumed that if a line has an undefined gap (from a
-null point), then the line above it should have the same gap - insert zeros
-instead of "null" if you want another behaviour. This also holds for the start
-and end of the chart. Note that stacking a mix of positive and negative values
-in most instances doesn't make sense (so it looks weird).
-
-Two or more series are stacked when their "stack" attribute is set to the same
-key (which can be any number or string or just "true"). To specify the default
-stack, you can set the stack option like this:
-
- series: {
- stack: null/false, true, or a key (number/string)
- }
-
-You can also specify it for a single series, like this:
-
- $.plot( $("#placeholder"), [{
- data: [ ... ],
- stack: true
- }])
-
-The stacking order is determined by the order of the data series in the array
-(later series end up on top of the previous).
-
-Internally, the plugin modifies the datapoints in each series, adding an
-offset to the y value. For line series, extra data points are inserted through
-interpolation. If there's a second y value, it's also adjusted (e.g for bar
-charts or filled areas).
-
-*/
-
-(function ($) {
- var options = {
- series: { stack: null } // or number/string
- };
-
- function init(plot) {
- function findMatchingSeries(s, allseries) {
- var res = null;
- for (var i = 0; i < allseries.length; ++i) {
- if (s == allseries[i])
- break;
-
- if (allseries[i].stack == s.stack)
- res = allseries[i];
- }
-
- return res;
- }
-
- function stackData(plot, s, datapoints) {
- if (s.stack == null || s.stack === false)
- return;
-
- var other = findMatchingSeries(s, plot.getData());
- if (!other)
- return;
-
- var ps = datapoints.pointsize,
- points = datapoints.points,
- otherps = other.datapoints.pointsize,
- otherpoints = other.datapoints.points,
- newpoints = [],
- px, py, intery, qx, qy, bottom,
- withlines = s.lines.show,
- horizontal = s.bars.horizontal,
- withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),
- withsteps = withlines && s.lines.steps,
- fromgap = true,
- keyOffset = horizontal ? 1 : 0,
- accumulateOffset = horizontal ? 0 : 1,
- i = 0, j = 0, l, m;
-
- while (true) {
- if (i >= points.length)
- break;
-
- l = newpoints.length;
-
- if (points[i] == null) {
- // copy gaps
- for (m = 0; m < ps; ++m)
- newpoints.push(points[i + m]);
- i += ps;
- }
- else if (j >= otherpoints.length) {
- // for lines, we can't use the rest of the points
- if (!withlines) {
- for (m = 0; m < ps; ++m)
- newpoints.push(points[i + m]);
- }
- i += ps;
- }
- else if (otherpoints[j] == null) {
- // oops, got a gap
- for (m = 0; m < ps; ++m)
- newpoints.push(null);
- fromgap = true;
- j += otherps;
- }
- else {
- // cases where we actually got two points
- px = points[i + keyOffset];
- py = points[i + accumulateOffset];
- qx = otherpoints[j + keyOffset];
- qy = otherpoints[j + accumulateOffset];
- bottom = 0;
-
- if (px == qx) {
- for (m = 0; m < ps; ++m)
- newpoints.push(points[i + m]);
-
- newpoints[l + accumulateOffset] += qy;
- bottom = qy;
-
- i += ps;
- j += otherps;
- }
- else if (px > qx) {
- // we got past point below, might need to
- // insert interpolated extra point
- if (withlines && i > 0 && points[i - ps] != null) {
- intery = py + (points[i - ps + accumulateOffset] - py) * (qx - px) / (points[i - ps + keyOffset] - px);
- newpoints.push(qx);
- newpoints.push(intery + qy);
- for (m = 2; m < ps; ++m)
- newpoints.push(points[i + m]);
- bottom = qy;
- }
-
- j += otherps;
- }
- else { // px < qx
- if (fromgap && withlines) {
- // if we come from a gap, we just skip this point
- i += ps;
- continue;
- }
-
- for (m = 0; m < ps; ++m)
- newpoints.push(points[i + m]);
-
- // we might be able to interpolate a point below,
- // this can give us a better y
- if (withlines && j > 0 && otherpoints[j - otherps] != null)
- bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx);
-
- newpoints[l + accumulateOffset] += bottom;
-
- i += ps;
- }
-
- fromgap = false;
-
- if (l != newpoints.length && withbottom)
- newpoints[l + 2] += bottom;
- }
-
- // maintain the line steps invariant
- if (withsteps && l != newpoints.length && l > 0
- && newpoints[l] != null
- && newpoints[l] != newpoints[l - ps]
- && newpoints[l + 1] != newpoints[l - ps + 1]) {
- for (m = 0; m < ps; ++m)
- newpoints[l + ps + m] = newpoints[l + m];
- newpoints[l + 1] = newpoints[l - ps + 1];
- }
- }
-
- datapoints.points = newpoints;
- }
-
- plot.hooks.processDatapoints.push(stackData);
- }
-
- $.plot.plugins.push({
- init: init,
- options: options,
- name: 'stack',
- version: '1.2'
- });
-})(jQuery);
diff --git a/app/assets/javascripts/js/flot/jquery.flot.time.min.js b/app/assets/javascripts/js/flot/jquery.flot.time.min.js
deleted file mode 100755
index dcbd024..0000000
--- a/app/assets/javascripts/js/flot/jquery.flot.time.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){var i={};function d(k,j){return j*Math.floor(k/j)}function h(q,l,o,k){if(typeof q.strftime=="function"){return q.strftime(l)}var u=function(w,r){w=""+w;r=""+(r==null?"0":r);return w.length==1?r+w:w};var j=[];var v=false;var t=q.getHours();var p=t<12;if(o==null){o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(k==null){k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}var m;if(t>12){m=t-12}else{if(t==0){m=12}else{m=t}}for(var n=0;n=t){break}}var G=e[A][0];var D=e[A][1];if(D=="year"){if(o.minTickSize!=null&&o.minTickSize[1]=="year"){G=Math.floor(o.minTickSize[0])}else{var r=Math.pow(10,Math.floor(Math.log(w.delta/b.year)/Math.LN10));var q=(w.delta/b.year)/r;if(q<1.5){G=1}else{if(q<3){G=2}else{if(q<7.5){G=5}else{G=10}}}G*=r}if(G<1){G=1}}w.tickSize=o.tickSize||[G,D];var z=w.tickSize[0];D=w.tickSize[1];var u=z*b[D];if(D=="second"){B.setSeconds(d(B.getSeconds(),z))}if(D=="minute"){B.setMinutes(d(B.getMinutes(),z))}if(D=="hour"){B.setHours(d(B.getHours(),z))}if(D=="month"){B.setMonth(d(B.getMonth(),z))}if(D=="year"){B.setFullYear(d(B.getFullYear(),z))}B.setMilliseconds(0);if(u>=b.minute){B.setSeconds(0)}if(u>=b.hour){B.setMinutes(0)}if(u>=b.day){B.setHours(0)}if(u>=b.day*4){B.setDate(1)}if(u>=b.year){B.setMonth(0)}var F=0,E=Number.NaN,x;do{x=E;E=B.getTime();C.push(E);if(D=="month"){if(z<1){B.setDate(1);var s=B.getTime();B.setMonth(B.getMonth()+1);var y=B.getTime();B.setTime(E+F*b.hour+(y-s)*z);F=B.getHours();B.setHours(0)}else{B.setMonth(B.getMonth()+z)}}else{if(D=="year"){B.setFullYear(B.getFullYear()+z)}else{B.setTime(E+u)}}}while(E0?b=a("#flotTip"):(b=a("").attr("id","flotTip"),b.appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&b.css({background:"#fff","z-index":"100",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111"})),b},c.prototype.updateTooltipPosition=function(a){this.tipPosition.x=a.x,this.tipPosition.y=a.y},c.prototype.stringFormat=function(a,b){var c=/%p\.{0,1}(\d{0,})/,d=/%s/,e=/%x\.{0,1}(\d{0,})/,f=/%y\.{0,1}(\d{0,})/;return typeof a=="function"&&(a=a(b.series.data[b.dataIndex][0],b.series.data[b.dataIndex][1])),typeof b.series.percent!="undefined"&&(a=this.adjustValPrecision(c,a,b.series.percent)),typeof b.series.label!="undefined"&&(a=a.replace(d,b.series.label)),this.isTimeMode("xaxis",b)&&this.isXDateFormat(b)&&(a=a.replace(e,this.timestampToDate(b.series.data[b.dataIndex][0],this.tooltipOptions.xDateFormat))),this.isTimeMode("yaxis",b)&&this.isYDateFormat(b)&&(a=a.replace(f,this.timestampToDate(b.series.data[b.dataIndex][1],this.tooltipOptions.yDateFormat))),typeof b.series.data[b.dataIndex][0]=="number"&&(a=this.adjustValPrecision(e,a,b.series.data[b.dataIndex][0])),typeof b.series.data[b.dataIndex][1]=="number"&&(a=this.adjustValPrecision(f,a,b.series.data[b.dataIndex][1])),typeof b.series.xaxis.tickFormatter!="undefined"&&(a=a.replace(e,b.series.xaxis.tickFormatter(b.series.data[b.dataIndex][0],b.series.xaxis))),typeof b.series.yaxis.tickFormatter!="undefined"&&(a=a.replace(f,b.series.yaxis.tickFormatter(b.series.data[b.dataIndex][1],b.series.yaxis))),a},c.prototype.isTimeMode=function(a,b){return typeof b.series[a].options.mode!="undefined"&&b.series[a].options.mode==="time"},c.prototype.isXDateFormat=function(a){return typeof this.tooltipOptions.xDateFormat!="undefined"&&this.tooltipOptions.xDateFormat!==null},c.prototype.isYDateFormat=function(a){return typeof this.tooltipOptions.yDateFormat!="undefined"&&this.tooltipOptions.yDateFormat!==null},c.prototype.timestampToDate=function(b,c){var d=new Date(b);return a.plot.formatDate(d,c)},c.prototype.adjustValPrecision=function(a,b,c){var d;return b.match(a)!==null&&RegExp.$1!==""&&(d=RegExp.$1,c=c.toFixed(d),b=b.replace(a,c)),b};var d=[],e=function(a){d.push(new c(a))};a.plot.plugins.push({init:e,options:b,name:"tooltip",version:"0.6"})})(jQuery);
\ No newline at end of file
diff --git a/app/assets/javascripts/js/gauge/gauge.min.js b/app/assets/javascripts/js/gauge/gauge.min.js
deleted file mode 100755
index 32dc0ae..0000000
--- a/app/assets/javascripts/js/gauge/gauge.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q={}.hasOwnProperty,r=function(a,b){function c(){this.constructor=a}for(var d in b)q.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};!function(){var a,b,c,d,e,f,g;for(g=["ms","moz","webkit","o"],c=0,e=g.length;e>c&&(f=g[c],!window.requestAnimationFrame);c++)window.requestAnimationFrame=window[f+"RequestAnimationFrame"],window.cancelAnimationFrame=window[f+"CancelAnimationFrame"]||window[f+"CancelRequestAnimationFrame"];return a=null,d=0,b={},requestAnimationFrame?window.cancelAnimationFrame?void 0:(a=window.requestAnimationFrame,window.requestAnimationFrame=function(c,e){var f;return f=++d,a(function(){return b[f]?void 0:c()},e),f},window.cancelAnimationFrame=function(a){return b[a]=!0}):(window.requestAnimationFrame=function(a,b){var c,d,e,f;return c=(new Date).getTime(),f=Math.max(0,16-(c-e)),d=window.setTimeout(function(){return a(c+f)},f),e=c+f,d},window.cancelAnimationFrame=function(a){return clearTimeout(a)})}(),String.prototype.hashCode=function(){var a,b,c,d,e;if(b=0,0===this.length)return b;for(c=d=0,e=this.length;e>=0?e>d:d>e;c=e>=0?++d:--d)a=this.charCodeAt(c),b=(b<<5)-b+a,b&=b;return b},o=function(a){var b,c;for(b=Math.floor(a/3600),c=Math.floor((a-3600*b)/60),a-=3600*b+60*c,a+="",c+="";c.length<2;)c="0"+c;for(;a.length<2;)a="0"+a;return b=b?b+":":"",b+c+":"+a},m=function(a){return k(a.toFixed(0))},p=function(a,b){var c,d;for(c in b)q.call(b,c)&&(d=b[c],a[c]=d);return a},n=function(a,b){var c,d,e;d={};for(c in a)q.call(a,c)&&(e=a[c],d[c]=e);for(c in b)q.call(b,c)&&(e=b[c],d[c]=e);return d},k=function(a){var b,c,d,e;for(a+="",c=a.split("."),d=c[0],e="",c.length>1&&(e="."+c[1]),b=/(\d+)(\d{3})/;b.test(d);)d=d.replace(b,"$1,$2");return d+e},l=function(a){return"#"===a.charAt(0)?a.substring(1,7):a},j=function(){function a(a,b){null==a&&(a=!0),this.clear=null!=b?b:!0,a&&AnimationUpdater.add(this)}return a.prototype.animationSpeed=32,a.prototype.update=function(a){var b;return null==a&&(a=!1),a||this.displayedValue!==this.value?(this.ctx&&this.clear&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),b=this.value-this.displayedValue,Math.abs(b/this.animationSpeed)<=.001?this.displayedValue=this.value:this.displayedValue=this.displayedValue+b/this.animationSpeed,this.render(),!0):!1},a}(),e=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return r(b,a),b.prototype.displayScale=1,b.prototype.setTextField=function(a){return this.textField=a instanceof i?a:new i(a)},b.prototype.setMinValue=function(a,b){var c,d,e,f,g;if(this.minValue=a,null==b&&(b=!0),b){for(this.displayedValue=this.minValue,f=this.gp||[],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.displayedValue=this.minValue);return g}},b.prototype.setOptions=function(a){return null==a&&(a=null),this.options=n(this.options,a),this.textField&&(this.textField.el.style.fontSize=a.fontSize+"px"),this.options.angle>.5&&(this.gauge.options.angle=.5),this.configDisplayScale(),this},b.prototype.configDisplayScale=function(){var a,b,c,d,e;return d=this.displayScale,this.options.highDpiSupport===!1?delete this.displayScale:(b=window.devicePixelRatio||1,a=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,this.displayScale=b/a),this.displayScale!==d&&(e=this.canvas.G__width||this.canvas.width,c=this.canvas.G__height||this.canvas.height,this.canvas.width=e*this.displayScale,this.canvas.height=c*this.displayScale,this.canvas.style.width=e+"px",this.canvas.style.height=c+"px",this.canvas.G__width=e,this.canvas.G__height=c),this},b}(j),i=function(){function a(a){this.el=a}return a.prototype.render=function(a){return this.el.innerHTML=m(a.displayedValue)},a}(),a=function(a){function b(a,b){this.elem=a,this.text=null!=b?b:!1,this.value=1*this.elem.innerHTML,this.text&&(this.value=0)}return r(b,a),b.prototype.displayedValue=0,b.prototype.value=0,b.prototype.setVal=function(a){return this.value=1*a},b.prototype.render=function(){var a;return a=this.text?o(this.displayedValue.toFixed(0)):k(m(this.displayedValue)),this.elem.innerHTML=a},b}(j),b={create:function(b){var c,d,e,f;for(f=[],d=0,e=b.length;e>d;d++)c=b[d],f.push(new a(c));return f}},h=function(a){function b(a){this.gauge=a,this.ctx=this.gauge.ctx,this.canvas=this.gauge.canvas,b.__super__.constructor.call(this,!1,!1),this.setOptions()}return r(b,a),b.prototype.displayedValue=0,b.prototype.value=0,b.prototype.options={strokeWidth:.035,length:.1,color:"#000000"},b.prototype.setOptions=function(a){return null==a&&(a=null),p(this.options,a),this.length=this.canvas.height*this.options.length,this.strokeWidth=this.canvas.height*this.options.strokeWidth,this.maxValue=this.gauge.maxValue,this.minValue=this.gauge.minValue,this.displayedValue=this.gauge.minValue,this.animationSpeed=this.gauge.animationSpeed,this.options.angle=this.gauge.options.angle},b.prototype.render=function(){var a,b,c,d,e,f,g,h,i;return a=this.gauge.getAngle.call(this,this.displayedValue),b=this.canvas.width/2,c=.9*this.canvas.height,h=Math.round(b+this.length*Math.cos(a)),i=Math.round(c+this.length*Math.sin(a)),f=Math.round(b+this.strokeWidth*Math.cos(a-Math.PI/2)),g=Math.round(c+this.strokeWidth*Math.sin(a-Math.PI/2)),d=Math.round(b+this.strokeWidth*Math.cos(a+Math.PI/2)),e=Math.round(c+this.strokeWidth*Math.sin(a+Math.PI/2)),this.ctx.fillStyle=this.options.color,this.ctx.beginPath(),this.ctx.arc(b,c,this.strokeWidth,0,2*Math.PI,!0),this.ctx.fill(),this.ctx.beginPath(),this.ctx.moveTo(f,g),this.ctx.lineTo(h,i),this.ctx.lineTo(d,e),this.ctx.fill()},b}(j),c=function(){function a(a){this.elem=a}return a.prototype.updateValues=function(a){return this.value=a[0],this.maxValue=a[1],this.avgValue=a[2],this.render()},a.prototype.render=function(){var a,b;return this.textField&&this.textField.text(m(this.value)),0===this.maxValue&&(this.maxValue=2*this.avgValue),b=this.value/this.maxValue*100,a=this.avgValue/this.maxValue*100,$(".bar-value",this.elem).css({width:b+"%"}),$(".typical-value",this.elem).css({width:a+"%"})},a}(),g=function(a){function b(a){this.canvas=a,b.__super__.constructor.call(this),this.percentColors=null,"undefined"!=typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),this.gp=[new h(this)],this.setOptions(),this.render()}return r(b,a),b.prototype.elem=null,b.prototype.value=[20],b.prototype.maxValue=80,b.prototype.minValue=0,b.prototype.displayedAngle=0,b.prototype.displayedValue=0,b.prototype.lineWidth=40,b.prototype.paddingBottom=.1,b.prototype.percentColors=null,b.prototype.options={colorStart:"#6fadcf",colorStop:void 0,gradientType:0,strokeColor:"#e0e0e0",pointer:{length:.8,strokeWidth:.035},angle:.15,lineWidth:.44,fontSize:40,limitMax:!1},b.prototype.setOptions=function(a){var c,d,e,f;for(null==a&&(a=null),b.__super__.setOptions.call(this,a),this.configPercentColors(),this.lineWidth=this.canvas.height*(1-this.paddingBottom)*this.options.lineWidth,this.radius=this.canvas.height*(1-this.paddingBottom)-this.lineWidth,this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.render(),f=this.gp,d=0,e=f.length;e>d;d++)c=f[d],c.setOptions(this.options.pointer),c.render();return this},b.prototype.configPercentColors=function(){var a,b,c,d,e,f,g;if(this.percentColors=null,void 0!==this.options.percentColors){for(this.percentColors=new Array,f=[],c=d=0,e=this.options.percentColors.length-1;e>=0?e>=d:d>=e;c=e>=0?++d:--d)g=parseInt(l(this.options.percentColors[c][1]).substring(0,2),16),b=parseInt(l(this.options.percentColors[c][1]).substring(2,4),16),a=parseInt(l(this.options.percentColors[c][1]).substring(4,6),16),f.push(this.percentColors[c]={pct:this.options.percentColors[c][0],color:{r:g,g:b,b:a}});return f}},b.prototype.set=function(a){var b,c,d,e,f,g,i;if(this.displayedValue=this.minValue,a instanceof Array||(a=[a]),a.length>this.gp.length)for(b=c=0,g=a.length-this.gp.length;g>=0?g>c:c>g;b=g>=0?++c:--c)this.gp.push(new h(this));for(b=0,f=!1,d=0,e=a.length;e>d;d++)i=a[d],i>this.maxValue&&(this.maxValue=1.1*this.value,f=!0),this.gp[b].value=i,this.gp[b++].setOptions({maxValue:this.maxValue,angle:this.options.angle});return this.value=a[a.length-1],f&&this.options.limitMax?void 0:AnimationUpdater.run()},b.prototype.getAngle=function(a){return(1+this.options.angle)*Math.PI+(a-this.minValue)/(this.maxValue-this.minValue)*(1-2*this.options.angle)*Math.PI},b.prototype.getColorForPercentage=function(a,b){var c,d,e,f,g,h,i;if(0===a)c=this.percentColors[0].color;else for(c=this.percentColors[this.percentColors.length-1].color,e=f=0,h=this.percentColors.length-1;h>=0?h>=f:f>=h;e=h>=0?++f:--f)if(a<=this.percentColors[e].pct){b===!0?(i=this.percentColors[e-1],d=this.percentColors[e],g=(a-i.pct)/(d.pct-i.pct),c={r:Math.floor(i.color.r*(1-g)+d.color.r*g),g:Math.floor(i.color.g*(1-g)+d.color.g*g),b:Math.floor(i.color.b*(1-g)+d.color.b*g)}):c=this.percentColors[e].color;break}return"rgb("+[c.r,c.g,c.b].join(",")+")"},b.prototype.getColorForValue=function(a,b){var c;return c=(a-this.minValue)/(this.maxValue-this.minValue),this.getColorForPercentage(c,b)},b.prototype.render=function(){var a,b,c,d,e,f,g,h,i;for(i=this.canvas.width/2,d=this.canvas.height*(1-this.paddingBottom),a=this.getAngle(this.displayedValue),this.textField&&this.textField.render(this),this.ctx.lineCap="butt",void 0!==this.options.customFillStyle?b=this.options.customFillStyle(this):null!==this.percentColors?b=this.getColorForValue(this.displayedValue,!0):void 0!==this.options.colorStop?(b=0===this.options.gradientType?this.ctx.createRadialGradient(i,d,9,i,d,70):this.ctx.createLinearGradient(0,0,i,0),b.addColorStop(0,this.options.colorStart),b.addColorStop(1,this.options.colorStop)):b=this.options.colorStart,this.ctx.strokeStyle=b,this.ctx.beginPath(),this.ctx.arc(i,d,this.radius,(1+this.options.angle)*Math.PI,a,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.stroke(),this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(i,d,this.radius,a,(2-this.options.angle)*Math.PI,!1),this.ctx.stroke(),g=this.gp,h=[],e=0,f=g.length;f>e;e++)c=g[e],h.push(c.update(!0));return h},b}(e),d=function(a){function b(a){this.canvas=a,b.__super__.constructor.call(this),"undefined"!=typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),this.setOptions(),this.render()}return r(b,a),b.prototype.lineWidth=15,b.prototype.displayedValue=0,b.prototype.value=33,b.prototype.maxValue=80,b.prototype.minValue=0,b.prototype.options={lineWidth:.1,colorStart:"#6f6ea0",colorStop:"#c0c0db",strokeColor:"#eeeeee",shadowColor:"#d5d5d5",angle:.35},b.prototype.getAngle=function(a){return(1-this.options.angle)*Math.PI+(a-this.minValue)/(this.maxValue-this.minValue)*(2+this.options.angle-(1-this.options.angle))*Math.PI},b.prototype.setOptions=function(a){return null==a&&(a=null),b.__super__.setOptions.call(this,a),this.lineWidth=this.canvas.height*this.options.lineWidth,this.radius=this.canvas.height/2-this.lineWidth/2,this},b.prototype.set=function(a){return this.value=a,this.value>this.maxValue&&(this.maxValue=1.1*this.value),AnimationUpdater.run()},b.prototype.render=function(){var a,b,c,d,e,f;return a=this.getAngle(this.displayedValue),f=this.canvas.width/2,c=this.canvas.height/2,this.textField&&this.textField.render(this),b=this.ctx.createRadialGradient(f,c,39,f,c,70),b.addColorStop(0,this.options.colorStart),b.addColorStop(1,this.options.colorStop),d=this.radius-this.lineWidth/2,e=this.radius+this.lineWidth/2,this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(f,c,this.radius,(1-this.options.angle)*Math.PI,(2+this.options.angle)*Math.PI,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.lineCap="round",this.ctx.stroke(),this.ctx.strokeStyle=b,this.ctx.beginPath(),this.ctx.arc(f,c,this.radius,(1-this.options.angle)*Math.PI,a,!1),this.ctx.stroke()},b}(e),f=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return r(b,a),b.prototype.strokeGradient=function(a,b,c,d){var e;return e=this.ctx.createRadialGradient(a,b,c,a,b,d),e.addColorStop(0,this.options.shadowColor),e.addColorStop(.12,this.options._orgStrokeColor),e.addColorStop(.88,this.options._orgStrokeColor),e.addColorStop(1,this.options.shadowColor),e},b.prototype.setOptions=function(a){var c,d,e,f;return null==a&&(a=null),b.__super__.setOptions.call(this,a),f=this.canvas.width/2,c=this.canvas.height/2,d=this.radius-this.lineWidth/2,e=this.radius+this.lineWidth/2,this.options._orgStrokeColor=this.options.strokeColor,this.options.strokeColor=this.strokeGradient(f,c,d,e),this},b}(d),window.AnimationUpdater={elements:[],animId:null,addAll:function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(AnimationUpdater.elements.push(b));return e},add:function(a){return AnimationUpdater.elements.push(a)},run:function(){var a,b,c,d,e;for(a=!0,e=AnimationUpdater.elements,c=0,d=e.length;d>c;c++)b=e[c],b.update()&&(a=!1);return a?cancelAnimationFrame(AnimationUpdater.animId):AnimationUpdater.animId=requestAnimationFrame(AnimationUpdater.run)}},"function"==typeof window.define&&null!=window.define.amd?define(function(){return{Gauge:g,Donut:f,BaseDonut:d,TextRenderer:i}}):"undefined"!=typeof module&&null!=module.exports?module.exports={Gauge:g,Donut:f,BaseDonut:d,TextRenderer:i}:(window.Gauge=g,window.Donut=f,window.BaseDonut=d,window.TextRenderer=i)}).call(this);
diff --git a/app/assets/javascripts/js/gauge/gauge_demo.js b/app/assets/javascripts/js/gauge/gauge_demo.js
deleted file mode 100755
index 037caf4..0000000
--- a/app/assets/javascripts/js/gauge/gauge_demo.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var opts = {
- lines: 12, // The number of lines to draw
- angle: 0, // The length of each line
- lineWidth: 0.4, // The line thickness
- pointer: {
- length: 0.75, // The radius of the inner circle
- strokeWidth: 0.042, // The rotation offset
- color: '#1D212A' // Fill color
- },
- limitMax: 'false', // If true, the pointer will not go past the end of the gauge
- colorStart: '#1ABC9C', // Colors
- colorStop: '#1ABC9C', // just experiment with them
- strokeColor: '#F0F3F3', // to see which ones work best for you
- generateGradient: true
-};
-var target = document.getElementById('foo'); // your canvas element
-var gauge = new Gauge(target).setOptions(opts); // create sexy gauge!
-gauge.maxValue = 6000; // set max gauge value
-gauge.animationSpeed = 32; // set animation speed (32 is default value)
-gauge.set(3200); // set actual value
-gauge.setTextField(document.getElementById("gauge-text"));
diff --git a/app/assets/javascripts/js/icheck/icheck.min.js b/app/assets/javascripts/js/icheck/icheck.min.js
deleted file mode 100755
index 7cdb17e..0000000
--- a/app/assets/javascripts/js/icheck/icheck.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
-(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate,
-v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true");
-g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap();
-f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i";
-_add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c=
-f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this,
-b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='")[_callback]("ifCreated").parent().append(e.insert);d=f('').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return;
-A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d=
-b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);
diff --git a/app/assets/javascripts/js/maps/gdp-data.js b/app/assets/javascripts/js/maps/gdp-data.js
deleted file mode 100755
index 169f564..0000000
--- a/app/assets/javascripts/js/maps/gdp-data.js
+++ /dev/null
@@ -1,185 +0,0 @@
-var gdpData = {
- "AF": 16.63,
- "AL": 11.58,
- "DZ": 158.97,
- "AO": 85.81,
- "AG": 1.1,
- "AR": 351.02,
- "AM": 8.83,
- "AU": 1219.72,
- "AT": 366.26,
- "AZ": 52.17,
- "BS": 7.54,
- "BH": 21.73,
- "BD": 105.4,
- "BB": 3.96,
- "BY": 52.89,
- "BE": 461.33,
- "BZ": 1.43,
- "BJ": 6.49,
- "BT": 1.4,
- "BO": 19.18,
- "BA": 16.2,
- "BW": 12.5,
- "BR": 2023.53,
- "BN": 11.96,
- "BG": 44.84,
- "BF": 8.67,
- "BI": 1.47,
- "KH": 11.36,
- "CM": 21.88,
- "CA": 1563.66,
- "CV": 1.57,
- "CF": 2.11,
- "TD": 7.59,
- "CL": 199.18,
- "CN": 5745.13,
- "CO": 283.11,
- "KM": 0.56,
- "CD": 12.6,
- "CG": 11.88,
- "CR": 35.02,
- "CI": 22.38,
- "HR": 59.92,
- "CY": 22.75,
- "CZ": 195.23,
- "DK": 304.56,
- "DJ": 1.14,
- "DM": 0.38,
- "DO": 50.87,
- "EC": 61.49,
- "EG": 216.83,
- "SV": 21.8,
- "GQ": 14.55,
- "ER": 2.25,
- "EE": 19.22,
- "ET": 30.94,
- "FJ": 3.15,
- "FI": 231.98,
- "FR": 2555.44,
- "GA": 12.56,
- "GM": 1.04,
- "GE": 11.23,
- "DE": 3305.9,
- "GH": 18.06,
- "GR": 305.01,
- "GD": 0.65,
- "GT": 40.77,
- "GN": 4.34,
- "GW": 0.83,
- "GY": 2.2,
- "HT": 6.5,
- "HN": 15.34,
- "HK": 226.49,
- "HU": 132.28,
- "IS": 12.77,
- "IN": 1430.02,
- "ID": 695.06,
- "IR": 337.9,
- "IQ": 84.14,
- "IE": 204.14,
- "IL": 201.25,
- "IT": 2036.69,
- "JM": 13.74,
- "JP": 5390.9,
- "JO": 27.13,
- "KZ": 129.76,
- "KE": 32.42,
- "KI": 0.15,
- "KR": 986.26,
- "UNDEFINED": 5.73,
- "KW": 117.32,
- "KG": 4.44,
- "LA": 6.34,
- "LV": 23.39,
- "LB": 39.15,
- "LS": 1.8,
- "LR": 0.98,
- "LY": 77.91,
- "LT": 35.73,
- "LU": 52.43,
- "MK": 9.58,
- "MG": 8.33,
- "MW": 5.04,
- "MY": 218.95,
- "MV": 1.43,
- "ML": 9.08,
- "MT": 7.8,
- "MR": 3.49,
- "MU": 9.43,
- "MX": 1004.04,
- "MD": 5.36,
- "MN": 5.81,
- "ME": 3.88,
- "MA": 91.7,
- "MZ": 10.21,
- "MM": 35.65,
- "NA": 11.45,
- "NP": 15.11,
- "NL": 770.31,
- "NZ": 138,
- "NI": 6.38,
- "NE": 5.6,
- "NG": 206.66,
- "NO": 413.51,
- "OM": 53.78,
- "PK": 174.79,
- "PA": 27.2,
- "PG": 8.81,
- "PY": 17.17,
- "PE": 153.55,
- "PH": 189.06,
- "PL": 438.88,
- "PT": 223.7,
- "QA": 126.52,
- "RO": 158.39,
- "RU": 1476.91,
- "RW": 5.69,
- "WS": 0.55,
- "ST": 0.19,
- "SA": 434.44,
- "SN": 12.66,
- "RS": 38.92,
- "SC": 0.92,
- "SL": 1.9,
- "SG": 217.38,
- "SK": 86.26,
- "SI": 46.44,
- "SB": 0.67,
- "ZA": 354.41,
- "ES": 1374.78,
- "LK": 48.24,
- "KN": 0.56,
- "LC": 1,
- "VC": 0.58,
- "SD": 65.93,
- "SR": 3.3,
- "SZ": 3.17,
- "SE": 444.59,
- "CH": 522.44,
- "SY": 59.63,
- "TW": 426.98,
- "TJ": 5.58,
- "TZ": 22.43,
- "TH": 312.61,
- "TL": 0.62,
- "TG": 3.07,
- "TO": 0.3,
- "TT": 21.2,
- "TN": 43.86,
- "TR": 729.05,
- "TM": 0,
- "UG": 17.12,
- "UA": 136.56,
- "AE": 239.65,
- "GB": 2258.57,
- "US": 14624.18,
- "UY": 40.71,
- "UZ": 37.72,
- "VU": 0.72,
- "VE": 285.21,
- "VN": 101.99,
- "YE": 30.02,
- "ZM": 15.69,
- "ZW": 5.57
-};
\ No newline at end of file
diff --git a/app/assets/javascripts/js/maps/jquery-jvectormap-2.0.3.min.js b/app/assets/javascripts/js/maps/jquery-jvectormap-2.0.3.min.js
deleted file mode 100755
index eafa898..0000000
--- a/app/assets/javascripts/js/maps/jquery-jvectormap-2.0.3.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function($){var apiParams={set:{colors:1,values:1,backgroundColor:1,scaleColors:1,normalizeFunction:1,focus:1},get:{selectedRegions:1,selectedMarkers:1,mapObject:1,regionName:1}};$.fn.vectorMap=function(options){var map,methodName,map=this.children(".jvectormap-container").data("mapObject");if("addMap"===options)jvm.Map.maps[arguments[1]]=arguments[2];else{if(("set"===options||"get"===options)&&apiParams[options][arguments[1]])return methodName=arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1),map[options+methodName].apply(map,Array.prototype.slice.call(arguments,2));options=options||{},options.container=this,map=new jvm.Map(options)}return this}}(jQuery),function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof exports?module.exports=factory:factory(jQuery)}(function($){function handler(event){var orgEvent=event||window.event,args=slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0;if(event=$.event.fix(orgEvent),event.type="mousewheel","detail"in orgEvent&&(deltaY=-1*orgEvent.detail),"wheelDelta"in orgEvent&&(deltaY=orgEvent.wheelDelta),"wheelDeltaY"in orgEvent&&(deltaY=orgEvent.wheelDeltaY),"wheelDeltaX"in orgEvent&&(deltaX=-1*orgEvent.wheelDeltaX),"axis"in orgEvent&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS&&(deltaX=-1*deltaY,deltaY=0),delta=0===deltaY?deltaX:deltaY,"deltaY"in orgEvent&&(deltaY=-1*orgEvent.deltaY,delta=deltaY),"deltaX"in orgEvent&&(deltaX=orgEvent.deltaX,0===deltaY&&(delta=-1*deltaX)),0!==deltaY||0!==deltaX){if(1===orgEvent.deltaMode){var lineHeight=$.data(this,"mousewheel-line-height");delta*=lineHeight,deltaY*=lineHeight,deltaX*=lineHeight}else if(2===orgEvent.deltaMode){var pageHeight=$.data(this,"mousewheel-page-height");delta*=pageHeight,deltaY*=pageHeight,deltaX*=pageHeight}return absDelta=Math.max(Math.abs(deltaY),Math.abs(deltaX)),(!lowestDelta||lowestDelta>absDelta)&&(lowestDelta=absDelta,shouldAdjustOldDeltas(orgEvent,absDelta)&&(lowestDelta/=40)),shouldAdjustOldDeltas(orgEvent,absDelta)&&(delta/=40,deltaX/=40,deltaY/=40),delta=Math[delta>=1?"floor":"ceil"](delta/lowestDelta),deltaX=Math[deltaX>=1?"floor":"ceil"](deltaX/lowestDelta),deltaY=Math[deltaY>=1?"floor":"ceil"](deltaY/lowestDelta),event.deltaX=deltaX,event.deltaY=deltaY,event.deltaFactor=lowestDelta,event.deltaMode=0,args.unshift(event,delta,deltaX,deltaY),nullLowestDeltaTimeout&&clearTimeout(nullLowestDeltaTimeout),nullLowestDeltaTimeout=setTimeout(nullLowestDelta,200),($.event.dispatch||$.event.handle).apply(this,args)}}function nullLowestDelta(){lowestDelta=null}function shouldAdjustOldDeltas(orgEvent,absDelta){return special.settings.adjustOldDeltas&&"mousewheel"===orgEvent.type&&absDelta%120===0}var nullLowestDeltaTimeout,lowestDelta,toFix=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],toBind="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],slice=Array.prototype.slice;if($.event.fixHooks)for(var i=toFix.length;i;)$.event.fixHooks[toFix[--i]]=$.event.mouseHooks;var special=$.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var i=toBind.length;i;)this.addEventListener(toBind[--i],handler,!1);else this.onmousewheel=handler;$.data(this,"mousewheel-line-height",special.getLineHeight(this)),$.data(this,"mousewheel-page-height",special.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=toBind.length;i;)this.removeEventListener(toBind[--i],handler,!1);else this.onmousewheel=null},getLineHeight:function(elem){return parseInt($(elem)["offsetParent"in $.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(elem){return $(elem).height()},settings:{adjustOldDeltas:!0}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn){return this.unbind("mousewheel",fn)}})});var jvm={inherits:function(child,parent){function temp(){}temp.prototype=parent.prototype,child.prototype=new temp,child.prototype.constructor=child,child.parentClass=parent},mixin:function(target,source){var prop;for(prop in source.prototype)source.prototype.hasOwnProperty(prop)&&(target.prototype[prop]=source.prototype[prop])},min:function(values){var i,min=Number.MAX_VALUE;if(values instanceof Array)for(i=0;imax&&(max=values[i]);else for(i in values)values[i]>max&&(max=values[i]);return max},keys:function(object){var key,keys=[];for(key in object)keys.push(key);return keys},values:function(object){var key,i,values=[];for(i=0;i");return img.error(function(){deferred.reject()}).load(function(){deferred.resolve(img)}),img.attr("src",url),deferred},isImageUrl:function(s){return/\.\w{3,4}$/.test(s)}};jvm.$=jQuery,Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(null==this)throw new TypeError('"this" is null or not defined');var O=Object(this),len=O.length>>>0;if(0===len)return-1;var n=+fromIndex||0;if(1/0===Math.abs(n)&&(n=0),n>=len)return-1;for(k=Math.max(n>=0?n:len-Math.abs(n),0);len>k;){if(k in O&&O[k]===searchElement)return k;k++}return-1}),jvm.AbstractElement=function(name,config){this.node=this.createElement(name),this.name=name,this.properties={},config&&this.set(config)},jvm.AbstractElement.prototype.set=function(property,value){var key;if("object"==typeof property)for(key in property)this.properties[key]=property[key],this.applyAttr(key,property[key]);else this.properties[property]=value,this.applyAttr(property,value)},jvm.AbstractElement.prototype.get=function(property){return this.properties[property]},jvm.AbstractElement.prototype.applyAttr=function(property,value){this.node.setAttribute(property,value)},jvm.AbstractElement.prototype.remove=function(){jvm.$(this.node).remove()},jvm.AbstractCanvasElement=function(container,width,height){this.container=container,this.setSize(width,height),this.rootElement=new jvm[this.classPrefix+"GroupElement"],this.node.appendChild(this.rootElement.node),this.container.appendChild(this.node)},jvm.AbstractCanvasElement.prototype.add=function(element,group){group=group||this.rootElement,group.add(element),element.canvas=this},jvm.AbstractCanvasElement.prototype.addPath=function(config,style,group){var el=new jvm[this.classPrefix+"PathElement"](config,style);return this.add(el,group),el},jvm.AbstractCanvasElement.prototype.addCircle=function(config,style,group){var el=new jvm[this.classPrefix+"CircleElement"](config,style);return this.add(el,group),el},jvm.AbstractCanvasElement.prototype.addImage=function(config,style,group){var el=new jvm[this.classPrefix+"ImageElement"](config,style);return this.add(el,group),el},jvm.AbstractCanvasElement.prototype.addText=function(config,style,group){var el=new jvm[this.classPrefix+"TextElement"](config,style);return this.add(el,group),el},jvm.AbstractCanvasElement.prototype.addGroup=function(parentGroup){var el=new jvm[this.classPrefix+"GroupElement"];return parentGroup?parentGroup.node.appendChild(el.node):this.node.appendChild(el.node),el.canvas=this,el},jvm.AbstractShapeElement=function(name,config,style){this.style=style||{},this.style.current=this.style.current||{},this.isHovered=!1,this.isSelected=!1,this.updateStyle()},jvm.AbstractShapeElement.prototype.setStyle=function(property,value){var styles={};"object"==typeof property?styles=property:styles[property]=value,jvm.$.extend(this.style.current,styles),this.updateStyle()},jvm.AbstractShapeElement.prototype.updateStyle=function(){var attrs={};jvm.AbstractShapeElement.mergeStyles(attrs,this.style.initial),jvm.AbstractShapeElement.mergeStyles(attrs,this.style.current),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(attrs,this.style.hover),this.isSelected&&(jvm.AbstractShapeElement.mergeStyles(attrs,this.style.selected),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(attrs,this.style.selectedHover)),this.set(attrs)},jvm.AbstractShapeElement.mergeStyles=function(styles,newStyles){var key;newStyles=newStyles||{};for(key in newStyles)null===newStyles[key]?delete styles[key]:styles[key]=newStyles[key]},jvm.SVGElement=function(){jvm.SVGElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.SVGElement,jvm.AbstractElement),jvm.SVGElement.svgns="http://www.w3.org/2000/svg",jvm.SVGElement.prototype.createElement=function(tagName){return document.createElementNS(jvm.SVGElement.svgns,tagName)},jvm.SVGElement.prototype.addClass=function(className){this.node.setAttribute("class",className)},jvm.SVGElement.prototype.getElementCtr=function(ctr){return jvm["SVG"+ctr]},jvm.SVGElement.prototype.getBBox=function(){return this.node.getBBox()},jvm.SVGGroupElement=function(){jvm.SVGGroupElement.parentClass.call(this,"g")},jvm.inherits(jvm.SVGGroupElement,jvm.SVGElement),jvm.SVGGroupElement.prototype.add=function(element){this.node.appendChild(element.node)},jvm.SVGCanvasElement=function(){this.classPrefix="SVG",jvm.SVGCanvasElement.parentClass.call(this,"svg"),this.defsElement=new jvm.SVGElement("defs"),this.node.appendChild(this.defsElement.node),jvm.AbstractCanvasElement.apply(this,arguments)},jvm.inherits(jvm.SVGCanvasElement,jvm.SVGElement),jvm.mixin(jvm.SVGCanvasElement,jvm.AbstractCanvasElement),jvm.SVGCanvasElement.prototype.setSize=function(width,height){this.width=width,this.height=height,this.node.setAttribute("width",width),this.node.setAttribute("height",height)},jvm.SVGCanvasElement.prototype.applyTransformParams=function(scale,transX,transY){this.scale=scale,this.transX=transX,this.transY=transY,this.rootElement.node.setAttribute("transform","scale("+scale+") translate("+transX+", "+transY+")")},jvm.SVGShapeElement=function(name,config){jvm.SVGShapeElement.parentClass.call(this,name,config),jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.SVGShapeElement,jvm.SVGElement),jvm.mixin(jvm.SVGShapeElement,jvm.AbstractShapeElement),jvm.SVGShapeElement.prototype.applyAttr=function(attr,value){var patternEl,imageEl,that=this;"fill"===attr&&jvm.isImageUrl(value)?jvm.SVGShapeElement.images[value]?this.applyAttr("fill","url(#image"+jvm.SVGShapeElement.images[value]+")"):jvm.whenImageLoaded(value).then(function(img){imageEl=new jvm.SVGElement("image"),imageEl.node.setAttributeNS("http://www.w3.org/1999/xlink","href",value),imageEl.applyAttr("x","0"),imageEl.applyAttr("y","0"),imageEl.applyAttr("width",img[0].width),imageEl.applyAttr("height",img[0].height),patternEl=new jvm.SVGElement("pattern"),patternEl.applyAttr("id","image"+jvm.SVGShapeElement.imageCounter),patternEl.applyAttr("x",0),patternEl.applyAttr("y",0),patternEl.applyAttr("width",img[0].width/2),patternEl.applyAttr("height",img[0].height/2),patternEl.applyAttr("viewBox","0 0 "+img[0].width+" "+img[0].height),patternEl.applyAttr("patternUnits","userSpaceOnUse"),patternEl.node.appendChild(imageEl.node),that.canvas.defsElement.node.appendChild(patternEl.node),jvm.SVGShapeElement.images[value]=jvm.SVGShapeElement.imageCounter++,that.applyAttr("fill","url(#image"+jvm.SVGShapeElement.images[value]+")")}):jvm.SVGShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)},jvm.SVGShapeElement.imageCounter=1,jvm.SVGShapeElement.images={},jvm.SVGPathElement=function(config,style){jvm.SVGPathElement.parentClass.call(this,"path",config,style),this.node.setAttribute("fill-rule","evenodd")},jvm.inherits(jvm.SVGPathElement,jvm.SVGShapeElement),jvm.SVGCircleElement=function(config,style){jvm.SVGCircleElement.parentClass.call(this,"circle",config,style)},jvm.inherits(jvm.SVGCircleElement,jvm.SVGShapeElement),jvm.SVGImageElement=function(config,style){jvm.SVGImageElement.parentClass.call(this,"image",config,style)},jvm.inherits(jvm.SVGImageElement,jvm.SVGShapeElement),jvm.SVGImageElement.prototype.applyAttr=function(attr,value){var that=this;"image"==attr?jvm.whenImageLoaded(value).then(function(img){that.node.setAttributeNS("http://www.w3.org/1999/xlink","href",value),that.width=img[0].width,that.height=img[0].height,that.applyAttr("width",that.width),that.applyAttr("height",that.height),that.applyAttr("x",that.cx-that.width/2),that.applyAttr("y",that.cy-that.height/2),jvm.$(that.node).trigger("imageloaded",[img])}):"cx"==attr?(this.cx=value,this.width&&this.applyAttr("x",value-this.width/2)):"cy"==attr?(this.cy=value,this.height&&this.applyAttr("y",value-this.height/2)):jvm.SVGImageElement.parentClass.prototype.applyAttr.apply(this,arguments)},jvm.SVGTextElement=function(config,style){jvm.SVGTextElement.parentClass.call(this,"text",config,style)},jvm.inherits(jvm.SVGTextElement,jvm.SVGShapeElement),jvm.SVGTextElement.prototype.applyAttr=function(attr,value){"text"===attr?this.node.textContent=value:jvm.SVGTextElement.parentClass.prototype.applyAttr.apply(this,arguments)},jvm.VMLElement=function(){jvm.VMLElement.VMLInitialized||jvm.VMLElement.initializeVML(),jvm.VMLElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.VMLElement,jvm.AbstractElement),jvm.VMLElement.VMLInitialized=!1,jvm.VMLElement.initializeVML=function(){try{document.namespaces.rvml||document.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),jvm.VMLElement.prototype.createElement=function(tagName){return document.createElement("')}}catch(e){jvm.VMLElement.prototype.createElement=function(tagName){return document.createElement("<"+tagName+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}document.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"),jvm.VMLElement.VMLInitialized=!0},jvm.VMLElement.prototype.getElementCtr=function(ctr){return jvm["VML"+ctr]},jvm.VMLElement.prototype.addClass=function(className){jvm.$(this.node).addClass(className)},jvm.VMLElement.prototype.applyAttr=function(attr,value){this.node[attr]=value},jvm.VMLElement.prototype.getBBox=function(){var node=jvm.$(this.node);return{x:node.position().left/this.canvas.scale,y:node.position().top/this.canvas.scale,width:node.width()/this.canvas.scale,height:node.height()/this.canvas.scale}},jvm.VMLGroupElement=function(){jvm.VMLGroupElement.parentClass.call(this,"group"),this.node.style.left="0px",this.node.style.top="0px",this.node.coordorigin="0 0"},jvm.inherits(jvm.VMLGroupElement,jvm.VMLElement),jvm.VMLGroupElement.prototype.add=function(element){this.node.appendChild(element.node)},jvm.VMLCanvasElement=function(){this.classPrefix="VML",jvm.VMLCanvasElement.parentClass.call(this,"group"),jvm.AbstractCanvasElement.apply(this,arguments),this.node.style.position="absolute"},jvm.inherits(jvm.VMLCanvasElement,jvm.VMLElement),jvm.mixin(jvm.VMLCanvasElement,jvm.AbstractCanvasElement),jvm.VMLCanvasElement.prototype.setSize=function(width,height){var paths,groups,i,l;if(this.width=width,this.height=height,this.node.style.width=width+"px",this.node.style.height=height+"px",this.node.coordsize=width+" "+height,this.node.coordorigin="0 0",this.rootElement){for(paths=this.rootElement.node.getElementsByTagName("shape"),i=0,l=paths.length;l>i;i++)paths[i].coordsize=width+" "+height,paths[i].style.width=width+"px",paths[i].style.height=height+"px";for(groups=this.node.getElementsByTagName("group"),i=0,l=groups.length;l>i;i++)groups[i].coordsize=width+" "+height,groups[i].style.width=width+"px",groups[i].style.height=height+"px"}},jvm.VMLCanvasElement.prototype.applyTransformParams=function(scale,transX,transY){this.scale=scale,this.transX=transX,this.transY=transY,this.rootElement.node.coordorigin=this.width-transX-this.width/100+","+(this.height-transY-this.height/100),this.rootElement.node.coordsize=this.width/scale+","+this.height/scale},jvm.VMLShapeElement=function(name,config){jvm.VMLShapeElement.parentClass.call(this,name,config),this.fillElement=new jvm.VMLElement("fill"),this.strokeElement=new jvm.VMLElement("stroke"),this.node.appendChild(this.fillElement.node),this.node.appendChild(this.strokeElement.node),this.node.stroked=!1,jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.VMLShapeElement,jvm.VMLElement),jvm.mixin(jvm.VMLShapeElement,jvm.AbstractShapeElement),jvm.VMLShapeElement.prototype.applyAttr=function(attr,value){switch(attr){case"fill":this.node.fillcolor=value;break;case"fill-opacity":this.fillElement.node.opacity=Math.round(100*value)+"%";break;case"stroke":this.node.stroked="none"===value?!1:!0,this.node.strokecolor=value;break;case"stroke-opacity":this.strokeElement.node.opacity=Math.round(100*value)+"%";break;case"stroke-width":this.node.stroked=0===parseInt(value,10)?!1:!0,this.node.strokeweight=value;break;case"d":this.node.path=jvm.VMLPathElement.pathSvgToVml(value);break;default:jvm.VMLShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)}},jvm.VMLPathElement=function(config,style){var scale=new jvm.VMLElement("skew");jvm.VMLPathElement.parentClass.call(this,"shape",config,style),this.node.coordorigin="0 0",scale.node.on=!0,scale.node.matrix="0.01,0,0,0.01,0,0",scale.node.offset="0,0",this.node.appendChild(scale.node)},jvm.inherits(jvm.VMLPathElement,jvm.VMLShapeElement),jvm.VMLPathElement.prototype.applyAttr=function(attr,value){"d"===attr?this.node.path=jvm.VMLPathElement.pathSvgToVml(value):jvm.VMLShapeElement.prototype.applyAttr.call(this,attr,value)},jvm.VMLPathElement.pathSvgToVml=function(path){var ctrlx,ctrly,cx=0,cy=0;return path=path.replace(/(-?\d+)e(-?\d+)/g,"0"),path.replace(/([MmLlHhVvCcSs])\s*((?:-?\d*(?:\.\d+)?\s*,?\s*)+)/g,function(segment,letter,coords){coords=coords.replace(/(\d)-/g,"$1,-").replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/\s+/g,",").split(","),coords[0]||coords.shift();for(var i=0,l=coords.length;l>i;i++)coords[i]=Math.round(100*coords[i]);switch(letter){case"m":return cx+=coords[0],cy+=coords[1],"t"+coords.join(",");case"M":return cx=coords[0],cy=coords[1],"m"+coords.join(",");case"l":return cx+=coords[0],cy+=coords[1],"r"+coords.join(",");case"L":return cx=coords[0],cy=coords[1],"l"+coords.join(",");case"h":return cx+=coords[0],"r"+coords[0]+",0";case"H":return cx=coords[0],"l"+cx+","+cy;case"v":return cy+=coords[0],"r0,"+coords[0];case"V":return cy=coords[0],"l"+cx+","+cy;case"c":return ctrlx=cx+coords[coords.length-4],ctrly=cy+coords[coords.length-3],cx+=coords[coords.length-2],cy+=coords[coords.length-1],"v"+coords.join(",");case"C":return ctrlx=coords[coords.length-4],ctrly=coords[coords.length-3],cx=coords[coords.length-2],cy=coords[coords.length-1],"c"+coords.join(",");case"s":return coords.unshift(cy-ctrly),coords.unshift(cx-ctrlx),ctrlx=cx+coords[coords.length-4],ctrly=cy+coords[coords.length-3],cx+=coords[coords.length-2],cy+=coords[coords.length-1],"v"+coords.join(",");case"S":return coords.unshift(cy+cy-ctrly),coords.unshift(cx+cx-ctrlx),ctrlx=coords[coords.length-4],ctrly=coords[coords.length-3],cx=coords[coords.length-2],cy=coords[coords.length-1],"c"+coords.join(",")}return""}).replace(/z/g,"e")},jvm.VMLCircleElement=function(config,style){jvm.VMLCircleElement.parentClass.call(this,"oval",config,style)},jvm.inherits(jvm.VMLCircleElement,jvm.VMLShapeElement),jvm.VMLCircleElement.prototype.applyAttr=function(attr,value){switch(attr){case"r":this.node.style.width=2*value+"px",this.node.style.height=2*value+"px",this.applyAttr("cx",this.get("cx")||0),this.applyAttr("cy",this.get("cy")||0);break;case"cx":if(!value)return;this.node.style.left=value-(this.get("r")||0)+"px";break;case"cy":if(!value)return;this.node.style.top=value-(this.get("r")||0)+"px";break;default:jvm.VMLCircleElement.parentClass.prototype.applyAttr.call(this,attr,value)}},jvm.VectorCanvas=function(container,width,height){return this.mode=window.SVGAngle?"svg":"vml",this.impl="svg"==this.mode?new jvm.SVGCanvasElement(container,width,height):new jvm.VMLCanvasElement(container,width,height),this.impl.mode=this.mode,this.impl},jvm.SimpleScale=function(scale){this.scale=scale},jvm.SimpleScale.prototype.getValue=function(value){return value},jvm.OrdinalScale=function(scale){this.scale=scale},jvm.OrdinalScale.prototype.getValue=function(value){return this.scale[value]},jvm.OrdinalScale.prototype.getTicks=function(){var key,ticks=[];for(key in this.scale)ticks.push({label:key,value:this.scale[key]});return ticks},jvm.NumericScale=function(scale,normalizeFunction,minValue,maxValue){this.scale=[],normalizeFunction=normalizeFunction||"linear",scale&&this.setScale(scale),normalizeFunction&&this.setNormalizeFunction(normalizeFunction),"undefined"!=typeof minValue&&this.setMin(minValue),"undefined"!=typeof maxValue&&this.setMax(maxValue)},jvm.NumericScale.prototype={setMin:function(min){this.clearMinValue=min,this.minValue="function"==typeof this.normalize?this.normalize(min):min},setMax:function(max){this.clearMaxValue=max,this.maxValue="function"==typeof this.normalize?this.normalize(max):max},setScale:function(scale){var i;for(this.scale=[],i=0;i=0;)value-=lengthes[i],i++;return value=this.vectorToNum(i==this.scale.length-1?this.scale[i]:this.vectorAdd(this.scale[i],this.vectorMult(this.vectorSubtract(this.scale[i+1],this.scale[i]),value/lengthes[i])))},vectorToNum:function(vector){var i,num=0;for(i=0;i=err?step*=10:.35>=err?step*=5:.75>=err&&(step*=2),extent[0]=Math.floor(extent[0]/step)*step,extent[1]=Math.ceil(extent[1]/step)*step,tick=extent[0];tick<=extent[1];)v=tick==extent[0]?this.clearMinValue:tick==extent[1]?this.clearMaxValue:tick,ticks.push({label:tick,value:this.getValue(v)}),tick+=step;return ticks}},jvm.ColorScale=function(){jvm.ColorScale.parentClass.apply(this,arguments)},jvm.inherits(jvm.ColorScale,jvm.NumericScale),jvm.ColorScale.prototype.setScale=function(scale){var i;for(i=0;i"),this.body.addClass("jvectormap-legend"),this.params.cssClass&&this.body.addClass(this.params.cssClass),params.vertical?this.map.legendCntVertical.append(this.body):this.map.legendCntHorizontal.append(this.body),this.render()},jvm.Legend.prototype.render=function(){var i,tick,sample,label,ticks=this.series.scale.getTicks(),inner=jvm.$("").addClass("jvectormap-legend-inner");for(this.body.html(""),this.params.title&&this.body.append(jvm.$("").addClass("jvectormap-legend-title").html(this.params.title)),this.body.append(inner),i=0;i").addClass("jvectormap-legend-tick"),sample=jvm.$("").addClass("jvectormap-legend-tick-sample"),this.series.params.attribute){case"fill":jvm.isImageUrl(ticks[i].value)?sample.css("background","url("+ticks[i].value+")"):sample.css("background",ticks[i].value);break;case"stroke":sample.css("background",ticks[i].value);break;case"image":sample.css("background","url("+ticks[i].value+") no-repeat center center");break;case"r":jvm.$("").css({"border-radius":ticks[i].value,border:this.map.params.markerStyle.initial["stroke-width"]+"px "+this.map.params.markerStyle.initial.stroke+" solid",width:2*ticks[i].value+"px",height:2*ticks[i].value+"px",background:this.map.params.markerStyle.initial.fill}).appendTo(sample)}tick.append(sample),label=ticks[i].label,this.params.labelRender&&(label=this.params.labelRender(label)),tick.append(jvm.$("
"+label+"
").addClass("jvectormap-legend-tick-text")),inner.append(tick)}inner.append(jvm.$("").css("clear","both"))},jvm.DataSeries=function(params,elements,map){var scaleConstructor;params=params||{},params.attribute=params.attribute||"fill",this.elements=elements,this.params=params,this.map=map,params.attributes&&this.setAttributes(params.attributes),jvm.$.isArray(params.scale)?(scaleConstructor="fill"===params.attribute||"stroke"===params.attribute?jvm.ColorScale:jvm.NumericScale,this.scale=new scaleConstructor(params.scale,params.normalizeFunction,params.min,params.max)):this.scale=params.scale?new jvm.OrdinalScale(params.scale):new jvm.SimpleScale(params.scale),this.values=params.values||{},this.setValues(this.values),this.params.legend&&(this.legend=new jvm.Legend($.extend({map:this.map,series:this},this.params.legend)))},jvm.DataSeries.prototype={setAttributes:function(key,attr){var code,attrs=key;if("string"==typeof key)this.elements[key]&&this.elements[key].setStyle(this.params.attribute,attr);else for(code in attrs)this.elements[code]&&this.elements[code].element.setStyle(this.params.attribute,attrs[code])},setValues:function(values){var val,cc,max=-Number.MAX_VALUE,min=Number.MAX_VALUE,attrs={};if(this.scale instanceof jvm.OrdinalScale||this.scale instanceof jvm.SimpleScale)for(cc in values)attrs[cc]=values[cc]?this.scale.getValue(values[cc]):this.elements[cc].element.style.initial[this.params.attribute];else{if("undefined"==typeof this.params.min||"undefined"==typeof this.params.max)for(cc in values)val=parseFloat(values[cc]),val>max&&(max=val),min>val&&(min=val);"undefined"==typeof this.params.min?(this.scale.setMin(min),this.params.min=min):this.scale.setMin(this.params.min),"undefined"==typeof this.params.max?(this.scale.setMax(max),this.params.max=max):this.scale.setMax(this.params.max);for(cc in values)"indexOf"!=cc&&(val=parseFloat(values[cc]),attrs[cc]=isNaN(val)?this.elements[cc].element.style.initial[this.params.attribute]:this.scale.getValue(val))}this.setAttributes(attrs),jvm.$.extend(this.values,values)},clear:function(){var key,attrs={};for(key in this.values)this.elements[key]&&(attrs[key]=this.elements[key].element.shape.style.initial[this.params.attribute]);this.setAttributes(attrs),this.values={}},setScale:function(scale){this.scale.setScale(scale),this.values&&this.setValues(this.values)},setNormalizeFunction:function(f){this.scale.setNormalizeFunction(f),this.values&&this.setValues(this.values)}},jvm.Proj={degRad:180/Math.PI,radDeg:Math.PI/180,radius:6381372,sgn:function(n){return n>0?1:0>n?-1:n},mill:function(lat,lng,c){return{x:this.radius*(lng-c)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*lat)*this.radDeg))/.8}},mill_inv:function(x,y,c){return{lat:(2.5*Math.atan(Math.exp(.8*y/this.radius))-5*Math.PI/8)*this.degRad,lng:(c*this.radDeg+x/this.radius)*this.degRad}},merc:function(lat,lng,c){return{x:this.radius*(lng-c)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+lat*Math.PI/360))}},merc_inv:function(x,y,c){return{lat:(2*Math.atan(Math.exp(y/this.radius))-Math.PI/2)*this.degRad,lng:(c*this.radDeg+x/this.radius)*this.degRad}},aea:function(lat,lng,c){var fi0=0,lambda0=c*this.radDeg,fi1=29.5*this.radDeg,fi2=45.5*this.radDeg,fi=lat*this.radDeg,lambda=lng*this.radDeg,n=(Math.sin(fi1)+Math.sin(fi2))/2,C=Math.cos(fi1)*Math.cos(fi1)+2*n*Math.sin(fi1),theta=n*(lambda-lambda0),ro=Math.sqrt(C-2*n*Math.sin(fi))/n,ro0=Math.sqrt(C-2*n*Math.sin(fi0))/n;return{x:ro*Math.sin(theta)*this.radius,y:-(ro0-ro*Math.cos(theta))*this.radius}},aea_inv:function(xCoord,yCoord,c){var x=xCoord/this.radius,y=yCoord/this.radius,fi0=0,lambda0=c*this.radDeg,fi1=29.5*this.radDeg,fi2=45.5*this.radDeg,n=(Math.sin(fi1)+Math.sin(fi2))/2,C=Math.cos(fi1)*Math.cos(fi1)+2*n*Math.sin(fi1),ro0=Math.sqrt(C-2*n*Math.sin(fi0))/n,ro=Math.sqrt(x*x+(ro0-y)*(ro0-y)),theta=Math.atan(x/(ro0-y));return{lat:Math.asin((C-ro*ro*n*n)/(2*n))*this.degRad,lng:(lambda0+theta/n)*this.degRad}},lcc:function(lat,lng,c){var fi0=0,lambda0=c*this.radDeg,lambda=lng*this.radDeg,fi1=33*this.radDeg,fi2=45*this.radDeg,fi=lat*this.radDeg,n=Math.log(Math.cos(fi1)*(1/Math.cos(fi2)))/Math.log(Math.tan(Math.PI/4+fi2/2)*(1/Math.tan(Math.PI/4+fi1/2))),F=Math.cos(fi1)*Math.pow(Math.tan(Math.PI/4+fi1/2),n)/n,ro=F*Math.pow(1/Math.tan(Math.PI/4+fi/2),n),ro0=F*Math.pow(1/Math.tan(Math.PI/4+fi0/2),n);return{x:ro*Math.sin(n*(lambda-lambda0))*this.radius,y:-(ro0-ro*Math.cos(n*(lambda-lambda0)))*this.radius}},lcc_inv:function(xCoord,yCoord,c){var x=xCoord/this.radius,y=yCoord/this.radius,fi0=0,lambda0=c*this.radDeg,fi1=33*this.radDeg,fi2=45*this.radDeg,n=Math.log(Math.cos(fi1)*(1/Math.cos(fi2)))/Math.log(Math.tan(Math.PI/4+fi2/2)*(1/Math.tan(Math.PI/4+fi1/2))),F=Math.cos(fi1)*Math.pow(Math.tan(Math.PI/4+fi1/2),n)/n,ro0=F*Math.pow(1/Math.tan(Math.PI/4+fi0/2),n),ro=this.sgn(n)*Math.sqrt(x*x+(ro0-y)*(ro0-y)),theta=Math.atan(x/(ro0-y));return{lat:(2*Math.atan(Math.pow(F/ro,1/n))-Math.PI/2)*this.degRad,lng:(lambda0+theta/n)*this.degRad}}},jvm.MapObject=function(){},jvm.MapObject.prototype.getLabelText=function(key){var text;return text=this.config.label?"function"==typeof this.config.label.render?this.config.label.render(key):key:null},jvm.MapObject.prototype.getLabelOffsets=function(key){var offsets;return this.config.label&&("function"==typeof this.config.label.offsets?offsets=this.config.label.offsets(key):"object"==typeof this.config.label.offsets&&(offsets=this.config.label.offsets[key])),offsets||[0,0]},jvm.MapObject.prototype.setHovered=function(isHovered){this.isHovered!==isHovered&&(this.isHovered=isHovered,this.shape.isHovered=isHovered,this.shape.updateStyle(),this.label&&(this.label.isHovered=isHovered,this.label.updateStyle()))},jvm.MapObject.prototype.setSelected=function(isSelected){this.isSelected!==isSelected&&(this.isSelected=isSelected,this.shape.isSelected=isSelected,this.shape.updateStyle(),this.label&&(this.label.isSelected=isSelected,this.label.updateStyle()),jvm.$(this.shape).trigger("selected",[isSelected]))},jvm.MapObject.prototype.setStyle=function(){this.shape.setStyle.apply(this.shape,arguments)},jvm.MapObject.prototype.remove=function(){this.shape.remove(),this.label&&this.label.remove()},jvm.Region=function(config){var bbox,text,offsets;this.config=config,this.map=this.config.map,this.shape=config.canvas.addPath({d:config.path,"data-code":config.code},config.style,config.canvas.rootElement),this.shape.addClass("jvectormap-region jvectormap-element"),bbox=this.shape.getBBox(),text=this.getLabelText(config.code),this.config.label&&text&&(offsets=this.getLabelOffsets(config.code),this.labelX=bbox.x+bbox.width/2+offsets[0],this.labelY=bbox.y+bbox.height/2+offsets[1],this.label=config.canvas.addText({text:text,"text-anchor":"middle","alignment-baseline":"central",x:this.labelX,y:this.labelY,"data-code":config.code},config.labelStyle,config.labelsGroup),this.label.addClass("jvectormap-region jvectormap-element"))
-},jvm.inherits(jvm.Region,jvm.MapObject),jvm.Region.prototype.updateLabelPosition=function(){this.label&&this.label.set({x:this.labelX*this.map.scale+this.map.transX*this.map.scale,y:this.labelY*this.map.scale+this.map.transY*this.map.scale})},jvm.Marker=function(config){var text;this.config=config,this.map=this.config.map,this.isImage=!!this.config.style.initial.image,this.createShape(),text=this.getLabelText(config.index),this.config.label&&text&&(this.offsets=this.getLabelOffsets(config.index),this.labelX=config.cx/this.map.scale-this.map.transX,this.labelY=config.cy/this.map.scale-this.map.transY,this.label=config.canvas.addText({text:text,"data-index":config.index,dy:"0.6ex",x:this.labelX,y:this.labelY},config.labelStyle,config.labelsGroup),this.label.addClass("jvectormap-marker jvectormap-element"))},jvm.inherits(jvm.Marker,jvm.MapObject),jvm.Marker.prototype.createShape=function(){var that=this;this.shape&&this.shape.remove(),this.shape=this.config.canvas[this.isImage?"addImage":"addCircle"]({"data-index":this.config.index,cx:this.config.cx,cy:this.config.cy},this.config.style,this.config.group),this.shape.addClass("jvectormap-marker jvectormap-element"),this.isImage&&jvm.$(this.shape.node).on("imageloaded",function(){that.updateLabelPosition()})},jvm.Marker.prototype.updateLabelPosition=function(){this.label&&this.label.set({x:this.labelX*this.map.scale+this.offsets[0]+this.map.transX*this.map.scale+5+(this.isImage?(this.shape.width||0)/2:this.shape.properties.r),y:this.labelY*this.map.scale+this.map.transY*this.map.scale+this.offsets[1]})},jvm.Marker.prototype.setStyle=function(property){var isImage;jvm.Marker.parentClass.prototype.setStyle.apply(this,arguments),"r"===property&&this.updateLabelPosition(),isImage=!!this.shape.get("image"),isImage!=this.isImage&&(this.isImage=isImage,this.config.style=jvm.$.extend(!0,{},this.shape.style),this.createShape())},jvm.Map=function(params){var e,map=this;if(this.params=jvm.$.extend(!0,{},jvm.Map.defaultParams,params),!jvm.Map.maps[this.params.map])throw new Error("Attempt to use map which was not loaded: "+this.params.map);this.mapData=jvm.Map.maps[this.params.map],this.markers={},this.regions={},this.regionsColors={},this.regionsData={},this.container=jvm.$("
\n',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b,c,d,e,f,g;if(null==document.querySelector(D.target))return!1;for(a=this.getElement(),d="translate3d("+this.progress+"%, 0, 0)",g=["webkitTransform","msTransform","transform"],e=0,f=g.length;f>e;e++)b=g[e],a.children[0].style[b]=d;return(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?c="99":(c=this.progress<10?"0":"",c+=0|this.progress),a.children[0].setAttribute("data-progress",""+c)),this.lastRenderedProgress=this.progress},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),P=window.XMLHttpRequest,O=window.XDomainRequest,N=window.WebSocket,w=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],f.push(null==a[d]&&"function"!=typeof e?a[d]=e:void 0)}catch(g){c=g}return f},A=[],j.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("ignore"),c=b.apply(null,a),A.shift(),c},j.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("track"),c=b.apply(null,a),A.shift(),c},J=function(a){var b;if(null==a&&(a="GET"),"track"===A[0])return"force";if(!A.length&&D.ajax){if("socket"===a&&D.ajax.trackWebSockets)return!0;if(b=a.toUpperCase(),$.call(D.ajax.trackMethods,b)>=0)return!0}return!1},k=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return J(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new P(b),a(c),c};try{w(window.XMLHttpRequest,P)}catch(d){}if(null!=O){window.XDomainRequest=function(){var b;return b=new O,a(b),b};try{w(window.XDomainRequest,O)}catch(d){}}if(null!=N&&D.ajax.trackWebSockets){window.WebSocket=function(a,b){var d;return d=null!=b?new N(a,b):new N(a),J("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d};try{w(window.WebSocket,N)}catch(d){}}}return Z(b,a),b}(h),R=null,y=function(){return null==R&&(R=new k),R},I=function(a){var b,c,d,e;for(e=D.ajax.ignoreURLs,c=0,d=e.length;d>c;c++)if(b=e[c],"string"==typeof b){if(-1!==a.indexOf(b))return!0}else if(b.test(a))return!0;return!1},y().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,I(g)?void 0:j.running||D.restartOnRequestAfter===!1&&"force"!==J(f)?void 0:(d=arguments,c=D.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,k;if(b="socket"===f?e.readyState<2:0<(h=e.readyState)&&4>h){for(j.restart(),i=j.sources,k=[],c=0,g=i.length;g>c;c++){if(K=i[c],K instanceof a){K.watch.apply(K,d);break}k.push(void 0)}return k}},c))}),a=function(){function a(){var a=this;this.elements=[],y().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d,e;return d=a.type,b=a.request,e=a.url,I(e)?void 0:(c="socket"===d?new n(b):new o(b),this.elements.push(c))},a}(),o=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return h.progress=a.lengthComputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2},!1),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100},!1);else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),n=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100},!1)}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},D.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=C(),b=setInterval(function(){var g;return g=C()-c-50,c=C(),e.push(g),e.length>D.eventLag.sampleCount&&e.shift(),a=q(e),++d>=D.eventLag.minSamples&&a=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/D.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,D.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+D.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),L=null,H=null,r=null,M=null,p=null,s=null,j.running=!1,z=function(){return D.restartOnPushState?j.restart():void 0},null!=window.history.pushState&&(T=window.history.pushState,window.history.pushState=function(){return z(),T.apply(window.history,arguments)}),null!=window.history.replaceState&&(W=window.history.replaceState,window.history.replaceState=function(){return z(),W.apply(window.history,arguments)}),l={ajax:a,elements:d,document:c,eventLag:f},(B=function(){var a,c,d,e,f,g,h,i;for(j.sources=L=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],D[a]!==!1&&L.push(new l[a](D[a]));for(i=null!=(h=D.extraSources)?h:[],d=0,f=i.length;f>d;d++)K=i[d],L.push(new K(D));return j.bar=r=new b,H=[],M=new m})(),j.stop=function(){return j.trigger("stop"),j.running=!1,r.destroy(),s=!0,null!=p&&("function"==typeof t&&t(p),p=null),B()},j.restart=function(){return j.trigger("restart"),j.stop(),j.start()},j.go=function(){var a;return j.running=!0,r.render(),a=C(),s=!1,p=G(function(b,c){var d,e,f,g,h,i,k,l,n,o,p,q,t,u,v,w;for(l=100-r.progress,e=p=0,f=!0,i=q=0,u=L.length;u>q;i=++q)for(K=L[i],o=null!=H[i]?H[i]:H[i]=[],h=null!=(w=K.elements)?w:[K],k=t=0,v=h.length;v>t;k=++t)g=h[k],n=null!=o[k]?o[k]:o[k]=new m(g),f&=n.done,n.done||(e++,p+=n.tick(b));return d=p/e,r.update(M.tick(b,d)),r.done()||f||s?(r.update(100),j.trigger("done"),setTimeout(function(){return r.finish(),j.running=!1,j.trigger("hide")},Math.max(D.ghostTime,Math.max(D.minTime-(C()-a),0)))):c()})},j.start=function(a){v(D,a),j.running=!0;try{r.render()}catch(b){i=b}return document.querySelector(".pace")?(j.trigger("start"),j.go()):setTimeout(j.start,50)},"function"==typeof define&&define.amd?define(function(){return j}):"object"==typeof exports?module.exports=j:D.startOnPageLoad&&j.start()}).call(this);
\ No newline at end of file
diff --git a/app/assets/javascripts/js/progressbar/bootstrap-progressbar.min.js b/app/assets/javascripts/js/progressbar/bootstrap-progressbar.min.js
deleted file mode 100755
index 7e2ccd3..0000000
--- a/app/assets/javascripts/js/progressbar/bootstrap-progressbar.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! bootstrap-progressbar v0.8.4 | Copyright (c) 2012-2014 Stephan Groß | MIT license | http://www.minddust.com */
-!function(t){"use strict";var e=function(n,a){this.$element=t(n),this.options=t.extend({},e.defaults,a)};e.defaults={transition_delay:300,refresh_speed:50,display_text:"none",use_percentage:!0,percent_format:function(t){return t+"%"},amount_format:function(t,e){return t+" / "+e},update:t.noop,done:t.noop,fail:t.noop},e.prototype.transition=function(){var n=this.$element,a=n.parent(),s=this.$back_text,r=this.$front_text,i=this.options,o=parseInt(n.attr("data-transitiongoal")),h=parseInt(n.attr("aria-valuemin"))||0,d=parseInt(n.attr("aria-valuemax"))||100,f=a.hasClass("vertical"),p=i.update&&"function"==typeof i.update?i.update:e.defaults.update,u=i.done&&"function"==typeof i.done?i.done:e.defaults.done,c=i.fail&&"function"==typeof i.fail?i.fail:e.defaults.fail;if(isNaN(o))return void c("data-transitiongoal not set");var l=Math.round(100*(o-h)/(d-h));if("center"===i.display_text&&!s&&!r){this.$back_text=s=t("").addClass("progressbar-back-text").prependTo(a),this.$front_text=r=t("").addClass("progressbar-front-text").prependTo(n);var g;f?(g=a.css("height"),s.css({height:g,"line-height":g}),r.css({height:g,"line-height":g}),t(window).resize(function(){g=a.css("height"),s.css({height:g,"line-height":g}),r.css({height:g,"line-height":g})})):(g=a.css("width"),r.css({width:g}),t(window).resize(function(){g=a.css("width"),r.css({width:g})}))}setTimeout(function(){var t,e,c,g,_;f?n.css("height",l+"%"):n.css("width",l+"%");var x=setInterval(function(){f?(c=n.height(),g=a.height()):(c=n.width(),g=a.width()),t=Math.round(100*c/g),e=Math.round(h+c/g*(d-h)),t>=l&&(t=l,e=o,u(n),clearInterval(x)),"none"!==i.display_text&&(_=i.use_percentage?i.percent_format(t):i.amount_format(e,d,h),"fill"===i.display_text?n.text(_):"center"===i.display_text&&(s.text(_),r.text(_))),n.attr("aria-valuenow",e),p(t,n)},i.refresh_speed)},i.transition_delay)};var n=t.fn.progressbar;t.fn.progressbar=function(n){return this.each(function(){var a=t(this),s=a.data("bs.progressbar"),r="object"==typeof n&&n;s||a.data("bs.progressbar",s=new e(this,r)),s.transition()})},t.fn.progressbar.Constructor=e,t.fn.progressbar.noConflict=function(){return t.fn.progressbar=n,this}}(window.jQuery);
\ No newline at end of file
diff --git a/app/assets/javascripts/js/skycons/skycons.min.js b/app/assets/javascripts/js/skycons/skycons.min.js
deleted file mode 100755
index fc6c5c7..0000000
--- a/app/assets/javascripts/js/skycons/skycons.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(t){"use strict";function n(t,n,i,e){t.beginPath(),t.arc(n,i,e,0,p,!1),t.fill()}function i(t,n,i,e,a){t.beginPath(),t.moveTo(n,i),t.lineTo(e,a),t.stroke()}function e(t,i,e,a,o,r,l,s){var h=Math.cos(i*p),c=Math.sin(i*p);s-=l,n(t,e-c*o,a+h*r+.5*s,l+(1-.5*h)*s)}function a(t,n,i,a,o,r,l,s){var h;for(h=5;h--;)e(t,n+h/5,i,a,o,r,l,s)}function o(t,n,i,e,o,r,l){n/=3e4;var s=.21*o,h=.12*o,c=.24*o,u=.28*o;t.fillStyle=l,a(t,n,i,e,s,h,c,u),t.globalCompositeOperation="destination-out",a(t,n,i,e,s,h,c-r,u-r),t.globalCompositeOperation="source-over"}function r(t,n,e,a,o,r,l){n/=12e4;var s,h,c,u,v=.25*o-.5*r,f=.32*o+.5*r,d=.5*o-.5*r;for(t.strokeStyle=l,t.lineWidth=r,t.lineCap="round",t.lineJoin="round",t.beginPath(),t.arc(e,a,v,0,p,!1),t.stroke(),s=8;s--;)h=(n+s/8)*p,c=Math.cos(h),u=Math.sin(h),i(t,e+c*f,a+u*f,e+c*d,a+u*d)}function l(t,n,i,e,a,o,r){n/=15e3;var l=.29*a-.5*o,s=.05*a,h=Math.cos(n*p),c=h*p/-16;t.strokeStyle=r,t.lineWidth=o,t.lineCap="round",t.lineJoin="round",i+=h*s,t.beginPath(),t.arc(i,e,l,c+p/8,c+7*p/8,!1),t.arc(i+Math.cos(c)*l*w,e+Math.sin(c)*l*w,l,c+5*p/8,c+3*p/8,!0),t.closePath(),t.stroke()}function s(t,n,i,e,a,o,r){n/=1350;var l,s,h,c,u=.16*a,v=11*p/12,f=7*p/12;for(t.fillStyle=r,l=4;l--;)s=(n+l/4)%1,h=i+(l-1.5)/1.5*(1===l||2===l?-1:1)*u,c=e+s*s*a,t.beginPath(),t.moveTo(h,c-1.5*o),t.arc(h,c,.75*o,v,f,!1),t.fill()}function h(t,n,e,a,o,r,l){n/=750;var s,h,c,u,v=.1875*o;for(t.strokeStyle=l,t.lineWidth=.5*r,t.lineCap="round",t.lineJoin="round",s=4;s--;)h=(n+s/4)%1,c=Math.floor(e+(s-1.5)/1.5*(1===s||2===s?-1:1)*v)+.5,u=a+h*o,i(t,c,u-1.5*r,c,u+1.5*r)}function c(t,n,e,a,o,r,l){n/=3e3;var s,h,c,u,v=.16*o,f=.75*r,d=n*p*.7,m=Math.cos(d)*f,g=Math.sin(d)*f,M=d+p/3,w=Math.cos(M)*f,C=Math.sin(M)*f,y=d+2*p/3,b=Math.cos(y)*f,k=Math.sin(y)*f;for(t.strokeStyle=l,t.lineWidth=.5*r,t.lineCap="round",t.lineJoin="round",s=4;s--;)h=(n+s/4)%1,c=e+Math.sin((h+s/4)*p)*v,u=a+h*o,i(t,c-m,u-g,c+m,u+g),i(t,c-w,u-C,c+w,u+C),i(t,c-b,u-k,c+b,u+k)}function u(t,n,i,e,o,r,l){n/=3e4;var s=.21*o,h=.06*o,c=.21*o,u=.28*o;t.fillStyle=l,a(t,n,i,e,s,h,c,u),t.globalCompositeOperation="destination-out",a(t,n,i,e,s,h,c-r,u-r),t.globalCompositeOperation="source-over"}function v(t,n,i,e,a,o,r){var l=a/8,s=l/3,h=2*s,c=n%1*p,u=Math.cos(c),v=Math.sin(c);t.fillStyle=r,t.strokeStyle=r,t.lineWidth=o,t.lineCap="round",t.lineJoin="round",t.beginPath(),t.arc(i,e,l,c,c+Math.PI,!1),t.arc(i-s*u,e-s*v,h,c+Math.PI,c,!1),t.arc(i+h*u,e+h*v,s,c+Math.PI,c,!0),t.globalCompositeOperation="destination-out",t.fill(),t.globalCompositeOperation="source-over",t.stroke()}function f(t,n,i,e,a,o,r,l,s){n/=2500;var h,c,u,f,d=C[r],m=(n+r-y[r].start)%l,g=(n+r-y[r].end)%l,M=(n+r)%l;if(t.strokeStyle=s,t.lineWidth=o,t.lineCap="round",t.lineJoin="round",1>m){if(t.beginPath(),m*=d.length/2-1,h=Math.floor(m),m-=h,h*=2,h+=2,t.moveTo(i+(d[h-2]*(1-m)+d[h]*m)*a,e+(d[h-1]*(1-m)+d[h+1]*m)*a),1>g){for(g*=d.length/2-1,c=Math.floor(g),g-=c,c*=2,c+=2,f=h;f!==c;f+=2)t.lineTo(i+d[f]*a,e+d[f+1]*a);t.lineTo(i+(d[c-2]*(1-g)+d[c]*g)*a,e+(d[c-1]*(1-g)+d[c+1]*g)*a)}else for(f=h;f!==d.length;f+=2)t.lineTo(i+d[f]*a,e+d[f+1]*a);t.stroke()}else if(1>g){for(t.beginPath(),g*=d.length/2-1,c=Math.floor(g),g-=c,c*=2,c+=2,t.moveTo(i+d[0]*a,e+d[1]*a),f=2;f!==c;f+=2)t.lineTo(i+d[f]*a,e+d[f+1]*a);t.lineTo(i+(d[c-2]*(1-g)+d[c]*g)*a,e+(d[c-1]*(1-g)+d[c+1]*g)*a),t.stroke()}1>M&&(M*=d.length/2-1,u=Math.floor(M),M-=u,u*=2,u+=2,v(t,n,i+(d[u-2]*(1-M)+d[u]*M)*a,e+(d[u-1]*(1-M)+d[u+1]*M)*a,a,o,s))}var d,m;!function(){var n=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame,i=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||t.msCancelAnimationFrame;n&&i?(d=function(t){function i(){e.value=n(i),t()}var e={value:null};return i(),e},m=function(t){i(t.value)}):(d=setInterval,m=clearInterval)}();var g=500,M=.08,p=2*Math.PI,w=2/Math.sqrt(2),C=[[-.75,-.18,-.7219,-.1527,-.6971,-.1225,-.6739,-.091,-.6516,-.0588,-.6298,-.0262,-.6083,.0065,-.5868,.0396,-.5643,.0731,-.5372,.1041,-.5033,.1259,-.4662,.1406,-.4275,.1493,-.3881,.153,-.3487,.1526,-.3095,.1488,-.2708,.1421,-.2319,.1342,-.1943,.1217,-.16,.1025,-.129,.0785,-.1012,.0509,-.0764,.0206,-.0547,-.012,-.0378,-.0472,-.0324,-.0857,-.0389,-.1241,-.0546,-.1599,-.0814,-.1876,-.1193,-.1964,-.1582,-.1935,-.1931,-.1769,-.2157,-.1453,-.229,-.1085,-.2327,-.0697,-.224,-.0317,-.2064,.0033,-.1853,.0362,-.1613,.0672,-.135,.0961,-.1051,.1213,-.0706,.1397,-.0332,.1512,.0053,.158,.0442,.1624,.0833,.1636,.1224,.1615,.1613,.1565,.1999,.15,.2378,.1402,.2749,.1279,.3118,.1147,.3487,.1015,.3858,.0892,.4236,.0787,.4621,.0715,.5012,.0702,.5398,.0766,.5768,.089,.6123,.1055,.6466,.1244,.6805,.144,.7147,.163,.75,.18],[-.75,0,-.7033,.0195,-.6569,.0399,-.6104,.06,-.5634,.0789,-.5155,.0954,-.4667,.1089,-.4174,.1206,-.3676,.1299,-.3174,.1365,-.2669,.1398,-.2162,.1391,-.1658,.1347,-.1157,.1271,-.0661,.1169,-.017,.1046,.0316,.0903,.0791,.0728,.1259,.0534,.1723,.0331,.2188,.0129,.2656,-.0064,.3122,-.0263,.3586,-.0466,.4052,-.0665,.4525,-.0847,.5007,-.1002,.5497,-.113,.5991,-.124,.6491,-.1325,.6994,-.138,.75,-.14]],y=[{start:.36,end:.11},{start:.56,end:.16}],b=function(t){this.list=[],this.interval=null,this.color=t&&t.color?t.color:"black",this.resizeClear=!(!t||!t.resizeClear)};b.CLEAR_DAY=function(t,n,i){var e=t.canvas.width,a=t.canvas.height,o=Math.min(e,a);r(t,n,.5*e,.5*a,o,o*M,i)},b.CLEAR_NIGHT=function(t,n,i){var e=t.canvas.width,a=t.canvas.height,o=Math.min(e,a);l(t,n,.5*e,.5*a,o,o*M,i)},b.PARTLY_CLOUDY_DAY=function(t,n,i){var e=t.canvas.width,a=t.canvas.height,l=Math.min(e,a);r(t,n,.625*e,.375*a,.75*l,l*M,i),o(t,n,.375*e,.625*a,.75*l,l*M,i)},b.PARTLY_CLOUDY_NIGHT=function(t,n,i){var e=t.canvas.width,a=t.canvas.height,r=Math.min(e,a);l(t,n,.667*e,.375*a,.75*r,r*M,i),o(t,n,.375*e,.625*a,.75*r,r*M,i)},b.CLOUDY=function(t,n,i){var e=t.canvas.width,a=t.canvas.height,r=Math.min(e,a);o(t,n,.5*e,.5*a,r,r*M,i)},b.RAIN=function(t,n,i){var e=t.canvas.width,a=t.canvas.height,r=Math.min(e,a);s(t,n,.5*e,.37*a,.9*r,r*M,i),o(t,n,.5*e,.37*a,.9*r,r*M,i)},b.SLEET=function(t,n,i){var e=t.canvas.width,a=t.canvas.height,r=Math.min(e,a);h(t,n,.5*e,.37*a,.9*r,r*M,i),o(t,n,.5*e,.37*a,.9*r,r*M,i)},b.SNOW=function(t,n,i){var e=t.canvas.width,a=t.canvas.height,r=Math.min(e,a);c(t,n,.5*e,.37*a,.9*r,r*M,i),o(t,n,.5*e,.37*a,.9*r,r*M,i)},b.WIND=function(t,n,i){var e=t.canvas.width,a=t.canvas.height,o=Math.min(e,a);f(t,n,.5*e,.5*a,o,o*M,0,2,i),f(t,n,.5*e,.5*a,o,o*M,1,2,i)},b.FOG=function(t,n,e){var a=t.canvas.width,o=t.canvas.height,r=Math.min(a,o),l=r*M;u(t,n,.5*a,.32*o,.75*r,l,e),n/=5e3;var s=Math.cos(n*p)*r*.02,h=Math.cos((n+.25)*p)*r*.02,c=Math.cos((n+.5)*p)*r*.02,v=Math.cos((n+.75)*p)*r*.02,f=.936*o,d=Math.floor(f-.5*l)+.5,m=Math.floor(f-2.5*l)+.5;t.strokeStyle=e,t.lineWidth=l,t.lineCap="round",t.lineJoin="round",i(t,s+.2*a+.5*l,d,h+.8*a-.5*l,d),i(t,c+.2*a+.5*l,m,v+.8*a-.5*l,m)},b.prototype={_determineDrawingFunction:function(t){return"string"==typeof t?(t=t.toUpperCase().replace(/-/g,"_"),b.hasOwnProperty(t)?b[t]:null):void 0},add:function(t,n){var i;"string"==typeof t&&(t=document.getElementById(t)),null!==t&&(n=this._determineDrawingFunction(n),"function"==typeof n&&(i={element:t,context:t.getContext("2d"),drawing:n},this.list.push(i),this.draw(i,g)))},set:function(t,n){var i;for("string"==typeof t&&(t=document.getElementById(t)),i=this.list.length;i--;)if(this.list[i].element===t)return this.list[i].drawing=this._determineDrawingFunction(n),void this.draw(this.list[i],g);this.add(t,n)},remove:function(t){var n;for("string"==typeof t&&(t=document.getElementById(t)),n=this.list.length;n--;)if(this.list[n].element===t)return void this.list.splice(n,1)},draw:function(t,n){var i=t.context.canvas;this.resizeClear?i.width=i.width:t.context.clearRect(0,0,i.width,i.height),t.drawing(t.context,n,this.color)},play:function(){var t=this;this.pause(),this.interval=d(function(){var n,i=Date.now();for(n=t.list.length;n--;)t.draw(t.list[n],i)},1e3/60)},pause:function(){this.interval&&(m(this.interval),this.interval=null)}},t.Skycons=b}(this);
diff --git a/app/assets/javascripts/peer.coffee b/app/assets/javascripts/peer.coffee
deleted file mode 100644
index 24f83d1..0000000
--- a/app/assets/javascripts/peer.coffee
+++ /dev/null
@@ -1,3 +0,0 @@
-# Place all the behaviors and hooks related to the matching controller here.
-# All this logic will automatically be available in application.js.
-# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/sample.coffee b/app/assets/javascripts/sample.coffee
deleted file mode 100644
index 24f83d1..0000000
--- a/app/assets/javascripts/sample.coffee
+++ /dev/null
@@ -1,3 +0,0 @@
-# Place all the behaviors and hooks related to the matching controller here.
-# All this logic will automatically be available in application.js.
-# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/volume.coffee b/app/assets/javascripts/volume.coffee
deleted file mode 100644
index 24f83d1..0000000
--- a/app/assets/javascripts/volume.coffee
+++ /dev/null
@@ -1,3 +0,0 @@
-# Place all the behaviors and hooks related to the matching controller here.
-# All this logic will automatically be available in application.js.
-# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/volumn.coffee b/app/assets/javascripts/volumn.coffee
deleted file mode 100644
index 24f83d1..0000000
--- a/app/assets/javascripts/volumn.coffee
+++ /dev/null
@@ -1,3 +0,0 @@
-# Place all the behaviors and hooks related to the matching controller here.
-# All this logic will automatically be available in application.js.
-# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/welcome.coffee b/app/assets/javascripts/welcome.coffee
deleted file mode 100644
index 24f83d1..0000000
--- a/app/assets/javascripts/welcome.coffee
+++ /dev/null
@@ -1,3 +0,0 @@
-# Place all the behaviors and hooks related to the matching controller here.
-# All this logic will automatically be available in application.js.
-# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index b79f29d..95cdbd8 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -1,39 +1,12 @@
-/*
- * This is a manifest file that'll be compiled into application, which will include all the files
- * listed below.
- *
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
- *
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
- * compiled file so the styles you add here take precedence over styles defined in any styles
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
- * file per style scope.
- ** * require fonts/css/font-awesome.min
-
- *
-
- */
-
-//Right Click Event
-@import "loading";
-@import "bootstrap-sprockets";
@import "bootstrap";
+@import "bootstrap-sprockets";
+@import "contextmenu";
@import "font-awesome";
-@import "css/animate.min";
-@import "css/custom";
-@import "css/icheck/flat/green";
-@import "css/floatexamples";
-@import "css/normalize";
-@import "css/ion.rangeSlider";
-@import "css/ion.rangeSlider.skinFlat";
-@import "css/colorpicker/bootstrap-colorpicker.min";
-@import "css/switchery/switchery.min";
-@import "pace";
+@import "loading";
-//DataTable
-@import "js/datatables/jquery.dataTables.min";
-@import "js/datatables/buttons.bootstrap.min";
-@import "js/datatables/responsive.bootstrap.min";
-@import "js/datatables/scroller.bootstrap.min";
-@import "js/datatables/fixedHeader.bootstrap.min";
+@import "gentelella/src/scss/custom";
+@import "gentelella/vendors/animate.css/animate.min";
+@import "gentelella/vendors/normalize-css/normalize";
+@import "gentelella/vendors/switchery/switchery";
+@import "gentelella/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min";
+@import "gentelella/vendors/datatables.net-responsive-bs/css/responsive.bootstrap.min";
diff --git a/app/assets/stylesheets/contextmenu.css b/app/assets/stylesheets/contextmenu.scss
similarity index 100%
rename from app/assets/stylesheets/contextmenu.css
rename to app/assets/stylesheets/contextmenu.scss
diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss
deleted file mode 100644
index f0ddc68..0000000
--- a/app/assets/stylesheets/home.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-// Place all the styles related to the home controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/peer.scss b/app/assets/stylesheets/peer.scss
deleted file mode 100644
index 89ca5e6..0000000
--- a/app/assets/stylesheets/peer.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-// Place all the styles related to the peer controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/sample.scss b/app/assets/stylesheets/sample.scss
deleted file mode 100644
index 29a15d2..0000000
--- a/app/assets/stylesheets/sample.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-// Place all the styles related to the sample controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/volume.scss b/app/assets/stylesheets/volume.scss
deleted file mode 100644
index 792229f..0000000
--- a/app/assets/stylesheets/volume.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-// Place all the styles related to the volume controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/volumn.scss b/app/assets/stylesheets/volumn.scss
deleted file mode 100644
index d55f622..0000000
--- a/app/assets/stylesheets/volumn.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-// Place all the styles related to the volumn controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/welcome.scss b/app/assets/stylesheets/welcome.scss
deleted file mode 100644
index 77ce11a..0000000
--- a/app/assets/stylesheets/welcome.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-// Place all the styles related to the welcome controller here.
-// They will automatically be included in application.css.
-// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/models/user.rb b/app/models/user.rb
index 654ae78..a0945e9 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -10,4 +10,4 @@ class User::ParameterSanitizer < Devise::ParameterSanitizer
super
permit(:sign_up, keys: [:username, :email])
end
-end
\ No newline at end of file
+end
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 7ba0bcf..26d6f5d 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -122,7 +122,6 @@
<%= yield %>
<%= render "partials/footer" %>
- <%= javascript_include_tag 'footermanifest', 'data-turbolinks-track' => false %>