!function r(i,o,a){function s(e,t){if(!o[e]){if(!i[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(u)return u(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}n=o[e]={exports:{}},i[e][0].call(n.exports,function(t){return s(i[e][1][t]||t)},n,n.exports,r,i,o,a)}return o[e].exports}for(var u="function"==typeof require&&require,t=0;t/g,">"):t}function f(t){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this.owner=t,this.d3=t.d3,this.internal=e}var D={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",dragZoom:"c3-drag-zoom",focused:"c3-focused",defocused:"c3-defocused",region:"c3-region",regions:"c3-regions",title:"c3-title",tooltipContainer:"c3-tooltip-container",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcLabelLine:"c3-arc-label-line",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",empty:"c3-empty",text:"c3-text",texts:"c3-texts",gaugeValue:"c3-gauge-value",grid:"c3-grid",gridLines:"c3-grid-lines",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axis:"c3-axis",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendBackground:"c3-legend-background",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"},t=(f.prototype.init=function(){var t=this.owner,e=t.config,n=t.main;t.axes.x=n.append("g").attr("class",D.axis+" "+D.axisX).attr("clip-path",e.axis_x_inner?"":t.clipPathForXAxis).attr("transform",t.getTranslate("x")).style("visibility",e.axis_x_show?"visible":"hidden"),t.axes.x.append("text").attr("class",D.axisXLabel).attr("transform",e.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),t.axes.y=n.append("g").attr("class",D.axis+" "+D.axisY).attr("clip-path",e.axis_y_inner?"":t.clipPathForYAxis).attr("transform",t.getTranslate("y")).style("visibility",e.axis_y_show?"visible":"hidden"),t.axes.y.append("text").attr("class",D.axisYLabel).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),t.axes.y2=n.append("g").attr("class",D.axis+" "+D.axisY2).attr("transform",t.getTranslate("y2")).style("visibility",e.axis_y2_show?"visible":"hidden"),t.axes.y2.append("text").attr("class",D.axisY2Label).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},f.prototype.getXAxis=function(t,e,n,r,i,o,a){var s=this.owner,u=s.config,i={isCategory:s.isCategorized(),withOuterTick:i,tickMultiline:u.axis_x_tick_multiline,tickMultilineMax:u.axis_x_tick_multiline?Number(u.axis_x_tick_multilineMax):0,tickWidth:u.axis_x_tick_width,tickTextRotate:a?0:u.axis_x_tick_rotate,withoutTransition:o},a=new this.internal(this,i).axis.scale(t).orient(e);return s.isTimeSeries()&&r&&"function"!=typeof r&&(r=r.map(function(t){return s.parseDate(t)})),a.tickFormat(n).tickValues(r),s.isCategorized()&&(a.tickCentered(u.axis_x_tick_centered),c(u.axis_x_tick_culling))&&(u.axis_x_tick_culling=!1),a},f.prototype.updateXAxisTickValues=function(t,e){var n,r=this.owner,i=r.config;return(i.axis_x_tick_fit||i.axis_x_tick_count)&&(n=this.generateTickValues(r.mapTargetsToUniqueXs(t),i.axis_x_tick_count,r.isTimeSeries())),(e||(r.xAxis.tickValues(n),r.subXAxis)).tickValues(n),n},f.prototype.getYAxis=function(t,e,n,r,i,o,a){var s=this.owner,u=s.config,i={withOuterTick:i,withoutTransition:o,tickTextRotate:a?0:u.axis_y_tick_rotate},o=new this.internal(this,i).axis.scale(t).orient(e).tickFormat(n);return s.isTimeSeriesY()?o.ticks(u.axis_y_tick_time_type,u.axis_y_tick_time_interval):o.tickValues(r),o},f.prototype.getId=function(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:"y"},f.prototype.getXAxisTickFormat=function(){var e=this.owner,n=e.config,r=e.isTimeSeries()?e.defaultAxisTimeFormat:e.isCategorized()?e.categoryName:function(t){return t};return n.axis_x_tick_format&&(h(n.axis_x_tick_format)?r=n.axis_x_tick_format:e.isTimeSeries()&&(r=function(t){return t?e.axisTimeFormat(n.axis_x_tick_format)(t):""})),h(r)?function(t){return r.call(e,t)}:r},f.prototype.getTickValues=function(t,e){return t||(e?e.tickValues():void 0)},f.prototype.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},f.prototype.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},f.prototype.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},f.prototype.getLabelOptionByAxisId=function(t){var e,n=this.owner.config;return"y"===t?e=n.axis_y_label:"y2"===t?e=n.axis_y2_label:"x"===t&&(e=n.axis_x_label),e},f.prototype.getLabelText=function(t){t=this.getLabelOptionByAxisId(t);return u(t)?t:t?t.text:null},f.prototype.setLabelText=function(t,e){var n=this.owner.config,r=this.getLabelOptionByAxisId(t);u(r)?"y"===t?n.axis_y_label=e:"y2"===t?n.axis_y2_label=e:"x"===t&&(n.axis_x_label=e):r&&(r.text=e)},f.prototype.getLabelPosition=function(t,e){t=this.getLabelOptionByAxisId(t),t=t&&"object"===a(t)&&t.position?t.position:e;return{isInner:0<=t.indexOf("inner"),isOuter:0<=t.indexOf("outer"),isLeft:0<=t.indexOf("left"),isCenter:0<=t.indexOf("center"),isRight:0<=t.indexOf("right"),isTop:0<=t.indexOf("top"),isMiddle:0<=t.indexOf("middle"),isBottom:0<=t.indexOf("bottom")}},f.prototype.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},f.prototype.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},f.prototype.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},f.prototype.getLabelPositionById=function(t){return"y2"===t?this.getY2AxisLabelPosition():"y"===t?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},f.prototype.textForXAxisLabel=function(){return this.getLabelText("x")},f.prototype.textForYAxisLabel=function(){return this.getLabelText("y")},f.prototype.textForY2AxisLabel=function(){return this.getLabelText("y2")},f.prototype.xForAxisLabel=function(t,e){var n=this.owner;return t?e.isLeft?0:e.isCenter?n.width/2:n.width:e.isBottom?-n.height:e.isMiddle?-n.height/2:0},f.prototype.dxForAxisLabel=function(t,e){return t?e.isLeft?"0.5em":e.isRight?"-0.5em":"0":e.isTop?"-0.5em":e.isBottom?"0.5em":"0"},f.prototype.textAnchorForAxisLabel=function(t,e){return t?e.isLeft?"start":e.isCenter?"middle":"end":e.isBottom?"start":e.isMiddle?"middle":"end"},f.prototype.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.dyForXAxisLabel=function(){var t=this.owner,e=t.config,n=this.getXAxisLabelPosition();return e.axis_rotated?n.isInner?"1.2em":-25-(t.config.axis_x_inner?0:this.getMaxTickWidth("x")):n.isInner?"-0.5em":e.axis_x_height?e.axis_x_height-10:"3em"},f.prototype.dyForYAxisLabel=function(){var t=this.owner,e=this.getYAxisLabelPosition();return t.config.axis_rotated?e.isInner?"-0.5em":"3em":e.isInner?"1.2em":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},f.prototype.dyForY2AxisLabel=function(){var t=this.owner,e=this.getY2AxisLabelPosition();return t.config.axis_rotated?e.isInner?"1.2em":"-2.2em":e.isInner?"-0.5em":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},f.prototype.textAnchorForXAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(!t.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.textAnchorForYAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.textAnchorForY2AxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.getMaxTickWidth=function(t,e){var n,r,i,o=this.owner,a=o.config,s=0;return e&&o.currentMaxTickWidths[t]||(o.svg&&(e=o.filterTargetsToShow(o.data.targets),"y"===t?(n=o.y.copy().domain(o.getYDomain(e,"y")),r=this.getYAxis(n,o.yOrient,a.axis_y_tick_format,o.yAxisTickValues,!1,!0,!0)):"y2"===t?(n=o.y2.copy().domain(o.getYDomain(e,"y2")),r=this.getYAxis(n,o.y2Orient,a.axis_y2_tick_format,o.y2AxisTickValues,!1,!0,!0)):(n=o.x.copy().domain(o.getXDomain(e)),r=this.getXAxis(n,o.xOrient,o.xAxisTickFormat,o.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(e,r)),(i=o.d3.select("body").append("div").classed("c3",!0)).append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0).append("g").call(r).each(function(){o.d3.select(this).selectAll("text").each(function(){var t=this.getBoundingClientRect();se.getTotalLength())&&0<--n;);return n}),"SVGPathSegList"in window||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){var e;this._pathElement&&(e=!1,t.forEach(function(t){"d"==t.attributeName&&(e=!0)}),e)&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(t){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(t){t._owningPathSegList=null}),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],(t._owningPathSegList=this)._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),(t._owningPathSegList=this)._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),((this._list[e]=t)._owningPathSegList=this)._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);var e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),(t._owningPathSegList=this)._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){var e="",n=!0;return t.forEach(function(t){n?(n=!1,e+=t._asPathString()):e+=" "+t._asPathString()}),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||0==t.length)return[];function e(){this.pathSegList=[]}function n(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()}var r=this,i=(e.prototype.appendSegment=function(t){this.pathSegList.push(t)},n.prototype._isCurrentSpace=function(){var t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},n.prototype._skipOptionalSpaces=function(){for(;this._currentIndex=this._endIndex||this._string.charAt(this._currentIndex)<"0"||"9"=this._endIndex||this._string.charAt(this._currentIndex)<"0"||"9"=this._endIndex)){var t=!1,e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t}},n.prototype.parseSegment=function(){var t=this._string[this._currentIndex],e=this._pathSegTypeFromChar(t);if(e==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if((e=this._nextCommandHelper(t,this._previousCommand))==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=e){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(r,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(r,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(r,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(r,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(r,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(r,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(r,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(r,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(r);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicRel(r,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicAbs(r,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicSmoothRel(r,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicSmoothAbs(r,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoQuadraticRel(r,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoQuadraticAbs(r,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(r,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(r,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegArcRel(r,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegArcAbs(r,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);default:throw"Unknown path seg type."}},new e),o=new n(t);if(!o.initialCommandIsMoveTo())return[];for(;o.hasMoreData();){var a=o.parseSegment();if(!a)return[];i.appendSegment(a)}return i.pathSegList}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t>>=0,e=String(void 0!==e?e:" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))}),(r.prototype.axis=function(){}).labels=function(e){var n=this.internal;arguments.length&&(Object.keys(e).forEach(function(t){n.axis.setLabelText(t,e[t])}),n.axis.updateLabels())},r.prototype.axis.max=function(t){var e=this.internal,n=e.config;if(!arguments.length)return{x:n.axis_x_max,y:n.axis_y_max,y2:n.axis_y2_max};"object"===a(t)?(v(t.x)&&(n.axis_x_max=t.x),v(t.y)&&(n.axis_y_max=t.y),v(t.y2)&&(n.axis_y2_max=t.y2)):n.axis_y_max=n.axis_y2_max=t,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},r.prototype.axis.min=function(t){var e=this.internal,n=e.config;if(!arguments.length)return{x:n.axis_x_min,y:n.axis_y_min,y2:n.axis_y2_min};"object"===a(t)?(v(t.x)&&(n.axis_x_min=t.x),v(t.y)&&(n.axis_y_min=t.y),v(t.y2)&&(n.axis_y2_min=t.y2)):n.axis_y_min=n.axis_y2_min=t,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},r.prototype.axis.range=function(t){if(!arguments.length)return{max:this.axis.max(),min:this.axis.min()};M(t.max)&&this.axis.max(t.max),M(t.min)&&this.axis.min(t.min)},r.prototype.category=function(t,e){var n=this.internal,r=n.config;return 1'":;\[\]\/|~`{}\\])/g,"\\$1")},s.prototype.selectorTarget=function(t,e){return(e||"")+"."+D.target+this.getTargetSelectorSuffix(t)},s.prototype.selectorTargets=function(t,e){var n=this;return(t=t||[]).length?t.map(function(t){return n.selectorTarget(t,e)}):null},s.prototype.selectorLegend=function(t){return"."+D.legendItem+this.getTargetSelectorSuffix(t)},s.prototype.selectorLegends=function(t){var e=this;return t&&t.length?t.map(function(t){return e.selectorLegend(t)}):null},s.prototype.getClipPath=function(t){return"url("+(0<=window.navigator.appVersion.toLowerCase().indexOf("msie 9.")?"":document.URL.split("#")[0])+"#"+t+")"},s.prototype.appendClip=function(t,e){return t.append("clipPath").attr("id",e).append("rect")},s.prototype.getAxisClipX=function(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},s.prototype.getAxisClipY=function(t){return t?-20:-this.margin.top},s.prototype.getXAxisClipX=function(){return this.getAxisClipX(!this.config.axis_rotated)},s.prototype.getXAxisClipY=function(){return this.getAxisClipY(!this.config.axis_rotated)},s.prototype.getYAxisClipX=function(){return this.config.axis_y_inner?-1:this.getAxisClipX(this.config.axis_rotated)},s.prototype.getYAxisClipY=function(){return this.getAxisClipY(this.config.axis_rotated)},s.prototype.getAxisClipWidth=function(t){var e=Math.max(30,this.margin.left),n=Math.max(30,this.margin.right);return t?this.width+2+e+n:this.margin.left+20},s.prototype.getAxisClipHeight=function(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},s.prototype.getXAxisClipWidth=function(){return this.getAxisClipWidth(!this.config.axis_rotated)},s.prototype.getXAxisClipHeight=function(){return this.getAxisClipHeight(!this.config.axis_rotated)},s.prototype.getYAxisClipWidth=function(){return this.getAxisClipWidth(this.config.axis_rotated)+(this.config.axis_y_inner?20:0)},s.prototype.getYAxisClipHeight=function(){return this.getAxisClipHeight(this.config.axis_rotated)},s.prototype.generateColor=function(){var t=this.config,e=this.d3,r=t.data_colors,i=_(t.color_pattern)?t.color_pattern:e.schemeCategory10,o=t.data_color,a=[];return function(t){var e,n=t.id||t.data&&t.data.id||t;return r[n]instanceof Function?e=r[n](t):r[n]?e=r[n]:(a.indexOf(n)<0&&a.push(n),e=i[a.indexOf(n)%i.length],r[n]=e),o instanceof Function?o(e,t):e}},s.prototype.generateLevelColor=function(){var t=this.config,r=t.color_pattern,t=t.color_threshold,i="value"===t.unit,o=t.values&&t.values.length?t.values:[],a=t.max||100;return _(t)&&_(r)?function(t){for(var e=r[r.length-1],n=0;na&&(o=o.filter(function(t){return(""+t).indexOf(".")<0}));return o},s.prototype.getGridFilterToRemove=function(t){return t?function(e){var n=!1;return[].concat(t).forEach(function(t){("value"in t&&e.value===t.value||"class"in t&&e.class===t.class)&&(n=!0)}),n}:function(){return!0}},s.prototype.removeGridLines=function(t,e){function n(t){return!i(t)}var r=this.config,i=this.getGridFilterToRemove(t),t=e?D.xgridLine:D.ygridLine;this.main.select("."+(e?D.xgridLines:D.ygridLines)).selectAll("."+t).filter(i).transition().duration(r.transition_duration).style("opacity",0).remove(),e?r.grid_x_lines=r.grid_x_lines.filter(n):r.grid_y_lines=r.grid_y_lines.filter(n)},s.prototype.initEventRect=function(){var t=this,e=t.config;t.main.select("."+D.chart).append("g").attr("class",D.eventRects).style("fill-opacity",0),t.eventRect=t.main.select("."+D.eventRects).append("rect").attr("class",D.eventRect),e.zoom_enabled&&t.zoom&&(t.eventRect.call(t.zoom).on("dblclick.zoom",null),e.zoom_initialRange)&&t.eventRect.transition().duration(0).call(t.zoom.transform,t.zoomTransform(e.zoom_initialRange))},s.prototype.redrawEventRect=function(){var t,e,r=this,i=r.d3,o=r.config;function a(){r.svg.select("."+D.eventRect).style("cursor",null),r.hideXGridFocus(),r.hideTooltip(),r.unexpandCircles(),r.unexpandBars()}t=r.width,e=r.height,r.main.select("."+D.eventRects).style("cursor",o.zoom_enabled?o.axis_rotated?"ns-resize":"ew-resize":null),r.eventRect.attr("x",0).attr("y",0).attr("width",t).attr("height",e).on("mouseout",o.interaction_enabled?function(){!o||r.hasArcType()||a()}:null).on("mousemove",o.interaction_enabled?function(){var t,e,n;r.dragging||r.hasArcType(void 0)||(n=r.filterTargetsToShow(r.data.targets),t=i.mouse(this),e=r.findClosestFromTargets(n,t),!r.mouseover||e&&e.id===r.mouseover.id||(o.data_onmouseout.call(r.api,r.mouseover),r.mouseover=void 0),e?(n=(r.isScatterType(e)||!o.tooltip_grouped?[e]:r.filterByX(n,e.x)).map(function(t){return r.addName(t)}),r.showTooltip(n,this),o.point_focus_expand_enabled&&(r.unexpandCircles(),n.forEach(function(t){r.expandCircles(t.index,t.id,!1)})),r.expandBars(e.index,e.id,!0),r.showXGridFocus(n),(r.isBarType(e.id)||r.dist(e,t)n.bar_width_max?n.bar_width_max:t},s.prototype.getBars=function(t,e){return(e?this.main.selectAll("."+D.bars+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+D.bar+(v(t)?"-"+t:""))},s.prototype.expandBars=function(t,e,n){n&&this.unexpandBars(),this.getBars(t,e).classed(D.EXPANDED,!0)},s.prototype.unexpandBars=function(t){this.getBars(t).classed(D.EXPANDED,!1)},s.prototype.generateDrawBar=function(t,e){var r=this.config,i=this.generateGetBarPoints(t,e);return function(t,e){var t=i(t,e),e=r.axis_rotated?1:0,n=r.axis_rotated?0:1;return"M "+t[0][e]+","+t[0][n]+" L"+t[1][e]+","+t[1][n]+" L"+t[2][e]+","+t[2][n]+" L"+t[3][e]+","+t[3][n]+" z"}},s.prototype.generateGetBarPoints=function(t,e){var o=this,n=e?o.subXAxis:o.xAxis,r=t.__max__+1,a=o.getBarW(n,r),s=o.getShapeX(a,r,t,!!e),u=o.getShapeY(!!e),c=o.getShapeOffset(o.isBarType,t,!!e),l=a*(o.config.bar_space/2),h=e?o.getSubYScale:o.getYScale;return function(t,e){var n=h.call(o,t.id)(0),e=c(t,e)||n,r=s(t),i=u(t);return o.config.axis_rotated&&(0r.width?i=r.width-n.width:i<0&&(i=4)),i},s.prototype.getYForText=function(t,e,n){var r,i=this,n=n.getBoundingClientRect();return i.config.axis_rotated?r=(t[0][0]+t[2][0]+.6*n.height)/2:(r=t[2][1],e.value<0||0===e.value&&!i.hasPositiveValue?(r+=n.height,i.isBarType(e)&&i.isSafari()?r-=3:!i.isBarType(e)&&i.isChrome()&&(r+=3)):r+=i.isBarType(e)?-3:-6),null!==e.value||i.config.axis_rotated||(rthis.height&&(r=this.height-4)),r},s.prototype.initTitle=function(){this.title=this.svg.append("text").text(this.config.title_text).attr("class",this.CLASS.title)},s.prototype.redrawTitle=function(){var t=this;t.title.attr("x",t.xForTitle.bind(t)).attr("y",t.yForTitle.bind(t))},s.prototype.xForTitle=function(){var t=this,e=t.config,n=e.title_position||"left",n=0<=n.indexOf("right")?t.currentWidth-t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).width-e.title_padding.right:0<=n.indexOf("center")?(t.currentWidth-t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).width)/2:e.title_padding.left;return n},s.prototype.yForTitle=function(){var t=this;return t.config.title_padding.top+t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).height},s.prototype.getTitlePadding=function(){return this.yForTitle()+this.config.title_padding.bottom},s.prototype.initTooltip=function(){var t,e=this,n=e.config;if(e.tooltip=e.selectChart.style("position","relative").append("div").attr("class",D.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),n.tooltip_init_show){if(e.isTimeSeries()&&u(n.tooltip_init_x)){for(n.tooltip_init_x=e.parseDate(n.tooltip_init_x),t=0;t"+(a||0===a?""+a+"":"")),void 0!==(a=p(d(t[o].value,t[o].ratio,t[o].id,t[o].index,t))))&&null!==t[o].name&&(s=p(f(t[o].name,t[o].ratio,t[o].id,t[o].index)),u=c.levelColor?c.levelColor(t[o].value):r(t[o].id),i=(i=i+(""+s+"")+""+a+"");return i+""},s.prototype.tooltipPosition=function(t,e,n,r){var i,o,a,s,u=this,c=u.config,l=u.d3,h=u.hasArcType(),l=l.mouse(r);return h?(i=(u.width-(u.isLegendRight?u.getLegendWidth():0))/2+l[0],a=(u.hasType("gauge")?u.height:u.height/2)+l[1]+20):(r=u.getSvgLeft(!0),a=c.axis_rotated?(o=(i=r+l[0]+100)+e,s=u.currentWidth-u.getCurrentPaddingRight(),u.x(t[0].x)+20):(o=(i=r+u.getCurrentPaddingLeft(!0)+u.x(t[0].x)+20)+e,s=r+u.currentWidth-u.getCurrentPaddingRight(),l[1]+15),su.currentHeight&&(a-=n+30)),{top:a=a<0?0:a,left:i}},s.prototype.showTooltip=function(t,e){var n=this,r=n.config,i=n.hasArcType(),o=t.filter(function(t){return t&&v(t.value)}),a=r.tooltip_position||s.prototype.tooltipPosition;0!==o.length&&r.tooltip_show&&(n.tooltip.html(r.tooltip_contents.call(n,t,n.axis.getXAxisTickFormat(),n.getYFormat(i),n.color)).style("display","block"),r=n.tooltip.property("offsetWidth"),t=n.tooltip.property("offsetHeight"),i=a.call(this,o,r,t,e),n.tooltip.style("top",i.top+"px").style("left",i.left+"px"))},s.prototype.hideTooltip=function(){this.tooltip.style("display","none")},s.prototype.setTargetType=function(t,e){var n=this,r=n.config;n.mapToTargetIds(t).forEach(function(t){n.withoutFadeIn[t]=e===r.data_types[t],r.data_types[t]=e}),t||(r.data_type=e)},s.prototype.hasType=function(e,t){var n=this.config.data_types,r=!1;return(t=t||this.data.targets)&&t.length?t.forEach(function(t){t=n[t.id];(t&&0<=t.indexOf(e)||!t&&"line"===e)&&(r=!0)}):Object.keys(n).length?Object.keys(n).forEach(function(t){n[t]===e&&(r=!0)}):r=this.config.data_type===e,r},s.prototype.hasArcType=function(t){return this.hasType("pie",t)||this.hasType("donut",t)||this.hasType("gauge",t)},s.prototype.isLineType=function(t){var e=this.config,t=u(t)?t:t.id;return!e.data_types[t]||0<=["line","spline","area","area-spline","step","area-step"].indexOf(e.data_types[t])},s.prototype.isStepType=function(t){t=u(t)?t:t.id;return 0<=["step","area-step"].indexOf(this.config.data_types[t])},s.prototype.isSplineType=function(t){t=u(t)?t:t.id;return 0<=["spline","area-spline"].indexOf(this.config.data_types[t])},s.prototype.isAreaType=function(t){t=u(t)?t:t.id;return 0<=["area","area-spline","area-step"].indexOf(this.config.data_types[t])},s.prototype.isBarType=function(t){t=u(t)?t:t.id;return"bar"===this.config.data_types[t]},s.prototype.isScatterType=function(t){t=u(t)?t:t.id;return"scatter"===this.config.data_types[t]},s.prototype.isPieType=function(t){t=u(t)?t:t.id;return"pie"===this.config.data_types[t]},s.prototype.isGaugeType=function(t){t=u(t)?t:t.id;return"gauge"===this.config.data_types[t]},s.prototype.isDonutType=function(t){t=u(t)?t:t.id;return"donut"===this.config.data_types[t]},s.prototype.isArcType=function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)},s.prototype.lineData=function(t){return this.isLineType(t)?[t]:[]},s.prototype.arcData=function(t){return this.isArcType(t.data)?[t]:[]},s.prototype.barData=function(t){return this.isBarType(t)?t.values:[]},s.prototype.lineOrScatterData=function(t){return this.isLineType(t)||this.isScatterType(t)?t.values:[]},s.prototype.barOrLineData=function(t){return this.isBarType(t)||this.isLineType(t)?t.values:[]},s.prototype.isSafari=function(){var t=window.navigator.userAgent;return 0<=t.indexOf("Safari")&&t.indexOf("Chrome")<0},s.prototype.isChrome=function(){return 0<=window.navigator.userAgent.indexOf("Chrome")},s.prototype.initZoom=function(){var e,n=this,r=n.d3,i=n.config;return n.zoom=r.zoom().on("start",function(){var t;"scroll"!==i.zoom_type||(t=r.event.sourceEvent)&&"brush"===t.type||(e=t,i.zoom_onzoomstart.call(n.api,t))}).on("zoom",function(){var t;"scroll"!==i.zoom_type||(t=r.event.sourceEvent)&&"brush"===t.type||(n.redrawForZoom(),i.zoom_onzoom.call(n.api,n.x.orgDomain()))}).on("end",function(){var t;"scroll"!==i.zoom_type||(t=r.event.sourceEvent)&&"brush"===t.type||t&&e.clientX===t.clientX&&e.clientY===t.clientY||i.zoom_onzoomend.call(n.api,n.x.orgDomain())}),n.zoom.updateDomain=function(){return r.event&&r.event.transform&&n.x.domain(r.event.transform.rescaleX(n.subX).domain()),this},n.zoom.updateExtent=function(){return this.scaleExtent([1,1/0]).translateExtent([[0,0],[n.width,n.height]]).extent([[0,0],[n.width,n.height]]),this},n.zoom.update=function(){return this.updateExtent().updateDomain()},n.zoom.updateExtent()},s.prototype.zoomTransform=function(t){t=[this.x(t[0]),this.x(t[1])];return this.d3.zoomIdentity.scale(this.width/(t[1]-t[0])).translate(-t[0],0)},s.prototype.initDragZoom=function(){var e,t,n=this,r=n.d3,i=n.config,o=n.context=n.svg,a=n.margin.left+20.5,s=n.margin.top+.5;"drag"===i.zoom_type&&i.zoom_enabled&&(e=function(t){return t&&t.map(function(t){return n.x.invert(t)})},t=n.dragZoomBrush=r.brushX().on("start",function(){n.api.unzoom(),n.svg.select("."+D.dragZoom).classed("disabled",!1),i.zoom_onzoomstart.call(n.api,r.event.sourceEvent)}).on("brush",function(){i.zoom_onzoom.call(n.api,e(r.event.selection))}).on("end",function(){var t;null!=r.event.selection&&(t=e(r.event.selection),i.zoom_disableDefaultBehavior||n.api.zoom(t),n.svg.select("."+D.dragZoom).classed("disabled",!0),i.zoom_onzoomend.call(n.api,t))}),o.append("g").classed(D.dragZoom,!0).attr("clip-path",n.clipPath).attr("transform","translate("+a+","+s+")").call(t))},s.prototype.getZoomDomain=function(){var t=this.config,e=this.d3;return[e.min([this.orgXDomain[0],t.zoom_x_min]),e.max([this.orgXDomain[1],t.zoom_x_max])]},s.prototype.redrawForZoom=function(){var t=this,e=t.d3,n=t.config,r=t.zoom,i=t.x;n.zoom_enabled&&0!==t.filterTargetsToShow(t.data.targets).length&&(r.update(),!n.zoom_disableDefaultBehavior)&&(t.isCategorized()&&i.orgDomain()[0]===t.orgXDomain[0]&&i.domain([t.orgXDomain[0]-1e-10,i.orgDomain()[1]]),t.redraw({withTransition:!1,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.event.sourceEvent&&"mousemove"===e.event.sourceEvent.type)&&(t.cancelClick=!0)},t},"object"==typeof e&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(r=r||self).c3=i()},{d3:34}],2:[function(t,e,n){"use strict";n.parse=function(t,e){if("string"!=typeof t)throw new TypeError("argument str must be a string");for(var n={},e=e||{},r=t.split(l),i=e.decode||c,o=0;o>>1;o(t[i],e)<0?n=1+i:r=i}return n},right:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n>>1;0s;)u.pop(),--c;var l,h=new Array(c+1);for(i=0;i<=c;++i)(l=h[i]=[]).x0=0Math.abs(t[1]-C[1])?A=!0:T=!0),C=t,x=!0,q(),D()}function D(){var t;switch(b=C[0]-P[0],w=C[1]-P[1],r){case Q:case X:i&&(b=Math.max(u-c,Math.min(p-g,b)),l=c+b,m=g+b),o&&(w=Math.max(h-f,Math.min(y-v,w)),d=f+w,_=v+w);break;case $:i<0?(b=Math.max(u-c,Math.min(p-c,b)),l=c+b,m=g):0=p.length)return null!=f&&t.sort(f),null!=d?d(t):t;for(var e,o,a,s=-1,u=t.length,c=p[n++],l=m(),h=r();++sp.length?t:(o=a[r-1],null!=d&&r>=p.length?i=t.entries():(i=[],t.each(function(t,e){i.push({key:e,values:n(t,r)})})),null!=o?i.sort(function(t,e){return o(t.key,e.key)}):i)}(g(t,0,i,o),0)},key:function(t){return p.push(t),e},sortKeys:function(t){return a[p.length-1]=t,e},sortValues:function(t){return f=t,e},rollup:function(t){return d=t,e}}},t.set=u,t.map=m,t.keys=function(t){var e,n=[];for(e in t)n.push(e);return n},t.values=function(t){var e,n=[];for(e in t)n.push(t[e]);return n},t.entries=function(t){var e,n=[];for(e in t)n.push({key:e,value:t[e]});return n},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})},{}],8:[function(t,e,n){var r,i;r=this,i=function(t){"use strict";function e(t,e,n){(t.prototype=e.prototype=n).constructor=t}function n(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function c(){}var r="\\s*([+-]?\\d+)\\s*",i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",j=/^#([0-9a-f]{3,8})$/,I=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),V=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),F=new RegExp("^rgba\\("+[r,r,r,i]+"\\)$"),G=new RegExp("^rgba\\("+[o,o,o,i]+"\\)$"),z=new RegExp("^hsl\\("+[i,o,o]+"\\)$"),Y=new RegExp("^hsla\\("+[i,o,o,i]+"\\)$"),a={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function s(){return this.rgb().formatHex()}function u(){return this.rgb().formatRgb()}function l(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=j.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?h(e):3===n?new g(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?f(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?f(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=I.exec(t))?new g(e[1],e[2],e[3],1):(e=V.exec(t))?new g(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=F.exec(t))?f(e[1],e[2],e[3],e[4]):(e=G.exec(t))?f(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=z.exec(t))?_(e[1],e[2]/100,e[3]/100,1):(e=Y.exec(t))?_(e[1],e[2]/100,e[3]/100,e[4]):a.hasOwnProperty(t)?h(a[t]):"transparent"===t?new g(NaN,NaN,NaN,0):null}function h(t){return new g(t>>16&255,t>>8&255,255&t,1)}function f(t,e,n,r){return new g(t=r<=0?e=n=NaN:t,e,n,r)}function d(t){return(t=t instanceof c?t:l(t))?new g((t=t.rgb()).r,t.g,t.b,t.opacity):new g}function p(t,e,n,r){return 1===arguments.length?d(t):new g(t,e,n,null==r?1:r)}function g(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function m(){return"#"+v(this.r)+v(this.g)+v(this.b)}function y(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function v(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function _(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new x(t,e,n,r)}function b(t){var e,n,r,i,o,a,s,u;return t instanceof x?new x(t.h,t.s,t.l,t.opacity):(t=t instanceof c?t:l(t))?t instanceof x?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=NaN,u=((o=Math.max(e,n,r))+i)/2,(s=o-i)?(a=e===o?(n-r)/s+6*(n=h,T[r<<1].forEach(g);++a=h,T[t|r<<1].forEach(g);for(T[r<<0].forEach(g);++s=h,i=l[s*m]>=h,T[r<<1|i<<2].forEach(g);++a=h,o=i,i=l[s*m+a+1]>=h,T[t|r<<1|i<<2|o<<3].forEach(g);T[r|i<<3].forEach(g)}for(a=-1,i=l[s*m]>=h,T[i<<2].forEach(g);++a=h,T[i<<2|o<<3].forEach(g);function g(t){var e,n,r=[t[0][0]+a,t[0][1]+s],t=[t[1][0]+a,t[1][1]+s],i=_(r),o=_(t);(e=p[i])?(n=d[o])?(delete p[e.end],delete d[n.start],e===n?(e.ring.push(t),f(e.ring)):d[e.start]=p[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete p[e.end],e.ring.push(t),p[e.end=o]=e):(e=d[o])?(n=p[i])?(delete d[e.start],delete p[n.end],e===n?(e.ring.push(t),f(e.ring)):d[n.start]=p[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=i]=e):d[i]=p[o]={start:i,end:o,ring:[r,t]}}return T[i<<3].forEach(g),c.forEach(function(t){for(var e,n=0,r=u.length;n>c,f=r+2*l>>c,d=x(20);function e(t){var o=new Float32Array(h*f),e=new Float32Array(h*f),t=(t.forEach(function(t,e,n){var r=+a(t,e,n)+l>>c,i=+s(t,e,n)+l>>c,t=+u(t,e,n);0<=r&&r>c),A({width:h,height:f,data:e},{width:h,height:f,data:o},i>>c),_({width:h,height:f,data:o},{width:h,height:f,data:e},i>>c),A({width:h,height:f,data:e},{width:h,height:f,data:o},i>>c),_({width:h,height:f,data:o},{width:h,height:f,data:e},i>>c),A({width:h,height:f,data:e},{width:h,height:f,data:o},i>>c),d(o));return Array.isArray(t)||(e=b.max(o),t=b.tickStep(0,e,t),(t=b.range(0,Math.floor(e/t)*t,t)).shift()),v().thresholds(t).size([h,f])(o).map(p)}function p(t){return t.value*=Math.pow(2,-2*c),t.coordinates.forEach(o),t}function o(t){t.forEach(g)}function g(t){t.forEach(m)}function m(t){t[0]=t[0]*Math.pow(2,c)-l,t[1]=t[1]*Math.pow(2,c)-l}function y(){return h=n+2*(l=3*i)>>c,f=r+2*l>>c,e}return e.x=function(t){return arguments.length?(a="function"==typeof t?t:x(+t),e):a},e.y=function(t){return arguments.length?(s="function"==typeof t?t:x(+t),e):s},e.weight=function(t){return arguments.length?(u="function"==typeof t?t:x(+t),e):u},e.size=function(t){if(!arguments.length)return[n,r];var e=Math.ceil(t[0]),t=Math.ceil(t[1]);if(0<=e)return n=e,r=t,y();throw new Error("invalid size")},e.cellSize=function(t){if(!arguments.length)return 1<=i?s=!0:10===(e=r.charCodeAt(o++))?u=!0:13===e&&(u=!0,10===r.charCodeAt(o))&&++o,r.slice(n+1,t-1).replace(/""/g,'"')}for(;os.index&&(n=(e=u-o.x-o.vx)*e+(r=c-o.y-o.vy)*r)t.r&&(t.r=t[e].r)}function n(){if(o){var t,e,n=o.length;for(a=new Array(n),t=0;t=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function C(t){var e;if(e=n.exec(t))return new r({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function r(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function i(t,e){var n,e=o(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}C.prototype=r.prototype,r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var E={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return i(100*t,e)},r:i,s:function(t,e){var n,r,i=o(t,e);return i?(n=i[0],(i=(i=i[1])-(P=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:re));)o=s[i=(i+1)%s.length];return r.reverse().join(u)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",S=void 0===t.decimal?".":t.decimal+"",T=void 0===t.numerals?l:(e=h.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),o=void 0===t.percent?"%":t.percent+"",A=void 0===t.minus?"-":t.minus+"",k=void 0===t.nan?"NaN":t.nan+"";function a(t){var c=(t=C(t)).fill,l=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,g=t.precision,m=t.trim,y=t.type,v=("n"===y?(p=!0,y="g"):E[y]||(void 0===g&&(g=12),m=!0,y="g"),(f||"0"===c&&"="===l)&&(f=!0,c="0",l="="),"$"===e?r:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),_="$"===e?i:/[%p]/.test(y)?o:"",b=E[y],w=/[defgprs%]/.test(y);function n(t){var e,n,r,i=v,o=_;if("c"===y)o=b(t)+o,t="";else{var a=(t=+t)<0||1/t<0;if(t=isNaN(t)?k:b(Math.abs(t),g),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r>1)+i+t+o+u.slice(s);break;default:t=u+i+t+o}return T(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:a,formatPrefix:function(t,e){var n=a(((t=C(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(c(e)/3))),r=Math.pow(10,-t),i=O[8+t/3];return function(t){return n(r*t)+i}}}}function t(t){return a=s(t),e.format=a.format,e.formatPrefix=a.formatPrefix,a}t({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=r,e.formatDefaultLocale=t,e.formatLocale=s,e.formatSpecifier=C,e.precisionFixed=function(t){return Math.max(0,-c(Math.abs(t)))},e.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(c(e)/3)))-c(Math.abs(t)))},e.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,c(e)-c(t))+1},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i((r="undefined"!=typeof globalThis?globalThis:r||self).d3=r.d3||{})},{}],17:[function(t,e,n){var r,i;r=this,i=function(t,T){"use strict";function e(){return new S}function S(){this.reset()}S.prototype={constructor:S,reset:function(){this.s=this.t=0},add:function(t){V(A,t,this.t),V(this,A.s,this.s),this.s?this.t+=A.t:this.s=A.t},valueOf:function(){return this.s}};var A=new S;function V(t,e,n){var r=t.s=e+n,i=r-e;t.t=e-(r-i)+(n-i)}var O=1e-6,k=Math.PI,P=k/2,F=k/4,C=2*k,M=180/k,L=k/180,R=Math.abs,G=Math.atan,D=Math.atan2,E=Math.cos,z=Math.ceil,Y=Math.exp,U=Math.log,B=Math.pow,N=Math.sin,c=Math.sign||function(t){return 0b(l,f)&&(f=t):b(t,f)>b(l,f)&&(l=t):l<=f?(tb(l,f)&&(f=t):b(t,f)>b(l,f)&&(l=t)):p.push(g=[l=t,f=t]),eO&&(l=-(f=180)),g[0]=l,g[1]=f,bt=null}function b(t,e){return(e-=t)<0?e+360:e}function Yt(t,e){return t[0]-e[0]}function Ut(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:ek?t+Math.round(-t/C)*C:t,e]}function re(t,e,n){return(t%=C)?e||n?ee(oe(t),ae(e,n)):oe(t):e||n?ae(e,n):ne}function ie(n){return function(t,e){return[k<(t+=n)?t-C:t<-k?t+C:t,e]}}function oe(t){var e=ie(t);return e.invert=ie(-t),e}function ae(t,e){var i=E(t),o=N(t),a=E(e),s=N(e);function n(t,e){var n=E(e),r=E(t)*n,t=N(t)*n,n=N(e),e=n*i+r*o;return[D(t*a-e*s,r*i-n*o),I(e*a+t*s)]}return n.invert=function(t,e){var n=E(e),r=E(t)*n,t=N(t)*n,n=N(e),e=n*a-t*s;return[D(t*a+n*s,r*i+e*o),I(e*i-r*o)]},n}function se(e){function t(t){return(t=e(t[0]*L,t[1]*L))[0]*=M,t[1]*=M,t}return e=re(e[0]*L,e[1]*L,2O?G((N(u)*(o=E(i))*N(r)-N(i)*(r=E(u))*N(n))/(r*o*a)):(u+i)/2,c.point(d,f),c.lineEnd(),c.lineStart(),c.point(s,f),l=0),c.point(h=t,f=e),d=s},lineEnd:function(){c.lineEnd(),h=f=NaN},clean:function(){return 2-l}}},function(t,e,n,r){var i;null==t?(i=n*P,r.point(-k,i),r.point(0,i),r.point(k,i),r.point(k,0),r.point(k,-i),r.point(0,-i),r.point(-k,-i),r.point(-k,0),r.point(-k,i)):R(t[0]-e[0])>O?(t=t[0]O;function d(t,e){return E(t)*E(e)>g}function p(t,e,n){var r,i,o,a,s,u,c,l=[1,0,0],h=dt(ht(t),ht(e)),f=ft(h,h),d=h[0],p=f-d*d;return p?(r=dt(l,h),pt(l=gt(l,g*f/p),gt(h,-g*d/p)),(p=(h=ft(l,f=r))*h-(d=ft(f,f))*(ft(l,l)-1))<0?void 0:(pt(p=gt(f,(-h-(r=j(p)))/d),l),p=lt(p),n?(i=t[0],o=e[0],a=t[1],e=e[1],oO}).map(c)).concat(T.range(z(a/p)*p,o,p).filter(function(t){return R(t%m)>O}).map(l))}return v.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(f(s).slice(1),h(r).reverse().slice(1),f(u).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],u=+t[0][1],s=+t[1][1],rO&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},kr.invert=cr(I),Pr.invert=cr(function(t){return 2*G(t)}),Cr.invert=function(t,e){return[-e,2*G(Y(t))-P]},t.geoAlbers=sr,t.geoAlbersUsa=function(){var e,n,i,o,a,r,s=sr(),u=ar().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=ar().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){r=[t,e]}};function h(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(o.point(e,t),r)||(a.point(e,t),r)}function f(){return e=n=null,h}return h.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?u:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},h.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),u.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++nb(r[0],r[1])&&(r[1]=i[1]),b(i[0],r[1])>b(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)(s=b(r[1],(i=o[e])[0]))>a&&(a=s,l=i[0],f=r[1])}return p=g=null,l===1/0||h===1/0?[[NaN,NaN],[NaN,NaN]]:[[l,h],[f,d]]},t.geoCentroid=function(t){wt=xt=St=Tt=At=kt=Pt=Ct=Et=Ot=Mt=0,u(t,i);var e=Ot,n=Mt,r=(t=Et)*t+e*e+n*n;return r<1e-12&&(t=kt,e=Pt,n=Ct,xtn.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:f(e,n)/2,i=s-e.x,o=u/(n.x+s+i),a=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*o,t.y=t.depth*a})),t}function h(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,o=0,a=0,s=t.children,u=s.length;0<=--u;)(i=s[u]).z+=o,i.m+=o,o+=i.s+(a+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+f(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+f(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,o=t,a=e,s=i.parent.children[0],u=i.m,c=o.m,l=a.m,h=s.m;a=L(a),i=M(i),a&&i;)s=M(s),(o=L(o)).a=t,0<(r=a.z+l-i.z-u+f(a._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(a,t,n),t,r),u+=r,c+=r),l+=a.m,u+=i.m,h+=s.m,c+=o.m;a&&!L(o)&&(o.t=a,o.m+=l-c),i&&!M(s)&&(s.t=i,s.m+=u-h,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=u,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(l=!1,u=+t[0],c=+t[1],e):l?null:[u,c]},e.nodeSize=function(t){return arguments.length?(l=!0,u=+t[0],c=+t[1],e):l?[u,c]:null},e},t.treemap=function(){var a=j,e=!1,n=1,r=1,s=[0],u=S,c=S,l=S,h=S,f=S;function i(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(o),s=[0],e&&t.eachBefore(C),t}function o(t){var e=s[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,o=t.y1-e;i>>1;m[f]s&&(i=r.slice(s,i),c[u]?c[u]+=i:c[++u]=i),(e=e[0])===(n=n[0])?c[u]?c[u]+=n:c[++u]=n:(c[++u]=null,l.push({i:u,x:y(e,n)})),s=b.lastIndex;return s=(o=(g+y)/2))?g=o:y=o,(l=n>=(a=(m+v)/2))?m=a:v=a,!(d=(i=d)[h=l<<1|c]))return i[h]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)p.next=d,i?i[h]=p:t._root=p;else{for(;i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(o=(g+y)/2))?g=o:y=o,(l=n>=(a=(m+v)/2))?m=a:v=a,(h=l<<1|c)==(f=(a<=u)<<1|o<=s););i[f]=d,i[h]=p}}else t._root=p}return t}function y(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function r(t){return t[0]}function i(t){return t[1]}function e(t,e,n){e=new o(null==e?r:e,null==n?i:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function o(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function a(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var n=e.prototype=o.prototype;n.copy=function(){var t,e,n=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=a(e));else n._root=a(r);return n},n.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return h(this.cover(e,n),e,n,t)},n.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),o=new Array(r),a=1/0,s=1/0,u=-1/0,c=-1/0,l=0;ld||(u=r.y0)>p||(a=r.x1)=(s=(d+g)/2))?d=s:g=s,(c=a>=(s=(p+m)/2))?p=s:m=s,!(f=(e=f)[l=c<<1|u]))return this;if(!f.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,h=l)}for(;f.data!==t;)if(!(f=(r=f).next))return this;(i=f.next)&&delete f.next,r?i?r.next=i:delete r.next:e?(i?e[l]=i:delete e[l],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[h]=f:this._root=f)):this._root=i}}return this},n.removeAll=function(t){for(var e=0,n=t.length;eY&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),o=(o*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,a=(a*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>Y&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,u=(u*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(o,a,s,u,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:St(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var At=function e(n){function t(t){return n?new Tt(t,n):new b(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function kt(t,e){this._context=t,this._alpha=e}kt.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:St(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Pt=function e(n){function t(t){return n?new kt(t,n):new _t(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function Ct(t,e){this._context=t,this._alpha=e}Ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:St(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function e(n){function t(t){return n?new Ct(t,n):new wt(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function Ot(t){this._context=t}function Mt(t){return t<0?-1:1}function Lt(t,e,n){var r=t._x1-t._x0,e=e-t._x1,i=(t._y1-t._y0)/(r||e<0&&-0),n=(n-t._y1)/(e||r<0&&-0),t=(i*e+n*r)/(r+e);return(Mt(i)+Mt(n))*Math.min(Math.abs(i),Math.abs(n),.5*Math.abs(t))||0}function Rt(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Dt(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function w(t){this._context=t}function Nt(t){this._context=new jt(t)}function jt(t){this._context=t}function It(t){this._context=t}function Vt(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(o[i[0]=0]=2,a[0]=t[0]+2*t[1],e=1;eo&&(o=e,r=n);return r}function Yt(t){var n=t.map(Ut);return T(t).sort(function(t,e){return n[t]-n[e]})}function Ut(t){for(var e,n=0,r=-1,i=t.length;++rY?(r+=h*=P?1:-1,i-=h):(o=0,r=i=(T+A)/2),(a-=2*f)>Y?(e+=f*=P?1:-1,n-=f):(a=0,e=n=(T+A)/2)),l=S*V(e),h=S*G(e),f=x*V(i),T=x*G(i),Yn._time&&(r=n._time),(t=n)._next):(e=n._next,n._next=null,t?t._next=e:i=e);o=t,_(r),c=0}}function v(){var t=h.now(),e=t-u;nv)throw new Error("too late; already scheduled");return t}function M(t,e){t=k(t,e);if(t.state>w)throw new Error("too late; already running");return t}function k(t,e){t=t.__transition;if(t=t&&t[e])return t;throw new Error("transition not found")}function i(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name!==e?a=!1:(r=n.state>b&&n.state_&&n.name===e)return new P([[t]],p,e,+r);return null},t.interrupt=i,t.transition=f,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-selection"),t("d3-dispatch"),t("d3-timer"),t("d3-interpolate"),t("d3-color"),t("d3-ease")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-timer","d3-interpolate","d3-color","d3-ease"],i):i((r=r||self).d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3,r.d3)},{"d3-color":8,"d3-dispatch":10,"d3-ease":13,"d3-interpolate":19,"d3-selection":26,"d3-timer":30}],32:[function(t,e,n){var r,i;r=this,i=function(t){"use strict";function r(t){return function(){return t}}function a(t){return t[0]}function s(t){return t[1]}function G(){this._=null}function n(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function u(t,e){var n=e,e=e.R,r=n.U;r?r.L===n?r.L=e:r.R=e:t._=e,e.U=r,n.U=e,n.R=e.L,n.R&&(n.R.U=n),e.L=n}function c(t,e){var n=e,e=e.L,r=n.U;r?r.L===n?r.L=e:r.R=e:t._=e,e.U=r,n.U=e,n.L=e.R,n.L&&(n.L.U=n),e.R=n}function l(t){for(;t.L;)t=t.L;return t}function z(t,e,n,r){var i=[null,null],o=et.push(i)-1;return i.left=t,i.right=e,n&&U(i,t,e,n),r&&U(i,e,t,r),K[t.index].halfedges.push(o),K[e.index].halfedges.push(o),i}function Y(t,e,n){e=[e,n];return e.left=t,e}function U(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function B(t,e,n,r){for(var i,o=et.length;o--;)(function(t,e,n,r,i){var o=t[1];if(!o){var a,s=t[0],u=t.left,c=t.right,l=u[0],u=u[1],h=c[0],c=c[1],f=(l+h)/2;if(c===u){if(f=i)return}else s=[f,n];o=[f,i]}else{if(s){if(s[1]=i)return}else s=[(n-f)/a,n];o=[(i-f)/a,i]}else{if(s){if(s[1]=r)return}else s=[e,a*e+f];o=[r,a*r+f]}else{if(s){if(s[0]nt||Math.abs(i[0][1]-i[1][1])>nt)||delete et[o]}function H(t,e){return e[+(e.left!==t.site)]}function W(){for(var t,e,n,r,i,o,a,s=0,u=K.length;snt||Math.abs(S-x)>nt)&&(_.splice(v,0,et.push(Y(y,A,Math.abs(T-E)=s)return null;for(var u=n-i.site[0],c=r-i.site[1],l=u*u+c*c;i=o.cells[e=a],a=null,i.halfedges.forEach(function(t){var t=o.edges[t],e=t.left;(e!==i.site&&e||(e=t.right))&&(t=(t=n-e[0])*t+(t=r-e[1])*t)"].indexOf(r[0])?void 0:r[0];return new s({functionName:e,fileName:n,lineNumber:r[1],columnNumber:r[2],source:t})},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(t){return!t.match(r)},this).map(function(t){var e,n;return-1===(t=-1 eval")?t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1"):t).indexOf("@")&&-1===t.indexOf(":")?new s({functionName:t}):(e=(e=t.match(n=/((.*".+"[^@]*)?[^@]*)(?:@)/))&&e[1]?e[1]:void 0,n=this.extractLocation(t.replace(n,"")),new s({functionName:e,fileName:n[0],lineNumber:n[1],columnNumber:n[2],source:t}))},this)},parseOpera:function(t){return!t.stacktrace||-1t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split("\n"),r=[],i=2,o=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0,n=void 0===(e=n.match(/\(([^)]*)\)/)?n.replace(/^[^(]+\(([^)]*)\)$/,"$1"):e)||"[arguments not available]"===e?void 0:e.split(",");return new s({functionName:i,args:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2],source:t})},this)}}})},{stackframe:56}],38:[function(t,e,n){var r,i,o,a;r=function(){var s,n,h,a,u,r,c,i,o,l,f,d,p,g,m,t,e,y,v,j,_,b,w,x,S,T,A,k,P,C,E,O,I,V,F,G,M=("object"==typeof window?window:this)||{};return!M.history||"emulate"in M.history?M.history:(s=M.document,n=s.documentElement,h=M.Object,a=M.JSON,u=M.location,r=M.history,i=(c=r).pushState,o=r.replaceState,l=(-1===(t=M.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&!!i,f="state"in r,d=h.defineProperty,p=R({},"t")?{}:s.createElement("a"),g="",m=M.addEventListener?"addEventListener":(g="on","attachEvent"),t=M.removeEventListener?"removeEventListener":"detachEvent",e=M.dispatchEvent?"dispatchEvent":"fireEvent",y=Y(M[m]),v=Y(M[t]),j=Y(M[e]),_={basepath:"/",redirect:0,type:"/",init:0},b="__historyAPI__",w=s.createElement("a"),x=u.href,S="",A=!(T=1),k=0,P={},C={},E=s.title,I={onhashchange:null,onpopstate:null},V=function(t,e){var n=M.history!==r;n&&(M.history=r),t.apply(r,e),n&&(M.history=c)},F={setup:function(t,e,n){_.basepath=(""+(null==t?_.basepath:t)).replace(/(?:^|\/)[^\/]*$/,"/"),_.type=null==e?_.type:e,_.redirect=null==n?_.redirect:!!n},redirect:function(t,e){var n;c.setup(e,t),e=_.basepath,M.top==M.self&&(t=L(null,!1,!0)._relative,n=u.pathname+u.search,l?(n=n.replace(/([^\/])$/,"$1/"),t!=e&&new RegExp("^"+e+"$","i").test(n)&&u.replace(t)):n!=e&&(n=n.replace(/([^\/])\?/,"$1/?"),new RegExp("^"+e,"i").test(n))&&u.replace(e+"#"+n.replace(new RegExp("^"+e,"i"),_.type)+u.hash))},pushState:function(t,e,n){var r=s.title;null!=E&&(s.title=E),i&&V(i,arguments),N(t,n),s.title=r,E=e},replaceState:function(t,e,n){var r=s.title;null!=E&&(s.title=E),delete P[u.href],o&&V(o,arguments),N(t,n,!0),s.title=r,E=e},location:{set:function(t){0===k&&(k=1),M.location=t},get:function(){return 0===k&&(k=1),p}},state:{get:function(){return"object"==typeof P[u.href]?a.parse(a.stringify(P[u.href])):void 0!==P[u.href]?P[u.href]:null}}},G={assign:function(t){l||0!==(""+t).indexOf("#")?u.assign(t):N(null,t)},reload:function(t){u.reload(t)},replace:function(t){l||0!==(""+t).indexOf("#")?u.replace(t):N(null,t,!0)},toString:function(){return this.href},origin:{get:function(){return void 0!==O?O:u.origin||u.protocol+"//"+u.hostname+(u.port?":"+u.port:"")},set:function(t){O=t}},href:l?null:{get:function(){return L()._href}},protocol:null,host:null,hostname:null,port:null,pathname:l?null:{get:function(){return L()._pathname}},search:l?null:{get:function(){return L()._search}},hash:l?null:{set:function(t){N(null,(""+t).replace(/^(#|)/,"#"),!1,x)},get:function(){return L()._hash}}},X()?(c.emulate=!l,M[m]=function(t,e,n){t in C?C[t].push(e):3>>0,r=0;rYt(t)?(o=t+1,e-Yt(t)):(o=t,e);return{year:o,dayOfYear:n}}function Xt(t,e,n){var r,i,o=Wt(t.year(),e,n),o=Math.floor((t.dayOfYear()-o-1)/7)+1;return o<1?r=o+M(i=t.year()-1,e,n):o>M(t.year(),e,n)?(r=o-M(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function M(t,e,n){var r=Wt(t,e,n),e=Wt(t+1,e,n);return(Yt(t)-r+e)/7}r("w",["ww",2],"wo","week"),r("W",["WW",2],"Wo","isoWeek"),e("week","w"),e("isoWeek","W"),n("week",5),n("isoWeek",5),w("w",d),w("ww",d,u),w("W",d),w("WW",d,u),Et(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=l(t)});function Qt(t,e){return t.slice(e,7).concat(t.slice(0,e))}r("d",0,"do","day"),r("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),r("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),r("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),r("e",0,0,"weekday"),r("E",0,0,"isoWeekday"),e("day","d"),e("weekday","e"),e("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),w("d",d),w("e",d),w("E",d),w("dd",function(t,e){return e.weekdaysMinRegex(t)}),w("ddd",function(t,e){return e.weekdaysShortRegex(t)}),w("dddd",function(t,e){return e.weekdaysRegex(t)}),Et(["dd","ddd","dddd"],function(t,e,n,r){r=n._locale.weekdaysParse(t,r,n._strict);null!=r?e.d=r:_(n).invalidWeekday=t}),Et(["d","e","E"],function(t,e,n,r){e[r]=l(t)});var $t="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Zt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Jt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Kt=p,te=p,ee=p;function ne(){function t(t,e){return e.length-t.length}for(var e,n,r,i=[],o=[],a=[],s=[],u=0;u<7;u++)r=c([2e3,1]).day(u),e=x(this.weekdaysMin(r,"")),n=x(this.weekdaysShort(r,"")),r=x(this.weekdays(r,"")),i.push(e),o.push(n),a.push(r),s.push(e),s.push(n),s.push(r);i.sort(t),o.sort(t),a.sort(t),s.sort(t),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function re(){return this.hours()%12||12}function ie(t,e){r(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function oe(t,e){return e._meridiemParse}r("H",["HH",2],0,"hour"),r("h",["hh",2],0,re),r("k",["kk",2],0,function(){return this.hours()||24}),r("hmm",0,0,function(){return""+re.apply(this)+o(this.minutes(),2)}),r("hmmss",0,0,function(){return""+re.apply(this)+o(this.minutes(),2)+o(this.seconds(),2)}),r("Hmm",0,0,function(){return""+this.hours()+o(this.minutes(),2)}),r("Hmmss",0,0,function(){return""+this.hours()+o(this.minutes(),2)+o(this.seconds(),2)}),ie("a",!0),ie("A",!1),e("hour","h"),n("hour",13),w("a",oe),w("A",oe),w("H",d),w("h",d),w("k",d),w("HH",d,u),w("hh",d,u),w("kk",d,u),w("hmm",yt),w("hmmss",vt),w("Hmm",yt),w("Hmmss",vt),S(["H","HH"],C),S(["k","kk"],function(t,e,n){t=l(t);e[C]=24===t?0:t}),S(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),S(["h","hh"],function(t,e,n){e[C]=l(t),_(n).bigHour=!0}),S("hmm",function(t,e,n){var r=t.length-2;e[C]=l(t.substr(0,r)),e[E]=l(t.substr(r)),_(n).bigHour=!0}),S("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[C]=l(t.substr(0,r)),e[E]=l(t.substr(r,2)),e[O]=l(t.substr(i)),_(n).bigHour=!0}),S("Hmm",function(t,e,n){var r=t.length-2;e[C]=l(t.substr(0,r)),e[E]=l(t.substr(r))}),S("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[C]=l(t.substr(0,r)),e[E]=l(t.substr(r,2)),e[O]=l(t.substr(i))});p=ht("Hours",!0);var ae,se={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Dt,monthsShort:Nt,week:{dow:0,doy:6},weekdays:$t,weekdaysMin:Jt,weekdaysShort:Zt,meridiemParse:/[ap]\.?m?\.?/i},L={},ue={};function ce(t){return t&&t.toLowerCase().replace("_","-")}function le(t){for(var e,n,r,i,o=0;o=e&&function(t,e){for(var n=Math.min(t.length,e.length),r=0;r=e-1)break;e--}o++}return ae}function he(e){var t;if(void 0===L[e]&&void 0!==Ln&&Ln&&Ln.exports&&null!=e.match("^[^/\\\\]*$"))try{t=ae._abbr,Mn("./locale/"+e),fe(t)}catch(t){L[e]=null}return L[e]}function fe(t,e){return t&&((e=y(e)?pe(t):de(t,e))?ae=e:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ae._abbr}function de(t,e){if(null===e)return delete L[t],null;var n,r=se;if(e.abbr=t,null!=L[t])Z("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=L[t]._config;else if(null!=e.parentLocale)if(null!=L[e.parentLocale])r=L[e.parentLocale]._config;else{if(null==(n=he(e.parentLocale)))return ue[e.parentLocale]||(ue[e.parentLocale]=[]),ue[e.parentLocale].push({name:t,config:e}),null;r=n._config}return L[t]=new K(J(r,e)),ue[t]&&ue[t].forEach(function(t){de(t.name,t.config)}),fe(t),L[t]}function pe(t){var e;if(!(t=t&&t._locale&&t._locale._abbr?t._locale._abbr:t))return ae;if(!m(t)){if(e=he(t))return e;t=[t]}return le(t)}function ge(t){var e=t._a;return e&&-2===_(t).overflow&&(e=e[k]<0||11Rt(e[A],e[k])?P:e[C]<0||24M(o,u,c)?_(r)._overflowWeeks=!0:null!=l?_(r)._overflowWeekday=!0:(h=qt(o,a,s,u,c),r._a[A]=h.year,r._dayOfYear=h.dayOfYear)),null!=t._dayOfYear&&(i=Pe(t._a[A],n[A]),(t._dayOfYear>Yt(i)||0===t._dayOfYear)&&(_(t)._overflowDayOfYear=!0),l=Ht(i,0,t._dayOfYear),t._a[k]=l.getUTCMonth(),t._a[P]=l.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=f[e]=n[e];for(;e<7;e++)t._a[e]=f[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[C]&&0===t._a[E]&&0===t._a[O]&&0===t._a[Ot]&&(t._nextDay=!0,t._a[C]=0),t._d=(t._useUTC?Ht:Bt).apply(null,f),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[C]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(_(t).weekdayMismatch=!0)}}function Ee(t){if(t._f===g.ISO_8601)Te(t);else if(t._f===g.RFC_2822)ke(t);else{t._a=[],_(t).empty=!0;for(var e,n,r,i,o,a=""+t._i,s=a.length,u=0,c=at(t._f,t._locale).match(et)||[],l=c.length,h=0;ht.valueOf():t.valueOf()"}),i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},i.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},i.eraName=function(){for(var t,e=this.localeData().eras(),n=0,r=e.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},i.isLocal=function(){return!!this.isValid()&&!this._isUTC},i.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},i.isUtc=Ye,i.isUTC=Ye,i.zoneAbbr=function(){return this._isUTC?"UTC":""},i.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},i.dates=t("dates accessor is deprecated. Use date instead.",bt),i.months=t("months accessor is deprecated. Use month instead",Gt),i.years=t("years accessor is deprecated. Use year instead",Ut),i.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?(this.utcOffset(t="string"!=typeof t?-t:t,e),this):-this.utcOffset()}),i.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var t,e;return y(this._isDSTShifted)&&(q(t={},this),(t=Oe(t))._a?(e=(t._isUTC?c:R)(t._a),this._isDSTShifted=this.isValid()&&0'),this.adapter.css(this.container,{position:"absolute"}),this.options.ajax&&this.adapter.addClass(this.container,this.class.loading),this.options.fixed&&this.adapter.addClass(this.container,this.class.fixed),this.options.showEffect&&this.adapter.addClass(this.container,""+this.class.showEffectPrefix+this.options.showEffect),this.options.hideEffect)return this.adapter.addClass(this.container,""+this.class.hideEffectPrefix+this.options.hideEffect)},C.prototype._buildElements=function(){var t,e;return this.tooltipElement=this.adapter.create('

'),this.backgroundCanvas=this.adapter.wrap(document.createElement("canvas")),this.adapter.css(this.backgroundCanvas,{position:"absolute"}),"undefined"!=typeof G_vmlCanvasManager&&null!==G_vmlCanvasManager&&G_vmlCanvasManager.initElement(this.adapter.unwrap(this.backgroundCanvas)),t=this.adapter.find(this.tooltipElement,"."+this.class.header),this.options.title&&(e=this.adapter.create("

"),this.adapter.update(e,this.options.title,this.options.escapeTitle),this.adapter.append(t,e)),this.options.ajax&&!this.loaded&&this.adapter.append(this.tooltipElement,this.adapter.create('
')),0<=P.call(this.options.hideTriggers,"closeButton")&&(this.closeButtonElement=this.adapter.create('
Close'),this.adapter.append(t,this.closeButtonElement)),this.adapter.append(this.container,this.backgroundCanvas),this.adapter.append(this.container,this.tooltipElement),this.adapter.append(document.body,this.container),this._newContent=!0,this.redraw=!0},C.prototype.setContent=function(t){if(this.content=t,this._newContent=!0,"function"==typeof this.content?(this._contentFunction=this.content,this.content=""):this._contentFunction=null,this.visible)return this._updateElementContent()},C.prototype._updateElementContent=function(){var t;return(this._newContent||!this.options.cache&&this._contentFunction)&&(null!=(t=this.adapter.find(this.container,"."+this.class.content))&&(this._contentFunction&&(this.debug("Executing content function."),this.content=this._contentFunction(this)),this.adapter.update(t,this.content,this.options.escapeContent)),this._newContent=!1),this._storeAndLockDimensions(),this.reposition()},C.prototype._storeAndLockDimensions=function(){var t;if(this.container)return t=this.dimensions,this.adapter.css(this.container,{width:"auto",left:"0px",top:"0px"}),this.dimensions=this.adapter.dimensions(this.container),this.dimensions.width+=1,this.adapter.css(this.container,{width:this.dimensions.width+"px",top:this.currentPosition.top+"px",left:this.currentPosition.left+"px"}),this._dimensionsEqual(this.dimensions,t)?void 0:(this.redraw=!0,this._draw())},C.prototype.activate=function(){return this._setupObservers("hidden","hiding")},C.prototype.deactivate=function(){return this.debug("Deactivating tooltip."),this.hide(),this._setupObservers("-showing","-visible","-hidden","-hiding")},C.prototype._setupObservers=function(){for(var t,n,e,r,i,o,a,s,u,c,l,h,f,d=this,p=1<=arguments.length?v.call(arguments,0):[],g=0,m=p.length;g=this.dimensions.width&&r[0])switch(n=!0,r[0]){case this.STICKS_OUT_LEFT:o.setHorizontal("left"),this.options.targetJoint&&i.setHorizontal("right");break;case this.STICKS_OUT_RIGHT:o.setHorizontal("right"),this.options.targetJoint&&i.setHorizontal("left")}if(a.height>=this.dimensions.height&&r[1])switch(n=!0,r[1]){case this.STICKS_OUT_TOP:o.setVertical("top"),this.options.targetJoint&&i.setVertical("bottom");break;case this.STICKS_OUT_BOTTOM:o.setVertical("bottom"),this.options.targetJoint&&i.setVertical("top")}return!n||(this.options.stem&&(s=o),t=this.getPosition(o,i,s),n=a=!1,(e=this._sticksOut(t))[0]&&e[0]!==r[0]&&(a=!0,o.setHorizontal(this.options.tipJoint.horizontal),this.options.targetJoint)&&i.setHorizontal(this.options.targetJoint.horizontal),e[1]&&e[1]!==r[1]&&(n=!0,o.setVertical(this.options.tipJoint.vertical),this.options.targetJoint)&&i.setVertical(this.options.targetJoint.vertical),a&&n)?u:((a||n)&&(this.options.stem&&(s=o),t=this.getPosition(o,i,s)),{position:t,stem:s})},C.prototype._sticksOut=function(t){var e=this.adapter.scrollOffset(),n=this.adapter.viewportDimensions(),t=[t.left-e[0],t.top-e[1]],e=[!1,!1];return t[0]<0?e[0]=this.STICKS_OUT_LEFT:t[0]+this.dimensions.width>n.width&&(e[0]=this.STICKS_OUT_RIGHT),t[1]<0?e[1]=this.STICKS_OUT_TOP:t[1]+this.dimensions.height>n.height&&(e[1]=this.STICKS_OUT_BOTTOM),e},C.prototype._draw=function(){var t,e,n,i,o,r,a,s,u,c,l,h,f,d,p=this;if(this.backgroundCanvas&&this.redraw){if(this.debug("Drawing background."),this.redraw=!1,this.currentStem){for(l=0,h=(f=["top","right","bottom","left"]).length;l "+t)),i=n.node||r.fragment&&r.fragment.rendered&&r.find("*"))&&e.push(i),console.warn.apply(console,["%cRactive.js: %c"+t,"color: rgb(114, 157, 52);","color: rgb(85, 85, 85);"].concat(e))},ot=function(){console.log.apply(console,arguments)}):at=ot=st=v;var dt='A function was specified for "%s" %s, but no %s was returned',pt=function(t,e){return'Missing "'+t+'" '+e+" plugin. You may need to download a plugin via http://docs.ractivejs.org/latest/plugins#"+e+"s"};function gt(t,e,n){e=mt(t,e,n);return e?e[t][n]:null}function mt(t,e,n){for(;e;){if(n in e[t])return e;if(e.isolated)return null;e=e.parent}}var yt=function(t,e,n,r){if(t===e)return vt(e);if(r){n=gt("interpolators",n,r);if(n)return n(t,e)||vt(e);h(pt(r,"interpolator"))}return _t.number(t,e)||_t.array(t,e)||_t.object(t,e)||vt(e)};function vt(t){return function(){return t}}var _t={number:function(e,t){var n;return s(e)&&s(t)?(n=(t=+t)-(e=+e))?function(t){return e+t*n}:function(){return e}:null},array:function(t,e){var n,r,i,o;if(!g(t)||!g(e))return null;for(n=[],r=[],o=i=Math.min(t.length,e.length);o--;)r[o]=yt(t[o],e[o]);for(o=i;o=this.duration?(null!==r&&(A.start(this.root),this.root.viewmodel.set(r,this.to),A.end()),this.step&&this.step(1,this.to),this.complete(this.to),-1===(n=this.root._animations.indexOf(this))&&m("Animation was not found"),this.root._animations.splice(n,1),this.running=!1):(n=this.easing?this.easing(t/this.duration):t/this.duration,null!==r&&(e=this.interpolator(n),A.start(this.root),this.root.viewmodel.set(r,e),A.end()),this.step&&this.step(n,e),!0))},stop:function(){var t;this.running=!1,-1===(t=this.root._animations.indexOf(this))&&m("Animation was not found"),this.root._animations.splice(t,1)}},pe),be={stop:v};function we(t,e,n,r){var i,o,a;return null!==(e=e&&p(_(e)))&&(a=t.viewmodel.get(e)),ve.abort(e,t),f(a,n)?(r.complete&&r.complete(r.to),be):(r.easing&&"function"!=typeof(i="function"==typeof r.easing?r.easing:t.easing[r.easing])&&(i=null),o=void 0===r.duration?400:r.duration,e=new _e({keypath:e,from:a,to:n,root:t,duration:o,easing:i,interpolator:r.interpolator,step:r.step,complete:r.complete}),ve.add(e),t._animations.push(e),e)}function xe(){return this.detached||(this.el&&w(this.el.__ractive_instances__,this),this.detached=this.fragment.detach(),Se.fire(this)),this.detached}var Se=new e("detach");function Te(t){return this.el?this.fragment.find(t):null}function Ae(t,e){if(this._isComponentQuery?!this.selector||t.name===this.selector:t.node?u(t.node,this.selector):null)return this.push(t.node||t.instance),e||this._makeDirty(),!0}function ke(){var t=this._root[this._isComponentQuery?"liveComponentQueries":"liveQueries"],e=this.selector,n=t.indexOf(e);-1!==n&&(t.splice(n,1),t[e]=null)}var Pe=function(t,e){for(var n,r,i=Ee(t.component||t._ractive.proxy),o=Ee(e.component||e._ractive.proxy),a=b(i),s=b(o);a&&a===s;)i.pop(),o.pop(),n=a,a=b(i),s=b(o);if(a=a.component||a,s=s.component||s,(t=a.parentFragment)===(e=s.parentFragment))return t.items.indexOf(a)-e.items.indexOf(s)||i.length-o.length;if(r=n.fragments)return r.indexOf(t)-r.indexOf(e)||i.length-o.length;throw new Error("An unexpected condition was met while comparing the position of two components. Please file an issue at https://github.com/RactiveJS/Ractive/issues - thanks!")};function Ce(t){var e;return(e=t.parentFragment)||t.component&&(e=t.component.parentFragment)?e.owner:void 0}function Ee(t){for(var e=[t],n=Ce(t);n;)e.push(n),n=Ce(n);return e}function Oe(){this.sort(this._isComponentQuery?Pe:Re),this._dirty=!1}function Me(){var t=this;this._dirty||(this._dirty=!0,A.scheduleTask(function(){t._sort()}))}function Le(t){-1!==(t=this.indexOf(this._isComponentQuery?t.instance:t))&&this.splice(t,1)}var Re=function(t,e){return t.compareDocumentPosition?2&t.compareDocumentPosition(e)?1:-1:Pe(t,e)},De=function(t,e,n,r){var i=[];return J(i,{selector:{value:e},live:{value:n},_isComponentQuery:{value:r},_test:{value:Ae}}),n&&J(i,{cancel:{value:ke},_root:{value:t},_sort:{value:Oe},_makeDirty:{value:Me},_remove:{value:Le},_dirty:{value:!1,writable:!0}}),i};function Ne(t,e){var n,r;return this.el?(e=e||{},n=this._liveQueries,(r=n[t])?e&&e.live?r:r.slice():((r=De(this,t,!!e.live,!1)).live&&(n.push(t),n["_"+t]=r),this.fragment.findAll(t,r),r)):[]}function je(t,e){var n,r;return e=e||{},n=this._liveComponentQueries,(r=n[t])?e&&e.live?r:r.slice():((r=De(this,t,!!e.live,!0)).live&&(n.push(t),n["_"+t]=r),this.fragment.findAllComponents(t,r),r)}function Ie(t){return this.fragment.findComponent(t)}function Ve(t){return this.container?this.container.component&&this.container.component.name===t?this.container:this.container.findContainer(t):null}function Fe(t){return this.parent?this.parent.component&&this.parent.component.name===t?this.parent:this.parent.findParent(t):null}var Ge={enqueue:function(t,e){t.event&&(t._eventQueue=t._eventQueue||[],t._eventQueue.push(t.event)),t.event=e},dequeue:function(t){t._eventQueue&&t._eventQueue.length?t.event=t._eventQueue.pop():delete t.event}},ze=function(t,e){var n=void 0===arguments[2]?{}:arguments[2];e&&(n.event?n.event.name=e:n.event={name:e,_noArg:!0},e=p(e).wildcardMatches(),function t(e,n,r,i){var o=void 0!==arguments[4]&&arguments[4];var a,s,u=!0;Ge.enqueue(e,r);for(s=n.length;0<=s;s--)(a=e._subs[n[s]])&&(u=Ye(e,a,r,i)&&u);Ge.dequeue(e);e.parent&&u&&(o&&e.component&&(o=e.component.name+"."+n[n.length-1],n=p(o).wildcardMatches(),r)&&(r.component=e),t(e.parent,n,r,i))}(t,e,n.event,n.args,!0))};function Ye(t,e,n,r){var i=null,o=!1;n&&!n._noArg&&(r=[n].concat(r));for(var a=0,s=(e=e.slice()).length;a\~:]))+)((?::[^\s\+\>\~\(]+(?:\([^\)]+\))?)?\s*[\s\+\>\~]?)\s*/g,En=/^@media/,On=/\[data-ractive-css~="\{[a-z0-9-]+\}"]/g;function Mn(t){return t.trim?t.trim():t.replace(/^\s+/,"").replace(/\s+$/,"")}function Ln(t){return t.str}var Rn=1,Dn={name:"css",extend:function(t,e,n){var r;n.css&&(r=Rn++,n=n.noCssTransform?n.css:An(n.css,r),e.cssId=r,wn.add({id:r,styles:n}))},init:function(){}};var Nn={name:"data",extend:function(t,e,n){var r,i=void 0;if(n.data&&l(n.data))for(i in n.data)(r=n.data[i])&&"object"==typeof r&&(l(r)||g(r))&&m("Passing a `data` option with object and array properties to Ractive.extend() is discouraged, as mutating them is likely to cause bugs. Consider using a data function instead:\n\n // this...\n data: function () {\n return {\n myObject: {}\n };\n })\n\n // instead of this:\n data: {\n myObject: {}\n }");e.data=jn(e.data,n.data)},init:function(t,e,n){t=jn(t.prototype.data,n.data);return(t="function"==typeof t?t.call(e):t)||{}},reset:function(t){var e=this.init(t.constructor,t,t.viewmodel);return t.viewmodel.reset(e),!0}};function jn(t,e){(n=e)&&n.constructor!==Object&&"function"!=typeof n&&("object"!=typeof n?h("data option must be an object or a function, `"+n+"` is not valid"):m("If supplied, options.data should be a plain JavaScript object - using a non-POJO as the root object may work, but is discouraged"));var n,r="function"==typeof t,i="function"==typeof e;return e||r||(e={}),r||i?function(){return Vn(i?In(e,this):e,r?In(t,this):t)}:Vn(e,t)}function In(t,e){t=t.call(e);if(t)return"object"!=typeof t&&h("Data function must return an object"),t.constructor!==Object&&d("Data function returned something other than a plain JavaScript object. This might work, but is strongly discouraged"),t}function Vn(t,e){if(t&&e){for(var n in e)n in t||(t[n]=e[n]);return t}return t||e}var Fn,Gn=/^\s+/,zn=function(t){this.name="ParseError",this.message=t;try{throw new Error(t)}catch(t){this.stack=t.stack}},n=(zn.prototype=Error.prototype,(Fn=function(t,e){var n,r,i=0;for(this.str=t,this.options=e||{},this.pos=0,this.lines=this.str.split("\n"),this.lineEnds=this.lines.map(function(t){t=i+t.length+1;return i=t},0),this.init&&this.init(t,e),n=[];this.pos=this.lineEnds[e];)n=this.lineEnds[e],e+=1;return[e+1,1+(t-n),t]},error:function(t){var n=this.getLinePos(this.pos),e=n[0],r=n[1],i=this.lines[n[0]-1],o=0,i=i.replace(/\t/g,function(t,e){return e> >>> < <= > >= in instanceof == != === !== & ^ | && ||".split(" "),Zr=C,Jr=0,Kr=$r.length;Jr")&&(t.allowWhitespace(),t.pos,t.relaxedNames=!0,r=E(t),t.relaxedNames=!1,t.allowWhitespace(),n=E(t),t.allowWhitespace(),r)?(ri(r,r={t:Wn}),t.allowWhitespace(),n&&ri(n,r={t:k,n:ur,f:[r]}),t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'"),r):null}function ui(t,e){var n;return t.matchString("!")?-1!==(n=t.remaining().indexOf(e.close))?(t.pos+=n+e.close.length,{t:qn}):void 0:null}var ci=function(t,e){var n,r,i;if(n=t.pos,!(r=E(t)))return null;for(i=0;i/g,Gi=/&/g,zi=/^\s*\r?\n/,Yi=/\r?\n\s*$/;function Ui(t){return"string"==typeof t}function Bi(t){return(t.t===k||t.t===Bn)&&t.f}function Hi(t,e,n){var r;e&&"string"==typeof(r=t[0])&&((r=r.replace(e,""))?t[0]=r:t.shift()),n&&"string"==typeof(r=b(t))&&((r=r.replace(n,""))?t[t.length-1]=r:t.pop())}var Wi=function t(e,n,r,i,o){var a,s,u,c,l,h,f;Li(e);a=e.length;for(;a--;)((s=e[a]).exclude||n&&s.t===qn)&&e.splice(a,1);Hi(e,i?Qi:null,o?$i:null);a=e.length;for(;a--;){var d;if((s=e[a]).f&&(d=s.t===Hn&&Xi.test(s.e),c=r||d,!r&&d&&Hi(s.f,Zi,Ji),!c&&(d=e[a-1],u=e[a+1],(!d||"string"==typeof d&&$i.test(d))&&(l=!0),!u||"string"==typeof u&&Qi.test(u))&&(h=!0),t(s.f,n,c,l,h)),s.l&&(t(s.l.f,n,r,l,h),e.splice(a+1,0,s.l),delete s.l),s.a)for(f in s.a)s.a.hasOwnProperty(f)&&"string"!=typeof s.a[f]&&t(s.a[f],n,r,l,h);if(s.m&&t(s.m,n,r,l,h),s.v)for(f in s.v)s.v.hasOwnProperty(f)&&(g(s.v[f].n)&&t(s.v[f].n,n,r,l,h),g(s.v[f].d))&&t(s.v[f].d,n,r,l,h)}a=e.length;for(;a--;)"string"==typeof e[a]&&("string"==typeof e[a+1]&&(e[a]=e[a]+e[a+1],e.splice(a+1,1)),r||(e[a]=e[a].replace(qi," ")),""===e[a])&&e.splice(a,1)},qi=/[ \t\f\r\n]+/g,Xi=/^(?:pre|script|style|textarea)$/i,Qi=/^[ \t\f\r\n]+/,$i=/[ \t\f\r\n]+$/,Zi=/^(?:\r\n|\r|\n)/,Ji=/(?:\r\n|\r|\n)$/;var Ki=function(t){var e,n;if(e=t.pos,!t.matchString(""))return null;if(n=t.matchPattern(to))return t.inside&&n!==t.inside?(t.pos=e,null):{t:14,e:n};t.pos-=2,t.error("Illegal closing tag")},to=/^([a-zA-Z]{1,}:?[a-zA-Z0-9\-]*)\s*\>/;var eo=function(t,e){for(var n,r,i=e.length;i--;){if(!(n=t.indexOf(e[i])))return 0;-1!==n&&(!r||n\s]/.test(t.nextChar())||t.error("Expected `=`, `/`, `>` or whitespace");if(t.allowWhitespace(),!t.matchString("="))return t.pos=e,null;t.allowWhitespace(),e=t.pos,n=t.sectionDepth,null===(r=ao(t,"'")||ao(t,'"')||function(t){var e,n;t.inAttribute=!0,e=[],n=gr(t)||oo(t);for(;null!==n;)e.push(n),n=gr(t)||oo(t);return e.length?(t.inAttribute=!1,e):null}(t))&&t.error("Expected valid attribute value");t.sectionDepth!==n&&(t.pos=e,t.error("An attribute value must contain as many opening section tags as closing section tags"));return r.length?1!==r.length||"string"!=typeof r[0]?r:Oi(r[0]):""}(t))&&(e.value=t);return e},ro=/^[^\s"'>\/=]+/,io=/^[^\s"'=<>`]+/;function oo(t){var e,n,r=t.pos,i=t.matchPattern(io);return i?(n=i,e=t.tags.map(function(t){return t.open}),-1!==(n=eo(n,e))&&(i=i.substr(0,n),t.pos=r+i.length),i):null}function ao(t,e){var n,r,i=t.pos;if(!t.matchString(e))return null;for(t.inAttribute=e,n=[],r=gr(t)||so(t,e);null!==r;)n.push(r),r=gr(t)||so(t,e);return t.matchString(e)?(t.inAttribute=!1,n):(t.pos=i,null)}function so(t,e){t.pos;var n=t.remaining(),r=t.tags.map(function(t){return t.open});return r.push(e),-1===(e=eo(n,r))&&t.error("Quoted attribute value must have a closing quote"),e?(t.pos+=e,n.substr(0,e)):null}var uo={true:!0,false:!1,undefined:void 0,null:null},co=new RegExp("^(?:"+Object.keys(uo).join("|")+")"),lo=/^(?:[+-]?)(?:(?:(?:0|[1-9]\d*)?\.\d+)|(?:(?:0|[1-9]\d*)\.)|(?:0|[1-9]\d*))(?:[eE][+-]?\d+)?/,ho=/\$\{([^\}]+)\}/g,fo=/^\$\{([^\}]+)\}/,po=/^\s*$/,go=n.extend({init:function(t,e){this.values=e.values,this.allowWhitespace()},postProcess:function(t){return 1===t.length&&po.test(this.leftover)?{value:t[0].v}:null},converters:[function(t){var e;return t.values?(e=t.matchPattern(fo))&&t.values.hasOwnProperty(e)?{v:t.values[e]}:void 0:null},function(t){if(t=t.matchPattern(co))return{v:uo[t]}},function(t){if(t=t.matchPattern(lo))return{v:+t}},function(t){var n,e=Sr(t);return e&&(n=t.values)?{v:e.v.replace(ho,function(t,e){return e in n?n[e]:e})}:e},function(t){var e,n,r;if(t.matchString("{")){if(e={},t.allowWhitespace(),t.matchString("}"))return{v:e};for(;r=void 0,(n=t).allowWhitespace(),n=(r=Or(n))&&(r={key:r},n.allowWhitespace(),n.matchString(":"))&&(n.allowWhitespace(),n=n.read())?(r.value=n.v,r):null;){if(e[n.key]=n.value,t.allowWhitespace(),t.matchString("}"))return{v:e};if(!t.matchString(","))return null}}return null},function(t){var e,n;if(t.matchString("[")){if(e=[],t.allowWhitespace(),t.matchString("]"))return{v:e};for(;n=t.read();){if(e.push(n.v),t.allowWhitespace(),t.matchString("]"))return{v:e};if(!t.matchString(","))return null;t.allowWhitespace()}}return null}]}),mo=function(t,e){return new go(t,{values:e}).result},yo=function(t,e){var n,r,i,o,a,s;if("string"==typeof t){var u;if(r=vo.exec(t))return u=t.lastIndexOf(")"),_o.test(t)||e.error("Invalid input after method call expression '"+t.slice(u+1)+"'"),n={m:r[1]},e="["+t.slice(n.m.length+1,u)+"]",r=new bo(e),n.a=ni(r.result[0]),n;if(-1===t.indexOf(":"))return t.trim();t=[t]}if(n={},a=[],s=[],t){for(;t.length;){if("string"==typeof(i=t.shift())&&-1!==(o=i.indexOf(":"))){o&&a.push(i.substr(0,o)),i.length>o+1&&(s[0]=i.substring(o+1));break}a.push(i)}s=s.concat(t)}a.length?s.length||"string"!=typeof a?(n={n:1===a.length&&"string"==typeof a[0]?a[0]:a},1===s.length&&"string"==typeof s[0]?(u=mo("["+s[0]+"]"),n.a=u?u.value:s[0].trim()):n.d=s):n=a:n="";return n},vo=/^([a-zA-Z_$][a-zA-Z_$0-9]*)\(/,_o=/\)\s*$/;var bo=n.extend({converters:[E]}),wo=/^[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/,xo=/^[\s\n\/>]/,So=/^on/,To=/^on-([a-zA-Z\\*\\.$_][a-zA-Z\\*\\.$_0-9\-]+)$/,Ao=/^(?:change|reset|teardown|update|construct|config|init|render|unrender|detach|insert)$/,ko={"intro-outro":"t0",intro:"t1",outro:"t2",decorator:"o"},Po={exclude:!0},Co={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]};var Eo=function(t){return t.replace(Oo,"\\$&")},Oo=/[-/\\^$*+?.()|[\]{}]/g;var Mo,Lo=/^/;var No=/^#\s*partial\s+/;var jo=function(t,e){return new Go(t,e||{}).result},Io=[si,ai,vi,hi,li,ui],Vo=[oi],Fo=[ai,vi,li],Go=void 0;var zo=[gr,Pi,function(r){var t,i,e,n,o,a,s,u,c,l,h,f;if(t=r.pos,r.inside||r.inAttribute)return null;if(!r.matchString("<"))return null;if("/"===r.nextChar())return null;i={},r.includeLinePositions&&(i.p=r.getLinePos(t));if(r.matchString("!"))i.t=$n,r.matchPattern(/^doctype/i)||r.error("Expected DOCTYPE declaration"),i.a=r.matchPattern(/^(.+?)>/);else{if(i.t=Hn,i.e=r.matchPattern(wo),!i.e)return null;for(xo.test(r.nextChar())||r.error("Illegal tag name"),n=function(t,e){var n=e.n||e;Ao.test(n)&&(r.pos-=n.length,r.error("Cannot use reserved event names (change, reset, teardown, update, construct, config, init, render, unrender, detach, insert)")),i.v[t]=e},r.allowWhitespace();o=gr(r)||no(r);)o.name?(e=ko[o.name])?i[e]=yo(o.value,r):(e=To.exec(o.name))?(i.v||(i.v={}),a=yo(o.value,r),n(e[1],a)):r.sanitizeEventAttributes&&So.test(o.name)||(i.a||(i.a={}),i.a[o.name]=o.value||(""===o.value?"":0)):(i.m||(i.m=[]),i.m.push(o)),r.allowWhitespace();if(r.allowWhitespace(),r.matchString("/")&&(s=!0),!r.matchString(">"))return null;var d,p,g=i.e.toLowerCase(),m=r.preserveWhitespace;if(!s&&!Di.test(i.e)){r.elementStack.push(g),"script"!==g&&"style"!==g||(r.inside=g),u=[],c=y(null);do{f=r.pos,d=r.remaining(),!function(t,e){return e=/^<([a-zA-Z][a-zA-Z0-9]*)/.exec(e),t=Co[t],!e||!t||!~t.indexOf(e[1].toLowerCase())}(g,d)?h=!0:(d=Ki(r))?(h=!0,(d=d.e.toLowerCase())!==g&&(r.pos=f,~r.elementStack.indexOf(d)||(p="Unexpected closing tag",Di.test(d)&&(p+=" (<"+d+"> is a void element - it cannot contain children)"),r.error(p)))):(d=di(r,{open:r.standardDelimiters[0],close:r.standardDelimiters[1]}))?(h=!0,r.pos=f):(d=r.read(Yo))?(c[d.n]&&(r.pos=f,r.error("Duplicate partial definition")),Wi(d.f,r.stripComments,m,!m,!m),c[d.n]=d.f,l=!0):(d=r.read(zo))?u.push(d):h=!0}while(!h);u.length&&(i.f=u),l&&(i.p=c),r.elementStack.pop()}if(r.inside=null,r.sanitizeElements&&-1!==r.sanitizeElements.indexOf(g))return Po}return i},function(t){var e,n,r;e=t.remaining(),r=t.inside?""+t.inside:"<",r=t.inside&&!t.interpolate[t.inside]?e.indexOf(r):(n=(n=t.tags.map(function(t){return t.open})).concat(t.tags.map(function(t){return"\\"+t.open})),!0===t.inAttribute?n.push('"',"'","=","<",">","`"):t.inAttribute?n.push(t.inAttribute):n.push(r),eo(e,n));if(!r)return null;-1===r&&(r=e.length);return t.pos+=r,t.inside?e.substr(0,r):Oi(e.substr(0,r))}],Yo=[function(t){var e=t.pos,n=t.standardDelimiters[0],r=t.standardDelimiters[1],i=void 0,o=void 0;if(!t.matchPattern(Lo)||!t.matchString(n))return t.pos=e,null;var a=t.matchPattern(Ro);if(d("Inline partial comments are deprecated.\nUse this...\n {{#partial "+a+"}} ... {{/partial}}\n\n...instead of this:\n \x3c!-- {{>"+a+"}} --\x3e ... \x3c!-- {{/"+a+"}} --\x3e'"),!t.matchString(r)||!t.matchPattern(Do))return t.pos=e,null;i=[];var s=new RegExp("^\x3c!--\\s*"+Eo(n)+"\\s*\\/\\s*"+a+"\\s*"+Eo(r)+"\\s*--\x3e");for(;t.matchPattern(s)?o=!0:((Mo=t.read(zo))||t.error("expected closing comment ('\x3c!-- "+n+"/"+a+r+" --\x3e')"),i.push(Mo)),!o;);return{t:17,f:i,n:a}},function(t){e=t.pos;var e,n,r,i,o=t.standardDelimiters;if(!t.matchString(o[0]))return null;if(!t.matchPattern(No))return t.pos=e,null;(e=t.matchPattern(/^[a-zA-Z_$][a-zA-Z_$0-9\-]*/))||t.error("expected legal partial name");t.matchString(o[1])||t.error("Expected closing delimiter '"+o[1]+"'");n=[];for(;(r=di(t,{open:t.standardDelimiters[0],close:t.standardDelimiters[1]}))?("partial"===!r.r&&t.error("Expected "+o[0]+"/partial"+o[1]),i=!0):((r=t.read(zo))||t.error("Expected "+o[0]+"/partial"+o[1]),n.push(r)),!i;);return{t:17,n:e,f:n}}],Go=n.extend({init:function(t,e){var n=e.tripleDelimiters||["{{{","}}}"],r=e.staticDelimiters||["[[","]]"],i=e.staticTripleDelimiters||["[[[","]]]"];this.standardDelimiters=e.delimiters||["{{","}}"],this.tags=[{isStatic:!1,isTriple:!1,open:this.standardDelimiters[0],close:this.standardDelimiters[1],readers:Io},{isStatic:!1,isTriple:!0,open:n[0],close:n[1],readers:Vo},{isStatic:!0,isTriple:!1,open:r[0],close:r[1],readers:Fo},{isStatic:!0,isTriple:!0,open:i[0],close:i[1],readers:Vo}],this.sortMustacheTags(),this.sectionDepth=0,this.elementStack=[],this.interpolate={script:!e.interpolate||!1!==e.interpolate.script,style:!e.interpolate||!1!==e.interpolate.style},!0===e.sanitize&&(e.sanitize={elements:"applet base basefont body frame frameset head html isindex link meta noframes noscript object param script style title".split(" "),eventAttributes:!0}),this.stripComments=!1!==e.stripComments,this.preserveWhitespace=e.preserveWhitespace,this.sanitizeElements=e.sanitize&&e.sanitize.elements,this.sanitizeEventAttributes=e.sanitize&&e.sanitize.eventAttributes,this.includeLinePositions=e.includeLinePositions},postProcess:function(t){return t.length?(0 element")},isHashedId:Wo,isParsed:function(t){return!("string"==typeof t)},getParseOptions:function(n){n.defaults&&(n=n.defaults);return Uo.reduce(function(t,e){return t[e]=n[e],t},{})},createHelper:function(n){var t=y(Bo);return t.parse=function(t,e){return Ho(t,e||n)},t},parse:Ho};function Ho(t,e){if(jo)return jo(t,e||this.options);throw new Error("Missing Ractive.parse - cannot parse template. Either preparse or use the version that includes the parser")}function Wo(t){return t&&"#"===t[0]}var O=Bo;function qo(t,e){n=O.getParseOptions(t),(r=y(O)).parse=function(t,e){return O.parse(t,e||n)};var n,r;return e.call(t,r)}function Xo(t,e){if("string"==typeof t)"#"===t[0]&&(t=O.fromId(t)),t=jo(t,O.getParseOptions(e));else{if(null==t)throw new Error("The template cannot be "+t+".");if("number"!=typeof t.v)throw new Error("The template parser was passed a non-string template, but the template doesn't have a version. Make sure you're passing in the template you think you are.");if(3!==t.v)throw new Error("Mismatched template version (expected 3, got "+t.v+") Please ensure you are using the latest version of Ractive.js in your build process as well as in your app")}return t}function Qo(t,e,n){if(e)for(var r in e)!n&&t.hasOwnProperty(r)||(t[r]=e[r])}var $o={name:"template",extend:function(t,e,n){"template"in n&&(n=n.template,e.template="function"==typeof n?n:Xo(n,e))},init:function(t,e,n){n=("template"in n?n:t.prototype).template;"function"==typeof n&&(n=qo(e,t=n),e._config.template={fn:t,result:n}),n=Xo(n,e),e.template=n.t,n.p&&Qo(e.partials,n.p)},reset:function(t){var e=function(t){var e,n=t._config.template;if(n&&n.fn&&(e=qo(t,n.fn))!==n.result)return e=Xo(n.result=e,t)}(t);if(e)return e=Xo(e,t),t.template=e.t,Qo(t.partials,e.p,!0),!0}},C=["adaptors","components","computed","decorators","easing","events","interpolators","partials","transitions"],Zo=function(t,e){this.name=t,this.useDefaults=e};Zo.prototype={constructor:Zo,extend:function(t,e,n){this.configure(this.useDefaults?t.defaults:t,this.useDefaults?e:e.constructor,n)},init:function(){},configure:function(t,e,n){var r,i=this.name,o=n[i],a=y(t[i]);for(r in o)a[r]=o[r];e[i]=a},reset:function(t){var n=t[this.name],r=!1;return Object.keys(n).forEach(function(t){var e=n[t];e._fn&&(e._fn.isOwner?n[t]=e._fn:delete n[t],r=!0)}),r}};var Jo=C.map(function(t){return new Zo(t,"computed"===t)}),Ko=function(t,r,i){var o;return/_super/.test(i)?((o=function(){var t=function(t,e){var n;t=e in t?(n=t[e],"function"==typeof n?n:function(){return n}):v;return t}(o._parent,r),e="_super"in this,n=this._super;return this._super=t,t=i.apply(this,arguments),e?this._super=n:delete this._super,t})._parent=t,o._method=i,o):i};var ta=function(t){na(t,"beforeInit","onconstruct"),na(t,"init","onrender"),na(t,"complete","oncomplete"),na(t,"eventDefinitions","events"),g(t.adaptors)&&na(t,"adaptors","adapt")};function ea(t,e,n){return"options."+t+" has been deprecated in favour of options."+e+"."+(n?" You cannot specify both options, please use options."+e+".":"")}function na(t,e,n){if(e in t){if(n in t)throw new Error(ea(e,n,!0));m(ea(e,n)),t[n]=t[e]}}function ra(e,n,r,i){for(var t in ta(i),i){var o;ua.hasOwnProperty(t)&&(o=i[t],"el"!==t&&"function"==typeof o?m(t+" is a Ractive option that does not expect a function and will be ignored","init"===e?r:null):r[t]=o)}Jo.forEach(function(t){t[e](n,r,i)}),Tn[e](n,r,i),$o[e](n,r,i),Dn[e](n,r,i);var a,s,u=n.prototype,c=r,l=i;for(a in l)!ca[a]&&l.hasOwnProperty(a)&&("function"==typeof(s=l[a])&&(s=Ko(u,a,s)),c[a]=s)}function ia(t){var e={};return t.forEach(function(t){return e[t]=!0}),e}function oa(){this.dirtyValue=this.dirtyArgs=!0,this.bound&&"function"==typeof this.owner.bubble&&this.owner.bubble()}var aa,sa={adapt:Tn,css:Dn,data:Nn,template:$o},ua=ia((n=Object.keys(H)).filter(function(t){return!sa[t]})),ca=ia(n.concat(Jo.map(function(t){return t.name}))),la={extend:function(t,e,n){return ra("extend",t,e,n)},init:function(t,e,n){return ra("init",t,e,n)},reset:function(e){return aa.filter(function(t){return t.reset&&t.reset(e)}).map(function(t){return t.name})},order:aa=[].concat(n.filter(function(t){return!Jo[t]&&!sa[t]}),Jo,sa.data,sa.template,sa.css)};function ha(){var e;return 1!==this.items.length?(e=document.createDocumentFragment(),this.items.forEach(function(t){t=t.detach();t&&e.appendChild(t)}),e):this.items[0].detach()}function fa(t){var e,n,r;if(this.items){for(n=this.items.length,e=0;e=r.length?"_"+e:void 0===(e=r[e])?"undefined":e.isSpecial?"number"==typeof(n=e.value)?n:'"'+n+'"':e.str})),this.keypath=p("${"+this.uniqueString.replace(/[\.\[\]]/g,"-").replace(/\*/,"#MUL#")+"}"),this.createEvaluator(),this.callback(this.keypath))},unbind:function(){for(var t;t=this.refResolvers.pop();)t.unbind()},resolve:function(t,e){this.keypaths[t]=e,this.bubble()},createEvaluator:function(){var e,n,r=this,t=this.keypath,i=this.root.viewmodel.computations[t.str];i?this.root.viewmodel.mark(t):(n=Va(this.str,this.refResolvers.length),e=this.keypaths.map(function(e){var t;return"undefined"===e?function(){}:e.isSpecial?(t=e.value,function(){return t}):function(){var t=r.root.viewmodel.get(e,{noUnwrap:!0,fullRootGet:!0});return t="function"==typeof t?function(t,e){var n,r,i;if(t.__ractive_nowrap)return t;{if(r="__ractive_"+e._guid,n=t[r])return n;if(/this/.test(t.toString())){for(i in a(t,r,{value:Ga.call(t,e),configurable:!0}),t)t.hasOwnProperty(i)&&(t[r][i]=t[i]);return e._boundFunctions.push({fn:t,prop:r}),t[r]}}return a(t,"__ractive_nowrap",{value:t}),t.__ractive_nowrap}(t,r.root):t}}),i={deps:this.keypaths.filter(Ua),getter:function(){var t=e.map(Ya);return n.apply(null,t)}},this.root.viewmodel.compute(t,i))},rebind:function(e,n){this.refResolvers.forEach(function(t){return t.rebind(e,n)})}},C);function Ya(t){return t.call()}function Ua(t){return void 0!==t&&"@"!==t[0]}function Ba(t,e,n){var r=this;this.resolver=e,this.root=e.root,this.parentFragment=n,this.viewmodel=e.root.viewmodel,"string"==typeof t?this.value=t:t.t===tr?this.refResolver=Ia(this,t.n,function(t){r.resolve(t)}):new za(e,n,t,function(t){r.resolve(t)})}function Ha(t,e,n){var r,i,o=this;this.parentFragment=i=t.parentFragment,this.root=r=t.root,this.mustache=t,this.ref=t=e.r,this.callback=n,this.unresolved=[],(n=Jt(r,t,i))?this.base=n:this.baseResolver=new Ea(this,t,function(t){o.base=t,o.baseResolver=null,o.bubble()}),this.members=e.m.map(function(t){return new Wa(t,o,i)}),this.ready=!0,this.bubble()}Ba.prototype={resolve:function(t){this.keypath&&this.viewmodel.unregister(this.keypath,this),this.keypath=t,this.value=this.viewmodel.get(t),this.bind(),this.resolver.bubble()},bind:function(){this.viewmodel.register(this.keypath,this)},rebind:function(t,e){this.refResolver&&this.refResolver.rebind(t,e)},setValue:function(t){this.value=t,this.resolver.bubble()},unbind:function(){this.keypath&&this.viewmodel.unregister(this.keypath,this),this.refResolver&&this.refResolver.unbind()},forceResolution:function(){this.refResolver&&this.refResolver.forceResolution()}};var Wa=Ba;function qa(t){return t.value}function Xa(t){return null!=t}function Qa(t){t.forceResolution()}Ha.prototype={getKeypath:function(){var t=this.members.map(qa);return!t.every(Xa)||this.baseResolver?null:this.base.join(t.join("."))},bubble:function(){this.ready&&!this.baseResolver&&this.callback(this.getKeypath())},unbind:function(){this.members.forEach(S)},rebind:function(e,n){var r,t;this.base&&(t=this.base.replace(e,n))&&t!==this.base&&(this.base=t,r=!0),this.members.forEach(function(t){t.rebind(e,n)&&(r=!0)}),r&&this.bubble()},forceResolution:function(){this.baseResolver&&(this.base=p(this.ref),this.baseResolver.unbind(),this.baseResolver=null),this.members.forEach(Qa),this.bubble()}};var $a=Ha;var Za=function(e,n){this.fragments&&this.fragments.forEach(function(t){return t.rebind(e,n)});this.resolver&&this.resolver.rebind(e,n)};function Ja(t){this.type=Yn,M.init(this,t)}var M={getValue:ka,init:function(r,t){var e,n;e=t.parentFragment,n=t.template,r.root=e.root,r.parentFragment=e,r.pElement=e.pElement,r.template=t.template,r.index=t.index||0,r.isStatic=t.template.s,r.type=t.template.t,r.registered=!1,(n=n.r)&&(r.resolver=Ia(r,n,function(t){r.resolve(t)}));t.template.x&&(r.resolver=new za(r,e,t.template.x,i));t.template.rx&&(r.resolver=new $a(r,t.template.rx,i));r.template.n!==P||r.hasOwnProperty("value")||r.setValue(void 0);function i(e){var n=r.keypath;e!=n&&(r.resolve(e),void 0!==n)&&r.fragments&&r.fragments.forEach(function(t){t.rebind(n,e)})}},resolve:function(t){var e,n;t&&t.isSpecial?(this.keypath=t,this.setValue(t.value)):(this.registered&&(this.root.viewmodel.unregister(this.keypath,this),this.registered=!1,e=!0),null!=(this.keypath=t)&&(n=this.root.viewmodel.get(t),this.root.viewmodel.register(t,this),this.registered=!0),this.setValue(n),e&&(t=this.twowayBinding)&&t.rebound())},rebind:Za},Ka=(Ja.prototype={update:function(){this.node.data=null==this.value?"":this.value},resolve:M.resolve,rebind:M.rebind,detach:xa,unbind:Aa,render:function(){return this.node||(this.node=document.createTextNode(Z(this.value))),this.node},unrender:function(t){t&&$(this.node)},getValue:M.getValue,setValue:function(t){var e;f(t=this.keypath&&(e=this.root.viewmodel.wrapped[this.keypath.str])?e.get():t,this.value)||(this.value=t,this.parentFragment.bubble(),this.node&&A.addView(this))},firstNode:function(){return this.node},toString:function(t){var e=""+Z(this.value);return t?Mi(e):e}},Ja);function ts(t){t.rebind("","")}function es(t,e,n){var r;e===sr&&t.indexRefs&&t.indexRefs[0]&&(r=t.indexRefs[0],(n&&"i"===r.t||!n&&"k"===r.t)&&!n&&(t.length=0,t.fragmentsToUnrender=t.fragments.slice(0),t.fragmentsToUnrender.forEach(function(t){return t.unbind()})),r.t=n?"k":"i"),t.currentSubtype=e}function ns(t,e,n){for(var r,i,o,a,s=t.hasKey||(t.hasKey={}),u=t.fragments.length;u--;)(i=t.fragments[u]).key in e||(o=!0,i.unbind(),t.fragmentsToUnrender.push(i),t.fragments.splice(u,1),s[i.key]=!1);for(u=t.fragments.length;u--;)(i=t.fragments[u]).index!==u&&(i.index=u,a=i.registeredIndexRefs)&&a.forEach(ss);for(r in u=t.fragments.length,e)s[r]||(o=!0,n.context=t.keypath.join(r),n.key=r,n.index=u++,i=new N(n),t.fragmentsToRender.push(i),t.fragments.push(i),s[r]=!0);return t.length=t.fragments.length,o}function rs(t,e){if(!t.length)return e.context=t.keypath,e.index=0,e=new N(e),t.fragmentsToRender.push(t.fragments[0]=e),t.length=1,!0}function is(t,e,n,r){var i,o=it(e)&&0===e.length,a=!1;if(!it(e)&&l(e))for(i in a=!0,e){a=!1;break}return(n?o||a||!e:e&&!o&&!a)?t.length?1t.length)for(r=t.length;r',""],THEAD:['',"
"],TBODY:['',"
"],TR:['',"
"],SELECT:['"]}}function _s(t,e,n){var r,i,o,a,s,u=[];if(null!=t&&""!==t){for(ms&&(i=ys[e.tagName])?((r=bs("DIV")).innerHTML=i[0]+t+i[1],"SELECT"===(r=r.querySelector(".x")).tagName&&(o=r.options[r.selectedIndex])):e.namespaceURI===c.svg?((r=bs("DIV")).innerHTML=''+t+"",r=r.querySelector(".x")):((r=bs(e.tagName)).innerHTML=t,"SELECT"===r.tagName&&(o=r.options[r.selectedIndex]));a=r.firstChild;)u.push(a),n.appendChild(a);if("SELECT"===e.tagName)for(s=u.length;s--;)u[s]!==o&&(u[s].selected=!1)}return u}function bs(t){return vs[t]||(vs[t]=o(t))}var ws=function(t){var e,n;t&&"select"===t.name&&t.binding&&(e=Ht(t.node.options).filter(xs),t.getAttribute("multiple")?n=e.map(function(t){return t.value}):(e=e[0])&&(n=e.value),void 0!==n&&t.binding.setValue(n),t.bubble())};function xs(t){return t.selected}function Ss(t){this.type=Un,M.init(this,t)}function Ts(){var t,e=this.node;if(e)return(t=e.parentNode)&&t.removeChild(e),e}Ss.prototype={detach:hs,find:ds,findAll:ps,firstNode:gs,getValue:M.getValue,rebind:M.rebind,render:function(){if(this.rendered)throw new Error("Attempted to render an item that was already rendered");return this.docFrag=document.createDocumentFragment(),this.nodes=_s(this.value,this.parentFragment.getNode(),this.docFrag),ws(this.pElement),this.rendered=!0,this.docFrag},resolve:M.resolve,setValue:function(t){var e;(e=this.root.viewmodel.wrapped[this.keypath.str])&&(t=e.get());t!==this.value&&(this.value=t,this.parentFragment.bubble(),this.rendered)&&A.addView(this)},toString:function(){return null!=this.value?Oi(""+this.value):""},unbind:Aa,unrender:function(t){this.rendered&&t&&(this.nodes.forEach($),this.rendered=!1)},update:function(){var t,e;if(this.rendered){for(;this.nodes&&this.nodes.length;)(t=this.nodes.pop()).parentNode.removeChild(t);e=this.parentFragment.getNode(),this.nodes=_s(this.value,e,this.docFrag),e.insertBefore(this.docFrag,this.parentFragment.findNextNode(this)),ws(this.pElement)}}};var As=Ss;function ks(){return null}function Ps(){return this.node}function Cs(t){if(this.attributes&&this.attributes[t])return this.attributes[t].value}function Es(){var t=this.useProperty||!this.rendered?this.fragment.getValue():this.fragment.toString();f(t,this.value)||("id"===this.name&&this.value&&delete this.root.nodes[this.value],this.value=t,"value"===this.name&&this.node&&(this.node._ractive.value=t),this.rendered&&A.addView(this))}var Os=/^true|on|yes|1$/i,Ms=/^[0-9]+$/;var n="altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath vkern".split(" "),C="attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits contentScriptType contentStyleType diffuseConstant edgeMode externalResourcesRequired filterRes filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" "),Ls=function(t){for(var e={},n=t.length;n--;)e[t[n].toLowerCase()]=t[n];return e}(n.concat(C)),Rs=function(t){t=t.toLowerCase();return Ls[t]||t},Ds=function(t){t=t.fragment.items;if(1===t.length&&t[0].type===Yn)return t[0]};var Ns={"accept-charset":"acceptCharset",accesskey:"accessKey",bgcolor:"bgColor",class:"className",codebase:"codeBase",colspan:"colSpan",contenteditable:"contentEditable",datetime:"dateTime",dirname:"dirName",for:"htmlFor","http-equiv":"httpEquiv",ismap:"isMap",maxlength:"maxLength",novalidate:"noValidate",pubdate:"pubDate",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap"};function js(){var t,e,n,r=this.value;if(!this.locked)for(this.node._ractive.value=r,t=this.node.options,n=t.length;n--;)if(((e=t[n])._ractive||e).value==r){e.selected=!0;break}}function Is(){var t,e,n,r,i=this.value;for(g(i)||(i=[i]),t=this.node.options,e=t.length;e--;)n=t[e],r=(n._ractive||n).value,n.selected=Yt(i,r)}function Vs(){var t=this.node,e=this.value;t.checked=e==t._ractive.value}function Fs(){var t,e,n,r,i=this.node;if(t=i.checked,i.value=this.element.getAttribute("value"),i.checked=this.element.getAttribute("value")===this.element.getAttribute("name"),t&&!i.checked&&this.element.binding&&(n=this.element.binding.siblings,r=n.length)){for(;r--;){if(!(e=n[r]).element.node)return;if(e.element.node.checked)return A.addRactive(e.root),e.handleChange()}this.root.viewmodel.set(e.keypath,void 0)}}function Gs(){var t,e,n=this.element,r=this.node,i=this.value,o=n.binding;if(t=n.getAttribute("value"),g(i)){for(e=i.length;e--;)if(t==i[e])return void(o.isChecked=r.checked=!0);o.isChecked=r.checked=!1}else o.isChecked=r.checked=i==t}function zs(){this.node.className=Z(this.value)}function Ys(){var t=this.node,e=this.value;(this.root.nodes[e]=t).id=e}function Us(){var t,e;t=this.node,void 0===(e=this.value)&&(e=""),t.style.setAttribute("cssText",e)}function Bs(){var t=this.value;void 0===t&&(t=""),this.locked||(this.node.innerHTML=t)}function Hs(){var t=this.node,e=this.value;t._ractive.value=e,this.locked||(t.value=null==e?"":e)}function Ws(){this.locked||(this.node[this.propertyName]=this.value)}function qs(){var t=this.node,e=this.namespace,n=this.name,r=this.value,i=this.fragment;e?t.setAttributeNS(e,n,(i||r).toString()):this.isBoolean?r?t.setAttribute(n,""):t.removeAttribute(n):null==r?t.removeAttribute(n):t.setAttribute(n,(i||r).toString())}function Xs(t){this.init(t)}function Qs(t,e){this.element=t,this.root=t.root,this.parentFragment=t.parentFragment,this.attributes=[],this.fragment=new N({root:t.root,owner:this,template:[e]})}Xs.prototype={bubble:Es,init:function(t){this.type=13,this.element=t.element,this.root=t.root,function(t,e){var n,r=e.indexOf(":");if(-1!==r&&"xmlns"!==(n=e.substr(0,r))){if(e=e.substring(r+1),t.name=Rs(e),t.namespace=c[n.toLowerCase()],t.namespacePrefix=n,t.namespace)return;throw'Unknown namespace ("'+n+'")'}t.name=t.element.namespace!==c.html?Rs(e):e}(this,t.name),this.isBoolean=Ri.test(this.name),t.value&&"string"!=typeof t.value?(this.parentFragment=this.element.parentFragment,this.fragment=new N({template:t.value,root:this.root,owner:this}),this.value=this.fragment.getValue(),this.interpolator=Ds(this),this.isBindable=!!this.interpolator&&!this.interpolator.isStatic,this.ready=!0):this.value=!!this.isBoolean||t.value||""},rebind:function(t,e){this.fragment&&this.fragment.rebind(t,e)},render:function(t){var e;(this.node=t).namespaceURI&&t.namespaceURI!==c.html||(e=Ns[this.name]||this.name,void 0!==t[e]&&(this.propertyName=e),(this.isBoolean||this.isTwoway)&&(this.useProperty=!0),"value"===e&&(t._ractive.value=this.value));this.rendered=!0,this.update()},toString:function(){var t=this.name,e=this.namespacePrefix,n=this.value,r=this.interpolator,i=this.fragment;if(("value"!==t||"select"!==this.element.name&&"textarea"!==this.element.name)&&("value"!==t||void 0===this.element.getAttribute("contenteditable"))){if("name"===t&&"input"===this.element.name&&r)return"name={{"+(r.keypath.str||r.ref)+"}}";if(this.isBoolean)return n?t:"";if(i){if(1===i.items.length&&null==i.items[0].value)return"";n=i.toString()}return e&&(t=e+":"+t),n?t+'="'+n.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'")+'"':t}},unbind:function(){this.fragment&&this.fragment.unbind();"id"===this.name&&delete this.root.nodes[this.value]},update:function(){var t,e,n=this.name,r=this.element,i=this.node;"id"===n?e=Ys:"value"===n?"select"===r.name&&"value"===n?e=r.getAttribute("multiple")?Is:js:"textarea"===r.name?e=Hs:null!=r.getAttribute("contenteditable")?e=Bs:"input"===r.name&&(t=r.getAttribute("type"),e="file"===t?v:"radio"===t&&r.binding&&"name"===r.binding.name?Fs:Hs):this.isTwoway&&"name"===n?"radio"===i.type?e=Vs:"checkbox"===i.type&&(e=Gs):"style"===n&&i.style.setAttribute?e=Us:"class"!==n||i.namespaceURI&&i.namespaceURI!==c.html?this.useProperty&&(e=Ws):e=zs;e=e||qs;this.update=e,this.update()}};var $s,Zs=Xs,Js=("undefined"!=typeof document&&($s=o("div")),Qs.prototype={bubble:function(){this.node&&this.update(),this.element.bubble()},rebind:function(t,e){this.fragment.rebind(t,e)},render:function(t){this.node=t,this.isSvg=t.namespaceURI===c.svg,this.update()},unbind:function(){this.fragment.unbind()},update:function(){var e=this,i=function(t,e){e=e?"svg":"div";return $s.innerHTML="<"+e+" "+t+">"+e+">",Ht($s.childNodes[0].attributes)}(this.fragment.toString(),this.isSvg);this.attributes.filter(function(t){for(var e=i,n=t,r=e.length;r--;)if(e[r].name===n.name)return!1;return!0}).forEach(function(t){e.node.removeAttribute(t.name)}),i.forEach(function(t){e.node.setAttribute(t.name,t.value)}),this.attributes=i},toString:function(){return this.fragment.toString()}},Qs);function Ks(t){var e,n;if(this.element=t,this.root=t.root,this.attribute=t.attributes[this.name||"value"],(e=this.attribute.interpolator).twowayBinding=this,n=e.keypath){if("}"===n.str.slice(-1))return d("Two-way binding does not work with expressions (`%s` on <%s>)",e.resolver.uniqueString,t.name,{ractive:this.root}),!1;if(n.isSpecial)return d("Two-way binding does not work with %s",e.resolver.ref,{ractive:this.root}),!1}else m("The %s being used for two-way binding is ambiguous, and may cause unexpected results. Consider initialising your data to eliminate the ambiguity",e.template.r?"'"+e.template.r+"' reference":"expression",{ractive:this.root}),e.resolver.forceResolution(),n=e.keypath;this.attribute.isTwoway=!0,this.keypath=n,void 0===(e=this.root.viewmodel.get(n))&&this.getInitialValue&&void 0!==(e=this.getInitialValue())&&this.root.viewmodel.set(n,e),(n=function(t){for(;t=t.parent;)if("form"===t.name)return t}(t))&&(this.resetValue=e,n.formBindings.push(this))}Ks.prototype={handleChange:function(){var t=this;A.start(this.root),this.attribute.locked=!0,this.root.viewmodel.set(this.keypath,this.getValue()),A.scheduleTask(function(){return t.attribute.locked=!1}),A.end()},rebound:function(){var t=this.keypath,e=this.attribute.interpolator.keypath;t!==e&&(w(this.root._twowayBindings[t.str],this),this.keypath=e,(this.root._twowayBindings[e.str]||(this.root._twowayBindings[e.str]=[])).push(this))},unbind:function(){}},Ks.extend=function(t){var e=function(t){Ks.call(this,t),this.init&&this.init()};return tt(e.prototype=y(this.prototype),t),e.extend=Ks.extend,e};var L=Ks;var R=function(){this._ractive.binding.handleChange()};var tu=L.extend({getInitialValue:function(){return""},getValue:function(){return this.element.node.value},render:function(){var t,e=this.element.node,n=!1;this.rendered=!0,t=this.root.lazy,!0===this.element.lazy?t=!0:!1===this.element.lazy?t=!1:s(this.element.lazy)?(t=!1,n=+this.element.lazy):s(t||"")&&(n=+t,t=!1,this.element.lazy=n),this.handler=n?nu:R,e.addEventListener("change",R,!1),t||(e.addEventListener("input",this.handler,!1),e.attachEvent&&e.addEventListener("keyup",this.handler,!1)),e.addEventListener("blur",eu,!1)},unrender:function(){var t=this.element.node;this.rendered=!1,t.removeEventListener("change",R,!1),t.removeEventListener("input",this.handler,!1),t.removeEventListener("keyup",this.handler,!1),t.removeEventListener("blur",eu,!1)}});function eu(){var t;R.call(this),t=this._ractive.root.viewmodel.get(this._ractive.binding.keypath),this.value=null==t?"":t}function nu(){var t=this._ractive.binding,e=this;t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.rendered&&R.call(e),t._timeout=void 0},t.element.lazy)}var ru=tu.extend({getInitialValue:function(){return this.element.fragment?this.element.fragment.toString():""},getValue:function(){return this.element.node.innerHTML}}),iu=function(t,e,n){t=t+e+n;return ou[t]||(ou[t]=[])},ou={};var au=L.extend({name:"checked",init:function(){this.siblings=iu(this.root._guid,"radio",this.element.getAttribute("name")),this.siblings.push(this)},render:function(){var t=this.element.node;t.addEventListener("change",R,!1),t.attachEvent&&t.addEventListener("click",R,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",R,!1),t.removeEventListener("click",R,!1)},handleChange:function(){A.start(this.root),this.siblings.forEach(function(t){t.root.viewmodel.set(t.keypath,t.getValue())}),A.end()},getValue:function(){return this.element.node.checked},unbind:function(){w(this.siblings,this)}}),su=L.extend({name:"name",init:function(){this.siblings=iu(this.root._guid,"radioname",this.keypath.str),this.siblings.push(this),this.radioName=!0},getInitialValue:function(){if(this.element.getAttribute("checked"))return this.element.getAttribute("value")},render:function(){var t=this.element.node;t.name="{{"+this.keypath.str+"}}",t.checked=this.root.viewmodel.get(this.keypath)==this.element.getAttribute("value"),t.addEventListener("change",R,!1),t.attachEvent&&t.addEventListener("click",R,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",R,!1),t.removeEventListener("click",R,!1)},getValue:function(){var t=this.element.node;return(t._ractive||t).value},handleChange:function(){this.element.node.checked&&L.prototype.handleChange.call(this)},rebound:function(t,e){L.prototype.rebound.call(this,t,e),(t=this.element.node)&&(t.name="{{"+this.keypath.str+"}}")},unbind:function(){w(this.siblings,this)}});function uu(t){return t.isChecked}function cu(t){return t.element.getAttribute("value")}var lu=L.extend({name:"name",getInitialValue:function(){return this.noInitialValue=!0,[]},init:function(){var t,e;this.checkboxName=!0,this.siblings=iu(this.root._guid,"checkboxes",this.keypath.str),this.siblings.push(this),this.noInitialValue&&(this.siblings.noInitialValue=!0),this.siblings.noInitialValue&&this.element.getAttribute("checked")&&(t=this.root.viewmodel.get(this.keypath),e=this.element.getAttribute("value"),t.push(e))},unbind:function(){w(this.siblings,this)},render:function(){var t=this.element.node,e=this.root.viewmodel.get(this.keypath),n=this.element.getAttribute("value");g(e)?this.isChecked=Yt(e,n):this.isChecked=e==n,t.name="{{"+this.keypath.str+"}}",t.checked=this.isChecked,t.addEventListener("change",R,!1),t.attachEvent&&t.addEventListener("click",R,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",R,!1),t.removeEventListener("click",R,!1)},changed:function(){var t=!!this.isChecked;return this.isChecked=this.element.node.checked,this.isChecked===t},handleChange:function(){this.isChecked=this.element.node.checked,L.prototype.handleChange.call(this)},getValue:function(){return this.siblings.filter(uu).map(cu)}}),hu=L.extend({name:"checked",render:function(){var t=this.element.node;t.addEventListener("change",R,!1),t.attachEvent&&t.addEventListener("click",R,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",R,!1),t.removeEventListener("click",R,!1)},getValue:function(){return this.element.node.checked}}),fu=L.extend({getInitialValue:function(){var t,e,n,r,i=this.element.options;if(void 0===this.element.getAttribute("value")&&(e=t=i.length,t)){for(;e--;)if(i[e].getAttribute("selected")){n=i[e].getAttribute("value"),r=!0;break}if(!r)for(;++e is not valid',t.name,e),this.invalid=!0);n.m?(e=n.a.r,this.method=n.m,this.keypaths=[],this.fn=Va(n.a.s,e.length),this.parentFragment=t.parentFragment,this.root,this.refResolvers=[],e.forEach(function(t,e){var n=void 0;(n=vu.exec(t))?r.keypaths[e]={eventObject:!0,refinements:n[1]?n[1].split("."):[]}:r.refResolvers.push(Ia(r,t,function(t){return r.resolve(e,t)}))}),this.fire=_u):("string"!=typeof(t=n.n||n)&&(t=new N({template:t,root:this.root,owner:this})),this.action=t,n.d?(this.dynamicParams=new N({template:n.d,root:this.root,owner:this.element}),this.fire=wu):n.a&&(this.params=n.a,this.fire=bu))},listen:function(){var t,e=this.name;if(!this.invalid){if(t=gt("events",this.root,e))this.custom=t(this.node,function(n){Su[n]||(Su[n]=function(t){var e=t.node._ractive;t.index=e.index,t.keypath=e.keypath.str,t.context=e.root.viewmodel.get(e.keypath),e.events[n].fire(t)});return Su[n]}(e));else{if(!("on"+e in this.node||window&&"on"+e in window||q))return void(Tu[e]||d(pt(e,"event"),{node:this.node}));this.node.addEventListener(e,xu,!1)}this.hasListener=!0}},rebind:function(e,n){function t(t){t&&t.rebind(e,n)}this.method?(this.element.parentFragment,this.refResolvers.forEach(t)):("string"!=typeof this.action&&t(this.action),this.dynamicParams&&t(this.dynamicParams))},render:function(){this.node=this.element.node,((this.node._ractive.events[this.name]=this).method||this.getAction())&&this.listen()},resolve:function(t,e){this.keypaths[t]=e},unbind:function(){this.method?this.refResolvers.forEach(S):("string"!=typeof this.action&&this.action.unbind(),this.dynamicParams&&this.dynamicParams.unbind())},unrender:function(){this.custom?this.custom.teardown():this.node.removeEventListener(this.name,xu,!1);this.hasListener=!1}};var Pu=Au,Cu=(ku.prototype={init:function(){var t=this.element.node,e=this.params?(e=[t].concat(this.params),this.fn.apply(this.root,e)):this.fn.call(this.root,t);if(!e||!e.teardown)throw new Error("Decorator definition must return an object with a teardown method");this.actual=e,this.ready=!0},update:function(){this.actual.update?this.actual.update.apply(this.root,this.params):(this.actual.teardown(!0),this.init())},rebind:function(t,e){this.fragment&&this.fragment.rebind(t,e)},teardown:function(t){this.torndown=!0,this.ready&&this.actual.teardown(),!t&&this.fragment&&this.fragment.unbind()}},ku);function Eu(){var o=this;this.dirty||(this.dirty=!0,A.scheduleTask(function(){var t,n,r,e,i;(e=(t=o).node)&&(e=Ht(e.options),n=t.getAttribute("value"),r=t.getAttribute("multiple"),void 0!==n?(e.forEach(function(t){var e=(t._ractive||t).value,e=r?function(t,e){var n=t.length;for(;n--;)if(t[n]==e)return!0}(n,e):n==e;e&&(i=!0),t.selected=e}),i||(e[0]&&(e[0].selected=!0),t.binding&&t.binding.forceUpdate())):t.binding&&t.binding.forceUpdate()),o.dirty=!1})),this.parentFragment.bubble()}function Ou(t,e){t.select=function(t){if(t)do{if("select"===t.name)return t}while(t=t.parent)}(t.parent),t.select&&(t.select.options.push(t),e.a||(e.a={}),void 0!==e.a.value||e.a.hasOwnProperty("disabled")||(e.a.value=e.f),"selected"in e.a)&&void 0!==t.select.getAttribute("value")&&delete e.a.selected}function Mu(t){var e,n;this.type=Hn,n=this.parentFragment=t.parentFragment,e=this.template=t.template,this.parent=t.pElement||n.pElement,this.root=n=n.root,this.index=t.index,this.key=t.key,this.name=Rs(e.e),"option"===this.name&&Ou(this,e),"select"===this.name&&(this.options=[],this.bubble=Eu),"form"===this.name&&(this.formBindings=[]),t=function(t){var t=t.a||{},e={},n=t.twoway;return void 0!==n&&(e.twoway=0===n||Os.test(n)),void 0!==(n=t.lazy)&&(0!==n&&Ms.test(n)?e.lazy=parseInt(n):e.lazy=0===n||Os.test(n)),e}(e),this.attributes=function(t,e){var n,r,i=[];for(n in e)"twoway"!==n&&"lazy"!==n&&e.hasOwnProperty(n)&&(r=new Zs({element:t,name:n,value:e[n],root:t.root}),i[n]=r,"value"!==n)&&i.push(r);return(r=i.value)&&i.push(r),i}(this,e.a),this.conditionalAttributes=function(e,t){return t?t.map(function(t){return new Js(e,t)}):[]}(this,e.m),e.f&&(this.fragment=new N({template:e.f,root:n,owner:this,pElement:this,cssIds:null})),n=n.twoway,!1===t.twoway?n=!1:!0===t.twoway&&(n=!0),this.twoway=n,this.lazy=t.lazy,n&&(t=mu(this,e.a))&&(this.binding=t,(this.root._twowayBindings[t.keypath.str]||(this.root._twowayBindings[t.keypath.str]=[])).push(t)),e.v&&(this.eventHandlers=function(t,e){var n,r,i,o,a=[];for(r in e)if(e.hasOwnProperty(r))for(n=(i=r.split("-")).length;n--;)o=new Pu(t,i[n],e[r]),a.push(o);return a}(this,e.v)),e.o&&(this.decorator=new Cu(this,e.o)),this.intro=e.t0||e.t1,this.outro=e.t0||e.t2}function Lu(e,n){var t,r,i;if(this.attributes&&this.attributes.forEach(o),this.conditionalAttributes&&this.conditionalAttributes.forEach(o),this.eventHandlers&&this.eventHandlers.forEach(o),this.decorator&&o(this.decorator),this.fragment&&o(this.fragment),i=this.liveQueries)for(this.root,t=i.length;t--;)i[t]._makeDirty();function o(t){t.rebind(e,n)}this.node&&(r=this.node._ractive)&&kt(r,"keypath",e,n)}function Ru(){var t=this._ractive.proxy;A.start(),t.formBindings.forEach(Du),A.end()}function Du(t){t.root.viewmodel.set(t.keypath,t.resetValue)}function Nu(t,e,n){var r,i;this.element=t,this.root=r=t.root,this.isIntro=n,"string"!=typeof(n=e.n||e)&&(i=new N({template:n,root:r,owner:t}),n=i.toString(),i.unbind(),""===n)||(this.name=n,e.a?this.params=e.a:e.d&&(i=new N({template:e.d,root:r,owner:t}),this.params=i.getArgsList(),i.unbind()),this._fn=gt("transitions",r,n),this._fn)||d(pt(n,"transition"),{ractive:this.root})}function ju(t){return t.replace(/-([a-zA-Z])/g,function(t,e){return e.toUpperCase()})}function Iu(t){var e;this.duration=t.duration,this.step=t.step,this.complete=t.complete,"string"==typeof t.easing?(e=t.root.easing[t.easing])||(d(pt(t.easing,"easing")),e=Yu):e="function"==typeof t.easing?t.easing:Yu,this.easing=e,this.start=Vt(),this.end=this.start+this.duration,this.running=!0,ve.add(this)}var Vu,Fu,Gu,n=r?(Vu={},Fu=o("div").style,function(t){var e,n,r;if(t=ju(t),!Vu[t])if(void 0!==Fu[t])Vu[t]=t;else for(r=t.charAt(0).toUpperCase()+t.substring(1),e=i.length;e--;)if(n=i[e],void 0!==Fu[n+r]){Vu[t]=n+r;break}return Vu[t]}):null,D=n,C=r?(Gu=window.getComputedStyle||null.getComputedStyle,function(t){var e,n,r,i,o=Gu(this.node);if("string"==typeof t)return i="0px"===(i=o[D(t)])?0:i;if(!g(t))throw new Error("Transition$getStyle must be passed a string, or an array of strings representing CSS properties");for(e={},n=t.length;n--;)r=t[n],i=o[D(r)],e[r]=i="0px"===i?0:i;return e}):null,n=C,zu=(Iu.prototype={tick:function(t){return!!this.running&&(t>this.end?(this.step&&this.step(1),this.complete&&this.complete(1),!1):(t=t-this.start,t=this.easing(t/this.duration),this.step&&this.step(t),!0))},stop:function(){this.abort&&this.abort(),this.running=!1}},Iu);function Yu(t){return t}function Uu(t){return t?(t=nc.test(t)?"-"+t:t).replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}):""}var Bu,Hu,Wu,qu,Xu,Qu,$u,Zu,Ju,Ku,tc,ec=new RegExp("^-(?:"+i.join("|")+")-"),nc=new RegExp("^(?:"+i.join("|")+")([A-Z])"),rc={},ic={},C=r?(C=o("div").style,Wu=void 0!==C.transition?(Bu="transition",Hu="transitionend",!0):void 0!==C.webkitTransition&&(Bu="webkitTransition",Hu="webkitTransitionEnd",!0),Bu&&(qu=Bu+"Duration",Xu=Bu+"Property",Qu=Bu+"TimingFunction"),function(l,h,f,d,t){setTimeout(function(){var o,a,s,u=function(){o&&a&&(l.root.fire(l.name+":end",l.node,l.isIntro),t())},c=(l.node.namespaceURI||"")+l.node.tagName;l.node.style[Xu]=d.map(D).map(Uu).join(","),l.node.style[Qu]=Uu(f.easing||"linear"),l.node.style[qu]=f.duration/1e3+"s",s=function(t){t=d.indexOf(ju(t.propertyName.replace(ec,"")));-1!==t&&d.splice(t,1),d.length||(l.node.removeEventListener(Hu,s,!1),a=!0,u())},l.node.addEventListener(Hu,s,!1),setTimeout(function(){for(var t,e,n,r=d.length,i=[];r--;)e=d[r],n=c+e,Wu&&!ic[n]&&(l.node.style[D(e)]=h[e],rc[n]||(t=l.getStyle(e),rc[n]=l.getStyle(e)!=h[e],ic[n]=!rc[n],ic[n]&&(l.node.style[D(e)]=t))),Wu&&!ic[n]||(void 0===t&&(t=l.getStyle(e)),-1===(n=d.indexOf(e))?m("Something very strange happened with transitions. Please raise an issue at https://github.com/ractivejs/ractive/issues - thanks!",{node:l.node}):d.splice(n,1),n=/[^\d]*$/.exec(h[e])[0],i.push({name:D(e),interpolator:yt(parseFloat(t),parseFloat(h[e])),suffix:n}));i.length?new zu({root:l.root,duration:f.duration,easing:ju(f.easing||""),step:function(t){for(var e,n=i.length;n--;)l.node.style[(e=i[n]).name]=e.interpolator(t)+e.suffix},complete:function(){o=!0,u()}}):o=!0,d.length||(l.node.removeEventListener(Hu,s,!1),a=!0,u())},0)},f.delay||0)}):null,oc=C;if("undefined"!=typeof document){if(tc={},($u="hidden")in document)Ju="";else for(Ku=i.length;Ku--;)Zu=i[Ku],($u=Zu+"Hidden")in document&&(Ju=Zu);void 0!==Ju?(document.addEventListener(Ju+"visibilitychange",ac),ac()):("onfocusout"in document?(document.addEventListener("focusout",sc),document.addEventListener("focusin",uc)):(window.addEventListener("pagehide",sc),window.addEventListener("blur",sc),window.addEventListener("pageshow",uc),window.addEventListener("focus",uc)),tc.hidden=!1)}function ac(){tc.hidden=document[$u]}function sc(){tc.hidden=!0}function uc(){tc.hidden=!1}var cc,lc,hc=tc,C=r?(cc=window.getComputedStyle||null.getComputedStyle,function(t,e,s){var u,c=this;if(4===arguments.length)throw new Error("t.animateStyle() returns a promise - use .then() instead of passing a callback");return hc.hidden?(this.setStyle(t,e),lc=lc||Qt.resolve()):("string"==typeof t?(u={})[t]=e:(u=t,s=e),s||(d('The "%s" transition does not supply an options object to `t.animateStyle()`. This will break in a future version of Ractive. For more info see https://github.com/RactiveJS/Ractive/issues/340',this.name),s=this),new Qt(function(t){var e,n,r,i,o,a;if(s.duration){for(e=Object.keys(u),n=[],r=cc(c.node),o=e.length;o--;)a=e[o],(i="0px"===(i=r[D(a)])?0:i)!=u[a]&&(n.push(a),c.node.style[D(a)]=i);n.length?oc(c,u,s,n,t):t()}else c.setStyle(u),t()}))}):null;function fc(t,e,n){this.init(t,e,n)}fc.prototype={init:Nu,start:function(){var n,r,i,o=this;n=this.node=this.element.node,r=n.getAttribute("style"),this.complete=function(t){var e;i||(!t&&o.isIntro&&(t=n,(e=r)?t.setAttribute("style",e):(t.getAttribute("style"),t.removeAttribute("style"))),n._ractive.transition=null,o._manager.remove(o),i=!0)},this._fn?this._fn.apply(this.root,[this].concat(this.params)):this.complete()},getStyle:n,setStyle:function(t,e){if("string"==typeof t)this.node.style[D(t)]=e;else for(var n in t)t.hasOwnProperty(n)&&(this.node.style[D(n)]=t[n]);return this},animateStyle:C,processParams:function(t,e){return function(n){for(var t=arguments.length,e=Array(1":(t="<"+this.template.e,t+=this.attributes.map(mc).join("")+this.conditionalAttributes.map(mc).join(""),"option"===this.name&&function(t){var e,n,r;if(void 0===(e=t.getAttribute("value"))||!t.select)return;if((n=t.select.getAttribute("value"))==e)return 1;if(t.select.getAttribute("multiple")&&g(n))for(r=n.length;r--;)if(n[r]==e)return 1}(this)&&(t+=" selected"),"input"===this.name&&function(t){var e,n;if(t=t.attributes,e=t.type,n=t.value,t=t.name,e&&"radio"===e.value&&n&&t.interpolator&&n.value===t.interpolator.value)return 1}(this)&&(t+=" checked"),t+=">","textarea"===this.name&&void 0!==this.getAttribute("value")?t+=Mi(this.getAttribute("value")):void 0!==this.getAttribute("contenteditable")&&(t+=this.getAttribute("value")||""),this.fragment&&(e="script"!==this.name&&"style"!==this.name,t+=this.fragment.toString(e)),Di.test(this.template.e)||(t+=""+this.template.e+">"),t)},unbind:function(){this.fragment&&this.fragment.unbind();this.binding&&this.binding.unbind();this.eventHandlers&&this.eventHandlers.forEach(S);"option"===this.name&&!function(t){t.select&&w(t.select.options,t)}(this);this.attributes.forEach(S),this.conditionalAttributes.forEach(S)},unrender:function(t){var e,n;(n=this.transition)&&n.complete();"option"===this.name?this.detach():t&&A.detachWhenReady(this);this.fragment&&this.fragment.unrender(!1);(t=this.binding)&&(this.binding.unrender(),this.node._ractive.binding=null,(e=this.root._twowayBindings[t.keypath.str]).splice(e.indexOf(t),1));this.eventHandlers&&this.eventHandlers.forEach(re);this.decorator&&A.registerDecorator(this.decorator);this.root.transitionsEnabled&&this.outro&&(n=new dc(this,this.outro,!1),A.registerTransition(n),A.scheduleTask(function(){return n.start()}));this.liveQueries&&!function(t){var e,n;n=t.liveQueries.length;for(;n--;)e=t.liveQueries[n],e.selector,e._remove(t.node)}(this);"form"===this.name&&!function(t){t.node.removeEventListener("reset",Ru,!1)}(this)}};var vc=yc,_c=/^\s*$/,bc=/^\s*/;function wc(t,e){e=bc.exec(e)[0];return null===t||e.length%s}}) cannot contain nested inline partials",e,{ractive:t}),(r?o:function(t,e){return t.partials.hasOwnProperty(e)?t:function t(e,n){if(!e)return;return e.partials.hasOwnProperty(n)?e:t(e._Parent,n)}(t.constructor,e)}(o,e)).partials[e]=n=i.t),r&&(n._fn=r),n.v?n.t:n;m(dt,e,"partial","partial",{ractive:t})}}(t,e,n||{}))return n;if(n=O.fromId(e,{noThrow:!0}))return n=function(t){var e,n=t.split("\n"),r=n[0];return void 0!==r&&_c.test(r)&&n.shift(),void 0!==(r=b(n))&&_c.test(r)&&n.pop(),t=(e=n.reduce(wc,null))?n.map(function(t){return t.replace(e,"")}).join("\n"):t}(n),n=O.parse(n,O.getParseOptions(t)),t.partials[e]=n.t};function Sc(t){var e=this.parentFragment=t.parentFragment;this.root=e.root,this.type=Wn,this.index=t.index,this.name=t.template.r,this.rendered=!1,this.fragment=this.fragmentToRender=this.fragmentToUnrender=null,M.init(this,t),this.keypath||((t=xc(this.root,this.name,e))?(Aa.call(this),this.isNamed=!0,this.setTemplate(t)):d(Tc,this.name))}var Tc='Could not find template for partial "%s"',Ac=(Sc.prototype={bubble:function(){this.parentFragment.bubble()},detach:function(){return this.fragment.detach()},find:function(t){return this.fragment.find(t)},findAll:function(t,e){return this.fragment.findAll(t,e)},findComponent:function(t){return this.fragment.findComponent(t)},findAllComponents:function(t,e){return this.fragment.findAllComponents(t,e)},firstNode:function(){return this.fragment.firstNode()},findNextNode:function(){return this.parentFragment.findNextNode(this)},getPartialName:function(){return this.isNamed&&this.name||void 0===this.value?this.name:this.value},getValue:function(){return this.fragment.getValue()},rebind:function(t,e){this.isNamed||Za.call(this,t,e),this.fragment&&this.fragment.rebind(t,e)},render:function(){return this.docFrag=document.createDocumentFragment(),this.update(),this.rendered=!0,this.docFrag},resolve:M.resolve,setValue:function(t){var e;void 0!==t&&t===this.value||(!(e=void 0!==t?xc(this.root,""+t,this.parentFragment):e)&&this.name&&(e=xc(this.root,this.name,this.parentFragment))&&(Aa.call(this),this.isNamed=!0),e||d(Tc,this.name,{ractive:this.root}),this.value=t,this.setTemplate(e||[]),this.bubble(),this.rendered&&A.addView(this))},setTemplate:function(t){this.fragment&&(this.fragment.unbind(),this.rendered)&&(this.fragmentToUnrender=this.fragment),this.fragment=new N({template:t,root:this.root,owner:this,pElement:this.parentFragment.pElement}),this.fragmentToRender=this.fragment},toString:function(t){var e,n,t=this.fragment.toString(t),r=this.parentFragment.items[this.index-1];return r&&1===r.type&&(r=r.text.split("\n").pop(),r=/^\s+$/.exec(r))?(e=t,(n=r[0])?e.split("\n").map(function(t,e){return e?n+t:t}).join("\n"):e):t},unbind:function(){this.isNamed||Aa.call(this),this.fragment&&this.fragment.unbind()},unrender:function(t){this.rendered&&(this.fragment&&this.fragment.unrender(t),this.rendered=!1)},update:function(){var t,e;this.fragmentToUnrender&&(this.fragmentToUnrender.unrender(!0),this.fragmentToUnrender=null),this.fragmentToRender&&(this.docFrag.appendChild(this.fragmentToRender.render()),this.fragmentToRender=null),this.rendered&&(t=this.parentFragment.getNode(),e=this.parentFragment.findNextNode(this),t.insertBefore(this.docFrag,e))}},Sc),kc=function t(e,n){var r,i=mt("components",e,n);if(i&&!(r=i.components[n])._Parent){var o=r.bind(i);if(o.isOwner=i.components.hasOwnProperty(n),!(r=o()))return void m(dt,n,"component","component",{ractive:e});(r="string"==typeof r?t(e,r):r)._fn=o,i.components[n]=r}return r};function Pc(){var t=this.instance.fragment.detach();return Cc.fire(this.instance),t}var Cc=new e("detach");function Ec(t){return this.instance.fragment.find(t)}function Oc(t,e){return this.instance.fragment.findAll(t,e)}function Mc(t,e){e._test(this,!0),this.instance.fragment&&this.instance.fragment.findAllComponents(t,e)}function Lc(t){return t&&t!==this.name?this.instance.fragment?this.instance.fragment.findComponent(t):null:this.instance}function Rc(){return this.parentFragment.findNextNode(this)}function Dc(){return this.rendered?this.instance.fragment.firstNode():null}var Nc,jc=[],Ic=["pop","push","reverse","shift","sort","splice","unshift"],Vc=(Ic.forEach(function(l){a(jc,l,{value:function(){for(var t,e,n,r,i,o,a,s=arguments.length,u=Array(s),c=0;c component has a default `el` property; it has been disregarded",r.name),a=d;a;){if(a.owner.type===Qn){s=a.owner.container;break}a=a.parent}i&&Object.keys(i).forEach(function(e){var t,n=i[e];if("string"==typeof n)t=mo(n),l[e]=t?t.value:n;else if(0===n)l[e]=!0;else{if(!g(n))throw new Error("erm wut");n=1===(t=n).length&&t[0].t===Yn?(h[e]={origin:r.root.viewmodel,keypath:void 0},function(t,e,n){var r;e.r?r=Ia(t,e.r,n):e.x?r=new za(t,t.parentFragment,e.x,n):e.rx&&(r=new $a(t,e.rx,n));return r}(r,n[0],function(t){t.isSpecial?u?o.set(e,t.value):(l[e]=t.value,delete h[e]):u?o.viewmodel.mappings[e].resolve(t):h[e].keypath=t})):new Il(r,n,function(t){u?o.set(e,t):l[e]=t}),f.push(n)}}),o=y(t.prototype),Rl(o,{el:null,append:!0,data:l,partials:n,magic:p.magic||t.defaults.magic,modifyArrays:p.modifyArrays,adapt:p.adapt},{parent:p,component:r,container:s,mappings:h,inlinePartials:c,cssIds:d.cssIds}),u=!0,r.resolvers=f}var Il=Nl;Nl.prototype={bubble:function(){this.dirty||(this.dirty=!0,A.addView(this))},update:function(){this.callback(this.fragment.getValue()),this.dirty=!1},rebind:function(t,e){this.fragment.rebind(t,e)},unbind:function(){this.fragment.unbind()}};var Vl=function(t,e){for(var n in e)e.hasOwnProperty(n)&&!function(t,n,e,r){"string"!=typeof r&&h("Components currently only support simple events - you cannot include arguments. Sorry!");t.on(e,function(){var t,e;return arguments.length&&arguments[0]&&arguments[0].node&&(t=Array.prototype.shift.call(arguments)),e=Array.prototype.slice.call(arguments),ze(n,r,{event:t,args:e}),!1})}(t.instance,t.root,n,e[n])};function Fl(t,e){var n;if(!e)throw new Error('Component "'+this.name+'" not found');n=(n=this.parentFragment=t.parentFragment).root,this.root=n,this.type=15,this.name=t.template.e,this.index=t.index,this.indexRefBindings={},this.yielders={},this.resolvers=[],jl(this,e,t.template.a,t.template.f,t.template.p),Vl(this,t.template.v),(t.template.t0||t.template.t1||t.template.t2||t.template.o)&&m('The "intro", "outro" and "decorator" directives have no effect on components',{ractive:this.instance});for(var r,i=this,o=i.root;o;)(r=o._liveComponentQueries["_"+i.name])&&r.push(i.instance),o=o.parent}function Gl(e,n){var t,r;for(r in this.resolvers.forEach(i),this.yielders)this.yielders[r][0]&&i(this.yielders[r][0]);function i(t){t.rebind(e,n)}(t=this.root._liveComponentQueries["_"+this.name])&&t._makeDirty()}function zl(){var t=this.instance;return t.render(this.parentFragment.getNode()),this.rendered=!0,t.fragment.detach()}function Yl(){return this.instance.fragment.toString()}function Ul(){var t,e,n=this.instance,r=(this.resolvers.forEach(S),this);for(t=r.root;(e=t._liveComponentQueries["_"+r.name])&&e._remove(r),t=t.parent;);n._observers.forEach(ie),n.fragment.unbind(),n.viewmodel.teardown(),n.fragment.rendered&&n.el.__ractive_instances__&&w(n.el.__ractive_instances__,n),Bl.fire(n)}var Bl=new e("teardown");function Hl(t,e){this.init(t,e)}function Wl(t){this.type=qn,this.value=t.template.c}function ql(t){this.type=Qn,this.container=e=t.parentFragment.root,this.component=n=e.component,this.container=e,this.containerFragment=t.parentFragment,this.parentFragment=n.parentFragment;var e,n,r=this.name=t.template.n||"",i=e._inlinePartials[r];i||(m('Could not find template for partial "'+r+'"',{ractive:t.root}),i=[]),this.fragment=new N({owner:this,root:e.parent,template:i,pElement:this.containerFragment.pElement}),g(n.yielders[r])?n.yielders[r].push(this):n.yielders[r]=[this],A.scheduleTask(function(){if(1"}},Xl);function Kl(t){return t.toString()}function th(t){return t.toString(!0)}function eh(t){t.unbind&&t.unbind()}function nh(t){this.init(t)}function rh(t){var e,n,r,i,o;if("object"!=typeof(t=t||{}))throw new Error("The reset method takes either no arguments, or an object containing new data");for((!(o=this.viewmodel.wrapped[""])||!o.reset||!1===o.reset(t))&&this.viewmodel.reset(t),n=la.reset(this),r=n.length;r--;)if(-1>>=5)&&(e|=32),n+=c.encode(e),0>1,1==(1&s)?-o:o),n.rest=e}},{"./base64":50}],50:[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(t){if(0<=t&&t=this._sources.size()&&!this.sourcesContent.some(function(t){return null==t})},f.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(t=v.relative(this.sourceRoot,t)),this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];var n;if(null!=this.sourceRoot&&(n=v.urlParse(this.sourceRoot))){var r=t.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},f.prototype.generatedPositionFor=function(t){var e=v.getArg(t,"source");if(null!=this.sourceRoot&&(e=v.relative(this.sourceRoot,e)),this._sources.has(e)){e={source:e=this._sources.indexOf(e),originalLine:v.getArg(t,"line"),originalColumn:v.getArg(t,"column")},t=this._findMapping(e,this._originalMappings,"originalLine","originalColumn",v.compareByOriginalPositions,v.getArg(t,"bias",o.GREATEST_LOWER_BOUND));if(0<=t){t=this._originalMappings[t];if(t.source===e.source)return{line:v.getArg(t,"generatedLine",null),column:v.getArg(t,"generatedColumn",null),lastColumn:v.getArg(t,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=f,(r.prototype=Object.create(o.prototype)).constructor=o,r.prototype._version=3,Object.defineProperty(r.prototype,"sources",{get:function(){for(var t=[],e=0;e/],r=t.split("\n"),i="",o=Math.min(e,20),a=0;a=t.length-1||(e=t.lastIndexOf(".",r-1))<=0||r-1<=e||!(n=i.list[t.slice(r+1)]))&&0<=n.indexOf(" "+t.slice(e+1,r)+" ")},is:function(t){var e,n=t.lastIndexOf(".");return!(n<=0||n>=t.length-1||0<=t.lastIndexOf(".",n-1)||!(e=i.list[t.slice(n+1)]))&&0<=e.indexOf(" "+t.slice(0,n)+" ")},get:function(t){var e,n,r=t.lastIndexOf(".");return r<=0||r>=t.length-1||(e=t.lastIndexOf(".",r-1))<=0||r-1<=e||!(n=i.list[t.slice(r+1)])||n.indexOf(" "+t.slice(e+1,r)+" ")<0?null:t.slice(e+1)},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return i})},{}],61:[function(n,r,t){!function(t,e){"use strict";"object"==typeof r&&r.exports?r.exports=e(n("./punycode"),n("./IPv6"),n("./SecondLevelDomains")):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],e):t.URI=e(t.punycode,t.IPv6,t.SecondLevelDomains,t)}(this,function(s,e,c,n){"use strict";var r=n&&n.URI;function p(t,e){var n=1<=arguments.length;if(!(this instanceof p))return n?2<=arguments.length?new p(t,e):new p(t):new p;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}p.version="1.19.11";var t=p.prototype,u=Object.prototype.hasOwnProperty;function o(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function l(t){return"Array"===a(t)}function h(t,e){var n,r,i={};if("RegExp"===a(e))i=null;else if(l(e))for(n=0,r=e.length;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,p.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},p.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,p.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,p.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},p.hostProtocols=["http","https"],p.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,p.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},p.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return p.domAttributes[e]}},p.encode=m,p.decode=decodeURIComponent,p.iso8859=function(){p.encode=escape,p.decode=unescape},p.unicode=function(){p.encode=m,p.decode=decodeURIComponent},p.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},p.encodeQuery=function(t,e){t=p.encode(t+"");return(e=void 0===e?p.escapeQuerySpace:e)?t.replace(/%20/g,"+"):t},p.decodeQuery=function(e,t){e+="",void 0===t&&(t=p.escapeQuerySpace);try{return p.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};function y(n,r){return function(e){try{return p[r](e+"").replace(p.characters[n][r].expression,function(t){return p.characters[n][r].map[t]})}catch(t){return e}}}var v,_={encode:"encode",decode:"decode"};for(v in _)p[v+"PathSegment"]=y("pathname",_[v]),p[v+"UrnPathSegment"]=y("urnpath",_[v]);function b(o,a,s){return function(t){for(var e=s?function(t){return p[a](p[s](t))}:p[a],n=(t+"").split(o),r=0,i=n.length;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=y-1,_=Math.floor,b=String.fromCharCode;function w(t){throw new RangeError(h[t])}function d(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function p(t,e){var n=t.split("@"),r="",n=(1>>10&1023|55296),t=56320|1023&t),e+=b(t)}).join("")}function S(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function T(t,e,n){var r=0;for(t=n?_(t/s):t>>1,t+=_(t/e);f*v>>1_((m-l)/o))&&w("overflow"),l+=s*o,!(s<(s=a<=f?1:f+v<=a?v:a-f));a+=y)o>_(m/(s=y-s))&&w("overflow"),o*=s;f=T(l-i,e=u.length+1,0==i),_(l/e)>m-h&&w("overflow"),h+=_(l/e),l%=e,u.splice(l++,0,h)}return g(u)}function k(t){for(var e,n,r,i,o,a,s,u,c,l,h=[],f=(t=x(t)).length,d=128,p=72,g=e=0;g_((m-e)/(u=n+1))&&w("overflow"),e+=(i-d)*u,d=i,g=0;gm&&w("overflow"),s==d){for(o=e,a=y;!(o<(c=a<=p?1:p+v<=a?v:a-p));a+=y)h.push(b(S(c+(l=o-c)%(c=y-c),0))),o=_(l/c);h.push(b(S(o,0))),p=T(e,u,n==r),e=0,++n}++e,++d}return h.join("")}if(i={version:"1.3.2",ucs2:{decode:x,encode:g},decode:A,encode:k,toASCII:function(t){return p(t,function(t){return c.test(t)?"xn--"+k(t):t})},toUnicode:function(t){return p(t,function(t){return u.test(t)?A(t.slice(4).toLowerCase()):t})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return i});else if(e&&n)if(C.exports==e)n.exports=i;else for(o in i)i.hasOwnProperty(o)&&(e[o]=i[o]);else t.punycode=i}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],63:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){var n;if(t)return"string"==typeof t?c(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nl&&(l=_.count)}}catch(t){v.e(t)}finally{v.f()}}else this._log("curve '".concat(g.curve.id,"' in terms not found")),n[g.curve.id]=null,r[g.curve.id]=null,i.push(g.curve.id),this._log("curve '".concat(g.curve.id,"' takes no name")),this._log("curve '".concat(g.curve.id,"' takes no color")),this._log("curve '".concat(g.curve.id,"' is hidding"));h.push([g.curve.id])}}catch(t){f.e(t)}finally{f.f()}this._log("".concat(l," is new max y")),e.y2=e.y=l;var w,x=G(c);try{for(x.s();!(w=x.n()).done;){var S,T=F(w.value,2),A=T[0],k=T[1],P=[],C=G(this._application.resources.entries());try{for(C.s();!(S=C.n()).done;){var E=F(S.value,1)[0],O=0;k[E]&&(O=k[E].count),P[E]=O}}catch(t){C.e(t)}finally{C.f()}h[0].push(new Date(A));var M,L=G(P.entries());try{for(L.s();!(M=L.n()).done;){var R=F(M.value,2),j=R[0],I=R[1];h[j+1].push(I)}}catch(t){L.e(t)}finally{L.f()}}}catch(t){x.e(t)}finally{x.f()}if(1===h[0].length){h[0].push(new Date);var D,N=G(this._application.resources.entries());try{for(N.s();!(D=N.n()).done;)h[F(D.value,1)[0]+1].push(0)}catch(t){N.e(t)}finally{N.f()}this._log("padded by zeros")}return this._canvas.show(),this._canvas.axis.max(e),this._canvas.data.names(n),this._canvas.data.colors(r),i.length&&(this._log("curves ".concat(i.map(function(t){return"'".concat(t,"'")}).join(", ")," will be hidden")),this._canvas.hide(i)),this._canvas.load({columns:h}),this._log("canvas rendered"),this}},{key:"toString",value:function(){return""}}])&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),V}(t.default),t=n;g(n,"NAME","Graph"),g(n,"ANIMATION_DURATION",300),g(n,"POINT_RADIUS",4),g(n,"POINT_STROKE_WIDTH",2),g(n,"X_ID","dates"),g(n,"Y_MAX",7),g(n,"log",(0,r.default)(t.NAME))},{Base:63,debug:35,"decorators/canvas":70,ractive:47}],68:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(t("debug")),o=i(t("ractive")),t=i(t("Base"));function i(t){return t&&t.__esModule?t:{default:t}}function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(t,e){var n;if(t)return"string"==typeof t?S(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(t,e){var n;if(t)return"string"==typeof t?d(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ni.MAX_NAME_CHAR_COUNT?"".concat(this._name.substr(0,i.MAX_NAME_CHAR_COUNT-1).trim(),"…"):this._name}},{key:"uriSearch",get:function(){var t=new o.default("");return t.addSearch("term",this._name.toLowerCase()),t}},{key:"confirmTemporaryName",value:function(){this._name=this._temporaryName,this._temporaryName=""}},{key:"copyTemporaryName",value:function(){this._temporaryName=this._name}},{key:"borrowResource",value:function(){this._log("borrowing resource");var t,e=h(this._application.resources);try{for(e.s();!(t=e.n()).done;){var n=t.value;if(n.isFree)return n.isFree=!1,this._resource=n,this._log("resource with '".concat(this._resource.color.id,"' color id borrowed")),this}}catch(t){e.e(t)}finally{e.f()}return this._resource={},this._log("no resource borrowed"),this}},{key:"putResourceBack",value:function(){this._log("putting resource with '".concat(this._resource.color.id,"' color id back"));var t,e=h(this._application.resources);try{for(e.s();!(t=e.n()).done;){var n=t.value;if(n===this._resource)return n.isFree=!0,this._log("resource with '".concat(this._resource.color.id,"' color id put back")),this}}catch(t){e.e(t)}finally{e.f()}return this._resource={},this._log("no resource put back"),this}},{key:"freePeriods",value:function(){return this._log("freeing periods"),this._periods.length=0,this._log("periods freed"),this}},{key:"pushPeriodData",value:function(t){var e,t=t.data,n=(this._log("pushing period data"),h(t));try{for(n.s();!(e=n.n()).done;){var r=e.value,i=new a.default({application:this._application});i.pushData(r),this._periods.push(i)}}catch(t){n.e(t)}finally{n.f()}return this._log("period data pushed"),this}},{key:"freeQueries",value:function(){return this._log("freeing queries"),this._queries.length=0,this._log("queries freed"),this}},{key:"pushQueryData",value:function(t){var e,t=t.data,n=(this._log("pushing query data"),h(t.entries()));try{for(n.s();!(e=n.n()).done;){var r=l(e.value,2),i=r[0],o=r[1],a=this._query;(a=i?new s.default({application:this._application,term:this}):a).pushData(o).pushPeriodData({data:o.trend}),i&&this._queries.push(a)}}catch(t){n.e(t)}finally{n.f()}return this._log("query data pushed"),this}},{key:"toString",value:function(){return this._name||"?"}}])&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(i.default),n=t;_(t,"NAME","Term"),_(t,"MAX_NAME_CHAR_COUNT",22),_(t,"log",(0,r.default)(n.NAME))},{Base:63,debug:35,"models/Period":81,"models/Query":82,urijs:61}]},{},[64]);