From 117304404807dda46328973741dc050393a78e85 Mon Sep 17 00:00:00 2001 From: konstantin Date: Mon, 26 Jan 2015 15:33:56 +0300 Subject: [PATCH] Updates --- build/development/plugins/tauCharts.export.js | 8 ++++++-- build/production/tauCharts.min.js | 2 +- examples/scatter.html | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build/development/plugins/tauCharts.export.js b/build/development/plugins/tauCharts.export.js index 9508f11b9..9d0d3e86d 100644 --- a/build/development/plugins/tauCharts.export.js +++ b/build/development/plugins/tauCharts.export.js @@ -5999,7 +5999,7 @@ define('../node_modules/requirejs-text/text',['module'], function (module) { }); -define('../node_modules/requirejs-text/text!print.style.css',[],function () { return 'body > * {\n visibility: hidden;\n}\nbody {\n overflow: hidden;\n}\nbody * {\n visibility: hidden !important;\n}\n\n.graphical-report__print-block {\n position: absolute;\n top: 0;\n left: 0;\n visibility: visible !important;\n display: block;\n width: 100%;\n /*height: 100%;*/\n}\n';}); +define('../node_modules/requirejs-text/text!print.style.css',[],function () { return 'body > * {\n visibility: hidden;\n}\nbody {\n overflow: hidden;\n}\nbody * {\n visibility: hidden !important;\n}\n\n.graphical-report__print-block {\n position: absolute;\n top: 0;\n left: 0;\n visibility: visible !important;\n display: block !important;\n width: 100%;\n /*height: 100%;*/\n}\n';}); (function() { @@ -6339,7 +6339,11 @@ define("../bower_components/fetch/fetch", function(){}); if ('onafterprint' in window) { window.addEventListener('afterprint', removePrintStyles); } else { - window.matchMedia('screen').addListener(removePrintStyles); + window.matchMedia('screen').addListener(function(exp){ + if(exp.matches) { + removePrintStyles(); + } + }); } var focusinDetected; var isSupportFocusin = function isSupportFocusin() { diff --git a/build/production/tauCharts.min.js b/build/production/tauCharts.min.js index da1a18b4d..5704c8d99 100644 --- a/build/production/tauCharts.min.js +++ b/build/production/tauCharts.min.js @@ -6,5 +6,5 @@ if(b.guide.x.hide!==!0&&0!==b.guide.x.rotate&&h>b.guide.x.$maxTickTextW+2*l){b.g f.selectAll(".tick text").attr("transform",m(0)).style("text-anchor","end")},o=g/(a.x.length-1);return j.forEach(function(a,b){n.call(k,a,[b*o,0])}),k.append("g").attr("class","grid").attr("transform",l(0,0))}};c.CoordsParallel=l}),e("elements/coords-parallel-line",["exports","../utils/utils-draw","../const"],function(a,c,d){var e=(c.utilsDraw,d.CSS_PREFIX,{draw:function(a){a.color=a.dimension(a.color,a);var c=a.guide.color||{},d=a.scaleColor(a.color.scaleDim,c.brewer,c),e=a.options,f=a.x.reduce(function(b,c){return b[c]=a.scaleTo(c,[e.height,0],{}),b},{}),g=b.nest().key(function(a){return a[d.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 color20-9"});var a=this.selectAll("path").data(function(a){return[a]});a.call(l),a.enter().append("path").call(l),a.exit().remove()},i=e.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 f[a.key](a.val)}),l=function(){this.attr("d",k)},m=e.container.selectAll(".line").data(g);m.call(h),m.enter().append("g").call(h),m.exit().remove()}});a.CoordsParallelLine=e}),e("node-map",["exports","./elements/coords","./elements/line","./elements/point","./elements/interval","./utils/utils-draw","./elements/coords-parallel","./elements/coords-parallel-line"],function(b,c,d,e,f,g,h,i){var j=c.coords,k=d.line,l=e.point,m=f.interval,n=(g.utilsDraw,h.CoordsParallel),o=i.CoordsParallelLine,p=function(a,b,c,d,e){var f=Math.min(a,b),g=f*c;return Math.max(e,Math.min(d,g))},q=function(b,c){c.forEach(function(a){b[a]=b.dimension(b[a],b)});var d=b.options,e=d.width,f=d.height;b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.options.xScale=b.x.scaleDim&&b.scaleTo(b.x.scaleDim,[0,e],b.x.guide),b.options.yScale=b.y.scaleDim&&b.scaleTo(b.y.scaleDim,[f,0],b.y.guide);var g=b.guide.color||{};if(b.options.color=b.scaleColor(b.color.scaleDim,g.brewer,g),b.size){var h=2,i=.5*a.min([b.guide.x.tickFontHeight,b.guide.y.tickFontHeight].filter(function(a){return 0!==a})),j=.5*a.min([b.guide.x.density,b.guide.y.density].filter(function(a){return 0!==a})),k=b.guide.size||{};b.options.sizeScale=b.scaleSize(b.size.scaleDim,[h,p(e,f,.1,j,h),p(e,f,.1,i,h)],k)}return b},r={"COORDS.RECT":{walk:j.walk,draw:function(a,b){return a.x=a.dimension(a.x,a),a.y=a.dimension(a.y,a),j.draw(a,b)}},"ELEMENT.POINT":function(a){return l(q(a,["x","y","color","size"]))},"ELEMENT.LINE":function(a){return k(q(a,["x","y","color"]))},"ELEMENT.INTERVAL":function(a){return m(q(a,["x","y","color"]))},"COORDS.PARALLEL":n,"PARALLEL/ELEMENT.LINE":o};b.nodeMap=r}),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(c,d,e,f,g,h,i,j,k,l,m,n){var o=d.utilsDom,p=e.Plot,q=f.Chart,r=g.UnitDomainMixin,s=h.UnitDomainPeriodGenerator,t=i.DSLReader,u=j.SpecEngineFactory,v=k.LayoutEngineFactory,w=l.FormatterRegistry,x=m.nodeMap,y=n.UnitsRegistry,z={},A={},B={UnitDomainMixin:r,UnitDomainPeriodGenerator:s,DSLReader:t,SpecEngineFactory:u,LayoutEngineFactory:v},C={UnitsRegistry:y,tickFormat:w,d3:b,_:a,tickPeriod:s,colorBrewers:{add:function(a,b){a in z||(z[a]=b)},get:function(a){return z[a]}},plugins:{add:function(a,b){if(a in A)throw new Error("Plugin is already registered.");A[a]=b},get:function(a){return A[a]}},globalSettings:{log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},excludeNull:!0,specEngine:[{name:"COMPACT",width:600},{name:"AUTO",width:Number.MAX_VALUE}],fitSize:!0,layoutEngine:"EXTRACT",getAxisTickLabelSize:o.getAxisTickLabelSize,getScrollBarWidth:o.getScrollbarWidth,xAxisTickLabelLimit:100,yAxisTickLabelLimit:100,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:20,distToYAxisLabel:20,xAxisPadding:20,yAxisPadding:20,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:4,yDensityPadding:4,"xDensityPadding:measure":8,"yDensityPadding:measure":8,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};p.globalSettings=C.globalSettings,C.UnitsRegistry.add("COORDS.PARALLEL",x["COORDS.PARALLEL"]).add("PARALLEL/ELEMENT.LINE",x["PARALLEL/ELEMENT.LINE"]).add("COORDS.RECT",x["COORDS.RECT"]).add("ELEMENT.POINT",x["ELEMENT.POINT"]).add("ELEMENT.LINE",x["ELEMENT.LINE"]).add("ELEMENT.INTERVAL",x["ELEMENT.INTERVAL"]),c.Plot=p,c.Chart=q,c.__api__=B,c.api=C}),e("underscore",function(){return a}),e("d3",function(){return b}),d("tau.newCharts")}),function(a){if("function"==typeof define&&define.amd)define(["tauCharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("tauCharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a,b){if("function"==typeof define&&define.amd)define(["tauCharts"],function(a){return b(a)});else if("object"==typeof module&&module.exports){{require("tauCharts")}module.exports=b(tauCharts)}else b(a.tauCharts)}(this,function(a){var b,c,d;!function(a){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(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(b){if(e(r,b)){var c=r[b];delete r[b],t[b]=!0,m.apply(a,c)}if(!e(q,b)&&!e(t,b))throw new Error("No "+b);return q[b]}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(b,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||b,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,d=0;d "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}"undefined"!=typeof d&&d.amd?d("../bower_components/canvg/rgbcolor",[],function(){return b}):"undefined"!=typeof module&&module.exports&&(module.exports=b),a.RGBColor=b}("undefined"!=typeof window?window:this),function(a){function b(a,b,d,f){var g=document.getElementById(a),h=g.naturalWidth,i=g.naturalHeight,j=document.getElementById(b);j.style.width=h+"px",j.style.height=i+"px",j.width=h,j.height=i;var k=j.getContext("2d");k.clearRect(0,0,h,i),k.drawImage(g,0,0),isNaN(d)||1>d||(f?c(b,0,0,h,i,d):e(b,0,0,h,i,d))}function c(a,b,c,d,e,i){if(!(isNaN(i)||1>i)){i|=0;var j,k=document.getElementById(a),l=k.getContext("2d");try{try{j=l.getImageData(b,c,d,e)}catch(m){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),j=l.getImageData(b,c,d,e)}catch(m){throw alert("Cannot access local image"),new Error("unable to access local image data: "+m)}}}catch(m){throw alert("Cannot access image"),new Error("unable to access image data: "+m)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L=j.data,M=i+i+1,N=d-1,O=e-1,P=i+1,Q=P*(P+1)/2,R=new f,S=R;for(p=1;M>p;p++)if(S=S.next=new f,p==P)var T=S; S.next=R;var U=null,V=null;t=s=0;var W=g[i],X=h[i];for(o=0;e>o;o++){for(C=D=E=F=u=v=w=x=0,y=P*(G=L[s]),z=P*(H=L[s+1]),A=P*(I=L[s+2]),B=P*(J=L[s+3]),u+=Q*G,v+=Q*H,w+=Q*I,x+=Q*J,S=R,p=0;P>p;p++)S.r=G,S.g=H,S.b=I,S.a=J,S=S.next;for(p=1;P>p;p++)q=s+((p>N?N:p)<<2),u+=(S.r=G=L[q])*(K=P-p),v+=(S.g=H=L[q+1])*K,w+=(S.b=I=L[q+2])*K,x+=(S.a=J=L[q+3])*K,C+=G,D+=H,E+=I,F+=J,S=S.next;for(U=R,V=T,n=0;d>n;n++)L[s+3]=J=x*W>>X,0!=J?(J=255/J,L[s]=(u*W>>X)*J,L[s+1]=(v*W>>X)*J,L[s+2]=(w*W>>X)*J):L[s]=L[s+1]=L[s+2]=0,u-=y,v-=z,w-=A,x-=B,y-=U.r,z-=U.g,A-=U.b,B-=U.a,q=t+((q=n+i+1)n;n++){for(D=E=F=C=v=w=x=u=0,s=n<<2,y=P*(G=L[s]),z=P*(H=L[s+1]),A=P*(I=L[s+2]),B=P*(J=L[s+3]),u+=Q*G,v+=Q*H,w+=Q*I,x+=Q*J,S=R,p=0;P>p;p++)S.r=G,S.g=H,S.b=I,S.a=J,S=S.next;for(r=d,p=1;i>=p;p++)s=r+n<<2,u+=(S.r=G=L[s])*(K=P-p),v+=(S.g=H=L[s+1])*K,w+=(S.b=I=L[s+2])*K,x+=(S.a=J=L[s+3])*K,C+=G,D+=H,E+=I,F+=J,S=S.next,O>p&&(r+=d);for(s=n,U=R,V=T,o=0;e>o;o++)q=s<<2,L[q+3]=J=x*W>>X,J>0?(J=255/J,L[q]=(u*W>>X)*J,L[q+1]=(v*W>>X)*J,L[q+2]=(w*W>>X)*J):L[q]=L[q+1]=L[q+2]=0,u-=y,v-=z,w-=A,x-=B,y-=U.r,z-=U.g,A-=U.b,B-=U.a,q=n+((q=o+P)i)){i|=0;var j,k=document.getElementById(a),l=k.getContext("2d");try{try{j=l.getImageData(b,c,d,e)}catch(m){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),j=l.getImageData(b,c,d,e)}catch(m){throw alert("Cannot access local image"),new Error("unable to access local image data: "+m)}}}catch(m){throw alert("Cannot access image"),new Error("unable to access image data: "+m)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=j.data,I=i+i+1,J=d-1,K=e-1,L=i+1,M=L*(L+1)/2,N=new f,O=N;for(p=1;I>p;p++)if(O=O.next=new f,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=g[i],T=h[i];for(o=0;e>o;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;L>p;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;L>p;p++)q=s+((p>J?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;d>n;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+i+1)n;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;L>p;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;i>=p;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,K>p&&(r+=d);for(s=n,Q=N,R=P,o=0;e>o;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)~]/g," "),a=a.replace(/[#\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\)'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\.\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&1>d?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():(a.match(/ms$/),this.numValue())},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;hthis.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),bthis.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(0>r)){var s=(-o+Math.sqrt(r))/(2*p);s>0&&1>s&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);t>0&&1>t&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;u>0&&1>u&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;bj&&(this.styles[i]=g[i],this.stylesSpecificity[i]=h)}}if(this.attribute("style").hasValue())for(var g=this.attribute("style").value.split(";"),b=0;b=this.tokens.length-1},this.isCommandOrEnd=function(){return this.isEnd()?!0:null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,a},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d=h;h++)for(var i=-1;1>=i;i++)g.save(),g.translate(h*e.width,i*e.height),d.render(g),g.restore();var j=a.createPattern(e,"repeat");return j}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.gradientUnits=this.attribute("gradientUnits").valueOrDefault("objectBoundingBox"),this.stops=[];for(var b=0;b1&&(this.offset=1);var b=this.style("stop-color");this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.beginc&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+this.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),d.attribute("dx").hasValue()&&(this.x+=d.attribute("dx").toPixels("x")),d.x=this.x),this.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),d.attribute("dy").hasValue()&&(this.y+=d.attribute("dy").toPixels("y")),d.y=this.y),this.y=d.y,d.render(a);for(var c=0;c0&&" "!=b[c-1]&&c0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h0;for(var b=0;b0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log('ERROR: image "'+b+'" not found'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;yc?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;h>f;f++)for(var e=0;g>e;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element '"+a.nodeName+"' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,b.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0;var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.attribute("transform",!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b~\.\[:]+)/g,j=/(\.[^\s\+>~\.\[:]+)/g,k=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\w-]+\([^\)]*\))/gi,m=/(:[^\s\+>~\.\[:]+)/g,n=/([^\s\+>~\.\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f});var e=e||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if((s||!l)&&(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){return q.readyState!==q.DONE?a.apply(this,arguments):void 0}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);return"undefined"!=typeof module&&module.exports?module.exports.saveAs=e:"undefined"!=typeof d&&null!==d&&null!=d.amd&&d("../bower_components/FileSaver.js/FileSaver",[],function(){return e}),function(){function a(a){return"function"==typeof a||"object"==typeof a&&null!==a}function b(a){return"function"==typeof a}function c(a){return"object"==typeof a&&null!==a}function e(){}function f(){return function(){process.nextTick(j)}}function g(){var a=0,b=new M(j),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function h(){var a=new MessageChannel;return a.port1.onmessage=j,function(){a.port2.postMessage(0)}}function i(){return function(){setTimeout(j,1)}}function j(){for(var a=0;J>a;a+=2){var b=O[a],c=O[a+1];b(c),O[a]=void 0,O[a+1]=void 0}J=0}function k(){}function l(){return new TypeError("You cannot resolve a promise with itself")}function m(){return new TypeError("A promises callback cannot return that same promise.")}function n(a){try{return a.then}catch(b){return S.error=b,S}}function o(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function p(a,b,c){K(function(a){var d=!1,e=o(c,b,function(c){d||(d=!0,b!==c?s(a,c):u(a,c))},function(b){d||(d=!0,v(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,v(a,e))},a)}function q(a,b){b._state===Q?u(a,b._result):a._state===R?v(a,b._result):w(b,void 0,function(b){s(a,b)},function(b){v(a,b)})}function r(a,c){if(c.constructor===a.constructor)q(a,c);else{var d=n(c);d===S?v(a,S.error):void 0===d?u(a,c):b(d)?p(a,c,d):u(a,c)}}function s(b,c){b===c?v(b,l()):a(c)?r(b,c):u(b,c)}function t(a){a._onerror&&a._onerror(a._result),x(a)}function u(a,b){a._state===P&&(a._result=b,a._state=Q,0===a._subscribers.length||K(x,a))}function v(a,b){a._state===P&&(a._state=R,a._result=b,K(t,a))}function w(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+Q]=c,e[f+R]=d,0===f&&a._state&&K(x,a)}function x(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return e.prototype=a,new e},0),K=function(a,b){O[J]=a,O[J+1]=b,J+=2,2===J&&H()},L="undefined"!=typeof window?window:{},M=L.MutationObserver||L.WebKitMutationObserver,N="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,O=new Array(1e3);H="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?f():M?g():N?h():i();var P=void 0,Q=1,R=2,S=new y,T=new y;C.prototype._validateInput=function(a){return I(a)},C.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},C.prototype._init=function(){this._result=new Array(this.length)};var U=C;C.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===P&&a>d;d++)this._eachEntry(c[d],d)},C.prototype._eachEntry=function(a,b){var d=this._instanceConstructor;c(a)?a.constructor===d&&a._state!==P?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(d.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(Q,b,a))},C.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===P&&(this._remaining--,this._abortOnReject&&a===R?v(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&u(d,this._result)},C.prototype._makeResult=function(a,b,c){return c},C.prototype._willSettleAt=function(a,b){var c=this;w(a,void 0,function(a){c._settledAt(Q,b,a)},function(a){c._settledAt(R,b,a)})};var V=function(a,b){return new U(this,a,!0,b).promise},W=function(a,b){function c(a){s(f,a)}function d(a){v(f,a)}var e=this,f=new e(k,b);if(!I(a))return v(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===P&&g>h;h++)w(e.resolve(a[h]),void 0,c,d);return f},X=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(k,b);return s(d,a),d},Y=function(a,b){var c=this,d=new c(k,b);return v(d,a),d},Z=0,$=F;F.all=V,F.race=W,F.resolve=X,F.reject=Y,F.prototype={constructor:F,then:function(a,b){var c=this,d=c._state;if(d===Q&&!a||d===R&&!b)return this;var e=new this.constructor(k),f=c._result;if(d){var g=arguments[d-1];K(function(){A(d,e,g,f)})}else w(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var _=function(){var a;a="undefined"!=typeof global?global:"undefined"!=typeof window&&window.document?window:self;var c="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var c;return new a.Promise(function(a){c=a}),b(c)}();c||(a.Promise=$)},ab={Promise:$,polyfill:_};"function"==typeof d&&d.amd?d("../bower_components/es6-promise/promise",[],function(){return ab}):"undefined"!=typeof module&&module.exports?module.exports=ab:"undefined"!=typeof this&&(this.ES6Promise=ab)}.call(this),d("../node_modules/requirejs-text/text",["module"],function(a){var b,d,e,f,g,h=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,j=/]*>\s*([\s\S]+)\s*<\/body>/im,k="undefined"!=typeof location&&location.href,l=k&&location.protocol&&location.protocol.replace(/\:/,""),m=k&&location.hostname,n=k&&(location.port||void 0),o={},p=a.config&&a.config()||{};return b={version:"2.0.12",strip:function(a){if(a){a=a.replace(i,"");var b=a.match(j);b&&(a=b[1])}else a="";return a},jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var a,b,c;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(b=0;3>b;b+=1){c=h[b];try{a=new ActiveXObject(c)}catch(d){}if(a){h=[c];break}}return a},parseName:function(a){var b,c,d,e=!1,f=a.indexOf("."),g=0===a.indexOf("./")||0===a.indexOf("../");return-1!==f&&(!g||f>1)?(b=a.substring(0,f),c=a.substring(f+1,a.length)):b=a,d=c||b,f=d.indexOf("!"),-1!==f&&(e="strip"===d.substring(f+1),d=d.substring(0,f),c?c=d:b=d),{moduleName:b,ext:c,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,c,d,e){var f,g,h,i=b.xdRegExp.exec(a);return i?(f=i[2],g=i[3],g=g.split(":"),h=g[1],g=g[0],!(f&&f!==c||g&&g.toLowerCase()!==d.toLowerCase()||(h||g)&&h!==e)):!0},finishLoad:function(a,c,d,e){d=c?b.strip(d):d,p.isBuild&&(o[a]=d),e(d)},load:function(a,c,d,e){if(e&&e.isBuild&&!e.inlineText)return void d();p.isBuild=e&&e.isBuild;var f=b.parseName(a),g=f.moduleName+(f.ext?"."+f.ext:""),h=c.toUrl(g),i=p.useXhr||b.useXhr;return 0===h.indexOf("empty:")?void d():void(!k||i(h,l,m,n)?b.get(h,function(c){b.finishLoad(a,f.strip,c,d)},function(a){d.error&&d.error(a)}):c([g],function(a){b.finishLoad(f.moduleName+"."+f.ext,f.strip,a,d)}))},write:function(a,c,d){if(o.hasOwnProperty(c)){var e=b.jsEscape(o[c]);d.asModule(a+"!"+c,"define(function () { return '"+e+"';});\n")}},writeFile:function(a,c,d,e,f){var g=b.parseName(c),h=g.ext?"."+g.ext:"",i=g.moduleName+h,j=d.toUrl(g.moduleName+h)+".js";b.load(i,d,function(){var c=function(a){return e(j,a)};c.asModule=function(a,b){return e.asModule(a,j,b)},b.write(a,i,c,f)},f)}},"node"===p.env||!p.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(d=c.nodeRequire("fs"),b.get=function(a,b,c){try{var e=d.readFileSync(a,"utf8");0===e.indexOf("")&&(e=e.substring(1)),b(e)}catch(f){c&&c(f)}}):"xhr"===p.env||!p.env&&b.createXhr()?b.get=function(a,c,d,e){var f,g=b.createXhr();if(g.open("GET",a,!0),e)for(f in e)e.hasOwnProperty(f)&&g.setRequestHeader(f.toLowerCase(),e[f]);p.onXhr&&p.onXhr(g,a),g.onreadystatechange=function(){var b,e;4===g.readyState&&(b=g.status||0,b>399&&600>b?(e=new Error(a+" HTTP status: "+b),e.xhr=g,d&&d(e)):c(g.responseText),p.onXhrComplete&&p.onXhrComplete(g,a))},g.send(null)}:"rhino"===p.env||!p.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?b.get=function(a,b){var c,d,e="utf-8",f=new java.io.File(a),g=java.lang.System.getProperty("line.separator"),h=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(f),e)),i="";try{for(c=new java.lang.StringBuffer,d=h.readLine(),d&&d.length()&&65279===d.charAt(0)&&(d=d.substring(1)),null!==d&&c.append(d);null!==(d=h.readLine());)c.append(g),c.append(d);i=String(c.toString())}finally{h.close()}b(i)}:("xpconnect"===p.env||!p.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(e=Components.classes,f=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),g="@mozilla.org/windows-registry-key;1"in e,b.get=function(a,b){var c,d,h,i={};g&&(a=a.replace(/\//g,"\\")),h=new FileUtils.File(a);try{c=e["@mozilla.org/network/file-input-stream;1"].createInstance(f.nsIFileInputStream),c.init(h,1,0,!1),d=e["@mozilla.org/intl/converter-input-stream;1"].createInstance(f.nsIConverterInputStream),d.init(c,"utf-8",c.available(),f.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),d.readString(c.available(),i),d.close(),c.close(),b(i.value)}catch(j){throw new Error((h&&h.path||"")+": "+j)}}),b}),d("../node_modules/requirejs-text/text!print.style.css",[],function(){return"body > * {\n visibility: hidden;\n}\nbody {\n overflow: hidden;\n}\nbody * {\n visibility: hidden !important;\n}\n\n.graphical-report__print-block {\n position: absolute;\n top: 0;\n left: 0;\n visibility: visible !important;\n display: block;\n width: 100%;\n /*height: 100%;*/\n}\n"}),function(){function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\+/g," "),e=c.join("=").replace(/\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?this._bodyBlob="string"==typeof a?new Blob([a]):a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(100>a||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}(),d("../bower_components/fetch/fetch",function(){}),function(a){"function"==typeof d&&d.amd?d("export",["tauCharts","canvg","FileSaver","promise","print.style.css","fetch"],function(b,c,d,e,f){return window.Promise=window.Promise||e.Promise,a(b,c,d,window.Promise,f)}):a(this.tauCharts,this.canvg,this.saveAs)}(function(a,b,c,d,e){function f(e){return{_createDataUrl:function(a){var c=this.cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(c).then(function(a){return a.join(" ")}).then(function(c){var d=l(c),e=document.createElement("div"),f=a.getSVG().cloneNode(!0);e.appendChild(f),h.select(f).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),f.insertBefore(d,f.firstChild),this._renderAdditionalInfo(f,a);var g=document.createElement("canvas");return g.height=f.getAttribute("height"),g.width=f.getAttribute("width"),b(g,f.parentNode.innerHTML),g.toDataURL("image/png")}.bind(this))},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;f>e;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g)})},_toPrint:function(a){this._createDataUrl(a).then(function(a){g=document.createElement("img"),g.classList.add("graphical-report__print-block");var b=g;document.body.appendChild(b),b.src=a,document.head.appendChild(m),b.onload=function(){window.print()}})},_renderAdditionalInfo:function(a,b){var c=b.getConfig(),d=j(c.spec.unit);if(d){d.guide=d.guide||{},d.guide.color=this._unit.guide.color;var e=d.guide.color.label.text||this._unit.options.color.dimension;a=h.select(a);{var f=parseInt(a.attr("width"),10);a.attr("height")}a.attr("width",f+160);var g=this._getColorMap(b),i=function(){this.attr("transform",function(a,b){return"translate(0,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("class",function(a){return a.color}),this.append("text").attr("x",12).attr("y",5).text(function(a){return a.label}).style({"font-size":"13px"})},k=a.append("g").attr("class","legend").attr("transform","translate("+(f+10)+",20)");k.append("text").text(e.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":"13px"}),k.selectAll("g").data(g).enter().append("g").call(i)}},onUnitReady:function(a,b){-1!==b.type.indexOf("ELEMENT")&&(this._unit=b)},_getColorMap:function(a){var b=this._unit.options.color,c=this._unit.color.scaleDim,d=a.getData();return i(d).chain().map(function(a){return b.legend(a[c])}).uniq(function(a){return a.value}).value().reduce(function(a,b){return a.push(b),a},[])},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===k.ESCAPE&&c.hide(),a.keyCode===k.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===k.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===k.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=p(),f=e?"focusin":"focus",g=e?"focusout":"blur";a.addEventListener(g,function(){d=setTimeout(function(){c.hide()},100)},!e),a.addEventListener(f,function(){clearTimeout(d)},!e),this._container.addEventListener("click",function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()})},init:function(b){e=e||{},this.cssPaths=e.cssPaths,this.cssPaths||(this.cssPaths=[],a.api.globalSettings.log("You should specified cssPath for correct work export plugin","warn")),this._container=b.insertToHeader('Export>');var c=b.addBalloon({place:"bottom-left"});c.content(['"].join("")),c.attach(this._container);var d=c.getElement();d.setAttribute("tabindex","-1"),this._handleMenu(d,b,c),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this))}}}var g,h=a.api.d3,i=a.api._,j=function(a){if(a.color)return a;var b,c,d,e=a.unit||[];for(b=0;b',_template:d.template('
<%=name%>
<%=items%>
'),_itemTemplate:d.template(["
\">",'
<%=label%>',"
"].join("")),_itemSizeTemplate:d.template(['
','
','
',"
",'
<%=value%>
',"
"].join("")),_renderColorLegend:function(a,b){if(a.color){var c=this._unit.options.color,e=this._unit.color.scaleDim;a.guide=a.guide||{},a.guide.color=this._unit.guide.color;var g=a.guide.color.label.text||c.dimension,h=this._getColorMap(b.getData({excludeFilter:["legend"]}),c,e);a.guide.color.brewer=h.brewer;var i=d.reduce(h.values,function(a,b){var c={dimension:e,value:b.value,color:b.color},h=JSON.stringify(c),i=d.escape(f(b.label)?"No "+g:b.label);return a.items.push(this._itemTemplate({color:b.color,classDisabled:this._currentFilters[h]?"disabled":"",label:i,value:d.escape(h)})),a.storageValues[h]=c,a},{items:[],storageValues:{}},this);this._storageValues=i.storageValues,this._container.insertAdjacentHTML("beforeend",this._template({items:i.items.join(""),name:g}))}},_renderSizeLegend:function(a,b){if(a.size){var e=this._unit.options.sizeScale,f=this._unit.size.scaleDim;a.guide=a.guide||{},a.guide.size=this._unit.guide.size;var g,h=a.guide.size.label.text||f,i=d.sortBy(b.getData(),function(a){return e(a[f])}),j=i.length,k=i[0][f],l=i[j-1][f];if(l-k){var m=Math.round((l-k)/5);g=[k,k+m,k+2*m,k+3*m,l]}else g=[k];var n=d.map(g,function(a){return this._itemSizeTemplate({diameter:c(2*e(a)),value:a})},this).reverse();this._container.insertAdjacentHTML("beforeend",this._template({items:'
'+n.join("")+"
",name:h}))}},onRender:function(a){if(this._container){this._container.innerHTML="";var b=this._findUnit(a);this._renderColorLegend(b,a),this._renderSizeLegend(b,a)}}}};return a.api.plugins.add("legend",g),g}),function(a){if("function"==typeof define&&define.amd)define(["tauCharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("tauCharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){return b=b||{},{template:['
','
','
','Exclude',"
","
"].join(""),itemTemplate:['
','
<%=label%>
','
<%=value%>
',"
"].join(""),onExcludeData:function(){},_drawPoint:function(a,b,c,d){this.circle&&this.circle.remove(),this.circle=a.append("circle").attr("cx",b).attr("cy",c).attr("class",d).attr("r",4),this.circle.node().addEventListener("mouseover",function(){clearTimeout(this._timeoutHideId) +"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c~\.\[:]+)/g,j=/(\.[^\s\+>~\.\[:]+)/g,k=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\w-]+\([^\)]*\))/gi,m=/(:[^\s\+>~\.\[:]+)/g,n=/([^\s\+>~\.\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f});var e=e||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if((s||!l)&&(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){return q.readyState!==q.DONE?a.apply(this,arguments):void 0}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);return"undefined"!=typeof module&&module.exports?module.exports.saveAs=e:"undefined"!=typeof d&&null!==d&&null!=d.amd&&d("../bower_components/FileSaver.js/FileSaver",[],function(){return e}),function(){function a(a){return"function"==typeof a||"object"==typeof a&&null!==a}function b(a){return"function"==typeof a}function c(a){return"object"==typeof a&&null!==a}function e(){}function f(){return function(){process.nextTick(j)}}function g(){var a=0,b=new M(j),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function h(){var a=new MessageChannel;return a.port1.onmessage=j,function(){a.port2.postMessage(0)}}function i(){return function(){setTimeout(j,1)}}function j(){for(var a=0;J>a;a+=2){var b=O[a],c=O[a+1];b(c),O[a]=void 0,O[a+1]=void 0}J=0}function k(){}function l(){return new TypeError("You cannot resolve a promise with itself")}function m(){return new TypeError("A promises callback cannot return that same promise.")}function n(a){try{return a.then}catch(b){return S.error=b,S}}function o(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function p(a,b,c){K(function(a){var d=!1,e=o(c,b,function(c){d||(d=!0,b!==c?s(a,c):u(a,c))},function(b){d||(d=!0,v(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,v(a,e))},a)}function q(a,b){b._state===Q?u(a,b._result):a._state===R?v(a,b._result):w(b,void 0,function(b){s(a,b)},function(b){v(a,b)})}function r(a,c){if(c.constructor===a.constructor)q(a,c);else{var d=n(c);d===S?v(a,S.error):void 0===d?u(a,c):b(d)?p(a,c,d):u(a,c)}}function s(b,c){b===c?v(b,l()):a(c)?r(b,c):u(b,c)}function t(a){a._onerror&&a._onerror(a._result),x(a)}function u(a,b){a._state===P&&(a._result=b,a._state=Q,0===a._subscribers.length||K(x,a))}function v(a,b){a._state===P&&(a._state=R,a._result=b,K(t,a))}function w(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+Q]=c,e[f+R]=d,0===f&&a._state&&K(x,a)}function x(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return e.prototype=a,new e},0),K=function(a,b){O[J]=a,O[J+1]=b,J+=2,2===J&&H()},L="undefined"!=typeof window?window:{},M=L.MutationObserver||L.WebKitMutationObserver,N="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,O=new Array(1e3);H="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?f():M?g():N?h():i();var P=void 0,Q=1,R=2,S=new y,T=new y;C.prototype._validateInput=function(a){return I(a)},C.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},C.prototype._init=function(){this._result=new Array(this.length)};var U=C;C.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===P&&a>d;d++)this._eachEntry(c[d],d)},C.prototype._eachEntry=function(a,b){var d=this._instanceConstructor;c(a)?a.constructor===d&&a._state!==P?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(d.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(Q,b,a))},C.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===P&&(this._remaining--,this._abortOnReject&&a===R?v(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&u(d,this._result)},C.prototype._makeResult=function(a,b,c){return c},C.prototype._willSettleAt=function(a,b){var c=this;w(a,void 0,function(a){c._settledAt(Q,b,a)},function(a){c._settledAt(R,b,a)})};var V=function(a,b){return new U(this,a,!0,b).promise},W=function(a,b){function c(a){s(f,a)}function d(a){v(f,a)}var e=this,f=new e(k,b);if(!I(a))return v(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===P&&g>h;h++)w(e.resolve(a[h]),void 0,c,d);return f},X=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(k,b);return s(d,a),d},Y=function(a,b){var c=this,d=new c(k,b);return v(d,a),d},Z=0,$=F;F.all=V,F.race=W,F.resolve=X,F.reject=Y,F.prototype={constructor:F,then:function(a,b){var c=this,d=c._state;if(d===Q&&!a||d===R&&!b)return this;var e=new this.constructor(k),f=c._result;if(d){var g=arguments[d-1];K(function(){A(d,e,g,f)})}else w(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var _=function(){var a;a="undefined"!=typeof global?global:"undefined"!=typeof window&&window.document?window:self;var c="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var c;return new a.Promise(function(a){c=a}),b(c)}();c||(a.Promise=$)},ab={Promise:$,polyfill:_};"function"==typeof d&&d.amd?d("../bower_components/es6-promise/promise",[],function(){return ab}):"undefined"!=typeof module&&module.exports?module.exports=ab:"undefined"!=typeof this&&(this.ES6Promise=ab)}.call(this),d("../node_modules/requirejs-text/text",["module"],function(a){var b,d,e,f,g,h=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,j=/]*>\s*([\s\S]+)\s*<\/body>/im,k="undefined"!=typeof location&&location.href,l=k&&location.protocol&&location.protocol.replace(/\:/,""),m=k&&location.hostname,n=k&&(location.port||void 0),o={},p=a.config&&a.config()||{};return b={version:"2.0.12",strip:function(a){if(a){a=a.replace(i,"");var b=a.match(j);b&&(a=b[1])}else a="";return a},jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var a,b,c;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(b=0;3>b;b+=1){c=h[b];try{a=new ActiveXObject(c)}catch(d){}if(a){h=[c];break}}return a},parseName:function(a){var b,c,d,e=!1,f=a.indexOf("."),g=0===a.indexOf("./")||0===a.indexOf("../");return-1!==f&&(!g||f>1)?(b=a.substring(0,f),c=a.substring(f+1,a.length)):b=a,d=c||b,f=d.indexOf("!"),-1!==f&&(e="strip"===d.substring(f+1),d=d.substring(0,f),c?c=d:b=d),{moduleName:b,ext:c,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,c,d,e){var f,g,h,i=b.xdRegExp.exec(a);return i?(f=i[2],g=i[3],g=g.split(":"),h=g[1],g=g[0],!(f&&f!==c||g&&g.toLowerCase()!==d.toLowerCase()||(h||g)&&h!==e)):!0},finishLoad:function(a,c,d,e){d=c?b.strip(d):d,p.isBuild&&(o[a]=d),e(d)},load:function(a,c,d,e){if(e&&e.isBuild&&!e.inlineText)return void d();p.isBuild=e&&e.isBuild;var f=b.parseName(a),g=f.moduleName+(f.ext?"."+f.ext:""),h=c.toUrl(g),i=p.useXhr||b.useXhr;return 0===h.indexOf("empty:")?void d():void(!k||i(h,l,m,n)?b.get(h,function(c){b.finishLoad(a,f.strip,c,d)},function(a){d.error&&d.error(a)}):c([g],function(a){b.finishLoad(f.moduleName+"."+f.ext,f.strip,a,d)}))},write:function(a,c,d){if(o.hasOwnProperty(c)){var e=b.jsEscape(o[c]);d.asModule(a+"!"+c,"define(function () { return '"+e+"';});\n")}},writeFile:function(a,c,d,e,f){var g=b.parseName(c),h=g.ext?"."+g.ext:"",i=g.moduleName+h,j=d.toUrl(g.moduleName+h)+".js";b.load(i,d,function(){var c=function(a){return e(j,a)};c.asModule=function(a,b){return e.asModule(a,j,b)},b.write(a,i,c,f)},f)}},"node"===p.env||!p.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(d=c.nodeRequire("fs"),b.get=function(a,b,c){try{var e=d.readFileSync(a,"utf8");0===e.indexOf("")&&(e=e.substring(1)),b(e)}catch(f){c&&c(f)}}):"xhr"===p.env||!p.env&&b.createXhr()?b.get=function(a,c,d,e){var f,g=b.createXhr();if(g.open("GET",a,!0),e)for(f in e)e.hasOwnProperty(f)&&g.setRequestHeader(f.toLowerCase(),e[f]);p.onXhr&&p.onXhr(g,a),g.onreadystatechange=function(){var b,e;4===g.readyState&&(b=g.status||0,b>399&&600>b?(e=new Error(a+" HTTP status: "+b),e.xhr=g,d&&d(e)):c(g.responseText),p.onXhrComplete&&p.onXhrComplete(g,a))},g.send(null)}:"rhino"===p.env||!p.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?b.get=function(a,b){var c,d,e="utf-8",f=new java.io.File(a),g=java.lang.System.getProperty("line.separator"),h=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(f),e)),i="";try{for(c=new java.lang.StringBuffer,d=h.readLine(),d&&d.length()&&65279===d.charAt(0)&&(d=d.substring(1)),null!==d&&c.append(d);null!==(d=h.readLine());)c.append(g),c.append(d);i=String(c.toString())}finally{h.close()}b(i)}:("xpconnect"===p.env||!p.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(e=Components.classes,f=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),g="@mozilla.org/windows-registry-key;1"in e,b.get=function(a,b){var c,d,h,i={};g&&(a=a.replace(/\//g,"\\")),h=new FileUtils.File(a);try{c=e["@mozilla.org/network/file-input-stream;1"].createInstance(f.nsIFileInputStream),c.init(h,1,0,!1),d=e["@mozilla.org/intl/converter-input-stream;1"].createInstance(f.nsIConverterInputStream),d.init(c,"utf-8",c.available(),f.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),d.readString(c.available(),i),d.close(),c.close(),b(i.value)}catch(j){throw new Error((h&&h.path||"")+": "+j)}}),b}),d("../node_modules/requirejs-text/text!print.style.css",[],function(){return"body > * {\n visibility: hidden;\n}\nbody {\n overflow: hidden;\n}\nbody * {\n visibility: hidden !important;\n}\n\n.graphical-report__print-block {\n position: absolute;\n top: 0;\n left: 0;\n visibility: visible !important;\n display: block !important;\n width: 100%;\n /*height: 100%;*/\n}\n"}),function(){function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\+/g," "),e=c.join("=").replace(/\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?this._bodyBlob="string"==typeof a?new Blob([a]):a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(100>a||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}(),d("../bower_components/fetch/fetch",function(){}),function(a){"function"==typeof d&&d.amd?d("export",["tauCharts","canvg","FileSaver","promise","print.style.css","fetch"],function(b,c,d,e,f){return window.Promise=window.Promise||e.Promise,a(b,c,d,window.Promise,f)}):a(this.tauCharts,this.canvg,this.saveAs)}(function(a,b,c,d,e){function f(e){return{_createDataUrl:function(a){var c=this.cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(c).then(function(a){return a.join(" ")}).then(function(c){var d=l(c),e=document.createElement("div"),f=a.getSVG().cloneNode(!0);e.appendChild(f),h.select(f).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),f.insertBefore(d,f.firstChild),this._renderAdditionalInfo(f,a);var g=document.createElement("canvas");return g.height=f.getAttribute("height"),g.width=f.getAttribute("width"),b(g,f.parentNode.innerHTML),g.toDataURL("image/png")}.bind(this))},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;f>e;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g)})},_toPrint:function(a){this._createDataUrl(a).then(function(a){g=document.createElement("img"),g.classList.add("graphical-report__print-block");var b=g;document.body.appendChild(b),b.src=a,document.head.appendChild(m),b.onload=function(){window.print()}})},_renderAdditionalInfo:function(a,b){var c=b.getConfig(),d=j(c.spec.unit);if(d){d.guide=d.guide||{},d.guide.color=this._unit.guide.color;var e=d.guide.color.label.text||this._unit.options.color.dimension;a=h.select(a);{var f=parseInt(a.attr("width"),10);a.attr("height")}a.attr("width",f+160);var g=this._getColorMap(b),i=function(){this.attr("transform",function(a,b){return"translate(0,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("class",function(a){return a.color}),this.append("text").attr("x",12).attr("y",5).text(function(a){return a.label}).style({"font-size":"13px"})},k=a.append("g").attr("class","legend").attr("transform","translate("+(f+10)+",20)");k.append("text").text(e.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":"13px"}),k.selectAll("g").data(g).enter().append("g").call(i)}},onUnitReady:function(a,b){-1!==b.type.indexOf("ELEMENT")&&(this._unit=b)},_getColorMap:function(a){var b=this._unit.options.color,c=this._unit.color.scaleDim,d=a.getData();return i(d).chain().map(function(a){return b.legend(a[c])}).uniq(function(a){return a.value}).value().reduce(function(a,b){return a.push(b),a},[])},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===k.ESCAPE&&c.hide(),a.keyCode===k.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===k.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===k.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=p(),f=e?"focusin":"focus",g=e?"focusout":"blur";a.addEventListener(g,function(){d=setTimeout(function(){c.hide()},100)},!e),a.addEventListener(f,function(){clearTimeout(d)},!e),this._container.addEventListener("click",function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()})},init:function(b){e=e||{},this.cssPaths=e.cssPaths,this.cssPaths||(this.cssPaths=[],a.api.globalSettings.log("You should specified cssPath for correct work export plugin","warn")),this._container=b.insertToHeader('Export>');var c=b.addBalloon({place:"bottom-left"});c.content(['"].join("")),c.attach(this._container);var d=c.getElement();d.setAttribute("tabindex","-1"),this._handleMenu(d,b,c),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this))}}}var g,h=a.api.d3,i=a.api._,j=function(a){if(a.color)return a;var b,c,d,e=a.unit||[];for(b=0;b',_template:d.template('
<%=name%>
<%=items%>
'),_itemTemplate:d.template(["
\">",'
<%=label%>',"
"].join("")),_itemSizeTemplate:d.template(['
','
','
',"
",'
<%=value%>
',"
"].join("")),_renderColorLegend:function(a,b){if(a.color){var c=this._unit.options.color,e=this._unit.color.scaleDim;a.guide=a.guide||{},a.guide.color=this._unit.guide.color;var g=a.guide.color.label.text||c.dimension,h=this._getColorMap(b.getData({excludeFilter:["legend"]}),c,e);a.guide.color.brewer=h.brewer;var i=d.reduce(h.values,function(a,b){var c={dimension:e,value:b.value,color:b.color},h=JSON.stringify(c),i=d.escape(f(b.label)?"No "+g:b.label);return a.items.push(this._itemTemplate({color:b.color,classDisabled:this._currentFilters[h]?"disabled":"",label:i,value:d.escape(h)})),a.storageValues[h]=c,a},{items:[],storageValues:{}},this);this._storageValues=i.storageValues,this._container.insertAdjacentHTML("beforeend",this._template({items:i.items.join(""),name:g}))}},_renderSizeLegend:function(a,b){if(a.size){var e=this._unit.options.sizeScale,f=this._unit.size.scaleDim;a.guide=a.guide||{},a.guide.size=this._unit.guide.size;var g,h=a.guide.size.label.text||f,i=d.sortBy(b.getData(),function(a){return e(a[f])}),j=i.length,k=i[0][f],l=i[j-1][f];if(l-k){var m=Math.round((l-k)/5);g=[k,k+m,k+2*m,k+3*m,l]}else g=[k];var n=d.map(g,function(a){return this._itemSizeTemplate({diameter:c(2*e(a)),value:a})},this).reverse();this._container.insertAdjacentHTML("beforeend",this._template({items:'
'+n.join("")+"
",name:h}))}},onRender:function(a){if(this._container){this._container.innerHTML="";var b=this._findUnit(a);this._renderColorLegend(b,a),this._renderSizeLegend(b,a)}}}};return a.api.plugins.add("legend",g),g}),function(a){if("function"==typeof define&&define.amd)define(["tauCharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("tauCharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){return b=b||{},{template:['
','
','
','Exclude',"
","
"].join(""),itemTemplate:['
','
<%=label%>
','
<%=value%>
',"
"].join(""),onExcludeData:function(){},_drawPoint:function(a,b,c,d){this.circle&&this.circle.remove(),this.circle=a.append("circle").attr("cx",b).attr("cy",c).attr("class",d).attr("r",4),this.circle.node().addEventListener("mouseover",function(){clearTimeout(this._timeoutHideId) }.bind(this),!1),this.circle.node().addEventListener("mouseleave",function(){this._hide()}.bind(this),!1)},formatters:{},labels:{},init:function(a){this._chart=a,this._dataFields=b.fields,this._getDataFields=b.getFields,c.extend(this,c.omit(b,"fields","getFields")),this._timeoutHideId=null,this._dataWithCoords={},this._unitMeta={},this._templateItem=c.template(this.itemTemplate),this._tooltip=a.addBalloon({spacing:3,auto:!0,effectClass:"fade"}),this._elementTooltip=this._tooltip.getElement();var d=a.getConfig().spec,e=this._findDimensionGuides(d),f=c.reduce(e,function(a,b,d){return a[d]=c.last(b),a},{}),g=this._generateDefaultFormatters(f,d.dimensions);c.extend(this.formatters,g);var h=this._generateDefaultLabels(f);c.extend(this.labels,h);var i=this._elementTooltip;i.addEventListener("mouseover",function(){clearTimeout(this._timeoutHideId)}.bind(this),!1),i.addEventListener("mouseleave",function(){this._hide()}.bind(this),!1),i.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this._hide()),b=b.parentNode}.bind(this),!1),i.insertAdjacentHTML("afterbegin",this.template),this.afterInit(this._elementTooltip)},afterInit:function(){},onUnitReady:function(a,b){if(b.type&&0===b.type.indexOf("ELEMENT")){var c=this._generateKey(b.$where);this._unitMeta[c]=b;var d=b.partition();this._dataWithCoords[c]=d.map(function(a){return{x:b.options.xScale(a[b.x.scaleDim]),y:b.options.yScale(a[b.y.scaleDim]),item:a}},this)}},renderItem:function(a,b){return this._templateItem({label:a,value:b})},render:function(a,b){return b=c.unique(b),b.map(function(b){var c=a[b],d=this._getFormatter(b)(c),e=this._getLabel(b);return this.renderItem(e,d,b,c)},this).join("")},afterRender:function(){},onRender:function(a){c.isFunction(this._getDataFields)&&(this._dataFields=this._getDataFields(a)),this._hide()},_getFormatter:function(a){return this.formatters[a]||c.identity},_getLabel:function(a){return this.labels[a]||a},_generateDefaultLabels:function(a){return c.reduce(a,function(a,b,c){return a[c]=b.label||c,a},{})},_generateDefaultFormatters:function(b,d){return c.reduce(b,function(b,c,e){var f=function(b){if(null==b)return null;var f=c.tickPeriod||c.tickFormat;if(f){var g="x-time-auto"===f?"day":f;return a.api.tickFormat.get(g)(b)}return c.tickLabel?b[c.tickLabel]:d[e].value?b[d[e].value]:b};return b[e]=function(a){var b=f(a);return null==b?"No "+c.label:b},b},{})},_findDimensionGuides:function(a){var b={},c=function(a,c){var d=c[a];if(d){var e=(c.guide||{})[a];e&&(b[d]||(b[d]=[]),b[d].push(e))}};return f(a.unit,function(a){return c("x",a),c("y",a),c("color",a),c("size",a),!1}),b},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this._currentElement)}),this.onExcludeData(this._currentElement)},_calculateLength:function(a,b,c,d){return(c-a)*(c-a)+(d-b)*(d-b)},_calculateLengthToLine:function(a,b,c,d,f,g){var h={x:c-a,y:d-b},i={x:f-a,y:g-b},j=h.x*i.x+h.y*i.y;if(0>j)return e(a,f,b,g);var k={x:a-c,y:b-d},l={x:f-c,y:g-d},m=k.x*l.x+k.y*l.y;return 0>m?e(c,f,d,g):Math.abs(((c-a)*(g-b)-(d-b)*(f-a))/e(a,c,b,d))},_generateKey:function(a){return JSON.stringify(a)},_getFields:function(a){if(this._dataFields)return this._dataFields;for(var b=[a.size&&a.size.scaleDim,a.color&&a.color.scaleDim],d=[],e=[];a=a.parentUnit;)d.push(a.x.scaleDim),e.push(a.y.scaleDim);return c.compact(b.concat(e,d).reverse())},isLine:function(a){return a.elementData.hasOwnProperty("key")&&Array.isArray(a.elementData.values)},_onElementMouseOver:function(a,b,e,f){clearTimeout(this._timeoutHideId);var g=this._generateKey(b.cellData.$where),h=b.elementData,i=this.isLine(b);if(i){var j=this._dataWithCoords[g],k=j.filter(function(a){return c.contains(h.values,a.item)}),l=c.reduce(k,function(a,b,c,d){var f;if(c+1===d.length){var g=b;b=d[c-1],f=g}else f=d[c+1];var h=this._calculateLengthToLine(b.x,b.y,f.x,f.y,e[0],e[1]);return h1&&f("i-trendline-"+e,p,i.xScale,i.yScale,i.color(g),i.container,h)});var q=function(a){return function(){var b=e.select(this);b.classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-2":a})}};i.container.selectAll(".graphical-report__trendline").on("mouseenter",q(!0)).on("mouseleave",q(!1))}},containerTemplate:'
',template:d.template(['","
",'","
",'
<%= error %>
'].join("")),onRender:function(){this._container&&(this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:b.showTrend&&this._isApplicable?"checked":"",models:["linear","exponential","logarithmic"].map(function(a){var c=b.type===a?"selected":"";return""})}))}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;h>c;c++){for(f=c,d=c+1;h>d;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;h+1>e;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;h>d;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;h>e;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];cg;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;i>c;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;i>h;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;h>c;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;h>g;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;h>c;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;h>g;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;j>i;i++){for(var k=0,l=b.length;l>k;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;j>n;n++){for(var k=0,l=b.length;l>k;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;l>i;i++){for(var p=0,q=0;q=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d