All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.c3.c3.min.js Maven / Gradle / Ivy

The newest version!

(function(aa){var j={version:"0.4.11"};var y,C,m;function R(at){this.owner=at}function w(av,at){if(Object.create){at.prototype=Object.create(av.prototype)}else{var au=function au(){};au.prototype=av.prototype;at.prototype=new au()}at.prototype.constructor=at;return at}function W(av){var au=this.internal=new am(this);au.loadConfig(av);au.beforeInit(av);au.init();au.afterInit(av);(function at(aw,ay,ax){Object.keys(aw).forEach(function(az){ay[az]=aw[az].bind(ax);if(Object.keys(aw[az]).length>0){at(aw[az],ay[az],ax)}})})(y,this,this)}function am(au){var at=this;at.d3=aa.d3?aa.d3:typeof require!=="undefined"?require("d3"):undefined;at.api=au;at.config=at.getDefaultConfig();at.data={};at.cache={};at.axes={}}j.generate=function(at){return new W(at)};j.chart={fn:W.prototype,internal:{fn:am.prototype,axis:{fn:u.prototype}}};y=j.chart.fn;C=j.chart.internal.fn;m=j.chart.internal.axis.fn;C.beforeInit=function(){};C.afterInit=function(){};C.init=function(){var at=this,au=at.config;at.initParams();if(au.data_url){at.convertUrlToData(au.data_url,au.data_mimeType,au.data_headers,au.data_keys,at.initWithData)}else{if(au.data_json){at.initWithData(at.convertJsonToData(au.data_json,au.data_keys))}else{if(au.data_rows){at.initWithData(at.convertRowsToData(au.data_rows))}else{if(au.data_columns){at.initWithData(at.convertColumnsToData(au.data_columns))}else{throw Error("url or json or rows or columns is required.")}}}}};C.initParams=function(){var at=this,av=at.d3,au=at.config;at.clipId="c3-"+(+new Date())+"-clip",at.clipIdForXAxis=at.clipId+"-xaxis",at.clipIdForYAxis=at.clipId+"-yaxis",at.clipIdForGrid=at.clipId+"-grid",at.clipIdForSubchart=at.clipId+"-subchart",at.clipPath=at.getClipPath(at.clipId),at.clipPathForXAxis=at.getClipPath(at.clipIdForXAxis),at.clipPathForYAxis=at.getClipPath(at.clipIdForYAxis);at.clipPathForGrid=at.getClipPath(at.clipIdForGrid),at.clipPathForSubchart=at.getClipPath(at.clipIdForSubchart),at.dragStart=null;at.dragging=false;at.flowing=false;at.cancelClick=false;at.mouseover=false;at.transiting=false;at.color=at.generateColor();at.levelColor=at.generateLevelColor();at.dataTimeFormat=au.data_xLocaltime?av.time.format:av.time.format.utc;at.axisTimeFormat=au.axis_x_localtime?av.time.format:av.time.format.utc;at.defaultAxisTimeFormat=at.axisTimeFormat.multi([[".%L",function(aw){return aw.getMilliseconds()}],[":%S",function(aw){return aw.getSeconds()}],["%I:%M",function(aw){return aw.getMinutes()}],["%I %p",function(aw){return aw.getHours()}],["%-m/%-d",function(aw){return aw.getDay()&&aw.getDate()!==1}],["%-m/%-d",function(aw){return aw.getDate()!==1}],["%-m/%-d",function(aw){return aw.getMonth()}],["%Y/%-m/%-d",function(){return true}]]);at.hiddenTargetIds=[];at.hiddenLegendIds=[];at.focusedTargetIds=[];at.defocusedTargetIds=[];at.xOrient=au.axis_rotated?"left":"bottom";at.yOrient=au.axis_rotated?(au.axis_y_inner?"top":"bottom"):(au.axis_y_inner?"right":"left");at.y2Orient=au.axis_rotated?(au.axis_y2_inner?"bottom":"top"):(au.axis_y2_inner?"left":"right");at.subXOrient=au.axis_rotated?"left":"bottom";at.isLegendRight=au.legend_position==="right";at.isLegendInset=au.legend_position==="inset";at.isLegendTop=au.legend_inset_anchor==="top-left"||au.legend_inset_anchor==="top-right";at.isLegendLeft=au.legend_inset_anchor==="top-left"||au.legend_inset_anchor==="bottom-left";at.legendStep=0;at.legendItemWidth=0;at.legendItemHeight=0;at.currentMaxTickWidths={x:0,y:0,y2:0};at.rotated_padding_left=30;at.rotated_padding_right=au.axis_rotated&&!au.axis_x_show?0:30;at.rotated_padding_top=5;at.withoutFadeIn={};at.intervalForObserveInserted=undefined;at.axes.subx=av.selectAll([])};C.initChartElements=function(){if(this.initBar){this.initBar()}if(this.initLine){this.initLine()}if(this.initArc){this.initArc()}if(this.initGauge){this.initGauge()}if(this.initText){this.initText()}};C.initWithData=function(ay){var av=this,ax=av.d3,aw=av.config;var au,at,az=true;av.axis=new u(av);if(av.initPie){av.initPie()}if(av.initBrush){av.initBrush()}if(av.initZoom){av.initZoom()}if(!aw.bindto){av.selectChart=ax.selectAll([])}else{if(typeof aw.bindto.node==="function"){av.selectChart=aw.bindto}else{av.selectChart=ax.select(aw.bindto)}}if(av.selectChart.empty()){av.selectChart=ax.select(document.createElement("div")).style("opacity",0);av.observeInserted(av.selectChart);az=false}av.selectChart.html("").classed("c3",true);av.data.xs={};av.data.targets=av.convertDataToTargets(ay);if(aw.data_filter){av.data.targets=av.data.targets.filter(aw.data_filter)}if(aw.data_hide){av.addHiddenTargetIds(aw.data_hide===true?av.mapToIds(av.data.targets):aw.data_hide)}if(aw.legend_hide){av.addHiddenLegendIds(aw.legend_hide===true?av.mapToIds(av.data.targets):aw.legend_hide)}if(av.hasType("gauge")){aw.legend_show=false}av.updateSizes();av.updateScales();av.x.domain(ax.extent(av.getXDomain(av.data.targets)));av.y.domain(av.getYDomain(av.data.targets,"y"));av.y2.domain(av.getYDomain(av.data.targets,"y2"));av.subX.domain(av.x.domain());av.subY.domain(av.y.domain());av.subY2.domain(av.y2.domain());av.orgXDomain=av.x.domain();if(av.brush){av.brush.scale(av.subX)}if(aw.zoom_enabled){av.zoom.scale(av.x)}av.svg=av.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return aw.onmouseover.call(av)}).on("mouseleave",function(){return aw.onmouseout.call(av)});if(av.config.svg_classname){av.svg.attr("class",av.config.svg_classname)}au=av.svg.append("defs");av.clipChart=av.appendClip(au,av.clipId);av.clipXAxis=av.appendClip(au,av.clipIdForXAxis);av.clipYAxis=av.appendClip(au,av.clipIdForYAxis);av.clipGrid=av.appendClip(au,av.clipIdForGrid);av.clipSubchart=av.appendClip(au,av.clipIdForSubchart);av.updateSvgSize();at=av.main=av.svg.append("g").attr("transform",av.getTranslate("main"));if(av.initSubchart){av.initSubchart()}if(av.initTooltip){av.initTooltip()}if(av.initLegend){av.initLegend()}if(av.initTitle){av.initTitle()}at.append("text").attr("class",A.text+" "+A.empty).attr("text-anchor","middle").attr("dominant-baseline","middle");av.initRegion();av.initGrid();at.append("g").attr("clip-path",av.clipPath).attr("class",A.chart);if(aw.grid_lines_front){av.initGridLines()}av.initEventRect();av.initChartElements();at.insert("rect",aw.zoom_privileged?null:"g."+A.regions).attr("class",A.zoomRect).attr("width",av.width).attr("height",av.height).style("opacity",0).on("dblclick.zoom",null);if(aw.axis_x_extent){av.brush.extent(av.getDefaultExtent())}av.axis.init();av.updateTargets(av.data.targets);if(az){av.updateDimension();av.config.oninit.call(av);av.redraw({withTransition:false,withTransform:true,withUpdateXDomain:true,withUpdateOrgXDomain:true,withTransitionForAxis:false})}av.bindResize();av.api.element=av.selectChart.node()};C.smoothLines=function(av,au){var at=this;if(au==="grid"){av.each(function(){var aA=at.d3.select(this),ax=aA.attr("x1"),aw=aA.attr("x2"),az=aA.attr("y1"),ay=aA.attr("y2");aA.attr({x1:Math.ceil(ax),x2:Math.ceil(aw),y1:Math.ceil(az),y2:Math.ceil(ay)})})}};C.updateSizes=function(){var au=this,aw=au.config;var at=au.legend?au.getLegendHeight():0,az=au.legend?au.getLegendWidth():0,ay=au.isLegendRight||au.isLegendInset?0:at,av=au.hasArcType(),ax=aw.axis_rotated||av?0:au.getHorizontalAxisHeight("x"),aA=aw.subchart_show&&!av?(aw.subchart_size_height+ax):0;au.currentWidth=au.getCurrentWidth();au.currentHeight=au.getCurrentHeight();au.margin=aw.axis_rotated?{top:au.getHorizontalAxisHeight("y2")+au.getCurrentPaddingTop(),right:av?0:au.getCurrentPaddingRight(),bottom:au.getHorizontalAxisHeight("y")+ay+au.getCurrentPaddingBottom(),left:aA+(av?0:au.getCurrentPaddingLeft())}:{top:4+au.getCurrentPaddingTop(),right:av?0:au.getCurrentPaddingRight(),bottom:ax+aA+ay+au.getCurrentPaddingBottom(),left:av?0:au.getCurrentPaddingLeft()};au.margin2=aw.axis_rotated?{top:au.margin.top,right:NaN,bottom:20+ay,left:au.rotated_padding_left}:{top:au.currentHeight-aA-ay,right:NaN,bottom:ax+ay,left:au.margin.left};au.margin3={top:0,right:NaN,bottom:0,left:0};if(au.updateSizeForLegend){au.updateSizeForLegend(at,az)}au.width=au.currentWidth-au.margin.left-au.margin.right;au.height=au.currentHeight-au.margin.top-au.margin.bottom;if(au.width<0){au.width=0}if(au.height<0){au.height=0}au.width2=aw.axis_rotated?au.margin.left-au.rotated_padding_left-au.rotated_padding_right:au.width;au.height2=aw.axis_rotated?au.height:au.currentHeight-au.margin2.top-au.margin2.bottom;if(au.width2<0){au.width2=0}if(au.height2<0){au.height2=0}au.arcWidth=au.width-(au.isLegendRight?az+10:0);au.arcHeight=au.height-(au.isLegendRight?0:10);if(au.hasType("gauge")&&!aw.gauge_fullCircle){au.arcHeight+=au.height-au.getGaugeLabelHeight()}if(au.updateRadius){au.updateRadius()}if(au.isLegendRight&&av){au.margin3.left=au.arcWidth/2+au.radiusExpanded*1.1}};C.updateTargets=function(at){var au=this;au.updateTargetsForText(at);au.updateTargetsForBar(at);au.updateTargetsForLine(at);if(au.hasArcType()&&au.updateTargetsForArc){au.updateTargetsForArc(at)}if(au.updateTargetsForSubchart){au.updateTargetsForSubchart(at)}au.showTargets()};C.showTargets=function(){var at=this;at.svg.selectAll("."+A.target).filter(function(au){return at.isTargetToShow(au.id)}).transition().duration(at.config.transition_duration).style("opacity",1)};C.redraw=function(aJ,az){var aZ=this,av=aZ.main,aY=aZ.d3,aV=aZ.config;var aU=aZ.getShapeIndices(aZ.isAreaType),aP=aZ.getShapeIndices(aZ.isBarType),aX=aZ.getShapeIndices(aZ.isLineType);var aB,aS,a1,aG,aW,ay,aN,a4,aE,a7,aL,aF,a5;var aT=aZ.hasArcType();var aw,a0,aR,at,ax;var aK,aC,aO;var a6,a3;var aQ=aZ.filterTargetsToShow(aZ.data.targets),aD,a2,aA,au;var aM=aZ.xv.bind(aZ),aI,aH;aJ=aJ||{};aB=r(aJ,"withY",true);aS=r(aJ,"withSubchart",true);a1=r(aJ,"withTransition",true);ay=r(aJ,"withTransform",false);aN=r(aJ,"withUpdateXDomain",false);a4=r(aJ,"withUpdateOrgXDomain",false);aE=r(aJ,"withTrimXDomain",true);a5=r(aJ,"withUpdateXAxis",aN);a7=r(aJ,"withLegend",false);aL=r(aJ,"withEventRect",true);aF=r(aJ,"withDimension",true);aG=r(aJ,"withTransitionForExit",a1);aW=r(aJ,"withTransitionForAxis",a1);aK=a1?aV.transition_duration:0;aC=aG?aK:0;aO=aW?aK:0;az=az||aZ.axis.generateTransitions(aO);if(a7&&aV.legend_show){aZ.updateLegend(aZ.mapToIds(aZ.data.targets),aJ,az)}else{if(aF){aZ.updateDimension(true)}}if(aZ.isCategorized()&&aQ.length===0){aZ.x.domain([0,aZ.axes.x.selectAll(".tick").size()])}if(aQ.length){aZ.updateXDomain(aQ,aN,a4,aE);if(!aV.axis_x_tick_values){aD=aZ.axis.updateXAxisTickValues(aQ)}}else{aZ.xAxis.tickValues([]);aZ.subXAxis.tickValues([])}if(aV.zoom_rescale&&!aJ.flow){au=aZ.x.orgDomain()}aZ.y.domain(aZ.getYDomain(aQ,"y",au));aZ.y2.domain(aZ.getYDomain(aQ,"y2",au));if(!aV.axis_y_tick_values&&aV.axis_y_tick_count){aZ.yAxis.tickValues(aZ.axis.generateTickValues(aZ.y.domain(),aV.axis_y_tick_count))}if(!aV.axis_y2_tick_values&&aV.axis_y2_tick_count){aZ.y2Axis.tickValues(aZ.axis.generateTickValues(aZ.y2.domain(),aV.axis_y2_tick_count))}aZ.axis.redraw(az,aT);aZ.axis.updateLabels(a1);if((aN||a5)&&aQ.length){if(aV.axis_x_tick_culling&&aD){for(a2=1;a2=0){aY.select(this).style("display",a8%aA?"none":"block")}})}else{aZ.svg.selectAll("."+A.axisX+" .tick text").style("display","block")}}aw=aZ.generateDrawArea?aZ.generateDrawArea(aU,false):undefined;a0=aZ.generateDrawBar?aZ.generateDrawBar(aP):undefined;aR=aZ.generateDrawLine?aZ.generateDrawLine(aX,false):undefined;at=aZ.generateXYForText(aU,aP,aX,true);ax=aZ.generateXYForText(aU,aP,aX,false);if(aB){aZ.subY.domain(aZ.getYDomain(aQ,"y"));aZ.subY2.domain(aZ.getYDomain(aQ,"y2"))}aZ.updateXgridFocus();av.select("text."+A.text+"."+A.empty).attr("x",aZ.width/2).attr("y",aZ.height/2).text(aV.data_empty_label_text).transition().style("opacity",aQ.length?0:1);aZ.updateGrid(aK);aZ.updateRegion(aK);aZ.updateBar(aC);aZ.updateLine(aC);aZ.updateArea(aC);aZ.updateCircle();if(aZ.hasDataLabel()){aZ.updateText(aC)}if(aZ.redrawTitle){aZ.redrawTitle()}if(aZ.redrawArc){aZ.redrawArc(aK,aC,ay)}if(aZ.redrawSubchart){aZ.redrawSubchart(aS,az,aK,aC,aU,aP,aX)}av.selectAll("."+A.selectedCircles).filter(aZ.isBarType.bind(aZ)).selectAll("circle").remove();if(aV.interaction_enabled&&!aJ.flow&&aL){aZ.redrawEventRect();if(aZ.updateZoom){aZ.updateZoom()}}aZ.updateCircleY();aI=(aZ.config.axis_rotated?aZ.circleY:aZ.circleX).bind(aZ);aH=(aZ.config.axis_rotated?aZ.circleX:aZ.circleY).bind(aZ);if(aJ.flow){a3=aZ.generateFlow({targets:aQ,flow:aJ.flow,duration:aJ.flow.duration,drawBar:a0,drawLine:aR,drawArea:aw,cx:aI,cy:aH,xv:aM,xForText:at,yForText:ax})}if((aK||a3)&&aZ.isTabVisible()){aY.transition().duration(aK).each(function(){var a8=[];[aZ.redrawBar(a0,true),aZ.redrawLine(aR,true),aZ.redrawArea(aw,true),aZ.redrawCircle(aI,aH,true),aZ.redrawText(at,ax,aJ.flow,true),aZ.redrawRegion(true),aZ.redrawGrid(true),].forEach(function(a9){a9.forEach(function(ba){a8.push(ba)})});a6=aZ.generateWait();a8.forEach(function(a9){a6.add(a9)})}).call(a6,function(){if(a3){a3()}if(aV.onrendered){aV.onrendered.call(aZ)}})}else{aZ.redrawBar(a0);aZ.redrawLine(aR);aZ.redrawArea(aw);aZ.redrawCircle(aI,aH);aZ.redrawText(at,ax,aJ.flow);aZ.redrawRegion();aZ.redrawGrid();if(aV.onrendered){aV.onrendered.call(aZ)}}aZ.mapToIds(aZ.data.targets).forEach(function(a8){aZ.withoutFadeIn[a8]=true})};C.updateAndRedraw=function(av){var at=this,au=at.config,aw;av=av||{};av.withTransition=r(av,"withTransition",true);av.withTransform=r(av,"withTransform",false);av.withLegend=r(av,"withLegend",false);av.withUpdateXDomain=true;av.withUpdateOrgXDomain=true;av.withTransitionForExit=false;av.withTransitionForTransform=r(av,"withTransitionForTransform",av.withTransition);at.updateSizes();if(!(av.withLegend&&au.legend_show)){aw=at.axis.generateTransitions(av.withTransitionForAxis?au.transition_duration:0);at.updateScales();at.updateSvgSize();at.transformAll(av.withTransitionForTransform,aw)}at.redraw(av,aw)};C.redrawWithoutRescale=function(){this.redraw({withY:false,withSubchart:false,withEventRect:false,withTransitionForAxis:false})};C.isTimeSeries=function(){return this.config.axis_x_type==="timeseries"};C.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0};C.isCustomX=function(){var at=this,au=at.config;return !at.isTimeSeries()&&(au.data_x||I(au.data_xs))};C.isTimeSeriesY=function(){return this.config.axis_y_type==="timeseries"};C.getTranslate=function(aw){var au=this,av=au.config,at,ax;if(aw==="main"){at=T(au.margin.left);ax=T(au.margin.top)}else{if(aw==="context"){at=T(au.margin2.left);ax=T(au.margin2.top)}else{if(aw==="legend"){at=au.margin3.left;ax=au.margin3.top}else{if(aw==="x"){at=0;ax=av.axis_rotated?0:au.height}else{if(aw==="y"){at=0;ax=av.axis_rotated?au.height:0}else{if(aw==="y2"){at=av.axis_rotated?0:au.width;ax=av.axis_rotated?1:0}else{if(aw==="subx"){at=0;ax=av.axis_rotated?0:au.height2}else{if(aw==="arc"){at=au.arcWidth/2;ax=au.arcHeight/2}}}}}}}}return"translate("+at+","+ax+")"};C.initialOpacity=function(at){return at.value!==null&&this.withoutFadeIn[at.id]?1:0};C.initialOpacityForCircle=function(at){return at.value!==null&&this.withoutFadeIn[at.id]?this.opacityForCircle(at):0};C.opacityForCircle=function(au){var at=this.config.point_show?1:0;return f(au.value)?(this.isScatterType(au)?0.5:at):0};C.opacityForText=function(){return this.hasDataLabel()?1:0};C.xx=function(at){return at?this.x(at.x):null};C.xv=function(av){var at=this,au=av.value;if(at.isTimeSeries()){au=at.parseDate(av.value)}else{if(at.isCategorized()&&typeof av.value==="string"){au=at.config.axis_x_categories.indexOf(av.value)}}return Math.ceil(at.x(au))};C.yv=function(av){var at=this,au=av.axis&&av.axis==="y2"?at.y2:at.y;return Math.ceil(au(av.value))};C.subxx=function(at){return at?this.subX(at.x):null};C.transformMain=function(av,ay){var au=this,ax,at,aw;if(ay&&ay.axisX){ax=ay.axisX}else{ax=au.main.select("."+A.axisX);if(av){ax=ax.transition()}}if(ay&&ay.axisY){at=ay.axisY}else{at=au.main.select("."+A.axisY);if(av){at=at.transition()}}if(ay&&ay.axisY2){aw=ay.axisY2}else{aw=au.main.select("."+A.axisY2);if(av){aw=aw.transition()}}(av?au.main.transition():au.main).attr("transform",au.getTranslate("main"));ax.attr("transform",au.getTranslate("x"));at.attr("transform",au.getTranslate("y"));aw.attr("transform",au.getTranslate("y2"));au.main.select("."+A.chartArcs).attr("transform",au.getTranslate("arc"))};C.transformAll=function(au,av){var at=this;at.transformMain(au,av);if(at.config.subchart_show){at.transformContext(au,av)}if(at.legend){at.transformLegend(au)}};C.updateSvgSize=function(){var au=this,at=au.svg.select(".c3-brush .background");au.svg.attr("width",au.currentWidth).attr("height",au.currentHeight);au.svg.selectAll(["#"+au.clipId,"#"+au.clipIdForGrid]).select("rect").attr("width",au.width).attr("height",au.height);au.svg.select("#"+au.clipIdForXAxis).select("rect").attr("x",au.getXAxisClipX.bind(au)).attr("y",au.getXAxisClipY.bind(au)).attr("width",au.getXAxisClipWidth.bind(au)).attr("height",au.getXAxisClipHeight.bind(au));au.svg.select("#"+au.clipIdForYAxis).select("rect").attr("x",au.getYAxisClipX.bind(au)).attr("y",au.getYAxisClipY.bind(au)).attr("width",au.getYAxisClipWidth.bind(au)).attr("height",au.getYAxisClipHeight.bind(au));au.svg.select("#"+au.clipIdForSubchart).select("rect").attr("width",au.width).attr("height",at.size()?at.attr("height"):0);au.svg.select("."+A.zoomRect).attr("width",au.width).attr("height",au.height);au.selectChart.style("max-height",au.currentHeight+"px")};C.updateDimension=function(au){var at=this;if(!au){if(at.config.axis_rotated){at.axes.x.call(at.xAxis);at.axes.subx.call(at.subXAxis)}else{at.axes.y.call(at.yAxis);at.axes.y2.call(at.y2Axis)}}at.updateSizes();at.updateScales();at.updateSvgSize();at.transformAll(false)};C.observeInserted=function(av){var au=this,at;if(typeof MutationObserver==="undefined"){aa.console.error("MutationObserver not defined.");return}at=new MutationObserver(function(aw){aw.forEach(function(ax){if(ax.type==="childList"&&ax.previousSibling){at.disconnect();au.intervalForObserveInserted=aa.setInterval(function(){if(av.node().parentNode){aa.clearInterval(au.intervalForObserveInserted);au.updateDimension();if(au.brush){au.brush.update()}au.config.oninit.call(au);au.redraw({withTransform:true,withUpdateXDomain:true,withUpdateOrgXDomain:true,withTransition:false,withTransitionForTransform:false,withLegend:true});av.transition().style("opacity",1)}},10)}})});at.observe(av.node(),{attributes:true,childList:true,characterData:true})};C.bindResize=function(){var at=this,au=at.config;at.resizeFunction=at.generateResize();at.resizeFunction.add(function(){au.onresize.call(at)});if(au.resize_auto){at.resizeFunction.add(function(){if(at.resizeTimeout!==undefined){aa.clearTimeout(at.resizeTimeout)}at.resizeTimeout=aa.setTimeout(function(){delete at.resizeTimeout;at.api.flush()},100)})}at.resizeFunction.add(function(){au.onresized.call(at)});if(aa.attachEvent){aa.attachEvent("onresize",at.resizeFunction)}else{if(aa.addEventListener){aa.addEventListener("resize",at.resizeFunction,false)}else{var av=aa.onresize;if(!av){av=at.generateResize()}else{if(!av.add||!av.remove){av=at.generateResize();av.add(aa.onresize)}}av.add(at.resizeFunction);aa.onresize=av}}};C.generateResize=function(){var at=[];function au(){at.forEach(function(av){av()})}au.add=function(av){at.push(av)};au.remove=function(aw){for(var av=0;av0){ay=aD.hasNegativeValueInTargets(az);for(ax=0;ax=0});if(aA.length===0){continue}aB=aA[0];if(ay&&aC[aB]){aC[aB].forEach(function(aE,aF){aC[aB][aF]=aE<0?aE:0})}for(aw=1;aw0)){aC[aB][aF]+=+aE}})}}}return aD.d3.min(Object.keys(aC).map(function(aE){return aD.d3.min(aC[aE])}))};C.getYDomainMax=function(az){var aD=this,aw=aD.config,at=aD.mapToIds(az),aC=aD.getValuesAsIdKeyed(az),ay,ax,aB,aA,au,av;if(aw.data_groups.length>0){av=aD.hasPositiveValueInTargets(az);for(ay=0;ay=0});if(aA.length===0){continue}aB=aA[0];if(av&&aC[aB]){aC[aB].forEach(function(aE,aF){aC[aB][aF]=aE>0?aE:0})}for(ax=1;ax=0&&aJ>=0;aI=aH<=0&&aJ<=0;if((f(at)&&aB)||(f(au)&&aI)){aL=false}if(aL){if(aB){aH=0}if(aI){aJ=0}}ay=Math.abs(aJ-aH);aF=aw=aS=ay*0.1;if(typeof aP!=="undefined"){aC=Math.max(Math.abs(aH),Math.abs(aJ));aJ=aP+aC;aH=aP-aC}if(aM){ax=aD.getDataLabelLength(aH,aJ,"width");aE=K(aD.y.range());az=[ax[0]/aE,ax[1]/aE];aw+=ay*(az[1]/(1-az[0]-az[1]));aS+=ay*(az[0]/(1-az[0]-az[1]))}else{if(aG){ax=aD.getDataLabelLength(aH,aJ,"height");aw+=aD.axis.convertPixelsToAxisPadding(ax[1],ay);aS+=aD.axis.convertPixelsToAxisPadding(ax[0],ay)}}if(aN==="y"&&I(aR.axis_y_padding)){aw=aD.axis.getPadding(aR.axis_y_padding,"top",aw,ay);aS=aD.axis.getPadding(aR.axis_y_padding,"bottom",aS,ay)}if(aN==="y2"&&I(aR.axis_y2_padding)){aw=aD.axis.getPadding(aR.axis_y2_padding,"top",aw,ay);aS=aD.axis.getPadding(aR.axis_y2_padding,"bottom",aS,ay)}if(aL){if(aB){aS=aH}if(aI){aw=-aJ}}aT=[aH-aS,aJ+aw];return aO?aT.reverse():aT};C.getXDomainMin=function(at){var au=this,av=au.config;return F(av.axis_x_min)?(au.isTimeSeries()?this.parseDate(av.axis_x_min):av.axis_x_min):au.d3.min(at,function(aw){return au.d3.min(aw.values,function(ax){return ax.x})})};C.getXDomainMax=function(at){var au=this,av=au.config;return F(av.axis_x_max)?(au.isTimeSeries()?this.parseDate(av.axis_x_max):av.axis_x_max):au.d3.max(at,function(aw){return au.d3.max(aw.values,function(ax){return ax.x})})};C.getXDomainPadding=function(aw){var at=this,av=at.config,ay=aw[1]-aw[0],az,ax,au,aA;if(at.isCategorized()){ax=0}else{if(at.hasType("bar")){az=at.getMaxDataCount();ax=az>1?(ay/(az-1))/2:0.5}else{ax=ay*0.01}}if(typeof av.axis_x_padding==="object"&&I(av.axis_x_padding)){au=f(av.axis_x_padding.left)?av.axis_x_padding.left:ax;aA=f(av.axis_x_padding.right)?av.axis_x_padding.right:ax}else{if(typeof av.axis_x_padding==="number"){au=aA=av.axis_x_padding}else{au=aA=ax}}return{left:au,right:aA}};C.getXDomain=function(au){var av=this,ax=[av.getXDomainMin(au),av.getXDomainMax(au)],aw=ax[0],az=ax[1],aA=av.getXDomainPadding(ax),ay=0,at=0;if((aw-az)===0&&!av.isCategorized()){if(av.isTimeSeries()){aw=new Date(aw.getTime()*0.5);az=new Date(az.getTime()*1.5)}else{aw=aw===0?1:(aw*0.5);az=az===0?-1:(az*1.5)}}if(aw||aw===0){ay=av.isTimeSeries()?new Date(aw.getTime()-aA.left):aw-aA.left}if(az||az===0){at=av.isTimeSeries()?new Date(az.getTime()+aA.right):az+aA.right}return[ay,at]};C.updateXDomain=function(au,ax,az,at,ay){var av=this,aw=av.config;if(az){av.x.domain(ay?ay:av.d3.extent(av.getXDomain(au)));av.orgXDomain=av.x.domain();if(aw.zoom_enabled){av.zoom.scale(av.x).updateScaleExtent()}av.subX.domain(av.x.domain());if(av.brush){av.brush.scale(av.subX)}}if(ax){av.x.domain(ay?ay:(!av.brush||av.brush.empty())?av.orgXDomain:av.brush.extent());if(aw.zoom_enabled){av.zoom.scale(av.x).updateScaleExtent()}}if(at){av.x.domain(av.trimXDomain(av.x.orgDomain()))}return av.x.domain()};C.trimXDomain=function(av){var aw=this.getZoomDomain(),au=aw[0],at=aw[1];if(av[0]<=au){av[1]=+av[1]+(au-av[0]);av[0]=au}if(at<=av[1]){av[0]=+av[0]-(av[1]-at);av[1]=at}return av};C.isX=function(av){var at=this,au=at.config;return(au.data_x&&av===au.data_x)||(I(au.data_xs)&&q(au.data_xs,av))};C.isNotX=function(at){return !this.isX(at)};C.getXKey=function(av){var at=this,au=at.config;return au.data_x?au.data_x:I(au.data_xs)?au.data_xs[av]:null};C.getXValuesOfXKey=function(av,at){var au=this,ax,aw=at&&I(at)?au.mapToIds(at):[];aw.forEach(function(ay){if(au.getXKey(ay)===av){ax=au.data.xs[ay]}});return ax};C.getIndexByX=function(at){var au=this,av=au.filterByX(au.data.targets,at);return av.length?av[0].index:null};C.getXValue=function(av,au){var at=this;return av in at.data.xs&&at.data.xs[av]&&f(at.data.xs[av][au])?at.data.xs[av][au]:au};C.getOtherTargetXs=function(){var at=this,au=Object.keys(at.data.xs);return au.length?at.data.xs[au[0]]:null};C.getOtherTargetX=function(au){var at=this.getOtherTargetXs();return at&&au1};C.isMultipleX=function(){return I(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")};C.addName=function(av){var at=this,au;if(av){au=at.config.data_names[av.id];av.name=au!==undefined?au:av.id}return av};C.getValueOnIndex=function(au,av){var at=au.filter(function(aw){return aw.index===av});return at.length?at[0]:null};C.updateTargetX=function(au,at){var av=this;au.forEach(function(aw){aw.values.forEach(function(ax,ay){ax.x=av.generateTargetX(at[ay],aw.id,ay)});av.data.xs[aw.id]=at})};C.updateTargetXs=function(at,av){var au=this;at.forEach(function(aw){if(av[aw.id]){au.updateTargetX([aw],av[aw.id])}})};C.generateTargetX=function(av,ax,aw){var au=this,at;if(au.isTimeSeries()){at=av?au.parseDate(av):au.parseDate(au.getXValue(ax,aw))}else{if(au.isCustomX()&&!au.isCategorized()){at=f(av)?+av:au.getXValue(ax,aw)}else{at=aw}}return at};C.cloneTarget=function(at){return{id:at.id,id_org:at.id_org,values:at.values.map(function(au){return{x:au.x,value:au.value,id:au.id}})}};C.updateXs=function(){var at=this;if(at.data.targets.length){at.xs=[];at.data.targets[0].values.forEach(function(au){at.xs[au.index]=au.x})}};C.getPrevX=function(au){var at=this.xs[au-1];return typeof at!=="undefined"?at:null};C.getNextX=function(au){var at=this.xs[au+1];return typeof at!=="undefined"?at:null};C.getMaxDataCount=function(){var at=this;return at.d3.max(at.data.targets,function(au){return au.values.length})};C.getMaxDataCountTarget=function(au){var aw=au.length,at=0,av;if(aw>1){au.forEach(function(ax){if(ax.values.length>at){av=ax;at=ax.values.length}})}else{av=aw?au[0]:null}return av};C.getEdgeX=function(at){var au=this;return !at.length?[0,0]:[au.d3.min(at,function(av){return av.values[0].x}),au.d3.max(at,function(av){return av.values[av.values.length-1].x})]};C.mapToIds=function(at){return at.map(function(au){return au.id})};C.mapToTargetIds=function(au){var at=this;return au?[].concat(au):at.mapToIds(at.data.targets)};C.hasTarget=function(at,aw){var av=this.mapToIds(at),au;for(au=0;auaw?1:ax>=aw?0:NaN})};C.addHiddenTargetIds=function(at){this.hiddenTargetIds=this.hiddenTargetIds.concat(at)};C.removeHiddenTargetIds=function(at){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(au){return at.indexOf(au)<0})};C.addHiddenLegendIds=function(at){this.hiddenLegendIds=this.hiddenLegendIds.concat(at)};C.removeHiddenLegendIds=function(at){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(au){return at.indexOf(au)<0})};C.getValuesAsIdKeyed=function(at){var au={};at.forEach(function(av){au[av.id]=[];av.values.forEach(function(aw){au[av.id].push(aw.value)})});return au};C.checkValueInTargets=function(at,aw){var ay=Object.keys(at),ax,av,au;for(ax=0;ax0})};C.isOrderDesc=function(){var at=this.config;return typeof(at.data_order)==="string"&&at.data_order.toLowerCase()==="desc"};C.isOrderAsc=function(){var at=this.config;return typeof(at.data_order)==="string"&&at.data_order.toLowerCase()==="asc"};C.orderTargets=function(at){var au=this,av=au.config,ax=au.isOrderAsc(),aw=au.isOrderDesc();if(ax||aw){at.sort(function(aA,az){var aC=function(aD,aE){return aD+Math.abs(aE.value)};var ay=aA.values.reduce(aC,0),aB=az.values.reduce(aC,0);return ax?aB-ay:ay-aB})}else{if(v(av.data_order)){at.sort(av.data_order)}}return at};C.filterByX=function(au,at){return this.d3.merge(au.map(function(av){return av.values})).filter(function(av){return av.x-at===0})};C.filterRemoveNull=function(at){return at.filter(function(au){return f(au.value)})};C.filterByXDomain=function(at,au){return at.map(function(av){return{id:av.id,id_org:av.id_org,values:av.values.filter(function(aw){return au[0]<=aw.x&&aw.x<=au[1]})}})};C.hasDataLabel=function(){var at=this.config;if(typeof at.data_labels==="boolean"&&at.data_labels){return true}else{if(typeof at.data_labels==="object"&&I(at.data_labels)){return true}}return false};C.getDataLabelLength=function(ax,at,aw){var av=this,ay=[0,0],au=1.3;av.selectChart.select("svg").selectAll(".dummy").data([ax,at]).enter().append("text").text(function(az){return av.dataLabelFormat(az.id)(az)}).each(function(aA,az){ay[az]=this.getBoundingClientRect()[aw]*au}).remove();return ay};C.isNoneArc=function(at){return this.hasTarget(this.data.targets,at.id)},C.isArc=function(at){return"data" in at&&this.hasTarget(this.data.targets,at.data.id)};C.findSameXOfValues=function(at,au){var av,ax=at[au].x,aw=[];for(av=au-1;av>=0;av--){if(ax!==at[av].x){break}aw.push(at[av])}for(av=au;av=0){au.data.xs[aB]=(ay&&au.data.xs[aB]?au.data.xs[aB]:[]).concat(az.map(function(aC){return aC[aA]}).filter(f).map(function(aC,aD){return au.generateTargetX(aC,aB,aD)}))}else{if(aw.data_x){au.data.xs[aB]=au.getOtherTargetXs()}else{if(I(aw.data_xs)){au.data.xs[aB]=au.getXValuesOfXKey(aA,au.data.targets)}}}}else{au.data.xs[aB]=az.map(function(aD,aC){return aC})}});ax.forEach(function(aA){if(!au.data.xs[aA]){throw new Error('x is not defined for id = "'+aA+'".')}});at=ax.map(function(aC,aA){var aB=aw.data_idConverter(aC);return{id:aB,id_org:aC,values:az.map(function(aI,aG){var aF=au.getXKey(aC),aE=aI[aF],aH=aI[aC]!==null&&!isNaN(aI[aC])?+aI[aC]:null,aD;if(au.isCustomX()&&au.isCategorized()&&aA===0&&!B(aE)){if(aA===0&&aG===0){aw.axis_x_categories=[]}aD=aw.axis_x_categories.indexOf(aE);if(aD===-1){aD=aw.axis_x_categories.length;aw.axis_x_categories.push(aE)}}else{aD=au.generateTargetX(aE,aC,aG)}if(B(aI[aC])||au.data.xs[aC].length<=aG){aD=undefined}return{x:aD,value:aH,id:aB}}).filter(function(aD){return F(aD.x)})}});at.forEach(function(aB){var aA;if(aw.data_xSort){aB.values=aB.values.sort(function(aF,aE){var aD=aF.x||aF.x===0?aF.x:Infinity,aC=aE.x||aE.x===0?aE.x:Infinity;return aD-aC})}aA=0;aB.values.forEach(function(aC){aC.index=aA++});au.data.xs[aB.id].sort(function(aD,aC){return aD-aC})});au.hasNegativeValue=au.hasNegativeValueInTargets(at);au.hasPositiveValue=au.hasPositiveValueInTargets(at);if(aw.data_type){au.setTargetType(au.mapToIds(at).filter(function(aA){return !(aA in aw.data_types)}),aw.data_type)}at.forEach(function(aA){au.addCache(aA.id_org,aA)});return at};C.load=function(at,av){var au=this;if(at){if(av.filter){at=at.filter(av.filter)}if(av.type||av.types){at.forEach(function(aw){var ax=av.types&&av.types[aw.id]?av.types[aw.id]:av.type;au.setTargetType(aw.id,ax)})}au.data.targets.forEach(function(ax){for(var aw=0;aw0?av:320/(at.hasType("gauge")&&!au.gauge_fullCircle?2:1)};C.getCurrentPaddingTop=function(){var at=this,au=at.config,av=f(au.padding_top)?au.padding_top:0;if(at.title&&at.title.node()){av+=at.getTitlePadding()}return av};C.getCurrentPaddingBottom=function(){var at=this.config;return f(at.padding_bottom)?at.padding_bottom:0};C.getCurrentPaddingLeft=function(at){var au=this,av=au.config;if(f(av.padding_left)){return av.padding_left}else{if(av.axis_rotated){return !av.axis_x_show?1:Math.max(L(au.getAxisWidthByAxisId("x",at)),40)}else{if(!av.axis_y_show||av.axis_y_inner){return au.axis.getYAxisLabelPosition().isOuter?30:1}else{return L(au.getAxisWidthByAxisId("y",at))}}}};C.getCurrentPaddingRight=function(){var at=this,au=at.config,aw=10,av=at.isLegendRight?at.getLegendWidth()+20:0;if(f(au.padding_right)){return au.padding_right+1}else{if(au.axis_rotated){return aw+av}else{if(!au.axis_y2_show||au.axis_y2_inner){return 2+av+(at.axis.getY2AxisLabelPosition().isOuter?20:0)}else{return L(at.getAxisWidthByAxisId("y2"))+av}}}};C.getParentRectValue=function(au){var av=this.selectChart.node(),at;while(av&&av.tagName!=="BODY"){try{at=av.getBoundingClientRect()[au]}catch(aw){if(au==="width"){at=av.offsetWidth}}if(at){break}av=av.parentNode}return at};C.getParentWidth=function(){return this.getParentRectValue("width")};C.getParentHeight=function(){var at=this.selectChart.style("height");return at.indexOf("px")>0?+at.replace("px",""):0};C.getSvgLeft=function(az){var aB=this,au=aB.config,ax=au.axis_rotated||(!au.axis_rotated&&!au.axis_y_inner),aC=au.axis_rotated?A.axisX:A.axisY,at=aB.main.select("."+aC).node(),aA=at&&ax?at.getBoundingClientRect():{right:0},ay=aB.selectChart.node().getBoundingClientRect(),aw=aB.hasArcType(),av=aA.right-ay.left-(aw?0:aB.getCurrentPaddingLeft(az));return av>0?av:0};C.getAxisWidthByAxisId=function(aw,au){var av=this,at=av.axis.getLabelPositionById(aw);return av.axis.getMaxTickWidth(aw,au)+(at.isInner?20:40)};C.getHorizontalAxisHeight=function(aw){var at=this,au=at.config,av=30;if(aw==="x"&&!au.axis_x_show){return 8}if(aw==="x"&&au.axis_x_height){return au.axis_x_height}if(aw==="y"&&!au.axis_y_show){return au.legend_show&&!at.isLegendRight&&!at.isLegendInset?10:1}if(aw==="y2"&&!au.axis_y2_show){return at.rotated_padding_top}if(aw==="x"&&!au.axis_rotated&&au.axis_x_tick_rotate){av=30+at.axis.getMaxTickWidth(aw)*Math.cos(Math.PI*(90-au.axis_x_tick_rotate)/180)}if(aw==="y"&&au.axis_rotated&&au.axis_y_tick_rotate){av=30+at.axis.getMaxTickWidth(aw)*Math.cos(Math.PI*(90-au.axis_y_tick_rotate)/180)}return av+(at.axis.getLabelPositionById(aw).isInner?0:10)+(aw==="y2"?-10:0)};C.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())};C.getShapeIndices=function(ay){var au=this,aw=au.config,az={},ax=0,av,at;au.filterTargetsToShow(au.data.targets.filter(ay,au)).forEach(function(aA){for(av=0;av=0){aB+=aC(aE[az].value)-aA}}});return aB}};C.isWithinShape=function(av,aw){var au=this,at=au.d3.select(av),ax;if(!au.isTargetToShow(aw.id)){ax=false}else{if(av.nodeName==="circle"){ax=au.isStepType(aw)?au.isWithinStep(av,au.getYScale(aw.id)(aw.value)):au.isWithinCircle(av,au.pointSelectR(aw)*1.5)}else{if(av.nodeName==="path"){ax=at.classed(A.bar)?au.isWithinBar(av):true}}}return ax};C.getInterpolate=function(av){var au=this,at=au.isInterpolationType(au.config.spline_interpolation_type)?au.config.spline_interpolation_type:"cardinal";return au.isSplineType(av)?at:au.isStepType(av)?au.config.line_step_type:"linear"};C.initLine=function(){var at=this;at.main.select("."+A.chart).append("g").attr("class",A.chartLines)};C.updateTargetsForLine=function(aB){var aC=this,av=aC.config,at,au,ax=aC.classChartLine.bind(aC),ay=aC.classLines.bind(aC),az=aC.classAreas.bind(aC),aA=aC.classCircles.bind(aC),aw=aC.classFocus.bind(aC);at=aC.main.select("."+A.chartLines).selectAll("."+A.chartLine).data(aB).attr("class",function(aD){return ax(aD)+aw(aD)});au=at.enter().append("g").attr("class",ax).style("opacity",0).style("pointer-events","none");au.append("g").attr("class",ay);au.append("g").attr("class",az);au.append("g").attr("class",function(aD){return aC.generateClass(A.selectedCircles,aD.id)});au.append("g").attr("class",aA).style("cursor",function(aD){return av.data_selection_isselectable(aD)?"pointer":null});aB.forEach(function(aD){aC.main.selectAll("."+A.selectedCircles+aC.getTargetSelectorSuffix(aD.id)).selectAll("."+A.selectedCircle).each(function(aE){aE.value=aD.values[aE.index].value})})};C.updateLine=function(au){var at=this;at.mainLine=at.main.selectAll("."+A.lines).selectAll("."+A.line).data(at.lineData.bind(at));at.mainLine.enter().append("path").attr("class",at.classLine.bind(at)).style("stroke",at.color);at.mainLine.style("opacity",at.initialOpacity.bind(at)).style("shape-rendering",function(av){return at.isStepType(av)?"crispEdges":""}).attr("transform",null);at.mainLine.exit().transition().duration(au).style("opacity",0).remove()};C.redrawLine=function(au,at){return[(at?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",au).style("stroke",this.color).style("opacity",1)]};C.generateDrawLine=function(at,aA){var az=this,au=az.config,aB=az.d3.svg.line(),ax=az.generateGetLinePoints(at,aA),av=aA?az.getSubYScale:az.getYScale,aw=function(aC){return(aA?az.subxx:az.xx).call(az,aC)},ay=function(aD,aC){return au.data_groups.length>0?ax(aD,aC)[0][1]:av.call(az,aD.id)(aD.value)};aB=au.axis_rotated?aB.x(ay).y(aw):aB.x(aw).y(ay);if(!au.line_connectNull){aB=aB.defined(function(aC){return aC.value!=null})}return function(aH){var aD=au.line_connectNull?az.filterRemoveNull(aH.values):aH.values,aC=aA?az.x:az.subX,aI=av.call(az,aH.id),aE=0,aF=0,aG;if(az.isLineType(aH)){if(au.data_regions[aH.id]){aG=az.lineWithRegions(aD,aC,aI,au.data_regions[aH.id])}else{if(az.isStepType(aH)){aD=az.convertValuesToStep(aD)}aG=aB.interpolate(az.getInterpolate(aH))(aD)}}else{if(aD[0]){aE=aC(aD[0].x);aF=aI(aD[0].value)}aG=au.axis_rotated?"M "+aF+" "+aE:"M "+aE+" "+aF}return aG?aG:"M 0 0"}};C.generateGetLinePoints=function(at,aB){var aA=this,av=aA.config,ax=at.__max__+1,az=aA.getShapeX(0,ax,at,!!aB),ay=aA.getShapeY(!!aB),aw=aA.getShapeOffset(aA.isLineType,at,!!aB),au=aB?aA.getSubYScale:aA.getYScale;return function(aG,aC){var aD=au.call(aA,aG.id)(0),aF=aw(aG,aC)||aD,aH=az(aG),aE=ay(aG);if(av.axis_rotated){if((00?ay(aE,aD)[0][1]:av.call(aB,aE.id)(aB.getAreaBaseValue(aE.id))},az=function(aE,aD){return au.data_groups.length>0?ay(aE,aD)[1][1]:av.call(aB,aE.id)(aE.value)};at=au.axis_rotated?at.x0(aA).x1(az).y(ax):at.x(ax).y0(au.area_above?0:aA).y1(az);if(!au.line_connectNull){at=at.defined(function(aD){return aD.value!==null})}return function(aH){var aD=au.line_connectNull?aB.filterRemoveNull(aH.values):aH.values,aE=0,aF=0,aG;if(aB.isAreaType(aH)){if(aB.isStepType(aH)){aD=aB.convertValuesToStep(aD)}aG=at.interpolate(aB.getInterpolate(aH))(aD)}else{if(aD[0]){aE=aB.x(aD[0].x);aF=aB.getYScale(aH.id)(aD[0].value)}aG=au.axis_rotated?"M "+aF+" "+aE:"M "+aE+" "+aF}return aG?aG:"M 0 0"}};C.getAreaBaseValue=function(){return 0};C.generateGetAreaPoints=function(aw,aB){var aA=this,au=aA.config,ax=aw.__max__+1,az=aA.getShapeX(0,ax,aw,!!aB),ay=aA.getShapeY(!!aB),av=aA.getShapeOffset(aA.isAreaType,aw,!!aB),at=aB?aA.getSubYScale:aA.getYScale;return function(aG,aC){var aD=at.call(aA,aG.id)(0),aF=av(aG,aC)||aD,aH=az(aG),aE=ay(aG);if(au.axis_rotated){if((00){av=at.getShapeIndices(at.isLineType),au=at.generateGetLinePoints(av);at.circleY=function(ax,aw){return au(ax,aw)[0][1]}}else{at.circleY=function(aw){return at.getYScale(aw.id)(aw.value)}}};C.getCircles=function(au,av){var at=this;return(av?at.main.selectAll("."+A.circles+at.getTargetSelectorSuffix(av)):at.main).selectAll("."+A.circle+(f(au)?"-"+au:""))};C.expandCircles=function(au,ax,aw){var at=this,av=at.pointExpandedR.bind(at);if(aw){at.unexpandCircles()}at.getCircles(au,ax).classed(A.EXPANDED,true).attr("r",av)};C.unexpandCircles=function(au){var at=this,av=at.pointR.bind(at);at.getCircles(au).filter(function(){return at.d3.select(this).classed(A.EXPANDED)}).classed(A.EXPANDED,false).attr("r",av)};C.pointR=function(av){var at=this,au=at.config;return at.isStepType(av)?0:(v(au.point_r)?au.point_r(av):au.point_r)};C.pointExpandedR=function(av){var at=this,au=at.config;return au.point_focus_expand_enabled?(au.point_focus_expand_r?au.point_focus_expand_r:at.pointR(av)*1.75):at.pointR(av)};C.pointSelectR=function(av){var at=this,au=at.config;return v(au.point_select_r)?au.point_select_r(av):((au.point_select_r)?au.point_select_r:at.pointR(av)*4)};C.isWithinCircle=function(ay,ax){var aw=this.d3,av=aw.mouse(ay),au=aw.select(ay),at=+au.attr("cx"),az=+au.attr("cy");return Math.sqrt(Math.pow(at-av[0],2)+Math.pow(az-av[1],2))av.bar_width_max?av.bar_width_max:at};C.getBars=function(au,av){var at=this;return(av?at.main.selectAll("."+A.bars+at.getTargetSelectorSuffix(av)):at.main).selectAll("."+A.bar+(f(au)?"-"+au:""))};C.expandBars=function(au,aw,av){var at=this;if(av){at.unexpandBars()}at.getBars(au,aw).classed(A.EXPANDED,true)};C.unexpandBars=function(au){var at=this;at.getBars(au).classed(A.EXPANDED,false)};C.generateDrawBar=function(au,at){var av=this,ax=av.config,aw=av.generateGetBarPoints(au,at);return function(aD,aA){var aB=aw(aD,aA);var az=ax.axis_rotated?1:0;var ay=ax.axis_rotated?0:1;var aC="M "+aB[0][az]+","+aB[0][ay]+" L"+aB[1][az]+","+aB[1][ay]+" L"+aB[2][az]+","+aB[2][ay]+" L"+aB[3][az]+","+aB[3][ay]+" z";return aC}};C.generateGetBarPoints=function(ay,aB){var aA=this,aw=aB?aA.subXAxis:aA.xAxis,az=ay.__max__+1,au=aA.getBarW(aw,az),at=aA.getShapeX(au,az,ay,!!aB),aC=aA.getShapeY(!!aB),ax=aA.getShapeOffset(aA.isBarType,ay,!!aB),av=aB?aA.getSubYScale:aA.getYScale;return function(aH,aD){var aE=av.call(aA,aH.id)(0),aG=ax(aH,aD)||aE,aI=at(aH),aF=aC(aH);if(aA.config.axis_rotated){if((0at.width){ay=at.width-aw.width}else{if(ay<0){ay=4}}}return ay};C.getYForText=function(av,ay,au){var at=this,ax=au.getBoundingClientRect(),aw;if(at.config.axis_rotated){aw=(av[0][0]+av[2][0]+ax.height*0.6)/2}else{aw=av[2][1];if(ay.value<0||(ay.value===0&&!at.hasPositiveValue)){aw+=ax.height;if(at.isBarType(ay)&&at.isSafari()){aw-=3}else{if(!at.isBarType(ay)&&at.isChrome()){aw+=3}}}else{aw+=at.isBarType(ay)?-3:-6}}if(ay.value===null&&!at.config.axis_rotated){if(awthis.height){aw=this.height-4}}}return aw};C.setTargetType=function(at,aw){var au=this,av=au.config;au.mapToTargetIds(at).forEach(function(ax){au.withoutFadeIn[ax]=(aw===av.data_types[ax]);av.data_types[ax]=aw});if(!at){av.data_type=aw}};C.hasType=function(ax,at){var au=this,aw=au.config.data_types,av=false;at=at||au.data.targets;if(at&&at.length){at.forEach(function(az){var ay=aw[az.id];if((ay&&ay.indexOf(ax)>=0)||(!ay&&ax==="line")){av=true}})}else{if(Object.keys(aw).length){Object.keys(aw).forEach(function(ay){if(aw[ay]===ax){av=true}})}else{av=au.config.data_type===ax}}return av};C.hasArcType=function(at){return this.hasType("pie",at)||this.hasType("donut",at)||this.hasType("gauge",at)};C.isLineType=function(au){var at=this.config,av=o(au)?au:au.id;return !at.data_types[av]||["line","spline","area","area-spline","step","area-step"].indexOf(at.data_types[av])>=0};C.isStepType=function(at){var au=o(at)?at:at.id;return["step","area-step"].indexOf(this.config.data_types[au])>=0};C.isSplineType=function(at){var au=o(at)?at:at.id;return["spline","area-spline"].indexOf(this.config.data_types[au])>=0};C.isAreaType=function(at){var au=o(at)?at:at.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[au])>=0};C.isBarType=function(at){var au=o(at)?at:at.id;return this.config.data_types[au]==="bar"};C.isScatterType=function(at){var au=o(at)?at:at.id;return this.config.data_types[au]==="scatter"};C.isPieType=function(at){var au=o(at)?at:at.id;return this.config.data_types[au]==="pie"};C.isGaugeType=function(at){var au=o(at)?at:at.id;return this.config.data_types[au]==="gauge"};C.isDonutType=function(at){var au=o(at)?at:at.id;return this.config.data_types[au]==="donut"};C.isArcType=function(at){return this.isPieType(at)||this.isDonutType(at)||this.isGaugeType(at)};C.lineData=function(at){return this.isLineType(at)?[at]:[]};C.arcData=function(at){return this.isArcType(at.data)?[at]:[]};C.barData=function(at){return this.isBarType(at)?at.values:[]};C.lineOrScatterData=function(at){return this.isLineType(at)||this.isScatterType(at)?at.values:[]};C.barOrLineData=function(at){return this.isBarType(at)||this.isLineType(at)?at.values:[]};C.isInterpolationType=function(at){return["linear","linear-closed","basis","basis-open","basis-closed","bundle","cardinal","cardinal-open","cardinal-closed","monotone"].indexOf(at)>=0};C.initGrid=function(){var at=this,au=at.config,av=at.d3;at.grid=at.main.append("g").attr("clip-path",at.clipPathForGrid).attr("class",A.grid);if(au.grid_x_show){at.grid.append("g").attr("class",A.xgrids)}if(au.grid_y_show){at.grid.append("g").attr("class",A.ygrids)}if(au.grid_focus_show){at.grid.append("g").attr("class",A.xgridFocus).append("line").attr("class",A.xgridFocus)}at.xgrid=av.selectAll([]);if(!au.grid_lines_front){at.initGridLines()}};C.initGridLines=function(){var at=this,au=at.d3;at.gridLines=at.main.append("g").attr("clip-path",at.clipPathForGrid).attr("class",A.grid+" "+A.gridLines);at.gridLines.append("g").attr("class",A.xgridLines);at.gridLines.append("g").attr("class",A.ygridLines);at.xgridLines=au.selectAll([])};C.updateXGrid=function(aw){var at=this,au=at.config,av=at.d3,ay=at.generateGridData(au.grid_x_type,at.x),ax=at.isCategorized()?at.xAxis.tickOffset():0;at.xgridAttr=au.axis_rotated?{x1:0,x2:at.width,y1:function(az){return at.x(az)-ax},y2:function(az){return at.x(az)-ax}}:{x1:function(az){return at.x(az)+ax},x2:function(az){return at.x(az)+ax},y1:0,y2:at.height};at.xgrid=at.main.select("."+A.xgrids).selectAll("."+A.xgrid).data(ay);at.xgrid.enter().append("line").attr("class",A.xgrid);if(!aw){at.xgrid.attr(at.xgridAttr).style("opacity",function(){return +av.select(this).attr(au.axis_rotated?"y1":"x1")===(au.axis_rotated?at.height:0)?0:1})}at.xgrid.exit().remove()};C.updateYGrid=function(){var at=this,au=at.config,av=at.yAxis.tickValues()||at.y.ticks(au.grid_y_ticks);at.ygrid=at.main.select("."+A.ygrids).selectAll("."+A.ygrid).data(av);at.ygrid.enter().append("line").attr("class",A.ygrid);at.ygrid.attr("x1",au.axis_rotated?at.y:0).attr("x2",au.axis_rotated?at.y:at.width).attr("y1",au.axis_rotated?0:at.y).attr("y2",au.axis_rotated?at.height:at.y);at.ygrid.exit().remove();at.smoothLines(at.ygrid,"grid")};C.gridTextAnchor=function(at){return at.position?at.position:"end"};C.gridTextDx=function(at){return at.position==="start"?4:at.position==="middle"?0:-4};C.xGridTextX=function(at){return at.position==="start"?-this.height:at.position==="middle"?-this.height/2:0};C.yGridTextX=function(at){return at.position==="start"?0:at.position==="middle"?this.width/2:this.width};C.updateGrid=function(az){var av=this,at=av.main,ax=av.config,ay,aw,au;av.grid.style("visibility",av.hasArcType()?"hidden":"visible");at.select("line."+A.xgridFocus).style("visibility","hidden");if(ax.grid_x_show){av.updateXGrid()}av.xgridLines=at.select("."+A.xgridLines).selectAll("."+A.xgridLine).data(ax.grid_x_lines);ay=av.xgridLines.enter().append("g").attr("class",function(aA){return A.xgridLine+(aA["class"]?" "+aA["class"]:"")});ay.append("line").style("opacity",0);ay.append("text").attr("text-anchor",av.gridTextAnchor).attr("transform",ax.axis_rotated?"":"rotate(-90)").attr("dx",av.gridTextDx).attr("dy",-5).style("opacity",0);av.xgridLines.exit().transition().duration(az).style("opacity",0).remove();if(ax.grid_y_show){av.updateYGrid()}av.ygridLines=at.select("."+A.ygridLines).selectAll("."+A.ygridLine).data(ax.grid_y_lines);aw=av.ygridLines.enter().append("g").attr("class",function(aA){return A.ygridLine+(aA["class"]?" "+aA["class"]:"")});aw.append("line").style("opacity",0);aw.append("text").attr("text-anchor",av.gridTextAnchor).attr("transform",ax.axis_rotated?"rotate(-90)":"").attr("dx",av.gridTextDx).attr("dy",-5).style("opacity",0);au=av.yv.bind(av);av.ygridLines.select("line").transition().duration(az).attr("x1",ax.axis_rotated?au:0).attr("x2",ax.axis_rotated?au:av.width).attr("y1",ax.axis_rotated?0:au).attr("y2",ax.axis_rotated?av.height:au).style("opacity",1);av.ygridLines.select("text").transition().duration(az).attr("x",ax.axis_rotated?av.xGridTextX.bind(av):av.yGridTextX.bind(av)).attr("y",au).text(function(aA){return aA.text}).style("opacity",1);av.ygridLines.exit().transition().duration(az).style("opacity",0).remove()};C.redrawGrid=function(ax){var av=this,aw=av.config,at=av.xv.bind(av),au=av.xgridLines.select("line"),ay=av.xgridLines.select("text");return[(ax?au.transition():au).attr("x1",aw.axis_rotated?0:at).attr("x2",aw.axis_rotated?av.width:at).attr("y1",aw.axis_rotated?at:0).attr("y2",aw.axis_rotated?at:av.height).style("opacity",1),(ax?ay.transition():ay).attr("x",aw.axis_rotated?av.yGridTextX.bind(av):av.xGridTextX.bind(av)).attr("y",at).text(function(az){return az.text}).style("opacity",1)]};C.showXGridFocus=function(ax){var av=this,aw=av.config,au=ax.filter(function(az){return az&&f(az.value)}),at=av.main.selectAll("line."+A.xgridFocus),ay=av.xx.bind(av);if(!aw.tooltip_show){return}if(av.hasType("scatter")||av.hasArcType()){return}at.style("visibility","visible").data([au[0]]).attr(aw.axis_rotated?"y1":"x1",ay).attr(aw.axis_rotated?"y2":"x2",ay);av.smoothLines(at,"grid")};C.hideXGridFocus=function(){this.main.select("line."+A.xgridFocus).style("visibility","hidden")};C.updateXgridFocus=function(){var at=this,au=at.config;at.main.select("line."+A.xgridFocus).attr("x1",au.axis_rotated?0:-10).attr("x2",au.axis_rotated?at.width:-10).attr("y1",au.axis_rotated?-10:0).attr("y2",au.axis_rotated?-10:at.height)};C.generateGridData=function(az,au){var aB=this,aA=[],ay,aw,ax,av,at=aB.main.select("."+A.axisX).selectAll(".tick").size();if(az==="year"){ay=aB.getXDomain();aw=ay[0].getFullYear();ax=ay[1].getFullYear();for(av=aw;av<=ax;av++){aA.push(new Date(av+"-01-01 00:00:00"))}}else{aA=au.ticks(10);if(aA.length>at){aA=aA.filter(function(aC){return(""+aC).indexOf(".")<0})}}return aA};C.getGridFilterToRemove=function(at){return at?function(au){var av=false;[].concat(at).forEach(function(aw){if((("value" in aw&&au.value===aw.value)||("class" in aw&&au["class"]===aw["class"]))){av=true}});return av}:function(){return true}};C.removeGridLines=function(aA,az){var av=this,ax=av.config,ay=av.getGridFilterToRemove(aA),at=function(aB){return !ay(aB)},au=az?A.xgridLines:A.ygridLines,aw=az?A.xgridLine:A.ygridLine;av.main.select("."+au).selectAll("."+aw).filter(ay).transition().duration(ax.transition_duration).style("opacity",0).remove();if(az){ax.grid_x_lines=ax.grid_x_lines.filter(at)}else{ax.grid_y_lines=ax.grid_y_lines.filter(at)}};C.initTooltip=function(){var at=this,au=at.config,av;at.tooltip=at.selectChart.style("position","relative").append("div").attr("class",A.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none");if(au.tooltip_init_show){if(at.isTimeSeries()&&o(au.tooltip_init_x)){au.tooltip_init_x=at.parseDate(au.tooltip_init_x);for(av=0;av0&&aM>0){aN=aL?at.indexOf(aL.id):null;aM=aK?at.indexOf(aK.id):null}return aG?aN-aM:aM-aN})}for(aA=0;aA"+(aE||aE===0?""+aE+"":"")}aF=e(aC(aD[aA].value,aD[aA].ratio,aD[aA].id,aD[aA].index,aD));if(aF!==undefined){if(aD[aA].name===null){continue}au=e(ay(aD[aA].name,aD[aA].ratio,aD[aA].id,aD[aA].index));aJ=aI.levelColor?aI.levelColor(aD[aA].value):az(aD[aA].id);aH+="";aH+=""+au+"";aH+=""+aF+"";aH+=""}}return aH+""};C.tooltipPosition=function(au,aB,aD,aA){var aF=this,aw=aF.config,aG=aF.d3;var ay,aE,av,az,ax;var at=aF.hasArcType(),aC=aG.mouse(aA);if(at){aE=((aF.width-(aF.isLegendRight?aF.getLegendWidth():0))/2)+aC[0];az=(aF.height/2)+aC[1]+20}else{ay=aF.getSvgLeft(true);if(aw.axis_rotated){aE=ay+aC[0]+100;av=aE+aB;ax=aF.currentWidth-aF.getCurrentPaddingRight();az=aF.x(au[0].x)+20}else{aE=ay+aF.getCurrentPaddingLeft(true)+aF.x(au[0].x)+20;av=aE+aB;ax=ay+aF.currentWidth-aF.getCurrentPaddingRight();az=aC[1]+15}if(av>ax){aE-=av-ax+20}if(az+aD>aF.currentHeight){az-=aD+30}}if(az<0){az=0}return{top:az,left:aE}};C.showTooltip=function(aA,ax){var aC=this,aw=aC.config;var ay,aB,az;var au=aC.hasArcType(),at=aA.filter(function(aD){return aD&&f(aD.value)}),av=aw.tooltip_position||C.tooltipPosition;if(at.length===0||!aw.tooltip_show){return}aC.tooltip.html(aw.tooltip_contents.call(aC,aA,aC.axis.getXAxisTickFormat(),aC.getYFormat(au),aC.color)).style("display","block");ay=aC.tooltip.property("offsetWidth");aB=aC.tooltip.property("offsetHeight");az=av.call(this,at,ay,aB,ax);aC.tooltip.style("top",az.top+"px").style("left",az.left+"px")};C.hideTooltip=function(){this.tooltip.style("display","none")};C.initLegend=function(){var at=this;at.legendItemTextBox={};at.legendHasRendered=false;at.legend=at.svg.append("g").attr("transform",at.getTranslate("legend"));if(!at.config.legend_show){at.legend.style("visibility","hidden");at.hiddenLegendIds=at.mapToIds(at.data.targets);return}at.updateLegendWithDefaults()};C.updateLegendWithDefaults=function(){var at=this;at.updateLegend(at.mapToIds(at.data.targets),{withTransform:false,withTransitionForTransform:false,withTransition:false})};C.updateSizeForLegend=function(au,aw){var at=this,av=at.config,ax={top:at.isLegendTop?at.getCurrentPaddingTop()+av.legend_inset_y+5.5:at.currentHeight-au-at.getCurrentPaddingBottom()-av.legend_inset_y,left:at.isLegendLeft?at.getCurrentPaddingLeft()+av.legend_inset_x+0.5:at.currentWidth-aw-at.getCurrentPaddingRight()-av.legend_inset_x+0.5};at.margin3={top:at.isLegendRight?0:at.isLegendInset?ax.top:at.currentHeight-au,right:NaN,bottom:0,left:at.isLegendRight?at.currentWidth-aw:at.isLegendInset?ax.left:0}};C.transformLegend=function(au){var at=this;(au?at.legend.transition():at.legend).attr("transform",at.getTranslate("legend"))};C.updateLegendStep=function(at){this.legendStep=at};C.updateLegendItemWidth=function(at){this.legendItemWidth=at};C.updateLegendItemHeight=function(at){this.legendItemHeight=at};C.getLegendWidth=function(){var at=this;return at.config.legend_show?at.isLegendRight||at.isLegendInset?at.legendItemWidth*(at.legendStep+1):at.currentWidth:0};C.getLegendHeight=function(){var at=this,au=0;if(at.config.legend_show){if(at.isLegendRight){au=at.currentHeight}else{au=Math.max(20,at.legendItemHeight)*(at.legendStep+1)}}return au};C.opacityForLegend=function(at){return at.classed(A.legendItemHidden)?null:1};C.opacityForUnfocusedLegend=function(at){return at.classed(A.legendItemHidden)?null:0.3};C.toggleFocusLegend=function(au,at){var av=this;au=av.mapToTargetIds(au);av.legend.selectAll("."+A.legendItem).filter(function(aw){return au.indexOf(aw)>=0}).classed(A.legendItemFocused,at).transition().duration(100).style("opacity",function(){var aw=at?av.opacityForLegend:av.opacityForUnfocusedLegend;return aw.call(av,av.d3.select(this))})};C.revertLegend=function(){var at=this,au=at.d3;at.legend.selectAll("."+A.legendItem).classed(A.legendItemFocused,false).transition().duration(100).style("opacity",function(){return at.opacityForLegend(au.select(this))})};C.showLegend=function(at){var au=this,av=au.config;if(!av.legend_show){av.legend_show=true;au.legend.style("visibility","visible");if(!au.legendHasRendered){au.updateLegendWithDefaults()}}au.removeHiddenLegendIds(at);au.legend.selectAll(au.selectorLegends(at)).style("visibility","visible").transition().style("opacity",function(){return au.opacityForLegend(au.d3.select(this))})};C.hideLegend=function(at){var au=this,av=au.config;if(av.legend_show&&z(at)){av.legend_show=false;au.legend.style("visibility","hidden")}au.addHiddenLegendIds(at);au.legend.selectAll(au.selectorLegends(at)).style("opacity",0).style("visibility","hidden")};C.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}};C.updateLegend=function(av,aJ,ay){var aX=this,aN=aX.config;var a2,au,az,ax,aW,a0,aD,at,aG;var a1=4,aC=10,aI=0,aV=0,aB=10,aR=aN.legend_item_tile_width+5;var aU,aT=0,aF={},aw={},aS={},aA=[0],aM={},aK=0;var aY,aE;var aQ,aP,aL,aO;av=av.filter(function(a3){return !F(aN.data_names[a3])||aN.data_names[a3]!==null});aJ=aJ||{};aY=r(aJ,"withTransition",true);aE=r(aJ,"withTransitionForTransform",true);function aH(a3,a4){if(!aX.legendItemTextBox[a4]){aX.legendItemTextBox[a4]=aX.getTextRect(a3.textContent,A.legendItem,a3)}return aX.legendItemTextBox[a4]}function aZ(a6,a5,be){var bd=be===0,ba=be===av.length-1,bb=aH(a6,a5),bf=bb.width+aR+(ba&&!(aX.isLegendRight||aX.isLegendInset)?0:aC)+aN.legend_padding,a8=bb.height+a1,bc=aX.isLegendRight||aX.isLegendInset?a8:bf,a3=aX.isLegendRight||aX.isLegendInset?aX.getLegendHeight():aX.getLegendWidth(),a9,a4;function a7(bh,bg){if(!bg){a9=(a3-aT-bc)/2;if(a9=aI){aI=bf}if(!aV||a8>=aV){aV=a8}a4=aX.isLegendRight||aX.isLegendInset?aV:aI;if(aN.legend_equally){Object.keys(aw).forEach(function(bg){aw[bg]=aI});Object.keys(aS).forEach(function(bg){aS[bg]=aV});a9=(a3-a4*av.length)/2;if(a90&&aO.size()===0){aO=aX.legend.insert("g","."+A.legendItem).attr("class",A.legendBackground).append("rect")}aQ=aX.legend.selectAll("text").data(av).text(function(a3){return F(aN.data_names[a3])?aN.data_names[a3]:a3}).each(function(a4,a3){aZ(this,a4,a3)});(aY?aQ.transition():aQ).attr("x",au).attr("y",aW);aP=aX.legend.selectAll("rect."+A.legendItemEvent).data(av);(aY?aP.transition():aP).attr("width",function(a3){return aw[a3]}).attr("height",function(a3){return aS[a3]}).attr("x",az).attr("y",a0);aL=aX.legend.selectAll("line."+A.legendItemTile).data(av);(aY?aL.transition():aL).style("stroke",aX.color).attr("x1",aD).attr("y1",aG).attr("x2",at).attr("y2",aG);if(aO){(aY?aO.transition():aO).attr("height",aX.getLegendHeight()-12).attr("width",aI*(aK+1)+10)}aX.legend.selectAll("."+A.legendItem).classed(A.legendItemHidden,function(a3){return !aX.isTargetToShow(a3)});aX.updateLegendItemWidth(aI);aX.updateLegendItemHeight(aV);aX.updateLegendStep(aK);aX.updateSizes();aX.updateScales();aX.updateSvgSize();aX.transformAll(aE,ay);aX.legendHasRendered=true};C.initTitle=function(){var at=this;at.title=at.svg.append("text").text(at.config.title_text).attr("class",at.CLASS.title)};C.redrawTitle=function(){var at=this;at.title.attr("x",at.xForTitle.bind(at)).attr("y",at.yForTitle.bind(at))};C.xForTitle=function(){var av=this,aw=av.config,au=aw.title_position||"left",at;if(au.indexOf("right")>=0){at=av.currentWidth-av.getTextRect(av.title.node().textContent,av.CLASS.title,av.title.node()).width-aw.title_padding.right}else{if(au.indexOf("center")>=0){at=(av.currentWidth-av.getTextRect(av.title.node().textContent,av.CLASS.title,av.title.node()).width)/2}else{at=aw.title_padding.left}}return at};C.yForTitle=function(){var at=this;return at.config.title_padding.top+at.getTextRect(at.title.node().textContent,at.CLASS.title,at.title.node()).height};C.getTitlePadding=function(){var at=this;return at.yForTitle()+at.config.title_padding.bottom};function u(at){R.call(this,at)}w(R,u);u.prototype.init=function af(){var au=this.owner,av=au.config,at=au.main;au.axes.x=at.append("g").attr("class",A.axis+" "+A.axisX).attr("clip-path",au.clipPathForXAxis).attr("transform",au.getTranslate("x")).style("visibility",av.axis_x_show?"visible":"hidden");au.axes.x.append("text").attr("class",A.axisXLabel).attr("transform",av.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this));au.axes.y=at.append("g").attr("class",A.axis+" "+A.axisY).attr("clip-path",av.axis_y_inner?"":au.clipPathForYAxis).attr("transform",au.getTranslate("y")).style("visibility",av.axis_y_show?"visible":"hidden");au.axes.y.append("text").attr("class",A.axisYLabel).attr("transform",av.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this));au.axes.y2=at.append("g").attr("class",A.axis+" "+A.axisY2).attr("transform",au.getTranslate("y2")).style("visibility",av.axis_y2_show?"visible":"hidden");au.axes.y2.append("text").attr("class",A.axisY2Label).attr("transform",av.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))};u.prototype.getXAxis=function D(aw,az,ax,ay,at,aB,aA){var aD=this.owner,au=aD.config,aC={isCategory:aD.isCategorized(),withOuterTick:at,tickMultiline:au.axis_x_tick_multiline,tickWidth:au.axis_x_tick_width,tickTextRotate:aA?0:au.axis_x_tick_rotate,withoutTransition:aB,},av=a(aD.d3,aC).scale(aw).orient(az);if(aD.isTimeSeries()&&ay&&typeof ay!=="function"){ay=ay.map(function(aE){return aD.parseDate(aE)})}av.tickFormat(ax).tickValues(ay);if(aD.isCategorized()){av.tickCentered(au.axis_x_tick_centered);if(z(au.axis_x_tick_culling)){au.axis_x_tick_culling=false}}return av};u.prototype.updateXAxisTickValues=function E(at,ax){var av=this.owner,aw=av.config,au;if(aw.axis_x_tick_fit||aw.axis_x_tick_count){au=this.generateTickValues(av.mapTargetsToUniqueXs(at),aw.axis_x_tick_count,av.isTimeSeries())}if(ax){ax.tickValues(au)}else{av.xAxis.tickValues(au);av.subXAxis.tickValues(au)}return au};u.prototype.getYAxis=function d(aw,az,ax,ay,at,aB,aA){var aD=this.owner,au=aD.config,aC={withOuterTick:at,withoutTransition:aB,tickTextRotate:aA?0:au.axis_y_tick_rotate},av=a(aD.d3,aC).scale(aw).orient(az).tickFormat(ax);if(aD.isTimeSeriesY()){av.ticks(aD.d3.time[au.axis_y_tick_time_value],au.axis_y_tick_time_interval)}else{av.tickValues(ay)}return av};u.prototype.getId=function an(au){var at=this.owner.config;return au in at.data_axes?at.data_axes[au]:"y"};u.prototype.getXAxisTickFormat=function M(){var at=this.owner,au=at.config,av=at.isTimeSeries()?at.defaultAxisTimeFormat:at.isCategorized()?at.categoryName:function(aw){return aw<0?aw.toFixed(0):aw};if(au.axis_x_tick_format){if(v(au.axis_x_tick_format)){av=au.axis_x_tick_format}else{if(at.isTimeSeries()){av=function(aw){return aw?at.axisTimeFormat(au.axis_x_tick_format)(aw):""}}}}return v(av)?function(aw){return av.call(at,aw)}:av};u.prototype.getTickValues=function aj(at,au){return at?at:au?au.tickValues():undefined};u.prototype.getXAxisTickValues=function ar(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)};u.prototype.getYAxisTickValues=function P(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)};u.prototype.getY2AxisTickValues=function k(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)};u.prototype.getLabelOptionByAxisId=function J(aw){var at=this.owner,au=at.config,av;if(aw==="y"){av=au.axis_y_label}else{if(aw==="y2"){av=au.axis_y2_label}else{if(aw==="x"){av=au.axis_x_label}}}return av};u.prototype.getLabelText=function ae(au){var at=this.getLabelOptionByAxisId(au);return o(at)?at:at?at.text:null};u.prototype.setLabelText=function x(aw,ax){var at=this.owner,au=at.config,av=this.getLabelOptionByAxisId(aw);if(o(av)){if(aw==="y"){au.axis_y_label=ax}else{if(aw==="y2"){au.axis_y2_label=ax}else{if(aw==="x"){au.axis_x_label=ax}}}}else{if(av){av.text=ax}}};u.prototype.getLabelPosition=function ai(aw,au){var av=this.getLabelOptionByAxisId(aw),at=(av&&typeof av==="object"&&av.position)?av.position:au;return{isInner:at.indexOf("inner")>=0,isOuter:at.indexOf("outer")>=0,isLeft:at.indexOf("left")>=0,isCenter:at.indexOf("center")>=0,isRight:at.indexOf("right")>=0,isTop:at.indexOf("top")>=0,isMiddle:at.indexOf("middle")>=0,isBottom:at.indexOf("bottom")>=0}};u.prototype.getXAxisLabelPosition=function i(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")};u.prototype.getYAxisLabelPosition=function N(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")};u.prototype.getY2AxisLabelPosition=function ad(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")};u.prototype.getLabelPositionById=function aq(at){return at==="y2"?this.getY2AxisLabelPosition():at==="y"?this.getYAxisLabelPosition():this.getXAxisLabelPosition()};u.prototype.textForXAxisLabel=function Y(){return this.getLabelText("x")};u.prototype.textForYAxisLabel=function al(){return this.getLabelText("y")};u.prototype.textForY2AxisLabel=function G(){return this.getLabelText("y2")};u.prototype.xForAxisLabel=function p(au,at){var av=this.owner;if(au){return at.isLeft?0:at.isCenter?av.width/2:av.width}else{return at.isBottom?-av.height:at.isMiddle?-av.height/2:0}};u.prototype.dxForAxisLabel=function l(au,at){if(au){return at.isLeft?"0.5em":at.isRight?"-0.5em":"0"}else{return at.isTop?"-0.5em":at.isBottom?"0.5em":"0"}};u.prototype.textAnchorForAxisLabel=function S(au,at){if(au){return at.isLeft?"start":at.isCenter?"middle":"end"}else{return at.isBottom?"start":at.isMiddle?"middle":"end"}};u.prototype.xForXAxisLabel=function Z(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())};u.prototype.xForYAxisLabel=function ak(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())};u.prototype.xForY2AxisLabel=function n(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())};u.prototype.dxForXAxisLabel=function ah(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())};u.prototype.dxForYAxisLabel=function b(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())};u.prototype.dxForY2AxisLabel=function s(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())};u.prototype.dyForXAxisLabel=function U(){var au=this.owner,av=au.config,at=this.getXAxisLabelPosition();if(av.axis_rotated){return at.isInner?"1.2em":-25-this.getMaxTickWidth("x")}else{return at.isInner?"-0.5em":av.axis_x_height?av.axis_x_height-10:"3em"}};u.prototype.dyForYAxisLabel=function ac(){var au=this.owner,at=this.getYAxisLabelPosition();if(au.config.axis_rotated){return at.isInner?"-0.5em":"3em"}else{return at.isInner?"1.2em":-10-(au.config.axis_y_inner?0:(this.getMaxTickWidth("y")+10))}};u.prototype.dyForY2AxisLabel=function ag(){var au=this.owner,at=this.getY2AxisLabelPosition();if(au.config.axis_rotated){return at.isInner?"1.2em":"-2.2em"}else{return at.isInner?"-0.5em":15+(au.config.axis_y2_inner?0:(this.getMaxTickWidth("y2")+15))}};u.prototype.textAnchorForXAxisLabel=function H(){var at=this.owner;return this.textAnchorForAxisLabel(!at.config.axis_rotated,this.getXAxisLabelPosition())};u.prototype.textAnchorForYAxisLabel=function X(){var at=this.owner;return this.textAnchorForAxisLabel(at.config.axis_rotated,this.getYAxisLabelPosition())};u.prototype.textAnchorForY2AxisLabel=function h(){var at=this.owner;return this.textAnchorForAxisLabel(at.config.axis_rotated,this.getY2AxisLabelPosition())};u.prototype.getMaxTickWidth=function ap(au,aA){var aC=this.owner,av=aC.config,aB=0,at,ay,aw,ax,az;if(aA&&aC.currentMaxTickWidths[au]){return aC.currentMaxTickWidths[au]}if(aC.svg){at=aC.filterTargetsToShow(aC.data.targets);if(au==="y"){ay=aC.y.copy().domain(aC.getYDomain(at,"y"));aw=this.getYAxis(ay,aC.yOrient,av.axis_y_tick_format,aC.yAxisTickValues,false,true,true)}else{if(au==="y2"){ay=aC.y2.copy().domain(aC.getYDomain(at,"y2"));aw=this.getYAxis(ay,aC.y2Orient,av.axis_y2_tick_format,aC.y2AxisTickValues,false,true,true)}else{ay=aC.x.copy().domain(aC.getXDomain(at));aw=this.getXAxis(ay,aC.xOrient,aC.xAxisTickFormat,aC.xAxisTickValues,false,true,true);this.updateXAxisTickValues(at,aw)}}ax=aC.d3.select("body").append("div").classed("c3",true);az=ax.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),az.append("g").call(aw).each(function(){aC.d3.select(this).selectAll("text").each(function(){var aD=this.getBoundingClientRect();if(aB2){aC=aw-2;au=aD[0];aA=aD[aD.length-1];av=(aA-au)/(aC+1);az=[au];for(aB=0;aB=0;return"url("+(at?"":document.URL.split("#")[0])+"#"+au+")"};C.appendClip=function(at,au){return at.append("clipPath").attr("id",au).append("rect")};C.getAxisClipX=function(at){var au=Math.max(30,this.margin.left);return at?-(1+au):-(au-1)};C.getAxisClipY=function(at){return at?-20:-this.margin.top};C.getXAxisClipX=function(){var at=this;return at.getAxisClipX(!at.config.axis_rotated)};C.getXAxisClipY=function(){var at=this;return at.getAxisClipY(!at.config.axis_rotated)};C.getYAxisClipX=function(){var at=this;return at.config.axis_y_inner?-1:at.getAxisClipX(at.config.axis_rotated)};C.getYAxisClipY=function(){var at=this;return at.getAxisClipY(at.config.axis_rotated)};C.getAxisClipWidth=function(at){var au=this,aw=Math.max(30,au.margin.left),av=Math.max(30,au.margin.right);return at?au.width+2+aw+av:au.margin.left+20};C.getAxisClipHeight=function(at){return(at?this.margin.bottom:(this.margin.top+this.height))+20};C.getXAxisClipWidth=function(){var at=this;return at.getAxisClipWidth(!at.config.axis_rotated)};C.getXAxisClipHeight=function(){var at=this;return at.getAxisClipHeight(!at.config.axis_rotated)};C.getYAxisClipWidth=function(){var at=this;return at.getAxisClipWidth(at.config.axis_rotated)+(at.config.axis_y_inner?20:0)};C.getYAxisClipHeight=function(){var at=this;return at.getAxisClipHeight(at.config.axis_rotated)};C.initPie=function(){var at=this,av=at.d3,au=at.config;at.pie=av.layout.pie().value(function(aw){return aw.values.reduce(function(ay,ax){return ay+ax.value},0)});if(!au.data_order){at.pie.sort(null)}};C.updateRadius=function(){var au=this,av=au.config,at=av.gauge_width||av.donut_width;au.radiusExpanded=Math.min(au.arcWidth,au.arcHeight)/2;au.radius=au.radiusExpanded*0.95;au.innerRadiusRatio=at?(au.radius-at)/au.radius:0.6;au.innerRadius=au.hasType("donut")||au.hasType("gauge")?au.radius*au.innerRadiusRatio:0};C.updateArc=function(){var at=this;at.svgArc=at.getSvgArc();at.svgArcExpanded=at.getSvgArcExpanded();at.svgArcExpandedSub=at.getSvgArcExpanded(0.98)};C.updateAngle=function(ay){var aA=this,au=aA.config,aB=false,ax=0,av,az,aw,at;if(!au){return null}aA.pie(aA.filterTargetsToShow(aA.data.targets)).forEach(function(aC){if(!aB&&aC.data.id===ay.data.id){aB=true;ay=aC;ay.index=ax}ax++});if(isNaN(ay.startAngle)){ay.startAngle=0}if(isNaN(ay.endAngle)){ay.endAngle=ay.startAngle}if(aA.isGaugeType(ay.data)){av=au.gauge_min;az=au.gauge_max;aw=(Math.PI*(au.gauge_fullCircle?2:1))/(az-av);at=ay.value0.375?1.175-36/aC.radius:0.8)*aC.radius/av:0}}au="translate("+(aB*ax)+","+(aA*ax)+")"}return au};C.getArcRatio=function(aw){var at=this,au=at.config,av=Math.PI*(at.hasType("gauge")&&!au.gauge_fullCircle?1:2);return aw?(aw.endAngle-aw.startAngle)/av:null};C.convertToArcData=function(at){return this.addName({id:at.data.id,value:at.value,ratio:this.getArcRatio(at),index:at.index})};C.textForArcLabel=function(ay){var au=this,at,aw,av,az,ax;if(!au.shouldShowArcLabel()){return""}at=au.updateAngle(ay);aw=at?at.value:null;av=au.getArcRatio(at);az=ay.data.id;if(!au.hasType("gauge")&&!au.meetsArcLabelThreshold(av)){return""}ax=au.getArcLabelFormat();return ax?ax(aw,av,az):au.defaultArcValueFormat(aw,av)};C.expandArc=function(at){var av=this,au;if(av.transiting){au=aa.setInterval(function(){if(!av.transiting){aa.clearInterval(au);if(av.legend.selectAll(".c3-legend-item-focused").size()>0){av.expandArc(at)}}},10);return}at=av.mapToTargetIds(at);av.svg.selectAll(av.selectorTargets(at,"."+A.chartArc)).each(function(aw){if(!av.shouldExpand(aw.data.id)){return}av.d3.select(this).selectAll("path").transition().duration(av.expandDuration(aw.data.id)).attr("d",av.svgArcExpanded).transition().duration(av.expandDuration(aw.data.id)*2).attr("d",av.svgArcExpandedSub).each(function(ax){if(av.isDonutType(ax.data)){}})})};C.unexpandArc=function(at){var au=this;if(au.transiting){return}at=au.mapToTargetIds(at);au.svg.selectAll(au.selectorTargets(at,"."+A.chartArc)).selectAll("path").transition().duration(function(av){return au.expandDuration(av.data.id)}).attr("d",au.svgArc);au.svg.selectAll("."+A.arc).style("opacity",1)};C.expandDuration=function(av){var at=this,au=at.config;if(at.isDonutType(av)){return au.donut_expand_duration}else{if(at.isGaugeType(av)){return au.gauge_expand_duration}else{if(at.isPieType(av)){return au.pie_expand_duration}else{return 50}}}};C.shouldExpand=function(av){var at=this,au=at.config;return(at.isDonutType(av)&&au.donut_expand)||(at.isGaugeType(av)&&au.gauge_expand)||(at.isPieType(av)&&au.pie_expand)};C.shouldShowArcLabel=function(){var au=this,av=au.config,at=true;if(au.hasType("donut")){at=av.donut_label_show}else{if(au.hasType("pie")){at=av.pie_label_show}}return at};C.meetsArcLabelThreshold=function(aw){var au=this,av=au.config,at=au.hasType("donut")?av.donut_label_threshold:av.pie_label_threshold;return aw>=at};C.getArcLabelFormat=function(){var at=this,au=at.config,av=au.pie_label_format;if(at.hasType("gauge")){av=au.gauge_label_format}else{if(at.hasType("donut")){av=au.donut_label_format}}return av};C.getArcTitle=function(){var at=this;return at.hasType("donut")?at.config.donut_title:""};C.updateTargetsForArc=function(aw){var ay=this,au=ay.main,at,az,av=ay.classChartArc.bind(ay),aA=ay.classArcs.bind(ay),ax=ay.classFocus.bind(ay);at=au.select("."+A.chartArcs).selectAll("."+A.chartArc).data(ay.pie(aw)).attr("class",function(aB){return av(aB)+ax(aB.data)});az=at.enter().append("g").attr("class",av);az.append("g").attr("class",aA);az.append("text").attr("dy",ay.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")};C.initArc=function(){var at=this;at.arcs=at.main.select("."+A.chart).append("g").attr("class",A.chartArcs).attr("transform",at.getTranslate("arc"));at.arcs.append("text").attr("class",A.chartArcsTitle).style("text-anchor","middle").text(at.getArcTitle())};C.redrawArc=function(az,aA,au){var av=this,ax=av.d3,aw=av.config,at=av.main,ay;ay=at.selectAll("."+A.arcs).selectAll("."+A.arc).data(av.arcData.bind(av));ay.enter().append("path").attr("class",av.classArc.bind(av)).style("fill",function(aB){return av.color(aB.data)}).style("cursor",function(aB){return aw.interaction_enabled&&aw.data_selection_isselectable(aB)?"pointer":null}).style("opacity",0).each(function(aB){if(av.isGaugeType(aB.data)){aB.startAngle=aB.endAngle=aw.gauge_startingAngle}this._current=aB});ay.attr("transform",function(aB){return !av.isGaugeType(aB.data)&&au?"scale(0)":""}).style("opacity",function(aB){return aB===this._current?0:1}).on("mouseover",aw.interaction_enabled?function(aD){var aC,aB;if(av.transiting){return}aC=av.updateAngle(aD);if(aC){aB=av.convertToArcData(aC);av.expandArc(aC.data.id);av.api.focus(aC.data.id);av.toggleFocusLegend(aC.data.id,true);av.config.data_onmouseover(aB,this)}}:null).on("mousemove",aw.interaction_enabled?function(aE){var aC=av.updateAngle(aE),aB,aD;if(aC){aB=av.convertToArcData(aC),aD=[aB];av.showTooltip(aD,this)}}:null).on("mouseout",aw.interaction_enabled?function(aD){var aC,aB;if(av.transiting){return}aC=av.updateAngle(aD);if(aC){aB=av.convertToArcData(aC);av.unexpandArc(aC.data.id);av.api.revert();av.revertLegend();av.hideTooltip();av.config.data_onmouseout(aB,this)}}:null).on("click",aw.interaction_enabled?function(aE,aD){var aC=av.updateAngle(aE),aB;if(aC){aB=av.convertToArcData(aC);if(av.toggleShape){av.toggleShape(this,aB,aD)}av.config.data_onclick.call(av.api,aB,this)}}:null).each(function(){av.transiting=true}).transition().duration(az).attrTween("d",function(aD){var aB=av.updateAngle(aD),aC;if(!aB){return function(){return"M 0 0"}}if(isNaN(this._current.startAngle)){this._current.startAngle=0}if(isNaN(this._current.endAngle)){this._current.endAngle=this._current.startAngle}aC=ax.interpolate(this._current,aB);this._current=aC(0);return function(aF){var aE=aC(aF);aE.data=aD.data;return av.getArc(aE,true)}}).attr("transform",au?"scale(1)":"").style("fill",function(aB){return av.levelColor?av.levelColor(aB.data.values[0].value):av.color(aB.data.id)}).style("opacity",1).call(av.endall,function(){av.transiting=false});ay.exit().transition().duration(aA).style("opacity",0).remove();at.selectAll("."+A.chartArc).select("text").style("opacity",0).attr("class",function(aB){return av.isGaugeType(aB.data)?A.gaugeValue:""}).text(av.textForArcLabel.bind(av)).attr("transform",av.transformForArcLabel.bind(av)).style("font-size",function(aB){return av.isGaugeType(aB.data)?Math.round(av.radius/5)+"px":""}).transition().duration(az).style("opacity",function(aB){return av.isTargetToShow(aB.data.id)&&av.isArcType(aB.data)?1:0});at.select("."+A.chartArcsTitle).style("opacity",av.hasType("donut")||av.hasType("gauge")?1:0);if(av.hasType("gauge")){av.arcs.select("."+A.chartArcsBackground).attr("d",function(){var aB={data:[{value:aw.gauge_max}],startAngle:aw.gauge_startingAngle,endAngle:-1*aw.gauge_startingAngle};return av.getArc(aB,true,true)});av.arcs.select("."+A.chartArcsGaugeUnit).attr("dy",".75em").text(aw.gauge_label_show?aw.gauge_units:"");av.arcs.select("."+A.chartArcsGaugeMin).attr("dx",-1*(av.innerRadius+((av.radius-av.innerRadius)/(aw.gauge_fullCircle?1:2)))+"px").attr("dy","1.2em").text(aw.gauge_label_show?aw.gauge_min:"");av.arcs.select("."+A.chartArcsGaugeMax).attr("dx",av.innerRadius+((av.radius-av.innerRadius)/(aw.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(aw.gauge_label_show?aw.gauge_max:"")}};C.initGauge=function(){var at=this.arcs;if(this.hasType("gauge")){at.append("path").attr("class",A.chartArcsBackground);at.append("text").attr("class",A.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none");at.append("text").attr("class",A.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none");at.append("text").attr("class",A.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none")}};C.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0};C.initRegion=function(){var at=this;at.region=at.main.append("g").attr("clip-path",at.clipPath).attr("class",A.regions)};C.updateRegion=function(av){var at=this,au=at.config;at.region.style("visibility",at.hasArcType()?"hidden":"visible");at.mainRegion=at.main.select("."+A.regions).selectAll("."+A.region).data(au.regions);at.mainRegion.enter().append("g").append("rect").style("fill-opacity",0);at.mainRegion.attr("class",at.classRegion.bind(at));at.mainRegion.exit().transition().duration(av).style("opacity",0).remove()};C.redrawRegion=function(aw){var av=this,az=av.mainRegion.selectAll("rect").each(function(){var aA=av.d3.select(this.parentNode).datum();av.d3.select(this).datum(aA)}),at=av.regionX.bind(av),ay=av.regionY.bind(av),au=av.regionWidth.bind(av),ax=av.regionHeight.bind(av);return[(aw?az.transition():az).attr("x",at).attr("y",ay).attr("width",au).attr("height",ax).style("fill-opacity",function(aA){return f(aA.opacity)?aA.opacity:0.1})]};C.regionX=function(ax){var at=this,au=at.config,aw,av=ax.axis==="y"?at.y:at.y2;if(ax.axis==="y"||ax.axis==="y2"){aw=au.axis_rotated?("start" in ax?av(ax.start):0):0}else{aw=au.axis_rotated?0:("start" in ax?at.x(at.isTimeSeries()?at.parseDate(ax.start):ax.start):0)}return aw};C.regionY=function(ax){var at=this,au=at.config,aw,av=ax.axis==="y"?at.y:at.y2;if(ax.axis==="y"||ax.axis==="y2"){aw=au.axis_rotated?0:("end" in ax?av(ax.end):0)}else{aw=au.axis_rotated?("start" in ax?at.x(at.isTimeSeries()?at.parseDate(ax.start):ax.start):0):0}return aw};C.regionWidth=function(ax){var au=this,av=au.config,ay=au.regionX(ax),at,aw=ax.axis==="y"?au.y:au.y2;if(ax.axis==="y"||ax.axis==="y2"){at=av.axis_rotated?("end" in ax?aw(ax.end):au.width):au.width}else{at=av.axis_rotated?au.width:("end" in ax?au.x(au.isTimeSeries()?au.parseDate(ax.end):ax.end):au.width)}return at=0?A.focused:"")};C.classDefocused=function(at){return" "+(this.defocusedTargetIds.indexOf(at.id)>=0?A.defocused:"")};C.classChartText=function(at){return A.chartText+this.classTarget(at.id)};C.classChartLine=function(at){return A.chartLine+this.classTarget(at.id)};C.classChartBar=function(at){return A.chartBar+this.classTarget(at.id)};C.classChartArc=function(at){return A.chartArc+this.classTarget(at.data.id)};C.getTargetSelectorSuffix=function(at){return at||at===0?("-"+at).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""};C.selectorTarget=function(au,at){return(at||"")+"."+A.target+this.getTargetSelectorSuffix(au)};C.selectorTargets=function(au,av){var at=this;au=au||[];return au.length?au.map(function(aw){return at.selectorTarget(aw,av)}):null};C.selectorLegend=function(at){return"."+A.legendItem+this.getTargetSelectorSuffix(at)};C.selectorLegends=function(au){var at=this;return au&&au.length?au.map(function(av){return at.selectorLegend(av)}):null};var f=C.isValue=function(at){return at||at===0},v=C.isFunction=function(at){return typeof at==="function"},o=C.isString=function(at){return typeof at==="string"},B=C.isUndefined=function(at){return typeof at==="undefined"},F=C.isDefined=function(at){return typeof at!=="undefined"},L=C.ceil10=function(at){return Math.ceil(at/10)*10},T=C.asHalfPixel=function(at){return Math.ceil(at)+0.5},K=C.diffDomain=function(at){return at[1]-at[0]},z=C.isEmpty=function(at){return typeof at==="undefined"||at===null||(o(at)&&at.length===0)||(typeof at==="object"&&Object.keys(at).length===0)},I=C.notEmpty=function(at){return !C.isEmpty(at)},r=C.getOption=function(au,av,at){return F(au[av])?au[av]:at},q=C.hasValue=function(av,au){var at=false;Object.keys(av).forEach(function(aw){if(av[aw]===au){at=true}});return at},e=C.sanitise=function(at){return typeof at==="string"?at.replace(//g,">"):at},O=C.getPathBox=function(aw){var av=aw.getBoundingClientRect(),au=[aw.pathSegList.getItem(0),aw.pathSegList.getItem(1)],at=au[0].x,ax=Math.min(au[0].y,au[1].y);return{x:at,y:ax,width:av.width,height:av.height}};y.focus=function(at){var au=this.internal,av;at=au.mapToTargetIds(at);av=au.svg.selectAll(au.selectorTargets(at.filter(au.isTargetToShow,au))),this.revert();this.defocus();av.classed(A.focused,true).classed(A.defocused,false);if(au.hasArcType()){au.expandArc(at)}au.toggleFocusLegend(at,true);au.focusedTargetIds=at;au.defocusedTargetIds=au.defocusedTargetIds.filter(function(aw){return at.indexOf(aw)<0})};y.defocus=function(at){var au=this.internal,av;at=au.mapToTargetIds(at);av=au.svg.selectAll(au.selectorTargets(at.filter(au.isTargetToShow,au))),av.classed(A.focused,false).classed(A.defocused,true);if(au.hasArcType()){au.unexpandArc(at)}au.toggleFocusLegend(at,false);au.focusedTargetIds=au.focusedTargetIds.filter(function(aw){return at.indexOf(aw)<0});au.defocusedTargetIds=at};y.revert=function(at){var au=this.internal,av;at=au.mapToTargetIds(at);av=au.svg.selectAll(au.selectorTargets(at));av.classed(A.focused,false).classed(A.defocused,false);if(au.hasArcType()){au.unexpandArc(at)}if(au.config.legend_show){au.showLegend(at.filter(au.isLegendToShow.bind(au)));au.legend.selectAll(au.selectorLegends(at)).filter(function(){return au.d3.select(this).classed(A.legendItemFocused)}).classed(A.legendItemFocused,false)}au.focusedTargetIds=[];au.defocusedTargetIds=[]};y.show=function(au,aw){var av=this.internal,at;au=av.mapToTargetIds(au);aw=aw||{};av.removeHiddenTargetIds(au);at=av.svg.selectAll(av.selectorTargets(au));at.transition().style("opacity",1,"important").call(av.endall,function(){at.style("opacity",null).style("opacity",1)});if(aw.withLegend){av.showLegend(au)}av.redraw({withUpdateOrgXDomain:true,withUpdateXDomain:true,withLegend:true})};y.hide=function(au,aw){var av=this.internal,at;au=av.mapToTargetIds(au);aw=aw||{};av.addHiddenTargetIds(au);at=av.svg.selectAll(av.selectorTargets(au));at.transition().style("opacity",0,"important").call(av.endall,function(){at.style("opacity",null).style("opacity",0)});if(aw.withLegend){av.hideLegend(au)}av.redraw({withUpdateOrgXDomain:true,withUpdateXDomain:true,withLegend:true})};y.toggle=function(at,av){var aw=this,au=this.internal;au.mapToTargetIds(at).forEach(function(ax){au.isTargetToShow(ax)?aw.hide(ax,av):aw.show(ax,av)})};y.zoom=function(au){var at=this.internal;if(au){if(at.isTimeSeries()){au=au.map(function(av){return at.parseDate(av)})}at.brush.extent(au);at.redraw({withUpdateXDomain:true,withY:at.config.zoom_rescale});at.config.zoom_onzoom.call(this,at.x.orgDomain())}return at.brush.extent()};y.zoom.enable=function(au){var at=this.internal;at.config.zoom_enabled=au;at.updateAndRedraw()};y.unzoom=function(){var at=this.internal;at.brush.clear().update();at.redraw({withUpdateXDomain:true})};y.zoom.max=function(at){var au=this.internal,av=au.config,aw=au.d3;if(at===0||at){av.zoom_x_max=aw.max([au.orgXDomain[1],at])}else{return av.zoom_x_max}};y.zoom.min=function(av){var at=this.internal,au=at.config,aw=at.d3;if(av===0||av){au.zoom_x_min=aw.min([at.orgXDomain[0],av])}else{return au.zoom_x_min}};y.zoom.range=function(at){if(arguments.length){if(F(at.max)){this.domain.max(at.max)}if(F(at.min)){this.domain.min(at.min)}}else{return{max:this.domain.max(),min:this.domain.min()}}};y.load=function(av){var at=this.internal,au=at.config;if(av.xs){at.addXs(av.xs)}if("names" in av){y.data.names.bind(this)(av.names)}if("classes" in av){Object.keys(av.classes).forEach(function(aw){au.data_classes[aw]=av.classes[aw]})}if("categories" in av&&at.isCategorized()){au.axis_x_categories=av.categories}if("axes" in av){Object.keys(av.axes).forEach(function(aw){au.data_axes[aw]=av.axes[aw]})}if("colors" in av){Object.keys(av.colors).forEach(function(aw){au.data_colors[aw]=av.colors[aw]})}if("cacheIds" in av&&at.hasCaches(av.cacheIds)){at.load(at.getCaches(av.cacheIds),av.done);return}if("unload" in av){at.unload(at.mapToTargetIds((typeof av.unload==="boolean"&&av.unload)?null:av.unload),function(){at.loadFromArgs(av)})}else{at.loadFromArgs(av)}};y.unload=function(au){var at=this.internal;au=au||{};if(au instanceof Array){au={ids:au}}else{if(typeof au==="string"){au={ids:[au]}}}at.unload(at.mapToTargetIds(au.ids),function(){at.redraw({withUpdateOrgXDomain:true,withUpdateXDomain:true,withLegend:true});if(au.done){au.done()}})};y.flow=function(aB){var aG=this.internal,az,ay,aw=[],aC=aG.getMaxDataCount(),aD,ax,au,at,av=0,aA=0,aF,aE;if(aB.json){ay=aG.convertJsonToData(aB.json,aB.keys)}else{if(aB.rows){ay=aG.convertRowsToData(aB.rows)}else{if(aB.columns){ay=aG.convertColumnsToData(aB.columns)}else{return}}}az=aG.convertDataToTargets(ay,true);aG.data.targets.forEach(function(aJ){var aK=false,aI,aH;for(aI=0;aI1){aF=au.values[au.values.length-1].x-at.x}else{aF=at.x-aG.getXDomain(aG.data.targets)[0]}}else{aF=1}ax=[at.x-aF,at.x];aG.updateXDomain(null,true,true,false,ax)}else{if(aC===1){if(aG.isTimeSeries()){aF=(au.values[au.values.length-1].x-at.x)/2;ax=[new Date(+at.x-aF),new Date(+at.x+aF)];aG.updateXDomain(null,true,true,false,ax)}}}aG.updateTargets(aG.data.targets);aG.redraw({flow:{index:at.index,length:av,duration:f(aB.duration)?aB.duration:aG.config.transition_duration,done:aB.done,orgDataCount:aC,},withLegend:true,withTransition:aC>1,withTrimXDomain:false,withUpdateXAxis:true,})};C.generateFlow=function(av){var at=this,au=at.config,aw=at.d3;return function(){var aY=av.targets,aG=av.flow,aT=av.drawBar,aN=av.drawLine,aX=av.drawArea,aD=av.cx,aB=av.cy,aI=av.xv,aC=av.xForText,aR=av.yForText,ay=av.duration;var a1,aW=1,aL,ax=aG.index,aM=aG.length,aZ=at.getValueOnIndex(at.data.targets[0].values,ax),aJ=at.getValueOnIndex(at.data.targets[0].values,ax+aM),aQ=at.x.domain(),a0,aH=aG.duration||ay,aP=aG.done||function(){},aS=at.generateWait();var az=at.xgrid||aw.selectAll([]),aV=at.xgridLines||aw.selectAll([]),aF=at.mainRegion||aw.selectAll([]),aE=at.mainText||aw.selectAll([]),aO=at.mainBar||aw.selectAll([]),aA=at.mainLine||aw.selectAll([]),aK=at.mainArea||aw.selectAll([]),aU=at.mainCircle||aw.selectAll([]);at.flowing=true;at.data.targets.forEach(function(a2){a2.values.splice(0,aM)});a0=at.updateXDomain(aY,true,true);if(at.updateXGrid){at.updateXGrid(true)}if(!aG.orgDataCount){if(at.data.targets[0].values.length!==1){a1=at.x(aQ[0])-at.x(a0[0])}else{if(at.isTimeSeries()){aZ=at.getValueOnIndex(at.data.targets[0].values,0);aJ=at.getValueOnIndex(at.data.targets[0].values,at.data.targets[0].values.length-1);a1=at.x(aZ.x)-at.x(aJ.x)}else{a1=K(a0)/2}}}else{if(aG.orgDataCount===1||(aZ&&aZ.x)===(aJ&&aJ.x)){a1=at.x(aQ[0])-at.x(a0[0])}else{if(at.isTimeSeries()){a1=(at.x(aQ[0])-at.x(a0[0]))}else{a1=(at.x(aZ.x)-at.x(aJ.x))}}}aW=(K(aQ)/K(a0));aL="translate("+a1+",0) scale("+aW+",1)";at.hideXGridFocus();aw.transition().ease("linear").duration(aH).each(function(){aS.add(at.axes.x.transition().call(at.xAxis));aS.add(aO.transition().attr("transform",aL));aS.add(aA.transition().attr("transform",aL));aS.add(aK.transition().attr("transform",aL));aS.add(aU.transition().attr("transform",aL));aS.add(aE.transition().attr("transform",aL));aS.add(aF.filter(at.isRegionOnX).transition().attr("transform",aL));aS.add(az.transition().attr("transform",aL));aS.add(aV.transition().attr("transform",aL))}).call(aS,function(){var a4,a2=[],a5=[],a3=[];if(aM){for(a4=0;a4=0,aE=!ay||ay.indexOf(aD)>=0,aC=aB.classed(A.SELECTED);if(aB.classed(A.line)||aB.classed(A.area)){return}if(aA&&aE){if(au.data_selection_isselectable(aF)&&!aC){az(true,aB.classed(A.SELECTED,true),aF,aD)}}else{if(F(aw)&&aw){if(aC){az(false,aB.classed(A.SELECTED,false),aF,aD)}}}})};y.unselect=function(aw,ax){var at=this.internal,av=at.d3,au=at.config;if(!au.data_selection_enabled){return}at.main.selectAll("."+A.shapes).selectAll("."+A.shape).each(function(aE,aC){var aA=av.select(this),aF=aE.data?aE.data.id:aE.id,ay=at.getToggle(this,aE).bind(at),az=au.data_selection_grouped||!aw||aw.indexOf(aF)>=0,aD=!ax||ax.indexOf(aC)>=0,aB=aA.classed(A.SELECTED);if(aA.classed(A.line)||aA.classed(A.area)){return}if(az&&aD){if(au.data_selection_isselectable(aE)){if(aB){ay(false,aA.classed(A.SELECTED,false),aE,aC)}}}})};y.transform=function(aw,at){var au=this.internal,av=["pie","donut"].indexOf(aw)>=0?{withTransform:true}:null;au.transformTo(at,aw,av)};C.transformTo=function(au,ax,at){var av=this,ay=!av.hasArcType(),aw=at||{withTransitionForAxis:ay};aw.withTransitionForTransform=false;av.transiting=false;av.setTargetType(au,ax);av.updateTargets(av.data.targets);av.updateAndRedraw(aw)};y.groups=function(at){var au=this.internal,av=au.config;if(B(at)){return av.data_groups}av.data_groups=at;au.redraw();return av.data_groups};y.xgrids=function(av){var at=this.internal,au=at.config;if(!av){return au.grid_x_lines}au.grid_x_lines=av;at.redrawWithoutRescale();return au.grid_x_lines};y.xgrids.add=function(au){var at=this.internal;return this.xgrids(at.config.grid_x_lines.concat(au?au:[]))};y.xgrids.remove=function(au){var at=this.internal;at.removeGridLines(au,true)};y.ygrids=function(av){var at=this.internal,au=at.config;if(!av){return au.grid_y_lines}au.grid_y_lines=av;at.redrawWithoutRescale();return au.grid_y_lines};y.ygrids.add=function(au){var at=this.internal;return this.ygrids(at.config.grid_y_lines.concat(au?au:[]))};y.ygrids.remove=function(au){var at=this.internal;at.removeGridLines(au,false)};y.regions=function(av){var at=this.internal,au=at.config;if(!av){return au.regions}au.regions=av;at.redrawWithoutRescale();return au.regions};y.regions.add=function(av){var at=this.internal,au=at.config;if(!av){return au.regions}au.regions=au.regions.concat(av);at.redrawWithoutRescale();return au.regions};y.regions.remove=function(av){var at=this.internal,au=at.config,ax,aw,ay;av=av||{};ax=at.getOption(av,"duration",au.transition_duration);aw=at.getOption(av,"classes",[A.region]);ay=at.main.select("."+A.regions).selectAll(aw.map(function(az){return"."+az}));(ax?ay.transition().duration(ax):ay).style("opacity",0).remove();au.regions=au.regions.filter(function(aA){var az=false;if(!aA["class"]){return true}aA["class"].split(" ").forEach(function(aB){if(aw.indexOf(aB)>=0){az=true}});return !az});return au.regions};y.data=function(au){var at=this.internal.data.targets;return typeof au==="undefined"?at:at.filter(function(av){return[].concat(au).indexOf(av.id)>=0})};y.data.shown=function(at){return this.internal.filterTargetsToShow(this.data(at))};y.data.values=function(av){var at,au=null;if(av){at=this.data(av);au=at[0]?at[0].values.map(function(aw){return aw.value}):null}return au};y.data.names=function(at){this.internal.clearLegendItemTextBoxCache();return this.internal.updateDataAttributes("names",at)};y.data.colors=function(at){return this.internal.updateDataAttributes("colors",at)};y.data.axes=function(at){return this.internal.updateDataAttributes("axes",at)};y.category=function(av,aw){var at=this.internal,au=at.config;if(arguments.length>1){au.axis_x_categories[av]=aw;at.redraw()}return au.axis_x_categories[av]};y.categories=function(au){var at=this.internal,av=at.config;if(!arguments.length){return av.axis_x_categories}av.axis_x_categories=au;at.redraw();return av.axis_x_categories};y.color=function(au){var at=this.internal;return at.color(au)};y.x=function(at){var au=this.internal;if(arguments.length){au.updateTargetX(au.data.targets,at);au.redraw({withUpdateOrgXDomain:true,withUpdateXDomain:true})}return au.data.xs};y.xs=function(au){var at=this.internal;if(arguments.length){at.updateTargetXs(at.data.targets,au);at.redraw({withUpdateOrgXDomain:true,withUpdateXDomain:true})}return at.data.xs};y.axis=function(){};y.axis.labels=function(au){var at=this.internal;if(arguments.length){Object.keys(au).forEach(function(av){at.axis.setLabelText(av,au[av])});at.axis.updateLabels()}};y.axis.max=function(at){var au=this.internal,av=au.config;if(arguments.length){if(typeof at==="object"){if(f(at.x)){av.axis_x_max=at.x}if(f(at.y)){av.axis_y_max=at.y}if(f(at.y2)){av.axis_y2_max=at.y2}}else{av.axis_y_max=av.axis_y2_max=at}au.redraw({withUpdateOrgXDomain:true,withUpdateXDomain:true})}else{return{x:av.axis_x_max,y:av.axis_y_max,y2:av.axis_y2_max}}};y.axis.min=function(av){var at=this.internal,au=at.config;if(arguments.length){if(typeof av==="object"){if(f(av.x)){au.axis_x_min=av.x}if(f(av.y)){au.axis_y_min=av.y}if(f(av.y2)){au.axis_y2_min=av.y2}}else{au.axis_y_min=au.axis_y2_min=av}at.redraw({withUpdateOrgXDomain:true,withUpdateXDomain:true})}else{return{x:au.axis_x_min,y:au.axis_y_min,y2:au.axis_y2_min}}};y.axis.range=function(at){if(arguments.length){if(F(at.max)){this.axis.max(at.max)}if(F(at.min)){this.axis.min(at.min)}}else{return{max:this.axis.max(),min:this.axis.min()}}};y.legend=function(){};y.legend.show=function(at){var au=this.internal;au.showLegend(au.mapToTargetIds(at));au.updateAndRedraw({withLegend:true})};y.legend.hide=function(at){var au=this.internal;au.hideLegend(au.mapToTargetIds(at));au.updateAndRedraw({withLegend:true})};y.resize=function(av){var at=this.internal,au=at.config;au.size_width=av?av.width:null;au.size_height=av?av.height:null;this.flush()};y.flush=function(){var at=this.internal;at.updateAndRedraw({withLegend:true,withTransition:false,withTransitionForTransform:false})};y.destroy=function(){var at=this.internal;aa.clearInterval(at.intervalForObserveInserted);if(at.resizeTimeout!==undefined){aa.clearTimeout(at.resizeTimeout)}if(aa.detachEvent){aa.detachEvent("onresize",at.resizeFunction)}else{if(aa.removeEventListener){aa.removeEventListener("resize",at.resizeFunction)}else{var au=aa.onresize;if(au&&au.add&&au.remove){au.remove(at.resizeFunction)}}}at.selectChart.classed("c3",false).html("");Object.keys(at).forEach(function(av){at[av]=null});return null};y.tooltip=function(){};y.tooltip.show=function(aw){var at=this.internal,av,au;if(aw.mouse){au=aw.mouse}if(aw.data){if(at.isMultipleX()){au=[at.x(aw.data.x),at.getYScale(aw.data.id)(aw.data.value)];av=null}else{av=f(aw.data.index)?aw.data.index:at.getIndexByX(aw.data.x)}}else{if(typeof aw.x!=="undefined"){av=at.getIndexByX(aw.x)}else{if(typeof aw.index!=="undefined"){av=aw.index}}}at.dispatchEvent("mouseover",av,au);at.dispatchEvent("mousemove",av,au);at.config.tooltip_onshow.call(at,aw.data)};y.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0);this.internal.config.tooltip_onhide.call(this)};var ao;function a(aN,aK){var aO=aN.scale.linear(),aE="bottom",aC=6,aA,aI=3,at=null,aH,ay;var az=0,aJ=true,aB;aK=aK||{};aA=aK.withOuterTick?6:0;function aw(aQ,aP){aQ.attr("transform",function(aR){return"translate("+Math.ceil(aP(aR)+az)+", 0)"})}function av(aP,aQ){aP.attr("transform",function(aR){return"translate(0,"+Math.ceil(aQ(aR))+")"})}function au(aQ){var aR=aQ[0],aP=aQ[aQ.length-1];return aR0&&aQ[0]>0){aQ.unshift(aQ[0]-(aQ[1]-aQ[0]))}return aQ}function aD(){var aQ=aO.copy(),aP;if(aK.isCategory){aP=aO.domain();aQ.domain([aP[0],aP[1]-1])}return aQ}function aG(aP){var aQ=aH?aH(aP):aP;return typeof aQ!=="undefined"?aQ:""}function aF(aQ){if(ao){return ao}var aP={h:11.5,w:5.5};aQ.select("text").text(aG).each(function(aV){var aT=this.getBoundingClientRect(),aU=aG(aV),aS=aT.height,aR=aU?(aT.width/aU.length):undefined;if(aS&&aR){aP.h=aS;aP.w=aR}}).text("");ao=aP;return aP}function aL(aP){return aK.withoutTransition?aP:aN.transition(aP)}function ax(aP){aP.each(function(){var bh=ax.g=aN.select(this);var bd=this.__chart__||aO,bb=this.__chart__=aD();var bl=at?at:aM(bb),be=bh.selectAll(".tick").data(bl,bb),a5=be.enter().insert("g",".domain").attr("class","tick").style("opacity",0.000001),ba=be.exit().remove(),aV=aL(be).style("opacity",1),aQ,a3,a1;var a4=aO.rangeExtent?aO.rangeExtent():au(aO.range()),a8=bh.selectAll(".domain").data([0]),bn=(a8.enter().append("path").attr("class","domain"),aL(a8));a5.append("line");a5.append("text");var aT=a5.select("line"),bj=aV.select("line"),aW=a5.select("text"),bg=aV.select("text");if(aK.isCategory){az=Math.ceil((bb(1)-bb(0))/2);a3=aB?0:az;a1=aB?az:0}else{az=a3=0}var a2,aX,bm=aF(bh.select(".tick")),bi=[];var aR=Math.max(aC,0)+aI,aY=aE==="left"||aE==="right";function aS(bu,bs){var bo=aG(bu),bq,br,bt,bv=[];if(Object.prototype.toString.call(bo)==="[object Array]"){return bo}if(!bs||bs<=0){bs=aY?95:aK.isCategory?(Math.ceil(bb(bl[1])-bb(bl[0]))-12):110}function bp(by,bx){br=undefined;for(var bw=1;bw0?"start":"end"}function bk(bo){if(!bo){return""}return"rotate("+bo+")"}function aU(bo){if(!bo){return 0}return 8*Math.sin(Math.PI*(bo/180))}function a9(bo){if(!bo){return aR}return 11.5-2.5*(bo/15)*(bo>0?1:-1)}switch(aE){case"bottom":aQ=aw;aT.attr("y2",aC);aW.attr("y",aR);bj.attr("x1",a3).attr("x2",a3).attr("y2",a6);bg.attr("x",0).attr("y",a9(bc)).style("text-anchor",bf(bc)).attr("transform",bk(bc));aX.attr("x",0).attr("dy",a7).attr("dx",aU(bc));bn.attr("d","M"+a4[0]+","+aA+"V0H"+a4[1]+"V"+aA);break;case"top":aQ=aw;aT.attr("y2",-aC);aW.attr("y",-aR);bj.attr("x2",0).attr("y2",-aC);bg.attr("x",0).attr("y",-aR);a2.style("text-anchor","middle");aX.attr("x",0).attr("dy","0em");bn.attr("d","M"+a4[0]+","+-aA+"V0H"+a4[1]+"V"+-aA);break;case"left":aQ=av;aT.attr("x2",-aC);aW.attr("x",-aR);bj.attr("x2",-aC).attr("y1",a1).attr("y2",a1);bg.attr("x",-aR).attr("y",az);a2.style("text-anchor","end");aX.attr("x",-aR).attr("dy",a7);bn.attr("d","M"+-aA+","+a4[0]+"H0V"+a4[1]+"H"+-aA);break;case"right":aQ=av;aT.attr("x2",aC);aW.attr("x",aR);bj.attr("x2",aC).attr("y2",0);bg.attr("x",aR).attr("y",0);a2.style("text-anchor","start");aX.attr("x",aR).attr("dy",a7);bn.attr("d","M"+aA+","+a4[0]+"H0V"+a4[1]+"H"+aA);break}if(bb.rangeBand){var aZ=bb,a0=aZ.rangeBand()/2;bd=bb=function(bo){return aZ(bo)+a0}}else{if(bd.rangeBand){bd=bb}else{ba.call(aQ,bb)}}a5.call(aQ,bd);aV.call(aQ,bb)})}ax.scale=function(aP){if(!arguments.length){return aO}aO=aP;return ax};ax.orient=function(aP){if(!arguments.length){return aE}aE=aP in {top:1,right:1,bottom:1,left:1}?aP+"":"bottom";return ax};ax.tickFormat=function(aP){if(!arguments.length){return aH}aH=aP;return ax};ax.tickCentered=function(aP){if(!arguments.length){return aB}aB=aP;return ax};ax.tickOffset=function(){return az};ax.tickInterval=function(){var aP,aQ;if(aK.isCategory){aP=az*2}else{aQ=ax.g.select("path.domain").node().getTotalLength()-aA*2;aP=aQ/ax.g.selectAll("line").size()}return aP===Infinity?0:aP};ax.ticks=function(){if(!arguments.length){return ay}ay=arguments;return ax};ax.tickCulling=function(aP){if(!arguments.length){return aJ}aJ=aP;return ax};ax.tickValues=function(aP){if(typeof aP==="function"){at=function(){return aP(aO.domain())}}else{if(!arguments.length){return at}at=aP}return ax};return ax}C.isSafari=function(){var at=aa.navigator.userAgent;return at.indexOf("Safari")>=0&&at.indexOf("Chrome")<0};C.isChrome=function(){var at=aa.navigator.userAgent;return at.indexOf("Chrome")>=0};if(!Function.prototype.bind){Function.prototype.bind=function(at){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable")}var ax=Array.prototype.slice.call(arguments,1),aw=this,au=function(){},av=function(){return aw.apply(this instanceof au?this:at,ax.concat(Array.prototype.slice.call(arguments)))};au.prototype=this.prototype;av.prototype=new au();return av}}(function(){if(!("SVGPathSeg" in aa)){aa.SVGPathSeg=function(au,av,at){this.pathSegType=au;this.pathSegTypeAsLetter=av;this._owningPathSegList=at};SVGPathSeg.PATHSEG_UNKNOWN=0;SVGPathSeg.PATHSEG_CLOSEPATH=1;SVGPathSeg.PATHSEG_MOVETO_ABS=2;SVGPathSeg.PATHSEG_MOVETO_REL=3;SVGPathSeg.PATHSEG_LINETO_ABS=4;SVGPathSeg.PATHSEG_LINETO_REL=5;SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6;SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7;SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8;SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9;SVGPathSeg.PATHSEG_ARC_ABS=10;SVGPathSeg.PATHSEG_ARC_REL=11;SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12;SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13;SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14;SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15;SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16;SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17;SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18;SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19;SVGPathSeg.prototype._segmentChanged=function(){if(this._owningPathSegList){this._owningPathSegList.segmentChanged(this)}};aa.SVGPathSegClosePath=function(at){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CLOSEPATH,"z",at)};SVGPathSegClosePath.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"};SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter};SVGPathSegClosePath.prototype.clone=function(){return new SVGPathSegClosePath(undefined)};aa.SVGPathSegMovetoAbs=function(au,at,av){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_MOVETO_ABS,"M",au);this._x=at;this._y=av};SVGPathSegMovetoAbs.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"};SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y};SVGPathSegMovetoAbs.prototype.clone=function(){return new SVGPathSegMovetoAbs(undefined,this._x,this._y)};Object.defineProperty(SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegMovetoRel=function(au,at,av){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_MOVETO_REL,"m",au);this._x=at;this._y=av};SVGPathSegMovetoRel.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"};SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y};SVGPathSegMovetoRel.prototype.clone=function(){return new SVGPathSegMovetoRel(undefined,this._x,this._y)};Object.defineProperty(SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegLinetoAbs=function(au,at,av){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_ABS,"L",au);this._x=at;this._y=av};SVGPathSegLinetoAbs.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"};SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y};SVGPathSegLinetoAbs.prototype.clone=function(){return new SVGPathSegLinetoAbs(undefined,this._x,this._y)};Object.defineProperty(SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegLinetoRel=function(au,at,av){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_REL,"l",au);this._x=at;this._y=av};SVGPathSegLinetoRel.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"};SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y};SVGPathSegLinetoRel.prototype.clone=function(){return new SVGPathSegLinetoRel(undefined,this._x,this._y)};Object.defineProperty(SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegCurvetoCubicAbs=function(aw,at,az,av,ay,au,ax){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",aw);this._x=at;this._y=az;this._x1=av;this._y1=ay;this._x2=au;this._y2=ax};SVGPathSegCurvetoCubicAbs.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"};SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y};SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new SVGPathSegCurvetoCubicAbs(undefined,this._x,this._y,this._x1,this._y1,this._x2,this._y2)};Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(at){this._x1=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(at){this._y1=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(at){this._x2=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(at){this._y2=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegCurvetoCubicRel=function(aw,at,az,av,ay,au,ax){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",aw);this._x=at;this._y=az;this._x1=av;this._y1=ay;this._x2=au;this._y2=ax};SVGPathSegCurvetoCubicRel.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"};SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y};SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new SVGPathSegCurvetoCubicRel(undefined,this._x,this._y,this._x1,this._y1,this._x2,this._y2)};Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(at){this._x1=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(at){this._y1=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(at){this._x2=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(at){this._y2=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegCurvetoQuadraticAbs=function(av,at,ax,au,aw){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",av);this._x=at;this._y=ax;this._x1=au;this._y1=aw};SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"};SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y};SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticAbs(undefined,this._x,this._y,this._x1,this._y1)};Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(at){this._x1=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(at){this._y1=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegCurvetoQuadraticRel=function(av,at,ax,au,aw){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",av);this._x=at;this._y=ax;this._x1=au;this._y1=aw};SVGPathSegCurvetoQuadraticRel.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"};SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y};SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticRel(undefined,this._x,this._y,this._x1,this._y1)};Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(at){this._x1=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(at){this._y1=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegArcAbs=function(aw,at,aA,av,au,az,ay,ax){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_ARC_ABS,"A",aw);this._x=at;this._y=aA;this._r1=av;this._r2=au;this._angle=az;this._largeArcFlag=ay;this._sweepFlag=ax};SVGPathSegArcAbs.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"};SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y};SVGPathSegArcAbs.prototype.clone=function(){return new SVGPathSegArcAbs(undefined,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)};Object.defineProperty(SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(at){this._r1=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(at){this._r2=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(at){this._angle=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(at){this._largeArcFlag=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(at){this._sweepFlag=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegArcRel=function(aw,at,aA,av,au,az,ay,ax){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_ARC_REL,"a",aw);this._x=at;this._y=aA;this._r1=av;this._r2=au;this._angle=az;this._largeArcFlag=ay;this._sweepFlag=ax};SVGPathSegArcRel.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"};SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y};SVGPathSegArcRel.prototype.clone=function(){return new SVGPathSegArcRel(undefined,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)};Object.defineProperty(SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(at){this._r1=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(at){this._r2=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(at){this._angle=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(at){this._largeArcFlag=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(at){this._sweepFlag=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegLinetoHorizontalAbs=function(au,at){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",au);this._x=at};SVGPathSegLinetoHorizontalAbs.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"};SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x};SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new SVGPathSegLinetoHorizontalAbs(undefined,this._x)};Object.defineProperty(SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegLinetoHorizontalRel=function(au,at){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",au);this._x=at};SVGPathSegLinetoHorizontalRel.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"};SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x};SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new SVGPathSegLinetoHorizontalRel(undefined,this._x)};Object.defineProperty(SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegLinetoVerticalAbs=function(at,au){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",at);this._y=au};SVGPathSegLinetoVerticalAbs.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"};SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y};SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new SVGPathSegLinetoVerticalAbs(undefined,this._y)};Object.defineProperty(SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegLinetoVerticalRel=function(at,au){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",at);this._y=au};SVGPathSegLinetoVerticalRel.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"};SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y};SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new SVGPathSegLinetoVerticalRel(undefined,this._y)};Object.defineProperty(SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegCurvetoCubicSmoothAbs=function(av,at,ax,au,aw){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",av);this._x=at;this._y=ax;this._x2=au;this._y2=aw};SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"};SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y};SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new SVGPathSegCurvetoCubicSmoothAbs(undefined,this._x,this._y,this._x2,this._y2)};Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(at){this._x2=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(at){this._y2=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegCurvetoCubicSmoothRel=function(av,at,ax,au,aw){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",av);this._x=at;this._y=ax;this._x2=au;this._y2=aw};SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"};SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y};SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new SVGPathSegCurvetoCubicSmoothRel(undefined,this._x,this._y,this._x2,this._y2)};Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(at){this._x2=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(at){this._y2=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegCurvetoQuadraticSmoothAbs=function(au,at,av){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",au);this._x=at;this._y=av};SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"};SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y};SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticSmoothAbs(undefined,this._x,this._y)};Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});aa.SVGPathSegCurvetoQuadraticSmoothRel=function(au,at,av){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",au);this._x=at;this._y=av};SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(SVGPathSeg.prototype);SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"};SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y};SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticSmoothRel(undefined,this._x,this._y)};Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(at){this._x=at;this._segmentChanged()},enumerable:true});Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(at){this._y=at;this._segmentChanged()},enumerable:true});SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new SVGPathSegClosePath(undefined)};SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(at,au){return new SVGPathSegMovetoAbs(undefined,at,au)};SVGPathElement.prototype.createSVGPathSegMovetoRel=function(at,au){return new SVGPathSegMovetoRel(undefined,at,au)};SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(at,au){return new SVGPathSegLinetoAbs(undefined,at,au)};SVGPathElement.prototype.createSVGPathSegLinetoRel=function(at,au){return new SVGPathSegLinetoRel(undefined,at,au)};SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(at,ay,av,ax,au,aw){return new SVGPathSegCurvetoCubicAbs(undefined,at,ay,av,ax,au,aw)};SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(at,ay,av,ax,au,aw){return new SVGPathSegCurvetoCubicRel(undefined,at,ay,av,ax,au,aw)};SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(at,aw,au,av){return new SVGPathSegCurvetoQuadraticAbs(undefined,at,aw,au,av)};SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(at,aw,au,av){return new SVGPathSegCurvetoQuadraticRel(undefined,at,aw,au,av)};SVGPathElement.prototype.createSVGPathSegArcAbs=function(at,az,av,au,ay,ax,aw){return new SVGPathSegArcAbs(undefined,at,az,av,au,ay,ax,aw)};SVGPathElement.prototype.createSVGPathSegArcRel=function(at,az,av,au,ay,ax,aw){return new SVGPathSegArcRel(undefined,at,az,av,au,ay,ax,aw)};SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(at){return new SVGPathSegLinetoHorizontalAbs(undefined,at)};SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(at){return new SVGPathSegLinetoHorizontalRel(undefined,at)};SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(at){return new SVGPathSegLinetoVerticalAbs(undefined,at)};SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(at){return new SVGPathSegLinetoVerticalRel(undefined,at)};SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(at,aw,au,av){return new SVGPathSegCurvetoCubicSmoothAbs(undefined,at,aw,au,av)};SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(at,aw,au,av){return new SVGPathSegCurvetoCubicSmoothRel(undefined,at,aw,au,av)};SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(at,au){return new SVGPathSegCurvetoQuadraticSmoothAbs(undefined,at,au)};SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(at,au){return new SVGPathSegCurvetoQuadraticSmoothRel(undefined,at,au)}}if(!("SVGPathSegList" in aa)){aa.SVGPathSegList=function(at){this._pathElement=at;this._list=this._parsePath(this._pathElement.getAttribute("d"));this._mutationObserverConfig={attributes:true,attributeFilter:["d"]};this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this));this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)};Object.defineProperty(SVGPathSegList.prototype,"numberOfItems",{get:function(){this._checkPathSynchronizedToList();return this._list.length},enumerable:true});Object.defineProperty(SVGPathElement.prototype,"pathSegList",{get:function(){if(!this._pathSegList){this._pathSegList=new SVGPathSegList(this)}return this._pathSegList},enumerable:true});Object.defineProperty(SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:true});Object.defineProperty(SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:true});Object.defineProperty(SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:true});SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())};SVGPathSegList.prototype._updateListFromPathMutations=function(au){if(!this._pathElement){return}var at=false;au.forEach(function(av){if(av.attributeName=="d"){at=true}});if(at){this._list=this._parsePath(this._pathElement.getAttribute("d"))}};SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect();this._pathElement.setAttribute("d",SVGPathSegList._pathSegArrayAsString(this._list));this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)};SVGPathSegList.prototype.segmentChanged=function(at){this._writeListToPath()};SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList();this._list.forEach(function(at){at._owningPathSegList=null});this._list=[];this._writeListToPath()};SVGPathSegList.prototype.initialize=function(at){this._checkPathSynchronizedToList();this._list=[at];at._owningPathSegList=this;this._writeListToPath();return at};SVGPathSegList.prototype._checkValidIndex=function(at){if(isNaN(at)||at<0||at>=this.numberOfItems){throw"INDEX_SIZE_ERR"}};SVGPathSegList.prototype.getItem=function(at){this._checkPathSynchronizedToList();this._checkValidIndex(at);return this._list[at]};SVGPathSegList.prototype.insertItemBefore=function(au,at){this._checkPathSynchronizedToList();if(at>this.numberOfItems){at=this.numberOfItems}if(au._owningPathSegList){au=au.clone()}this._list.splice(at,0,au);au._owningPathSegList=this;this._writeListToPath();return au};SVGPathSegList.prototype.replaceItem=function(au,at){this._checkPathSynchronizedToList();if(au._owningPathSegList){au=au.clone()}this._checkValidIndex(at);this._list[at]=au;au._owningPathSegList=this;this._writeListToPath();return au};SVGPathSegList.prototype.removeItem=function(at){this._checkPathSynchronizedToList();this._checkValidIndex(at);var au=this._list[at];this._list.splice(at,1);this._writeListToPath();return au};SVGPathSegList.prototype.appendItem=function(at){this._checkPathSynchronizedToList();if(at._owningPathSegList){at=at.clone()}this._list.push(at);at._owningPathSegList=this;this._writeListToPath();return at};SVGPathSegList._pathSegArrayAsString=function(au){var at="";var av=true;au.forEach(function(aw){if(av){av=false;at+=aw._asPathString()}else{at+=" "+aw._asPathString()}});return at};SVGPathSegList.prototype._parsePath=function(av){if(!av||av.length==0){return[]}var au=this;var az=function(){this.pathSegList=[]};az.prototype.appendSegment=function(aA){this.pathSegList.push(aA)};var aw=function(aA){this._string=aA;this._currentIndex=0;this._endIndex=this._string.length;this._previousCommand=SVGPathSeg.PATHSEG_UNKNOWN;this._skipOptionalSpaces()};aw.prototype._isCurrentSpace=function(){var aA=this._string[this._currentIndex];return aA<=" "&&(aA==" "||aA=="\n"||aA=="\t"||aA=="\r"||aA=="\f")};aw.prototype._skipOptionalSpaces=function(){while(this._currentIndex="0"&&aA<="9"))&&aB!=SVGPathSeg.PATHSEG_CLOSEPATH){if(aB==SVGPathSeg.PATHSEG_MOVETO_ABS){return SVGPathSeg.PATHSEG_LINETO_ABS}if(aB==SVGPathSeg.PATHSEG_MOVETO_REL){return SVGPathSeg.PATHSEG_LINETO_REL}return aB}return SVGPathSeg.PATHSEG_UNKNOWN};aw.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData()){return true}var aA=this.peekSegmentType();return aA==SVGPathSeg.PATHSEG_MOVETO_ABS||aA==SVGPathSeg.PATHSEG_MOVETO_REL};aw.prototype._parseNumber=function(){var aI=0;var aG=0;var aB=1;var aF=0;var aC=1;var aA=1;var aJ=this._currentIndex;this._skipOptionalSpaces();if(this._currentIndex"9")&&this._string.charAt(this._currentIndex)!=".")){return undefined}var aH=this._currentIndex;while(this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9"){this._currentIndex++}if(this._currentIndex!=aH){var aE=this._currentIndex-1;var aK=1;while(aE>=aH){aG+=aK*(this._string.charAt(aE--)-"0");aK*=10}}if(this._currentIndex=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9"){return undefined}while(this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9"){aF+=(this._string.charAt(this._currentIndex++)-"0")*(aB*=0.1)}}if(this._currentIndex!=aJ&&this._currentIndex+1=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9"){return undefined}while(this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9"){aI*=10;aI+=(this._string.charAt(this._currentIndex)-"0");this._currentIndex++}}var aD=aG+aF;aD*=aC;if(aI){aD*=Math.pow(10,aA*aI)}if(aJ==this._currentIndex){return undefined}this._skipOptionalSpacesOrDelimiter();return aD};aw.prototype._parseArcFlag=function(){if(this._currentIndex>=this._endIndex){return undefined}var aA=false;var aB=this._string.charAt(this._currentIndex++);if(aB=="0"){aA=false}else{if(aB=="1"){aA=true}else{return undefined}}this._skipOptionalSpacesOrDelimiter();return aA};aw.prototype.parseSegment=function(){var aB=this._string[this._currentIndex];var aC=this._pathSegTypeFromChar(aB);if(aC==SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==SVGPathSeg.PATHSEG_UNKNOWN){return null}aC=this._nextCommandHelper(aB,this._previousCommand);if(aC==SVGPathSeg.PATHSEG_UNKNOWN){return null}}else{this._currentIndex++}this._previousCommand=aC;switch(aC){case SVGPathSeg.PATHSEG_MOVETO_REL:return new SVGPathSegMovetoRel(au,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_MOVETO_ABS:return new SVGPathSegMovetoAbs(au,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_REL:return new SVGPathSegLinetoRel(au,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_ABS:return new SVGPathSegLinetoAbs(au,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new SVGPathSegLinetoHorizontalRel(au,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new SVGPathSegLinetoHorizontalAbs(au,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new SVGPathSegLinetoVerticalRel(au,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new SVGPathSegLinetoVerticalAbs(au,this._parseNumber());case SVGPathSeg.PATHSEG_CLOSEPATH:this._skipOptionalSpaces();return new SVGPathSegClosePath(au);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var aA={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicRel(au,aA.x,aA.y,aA.x1,aA.y1,aA.x2,aA.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:var aA={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicAbs(au,aA.x,aA.y,aA.x1,aA.y1,aA.x2,aA.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:var aA={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothRel(au,aA.x,aA.y,aA.x2,aA.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:var aA={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothAbs(au,aA.x,aA.y,aA.x2,aA.y2);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:var aA={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticRel(au,aA.x,aA.y,aA.x1,aA.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:var aA={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticAbs(au,aA.x,aA.y,aA.x1,aA.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new SVGPathSegCurvetoQuadraticSmoothRel(au,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new SVGPathSegCurvetoQuadraticSmoothAbs(au,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_ARC_REL:var aA={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcRel(au,aA.x,aA.y,aA.x1,aA.y1,aA.arcAngle,aA.arcLarge,aA.arcSweep);case SVGPathSeg.PATHSEG_ARC_ABS:var aA={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcAbs(au,aA.x,aA.y,aA.x1,aA.y1,aA.arcAngle,aA.arcLarge,aA.arcSweep);default:throw"Unknown path seg type."}};var at=new az();var ax=new aw(av);if(!ax.initialCommandIsMoveTo()){return[]}while(ax.hasMoreData()){var ay=ax.parseSegment();if(!ay){return[]}at.appendSegment(ay)}return at.pathSegList}}}());if(typeof define==="function"&&define.amd){define("c3",["d3"],function(){return j})}else{if("undefined"!==typeof exports&&"undefined"!==typeof module){module.exports=j}else{aa.c3=j}}})(window);

 




© 2015 - 2024 Weber Informatics LLC | Privacy Policy