text: harry.timeline=function(){"use strict";var e=function(e,t,n,i){var o,a,r,s,l,c=null,u=null,d=[],h=[],f=[],p={};e instanceof Array||(e=[e]),t*=1e3;for(o in e){var m={};for(l in e[o]){r=n(l),s=Math.floor(r.getTime()/t)*t,(null===c||c>s)&&(c=s),(null===u||s>u)&&(u=s);var g=parseFloat(e[o][l]);m[s]?m[s]+=g:m[s]=g}h.push(m)}for(a in h){var v={values:[],labels:[]};if(0==a)for(s=c,a=0;u>=s;s+=t,a++)f.push(i(new Date(s))),p[s]=a;for(s=c;u>=s;s+=t)v.values.push(null);v.labels=f,d.push(v)}for(o in h)for(s in h[o])a=p[s],d[o].values[a]=h[o][s];return d},t=function(e){var t=new Date(e);return isNaN(t)?/^(\d{4})\D(\d{2})\D(\d{2})(?:\D(\d{2}))?(?:\D(\d{2}))?(?:\D(\d{2}))?/.test(e)?new Date(RegExp.$1,RegExp.$2-1,RegExp.$3,RegExp.$4||0,RegExp.$5||0,RegExp.$6||0):(console.log("unable to parse date ",e," please setup a parser"),null):t},n=function(e){return e.toISOString().substr(5,5)},i=function(e){return e.toTimeString().substr(0,5)},o=function(e){return e.toTimeString().substr(0,8)};return{year:function(i,o,a){return e(i,1314e3,o||t,a||n)},month:function(i,o,a){return e(i,111600,o||t,a||n)},week:function(i,o,a){return e(i,604800,o||t,a||n)},day:function(i,o,a){return e(i,86400,o||t,a||n)},hour:function(n,o,a){return e(n,3600,o||t,a||i)},minute:function(n,i,a){return e(n,60,i||t,a||o)},second:function(n,i,a){return e(n,1,i||t,a||o)}}}();