Oa[a.id];a.name=p(b)?b:a.id;returna}functionrc(a){varb=a[0],c={},f=[],m,d;for(m=1;m<a.length;m++){c={};for(d=0;d<a[m].length;d++)c[b[d]]=a[m][d];f.push(c)}returnf}functionsc(a){varb=[],c,f,m;for(c=0;c<a.length;c++)for(m=a[c][0],f=1;f<a[c].length;f++)u(b[f-1])&&(b[f-1]={}),b[f-1][m]=a[c][f];returnb}functionPa(a){varb=d.keys(a[0]).filter(Ed),c=d.keys(a[0]).filter(qc);if(B&&0===c.length)returnV.alert('data.x or data.xs must be specified when axis.x.type == "timeseries"'),[];Db&&b.forEach(function(b){varm=
Oa[a.id];a.name=p(b)?b:a.id;returna}functionrc(a){varb=a[0],c={},f=[],m,d;for(m=1;m<a.length;m++){c={};for(d=0;d<a[m].length;d++)c[b[d]]=a[m][d];f.push(c)}returnf}functionsc(a){varb=[],c,f,m;for(c=0;c<a.length;c++)for(m=a[c][0],f=1;f<a[c].length;f++)u(b[f-1])&&(b[f-1]={}),b[f-1][m]=a[c][f];returnb}functionPa(a){varb=d.keys(a[0]).filter(Ed),c=d.keys(a[0]).filter(qc);if(B&&0===c.length)returnM.alert('data.x or data.xs must be specified when axis.x.type == "timeseries"'),[];Db&&b.forEach(function(b){varm=
a:a.id;return"spline"===D[a]||"area-spline"===D[a]}functionKa(a){return"bar"===D["string"===typeofa?a:a.id]}functionLc(a){return"pie"===D["string"===typeofa?a:a.id]}functionMc(a){returnKa(a)?a.values:[]}functionMd(a){varb;(b=Fb(a))||(b="scatter"===D["string"===typeofa?a:a.id]);returnb?a.values:[]}functionpa(a){varb;if(!a)throwError(a+" can not be parsed as d3.time with format "+Gb+". Maybe 'x' of this data is not defined. See data.x or data.xs option.");b=d.time.format(Gb).parse(a);if(!b)throwError("Failed to parse '"+
a+"' with format "+Gb);returnb}functionNc(a,b){varc=d.mouse(a),f=d.select(a),m=1*f.attr("cx"),f=1*f.attr("cy");returnMath.sqrt(Math.pow(m-c[0],2)+Math.pow(f-c[1],2))<b}functionOc(a){varb=d.mouse(a),c=d.select(a);a=1*c.attr("x");varf=1*c.attr("y"),c=1*c.attr("width");returna-10<b[0]&&b[0]<a+c+10&&f-10<b[1]}functionNd(a,b){varc;for(c=0;c<b.length;c++)if(b[c].start<a&&a<=b[c].end)return!0;return!1}functionDd(a,b){varc=!1;Object.keys(a).forEach(function(f){a[f]===b&&(c=!0)});returnc}functionEb(a,
e))};for(d=0;d<a.length;d++)if(u(r)||!Nd(a[d].x,r))h+=" "+Uc(a[d])+" "+q(a[d]);else{k=M(a[d-1].x,a[d].x);l=K(a[d-1].value,a[d].value);e=b(a[d].x)-b(a[d-1].x);n=c(a[d].value)-c(a[d-1].value);e=Math.sqrt(Math.pow(e,2)+Math.pow(n,2));n=2/e;vars=2*n;for(e=n;1>=e;e+=s)h+=f(a[d-1],a[d],e,n)}returnh}functionMb(a){varb,c;pb=d.select(wa);if(pb.empty())V.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');else{pb.html("");
e))};for(d=0;d<a.length;d++)if(u(r)||!Nd(a[d].x,r))h+=" "+Uc(a[d])+" "+q(a[d]);else{k=N(a[d-1].x,a[d].x);l=K(a[d-1].value,a[d].value);e=b(a[d].x)-b(a[d-1].x);n=c(a[d].value)-c(a[d-1].value);e=Math.sqrt(Math.pow(e,2)+Math.pow(n,2));n=2/e;vars=2*n;for(e=n;1>=e;e+=s)h+=f(a[d-1],a[d],e,n)}returnh}functionMb(a){varb,c;pb=d.select(wa);if(pb.empty())M.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');else{pb.html("");
".target-"+a:".target"}functionVb(a){returnuc(a.id)}functionWb(a){return"data"ina&&uc(a.data.id)}varh={data:{}},mb={},ca="_expanded_",ka="_selected_",Ub="_included_",wa=e(["bindto"],"#chart"),bb=e(["size","width"],null),ic=e(["size","height"],null),ec=e(["padding","left"],null),cc=e(["padding","right"],null),ra=e(["zoom","enabled"],!1),fd=e(["zoom","extent"],null),ce=e(["zoom","privileged"],!1),Wd=e(["onenter"],function(){}),Xd=e(["onleave"],function(){});if(!("data"inda))throwError("data is required in config");
(Ja=a.categories,H.categories(Ja));if("cacheIds"ina&&Bd(a.cacheIds))Xa(Cd(a.cacheIds),a.done);elseif("data"ina)Xa(Pa(a.data),a.done);elseif("url"ina)d.csv(a.url,function(b,c){Xa(Pa(c),a.done)});elseif("rows"ina)Xa(Pa(rc(a.rows)),a.done);elseif("columns"ina)Xa(Pa(sc(a.columns)),a.done);elsethrowError("url or rows or columns is required.");};h.unload=function(a){h.data.targets=h.data.targets.filter(function(b){returnb.id!==a});q.selectAll(".target-"+a).transition().style("opacity",0).remove();
h.data.get=function(a){a=h.data.getAsTarget(a);returnp(a)?a.values.map(function(a){returna.value}):void0};h.data.getAsTarget=function(a){varb=kb(function(b){returnb.id===a});return0<b.length?b[0]:void0};h.destroy=function(){h.data.targets=void0;h.data.x={};pb.html("");V.onresize=null};if("url"inda.data)d.csv(da.data.url,function(a,b){Mb(b)});elseif("rows"inda.data)Mb(rc(da.data.rows));elseif("columns"inda.data)Mb(sc(da.data.columns));elsethrowError("url or rows or columns is required.");
"enabled"],!1),fd=e(["zoom","extent"],null),ce=e(["zoom","privileged"],!1),Wd=e(["onenter"],function(){}),Xd=e(["onleave"],function(){});if(!("data"inda))throwError("data is required in config");varqa=e(["data","x"],null),ba=e(["data","xs"],null),Gb=e(["data","x_format"],"%Y-%m-%d"),Fd=e(["data","id_converter"],function(a){returna}),Oa=e(["data","names"],{}),y=e(["data","groups"],[]),nc=e(["data","axes"],{}),cd=e(["data","type"],null),D=e(["data","types"],{}),gd=e(["data","regions"],{}),ne=e(["data",
a.done);elsethrowError("url or rows or columns is required.");};h.unload=function(a){h.data.targets=h.data.targets.filter(function(b){returnb.id!==a});q.selectAll(".target-"+a).transition().style("opacity",0).remove();Ba&&(q.selectAll(".legend-item-"+a).remove(),sb(h.data.targets));0<h.data.targets.length&&F({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})};h.selected=function(a){a=p(a)?"-"+a:"";returnd.merge(k.selectAll(".-shapes"+a).selectAll(".-shape").filter(function(){returnd.select(this).classed(ka)}).map(function(a){returna.map(function(a){returna.__data__})}))};