!function(h){function s(t,e){this.init(t,e)}var c=h.each;h.extend(s.prototype,{init:function(t,e){this.options=t,this.chartOptions=e,this.columns=t.columns||this.rowsToColumns(t.rows)||[],this.columns.length?this.dataFound():(this.parseCSV(),this.parseTable(),this.parseGoogleSpreadsheet())},getColumnDistribution:function(){var t=this.chartOptions,e=t&&t.chart&&t.chart.type,s=[];c(t&&t.series||[],function(t){s.push((h.seriesTypes[t.type||e||"line"].prototype.pointArrayMap||[0]).length)}),this.valueCount={global:(h.seriesTypes[e||"line"].prototype.pointArrayMap||[0]).length,individual:s}},dataFound:function(){this.parseTypes(),this.findHeaderRow(),this.parsed(),this.complete()},parseCSV:function(){var n=this,o=this.options,t=o.csv,r=this.columns,a=o.startRow||0,l=o.endRow||Number.MAX_VALUE,u=o.startColumn||0,h=o.endColumn||Number.MAX_VALUE,p=0;t&&(t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(o.lineDelimiter||"\n"),c(t,function(t,e){var s=n.trim(t),i=0===s.indexOf("#");a<=e&&e<=l&&!i&&""!==s&&(s=t.split(o.itemDelimiter||","),c(s,function(t,e){u<=e&&e<=h&&(r[e-u]||(r[e-u]=[]),r[e-u][p]=t)}),p+=1)}),this.dataFound())},parseTable:function(){var s,t=this.options,e=t.table,i=this.columns,n=t.startRow||0,o=t.endRow||Number.MAX_VALUE,r=t.startColumn||0,a=t.endColumn||Number.MAX_VALUE;e&&("string"==typeof e&&(e=document.getElementById(e)),c(e.getElementsByTagName("tr"),function(t,e){s=0,n<=e&&e<=o&&c(t.childNodes,function(t){("TD"===t.tagName||"TH"===t.tagName)&&r<=s&&s<=a&&(i[s]||(i[s]=[]),i[s][e-n]=t.innerHTML,s+=1)})}),this.dataFound())},parseGoogleSpreadsheet:function(){var r,a,l=this,t=this.options,e=t.googleSpreadsheetKey,u=this.columns,h=t.startRow||0,p=t.endRow||Number.MAX_VALUE,c=t.startColumn||0,m=t.endColumn||Number.MAX_VALUE;e&&jQuery.getJSON("https://spreadsheets.google.com/feeds/cells/"+e+"/"+(t.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",function(t){var e,s,i=(t=t.feed.entry).length,n=0,o=0;for(s=0;s