text: /*! tauCharts - v0.1.13 - 2014-11-21
  * https://github.com/TargetProcess/tauCharts
  * Copyright (c) 2014 Taucraft Limited; Licensed Creative Commons */
  !function(a,b){if("function"==typeof define&&define.amd)define(["underscore","d3"],function(a,c){return b(a,c)});else if("object"==typeof module&&module.exports){{var c=require("underscore");require("d3")}module.exports=b(c)}else a.tauChart=b(a._,a.d3)}(this,function(a,b){var c,d,e;return function(a){function b(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(b,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(a,d.concat([b,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(c){if(b(r,c)){var d=r[c];delete r[c],t[c]=!0,m.apply(a,d)}if(!b(q,c)&&!b(t,c))throw new Error("No "+c);return q[c]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(c,d,e,f){var h,k,l,m,n,s,u=[],v=typeof e;if(f=f||c,"undefined"===v||"function"===v){for(d=!d.length&&e.length?["require","exports","module"]:d,n=0;n<d.length;n+=1)if(m=o(d[n],f),k=m.f,"require"===k)u[n]=p.require(c);else if("exports"===k)u[n]=p.exports(c),s=!0;else if("module"===k)h=u[n]=p.module(c);else if(b(q,k)||b(r,k)||b(t,k))u[n]=j(k);else{if(!m.p)throw new Error(c+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=e?e.apply(q[c],u):void 0,c&&(h&&h.exports!==a&&h.exports!==q[c]?q[c]=h.exports:l===a&&s||(q[c]=l))}else c&&(q[c]=e)},c=d=n=function(b,c,d,e,f){if("string"==typeof b)return p[b]?p[b](c):j(o(b,c).f);if(!b.splice){if(s=b,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(b=c,c=d,d=null):b=a}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(a,b,c,d):setTimeout(function(){m(a,b,c,d)},4),n},n.config=function(a){return n(a)},c._defined=q,e=function(a,c,d){c.splice||(d=c,c=[]),b(q,a)||b(r,a)||(r[a]=[a,c,d])},e.amd={jQuery:!0}}(),e("../node_modules/almond/almond",function(){}),e("utils/utils-dom",["exports"],function(c){var d={getScrollbarWidth:function(){var a=document.createElement("div");a.style.overflow="scroll",a.style.visibility="hidden",a.style.position="absolute",a.style.width="100px",a.style.height="100px",document.body.appendChild(a);var b=a.offsetWidth-a.clientWidth;return document.body.removeChild(a),b},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getContainerSize:function(a){var b=parseInt(this.getStyle(a,"padding-left")||0,10),c=parseInt(this.getStyle(a,"padding-right")||0,10),d=parseInt(this.getStyle(a,"padding-bottom")||0,10),e=parseInt(this.getStyle(a,"padding-top")||0,10),f=parseInt(this.getStyle(a,"border-width")||0,10),g=a.getBoundingClientRect();return{width:g.width-b-c-2*f,height:g.height-d-e-2*f}},getAxisTickLabelSize:function(c){var d=['<svg class="graphical-report__svg">','<g class="graphical-report__cell cell">','<g class="x axis">','<g class="tick"><text><%= xTick %></text></g>',"</g>","</g>","</svg>"].join(""),e=a.template(d),f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.width="100px",f.style.height="100px",f.style.border="1px solid green",document.body.appendChild(f),f.innerHTML=e({xTick:c});var g=b.select(f).selectAll(".x.axis .tick text")[0][0],h={width:g.clientWidth||g.scrollWidth,height:g.clientHeight||g.scrollHeight};return document.body.removeChild(f),h}};c.utilsDom=d}),e("dsl-reader",["exports"],function(b){var c=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},d=function(){var b=function(a,b){this.domain=a,this.UnitsRegistry=b};return c(b,null,{buildGraph:{writable:!0,value:function(a){var b=this,c=function(a){return b.UnitsRegistry.get(a.type).walk(b.domain.mix(a),c)};return c(a.unit)}},calcLayout:{writable:!0,value:function(b,c){b.options={top:0,left:0,width:c.width,height:c.height};var d=function(b){if(!b.$matrix)return b;var c,e=b.options,f=b.guide.padding,g=e.width-(f.l+f.r),h=e.height-(f.t+f.b),i=b.$matrix.sizeR(),j=b.$matrix.sizeC(),k=g/j,l=h/i;return c=b.guide.split?{calcHeight:function(a,b,c,d){return a/d},calcTop:function(a,b,c,d){return(b+1)*(a/d)*c}}:{calcHeight:function(a){return a},calcTop:function(a,b){return b*l}},b.$matrix.iterate(function(b,e,f){var g=f.length;a.each(f,function(a,f){a.options={width:k,left:e*k,height:c.calcHeight(l,b,f,g),top:c.calcTop(l,b,f,g)},d(a)})}),b};return d(b)}},renderGraph:{writable:!0,value:function(a,b){var c=this;a.options.container=b;var d=function(a){return c.UnitsRegistry.get(a.type).draw(c.domain.mix(a),d)};return d(a),a.options.container}}}),b}();b.DSLReader=d}),e("utils/utils",["exports"],function(a){var b={clone:function(a){return JSON.parse(JSON.stringify(a))},isArray:function(a){return Array.isArray(a)},autoScale:function(a){var b=10,c=Math.min.apply(null,a),d=Math.max.apply(null,a);if(c===d){var e=d>=0?-1:1,f=d||1;d-=e*f/b}for(var g=[c,d],h=g[1]-g[0],i=Math.pow(10,Math.floor(Math.log(h/b)/Math.LN10)),j=b/h*i,k=[[.15,10],[.35,5],[.75,2],[1,1]],l=-1;j>k[++l][0];);i*=k[l][1],g[0]=Math.floor(g[0]/i)*i,g[1]=Math.ceil(g[1]/i)*i;var m=c-g[0],n=g[1]-d,o=i/2;if(c>=0)g[0]=0;else{var p=o>=m?i:0;g[0]=g[0]-p}if(0>=d)g[1]=0;else{var q=o>=n?i:0;g[1]=g[1]+q}return[parseFloat(g[0].toFixed(15)),parseFloat(g[1].toFixed(15))]}};a.utils=b}),e("formatter-registry",["exports","d3"],function(b,c){var d=c,e={"x-num-auto":function(a){return Math.abs(a)<1?a.toString():d.format("s")(a)},day:d.time.format("%d-%b-%Y"),week:d.time.format("%d-%b-%Y"),"week-range":function(a){var b=new Date(a),c=new Date(a),e=new Date(c.setDate(c.getDate()+7)),f=d.time.format("%d-%b-%Y");return f(b)+" - "+f(e)},month:function(a){var b=new Date(a),c=b.getMonth(),e=0===c?"%B, %Y":"%B";return d.time.format(e)(a)},"month-year":d.time.format("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},year:d.time.format("%Y"),"x-time-auto":d.time.format.multi([[".%L",function(a){return a.getMilliseconds()}],[":%S",function(a){return a.getSeconds()}],["%I:%M",function(a){return a.getMinutes()}],["%I %p",function(a){return a.getHours()}],["%a %d",function(a){return a.getDay()&&1!=a.getDate()}],["%b %d",function(a){return 1!=a.getDate()}],["%B",function(a){return a.getMonth()}],["%Y",function(){return!0}]])};e["x-time-ms"]=e["x-time-auto"],e["x-time-sec"]=e["x-time-auto"],e["x-time-min"]=e["x-time-auto"],e["x-time-hour"]=e["x-time-auto"],e["x-time-day"]=e.day,e["x-time-week"]=e.week,e["x-time-month"]=e.month,e["x-time-quarter"]=e.quarter,e["x-time-year"]=e.year;var f={get:function(b){var c=null===b?function(a){return a.toString()}:e[b];return c||(c=function(c){var e=a.isDate(c)?d.time.format(b):d.format(b);return e(c)}),c},add:function(a,b){e[a]=b}};b.FormatterRegistry=f}),e("utils/utils-draw",["exports","../utils/utils","../formatter-registry"],function(c,d,e){var f=d.utils,g=e.FormatterRegistry,h=function(a,b){return"translate("+a+","+b+")"},i=function(a){return"rotate("+a+")"},j=function(b){return a.contains(["bottom","top"],b.toLowerCase())?"h":"v"},k=function(a,c){a.each(function(){var a=b.select(this),d=a.text().split(/\s+/).reverse();a.text(null);for(var e,f=[],g=!1;!g&&(e=d.pop());)if(f.push(e),a.text(f.join(" ")),a.node().getComputedTextLength()>c){f.pop();var h=f.join(" ");h+="...",a.text(h),g=!0}})},l=function(a,c,d,e,f){var g=function(a,b,c,d,e,f,g){var h=g*c+f,i=a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b);return i};a.each(function(){var a=b.select(this),h=a.text().split(/\s+/),i=1.1,j=a.attr("x"),k=a.attr("y"),l=parseFloat(a.attr("dy"));a.text(null);var m=g(a,null,i,j,k,l,0),n=!1,o=h.reduce(function(a,b){if(n)return a;var e=a.length===d,f=a[a.length-1],g=m.text(f+b).node().getComputedTextLength()>c;return g&&e&&(a[a.length-1]=f+"...",n=!0),g&&!e&&a.push(b),g||(a[a.length-1]=f+" "+b),a},[""]);k=f?-1*(o.length-1)*Math.floor(.5*e):k,o.forEach(function(b,c){return g(a,b,i,j,k,l,c)}),m.remove()})},m=function(a,b,c){var d=a.selectAll(".tick line"),e=c/d[0].length,f=e/2;if("ordinal"===b.scaleType||"period"===b.scaleType){var g="h"===j(b.guide.scaleOrient),h=g?"x":"y",i=g?f:-f;d.attr(h+"1",i).attr(h+"2",i)}},n=function(a,b){var c="h"===j(b.guide.scaleOrient)?1:-1,d=a.append("text").attr("transform",i(b.guide.label.rotate)).attr("class","label").attr("x",c*b.guide.size*.5).attr("y",c*b.guide.label.padding).style("text-anchor",b.guide.label.textAnchor),e=" > ",f=b.guide.label.text.split(e),g=f.length;f.forEach(function(a,b){d.append("tspan").attr("class","label-token label-token-"+b).text(a),g-1>b&&d.append("tspan").attr("class","label-token-delimiter label-token-delimiter-"+b).text(e)})},o=function(a,b){var c="h"===j(b.guide.scaleOrient),d=b.guide.rotate,e=a.selectAll(".tick text");e.attr("transform",i(d)).style("text-anchor",b.guide.textAnchor),90===d&&e.attr("x",9).attr("y",0),b.guide.tickFormatWordWrap?e.call(l,b.guide.tickFormatWordWrapLimit,b.guide.tickFormatWordWrapLines,b.guide.$maxTickTextH,!c):e.call(k,b.guide.tickFormatWordWrapLimit)},p=function(a,c,d){var e=this;if(a.scaleDim){var f=b.svg.axis().scale(a.scaleObj).orient(a.guide.scaleOrient).ticks(Math.round(d/a.guide.density));f.tickFormat(g.get(a.guide.tickFormat));var i=e.append("g").attr("class",a.guide.cssClass).attr("transform",h.apply(null,c)).call(f);m(i,a,d),o(i,a),n(i,a)}},q=function(a,c,d){var e=this,f=e.append("g").attr("class","grid").attr("transform",h(0,0)),g=(a.guide.showGridLines||"").toLowerCase();if(g.length>0){var i=f.append("g").attr("class","grid-lines");if(g.indexOf("x")>-1&&a.x.scaleDim){var j=a.x,k=b.svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(c).ticks(Math.round(d/j.guide.density)),l=i.append("g").attr("class","grid-lines-x").call(k);m(l,j,d);var n=l.select("g.tick");if("translate(0,0)"!==n.attr("transform")){var o=n.node().cloneNode(!0);i.node().appendChild(o),b.select(o).attr("class","border").attr("transform",h(0,0)).select("line").attr("x1",0).attr("x2",0)}}if(g.indexOf("y")>-1&&a.y.scaleDim){var p=a.y,q=b.svg.axis().scale(p.scaleObj).orient(p.guide.scaleOrient).tickSize(-d).ticks(Math.round(c/p.guide.density)),r=i.append("g").attr("class","grid-lines-y").call(q);m(r,p,c)}i.selectAll("text").remove()}return f},r=function(c){var d,e,g=a.times(10,function(a){return"color10-"+(1+a)}),h=c.guide.color||{},i=c.color,j=i.scaleDim,k=h.brewer||g;return f.isArray(k)?(e=c.domain(j),d=k):(e=Object.keys(k),d=e.map(function(a){return k[a]})),{get:function(a){return b.scale.ordinal().range(d).domain(e)(a)},dimension:j}},s=function(b){return b.options=b.options||{},b.guide=b.guide||{},b.guide.padding=a.defaults(b.guide.padding||{},{l:0,b:0,r:0,t:0}),b.guide.x=a.defaults(b.guide.x||{},{label:"",padding:0,density:30,cssClass:"x axis",scaleOrient:"bottom",rotate:0,textAnchor:"middle",tickPeriod:null,tickFormat:null,autoScale:!0}),b.guide.x.label=a.isObject(b.guide.x.label)?b.guide.x.label:{text:b.guide.x.label},b.guide.x.label=a.defaults(b.guide.x.label,{padding:32,rotate:0,textAnchor:"middle"}),b.guide.x.tickFormat=b.guide.x.tickFormat||b.guide.x.tickPeriod,b.guide.y=a.defaults(b.guide.y||{},{label:"",padding:0,density:30,cssClass:"y axis",scaleOrient:"left",rotate:0,textAnchor:"end",tickPeriod:null,tickFormat:null,autoScale:!0}),b.guide.y.label=a.isObject(b.guide.y.label)?b.guide.y.label:{text:b.guide.y.label},b.guide.y.label=a.defaults(b.guide.y.label,{padding:32,rotate:-90,textAnchor:"middle"}),b.guide.y.tickFormat=b.guide.y.tickFormat||b.guide.y.tickPeriod,b},t={translate:h,rotate:i,getOrientation:j,fnDrawDimAxis:p,fnDrawGrid:q,generateColor:r,applyNodeDefaults:s};c.utilsDraw=t}),e("spec-engine-factory",["exports","./utils/utils","./utils/utils-draw","./formatter-registry"],function(b,c,d,e){var f=c.utils,g=d.utilsDraw,h=e.FormatterRegistry,i=function(b,c){return b.guide=b.guide||{},b.guide.padding=b.guide.padding||{l:0,t:0,r:0,b:0},b=a.defaults(b,c),b.guide=a.defaults(b.guide,c.guide),b},j=function(a){var b=a.unit||[],c=!a.hasOwnProperty("unit"),d=!b.some(function(a){return a.hasOwnProperty("unit")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},k=function(a,b,c){var d=a.dimType,e=a.scaleType,f="*";if("measure"===d&&"time"===e){var g=b.source.filter(function(a){return null!==a}).sort(),h=0;if(g.length>1){for(var i=1,j=g.length,k=[];j>i;)k.push(g[i]-g[i-1]),++i;var l=k.reduce(function(a,b){return a+=b},0);h=l/k.length}var m=[[31536e6,"year"],[7776e6,"quarter"],[2592e6,"month"],[6048e5,"week"],[864e5,"day"],[36e5,"hour"],[6e4,"min"],[1e3,"sec"],[0,"ms"]],n=-1;do++n;while(m[n][0]>h);f=m[n][1]}var o=[d,e,f].join(":"),p=[d,e].join(":");return c[o]||c[p]||c[d]||null},l=function(b,c){var d=g.applyNodeDefaults(b),e=c(j(d),d),f=a.omit(e,"unit");return(e.unit||[]).forEach(function(a){return l(i(a,f),c)}),e},m={NONE:function(){return function(a,b){return b}},AUTO:function(b,c,d){var e=[],f=[],g=null,i=null;return l(b.unit,function(a,b){if(a.isLeaf)return b;!g&&b.x&&(g=b),!i&&b.y&&(i=b),b.x&&(b.guide.x.label.text=b.guide.x.label.text||b.x),b.y&&(b.guide.y.label.text=b.guide.y.label.text||b.y);var c=b.guide.x.label.text;c&&(e.push(c),b.guide.x.label.text="");var d=b.guide.y.label.text;return d&&(f.push(d),b.guide.y.label.text=""),b}),g&&(g.guide.x.label.text=e.join(" > ")),i&&(i.guide.y.label.text=f.join(" > ")),function(b,e){if(b.isLeaf)return e;var f=!b.isLeaf&&!b.isLeafParent;f&&(e.guide.x.cssClass+=" facet-axis",e.guide.y.cssClass+=" facet-axis");var g=c.dimension(e.x),i=c.dimension(e.y),j={map:e.guide.x.tickLabel,min:e.guide.x.tickMin,max:e.guide.x.tickMax,period:e.guide.x.tickPeriod,autoScale:e.guide.x.autoScale},l={map:e.guide.y.tickLabel,min:e.guide.y.tickMin,max:e.guide.y.tickMax,period:e.guide.y.tickPeriod,autoScale:e.guide.y.autoScale},m=c.scaleMeta(e.x,j),n=m.values,o=c.scaleMeta(e.y,l),p=o.values;e.guide.x.tickFormat=e.guide.x.tickFormat||k(g,m,d.defaultFormats),e.guide.y.tickFormat=e.guide.y.tickFormat||k(i,o,d.defaultFormats);var q=0===n.length,r=0===p.length,s=b.isLeafParent?d.xAxisPadding:0,t=b.isLeafParent?d.yAxisPadding:0,u=!f&&!!g.dimType&&"measure"!==g.dimType;e.guide.x.padding=q?0:s,e.guide.y.padding=r?0:t,e.guide.x.rotate=u?90:0,e.guide.x.textAnchor=u?"start":e.guide.x.textAnchor;var v=h.get(e.guide.x.tickFormat),w=h.get(e.guide.y.tickFormat),x=q?"":a.max(n,function(a){return v(a||"").toString().length}),y=r?"":a.max(p,function(a){return w(a||"").toString().length}),z=q?0:d.xTickWidth,A=r?0:d.yTickWidth,B={width:0,height:0};e.guide.x.tickFormatWordWrapLimit=d.xAxisTickLabelLimit,e.guide.y.tickFormatWordWrapLimit=d.yAxisTickLabelLimit;var C=q?B:d.getAxisTickLabelSize(v(x)),D=u?C.width:C.height;"measure"!==g.dimType&&D>d.xAxisTickLabelLimit&&(D=d.xAxisTickLabelLimit),!u&&C.width>d.xAxisTickLabelLimit&&(e.guide.x.tickFormatWordWrap=!0,e.guide.x.tickFormatWordWrapLines=d.xTickWordWrapLinesLimit,D=d.xTickWordWrapLinesLimit*C.height);var E=r?B:d.getAxisTickLabelSize(w(y)),F=E.width;"measure"!==i.dimType&&F>d.yAxisTickLabelLimit&&(F=d.yAxisTickLabelLimit,e.guide.y.tickFormatWordWrap=!0,e.guide.y.tickFormatWordWrapLines=d.yTickWordWrapLinesLimit);var G=z+D,H=A+F,I=d.xFontLabelHeight,J=d.yFontLabelHeight,K=d.distToXAxisLabel,L=d.distToYAxisLabel,M=Math.min(d.xAxisTickLabelLimit,u?C.height:C.width);e.guide.x.density=d.xDensityKoeff*M;var N=Math.ceil(E.width/d.yAxisTickLabelLimit),O=Math.min(N,d.yTickWordWrapLinesLimit),P=Math.min(d.yAxisTickLabelLimit,O*E.height);e.guide.y.density=d.yDensityKoeff*P,e.guide.x.label.padding=e.guide.x.label.text?G+K:0,e.guide.y.label.padding=e.guide.y.label.text?H+L:0;var Q=e.guide.x.label.text?e.guide.x.label.padding+I:G,R=e.guide.y.label.text?e.guide.y.label.padding+J:H;return e.guide.x.label.text=e.guide.x.label.text.toUpperCase(),e.guide.y.label.text=e.guide.y.label.text.toUpperCase(),e.guide.padding.b=s+Q,e.guide.padding.l=t+R,e.guide.x.$minimalDomain=n.length,e.guide.y.$minimalDomain=p.length,e.guide.x.$maxTickTextW=C.width,e.guide.x.$maxTickTextH=C.height,e.guide.y.$maxTickTextW=E.width,e.guide.y.$maxTickTextH=E.height,e}}},n={get:function(a,b){var c=m[a]||m.NONE;return function(a,d){var e=f.clone(a);return l(e.unit,c(e,d,b)),e}}};b.SpecEngineFactory=n}),e("matrix",["exports"],function(b){var c=function(){var b=function(b,c){var d,e=a.toArray(arguments);d=a.isArray(e[0])?e[0]:a.times(b,function(){return a.times(c,function(){return null})}),this.cube=d};return b.prototype={iterate:function(b){var c=this.cube;return a.each(c,function(c,d){a.each(c,function(a,c){b(d,c,a)})}),this},getRC:function(a,b){return this.cube[a][b]},setRC:function(a,b,c){return this.cube[a][b]=c,this},sizeR:function(){return this.cube.length},sizeC:function(){var a=this.cube[0]||[];return a.length}},b}();b.TMatrix=c}),e("layout-engine-factory",["exports","./utils/utils","./utils/utils-draw","./matrix"],function(a,b,c,d){var e=b.utils,f=c.utilsDraw,g=d.TMatrix,h=function(a,b){var c=b?b:{depth:-1,paddings:[]},d=(a.guide||{}).padding||{l:0,b:0,r:0,t:0};return c.depth+=1,c.paddings.unshift({l:d.l,b:d.b,r:d.r,t:d.t}),a.unit&&a.unit.length&&h(a.unit[0],c),c},i={NONE:function(a){return a},EXTRACT:function(a){var b=function(a,c,d){var e=a,f=e.sizeR(),h=e.sizeC();e.iterate(function(a,e,i){i.forEach(function(b){return d(b,{firstRow:0===a,firstCol:0===e,lastRow:a===f-1,lastCol:e===h-1,depth:c})}),i.filter(function(a){return a.$matrix}).forEach(function(a){a.$matrix=new g(a.$matrix.cube),b(a.$matrix,c-1,d)})})},c=e.clone(a),d=new g([[[c]]]),i=h(c),j=i.paddings.reduce(function(a,b){return a.l+=b.l,a.b+=b.b,a},{l:0,b:0}),k=e.clone(j),l=i.paddings.reverse().map(function(a){return a.l=k.l-a.l,a.b=k.b-a.b,k={l:a.l,b:a.b},a});i.paddings=l.reverse();var m=10,n=f.applyNodeDefaults({type:"COORDS.RECT",options:e.clone(a.options),$matrix:new g([[[c]]]),guide:{padding:{l:j.l-m,b:j.b-m,r:0,t:0}}});return b(d,i.depth,function(a,b){var c=b.depth;a.guide.x.hide=!b.lastRow,a.guide.y.hide=!b.firstCol;var d=c>1?0:m,e=c>1?m:0;return a.guide.x.padding+=i.paddings[c].b,a.guide.y.padding+=i.paddings[c].l,a.guide.x.padding-=e,a.guide.y.padding-=e,a.guide.padding.l=d,a.guide.padding.b=d,a.guide.padding.r=d,a.guide.padding.t=d,a.guide.showGridLines=c>1?"":"xy",a}),n}},j={get:function(a){return i[a]||i.NONE}};a.LayoutEngineFactory=j}),e("plugins",["exports"],function(a){{var c=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},d=function(){var a=function(a){this._plugins=a};return c(a,null,{_call:{writable:!0,value:function(a,b){for(var c=0;c<this._plugins.length;c++)"function"==typeof this._plugins[c][a]&&this._plugins[c][a].apply(this._plugins[c],b)}},render:{writable:!0,value:function(){this._call("render",arguments)}},click:{writable:!0,value:function(){this._call("click",arguments)}},mouseover:{writable:!0,value:function(){this._call("mouseover",arguments)}},mouseout:{writable:!0,value:function(){this._call("mouseout",arguments)}},mousemove:{writable:!0,value:function(){this._call("mousemove",arguments)}}}),a}(),e=function(a){return function(){this.on("click",function(c){a.click(new g(c),new f(b.select(this)))}).on("mouseover",function(c){a.mouseover(new g(c),new f(b.select(this)))}).on("mouseout",function(c){a.mouseout(new g(c),new f(b.select(this)))}).on("mousemove",function(c){a.mousemove(new g(c),new f(b.select(this)))})}},f=function(a){this.element=a},g=function(a){this.datum=a};!function(){var a=function(a,b){this.svg=a.svg,this.html=a.html,this.mapper=b};return c(a,null,{elements:{writable:!0,value:function(){return this.svg.selectAll(".i-role-datum")}}}),a}()}a.propagateDatumEvents=e,a.Plugins=d}),e("const",["exports"],function(a){a.CSS_PREFIX="graphical-report__"}),e("unit-domain-period-generator",["exports"],function(a){var b={day:{cast:function(a){return new Date(a.setHours(0,0,0,0))},next:function(a){return new Date(a.setDate(a.getDate()+1))}},week:{cast:function(a){return a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(a.getDate()-a.getDay()))},next:function(a){return new Date(a.setDate(a.getDate()+7))}},month:{cast:function(a){return a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(1))},next:function(a){return new Date(a.setMonth(a.getMonth()+1))}},quarter:{cast:function(a){a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(1));var b=a.getMonth(),c=b-b%3;return new Date(a.setMonth(c))},next:function(a){return new Date(a.setMonth(a.getMonth()+3))}},year:{cast:function(a){return a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(1)),a=new Date(a.setMonth(0))},next:function(a){return new Date(a.setFullYear(a.getFullYear()+1))}}},c={add:function(a,c){return b[a.toLowerCase()]=c,this},get:function(a){return b[a.toLowerCase()]},generate:function(a,c,d){var e=[],f=b[d.toLowerCase()];if(f){var g=f.cast(new Date(c)),h=f.cast(new Date(a));for(e.push(h);(h=f.next(new Date(h)))<=g;)e.push(h)}return e}};a.UnitDomainPeriodGenerator=c}),e("unit-domain-mixin",["exports","./unit-domain-period-generator","./utils/utils","underscore","d3"],function(a,b,c,d,e){var f=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},g=b.UnitDomainPeriodGenerator,h=c.utils,i=d,j=e,k={ordinal:function(a){return a},linear:function(a,b){var c=b.autoScale?h.autoScale(a):j.extent(a),d=i.isNumber(b.min)?b.min:c[0],e=i.isNumber(b.max)?b.max:c[1];return[Math.min(d,c[0]),Math.max(e,c[1])]},period:function(a,b){var c=j.extent(a),d=i.isNull(b.min)||i.isUndefined(b.min)?c[0]:new Date(b.min).getTime(),e=i.isNull(b.max)||i.isUndefined(b.max)?c[1]:new Date(b.max).getTime(),f=[new Date(Math.min(d,c[0])),new Date(Math.max(e,c[1]))];return g.generate(f[0],f[1],b.period)},time:function(a,b){var c=j.extent(a),d=i.isNull(b.min)||i.isUndefined(b.min)?c[0]:new Date(b.min).getTime(),e=i.isNull(b.max)||i.isUndefined(b.max)?c[1]:new Date(b.max).getTime();return[new Date(Math.min(d,c[0])),new Date(Math.max(e,c[1]))]}},l={ordinal:function(a,b){return j.scale.ordinal().domain(a).rangePoints(b,1)},linear:function(a,b){return j.scale.linear().domain(a).rangeRound(b,1)},period:function(a,b){return j.scale.ordinal().domain(a).rangePoints(b,1)},time:function(a,b){return j.time.scale().domain(a).range(b)}},m=function(){var a=function(a,b){var c=function(a){return function(b){return b[a]}},d=function(b){var d=a[b]||{},e=d.value?c(d.value):function(a){return a},f=i.contains(["period","time"],d.scale);return f?i.compose(function(a){return new Date(a).getTime()},e):e},e=function(b){var c=a[b]||{};return c.order||null},f=function(a){var b={category:function(a,b,c){return c},order:function(a,b,c){var d=e(a);return d?i.union(d,c):i.sortBy(c,b)},measure:function(a,b,c){return i.sortBy(c,b)},"as-is":function(a,b,c){return c}};return b[a]||b["as-is"]},h=function(a){var b={category:f("category"),order:function(a,b,c){var d=e(a);return d?i.union(c,d):c},measure:f("measure"),"as-is":f("as-is")};return b[a]||b["as-is"]};this.fnDimension=function(b,c){var d=(c||{}).dimensions||{},e=a[b]||{},f=d[b]||{};return{scaleDim:b,scaleType:f.scale||e.scale,dimType:f.type||e.type}},this.fnSource=function(a){var c=i.map(a,function(a,b){return function(c){return d(b)(c[b])===a}});return i(b).filter(function(a){return i.every(c,function(b){return b(a)})})};var j=function(c,e){if(!a[c])return[null];var f=d(c),g=i(b).chain().pluck(c).uniq(f).value();return e(c,f,g)};this.fnDomain=function(b){var c=d(b),e=(a[b]||{}).type,g=j(b,f(e));return g.map(c)};var m=function(b,e){var f=e||{},l=i.defaults({},a[b]),m=f.map?c(f.map):d(b),n=f.period?function(a){return g.get(f.period).cast(new Date(a))}:function(a){return a},o=j(b,h(l.type)).map(m),p=l.scale?k[l.scale](o,f):[];return{extract:function(a){return n(m(a))},values:p,source:o}};this.fnScaleMeta=m,this.fnScaleTo=function(b,c,d){var e=d||{},f=i.defaults({},a[b]),g=m(b,d),h=l[f.scale](g.values,c,e),j=function(a){return h(g.extract(a))};return Object.keys(h).forEach(function(a){return j[a]=h[a]}),j}};return f(a,null,{mix:{writable:!0,value:function(a){return a.dimension=this.fnDimension,a.source=this.fnSource,a.domain=this.fnDomain,a.scaleMeta=this.fnScaleMeta,a.scaleTo=this.fnScaleTo,a.partition=function(){return a.source(a.$where)},a}}}),a}();a.UnitDomainMixin=m}),e("units-registry",["exports"],function(a){var b={},c={add:function(a,c){var d={};return d.draw="function"==typeof c?c:c.draw,d.walk=c.walk||function(a){return a},b[a]=d,this},get:function(a){if(!b.hasOwnProperty(a))throw new Error("Unknown unit type: "+a);return b[a]}};a.UnitsRegistry=c}),e("charts/tau.plot",["exports","../dsl-reader","../spec-engine-factory","../layout-engine-factory","../plugins","../utils/utils","../utils/utils-dom","../const","../unit-domain-mixin","../units-registry"],function(c,d,e,f,g,h,i,j,k,l){var m=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},n=d.DSLReader,o=e.SpecEngineFactory,p=f.LayoutEngineFactory,q=g.Plugins,r=g.propagateDatumEvents,s=h.utils,t=i.utilsDom,u=j.CSS_PREFIX,v=k.UnitDomainMixin,w=l.UnitsRegistry,x=function(){var c=function d(b){var c=this.convertConfig(b);this.config=a.defaults(c,{excludeNull:!0,spec:null,data:[],plugins:[]}),c.spec.dimensions=this._normalizeDimensions(c.spec.dimensions,c.data),this.plugins=this.config.plugins,this.spec=this.config.spec,this.data=this.config.excludeNull?this._autoExcludeNullValues(c.spec.dimensions,this.config.data):this.config.data,this._plugins=new q(this.config.plugins);var e=d.globalSettings,f={};Object.keys(e).forEach(function(b){f[b]=a.isFunction(e[b])?e[b]:s.clone(e[b])}),this.settings=f,this.settings.specEngine=this.config.specEngine||this.settings.specEngine,this.settings.layoutEngine=this.config.layoutEngine||this.settings.layoutEngine};return m(c,null,{renderTo:{writable:!0,value:function(c,d){var e=b.select(c),f=e[0][0];if(null===f)throw new Error("Target element not found");var g=a.defaults(d||{},t.getContainerSize(f));if(0!==this.data.length){f.innerHTML="";var h=new v(this.spec.dimensions,this.data),i=o.get(this.settings.specEngine,this.settings),j=i(this.spec,h.mix({})),k=function(a){var b;if(a.unit){var c=k(a.unit[0]),d=a.guide,e=d.x.$minimalDomain||1,f=d.y.$minimalDomain||1,g=Math.max(e*d.x.density,e*c.w),h=Math.max(f*d.y.density,f*c.h);b={w:g+d.padding.l+d.padding.r,h:h+d.padding.t+d.padding.b}}else b={w:0,h:0};return b},l=k(j.unit),m=l.w,q=l.h,s=t.getScrollbarWidth(),x=g.width-m,y=g.height-q,z=x>=0?g.width:m,A=y>=0?0:s,B=y>=0?g.height:q,C=x>=0?0:s;g.height=B-C,g.width=z-A;var D=this.settings,E=function(a,b){var c=a.guide.x.$minimalDomain||1,d=a.guide.y.$minimalDomain||1,e=b.width/c,f=b.height/d,g=D.xMinimumDensityKoeff;if(0!==a.guide.x.rotate&&e>g*a.guide.x.$maxTickTextW){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var h=Math.min(D.xAxisTickLabelLimit,a.guide.x.$maxTickTextW),i=0-h+a.guide.x.$maxTickTextH;a.guide.x.label.padding=a.guide.x.label.padding+i,a.guide.padding.b=a.guide.padding.b+i}var j={width:e,height:f};a.unit&&E(a.unit[0],j)};E(j.unit,g);var F=new n(h,w),G=F.buildGraph(j),H=p.get(this.settings.layoutEngine)(G),I=F.calcLayout(H,g),J=F.renderGraph(I,e.append("svg").attr("class",u+"svg").attr("width",g.width).attr("height",g.height));J.selectAll(".i-role-datum").call(r(this._plugins)),this._plugins.render(J)}}},_autoDetectDimensions:{writable:!0,value:function(b){var c={type:"category",scale:"ordinal"},d=function(b,c){var d=c;return a.isDate(b)?(d.type="measure",d.scale="time"):a.isObject(b)?(d.type="order",d.scale="ordinal"):a.isNumber(b)&&(d.type="measure",d.scale="linear"),d},e=function(a,b){return Object.keys(b).forEach(function(e){var f=b.hasOwnProperty(e)?b[e]:null;if(a[e]=a[e]||{type:null,hasNull:!1},null===f)a[e].hasNull=!0;else{var g=d(f,s.clone(c)),h=g.type,i=g.scale,j=null!==a[e].type&&a[e].type!==h;a[e].type=j?c.type:h,a[e].scale=j?c.scale:i}}),a};return a.reduce(b,e,{})}},_autoExcludeNullValues:{writable:!0,value:function(a,b){var c=[];Object.keys(a).forEach(function(b){var d=a[b];d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||c.push(b)});var d;return d=0===c.length?b:b.filter(function(a){return!c.some(function(b){return!a.hasOwnProperty(b)||null===a[b]})})}},_autoAssignScales:{writable:!0,value:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]={},d[e].type=g,d[e].scale=f.scale||c[g],d[e].value=f.value}),d}},_normalizeDimensions:{writable:!0,value:function(a,b){var c=a?a:this._autoDetectDimensions(b);return this._autoAssignScales(c)}},convertConfig:{writable:!0,value:function(a){return a}}}),c}();c.Plot=x}),e("charts/tau.chart",["exports","./tau.plot","../utils/utils"],function(b,c,d){function e(a){return a?a:null}function f(a){return m.isArray(a)?a:[a]}function g(a,b){return{type:a,x:b.x,y:b.y,color:b.color,guide:{color:b.colorGuide},flip:b.flip,size:b.size}}function h(a,b){return b.reduce(function(b,c,d){return"measure"===a[c].type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(d)),"measure"!==a[c].type&&1===b.countMeasureAxis?b.status=n.WARNING:b.countMeasureAxis>1&&(b.status=n.FAIL),b},{status:n.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[]})}function i(b,c){var d=f(c.x),i=f(c.y),j=h(c.dimensions,d),k=h(c.dimensions,i);d=o[j.status](d,j),i=o[k.status](i,k);for(var l=f(c.guide),m=Math.max(d.length,i.length),n={type:"COORDS.RECT",unit:[]},p=l[l.length-1],q=p&&p.color||{},r=m;r>0;r--){var s=d.pop(),t=i.pop(),u=l.pop()||{};r===m?(n.x=s,n.y=t,n.unit.push(g(b,{x:e(s),y:e(t),color:c.color,size:c.size,flip:c.flip,colorGuide:q})),n.guide=a.defaults(u,{padding:{l:45,b:45,r:24,t:24},showGridLines:"xy",x:{label:s},y:{label:t}})):n={type:"COORDS.RECT",x:e(s),y:e(t),unit:[n],guide:a.defaults(u,{padding:{l:45,b:45,r:0,t:0},x:{label:s},y:{label:t}})}}return c.spec={dimensions:c.dimensions,unit:n},c}var j=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},k=function(a,b){a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),a.__proto__=b},l=c.Plot,m=d.utils,n={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},o=function(b){return b[n.SUCCESS]=function(a){return a},b[n.FAIL]=function(){throw new Error("This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")},b[n.WARNING]=function(b,c){var d=b[c.indexMeasureAxis[0]],e=a.without(b,d);return e.push(d),e},b}({}),p={scatterplot:function(a){return i("ELEMENT.POINT",a)},line:function(a){return i("ELEMENT.LINE",a)},bar:function(a){return a.flip=!1,i("ELEMENT.INTERVAL",a)},horizontalBar:function(a){return a.flip=!0,i("ELEMENT.INTERVAL",a)}},q=function(a){var b=function(){a.apply(this,arguments)};return k(b,a),j(b,null,{convertConfig:{writable:!0,value:function(a){return a.dimensions=this._normalizeDimensions(a.dimensions,a.data),p[a.type](a)}}}),b}(l);b.Chart=q}),e("elements/coords",["exports","../utils/utils-draw","../const","../utils/utils","../matrix"],function(b,c,d,e,f){var g=c.utilsDraw,h=d.CSS_PREFIX,i=e.utils,j=f.TMatrix,k={CROSS:function(b,c,d){var e=b.domain(c),f=b.domain(d).reverse();
  return a(f).map(function(b){return a(e).map(function(a){var e={};return c&&(e[c]=a),d&&(e[d]=b),e})})}},l=function(a){return k[a]||function(){return[[{}]]}},m=function(b,c,d){var e=a.defaults(i.clone(b),a.pick.apply(a,[c].concat(d)));return e.guide=a.extend(i.clone(c.guide||{}),e.guide||{}),e},n={walk:function(b,c){var d=a.defaults(b,{$where:{}}),e=a.any(d.unit,function(a){return 0===a.type.indexOf("COORDS.")}),f=l(e?"CROSS":""),g=new j(f(d,d.x,d.y)),h=new j(g.sizeR(),g.sizeC());return g.iterate(function(b,c,e){var f=a.extend({},d.$where,e),g=a(d.unit).map(function(b){return a.extend(m(b,d,["x","y"]),{$where:f})});h.setRC(b,c,g)}),d.$matrix=h,h.iterate(function(b,d,e){a.each(e,function(a){return c(a)})}),d},draw:function(b,c){var d=b.options,e=b.guide.padding;b.x.guide=b.guide.x,b.y.guide=b.guide.y;var f=d.left+e.l,i=d.top+e.t,j=d.width-(e.l+e.r),k=d.height-(e.t+e.b),l={map:b.x.guide.tickLabel,min:b.x.guide.tickMin,max:b.x.guide.tickMax,period:b.x.guide.tickPeriod,autoScale:b.x.guide.autoScale};b.x.scaleObj=b.x.scaleDim&&b.scaleTo(b.x.scaleDim,[0,j],l);var m={map:b.y.guide.tickLabel,min:b.y.guide.tickMin,max:b.y.guide.tickMax,period:b.y.guide.tickPeriod,autoScale:b.y.guide.autoScale};b.y.scaleObj=b.y.scaleDim&&b.scaleTo(b.y.scaleDim,[k,0],m),b.x.guide.size=j,b.y.guide.size=k;var n=[0,k+b.guide.x.padding],o=[0-b.guide.y.padding,0],p=d.container.append("g").attr("class",h+"cell cell").attr("transform",g.translate(f,i));b.x.guide.hide||g.fnDrawDimAxis.call(p,b.x,n,j),b.y.guide.hide||g.fnDrawDimAxis.call(p,b.y,o,k);var q=g.fnDrawGrid.call(p,b,k,j);b.$matrix.iterate(function(b,d,e){e.forEach(function(b){b.options=a.extend({container:q},b.options),c(b)})})}};b.coords=n}),e("utils/css-class-map",["exports","../const"],function(a,b){function c(a){return g[a-1]||g[4]}function d(a){var b=0;return a>=160&&320>a?b=1:a>=320&&480>a?b=2:a>=480&&640>a?b=3:a>=640&&(b=4),h[b]}var e=b.CSS_PREFIX,f=[1,2,3,4,5],g=f.map(function(a){return e+"line-opacity-"+a}),h=f.map(function(a){return e+"line-width-"+a});a.getLineClassesByWidth=d,a.getLineClassesByCount=c}),e("elements/line",["exports","../utils/utils-draw","../const","../utils/css-class-map"],function(a,c,d,e){var f=c.utilsDraw,g=d.CSS_PREFIX,h=e.getLineClassesByWidth,i=e.getLineClassesByCount,j=function(a){var c=a.options,d=c.xScale,e=c.yScale,j=f.generateColor(a),k=b.nest().key(function(a){return a[j.dimension]}).entries(a.partition()),l=h(c.width),m=i(k.length),n=function(){this.attr("class",function(a){return[g+"line","line",j.get(a.key),l,m].join(" ")});var a=this.selectAll("path").data(function(a){return[a.values]});a.call(q),a.enter().append("path").call(q),a.exit().remove()},o=function(b){var f=b.reduce(function(a,b){var c=b.values;return 1===c.length&&a.push(c[0]),a},[]),h=function(){return this.attr("r",1.5).attr("class",function(a){return g+"dot-line dot-line "+g+"dot i-role-datum "+j.get(a[j.dimension])}).attr("cx",function(b){return d(b[a.x.scaleDim])}).attr("cy",function(b){return e(b[a.y.scaleDim])})},i=c.container.selectAll(".dot-line").data(f);i.call(h),i.exit().remove(),i.enter().append("circle").call(h)},p=b.svg.line().x(function(b){return d(b[a.x.scaleDim])}).y(function(b){return e(b[a.y.scaleDim])}),q=function(){this.attr("d",p)};o(k);var r=c.container.selectAll(".line").data(k);r.call(n),r.enter().append("g").call(n),r.exit().remove()};a.line=j}),e("elements/size",["exports"],function(c){var d=function(c,d){c=a.filter(c,a.isFinite);var e=[Math.min.apply(null,c),Math.max.apply(null,c)],f=0===e[0]?e[1]:Math.max(1,e[1]/e[0]),g=[Math.max(1,d/(Math.log(f)+1)),d];return b.scale.linear().range(g).domain(e)};c.sizeScale=d}),e("elements/point",["exports","../utils/utils-draw","../const","./size"],function(b,c,d,e){var f=c.utilsDraw,g=d.CSS_PREFIX,h=e.sizeScale,i=function(b){var c=b.options,d=c.xScale,e=c.yScale,i=f.generateColor(b),j=a.max([c.width,c.height]),k=h(b.domain(b.size.scaleDim),j/100),l=function(){return this.attr("r",function(c){var d=k(c[b.size.scaleDim]);return a.isFinite(d)?d:j/100}).attr("class",function(a){return g+"dot dot i-role-datum "+i.get(a[i.dimension])}).attr("cx",function(a){return d(a[b.x.scaleDim])}).attr("cy",function(a){return e(a[b.y.scaleDim])})},m=c.container.selectAll(".dot").data(b.partition());m.call(l),m.exit().remove(),m.enter().append("circle").call(l)};b.point=i}),e("elements/interval",["exports","../utils/utils-draw","../const"],function(a,c,d){var e=c.utilsDraw,f=d.CSS_PREFIX,g="i-role-bar-group",h=function(a){return"measure"===a.dimType},i=function(a){var b,c,d;return h(a.dim)?(b=5,c=5,d=0):(b=a.size/a.domain().length,c=b/(a.categories.length+1),d=c),{tickWidth:b,intervalWidth:c,offsetCategory:d}},j=function(a){var c,d,j,k,l,m=0,n=a.options,o=e.generateColor(a),p=a.partition(),q=b.nest().key(function(a){return a[o.dimension]}).entries(p),r=n.xScale,s=n.yScale;if(a.flip){var t=i({domain:s.domain,dim:a.y,categories:q,size:n.height}),u=t.tickWidth,v=t.intervalWidth,w=t.offsetCategory;c=h(a.x)?function(b){return r(Math.min(m,b[a.x.scaleDim]))}:0,d=function(b){return s(b[a.y.scaleDim])-u/2},j=h(a.x)?function(b){return Math.abs(r(b[a.x.scaleDim])-r(m))}:function(b){return r(b[a.x.scaleDim])},k=function(){return v},l=function(a,b){return e.translate(0,b*w+w/2)}}else{var x=i({domain:r.domain,dim:a.x,categories:q,size:n.width}),u=x.tickWidth,v=x.intervalWidth,w=x.offsetCategory;c=function(b){return r(b[a.x.scaleDim])-u/2},d=h(a.y)?function(b){return s(Math.max(m,b[a.y.scaleDim]))}:function(b){return s(b[a.y.scaleDim])},j=function(){return v},k=h(a.y)?function(b){return Math.abs(s(b[a.y.scaleDim])-s(m))}:function(b){return n.height-s(b[a.y.scaleDim])},l=function(a,b){return e.translate(b*w+w/2,0)}}var y=function(){return this.attr("class",function(a){return"i-role-datum bar "+f+"bar "+o.get(a[o.dimension])}).attr("x",c).attr("y",d).attr("width",j).attr("height",k)},z=function(){this.attr("class",g).attr("transform",l);var a=this.selectAll("bar").data(function(a){return a.values});a.call(y),a.enter().append("rect").call(y),a.exit().remove()},A=n.container.selectAll("."+g).data(q);A.call(z),A.enter().append("g").call(z),A.exit().remove()};a.interval=j}),e("elements/coords-parallel",["exports","../utils/utils-draw","../const","../utils/utils","../matrix"],function(c,d,e,f,g){var h=d.utilsDraw,i=(e.CSS_PREFIX,f.utils),j=g.TMatrix,k=function(b,c,d){var e=a.defaults(i.clone(b),a.pick.apply(a,[c].concat(d)));return e.guide=a.extend(i.clone(c.guide||{}),e.guide||{}),e},l={walk:function(b,c){var d=a.defaults(b,{$where:{}}),e=new j(1,1),f=new j(1,1);return e.iterate(function(b,c){var e=a.extend({},d.$where),g=a(d.unit).map(function(b){return a.extend(k(b,d,["x"]),{$where:e})});f.setRC(b,c,g)}),d.$matrix=f,f.iterate(function(b,d,e){a.each(e,function(a){return c(a)})}),d},draw:function(c,d){var e=c.options,f=c.guide.padding,g=e.left+f.l,i=e.top+f.t,j=e.width-(f.l+f.r),k=e.height-(f.t+f.b),l=c.x.map(function(a){return c.scaleTo(a,[k,0],{})}),m=e.container.append("g").attr("class","graphical-report__cell cell").attr("transform",h.translate(g,i)),n=function(a,b){return"translate("+a+","+b+")"},o=function(a){return"rotate("+a+")"},p=function(a,c){var d=this,e=b.svg.axis().scale(a).orient("left"),f=d.append("g").attr("class","y axis").attr("transform",n.apply(null,c)).call(e);f.selectAll(".tick text").attr("transform",o(0)).style("text-anchor","end")},q=j/(c.x.length-1);l.forEach(function(a,b){p.call(m,a,[b*q,0])});var r=m.append("g").attr("class","grid").attr("transform",n(0,0));c.$matrix.iterate(function(b,c,e){e.forEach(function(b){b.options=a.extend({container:r},b.options),d(b)})})}};c.CoordsParallel=l}),e("elements/coords-parallel-line",["exports","../utils/utils-draw","../const"],function(a,c,d){var e=c.utilsDraw,f=(d.CSS_PREFIX,{draw:function(a){a.color=a.dimension(a.color,a);var c=a.options,d=a.x.reduce(function(b,d){return b[d]=a.scaleTo(d,[c.height,0],{}),b},{}),f=e.generateColor(a),g=b.nest().key(function(a){return a[f.dimension]}).entries(a.partition()).map(function(b){var c=b.values[0],d=[];return a.x.forEach(function(a){d.push({key:a,val:c[a]})}),d}),h=function(){this.attr("class",function(){return"graphical-report__line line color10-9"});var a=this.selectAll("path").data(function(a){return[a]});a.call(l),a.enter().append("path").call(l),a.exit().remove()},i=c.width/(a.x.length-1),j={};a.x.forEach(function(a,b){j[a]=b*i});var k=b.svg.line().x(function(a){return j[a.key]}).y(function(a){return d[a.key](a.val)}),l=function(){this.attr("d",k)},m=c.container.selectAll(".line").data(g);m.call(h),m.enter().append("g").call(h),m.exit().remove()}});a.CoordsParallelLine=f}),e("node-map",["exports","./elements/coords","./elements/line","./elements/point","./elements/interval","./utils/utils-draw","./elements/coords-parallel","./elements/coords-parallel-line"],function(a,b,c,d,e,f,g,h){var i=b.coords,j=c.line,k=d.point,l=e.interval,m=(f.utilsDraw,g.CoordsParallel),n=h.CoordsParallelLine,o=function(a,b){b.forEach(function(b){a[b]=a.dimension(a[b],a)});var c=a.options,d=c.width,e=c.height;a.x.guide=a.guide.x,a.y.guide=a.guide.y;var f={map:a.x.guide.tickLabel,min:a.x.guide.tickMin,max:a.x.guide.tickMax,period:a.x.guide.tickPeriod,autoScale:a.x.guide.autoScale};a.options.xScale=a.x.scaleDim&&a.scaleTo(a.x.scaleDim,[0,d],f);var g={map:a.y.guide.tickLabel,min:a.y.guide.tickMin,max:a.y.guide.tickMax,period:a.y.guide.tickPeriod,autoScale:a.y.guide.autoScale};return a.options.yScale=a.y.scaleDim&&a.scaleTo(a.y.scaleDim,[e,0],g),a},p={"COORDS.RECT":{walk:i.walk,draw:function(a,b){a.x=a.dimension(a.x,a),a.y=a.dimension(a.y,a),i.draw(a,b)}},"ELEMENT.POINT":function(a){k(o(a,["x","y","color","size"]))},"ELEMENT.LINE":function(a){j(o(a,["x","y","color"]))},"ELEMENT.INTERVAL":function(a){l(o(a,["x","y","color"]))},"COORDS.PARALLEL":m,"PARALLEL/ELEMENT.LINE":n};a.nodeMap=p}),e("tau.newCharts",["exports","./utils/utils-dom","./charts/tau.plot","./charts/tau.chart","./unit-domain-mixin","./unit-domain-period-generator","./dsl-reader","./spec-engine-factory","./layout-engine-factory","./formatter-registry","./node-map","./units-registry"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=b.utilsDom,n=c.Plot,o=d.Chart,p=e.UnitDomainMixin,q=f.UnitDomainPeriodGenerator,r=g.DSLReader,s=h.SpecEngineFactory,t=i.LayoutEngineFactory,u=j.FormatterRegistry,v=k.nodeMap,w=l.UnitsRegistry,x={},y={UnitDomainMixin:p,UnitDomainPeriodGenerator:q,DSLReader:r,SpecEngineFactory:s,LayoutEngineFactory:t},z={UnitsRegistry:w,tickFormat:u,tickPeriod:q,colorBrewers:{add:function(a,b){a in x||(x[a]=b)},get:function(a){return x[a]}},globalSettings:{specEngine:"AUTO",layoutEngine:"EXTRACT",getAxisTickLabelSize:m.getAxisTickLabelSize,xAxisTickLabelLimit:100,yAxisTickLabelLimit:100,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:3,xTickWidth:9,yTickWidth:9,distToXAxisLabel:20,distToYAxisLabel:20,xAxisPadding:20,yAxisPadding:20,xFontLabelHeight:15,yFontLabelHeight:15,xDensityKoeff:2.2,xMinimumDensityKoeff:1.1,yDensityKoeff:2.2,yMinimumDensityKoeff:1.1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto","measure:time:year":"x-time-year","measure:time:quarter":"x-time-quarter","measure:time:month":"x-time-month","measure:time:week":"x-time-week","measure:time:day":"x-time-day","measure:time:hour":"x-time-hour","measure:time:min":"x-time-min","measure:time:sec":"x-time-sec","measure:time:ms":"x-time-ms"}}};n.globalSettings=z.globalSettings,z.UnitsRegistry.add("COORDS.PARALLEL",v["COORDS.PARALLEL"]).add("PARALLEL/ELEMENT.LINE",v["PARALLEL/ELEMENT.LINE"]).add("COORDS.RECT",v["COORDS.RECT"]).add("ELEMENT.POINT",v["ELEMENT.POINT"]).add("ELEMENT.LINE",v["ELEMENT.LINE"]).add("ELEMENT.INTERVAL",v["ELEMENT.INTERVAL"]),a.Plot=n,a.Chart=o,a.__api__=y,a.api=z}),e("underscore",function(){return a}),e("d3",function(){return b}),d("tau.newCharts")});