UNPKG

ag-charts-community

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

12 lines 322 kB
/**
 * ag-charts-community - Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue * @version v5.0.0
 * @link http://www.ag-grid.com/
' * @license MIT
 */

/**
 * ag-charts-community - Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue * @version v5.0.0
 * @link http://www.ag-grid.com/
' * @license MIT
 */
var t,e;t=this,e=function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},n=function(){function t(){this.allPropertyListeners=new Map,this.allEventListeners=new Map}return t.prototype.addPropertyListener=function(t,e,n){void 0===n&&(n=this);var i=this.allPropertyListeners,r=i.get(t);if(r||(r=new Map,i.set(t,r)),!r.has(e)){var o=new Set;r.set(e,o)}var a=r.get(e);a&&a.add(n)},t.prototype.removePropertyListener=function(t,e,n){void 0===n&&(n=this);var i=this.allPropertyListeners.get(t);if(i)if(e){var r=i.get(e);r&&(r.delete(n),r.size||i.delete(e))}else i.clear()},t.prototype.notifyPropertyListeners=function(t,e,n){var i=this,r=this.allPropertyListeners.get(t);r&&r.forEach((function(r,o){r.forEach((function(r){return o.call(r,{type:t,source:i,value:n,oldValue:e})}))}))},t.prototype.addEventListener=function(t,e,n){void 0===n&&(n=this);var i=this.allEventListeners,r=i.get(t);if(r||(r=new Map,i.set(t,r)),!r.has(e)){var o=new Set;r.set(e,o)}var a=r.get(e);a&&a.add(n)},t.prototype.removeEventListener=function(t,e,n){void 0===n&&(n=this);var i=this.allEventListeners.get(t);if(i)if(e){var r=i.get(e);r&&(r.delete(n),r.size||i.delete(e))}else i.clear()},t.prototype.notifyEventListeners=function(t){var e=this,n=this.allEventListeners;t.forEach((function(t){var i=n.get(t);i&&i.forEach((function(n,i){n.forEach((function(n){return i.call(n,{type:t,source:e})}))}))}))},t.prototype.fireEvent=function(t){var n=this,i=this.allEventListeners.get(t.type);i&&i.forEach((function(i,r){i.forEach((function(i){return r.call(i,e(e({},t),{source:n}))}))}))},t.privateKeyPrefix="_",t}();function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.indexOf("debugger"),function(e,i){var r=n.privateKeyPrefix+i,o=r+"Events";e[i]||(t&&(e[o]=t),Object.defineProperty(e,i,{set:function(t){var e=this[r];if(t!==e||"object"==typeof t&&null!==t){this[r]=t,this.notifyPropertyListeners(i,e,t);var n=this[o];n&&this.notifyEventListeners(n)}},get:function(){return this[r]},enumerable:!0,configurable:!0}))}}var r,o=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},s=function(t){function e(e,n,i,r){void 0===e&&(e=0),void 0===n&&(n=e),void 0===i&&(i=e),void 0===r&&(r=n);var o=t.call(this)||this;return o.top=e,o.right=n,o.bottom=i,o.left=r,o}return o(e,t),e.prototype.clear=function(){this.top=this.right=this.bottom=this.left=0},a([i("layoutChange")],e.prototype,"top",void 0),a([i("layoutChange")],e.prototype,"right",void 0),a([i("layoutChange")],e.prototype,"bottom",void 0),a([i("layoutChange")],e.prototype,"left",void 0),e}(n),h=function(){function t(t,e,n,i){this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.isValid=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.dilate=function(t){this.x-=t,this.y-=t,this.width+=2*t,this.height+=2*t},t.prototype.containsPoint=function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},t.prototype.render=function(e,n){void 0===n&&(n=t.noParams),e.save(),n.resetTransform&&e.setTransform(1,0,0,1,0,0),e.strokeStyle=n.strokeStyle||"cyan",e.lineWidth=n.lineWidth||1,e.strokeRect(this.x,this.y,this.width,this.height),n.label&&(e.fillStyle=n.fillStyle||"black",e.textBaseline="bottom",e.fillText(n.label,this.x,this.y)),e.restore()},t.noParams={},t}(),c=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},l=function(){function t(t){void 0===t&&(t=[1,0,0,1,0,0]),this.elements=t}return t.prototype.setElements=function(t){var e=this.elements;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},t.prototype.setIdentityElements=function(){var t=this.elements;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},Object.defineProperty(t.prototype,"identity",{get:function(){var t=this.elements;return 1===t[0]&&0===t[1]&&0===t[2]&&1===t[3]&&0===t[4]&&0===t[5]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.elements[0]},set:function(t){this.elements[0]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.elements[1]},set:function(t){this.elements[1]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"c",{get:function(){return this.elements[2]},set:function(t){this.elements[2]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"d",{get:function(){return this.elements[3]},set:function(t){this.elements[3]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"e",{get:function(){return this.elements[4]},set:function(t){this.elements[4]=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"f",{get:function(){return this.elements[5]},set:function(t){this.elements[5]=t},enumerable:!0,configurable:!0}),t.prototype.AxB=function(t,e,n){var i=c(t,6),r=i[0],o=i[1],a=i[2],s=i[3],h=i[4],l=i[5],u=c(e,6),f=u[0],p=u[1],d=u[2],y=u[3],g=u[4],m=u[5];(n=n||t)[0]=r*f+a*p,n[1]=o*f+s*p,n[2]=r*d+a*y,n[3]=o*d+s*y,n[4]=r*g+a*m+h,n[5]=o*g+s*m+l},t.prototype.multiplySelf=function(t){return this.AxB(this.elements,t.elements),this},t.prototype.multiply=function(e){var n=new Array(6);return this.AxB(this.elements,e.elements,n),new t(n)},t.prototype.preMultiplySelf=function(t){return this.AxB(t.elements,this.elements,this.elements),this},t.prototype.inverse=function(){var e=c(this.elements,6),n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],h=1/(n*o-i*r);return new t([o*=h,-(i*=h),-(r*=h),n*=h,r*s-o*a,i*a-n*s])},t.prototype.inverseTo=function(t){var e=c(this.elements,6),n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],h=1/(n*o-i*r);return n*=h,i*=h,r*=h,o*=h,t.setElements([o,-i,-r,n,r*s-o*a,i*a-n*s]),this},t.prototype.invertSelf=function(){var t=this.elements,e=c(t,6),n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],h=1/(n*o-i*r);return n*=h,i*=h,r*=h,o*=h,t[0]=o,t[1]=-i,t[2]=-r,t[3]=n,t[4]=r*s-o*a,t[5]=i*a-n*s,this},t.prototype.clone=function(){return new t(this.elements.slice())},t.prototype.transformPoint=function(t,e){var n=this.elements;return{x:t*n[0]+e*n[2]+n[4],y:t*n[1]+e*n[3]+n[5]}},t.prototype.transformBBox=function(t,e,n){void 0===e&&(e=0);var i,r,o=this.elements,a=o[0],s=o[1],c=o[2],l=o[3],u=.5*t.width,f=.5*t.height,p=t.x+u,d=t.y+f;if(e){u-=e,f-=e;var y=Math.sqrt(a*a+c*c),g=Math.sqrt(s*s+l*l);i=Math.abs(u*a)+Math.abs(f*c)+Math.abs(y*e),r=Math.abs(u*s)+Math.abs(f*l)+Math.abs(g*e)}else i=Math.abs(u*a)+Math.abs(f*c),r=Math.abs(u*s)+Math.abs(f*l);return n||(n=new h(0,0,0,0)),n.x=p*a+d*c+o[4]-i,n.y=p*s+d*l+o[5]-r,n.width=i+i,n.height=r+r,n},t.prototype.toContext=function(t){if(!this.identity){var e=this.elements;t.transform(e[0],e[1],e[2],e[3],e[4],e[5])}},t.flyweight=function(e){return e?e instanceof t?t.matrix.setElements(e.elements):t.matrix.setElements(e):t.matrix.setIdentityElements(),t.matrix},t.matrix=new t,t}();function u(t){var e=t.constructor,n=e.className;if(!n)throw new Error("The "+e+" is missing the 'className' property.");return n+"-"+(e.id=(e.id||0)+1)}var f,p=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a};!function(t){t[t.All=0]="All",t[t.None=1]="None"}(f||(f={}));var d=function(){function t(){this.id=u(this),this.tag=NaN,this.isContainerNode=!1,this._children=[],this.childSet={},this.matrix=new l,this.inverseMatrix=new l,this._dirtyTransform=!1,this._scalingX=1,this._scalingY=1,this._scalingCenterX=null,this._scalingCenterY=null,this._rotationCenterX=null,this._rotationCenterY=null,this._rotation=0,this._translationX=0,this._translationY=0,this._dirty=!0,this._visible=!0,this.dirtyZIndex=!1,this._zIndex=0,this.pointerEvents=f.All}return t.isNode=function(t){return!!t&&void 0!==t.matrix},t.prototype._setScene=function(t){this._scene=t;for(var e=this.children,n=e.length,i=0;i<n;i++)e[i]._setScene(t)},Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),t.prototype._setParent=function(t){this._parent=t},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),t.prototype.countChildren=function(e){if(void 0===e&&(e=t.MAX_SAFE_INTEGER),e<=0)return 0;for(var n=this.children,i=n.length,r=i,o=0;o<i;o++)r+=n[o].countChildren(e-1);return r},t.prototype.append=function(e){t.isNode(e)&&(e=[e]);for(var n=e.length,i=0;i<n;i++){var r=e[i];if(r.parent)throw new Error(r+" already belongs to another parent: "+r.parent+".");if(r.scene)throw new Error(r+" already belongs a scene: "+r.scene+".");if(this.childSet[r.id])throw new Error("Duplicate "+r.constructor.name+" node: "+r);this._children.push(r),this.childSet[r.id]=!0,r._setParent(this),r._setScene(this.scene)}this.dirty=!0},t.prototype.appendChild=function(t){if(t.parent)throw new Error(t+" already belongs to another parent: "+t.parent+".");if(t.scene)throw new Error(t+" already belongs to a scene: "+t.scene+".");if(this.childSet[t.id])throw new Error("Duplicate "+t.constructor.name+" node: "+t);return this._children.push(t),this.childSet[t.id]=!0,t._setParent(this),t._setScene(this.scene),this.dirty=!0,t},t.prototype.removeChild=function(t){if(t.parent===this){var e=this.children.indexOf(t);if(e>=0)return this._children.splice(e,1),delete this.childSet[t.id],t._setParent(),t._setScene(),this.dirty=!0,t}throw new Error("The node to be removed is not a child of this node.")},t.prototype.insertBefore=function(t,e){var n=t.parent;if(t.parent&&t.parent.removeChild(t),e&&e.parent===this){var i=this.children.indexOf(e);if(!(i>=0))throw new Error(e+" has "+n+" as the parent, but is not in its list of children.");this._children.splice(i,0,t),this.childSet[t.id]=!0,t._setParent(this),t._setScene(this.scene),this.dirty=!0}else this.append(t);return t},Object.defineProperty(t.prototype,"nextSibling",{get:function(){var t=this.parent;if(t){var e=t.children,n=e.indexOf(this);if(n>=0&&n<=e.length-1)return e[n+1]}},enumerable:!0,configurable:!0}),t.prototype.transformPoint=function(t,e){for(var n=l.flyweight(this.matrix),i=this.parent;i;)n.preMultiplySelf(i.matrix),i=i.parent;return n.invertSelf().transformPoint(t,e)},t.prototype.inverseTransformPoint=function(t,e){for(var n=l.flyweight(this.matrix),i=this.parent;i;)n.preMultiplySelf(i.matrix),i=i.parent;return n.transformPoint(t,e)},Object.defineProperty(t.prototype,"dirtyTransform",{get:function(){return this._dirtyTransform},set:function(t){this._dirtyTransform=t,t&&(this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingX",{get:function(){return this._scalingX},set:function(t){this._scalingX!==t&&(this._scalingX=t,this.dirtyTransform=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingY",{get:function(){return this._scalingY},set:function(t){this._scalingY!==t&&(this._scalingY=t,this.dirtyTransform=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingCenterX",{get:function(){return this._scalingCenterX},set:function(t){this._scalingCenterX!==t&&(this._scalingCenterX=t,this.dirtyTransform=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingCenterY",{get:function(){return this._scalingCenterY},set:function(t){this._scalingCenterY!==t&&(this._scalingCenterY=t,this.dirtyTransform=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotationCenterX",{get:function(){return this._rotationCenterX},set:function(t){this._rotationCenterX!==t&&(this._rotationCenterX=t,this.dirtyTransform=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotationCenterY",{get:function(){return this._rotationCenterY},set:function(t){this._rotationCenterY!==t&&(this._rotationCenterY=t,this.dirtyTransform=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.dirtyTransform=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotationDeg",{get:function(){return this.rotation/Math.PI*180},set:function(t){this.rotation=t/180*Math.PI},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"translationX",{get:function(){return this._translationX},set:function(t){this._translationX!==t&&(this._translationX=t,this.dirtyTransform=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"translationY",{get:function(){return this._translationY},set:function(t){this._translationY!==t&&(this._translationY=t,this.dirtyTransform=!0)},enumerable:!0,configurable:!0}),t.prototype.containsPoint=function(t,e){return!1},t.prototype.pickNode=function(t,e){if(this.visible&&this.pointerEvents!==f.None&&this.containsPoint(t,e)){var n=this.children;if(n.length)for(var i=n.length-1;i>=0;i--){var r=n[i].pickNode(t,e);if(r)return r}else if(!this.isContainerNode)return this}},t.prototype.computeBBox=function(){},t.prototype.computeBBoxCenter=function(){var t=this.computeBBox&&this.computeBBox();return t?[t.x+.5*t.width,t.y+.5*t.height]:[0,0]},t.prototype.computeTransformMatrix=function(){var t,e,n=p([0,0],2),i=n[0],r=n[1],o=this.scalingX,a=this.scalingY;1===o&&1===a?(t=0,e=0):(t=null===this.scalingCenterX?i:this.scalingCenterX,e=null===this.scalingCenterY?r:this.scalingCenterY);var s,h,c=this.rotation,l=Math.cos(c),u=Math.sin(c);0===c?(s=0,h=0):(s=null===this.rotationCenterX?i:this.rotationCenterX,h=null===this.rotationCenterY?r:this.rotationCenterY);var f=this.translationX,d=this.translationY,y=t*(1-o)-s,g=e*(1-a)-h;this.dirtyTransform=!1,this.matrix.setElements([l*o,u*o,-u*a,l*a,l*y-u*g+s+f,u*y+l*g+h+d]).inverseTo(this.inverseMatrix)},Object.defineProperty(t.prototype,"dirty",{get:function(){return this._dirty},set:function(t){this._dirty=t,t&&(this.parent?this.parent.dirty=!0:this.scene&&(this.scene.dirty=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(t){this._visible!==t&&(this._visible=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex!==t&&(this._zIndex=t,this.parent&&(this.parent.dirtyZIndex=!0),this.dirty=!0)},enumerable:!0,configurable:!0}),t.MAX_SAFE_INTEGER=Math.pow(2,53)-1,t}();function y(t,e){var n=Object.create(t);for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);return n}function g(t,e,n){var i=Array.isArray(e)?e:e.split("."),r=t;try{i.forEach((function(t){r=r[t]}))}catch(t){if(3!==arguments.length)throw t;r=n}return r}function m(t,e){return!1!==e.clone&&e.isMergeableObject(t)?O(function(t){return Array.isArray(t)?[]:{}}(t),t,e):t}function v(t,e,n){return t.concat(e).map((function(t){return m(t,n)}))}function b(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function x(t,e){try{return e in t}catch(t){return!1}}function _(t,e,n){var i={};return n.isMergeableObject(t)&&b(t).forEach((function(e){i[e]=m(t[e],n)})),b(e).forEach((function(r){(function(t,e){return x(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,r)||(x(t,r)&&n.isMergeableObject(e[r])?i[r]=function(t,e){if(!e.customMerge)return O;var n=e.customMerge(t);return"function"==typeof n?n:O}(r,n)(t[r],e[r],n):i[r]=m(e[r],n))})),i}function w(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e}(t)}function O(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||v,n.isMergeableObject=n.isMergeableObject||w,n.cloneUnlessOtherwiseSpecified=m;var i=Array.isArray(e);return i===Array.isArray(t)?i?n.arrayMerge(t,e,n):_(t,e,n):m(e,n)}function k(t){return"object"==typeof t&&!Array.isArray(t)}var S=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),P=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.lastInstanceId=0,n._fillOpacity=1,n._strokeOpacity=1,n._fill=e.defaultStyles.fill,n._stroke=e.defaultStyles.stroke,n._strokeWidth=e.defaultStyles.strokeWidth,n._lineDash=e.defaultStyles.lineDash,n._lineDashOffset=e.defaultStyles.lineDashOffset,n._lineCap=e.defaultStyles.lineCap,n._lineJoin=e.defaultStyles.lineJoin,n._opacity=e.defaultStyles.opacity,n.onShadowChange=function(){n.dirty=!0},n._fillShadow=e.defaultStyles.fillShadow,n._strokeShadow=e.defaultStyles.strokeShadow,n}return S(e,t),e.createInstance=function(t){var e=Object.create(t);return e._setParent(void 0),e.id=t.id+"-Instance-"+String(++t.lastInstanceId),e},e.prototype.restoreOwnStyles=function(){for(var t=this.constructor.defaultStyles,e=Object.getOwnPropertyNames(t),n=0,i=e.length;n<i;n++){var r=e[n];this[r]=t[r]}},e.prototype.restoreAllStyles=function(){var t=this.constructor.defaultStyles;for(var e in t)this[e]=t[e]},e.prototype.restoreOverriddenStyles=function(){var t=this.constructor.defaultStyles,e=Object.getPrototypeOf(t);for(var n in t)t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(this[n]=t[n])},Object.defineProperty(e.prototype,"fillOpacity",{get:function(){return this._fillOpacity},set:function(t){this._fillOpacity!==t&&(this._fillOpacity=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeOpacity",{get:function(){return this._strokeOpacity},set:function(t){this._strokeOpacity!==t&&(this._strokeOpacity=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this._fill},set:function(t){this._fill!==t&&(this._fill=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stroke",{get:function(){return this._stroke},set:function(t){this._stroke!==t&&(this._stroke=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(t){this._strokeWidth!==t&&(this._strokeWidth=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return Math.floor(this.strokeWidth)%2/2},enumerable:!0,configurable:!0}),e.prototype.align=function(t,e,n){return null!=n?Math.floor(n)+Math.floor(e%1+n%1):Math.floor(e)+t},Object.defineProperty(e.prototype,"lineDash",{get:function(){return this._lineDash},set:function(t){var e=this._lineDash;if(e!==t){if(e&&t&&e.length===t.length){for(var n=!0,i=t.length,r=0;r<i;r++)if(e[r]!==t[r]){n=!1;break}if(n)return}this._lineDash=t,this.dirty=!0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineDashOffset",{get:function(){return this._lineDashOffset},set:function(t){this._lineDashOffset!==t&&(this._lineDashOffset=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineCap",{get:function(){return this._lineCap},set:function(t){this._lineCap!==t&&(this._lineCap=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opacity",{get:function(){return this._opacity},set:function(t){t=Math.min(1,Math.max(0,t)),this._opacity!==t&&(this._opacity=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fillShadow",{get:function(){return this._fillShadow},set:function(t){var e=this._fillShadow;e!==t&&(e&&e.removeEventListener("change",this.onShadowChange),t&&t.addEventListener("change",this.onShadowChange),this._fillShadow=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeShadow",{get:function(){return this._strokeShadow},set:function(t){var e=this._strokeShadow;e!==t&&(e&&e.removeEventListener("change",this.onShadowChange),t&&t.addEventListener("change",this.onShadowChange),this._strokeShadow=t,this.dirty=!0)},enumerable:!0,configurable:!0}),e.prototype.fillStroke=function(t){if(this.scene){var e=this.scene.canvas.pixelRatio||1,n=t.globalAlpha;if(this.fill){t.fillStyle=this.fill,t.globalAlpha=n*this.opacity*this.fillOpacity;var i=this.fillShadow;i&&i.enabled&&(t.shadowColor=i.color,t.shadowOffsetX=i.xOffset*e,t.shadowOffsetY=i.yOffset*e,t.shadowBlur=i.blur*e),t.fill()}if(t.shadowColor="rgba(0, 0, 0, 0)",this.stroke&&this.strokeWidth){t.strokeStyle=this.stroke,t.globalAlpha=n*this.opacity*this.strokeOpacity,t.lineWidth=this.strokeWidth,this.lineDash&&t.setLineDash(this.lineDash),this.lineDashOffset&&(t.lineDashOffset=this.lineDashOffset),this.lineCap&&(t.lineCap=this.lineCap),this.lineJoin&&(t.lineJoin=this.lineJoin);var r=this.strokeShadow;r&&r.enabled&&(t.shadowColor=r.color,t.shadowOffsetX=r.xOffset*e,t.shadowOffsetY=r.yOffset*e,t.shadowBlur=r.blur*e),t.stroke()}}},e.prototype.containsPoint=function(t,e){return this.isPointInPath(t,e)},e.defaultStyles=y({},{fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0,strokeShadow:void 0}),e}(d),D=function(){function t(t,e,n){void 0===t&&(t=window.document),void 0===e&&(e=600),void 0===n&&(n=300),this._container=void 0,this._pixelRatio=NaN,this._width=0,this._height=0,this.document=t,this.element=t.createElement("canvas"),this.context=this.element.getContext("2d"),this.element.style.userSelect="none",this.element.style.display="block",this.setPixelRatio(),this.resize(e,n)}return Object.defineProperty(t.prototype,"container",{get:function(){return this._container},set:function(t){this._container!==t&&(this.remove(),t&&t.appendChild(this.element),this._container=t)},enumerable:!0,configurable:!0}),t.prototype.remove=function(){var t=this.element.parentNode;null!=t&&t.removeChild(this.element)},t.prototype.destroy=function(){this.element.remove(),this._canvas=void 0,Object.freeze(this)},t.prototype.toImage=function(){var t=this.document.createElement("img");return t.src=this.getDataURL(),t},t.prototype.getDataURL=function(t){return this.element.toDataURL(t)},t.prototype.download=function(t){t=((t||"").trim()||"image")+".png";var e=this.getDataURL("image/png"),n=this.document,i=n.createElement("a");i.href=e,i.download=t,i.style.display="none",n.body.appendChild(i),i.click(),n.body.removeChild(i)},Object.defineProperty(t.prototype,"pixelRatio",{get:function(){return this._pixelRatio},enumerable:!0,configurable:!0}),t.prototype.setPixelRatio=function(e){var n=e||window.devicePixelRatio;n!==this.pixelRatio&&(t.overrideScale(this.context,n),this._pixelRatio=n,this.resize(this.width,this.height))},Object.defineProperty(t.prototype,"pixelated",{get:function(){return"pixelated"===this.element.style.imageRendering},set:function(t){this.element.style.imageRendering=t?"pixelated":"auto"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.resize=function(t,e){if(t>0&&e>0){var n=this.element,i=this.context,r=this.pixelRatio;n.width=Math.round(t*r),n.height=Math.round(e*r),n.style.width=t+"px",n.style.height=e+"px",i.resetTransform(),this._width=t,this._height=e}},Object.defineProperty(t,"textMeasuringContext",{get:function(){if(this._textMeasuringContext)return this._textMeasuringContext;var t=document.createElement("canvas");return this._textMeasuringContext=t.getContext("2d")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"svgText",{get:function(){if(this._svgText)return this._svgText;var t="http://www.w3.org/2000/svg",e=document.createElementNS(t,"svg");e.setAttribute("width","100"),e.setAttribute("height","100"),e.classList?e.classList.add("text-measuring-svg"):e.setAttribute("class","text-measuring-svg"),e.style.position="absolute",e.style.top="-1000px",e.style.visibility="hidden";var n=document.createElementNS(t,"text");return n.setAttribute("x","0"),n.setAttribute("y","30"),n.setAttribute("text","black"),e.appendChild(n),document.body.appendChild(e),this._svgText=n,n},enumerable:!0,configurable:!0}),Object.defineProperty(t,"has",{get:function(){if(this._has)return this._has;var t=navigator.userAgent.indexOf("Chrome")>-1,e=navigator.userAgent.indexOf("Firefox")>-1,n=!t&&navigator.userAgent.indexOf("Safari")>-1;return this._has=Object.freeze({textMetrics:void 0!==this.textMeasuringContext.measureText("test").actualBoundingBoxDescent&&!e&&!n,getTransform:void 0!==this.textMeasuringContext.getTransform})},enumerable:!0,configurable:!0}),t.measureText=function(t,e,n,i){var r=this.textMeasuringContext;return r.font=e,r.textBaseline=n,r.textAlign=i,r.measureText(t)},t.getTextSize=function(t,e){if(this.has.textMetrics){var n=this.textMeasuringContext;n.font=e;var i=n.measureText(t);return{width:i.width,height:i.actualBoundingBoxAscent+i.actualBoundingBoxDescent}}return this.measureSvgText(t,e)},t.measureSvgText=function(t,e){var n=this.textSizeCache,i=n[e];if(i){var r=i[t];if(r)return r}else n[e]={};var o=this.svgText;o.style.font=e,o.textContent=t;var a=o.getBBox(),s={width:a.width,height:a.height};return n[e][t]=s,s},t.overrideScale=function(t,e){var n=0,i={save:function(){this.$save(),n++},restore:function(){n>0&&(this.$restore(),n--)},setTransform:function(t,n,i,r,o,a){this.$setTransform(t*e,n*e,i*e,r*e,o*e,a*e)},resetTransform:function(){this.$setTransform(e,0,0,e,0,0),this.save(),n=0}};for(var r in i)i.hasOwnProperty(r)&&(t["$"+r]||(t["$"+r]=t[r]),t[r]=i[r])},t.textSizeCache={},t}(),C=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),M=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n._x=0,n._y=0,n.lineBreakRegex=/\r?\n/g,n.lines=[],n._text="",n._dirtyFont=!0,n._fontSize=10,n._fontFamily="sans-serif",n._textAlign=e.defaultStyles.textAlign,n._textBaseline=e.defaultStyles.textBaseline,n._lineHeight=14,n}return C(e,t),Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.dirty=!0)},enumerable:!0,configurable:!0}),e.prototype.splitText=function(){this.lines=this._text.split(this.lineBreakRegex)},Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){var e=String(t);this._text!==e&&(this._text=e,this.splitText(),this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.dirtyFont&&(this.dirtyFont=!1,this._font=A(this.fontSize,this.fontFamily,this.fontStyle,this.fontWeight)),this._font},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirtyFont",{get:function(){return this._dirtyFont},set:function(t){this._dirtyFont!==t&&(this._dirtyFont=t,t&&(this.dirty=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.dirtyFont=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.dirtyFont=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){isFinite(t)||(t=10),this._fontSize!==t&&(this._fontSize=t,this.dirtyFont=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this._fontFamily!==t&&(this._fontFamily=t,this.dirtyFont=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textAlign",{get:function(){return this._textAlign},set:function(t){this._textAlign!==t&&(this._textAlign=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.dirty=!0)},enumerable:!0,configurable:!0}),e.prototype.computeBBox=function(){return D.has.textMetrics?this.getPreciseBBox():this.getApproximateBBox()},e.prototype.getPreciseBBox=function(){var t=D.measureText(this.text,this.font,this.textBaseline,this.textAlign);return new h(this.x-t.actualBoundingBoxLeft,this.y-t.actualBoundingBoxAscent,t.width,t.actualBoundingBoxAscent+t.actualBoundingBoxDescent)},e.prototype.getApproximateBBox=function(){var t=D.getTextSize(this.text,this.font),e=this.x,n=this.y;switch(this.textAlign){case"end":case"right":e-=t.width;break;case"center":e-=t.width/2}switch(this.textBaseline){case"alphabetic":n-=.7*t.height;break;case"middle":n-=.45*t.height;break;case"ideographic":n-=t.height;break;case"hanging":n-=.2*t.height;break;case"bottom":n-=t.height}return new h(e,n,t.width,t.height)},e.prototype.isPointInPath=function(t,e){var n=this.transformPoint(t,e),i=this.computeBBox();return!!i&&i.containsPoint(n.x,n.y)},e.prototype.isPointInStroke=function(t,e){return!1},e.prototype.render=function(t){if(this.lines.length&&this.scene){this.dirtyTransform&&this.computeTransformMatrix(),this.matrix.toContext(t);var e=this.fill,n=this.stroke,i=this.strokeWidth;t.font=this.font,t.textAlign=this.textAlign,t.textBaseline=this.textBaseline;var r=this.scene.canvas.pixelRatio||1,o=t.globalAlpha;if(e){t.fillStyle=e,t.globalAlpha=o*this.opacity*this.fillOpacity;var a=this.fillShadow,s=this.text,h=this.x,c=this.y;a&&a.enabled&&(t.shadowColor=a.color,t.shadowOffsetX=a.xOffset*r,t.shadowOffsetY=a.yOffset*r,t.shadowBlur=a.blur*r),t.fillText(s,h,c)}if(n&&i){t.strokeStyle=n,t.lineWidth=i,t.globalAlpha=o*this.opacity*this.strokeOpacity;var l=this,u=l.lineDash,f=l.lineDashOffset,p=l.lineCap,d=l.lineJoin,y=l.strokeShadow;s=l.text,h=l.x,c=l.y,u&&t.setLineDash(u),f&&(t.lineDashOffset=f),p&&(t.lineCap=p),d&&(t.lineJoin=d),y&&y.enabled&&(t.shadowColor=y.color,t.shadowOffsetX=y.xOffset*r,t.shadowOffsetY=y.yOffset*r,t.shadowBlur=y.blur*r),t.strokeText(s,h,c)}this.dirty=!1}},e.className="Text",e.defaultStyles=y(P.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"}),e}(P);function A(t,e,n,i){return[n||"",i||"",t+"px",e].join(" ").trim()}var j=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),T=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},L=function(t){function e(){var e=t.call(this)||this;e.node=new M,e.enabled=!1,e.padding=new s(10);var n=e.node;return n.textAlign="center",n.textBaseline="top",n.pointerEvents=f.None,e}return j(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this.node.text},set:function(t){this.node.text!==t&&(this.node.text=t,this.fireEvent({type:"change"}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontStyle",{get:function(){return this.node.fontStyle},set:function(t){this.node.fontStyle!==t&&(this.node.fontStyle=t,this.fireEvent({type:"change"}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontWeight",{get:function(){return this.node.fontWeight},set:function(t){this.node.fontWeight!==t&&(this.node.fontWeight=t,this.fireEvent({type:"change"}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this.node.fontSize},set:function(t){this.node.fontSize!==t&&(this.node.fontSize=t,this.fireEvent({type:"change"}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this.node.fontFamily},set:function(t){this.node.fontFamily!==t&&(this.node.fontFamily=t,this.fireEvent({type:"change"}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.node.fill},set:function(t){this.node.fill!==t&&(this.node.fill=t,this.fireEvent({type:"change"}))},enumerable:!0,configurable:!0}),T([i("change")],e.prototype,"enabled",void 0),T([i("change")],e.prototype,"padding",void 0),e}(n),F=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function N(t,e,n){var i=W(t,e,n);return function(t,e,n){void 0===n&&(n=1);for(var i=Math.abs(n),r=i>0&&i<1?Math.abs(Math.floor(Math.log(i)/Math.LN10)):0,o=Math.pow(10,r),a=Math.max(0,Math.ceil((e-t)/n))||0,s=new K(r),h=0;h<a;h++){var c=t+n*h;s[h]=Math.round(c*o)/o}return s}(t=Math.ceil(t/i)*i,e=Math.floor(e/i)*i+i/2,i)}var E=Math.sqrt(50),z=Math.sqrt(10),B=Math.sqrt(2);function W(t,e,n){var i=Math.abs(e-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=E?r*=10:o>=z?r*=5:o>=B&&(r*=2),e<t?-r:r}function I(t,e,n){var i=(e-t)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=E?10:o>=z?5:o>=B?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=E?10:o>=z?5:o>=B?2:1)}var K=function(t){function e(e,n){var i=t.call(this)||this;if(n)for(var r=0,o=n.length;r<o;r++)i[r]=n[r];return i.fractionDigits=e,i}return F(e,t),e}(Array);function R(t,e){var n=Math.floor(t[0]),i=t[1],r=function(t,e,n){return function(t){var e=Math.floor(Math.log10(t)),n=Math.pow(10,e),i=t/n*10;return i>0&&i<=1?n/10:i>1&&i<=2?2*n/10:i>1&&i<=5?5*n/10:i>5&&i<=10?10*n/10:i>10&&i<=20?20*n/10:i>20&&i<=40?40*n/10:i>40&&i<=50?50*n/10:i>50&&i<=100?100*n/10:i}((e-t)/(n-1))}(n=function(t,e,n){var i=Math.abs(e-t)/(n-1),r=Math.floor(Math.log10(i)),o=Math.pow(10,r);return Math.floor(t/o)*o}(n,i,e),i,e);return[[n,i=n+(e-1)*r],function(t,e,n){for(var i=Math.floor(Math.log10(e)),r=e>0&&e<1?Math.abs(i):0,o=Math.pow(10,r),a=new K(r),s=0;s<n;s++){var h=t+e*s;a[s]=Math.round(h*o)/o}return a}(n,r,e)]}function Y(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var X=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},H=function(){function t(t,e,n,i){void 0===i&&(i=1),this.r=Math.min(1,Math.max(0,t||0)),this.g=Math.min(1,Math.max(0,e||0)),this.b=Math.min(1,Math.max(0,n||0)),this.a=Math.min(1,Math.max(0,i||0))}return t.fromString=function(e){if(e.indexOf("#")>=0)return t.fromHexString(e);var n=t.nameToHex[e];if(n)return t.fromHexString(n);if(e.indexOf("rgb")>=0)return t.fromRgbaString(e);throw new Error("Invalid color string: '"+e+"'")},t.parseHex=function(t){var e;switch((t=t.replace(/ /g,"").slice(1)).length){case 6:case 8:e=[];for(var n=0;n<t.length;n+=2)e.push(parseInt(""+t[n]+t[n+1],16));break;case 3:case 4:e=t.split("").map((function(t){return parseInt(t,16)})).map((function(t){return t+16*t}))}if(e.length>=3&&e.every((function(t){return t>=0})))return 3===e.length&&e.push(255),e},t.fromHexString=function(e){var n=t.parseHex(e);if(n){var i=X(n,4);return new t(i[0]/255,i[1]/255,i[2]/255,i[3]/255)}throw new Error("Malformed hexadecimal color string: '"+e+"'")},t.stringToRgba=function(t){for(var e=X([NaN,NaN],2),n=e[0],i=e[1],r=0;r<t.length;r++){var o=t[r];if(n||"("!==o){if(")"===o){i=r;break}}else n=r}var a=n&&i&&t.substring(n+1,i);if(a){var s=a.split(","),h=[];for(r=0;r<s.length;r++){var c=s[r],l=parseFloat(c);if(isNaN(l))return;c.indexOf("%")>=0?(l=Math.max(0,Math.min(100,l)),l/=100):3===r?l=Math.max(0,Math.min(1,l)):(l=Math.max(0,Math.min(255,l)),l/=255),h.push(l)}return h}},t.fromRgbaString=function(e){var n=t.stringToRgba(e);if(n){if(3===n.length)return new t(n[0],n[1],n[2]);if(4===n.length)return new t(n[0],n[1],n[2],n[3])}throw new Error("Malformed rgb/rgba color string: '"+e+"'")},t.fromArray=function(e){if(4===e.length)return new t(e[0],e[1],e[2],e[3]);if(3===e.length)return new t(e[0],e[1],e[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")},t.fromHSB=function(e,n,i,r){void 0===r&&(r=1);var o=t.HSBtoRGB(e,n,i);return new t(o[0],o[1],o[2],r)},t.padHex=function(t){return 1===t.length?"0"+t:t},t.prototype.toHexString=function(){var e="#"+t.padHex(Math.round(255*this.r).toString(16))+t.padHex(Math.round(255*this.g).toString(16))+t.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(e+=t.padHex(Math.round(255*this.a).toString(16))),e},t.prototype.toRgbaString=function(t){void 0===t&&(t=3);var e=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],n=Math.pow(10,t);return 1!==this.a?(e.push(Math.round(this.a*n)/n),"rgba("+e.join(", ")+")"):"rgb("+e.join(", ")+")"},t.prototype.toString=function(){return 1===this.a?this.toHexString():this.toRgbaString()},t.prototype.toHSB=function(){return t.RGBtoHSB(this.r,this.g,this.b)},t.RGBtoHSB=function(t,e,n){var i=Math.min(t,e,n),r=Math.max(t,e,n),o=NaN;if(i!==r){var a=r-i,s=(r-t)/a,h=(r-e)/a,c=(r-n)/a;o=t===r?c-h:e===r?2+s-c:4+h-s,(o/=6)<0&&(o+=1)}return[360*o,0!==r?(r-i)/r:0,r]},t.HSBtoRGB=function(t,e,n){isNaN(t)&&(t=0),t=(t%360+360)%360/360;var i=0,r=0,o=0;if(0===e)i=r=o=n;else{var a=6*(t-Math.floor(t)),s=a-Math.floor(a),h=n*(1-e),c=n*(1-e*s),l=n*(1-e*(1-s));switch(a>>0){case 0:i=n,r=l,o=h;break;case 1:i=c,r=n,o=h;break;case 2:i=h,r=n,o=l;break;case 3:i=h,r=c,o=n;break;case 4:i=l,r=h,o=n;break;case 5:i=n,r=h,o=c}}return[i,r,o]},t.prototype.derive=function(e,n,i,r){var o=t.RGBtoHSB(this.r,this.g,this.b),a=o[2];0==a&&i>1&&(a=.05);var s=((o[0]+e)%360+360)%360,h=Math.max(Math.min(o[1]*n,1),0);a=Math.max(Math.min(a*i,1),0);var c=Math.max(Math.min(this.a*r,1),0),l=t.HSBtoRGB(s,h,a);return l.push(c),t.fromArray(l)},t.prototype.brighter=function(){return this.derive(0,1,1/.7,1)},t.prototype.darker=function(){return this.derive(0,1,.7,1)},t.nameToHex=Object.freeze({aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"}),t}();function U(t,e){if("string"==typeof t)try{t=H.fromString(t)}catch(e){t=H.fromArray([0,0,0])}if("string"==typeof e)try{e=H.fromString(e)}catch(t){e=H.fromArray([0,0,0])}var n=Y(t.r,e.r),i=Y(t.g,e.g),r=Y(t.b,e.b),o=Y(t.a,e.a);return function(t){return H.fromArray([n(t),i(t),r(t),o(t)]).toRgbaString()}}function G(t,e){var n,i=typeof e;if(null==e||"boolean"===i)return n=e,function(){return n};if("number"===i)return Y(t,e);if("string"===i)try{return U(t,e=H.fromString(e))}catch(t){}return e instanceof H?U(t,e):e instanceof Date?function(t,e){var n=new Date,i=+t,r=+e;return function(t){return n.setTime(i*(1-t)+r*t),n}}(t,e):Array.isArray(e)?function(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,o=new Array(r),a=new Array(i);for(n=0;n<r;++n)o[n]=G(t[n],e[n]);for(;n<i;++n)a[n]=e[n];return function(t){for(n=0;n<r;++n)a[n]=o[n](t);return a}}(t,e):"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?function(t,e){var n,i={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=G(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}(t,e):Y(t,e)}function V(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function q(t,e,n,i,r){void 0===i&&(i=0),void 0===r&&(r=t.length);for(var o=function(t){return function(e,n){return V(t(e),n)}}(n);i<r;){var a=i+r>>>1;o(t[a],e)<0?i=a+1:r=a}return i}var Z=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},J=function(t){return t};function $(t){var e,n=t[0],i=t[t.length-1];return n>i&&(e=Z([i,n],2),n=e[0],i=e[1]),function(t){return Math.max(n,Math.min(i,t))}}var Q,tt,et,nt,it=function(){function t(){this.unknown=void 0,this.clamper=$,this._clamp=J,this._domain=[0,1],this._range=[0,1],this.transform=J,this.untransform=J,this._interpolate=G,this.rescale()}return Object.defineProperty(t.prototype,"clamp",{get:function(){return this._clamp!==J},set:function(t){this._clamp=t?this.clamper(this.domain):J},enumerable:!0,configurable:!0}),t.prototype.setDomain=function(t){this._domain=Array.prototype.map.call(t,(function(t){return+t})),this._clamp!==J&&(this._clamp=this.clamper(this.domain)),this.rescale()},t.prototype.getDomain=function(){return this._domain.slice()},Object.defineProperty(t.prototype,"domain",{get:function(){return this.getDomain()},set:function(t){this.setDomain(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"range",{get:function(){return this._range.slice()},set:function(t){this._range=Array.prototype.slice.call(t),this.rescale()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"interpolate",{get:function(){return this._interpolate},set:function(t){this._interpolate=t,this.rescale()},enumerable:!0,configurable:!0}),t.prototype.rescale=function(){Math.min(this.domain.length,this.range.length)>2?this.piecewise=this.polymap:this.piecewise=this.bimap,this.output=void 0,this.input=void 0},t.prototype.normalize=function(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n},t.prototype.bimap=function(t,e,n){var i,r,o=t[0],a=t[1],s=e[0],h=e[1];return a<o?(i=this.normalize(a,o),r=n(h,s)):(i=this.normalize(o,a),r=n(s,h)),function(t){return r(i(t))}},t.prototype.polymap=function(t,e,n){var i=this,r=Math.min(t.length,e.length)-1;t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());var o=Array.from({length:r},(function(e,n){return i.normalize(t[n],t[n+1])})),a=Array.from({length:r},(function(t,i){return n(e[i],e[i+1])}));return function(e){var n=function(t,e,n,i,r){for(void 0===i&&(i=0),void 0===r&&(r=t.length);i<r;){var o=i+r>>>1;n(t[o],e)>0?r=o:i=o+1}return i}(t,e,V,1,r)-1;return a[n](o[n](e))}},t.prototype.convert=function(t,e){if(t=+t,isNaN(t))return this.unknown;this.output||(this.output=this.piecewise(this.domain.map(this.transform),this.range,this.interpolate));var n=e?e(this.domain):this._clamp;return this.output(this.transform(n(t)))},t.prototype.invert=function(t){return this.input||(this.input=this.piecewise(this.range,this.domain.map(this.transform),Y)),this._clamp(this.untransform(this.input(t)))},t}(),rt={"":function(t,e){var n=t.toPrecision(e);t:for(var i=n.length,r=1,o=-1,a=0;r<i;++r)switch(n[r]){case".":o=a=r;break;case"0":0===o&&(o=r),a=r;break;case"e":break t;default:o>0&&(o=0)}return o>0?n.slice(0,o)+n.slice(a+1):n},"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return String(t)},d:function(t){return Math.abs(t=Math.round(t))>=1e21?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 ut(100*t,e)},r:ut,s:function(t,e){void 0===e&&(e=0);var n=ft(t,e);if(!n)return String(t);var i=n[0],r=n[1];Q=3*Math.max(-8,Math.min(8,Math.floor(r/3)));var o=r-Q+1,a=i.length;if(o===a)return i;if(o>a)return i+new Array(o-a+1).join("0");if(o>0)return i.slice(0,o)+"."+i.slice(o);var s=ft(t,Math.max(0,e+o-1));return"0."+new Array(1-o).join("0")+s[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},ot=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"],at=function t(e){e instanceof t?(this.fill=e.fill,this.align=e.align,this.sign=e.sign,this.symbol=e.symbol,this.zero=e.zero,this.width=e.width,this.comma=e.comma,this.precision=e.precision,this.trim=e.trim,this.type=e.type,this.string=e.string):(this.fill=void 0===e.fill?" ":String(e.fill),this.align=void 0===e.align?">":String(e.align),this.sign=void 0===e.sign?"-":String(e.sign),this.symbol=void 0===e.symbol?"":String(e.symbol),this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":String(e.type),this.string=e.string)},st=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,ht=/(#\{(.*?)\})/g;function ct(t){if(t instanceof at)return new at(t);var e=!1,n=t.replace(ht,(function(){return e||(t=arguments[2],e=!0),"#{}"})),i=st.exec(t);if(!i)throw new Error("Invalid format: "+t);return new at({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10],string:e?n:void 0})}function lt(t,e,n,i){var r,o=W(t,e,n),a=ct(null==i?",f":i);switch(a.type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=a.precision||isNaN(r=function(t,e){var n=Math.floor(dt(e)/3);return n=Math.min(8,n),n=Math.max(-8,n),Math.max(0,3*n-dt(Math.abs(t)))}(o,s))||(a.precision=r),nt(a,s);case"":case"e":case"g":case"p":case"r":null!=a.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,dt(e)-dt(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(a.precision=r-+("e"===a.type));break;case"f":case"%":null!=a.precision||isNaN(r=function(t){return Math.max(0,-dt(Math.abs(t)))}(o))||(a.precision=r-2*+("%"===a.type))}return et(a)}function ut(t,e){var n=ft(t,e);if(!n)return String(t);var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}function ft(t,e){var n=e?t.toExponential(e-1):t.toExponential(),i=n.indexOf("e");if(!(i<0)){var r=n.slice(0,i);return[r.length>1?r[0]+r.slice(2):r,+n.slice(i+1)]}}function pt(t){return t}function dt(t){var e=ft(Math.abs(t));return e?e[1]:NaN}tt=function(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?pt:(e=Array.prototype.map.call(t.grouping,Number),n=String(t.thousands),function(t,i){for(var r=[],o=t.length,a=0,s=e[0],h=0;o>0&&s>0&&(h+s+1>i&&(s=Math.max(1,i-h)),r.push(t.substring(o-=s,o+s)),!((h+=s+1)>i));)s=e[a=(a+1)%e.length];return r.reverse().join(n)}),r=void 0===t.currency?"":String(t.currency[0]),o=void 0===t.currency?"":String(t.currency[1]),a=void 0===t.decimal?".":String(t.decimal),s=void 0===t.numerals?pt:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Array.prototype.map.call(t.numerals,String)),h=void 0===t.percent?"%":String(t.percent),c=void 0===t.minus?"\u2212":String(t.minus),l=void 0===t.nan?"NaN":String(t.nan);function u(t){var e=ct(t),n=e.fill,u=e.align,f=e.sign,p=e.symbol,d=e.zero,y=e.width,g=e.comma,m=e.precision,v=e.trim,b=e.type;"n"===b?(g=!0,b="g"):rt[b]||(void 0===m&&(m=12),v=!0,b="g"),(d||"0"===n&&"="===u)&&(d=!0,n="0",u="=");var x="$"===p?r:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",_="$"===p?o:/[%p]/.test(b)?h:"",w=rt[b],O=/[defgprs%]/.test(b);return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),function(t){var r,o=x,h=_;if("c"===b)h=w(+t)+h,r="";else{var p=+t,k=t<0||1/p<0;if(r=isNaN(p)?l:w(Math.abs(p),m),v&&(r=function(t){t:for(var e=t.length,n=1,i=-1,r=0;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":0===i&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(r+1):t}(r)),k&&0==+r&&"+"!==f&&(k=!1),o=(k?"("===f?f:c:"-"===f||"("===f?"":f)+o,h=("s"===b?ot[8+Q/3]:"")+h+(k&&"("===f?")":""),O)for(var S=0,P=r.length;S<P;S++){var D=r.charCodeAt(S);if(48>D||D>57){h=(46===D?a+r.slice(S+1):r.slice(S))+h,r=r.slice(0,S);break}}}g&&!d&&(r=i(r,1/0));var C=o.length+r.length+h.length,M=C<y?new Array(y-C+1).join(n):"";switch(g&&d&&(r=i(M+r,M.length?y-h.length:1/0),M=""),u){case"<":r=o+r+h+M;break;case"=":r=o+M+r+h;break;case"^":r=M.slice(0,C=M.length>>1)+o+r+h+M.slice(C);break;default:r=M+o+r+h}var A=e.string;return A?A.replace(ht,(function(){return s(r)})):s(r)}}return{format:u,formatPrefix:function(t,e){var n=ct(t);n.type="f";var i=u(n),r=3*Math.max(-8,Math.min(8,Math.floor(dt(e)/3))),o=Math.pow(10,-r),a=ot[8+r/3];return function(t){return i(o*+t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),et=tt.format,nt=tt.formatPrefix;var yt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e}return yt(e,t),e.prototype.ticks=function(t){void 0===t&&(t=10);var e=this._domain;return N(e[0],e[e.length-1],t)},e.prototype.nice=function(t){void 0===t&&(t=10);var e,n=this.domain,i=0,r=n.length-1,o=n[i],a=n[r];a<o&&(e=o,o=a,a=e,e=i,i=r,r=e),(e=I(o,a,t))>0?e=I(o=Math.floor(o/e)*e,a=Math.ceil(a/e)*e,t):e<0&&(e=I(o=Math.ceil(o*e)/e,a=Math.floor(a*e)/e,t)),e>0?(n[i]=Math.floor(o/e)*e,n[r]=Math.ceil(a/e)*e,this.domain=n):e<0&&(n[i]=Math.ceil(o*e)/e,n[r]=Math.floor(a*e)/e,this.domain=n)},e.prototype.tickFormat=function(t,e){var n=this.domain;return lt(n[0],n[n.length-1],null==t?10:t,e)},e}(it),mt=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function vt(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(e(i,n,t))return i}}function bt(t){return t}function xt(t,e,n){for(var i,r,o,a=n||bt,s=t.length,h=-1;++h<s;)if(e(i=t[h]))for(r=o=i;++h<s;)e(i=t[h])&&(r>i&&(r=i),o<i&&(o=i));return void 0===r||void 0===o?void 0:[a(r),a(o)]}function _t(t){var e,n,i=0,r=0;try{for(var o=mt(t),a=o.next();!a.done;a=o.next()){var s=a.value;s<0?i+=s:r+=s}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return{min:i,max:r}}function wt(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length);var i=[],r=t.length;if(r)for(var o=0;o<n;o++)i.push(t[(e+o)%r]);return i}function Ot(t){var e=typeof t;return"string"!==e&&"number"===e&&t-t<1}function kt(t){return Ot(t)||function(t){return!!t&&t.hasOwnProperty("valueOf")&&Ot(t.valueOf())}(t)}function St(t){return"string"==typeof t}function Pt(t){return St(t)||function(t){return!!t&&t.hasOwnProperty("toString")&&St(t.toString())}(t)}function Dt(t){return kt(t)||function(t){return t instanceof Date&&!isNaN(+t)}(t)}var Ct=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Mt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContainerNode=!0,e._opacity=1,e}return Ct(e,t),Object.defineProperty(e.prototype,"opacity",{get:function(){return this._opacity},set:function(t){t=Math.min(1,Math.max(0,t)),this._opacity!==t&&(this._opacity=t,this.dirty=!0)},enumerable:!0,configurable:!0}),e.prototype.containsPoint=function(t,e){return!0},e.prototype.computeBBox=function(){var t=1/0,n=-1/0,i=1/0,r=-1/0;return this.dirtyTransform&&this.computeTransformMatrix(),this.children.forEach((function(o){if(o.visible){var a=o.computeBBox();if(a){if(!(o instanceof e)){o.dirtyTransform&&o.computeTransformMatrix();for(var s=l.flyweight(o.matrix),h=o.parent;h;)s.preMultiplySelf(h.matrix),h=h.parent;s.transformBBox(a,0,a)}var c=a.x,u=a.y;c<t&&(t=c),u<i&&(i=u),c+a.width>n&&(n=c+a.width),u+a.height>r&&(r=u+a.height)}}})),new h(t,i,n-t,r-i)},e.prototype.render=function(t){this.dirtyTransform&&this.computeTransformMatrix(),this.matrix.toContext(t);var e=this.children,n=e.length;t.globalAlpha*=this.opacity,this.dirtyZIndex&&(this.dirtyZIndex=!1,e.sort((function(t,e){return t.zIndex-e.zIndex})));for(var i=0;i<n;i++){var r=e[i];r.visible&&(t.save(),r.render(t),t.restore())}},e.className="Group",e}(d),At=function(){function t(t,e){this.next=null,this.scene=t.scene,this.parent=t,this.datum=e}return t.prototype.appendChild=function(t){if(null===this.next)return this.parent.insertBefore(t,null);if(!d.isNode(this.next))throw new Error(this.next+" is not a Node.");return this.parent.insertBefore(t,this.next)},t.prototype.insertBefore=function(t,e){return this.parent.insertBefore(t,e)},t}(),jt=function(){function t(t,e){this.groups=t,this.parents=e}return t.select=function(e){return new t([["function"==typeof e?e():e]],[void 0])},t.selectAll=function(e){return new t([null==e?[]:e],[void 0])},t.prototype.append=function(t){return this.select((function(e){return e.appendChild(new t)}))},t.prototype.appendFn=function(t){return this.select((function(e,n,i,r){return e.appendChild(t(e,n,i,r))}))},t.prototype.select=function(e){for(var n=this.groups,i=n.length,r=[],o=0;o<i;o++)for(var a=n[o],s=a.length,h=r[o]=new Array(s),c=0;c<s;c++){var l=a[c];if(l){var u=e(l,l.datum,c,a);u&&(u.datum=l.datum),h[c]=u}}return new t(r,this.parents)},t.prototype.selectByClass=function(t){return this.select((function(e){if(d.isNode(e))for(var n=e.children,i=n.length,r=0;r<i;r++){var o=n[r];if(o instanceof t)return o}}))},t.prototype.selectByTag=function(t){return this.select((function(e){if(d.isNode(e))for(var n=e.children,i=n.length,r=0;r<i;r++){var o=n[r];if(o.tag===t)return o}}))},t.prototype.selectAllByClass=function(t){return this.selectAll((function(e){var n=[];if(d.isNode(e))for(var i=e.children,r=i.length,o=0;o<r;o++){var a=i[o];a instanceof t&&n.push(a)}return n}))},t.prototype.selectAllByTag=function(t){return this.selectAll((function(e){var n=[];if(d.isNode(e))for(var i=e.children,r=i.length,o=0;o<r;o++){var a=i[o];a.tag===t&&n.push(a)}return n}))},t.prototype.selectNone=function(){return[]},t.prototype.selectAll=function(e){e||(e=this.selectNone);for(var n=[],i=[],r=this.groups,o=r.length,a=0;a<o;a++)for(var s=r[a],h=s.length,c=0;c<h;c++){var l=s[c];l&&(n.push(e(l,l.datum,c,s)),i.push(l))}return new t(n,i)},t.prototype.each=function(t){for(var e=this.groups,n=e.length,i=0;i<n;i++)for(var r=e[i],o=r.length,a=0;a<o;a++){var s=r[a];s&&t(s,s.datum,a,r)}return this},t.prototype.remove=function(){return this.each((function(t){if(d.isNode(t)){var e=t.parent;e&&e.removeChild(t)}}))},t.prototype.merge=function(e){for(var n=this.groups,i=e.groups,r=n.length,o=i.length,a=Math.min(r,o),s=new Array(r),h=0;h<a;h++)for(var c=n[h],l=i[h],u=c.length,f=s[h]=new Array(u),p=0;p<u;p++){var d=c[p]||l[p];f[p]=d||void 0}for(;h<r;h++)s[h]=n[h];return new t(s,this.parents)},t.prototype.node=function(){for(var t=this.groups,e=t.length,n=0;n<e;n++)for(var i=t[n],r=i.length,o=0;o<r;o++){var a=i[o];if(a)return a}return null},t.prototype.attr=function(t,e){return this.each((function(n){n[t]=e})),this},t.prototype.attrFn=function(t,e){return this.each((function(n,i,r,o){n[t]=e(n,i,r,o)})),this},t.prototype.call=function(t){return t(this),this},Object.defineProperty(t.prototype,"size",{get:function(){var t=0;return this.each((function(){return t++})),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){var t=[];return this.each((function(e,n){return t.push(n)})),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enter",{get:function(){return new t(this.enterGroups?this.enterGroups:[[]],this.parents)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"exit",{get:function(){return new t(this.exitGroups?this.exitGroups:[[]],this.parents)},enumerable:!0,configurable:!0}),t.prototype.setDatum=function(t){return this.each((function(e){e.datum=t}))},Object.defineProperty(t.prototype,"datum",{get:function(){var t=this.node();return t?t.datum:null},enumerable:!0,configurable:!0}),t.prototype.setData=function(e,n){if("function"!=typeof e){var i=e;e=function(){return i}}for(var r=this.groups,o=this.parents,a=r.length,s=new Array(a),h=new Array(a),c=new Array(a),l=0;l<a;l++){var u=r[l],f=o[l];if(!f)throw new Error("Group #"+l+" has no parent: "+u);var p=u.length,d=e(f,f.datum,l,o),y=d.length,g=h[l]=new Array(y),m=s[l]=new Array(y),v=c[l]=new Array(p);n?this.bindKey(f,u,g,m,v,d,n):this.bindIndex(f,u,g,m,v,d);for(var b=0,x=0;b<y;b++){var _=g[b];if(_){b>=x&&(x=b+1);for(var w=void 0;!(w=m[x])&&x<y;)x++;_.next=w||null}}}var O=new t(s,o);return O.enterGroups=h,O.exitGroups=c,O},t.prototype.bindIndex=function(t,e,n,i,r,o){for(var a=e.length,s=o.length,h=0;h<s;h++)(c=e[h])?(c.datum=o[h],i[h]=c):n[h]=new At(t,o[h]);for(;h<a;h++){var c;(c=e[h])&&(r[h]=c)}},t.prototype.bindKey=function(e,n,i,r,o,a,s){for(var h=n.length,c=a.length,l=new Array(h),u={},f=0;f<h;f++)(d=n[f])&&((p=l[f]=t.keyPrefix+s(d,d.datum,f,n))in u?o[f]=d:u[p]=d);for(f=0;f<c;f++){var p;(d=u[p=t.keyPrefix+s(e,a[f],f,a)])?(r[f]=d,d.datum=a[f],u[p]=void 0):i[f]=new At(e,a[f])}for(f=0;f<h;f++){var d;(d=n[f])&&u[l[f]]===d&&(o[f]=d)}},t.keyPrefix="$",t}(),Tt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Lt=function(t){function e(){var e=t.call(this)||this;return e._x1=0,e._y1=0,e._x2=0,e._y2=0,e.restoreOwnStyles(),e}return Tt(e,t),Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1!==t&&(this._x1=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1!==t&&(this._y1=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2!==t&&(this._x2=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2!==t&&(this._y2=t,this.dirty=!0)},enumerable:!0,configurable:!0}),e.prototype.computeBBox=function(){return new h(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)},e.prototype.isPointInPath=function(t,e){return!1},e.prototype.isPointInStroke=function(t,e){return!1},e.prototype.render=function(t){this.dirtyTransform&&this.computeTransformMatrix(),this.matrix.toContext(t);var e=this.x1,n=this.y1,i=this.x2,r=this.y2;if(e===i){var o=Math.round(e)+Math.floor(this.strokeWidth)%2/2;e=o,i=o}else if(n===r){var a=Math.round(n)+Math.floor(this.strokeWidth)%2/2;n=a,r=a}t.beginPath(),t.moveTo(e,n),t.lineTo(i,r),this.fillStroke(t),this.dirty=!1},e.className="Line",e.defaultStyles=y(P.defaultStyles,{fill:void 0,strokeWidth:1}),e}(P),Ft=Math.sign?Math.sign:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1};function Nt(t,e,n,i){if(0===t)return function(t,e,n){if(0===t)return function(t,e){var n=-e/t;return 0!==t&&n>=0&&n<=1?[n]:[]}(e,n);var i=e*e-4*t*n,r=[];if(0===i){var o=-e/(2*t);o>=0&&o<=1&&r.push(o)}else if(i>0){var a=Math.sqrt(i),s=(-e-a)/(2*t),h=(-e+a)/(2*t);s>=0&&s<=1&&r.push(s),h>=0&&h<=1&&r.push(h)}return r}(e,n,i);var r=e/t,o=n/t,a=(3*o-r*r)/9,s=(9*r*o-i/t*27-2*r*r*r)/54,h=a*a*a+s*s,c=[];if(h>=0){var l=Math.sqrt(h),u=Ft(s+l)*Math.pow(Math.abs(s+l),1/3),f=Ft(s-l)*Math.pow(Math.abs(s-l),1/3),p=Math.abs(Math.sqrt(3)*(u-f)/2),d=-1/3*r+(u+f);if(d>=0&&d<=1&&c.push(d),0===p){var y=-1/3*r-(u+f)/2;y>=0&&y<=1&&c.push(y)}}else{var g=Math.acos(s/Math.sqrt(-a*a*a)),m=1/3*r,v=2*Math.sqrt(-a),b=v*Math.cos(1/3*g)-m,x=v*Math.cos(1/3*(g+2*Math.PI))-m,_=v*Math.cos(1/3*(g+4*Math.PI))-m;b>=0&&b<=1&&c.push(b),x>=0&&x<=1&&c.push(x),_>=0&&_<=1&&c.push(_)}return c}function Et(t,e,n,i,r,o,a,s){var h=(n-t)*(s-o)-(i-e)*(a-r);if(0===h)return null;var c=((a-r)*(e-o)-(t-r)*(s-o))/h,l=((n-t)*(e-o)-(i-e)*(t-r))/h;return c>=0&&c<=1&&l>=0&&l<=1?{x:t+c*(n-t),y:e+c*(i-e)}:null}function zt(t,e,n,i,r,o,a,s,h,c,l,u){for(var f=[],p=c-u,d=l-h,y=h*(u-c)-c*(l-h),g=Bt(t,n,r,a),m=Bt(e,i,o,s),v=Nt(p*g[0]+d*m[0],p*g[1]+d*m[1],p*g[2]+d*m[2],p*g[3]+d*m[3]+y),b=0;b<v.length;b++){var x=v[b],_=x*x,w=x*_,O=g[0]*w+g[1]*_+g[2]*x+g[3],k=m[0]*w+m[1]*_+m[2]*x+m[3],S=void 0;(S=h!==l?(O-h)/(l-h):(k-c)/(u-c))>=0&&S<=1&&f.push({x:O,y:k})}return f}function Bt(t,e,n,i){return[3*e-t-3*n+i,3*t-6*e+3*n,-3*t+3*e,t]}var Wt=function(){function t(){this.commands=[],this.params=[],this._closedPath=!1}return t.prototype.draw=function(t){var e=this.commands,n=this.params,i=e.length,r=0;t.beginPath();for(var o=0;o<i;o++)switch(e[o]){case"M":t.moveTo(n[r++],n[r++]);break;case"L":t.lineTo(n[r++],n[r++]);break;case"C":t.bezierCurveTo(n[r++],n[r++],n[r++],n[r++],n[r++],n[r++]);break;case"Z":t.closePath()}},t.prototype.moveTo=function(t,e){this.xy?(this.xy[0]=t,this.xy[1]=e):this.xy=[t,e],this.commands.push("M"),this.params.push(t,e)},t.prototype.lineTo=function(t,e){this.xy?(this.commands.push("L"),this.params.push(t,e),this.xy[0]=t,this.xy[1]=e):this.moveTo(t,e)},t.prototype.rect=function(t,e,n,i){this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.closePath()},t.prototype.arcTo=function(t,e,n,i,r,o,a){var s=this.xy;if(s){t<0&&(t=-t),e<0&&(e=-e);var h=s[0],c=s[1],l=(h-o)/2,u=(c-a)/2,f=Math.sin(n),p=Math.cos(n),d=p*l+f*u,y=-f*l+p*u,g=d/t,m=y/e,v=g*g+m*m,b=(h+o)/2,x=(c+a)/2,_=0,w=0;v>=1?(t*=v=Math.sqrt(v),e*=v):(v=Math.sqrt(1/v-1),i===r&&(v=-v),b+=p*(_=v*t*m)-f*(w=-v*e*g),x+=f*_+p*w);var O=Math.atan2((y-w)/e,(d-_)/t),k=Math.atan2((-y-w)/e,(-d-_)/t)-O;this.cubicArc(b,x,t,e,n,O,O+k,1-r)}},t.cubicArc=function(t,e,n,i,r,o,a,s,h,c){if(c){var l=s;s=h,h=l}var u=e.length,f=.5522847498307935,p=Math.sin(s),d=Math.cos(s),y=Math.sin(a),g=Math.cos(a),m=Math.PI/2,v=g*d*r-y*p*o,b=y*d*r+g*p*o,x=-g*p*r-y*d*o,_=-y*p*r+g*d*o;for((h-=s)<0&&(h+=2*Math.PI),t.push("M"),e.push(v+n,b+i);h>=m;){h-=m,t.push("C");var w=x+n;e.push(v+x*f+n,b+_*f+i,v*f+x+n,b*f+_+i,Math.abs(w)<1e-8?0:w,_+i),l=v,v=x,x=-l,l=b,b=_,_=-l}if(h){var O=4/3*Math.tan(h/4),k=Math.sin(h),S=Math.cos(h),P=S+O*k,D=k-O*S;t.push("C"),w=v*S+x*k+n,e.push(v+x*O+n,b+_*O+i,v*P+x*D+n,b*P+_*D+i,Math.abs(w)<1e-8?0:w,b*S+_*k+i)}if(c)for(var C=u,M=e.length-2;C<M;C+=2,M-=2)l=e[C],e[C]=e[M],e[M]=l,l=e[C+1],e[C+1]=e[M+1],e[M+1]=l},t.prototype.cubicArc=function(e,n,i,r,o,a,s,h){var c=this.commands,l=this.params,u=c.length;t.cubicArc(c,l,e,n,i,r,o,a,s,h);var f=l[l.length-2],p=l[l.length-1];this.xy?(c[u]="L",this.xy[0]=f,this.xy[1]=p):this.xy=[f,p]},t.prototype.deCasteljau=function(t,e){var n=t.length;if(n<2||n%2==1)throw new Error("Fewer than two points or not an even count.");if(2===n||0===e)return t.slice(0,2);if(1===e)return t.slice(-2);for(var i=[],r=n-2,o=0;o<r;o+=2)i.push((1-e)*t[o]+e*t[o+2],(1-e)*t[o+1]+e*t[o+3]);return this.deCasteljau(i,e)},t.prototype.approximateCurve=function(t,e){var n=this.deCasteljau(t,0);this.moveTo(n[0],n[1]);for(var i=1/e,r=i;r<=1;r+=i){var o=this.deCasteljau(t,r);this.lineTo(o[0],o[1])}},t.prototype.quadraticCurveTo=function(t,e,n,i){this.xy||this.moveTo(t,e),this.cubicCurveTo((this.xy[0]+2*t)/3,(this.xy[1]+2*e)/3,(2*t+n)/3,(2*e+i)/3,n,i)},t.prototype.cubicCurveTo=function(t,e,n,i,r,o){this.xy||this.moveTo(t,e),this.commands.push("C"),this.params.push(t,e,n,i,r,o),this.xy[0]=r,this.xy[1]=o},Object.defineProperty(t.prototype,"closedPath",{get:function(){return this._closedPath},enumerable:!0,configurable:!0}),t.prototype.closePath=function(){this.xy&&(this.xy=void 0,this.commands.push("Z"),this._closedPath=!0)},t.prototype.clear=function(){this.commands.length=0,this.params.length=0,this.xy=void 0,this._closedPath=!1},t.prototype.isPointInPath=function(t,e){for(var n=this.commands,i=this.params,r=n.length,o=-1e4,a=-1e4,s=NaN,h=NaN,c=0,l=0,u=0,f=0,p=0;f<r;f++)switch(n[f]){case"M":isNaN(s)||Et(s,h,c,l,o,a,t,e)&&u++,s=c=i[p++],h=l=i[p++];break;case"L":Et(c,l,c=i[p++],l=i[p++],o,a,t,e)&&u++;break;case"C":u+=zt(c,l,i[p++],i[p++],i[p++],i[p++],c=i[p++],l=i[p++],o,a,t,e).length;break;case"Z":isNaN(s)||Et(s,h,c,l,o,a,t,e)&&u++}return u%2==1},t.fromString=function(e){var n=new t;return n.setFromString(e),n},t.parseSvgPath=function(e){return e.trim().split(t.splitCommandsRe).map((function(e){var n=e.match(t.matchParamsRe);return{command:e.substr(0,1),params:n?n.map(parseFloat):[]}}))},t.prettifySvgPath=function(e){return t.parseSvgPath(e).map((function(t){return t.command+t.params.join(",")})).join("\n")},t.prototype.setFromString=function(e){var n,i,r,o,a,s=this;function h(){a.match(t.quadraticCommandRe)||(r=n,o=i)}function c(){a.match(t.cubicCommandRe)||(r=n,o=i)}this.clear(),t.parseSvgPath(e).forEach((function(t){var e=t.params,l=e.length,u=0;switch(t.command){case"M":for(s.moveTo(n=e[u++],i=e[u++]);u<l;)s.lineTo(n=e[u++],i=e[u++]);break;case"m":for(s.moveTo(n+=e[u++],i+=e[u++]);u<l;)s.lineTo(n+=e[u++],i+=e[u++]);break;case"L":for(;u<l;)s.lineTo(n=e[u++],i=e[u++]);break;case"l":for(;u<l;)s.lineTo(n+=e[u++],i+=e[u++]);break;case"C":for(;u<l;)s.cubicCurveTo(e[u++],e[u++],r=e[u++],o=e[u++],n=e[u++],i=e[u++]);break;case"c":for(;u<l;)s.cubicCurveTo(n+e[u++],i+e[u++],r=n+e[u++],o=i+e[u++],n+=e[u++],i+=e[u++]);break;case"S":for(c();u<l;)s.cubicCurveTo(n+n-r,i+i-o,r=e[u++],o=e[u++],n=e[u++],i=e[u++]);break;case"s":for(c();u<l;)s.cubicCurveTo(n+n-r,i+i-o,r=n+e[u++],o=i+e[u++],n+=e[u++],i+=e[u++]);break;case"Q":for(;u<l;)s.quadraticCurveTo(r=e[u++],o=e[u++],n=e[u++],i=e[u++]);break;case"q":for(;u<l;)s.quadraticCurveTo(r=n+e[u++],o=i+e[u++],n+=e[u++],i+=e[u++]);break;case"T":for(h();u<l;)s.quadraticCurveTo(r=n+n-r,o=i+i-o,n=e[u++],i=e[u++]);break;case"t":for(h();u<l;)s.quadraticCurveTo(r=n+n-r,o=i+i-o,n+=e[u++],i+=e[u++]);break;case"A":for(;u<l;)s.arcTo(e[u++],e[u++],e[u++]*Math.PI/180,e[u++],e[u++],n=e[u++],i=e[u++]);break;case"a":for(;u<l;)s.arcTo(e[u++],e[u++],e[u++]*Math.PI/180,e[u++],e[u++],n+=e[u++],i+=e[u++]);break;case"Z":case"z":s.closePath();break;case"H":for(;u<l;)s.lineTo(n=e[u++],i);break;case"h":for(;u<l;)s.lineTo(n+=e[u++],i);break;case"V":for(;u<l;)s.lineTo(n,i=e[u++]);break;case"v":for(;u<l;)s.lineTo(n,i+=e[u++])}a=t.command}))},t.prototype.toString=function(){for(var t=this.commands,e=this.params,n=t.length,i=[],r=0,o=0;r<n;r++)switch(t[r]){case"M":i.push("M"+e[o++]+","+e[o++]);break;case"L":i.push("L"+e[o++]+","+e[o++]);break;case"C":i.push("C"+e[o++]+","+e[o++]+" "+e[o++]+","+e[o++]+" "+e[o++]+","+e[o++]);break;case"Z":i.push("Z")}return i.join("")},t.prototype.toPrettyString=function(){return t.prettifySvgPath(this.toString())},t.prototype.toSvg=function(){return t.xmlDeclaration+'\n<svg width="100%" height="100%" viewBox="0 0 50 50" version="1.1" xmlns="'+t.xmlns+'">\n    <path d="'+this.toString()+'" style="fill:none;stroke:#000;stroke-width:0.5;"/>\n</svg>'},t.prototype.toDebugSvg=function(){var e=t.prettifySvgPath(this.toString());return t.xmlDeclaration+'\n<svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="'+t.xmlns+'">\n    <path d="'+e+'" style="fill:none;stroke:#000;stroke-width:0.5;"/>\n</svg>'},t.prototype.toCubicPaths=function(){var t,e,n,i,r,o=[],a=this.params,s=0;return this.commands.forEach((function(h){switch(h){case"M":t=[e=i=a[s++],n=r=a[s++]],o.push(t);break;case"L":var c=a[s++],l=a[s++];t.push((i+i+c)/3,(r+r+l)/3,(i+c+c)/3,(r+l+l)/3,i=c,r=l);break;case"C":t.push(a[s++],a[s++],a[s++],a[s++],i=a[s++],r=a[s++]);break;case"Z":t.push((i+i+e)/3,(r+r+n)/3,(i+e+e)/3,(r+n+n)/3,i=e,r=n)}})),o},t.cubicPathToString=function(t){var e=t.length;if(!(e%2==0&&(e/2-1)/2>=1))throw new Error("Invalid path.");return"M"+t.slice(0,2).join(",")+"C"+t.slice(2).join(",")},t.splitCommandsRe=/(?=[AaCcHhLlMmQqSsTtVvZz])/g,t.matchParamsRe=/-?[0-9]*\.?\d+/g,t.quadraticCommandRe=/[QqTt]/,t.cubicCommandRe=/[CcSs]/,t.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>',t.xmlns="http://www.w3.org/2000/svg",t}(),It=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Kt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.path=new Wt,e._dirtyPath=!0,e._svgPath="",e}return It(e,t),Object.defineProperty(e.prototype,"dirtyPath",{get:function(){return this._dirtyPath},set:function(t){this._dirtyPath!==t&&(this._dirtyPath=t,t&&(this.dirty=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"svgPath",{get:function(){return this._svgPath},set:function(t){this._svgPath!==t&&(this._svgPath=t,this.path.setFromString(t),this.dirty=!0)},enumerable:!0,configurable:!0}),e.prototype.isPointInPath=function(t,e){var n=this.transformPoint(t,e);return this.path.closedPath&&this.path.isPointInPath(n.x,n.y)},e.prototype.isPointInStroke=function(t,e){return!1},e.prototype.updatePath=function(){},e.prototype.render=function(t){this.dirtyTransform&&this.computeTransformMatrix(),this.matrix.toContext(t),this.dirtyPath&&(this.updatePath(),this.dirtyPath=!1),this.path.draw(t),this.fillStroke(t),this.dirty=!1},e.className="Path",e}(P),Rt=2*Math.PI;function Yt(t){return t%=Rt,t+=Rt,t%=Rt}function Xt(t){return t%=Rt,(t+=Rt)!==Rt&&(t%=Rt),t}function Ht(t){return(t%=Rt)<-Math.PI?t+=Rt:t>=Math.PI&&(t-=Rt),t}function Ut(t){return t/180*Math.PI}function Gt(t,e,n){return void 0===n&&(n=1e-10),Math.abs(t-e)<n}function Vt(t,e){void 0===e&&(e=2);var n=Math.floor(Math.log(Math.abs(t))/Math.LN10);return n>=0||!isFinite(n)?t.toFixed(e):t.toFixed(Math.abs(n)-1+e)}var qt,Zt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();(qt=t.ArcType||(t.ArcType={}))[qt.Open=0]="Open",qt[qt.Chord=1]="Chord",qt[qt.Round=2]="Round";var Jt,$t=function(e){function n(){var n=e.call(this)||this;return n._centerX=0,n._centerY=0,n._radiusX=10,n._radiusY=10,n._startAngle=0,n._endAngle=2*Math.PI,n._counterClockwise=!1,n._type=t.ArcType.Open,n.restoreOwnStyles(),n}return Zt(n,e),Object.defineProperty(n.prototype,"centerX",{get:function(){return this._centerX},set:function(t){this._centerX!==t&&(this._centerX=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"centerY",{get:function(){return this._centerY},set:function(t){this._centerY!==t&&(this._centerY=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"radiusX",{get:function(){return this._radiusX},set:function(t){this._radiusX!==t&&(this._radiusX=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"radiusY",{get:function(){return this._radiusY},set:function(t){this._radiusY!==t&&(this._radiusY=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){this._startAngle!==t&&(this._startAngle=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"endAngle",{get:function(){return this._endAngle},set:function(t){this._endAngle!==t&&(this._endAngle=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fullPie",{get:function(){return Gt(Yt(this.startAngle),Yt(this.endAngle))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"counterClockwise",{get:function(){return this._counterClockwise},set:function(t){this._counterClockwise!==t&&(this._counterClockwise=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this._type},set:function(t){this._type!==t&&(this._type=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),n.prototype.updatePath=function(){var e=this.path;e.clear(),e.cubicArc(this.centerX,this.centerY,this.radiusX,this.radiusY,0,this.startAngle,this.endAngle,this.counterClockwise?1:0),this.type===t.ArcType.Chord?e.closePath():this.type!==t.ArcType.Round||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())},n.prototype.computeBBox=function(){return new h(this.centerX-this.radiusX,this.centerY-this.radiusY,2*this.radiusX,2*this.radiusY)},n.prototype.isPointInPath=function(e,n){var i=this.transformPoint(e,n),r=this.computeBBox();return this.type!==t.ArcType.Open&&r.containsPoint(i.x,i.y)&&this.path.isPointInPath(i.x,i.y)},n.className="Arc",n.defaultStyles=y(P.defaultStyles,{lineWidth:1,fillStyle:null}),n}(Kt),Qt=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a};!function(t){t[t.Tick=0]="Tick",t[t.GridLine=1]="GridLine"}(Jt||(Jt={}));var te,ee,ne=function(){this.width=1,this.size=6,this.color="rgba(195, 195, 195, 1)",this.count=10},ie=function(){function t(){this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)",this.rotation=0,this.mirrored=!1,this.parallel=!1,this.formatter=void 0,this.onFormatChange=void 0}return Object.defineProperty(t.prototype,"format",{get:function(){return this._format},set:function(t){this._format!==t&&(this._format=t,this.onFormatChange&&this.onFormatChange(t))},enumerable:!0,configurable:!0}),t}(),re=function(){function t(t){this.id=u(this),this.lineNode=new Lt,this.group=new Mt,this.line={width:1,color:"rgba(195, 195, 195, 1)"},this.tick=new ne,this.label=new ie,this.translation={x:0,y:0},this.rotation=0,this.requestedRange=[0,1],this._visibleRange=[0,1],this._title=void 0,this._gridLength=0,this.gridStyle=[{stroke:"rgba(219, 219, 219, 1)",lineDash:[4,2]}],this._radialGrid=!1,this.fractionDigits=0,this.thickness=0,this.scale=t,this.groupSelection=jt.select(this.group).selectAll(),this.label.onFormatChange=this.onLabelFormatChange.bind(this),this.group.append(this.lineNode)}return Object.defineProperty(t.prototype,"scale",{get:function(){return this._scale},set:function(t){this._scale=t,this.requestedRange=t.range.slice(),this.onLabelFormatChange()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ticks",{get:function(){return this._ticks},set:function(t){this._ticks=t},enumerable:!0,configurable:!0}),t.prototype.getMeta=function(){},t.prototype.updateRange=function(){var t=this.requestedRange,e=this.visibleRange,n=this.scale,i=(t[1]-t[0])/(e[1]-e[0]),r=i*e[0],o=t[0]-r;n.range=[o,o+i]},t.prototype.inRange=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),0===this.inRangeEx(t,e,n)},t.prototype.inRangeEx=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0);var i=this.range,r=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);return t+e<r-n?-1:t>o+n?1:0},Object.defineProperty(t.prototype,"range",{get:function(){return this.requestedRange.slice()},set:function(t){this.requestedRange=t.slice(),this.updateRange()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visibleRange",{get:function(){return this._visibleRange.slice()},set:function(t){if(t&&2===t.length){var e=Qt(t,2),n=e[0],i=e[1];n=Math.max(0,n),i=Math.min(1,i),n=Math.min(n,i),i=Math.max(n,i),this._visibleRange=[n,i],this.updateRange()}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"domain",{get:function(){return this.scale.domain.slice()},set:function(t){this.scale.domain=t.slice(),this.onLabelFormatChange(this.label.format)},enumerable:!0,configurable:!0}),t.prototype.onLabelFormatChange=function(t){if(t&&this.scale&&this.scale.tickFormat)try{this.labelFormatter=this.scale.tickFormat(this.tick.count,t)}catch(t){this.labelFormatter=void 0,console.error(t)}else this.labelFormatter=void 0},Object.defineProperty(t.prototype,"title",{get:function(){return this._title},set:function(t){var e=this._title;e!==t&&(e&&this.group.removeChild(e.node),t&&(t.node.rotation=-Math.PI/2,this.group.appendChild(t.node)),this._title=t,this.positionTitle())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridLength",{get:function(){return this._gridLength},set:function(t){(this._gridLength&&!t||!this._gridLength&&t)&&(this.groupSelection=this.groupSelection.remove().setData([])),this._gridLength=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"radialGrid",{get:function(){return this._radialGrid},set:function(t){this._radialGrid!==t&&(this._radialGrid=t,this.groupSelection=this.groupSelection.remove().setData([]))},enumerable:!0,configurable:!0}),t.prototype.update=function(){var t=this,e=this,n=e.group,i=e.scale,r=e.tick,o=e.label,a=e.gridStyle,s=e.requestedRange,h=Math.min(s[0],s[1]),c=Math.max(s[0],s[1]),l=Ut(this.rotation),u=o.parallel,f=Yt(Ut(o.rotation));n.translationX=this.translation.x,n.translationY=this.translation.y,n.rotation=l;var p=(i.bandwidth||0)/2,d=o.mirrored?1:-1,y=Yt(l),g=!f&&y>=0&&y<=Math.PI?-1:1,m=Yt(l-Math.PI/2),v=!f&&m>=0&&m<=Math.PI?-1:1,b=f>=0&&f<=Math.PI?-1:1,x=this.ticks||i.ticks(this.tick.count),_=this.groupSelection.setData(x);_.exit.remove();var w=_.enter.append(Mt);w.append(Lt).each((function(t){return t.tag=Jt.Tick})),this.gridLength&&(this.radialGrid?w.append($t).each((function(t){return t.tag=Jt.GridLine})):w.append(Lt).each((function(t){return t.tag=Jt.GridLine}))),w.append(M);var O=_.merge(w);if(O.attrFn("translationY",(function(t,e){return Math.round(i.convert(e)+p)})).attrFn("visible",(function(t){var e=Math.floor(h),n=Math.ceil(c);return t.translationY>=e&&t.translationY<=n})),O.selectByTag(Jt.Tick).each((function(t){t.strokeWidth=r.width,t.stroke=r.color})).attr("x1",d*r.size).attr("x2",0).attr("y1",0).attr("y2",0),this.gridLength&&a.length){var k=a.length,S=void 0;if(this.radialGrid){var P=Xt(Ut(this.gridLength));S=O.selectByTag(Jt.GridLine).each((function(t,e){var n=Math.round(i.convert(e)+p);t.centerX=0,t.centerY=i.range[0]-n,t.endAngle=P,t.radiusX=n,t.radiusY=n}))}else S=O.selectByTag(Jt.GridLine).each((function(e){e.x1=0,e.x2=-d*t.gridLength,e.y1=0,e.y2=0,e.visible=Math.abs(e.parent.translationY-i.range[0])>1}));S.each((function(t,e,n){var i=a[n%k];t.stroke=i.stroke,t.strokeWidth=r.width,t.lineDash=i.lineDash,t.fill=void 0}))}this.fractionDigits=x.fractionDigits>=0?x.fractionDigits:0;var D=O.selectByClass(M).each((function(e,n,i){e.fontStyle=o.fontStyle,e.fontWeight=o.fontWeight,e.fontSize=o.fontSize,e.fontFamily=o.fontFamily,e.fill=o.color,e.textBaseline=u&&!f?d*g==-1?"hanging":"bottom":"middle",e.text=t.formatTickDatum(n,i),e.textAlign=u?f?d*b==-1?"end":"start":"center":d*v==-1?"end":"start"})),C=d*(r.size+o.padding),A=u?g*Math.PI/2:-1===v?Math.PI:0;D.each((function(t){t.x=C,t.rotationCenterX=C,t.rotation=A+f})),this.groupSelection=O;var j=this.lineNode;j.x1=0,j.x2=0,j.y1=s[0],j.y2=s[1],j.strokeWidth=this.line.width,j.stroke=this.line.color,j.visible=x.length>0,this.positionTitle()},t.prototype.positionTitle=function(){var t=this.title,e=this.lineNode;if(t){var n=!1;if(t.enabled&&e.visible){n=!0;var i=this.label,r=this.rotation,o=this.requestedRange,a=i.mirrored?1:-1,s=Yt(r),h=t.padding.bottom,c=t.node,l=this.computeBBox({excludeTitle:!0}),u=-1===a&&s>Math.PI&&s<2*Math.PI?-1:1;c.rotation=u*a*Math.PI/2,c.x=u*a*(o[0]+o[1])/2,c.y=-1===a?u*(-h-l.width+Math.max(l.x+l.width,0)):-h-l.width-Math.min(l.x,0),c.textBaseline=1===u?"bottom":"top"}t.node.visible=n}},t.prototype.formatTickDatum=function(t,e){var n=this.label,i=this.labelFormatter,r=this.fractionDigits,o=this.getMeta();return n.formatter?n.formatter({value:r>=0?t:String(t),index:e,fractionDigits:r,formatter:i,axis:o}):i?i(t):"number"==typeof t&&r>=0?t.toFixed(r):String(t)},t.prototype.formatDatum=function(t){return String(t)},t.prototype.computeBBox=function(t){var e=this.title,n=this.lineNode,i=this.groupSelection.selectByClass(M),r=1/0,o=-1/0,a=1/0,s=-1/0;if(i.each((function(t){t.computeTransformMatrix();var e=l.flyweight(t.matrix),n=t.parent;n.computeTransformMatrix(),e.preMultiplySelf(n.matrix);var i=t.computeBBox();if(i){var h=e.transformBBox(i);r=Math.min(r,h.x),o=Math.max(o,h.x+h.width),a=Math.min(a,h.y),s=Math.max(s,h.y+h.height)}})),e&&e.enabled&&n.visible&&(!t||!t.excludeTitle)){var c=e.node;c.computeTransformMatrix();var u=l.flyweight(c.matrix),f=c.computeBBox();if(f){var p=u.transformBBox(f);r=Math.min(r,p.x),o=Math.max(o,p.x+p.width),a=Math.min(a,p.y),s=Math.max(s,p.y+p.height)}}return r=Math.min(r,0),o=Math.max(o,0),a=Math.min(a,n.y1,n.y2),s=Math.max(s,n.y1,n.y2),new h(r,a,o-r,s-a)},t}(),oe=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function ae(e){return e===t.ChartAxisDirection.X?t.ChartAxisDirection.Y:t.ChartAxisDirection.X}(te=t.ChartAxisDirection||(t.ChartAxisDirection={})).X="x",te.Y="y",(ee=t.ChartAxisPosition||(t.ChartAxisPosition={})).Top="top",ee.Right="right",ee.Bottom="bottom",ee.Left="left",ee.Angle="angle",ee.Radius="radius";var se=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.keys=[],n.direction=t.ChartAxisDirection.Y,n.boundSeries=[],n._position=t.ChartAxisPosition.Left,n}return oe(n,e),Object.defineProperty(n.prototype,"type",{get:function(){return this.constructor.type||""},enumerable:!0,configurable:!0}),n.prototype.getMeta=function(){return{id:this.id,direction:this.direction,boundSeries:this.boundSeries}},Object.defineProperty(n.prototype,"position",{get:function(){return this._position},set:function(e){if(this._position!==e)switch(this._position=e,e){case t.ChartAxisPosition.Top:this.direction=t.ChartAxisDirection.X,this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case t.ChartAxisPosition.Right:this.direction=t.ChartAxisDirection.Y,this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case t.ChartAxisPosition.Bottom:this.direction=t.ChartAxisDirection.X,this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case t.ChartAxisPosition.Left:this.direction=t.ChartAxisDirection.Y,this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1}},enumerable:!0,configurable:!0}),n}(re),he=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ce=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a};function le(t){var e,n=t[0],i=t[t.length-1];return n>i&&(e=ce([i,n],2),n=e[0],i=e[1]),function(t){return t>=n&&t<=i?t:NaN}}var ue=function(t){function e(){var e=t.call(this,new gt)||this;return e._nice=!0,e._min=NaN,e._max=NaN,e.scale.clamper=le,e}return he(e,t),Object.defineProperty(e.prototype,"nice",{get:function(){return this._nice},set:function(t){this._nice!==t&&(this._nice=t,t&&this.scale.nice&&this.scale.nice(this.tick.count))},enumerable:!0,configurable:!0}),e.prototype.setDomain=function(t,e){var n=this.scale,i=this.min,r=this.max;if(t.length>2&&(t=xt(t,Dt,Number)||[0,1]),t=[isNaN(i)?t[0]:i,isNaN(r)?t[1]:r],e){var o=ce(R(t,e),2),a=o[0],s=o[1];return n.domain=a,void(this.ticks=s)}n.domain=t,this.onLabelFormatChange(this.label.format),this.scale.clamp=!0,this.nice&&this.scale.nice&&this.scale.nice(this.tick.count)},Object.defineProperty(e.prototype,"domain",{get:function(){return this.scale.domain},set:function(t){this.setDomain(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(t){this._min!==t&&(this._min=t,isNaN(t)||(this.scale.domain=[t,this.scale.domain[1]]))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(t){this._max!==t&&(this._max=t,isNaN(t)||(this.scale.domain=[this.scale.domain[0],t]))},enumerable:!0,configurable:!0}),e.prototype.formatDatum=function(t){return t.toFixed(2)},e.className="NumberAxis",e.type="number",e}(se),fe=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},pe=function(){function t(){this.type="band",this.index=new Map,this.ordinalRange=[],this._domain=[],this._range=[0,1],this._bandwidth=1,this._paddingInner=0,this._paddingOuter=0,this._round=!1,this._align=.5}return Object.defineProperty(t.prototype,"domain",{get:function(){return this._domain},set:function(t){var e=this._domain;e.length=0,this.index=new Map;var n=this.index;t.forEach((function(t){void 0===n.get(t)&&n.set(t,e.push(t)-1)})),this.rescale()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"range",{get:function(){return this._range},set:function(t){this._range[0]=t[0],this._range[1]=t[1],this.rescale()},enumerable:!0,configurable:!0}),t.prototype.ticks=function(){return this._domain},t.prototype.convert=function(t){var e=this.index.get(t);if(void 0===e)return NaN;var n=this.ordinalRange[e];return void 0===n?NaN:n},Object.defineProperty(t.prototype,"bandwidth",{get:function(){return this._bandwidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this._paddingInner},set:function(t){t=Math.max(0,Math.min(1,t)),this._paddingInner=t,this._paddingOuter=t,this.rescale()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paddingInner",{get:function(){return this._paddingInner},set:function(t){this._paddingInner=Math.max(0,Math.min(1,t)),this.rescale()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paddingOuter",{get:function(){return this._paddingOuter},set:function(t){this._paddingOuter=Math.max(0,Math.min(1,t)),this.rescale()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"round",{get:function(){return this._round},set:function(t){this._round=t,this.rescale()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align=Math.max(0,Math.min(1,t)),this.rescale()},enumerable:!0,configurable:!0}),t.prototype.rescale=function(){var t,e=this._domain.length;if(e){var n=fe(this._range,2),i=n[0],r=n[1],o=r<i;o&&(i=(t=fe([r,i],2))[0],r=t[1]);var a=(r-i)/Math.max(1,e-this._paddingInner+2*this._paddingOuter);this._round&&(a=Math.floor(a)),i+=(r-i-a*(e-this._paddingInner))*this._align,this._bandwidth=a*(1-this._paddingInner),this._round&&(i=Math.round(i),this._bandwidth=Math.round(this._bandwidth));for(var s=[],h=0;h<e;h++)s.push(i+a*h);this.ordinalRange=o?s.reverse():s}},t}(),de=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ye=function(t){function e(){var e=t.call(this,new pe)||this;return e.scale.paddingInner=.2,e.scale.paddingOuter=.3,e}return de(e,t),Object.defineProperty(e.prototype,"paddingInner",{get:function(){return this.scale.paddingInner},set:function(t){this.scale.paddingInner=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingOuter",{get:function(){return this.scale.paddingOuter},set:function(t){this.scale.paddingOuter=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"domain",{get:function(){return this.scale.domain.slice()},set:function(t){this.scale.domain=t.filter((function(t,e,n){return n.indexOf(t)===e}))},enumerable:!0,configurable:!0}),e.className="CategoryAxis",e.type="category",e}(se),ge=function(){function t(t,e,n){void 0===t&&(t=""),void 0===n&&(n=0),this.x=0,this.y=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.screenX=0,this.screenY=0,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.label=t,this.parent=e,this.depth=e?e.depth+1:0,this.number=n}return t.prototype.getLeftSibling=function(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0},t.prototype.getLeftmostSibling=function(){return this.number>0&&this.parent?this.parent.children[0]:void 0},t.prototype.nextLeft=function(){return this.children?this.children[0]:this.thread},t.prototype.nextRight=function(){return this.children?this.children[this.children.length-1]:this.thread},t.prototype.getSiblings=function(){var t=this;return this.parent?this.parent.children.filter((function(e,n){return n!==t.number})):[]},t}();function me(t,e){void 0===e&&(e=!0);var n=new ge,i=0;return e&&t.forEach((function(t){return i=Math.max(i,t.labels.length)})),t.forEach((function(t){if(e)for(;t.labels.length<i;)t.labels.unshift("");!function(t,e){var n=e.labels.slice().reverse(),i=n.length-1;n.forEach((function(e,n){var r=t.children,o=vt(r,(function(t){return t.label===e})),a=n!==i;if(o&&a)t=o;else{var s=new ge(e,t);s.number=r.length,r.push(s),a&&(t=s)}}))}(n,t)})),n}function ve(t,e,n){var i=n/(e.number-t.number);e.change-=i,e.shift+=n,t.change+=i,e.prelim+=n,e.mod+=n}function be(t,e,n){return e.getSiblings().indexOf(t.ancestor)>=0?t.ancestor:n}function xe(t,e){var n=t.children;if(n.length){var i=n[0];n.forEach((function(t){xe(t,e),i=function(t,e,n){var i=t.getLeftSibling();if(i){for(var r=t,o=t,a=i,s=o.getLeftmostSibling(),h=o.mod,c=r.mod,l=a.mod,u=s.mod;a.nextRight()&&o.nextLeft();){a=a.nextRight(),o=o.nextLeft(),s=s.nextLeft(),(r=r.nextRight()).ancestor=t;var f=a.prelim+l-(o.prelim+h)+n;f>0&&(ve(be(a,t,e),t,f),h+=f,c+=f),l+=a.mod,h+=o.mod,u+=s.mod,c+=r.mod}a.nextRight()&&!r.nextRight()?(r.thread=a.nextRight(),r.mod+=l-c):(o.nextLeft()&&!s.nextLeft()&&(s.thread=o.nextLeft(),s.mod+=h-u),e=t)}return e}(t,i,e)})),function(t){var e=t.children;if(e)for(var n=0,i=0,r=e.length-1;r>=0;r--){var o=e[r];o.prelim+=n,o.mod+=n,i+=o.change,n+=o.shift+i}}(t);var r=(n[0].prelim+n[n.length-1].prelim)/2;(o=t.getLeftSibling())?(t.prelim=o.prelim+e,t.mod=t.prelim-r):t.prelim=r}else{var o=t.getLeftSibling();t.prelim=o?o.prelim+e:0}}var _e=function(){function t(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}return t.prototype.update=function(t,e){var n=e(t),i=n.x,r=n.y;i>this.right&&(this.right=i),i<this.left&&(this.left=i),r>this.bottom&&(this.bottom=r),r<this.top&&(this.top=r)},t}();function we(t){var e=new Oe;return xe(t,1),function t(e,n,i){e.x=e.prelim+n,e.y=e.depth,i.update(e),e.children.forEach((function(r){return t(r,n+e.mod,i)}))}(t,-t.prelim,e),function t(e){var n=e.children,i=0;n.forEach((function(e){t(e),e.children.length?i+=e.leafCount:i++})),e.leafCount=i,n.length?(e.subtreeLeft=n[0].subtreeLeft,e.subtreeRight=n[e.children.length-1].subtreeRight,e.x=(e.subtreeLeft+e.subtreeRight)/2):(e.subtreeLeft=e.x,e.subtreeRight=e.x)}(t),e}var Oe=function(){function t(){this.dimensions=new _e,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}return t.prototype.update=function(t){this.dimensions.update(t,(function(t){return{x:t.x,y:t.y}})),t.children.length?this.nonLeafNodes.push(t):(this.leafCount++,this.leafNodes.push(t)),t.depth>this.depth&&(this.depth=t.depth),this.nodes.push(t)},t.prototype.resize=function(t,e,n,i,r){void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=!1);var o=this.leafCount-1,a=this.depth,s=this.dimensions,h=1,c=1;if(t>0&&o){var l=(s.right-s.left)/o;h=t/o/l,r&&(h=-h)}if(e>0&&a){var u=(s.bottom-s.top)/a;c=e/a/u}var f=new _e;this.nodes.forEach((function(t){t.screenX=t.x*h,t.screenY=t.y*c,f.update(t,(function(t){return{x:t.screenX,y:t.screenY}}))}));var p=-f.left,d=-f.top;this.nodes.forEach((function(t){t.screenX+=p+n,t.screenY+=d+i}))},t}(),ke=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.grid=!1,e}return ke(e,t),e}(ie),Pe=function(t){function e(){var e=t.call(this,new pe)||this;e.tickScale=new pe,e.longestSeparatorLength=0,e.translation={x:0,y:0},e.rotation=0,e.line={width:1,color:"rgba(195, 195, 195, 1)"},e.label=new Se,e.labelColor="rgba(87, 87, 87, 1)";var n=e,i=n.group,r=n.tickScale,o=n.scale;return o.paddingOuter=.1,o.paddingInner=2*o.paddingOuter,e.requestedRange=o.range.slice(),e.scale=o,r.paddingInner=1,r.paddingOuter=0,e.gridLineSelection=jt.select(i).selectAll(),e.axisLineSelection=jt.select(i).selectAll(),e.separatorSelection=jt.select(i).selectAll(),e.labelSelection=jt.select(i).selectAll(),e}return ke(e,t),Object.defineProperty(e.prototype,"domain",{get:function(){return this.scale.domain},set:function(t){var e=t.filter((function(t,e,n){return n.indexOf(t)===e}));this.scale.domain=e;var n=me(e);this.tickTreeLayout=we(n);var i=e.slice();i.push(""),this.tickScale.domain=i,this.resizeTickTree()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return this.requestedRange.slice()},set:function(t){this.requestedRange=t.slice(),this.updateRange()},enumerable:!0,configurable:!0}),e.prototype.updateRange=function(){var t=this.requestedRange,e=this.visibleRange,n=this.scale,i=(t[1]-t[0])/(e[1]-e[0]),r=i*e[0],o=t[0]-r;this.tickScale.range=n.range=[o,o+i],this.resizeTickTree()},e.prototype.resizeTickTree=function(){var t=this.scale,e=t.domain.length?[t.convert(t.domain[0]),t.convert(t.domain[t.domain.length-1])]:t.range,n=this.tickTreeLayout,i=this.lineHeight;n&&n.resize(Math.abs(e[1]-e[0]),n.depth*i,(Math.min(e[0],e[1])||0)+(t.bandwidth||0)/2,-n.depth*i,e[1]-e[0]<0)},Object.defineProperty(e.prototype,"lineHeight",{get:function(){return 1.5*this.label.fontSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gridLength",{get:function(){return this._gridLength},set:function(t){(this._gridLength&&!t||!this._gridLength&&t)&&(this.gridLineSelection=this.gridLineSelection.remove().setData([]),this.labelSelection=this.labelSelection.remove().setData([])),this._gridLength=t},enumerable:!0,configurable:!0}),e.prototype.update=function(){var t=this,e=this,n=e.group,i=e.scale,r=e.label,o=e.tickScale,a=e.requestedRange,s=i.range[0],h=i.range[1],c=Math.abs(h-s)/i.domain.length||0,l=r.parallel,u=Ut(this.rotation),f=Math.abs(Math.cos(u))<1e-8,p=Yt(Ut(this.label.rotation));n.translationX=this.translation.x,n.translationY=this.translation.y,n.rotation=u;var d=this.title;d&&(d.node.visible=!1);var y=this.lineHeight,g=this.tickTreeLayout,m=i.ticks(),v=g?g.nodes:[],b=!!g&&g.depth>1,x=o.ticks(),_=r.mirrored?1:-1,w=Yt(u),O=!p&&w>=0&&w<=Math.PI?-1:1,k=Yt(u-Math.PI/2),S=!p&&k>=0&&k<=Math.PI?-1:1,P=this.gridLineSelection.setData(this.gridLength?x:[]);P.exit.remove();var D=P.enter.append(Lt),C=P.merge(D),A=this.labelSelection.setData(v);A.exit.remove();var j=A.enter.append(M),T=A.merge(j),L=r.formatter,F=0;T.each((function(t,e,n){t.fontStyle=r.fontStyle,t.fontWeight=r.fontWeight,t.fontSize=r.fontSize,t.fontFamily=r.fontFamily,t.fill=r.color,t.textBaseline=-1===O?"bottom":"hanging",t.textAlign="center",t.translationX=e.screenY-.25*r.fontSize,t.translationY=e.screenX,0===n?d&&d.enabled&&m.length>0?(t.visible=!0,t.text=d.text,t.fontSize=d.fontSize,t.fontStyle=d.fontStyle,t.fontWeight=d.fontWeight,t.fontFamily=d.fontFamily,t.textBaseline="hanging"):t.visible=!1:(t.text=L?L({value:String(e.label),index:n}):String(e.label),t.visible=e.screenX>=a[0]&&e.screenX<=a[1]);var i=t.computeBBox();i&&i.width>F&&(F=i.width)}));var N=_*r.padding,E=l?O*Math.PI/2:-1===S?Math.PI:0,z=this.label.grid,B=[];T.each((function(e,n,i){if(e.x=N,e.rotationCenterX=N,n.children.length?(e.translationX-=F-y+t.label.padding,e.rotation=f?E:-Math.PI/2):(e.rotation=p,e.textAlign="end",e.textBaseline="middle"),n.parent&&b){var r=n.children.length?n.screenX-n.leafCount*c/2:n.screenX-c/2;if(n.children.length){var o=-F-2*t.label.padding+n.screenY;B.push({y:r,x1:o+y,x2:o,toString:function(){return String(i)}})}else(n.number!==n.children.length-1||z)&&B.push({y:r,x1:0,x2:-F-2*t.label.padding,toString:function(){return String(i)}})}}));var W=0;B.forEach((function(t){return W=Math.min(W,t.x2)})),this.longestSeparatorLength=Math.abs(W),B.push({y:Math.max(s,h),x1:0,x2:W,toString:function(){return String(B.length)}});var I=this.separatorSelection.setData(B);I.exit.remove();var K=I.enter.append(Lt),R=I.merge(K);this.separatorSelection=R,R.each((function(e,n,i){e.x1=n.x1,e.x2=n.x2,e.y1=n.y,e.y2=n.y,e.visible=n.y>=a[0]-1e-7&&n.y<=a[1]+1e-7,e.stroke=t.tick.color,e.fill=void 0,e.strokeWidth=1})),this.gridLineSelection=C,this.labelSelection=T;for(var Y=g?g.depth+1:1,X=[],H=0;H<Y;H++)X.push(H);var U=this.axisLineSelection.setData(X);U.exit.remove();var G=U.enter.append(Lt),V=U.merge(G);if(this.axisLineSelection=V,V.each((function(e,n,i){var r=i>0?-F-2*t.label.padding-(i-1)*y:0;e.x1=r,e.x2=r,e.y1=a[0],e.y2=a[1],e.strokeWidth=t.line.width,e.stroke=t.line.color,e.visible=m.length>0&&(0===i||z&&b)})),this.gridLength){var q=this.gridStyle,Z=q.length;C.each((function(e,n,i){var r=Math.round(o.convert(n));e.x1=0,e.x2=-_*t.gridLength,e.y1=r,e.y2=r,e.visible=r>=a[0]&&r<=a[1]&&Math.abs(e.parent.translationY-s)>1;var h=q[i%Z];e.stroke=h.stroke,e.strokeWidth=t.tick.width,e.lineDash=h.lineDash,e.fill=void 0}))}},e.prototype.computeBBox=function(t){var e=!t||!t.excludeTitle,n=1/0,i=-1/0,r=1/0,o=-1/0;return this.labelSelection.each((function(t,a,s){if(s>0||e){t.computeTransformMatrix();var h=l.flyweight(t.matrix),c=t.computeBBox();if(c){var u=h.transformBBox(c);n=Math.min(n,u.x),i=Math.max(i,u.x+u.width),r=Math.min(r,u.y),o=Math.max(o,u.y+u.height)}}})),new h(n,r,Math.max(i-n,this.longestSeparatorLength),o-r)},e.className="GroupedCategoryAxis",e.type="groupedCategory",e}(se),De=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ce=new Date,Me=new Date,Ae=function(){function t(t,e){this._floor=t,this._offset=e}return t.prototype.floor=function(t){return t=new Date(+t),this._floor(t),t},t.prototype.ceil=function(t){return t=new Date(+t-1),this._floor(t),this._offset(t,1),this._floor(t),t},t.prototype.round=function(t){var e=this.floor(t),n=this.ceil(t),i=+t;return i-e.getTime()<n.getTime()-i?e:n},t.prototype.offset=function(t,e){return void 0===e&&(e=1),t=new Date(+t),this._offset(t,Math.floor(e)),t},t.prototype.range=function(t,e,n){void 0===n&&(n=1);var i,r=[];if(t=this.ceil(t),n=Math.floor(n),t>e||n<=0)return r;do{i=new Date(+t),r.push(i),this._offset(t,n),this._floor(t)}while(i<t&&t<e);return r},t.prototype.filter=function(e){var n=this;return new t((function(t){if(t>=t)for(;n._floor(t),!e(t);)t.setTime(t.getTime()-1);return t}),(function(t,i){if(t>=t)if(i<0)for(;++i<=0;)do{n._offset(t,-1)}while(!e(t));else for(;--i>=0;)do{n._offset(t,1)}while(!e(t));return t}))},t}(),je=function(t){function e(e,n,i,r){var o=t.call(this,e,n)||this;return o._count=i,o._field=r,o}return De(e,t),e.prototype.count=function(t,e){return Ce.setTime(+t),Me.setTime(+e),this._floor(Ce),this._floor(Me),Math.floor(this._count(Ce,Me))},e.prototype.every=function(t){var e,n=this;if(t=Math.floor(t),isFinite(t)&&t>0)if(t>1){var i=this._field;e=i?this.filter((function(e){return i(e)%t==0})):this.filter((function(e){return n.count(0,e)%t==0}))}else e=this;return e},e}(Ae),Te=new je((function(t){return t}),(function(t,e){t.setTime(t.getTime()+e)}),(function(t,e){return e.getTime()-t.getTime()})),Le=new je((function(t){t.setTime(t.getTime()-t.getMilliseconds())}),(function(t,e){t.setTime(t.getTime()+1e3*e)}),(function(t,e){return(e.getTime()-t.getTime())/1e3})),Fe=new je((function(t){t.setTime(t.getTime()-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(t.getTime()+6e4*e)}),(function(t,e){return(e.getTime()-t.getTime())/6e4}),(function(t){return t.getMinutes()})),Ne=new je((function(t){t.setTime(t.getTime()-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(t.getTime()+36e5*e)}),(function(t,e){return(e.getTime()-t.getTime())/36e5}),(function(t){return t.getHours()})),Ee=new je((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){var n=e.getTimezoneOffset()-t.getTimezoneOffset();return(e.getTime()-t.getTime()-6e4*n)/864e5}),(function(t){return t.getDate()-1}));function ze(t){return new je((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e.getTime()-t.getTime()-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Be=ze(0),We=ze(1),Ie=ze(2),Ke=ze(3),Re=ze(4),Ye=ze(5),Xe=ze(6),He=new je((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Ue=new je((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})),Ge=new je((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e.getTime()-t.getTime())/864e5}),(function(t){return t.getUTCDate()-1})),Ve=new je((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function qe(t){return new je((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e.getTime()-t.getTime())/6048e5}))}var Ze=qe(0),Je=qe(1),$e=(qe(2),qe(3),qe(4));function Qe(t){if(t.y>=0&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function tn(t){if(t.y>=0&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function en(t){for(var e={},n=0,i=t.length;n<i;n++)e[t[n].toLowerCase()]=n;return e}function nn(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}qe(5),qe(6);var rn,on=/^\s*\d+/,an=/^%/,sn=/[\\^$*+?|[\]().{}]/g,hn=function(t){return t.replace(sn,"\\$&")},cn=function(t){return new RegExp("^(?:"+t.map(hn).join("|")+")","i")},ln={"-":"",_:" ",0:"0"};function un(t,e,n){var i=t<0?"-":"",r=String(i?-t:t),o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}!function(t){rn=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,a=t.shortDays,s=t.months,h=t.shortMonths,c=cn(r),l=en(r),u=cn(o),f=en(o),p=cn(a),d=en(a),y=cn(s),g=en(s),m=cn(h),v=en(h),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return h[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:void 0,d:P,e:P,f:function(t,e){return S(t,e)+"000"},H:function(t,e){return un(t.getHours(),e,2)},I:function(t,e){return un(t.getHours()%12||12,e,2)},j:function(t,e){return un(1+Ee.count(Ue.floor(t),t),e,3)},L:S,m:function(t,e){return un(t.getMonth()+1,e,2)},M:function(t,e){return un(t.getMinutes(),e,2)},p:function(t){return r[t.getHours()>=12?1:0]},Q:A,s:j,S:function(t,e){return un(t.getSeconds(),e,2)},u:function(t){var e=t.getDay();return 0===e?7:e},U:function(t,e){return un(Be.count(Ue.floor(t),t),e,2)},V:function(t,e){var n=t.getDay();t=n>=4||0===n?Re.floor(t):Re.ceil(t);var i=Ue.floor(t);return un(Re.count(i,t)+(4===i.getDay()?1:0),e,2)},w:function(t){return t.getDay()},W:function(t,e){return un(We.count(Ue.floor(t),t),e,2)},x:void 0,X:void 0,y:function(t,e){return un(t.getFullYear()%100,e,2)},Y:function(t,e){return un(t.getFullYear()%1e4,e,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+un(Math.floor(e/60),"0",2)+un(e%60,"0",2)},"%":M},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return h[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:void 0,d:C,e:C,f:function(t,e){return D(t,e)+"000"},H:function(t,e){return un(t.getUTCHours(),e,2)},I:function(t,e){return un(t.getUTCHours()%12||12,e,2)},j:function(t,e){return un(1+Ge.count(Ve.floor(t),t),e,3)},L:D,m:function(t,e){return un(t.getUTCMonth()+1,e,2)},M:function(t,e){return un(t.getUTCMinutes(),e,2)},p:function(t){return r[t.getUTCHours()>=12?1:0]},Q:A,s:j,S:function(t,e){return un(t.getUTCSeconds(),e,2)},u:function(t){var e=t.getUTCDay();return 0===e?7:e},U:function(t,e){return un(Ze.count(Ve.floor(t),t),e,2)},V:function(t,e){var n=t.getUTCDay();t=n>=4||0===n?$e.floor(t):$e.ceil(t);var i=Ve.floor(t);return un($e.count(i,t)+(4===i.getUTCDay()?1:0),e,4)},w:function(t){return t.getUTCDay()},W:function(t,e){return un(Je.count(Ve.floor(t),t),e,2)},x:void 0,X:void 0,y:function(t,e){return un(t.getUTCFullYear()%100,e,2)},Y:function(t,e){return un(t.getUTCFullYear()%1e4,e,4)},Z:function(){return"+0000"},"%":M},_={a:function(t,e,n){var i=p.exec(e.slice(n));return i?(t.w=d[i[0].toLowerCase()],n+i[0].length):-1},A:function(t,e,n){var i=u.exec(e.slice(n));return i?(t.w=f[i[0].toLowerCase()],n+i[0].length):-1},b:function(t,e,n){var i=m.exec(e.slice(n));return i?(t.m=v[i[0].toLowerCase()],n+i[0].length):-1},B:function(t,e,n){var i=y.exec(e.slice(n));return i?(t.m=g[i[0].toLowerCase()],n+i[0].length):-1},c:function(t,n,i){return k(t,e,n,i)},d:L,e:L,f:function(t,e,n){var i=on.exec(e.slice(n,n+6));return i?(t.L=Math.floor(parseFloat(i[0])/1e3),n+i[0].length):-1},H:T,I:T,j:function(t,e,n){var i=on.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1},L:function(t,e,n){var i=on.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1},m:function(t,e,n){var i=on.exec(e.slice(n,n+2));return i?(t.m=parseFloat(i[0])-1,n+i[0].length):-1},M:function(t,e,n){var i=on.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1},p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=l[i[0].toLowerCase()],n+i[0].length):-1},Q:function(t,e,n){var i=on.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1},s:function(t,e,n){var i=on.exec(e.slice(n));return i?(t.Q=1e3*+i[0],n+i[0].length):-1},S:function(t,e,n){var i=on.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1},u:function(t,e,n){var i=on.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1},U:function(t,e,n){var i=on.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1},V:function(t,e,n){var i=on.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1},w:function(t,e,n){var i=on.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1},W:function(t,e,n){var i=on.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1},x:function(t,e,i){return k(t,n,e,i)},X:function(t,e,n){return k(t,i,e,n)},y:function(t,e,n){var i=on.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1},Y:function(t,e,n){var i=on.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1},Z:function(t,e,n){var i=/^(Z)|^([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1},"%":function(t,e,n){var i=an.exec(e.slice(n,n+1));return i?n+i[0].length:-1}};function w(t,e){return function(n){var i=nn(1900);if(k(i,t,n+="",0)==n.length){if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return;if("w"in i||(i.w=1),"Z"in i){var r=(o=tn(nn(i.y))).getUTCDay();o=r>4||0===r?Je.ceil(o):Je.floor(o),o=Ge.offset(o,7*(i.V-1)),i.y=o.getUTCFullYear(),i.m=o.getUTCMonth(),i.d=o.getUTCDate()+(i.w+6)%7}else{var o;r=(o=e(nn(i.y))).getDay(),o=r>4||0===r?We.ceil(o):We.floor(o),o=Ee.offset(o,7*(i.V-1)),i.y=o.getFullYear(),i.m=o.getMonth(),i.d=o.getDate()+(i.w+6)%7}}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?tn(nn(i.y)).getUTCDay():e(nn(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,tn(i)):e(i)}}}function O(t,e){return function(n){var i=[],r=t.length,o=-1,a=0;for(n instanceof Date||(n=new Date(+n));++o<r;)if(37===t.charCodeAt(o)){i.push(t.slice(a,o));var s=t.charAt(++o),h=ln[s];null!=h?s=t.charAt(++o):h="e"===s?" ":"0";var c=e[s];c&&(s=c(n,h)),i.push(s),a=o+1}return i.push(t.slice(a,o)),i.join("")}}function k(t,e,n,i){for(var r=0,o=e.length,a=n.length;r<o;){if(i>=a)return-1;var s=e.charCodeAt(r++);if(37===s){var h=e.charAt(r++),c=_[h in ln?e.charAt(r++):h];if(!c||(i=c(t,n,i))<0)return-1}else if(s!=n.charCodeAt(i++))return-1}return i}function S(t,e){return un(t.getMilliseconds(),e,3)}function P(t,e){return un(t.getDate(),e,2)}function D(t,e){return un(t.getUTCMilliseconds(),e,3)}function C(t,e){return un(t.getUTCDate(),e,2)}function M(t){return"%"}function A(t){return t.getTime()}function j(t){return Math.floor(t.getTime()/1e3)}function T(t,e,n){var i=on.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function L(t,e,n){var i=on.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}return b.x=O(n,b),b.X=O(i,b),b.c=O(e,b),x.x=O(n,x),x.X=O(i,x),x.c=O(e,x),{format:function(t){var e=O(t,b);return e.toString=function(){return t},e},parse:function(t){var e=w(t,Qe);return e.toString=function(){return t},e},utcFormat:function(t){var e=O(t,x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t,tn);return e.toString=function(){return t},e}}}(t)}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var fn,pn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},yn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e.year=Ue,e.month=He,e.week=Be,e.day=Ee,e.hour=Ne,e.minute=Fe,e.second=Le,e.millisecond=Te,e.format=rn.format,e.tickIntervals=[[e.second,1,1e3],[e.second,5,5e3],[e.second,15,15e3],[e.second,30,3e4],[e.minute,1,6e4],[e.minute,5,3e5],[e.minute,15,9e5],[e.minute,30,18e5],[e.hour,1,36e5],[e.hour,3,108e5],[e.hour,6,216e5],[e.hour,12,432e5],[e.day,1,864e5],[e.day,2,1728e5],[e.week,1,6048e5],[e.month,1,2592e6],[e.month,3,7776e6],[e.year,1,31536e6]],e.formatMillisecond=e.format(".%L"),e.formatSecond=e.format(":%S"),e.formatMinute=e.format("%I:%M"),e.formatHour=e.format("%I %p"),e.formatDay=e.format("%a %d"),e.formatWeek=e.format("%b %d"),e.formatMonth=e.format("%B"),e.formatYear=e.format("%Y"),e._domain=[new Date(2e3,0,1),new Date(2e3,0,2)],e}return pn(e,t),e.prototype.defaultTickFormat=function(t){return(this.second.floor(t)<t?this.formatMillisecond:this.minute.floor(t)<t?this.formatSecond:this.hour.floor(t)<t?this.formatMinute:this.day.floor(t)<t?this.formatHour:this.month.floor(t)<t?this.week.floor(t)<t?this.formatDay:this.formatWeek:this.year.floor(t)<t?this.formatMonth:this.formatYear)(t)},e.prototype.tickInterval=function(t,e,n,i){var r;if("number"==typeof t){var o=t,a=this.tickIntervals,s=Math.abs(n-e)/o,h=q(a,s,(function(t){return t[2]}));h===a.length?(i=W(e/31536e6,n/31536e6,o),t=this.year):h?(t=(r=dn(a[s/a[h-1][2]<a[h][2]/s?h-1:h],2))[0],i=r[1]):(i=Math.max(W(e,n,t),1),t=this.millisecond)}return null==i?t:t.every(i)},Object.defineProperty(e.prototype,"domain",{get:function(){return t.prototype.getDomain.call(this).map((function(t){return new Date(t)}))},set:function(e){t.prototype.setDomain.call(this,Array.prototype.map.call(e,(function(t){return t instanceof Date?+t:+new Date(+t)})))},enumerable:!0,configurable:!0}),e.prototype.invert=function(e){return new Date(t.prototype.invert.call(this,e))},e.prototype.ticks=function(e){void 0===e&&(e=10);var n=t.prototype.getDomain.call(this),i=n[0],r=n[n.length-1],o=r<i;if(o){var a=i;i=r,r=a}var s=this.tickInterval(e,i,r),h=s?s.range(i,r+1):[];return o?h.reverse():h},e.prototype.tickFormat=function(t,e){return null==e?this.defaultTickFormat.bind(this):this.format(e)},e.prototype.nice=function(e){void 0===e&&(e=10);var n=t.prototype.getDomain.call(this),i=this.tickInterval(e,n[0],n[n.length-1]);i&&(this.domain=this._nice(n,i))},e.prototype._nice=function(t,e){var n,i,r=0,o=(t=t.slice()).length-1,a=t[r],s=t[o];return s<a&&(r=(n=dn([o,r],2))[0],o=n[1],a=(i=dn([s,a],2))[0],s=i[1]),t[r]=e.floor(a),t[o]=e.ceil(s),t},e}(it),gn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mn=function(t){function e(){var e=t.call(this,new yn)||this;e.datumFormat="%m/%d/%y, %H:%M:%S",e._nice=!0;var n=e.scale;return n.clamp=!0,e.scale=n,e.datumFormatter=n.tickFormat(e.tick.count,e.datumFormat),e}return gn(e,t),Object.defineProperty(e.prototype,"nice",{get:function(){return this._nice},set:function(t){this._nice!==t&&(this._nice=t,t&&this.scale.nice&&this.scale.nice(10))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"domain",{get:function(){return this.scale.domain},set:function(t){t.length>2&&(t=(xt(t,Dt,Number)||[0,1e3]).map((function(t){return new Date(t)}))),this.scale.domain=t,this.nice&&this.scale.nice&&this.scale.nice(10)},enumerable:!0,configurable:!0}),e.prototype.onLabelFormatChange=function(e){e?t.prototype.onLabelFormatChange.call(this,e):this.labelFormatter=this.scale.tickFormat(this.tick.count,void 0)},e.prototype.formatDatum=function(t){return this.datumFormatter(t)},e.className="TimeAxis",e.type="time",e}(se),vn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},bn=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(vn(arguments[e]));return t},xn=function(){function t(t,e,n){var i=this;void 0===t&&(t=window.document),this.id=u(this),this._dirty=!1,this.animationFrameId=0,this._root=null,this.debug={renderFrameIndex:!1,renderBoundingBoxes:!1},this._frameIndex=0,this.render=function(){var t,e=i,n=e.ctx,r=e.root,o=e.pendingSize;i.animationFrameId=0,o&&((t=i.canvas).resize.apply(t,bn(o)),i.pendingSize=void 0),!r||r.visible?(n.clearRect(0,0,i.width,i.height),r&&(n.save(),r.visible&&r.render(n),n.restore()),i._frameIndex++,i.debug.renderFrameIndex&&(n.fillStyle="white",n.fillRect(0,0,40,15),n.fillStyle="black",n.fillText(i.frameIndex.toString(),2,10)),i.dirty=!1):i.dirty=!1},this.canvas=new D(t,e,n),this.ctx=this.canvas.context}return Object.defineProperty(t.prototype,"container",{get:function(){return this.canvas.container},set:function(t){this.canvas.container=t},enumerable:!0,configurable:!0}),t.prototype.download=function(t){this.canvas.download(t)},t.prototype.getDataURL=function(t){return this.canvas.getDataURL(t)},Object.defineProperty(t.prototype,"width",{get:function(){return this.pendingSize?this.pendingSize[0]:this.canvas.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.pendingSize?this.pendingSize[1]:this.canvas.height},enumerable:!0,configurable:!0}),t.prototype.resize=function(t,e){t=Math.round(t),e=Math.round(e),t===this.width&&e===this.height||(this.pendingSize=[t,e],this.dirty=!0)},Object.defineProperty(t.prototype,"dirty",{get:function(){return this._dirty},set:function(t){t?this._dirty||(this.animationFrameId=requestAnimationFrame(this.render)):this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0),this._dirty=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},set:function(t){t!==this._root&&(this._root&&this._root._setScene(),this._root=t,t&&(null===t.parent&&t.scene&&t.scene!==this&&(t.scene.root=null),t._setScene(this)),this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"frameIndex",{get:function(){return this._frameIndex},enumerable:!0,configurable:!0}),t.className="Scene",t}(),_n=function(){this.stops=[]},wn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),On=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.angle=0,e}return wn(e,t),e.prototype.createGradient=function(t,e){var n=this.stops,i=this.angle%360*Math.PI/180,r=Math.cos(i),o=Math.sin(i),a=e.width,s=e.height,h=e.x+.5*a,c=e.y+.5*s;if(a>0&&s>0){var l=Math.sqrt(s*s+a*a)*Math.abs(Math.cos(i-Math.atan(s/a)))/2,u=t.createLinearGradient(h+r*l,c+o*l,h-r*l,c-o*l);return n.forEach((function(t){u.addColorStop(t.offset,t.color)})),u}return"black"},e}(_n),kn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();(fn=t.RectSizing||(t.RectSizing={}))[fn.Content=0]="Content",fn[fn.Border=1]="Border";var Sn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n._x=0,n._y=0,n._width=10,n._height=10,n._radius=0,n._crisp=!1,n._gradient=!1,n.effectiveStrokeWidth=P.defaultStyles.strokeWidth,n._sizing=t.RectSizing.Content,n}return kn(n,e),Object.defineProperty(n.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return this._width},set:function(t){this._width!==t&&(this._width=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},set:function(t){this._height!==t&&(this._height=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"radius",{get:function(){return this._radius},set:function(t){this._radius!==t&&(this._radius=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"crisp",{get:function(){return this._crisp},set:function(t){this._crisp!==t&&(this._crisp=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"gradient",{get:function(){return this._gradient},set:function(t){this._gradient!==t&&(this._gradient=t,this.updateGradientInstance(),this.dirty=!0)},enumerable:!0,configurable:!0}),n.prototype.updateGradientInstance=function(){if(this.gradient){var t=this.fill;if(t){var e=new On;e.angle=270,e.stops=[{offset:0,color:H.fromString(t).brighter().toString()},{offset:1,color:H.fromString(t).darker().toString()}],this.gradientInstance=e}}else this.gradientInstance=void 0},Object.defineProperty(n.prototype,"fill",{get:function(){return this._fill},set:function(t){this._fill!==t&&(this._fill=t,this.updateGradientInstance(),this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(e){this._strokeWidth!==e&&(this._strokeWidth=e,this.crisp||this.sizing===t.RectSizing.Border?this.dirtyPath=!0:(this.effectiveStrokeWidth=e,this.dirty=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sizing",{get:function(){return this._sizing},set:function(t){this._sizing!==t&&(this._sizing=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),n.prototype.updatePath=function(){var e=this.sizing===t.RectSizing.Border,n=this.path;n.clear();var i,r=this.x,o=this.y,a=this.width,s=this.height;if(e){var h=a/2,c=s/2;i=Math.min(this.strokeWidth,h,c),r=Math.min(r+i/2,r+h),o=Math.min(o+i/2,o+c),a=Math.max(a-i,0),s=Math.max(s-i,0)}else i=this.strokeWidth;if(this.effectiveStrokeWidth=i,this.crisp&&!e){var l=this.alignment,u=this.align;n.rect(u(l,r),u(l,o),u(l,r,a),u(l,o,s))}else n.rect(r,o,a,s)},n.prototype.computeBBox=function(){var t=this.x,e=this.y,n=this.width,i=this.height;return new h(t,e,n,i)},n.prototype.isPointInPath=function(t,e){var n=this.transformPoint(t,e);return this.computeBBox().containsPoint(n.x,n.y)},n.prototype.isPointInStroke=function(t,e){return!1},n.prototype.fillStroke=function(t){if(this.scene){var e=this.scene.canvas.pixelRatio||1;if(this.fill){this.gradientInstance?t.fillStyle=this.gradientInstance.createGradient(t,this.computeBBox()):t.fillStyle=this.fill,t.globalAlpha=this.opacity*this.fillOpacity;var n=this.fillShadow;n&&n.enabled&&(t.shadowColor=n.color,t.shadowOffsetX=n.xOffset*e,t.shadowOffsetY=n.yOffset*e,t.shadowBlur=n.blur*e),t.fill()}if(t.shadowColor="rgba(0, 0, 0, 0)",this.stroke&&this.effectiveStrokeWidth){t.strokeStyle=this.stroke,t.globalAlpha=this.opacity*this.strokeOpacity,t.lineWidth=this.effectiveStrokeWidth,this.lineDash&&t.setLineDash(this.lineDash),this.lineDashOffset&&(t.lineDashOffset=this.lineDashOffset),this.lineCap&&(t.lineCap=this.lineCap),this.lineJoin&&(t.lineJoin=this.lineJoin);var i=this.strokeShadow;i&&i.enabled&&(t.shadowColor=i.color,t.shadowOffsetX=i.xOffset*e,t.shadowOffsetY=i.yOffset*e,t.shadowBlur=i.blur*e),t.stroke()}}},n.className="Rect",n}(Kt),Pn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Dn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._x=0,e._y=0,e._size=12,e}return Pn(e,t),Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},set:function(t){this._size!==t&&(this._size=Math.abs(t),this.dirtyPath=!0)},enumerable:!0,configurable:!0}),e.prototype.computeBBox=function(){var t=this.x,e=this.y,n=this.size,i=n/2;return new h(t-i,e-i,n,n)},e}(Kt),Cn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Cn(e,t),e.prototype.updatePath=function(){var t=this.path,e=this.x,n=this.y,i=this.size/2,r=this.alignment,o=this.align;t.clear(),t.moveTo(o(r,e-i),o(r,n-i)),t.lineTo(o(r,e+i),o(r,n-i)),t.lineTo(o(r,e+i),o(r,n+i)),t.lineTo(o(r,e-i),o(r,n+i)),t.closePath()},e.className="Square",e}(Dn),An=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),jn=function(t){function e(){var e=t.call(this)||this;e.label=new M,e._marker=new Mn,e._markerSize=15,e._spacing=8;var n=e.label;return n.textBaseline="middle",n.fontSize=12,n.fontFamily="Verdana, sans-serif",n.fill="black",n.y=D.has.textMetrics?1:0,e.append([e.marker,n]),e.update(),e}return An(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this.label.text},set:function(t){this.label.text=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontStyle",{get:function(){return this.label.fontStyle},set:function(t){this.label.fontStyle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontWeight",{get:function(){return this.label.fontWeight},set:function(t){this.label.fontWeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this.label.fontSize},set:function(t){this.label.fontSize=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this.label.fontFamily},set:function(t){this.label.fontFamily=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.label.fill},set:function(t){this.label.fill=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marker",{get:function(){return this._marker},set:function(t){this._marker!==t&&(this.removeChild(this._marker),this._marker=t,this.appendChild(t),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markerSize",{get:function(){return this._markerSize},set:function(t){this._markerSize!==t&&(this._markerSize=t,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markerFill",{get:function(){return this.marker.fill},set:function(t){this.marker.fill=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markerStroke",{get:function(){return this.marker.stroke},set:function(t){this.marker.stroke=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markerStrokeWidth",{get:function(){return this.marker.strokeWidth},set:function(t){this.marker.strokeWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markerFillOpacity",{get:function(){return this.marker.fillOpacity},set:function(t){this.marker.fillOpacity=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markerStrokeOpacity",{get:function(){return this.marker.strokeOpacity},set:function(t){this.marker.strokeOpacity=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opacity",{get:function(){return this.marker.opacity},set:function(t){this.marker.opacity=t,this.label.opacity=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this._spacing},set:function(t){this._spacing!==t&&(this._spacing=t,this.update())},enumerable:!0,configurable:!0}),e.prototype.update=function(){var t=this.marker,e=this.markerSize;t.size=e,this.label.x=e/2+this.spacing},e.className="MarkerLabel",e}(Mt),Tn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tn(e,t),e.prototype.updatePath=function(){var t=this.x,e=this.y,n=this.path,i=this.size/2;n.clear(),n.cubicArc(t,e,i,i,0,0,2*Math.PI,0),n.closePath()},e.className="Circle",e}(Dn),Fn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Nn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fn(e,t),e.prototype.updatePath=function(){var t=this.x,e=this.y,n=this.path,i=this.size/4.2;n.clear(),n.moveTo(t-=i,e),n.lineTo(t-=i,e-=i),n.lineTo(t+=i,e-=i),n.lineTo(t+=i,e+=i),n.lineTo(t+=i,e-=i),n.lineTo(t+=i,e+=i),n.lineTo(t-=i,e+=i),n.lineTo(t+=i,e+=i),n.lineTo(t-=i,e+=i),n.lineTo(t-=i,e-=i),n.lineTo(t-=i,e+=i),n.lineTo(t-=i,e-=i),n.closePath()},e.className="Cross",e}(Dn),En=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),zn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return En(e,t),e.prototype.updatePath=function(){var t=this.x,e=this.y,n=this.path,i=this.size/2;n.clear(),n.moveTo(t,e-=i),n.lineTo(t+=i,e+=i),n.lineTo(t-=i,e+=i),n.lineTo(t-=i,e-=i),n.lineTo(t+=i,e-=i),n.closePath()},e.className="Diamond",e}(Dn),Bn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bn(e,t),e.prototype.rad=function(t){return t/180*Math.PI},e.prototype.updatePath=function(){var t=this.x,e=this.path,n=this.size,i=this.rad,r=n/4,o=this.y+r/2;e.clear(),e.cubicArc(t-r,o-r,r,r,0,i(130),i(330),0),e.cubicArc(t+r,o-r,r,r,0,i(220),i(50),0),e.lineTo(t,o+r),e.closePath()},e.className="Heart",e}(Dn),In=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return In(e,t),e.prototype.updatePath=function(){var t=this.x,e=this.y,n=this.path,i=this.size/3,r=i/2;n.clear(),n.moveTo(t-=r,e-=r),n.lineTo(t,e-=i),n.lineTo(t+=i,e),n.lineTo(t,e+=i),n.lineTo(t+=i,e),n.lineTo(t,e+=i),n.lineTo(t-=i,e),n.lineTo(t,e+=i),n.lineTo(t-=i,e),n.lineTo(t,e-=i),n.lineTo(t-=i,e),n.lineTo(t,e-=i),n.closePath()},e.className="Plus",e}(Dn),Rn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Rn(e,t),e.prototype.updatePath=function(){var t=this.x,e=this.y,n=this.path,i=1.1*this.size;n.clear(),n.moveTo(t,e-=.48*i),n.lineTo(t+=.5*i,e+=.87*i),n.lineTo(t-=i,e),n.closePath()},e.className="Triangle",e}(Dn);function Xn(t){if(void 0===t&&(t=Mn),"string"==typeof t)switch(t){case"circle":return Ln;case"cross":return Nn;case"diamond":return zn;case"heart":return Wn;case"plus":return Kn;case"triangle":return Yn;default:return Mn}return"function"==typeof t?t:Mn}var Hn,Un,Gn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vn=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};(Hn=t.LegendOrientation||(t.LegendOrientation={}))[Hn.Vertical=0]="Vertical",Hn[Hn.Horizontal=1]="Horizontal",(Un=t.LegendPosition||(t.LegendPosition={})).Top="top",Un.Right="right",Un.Bottom="bottom",Un.Left="left";var qn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.color="black",e.fontSize=12,e.fontFamily="Verdana, sans-serif",e}return Gn(e,t),Vn([i("change")],e.prototype,"color",void 0),Vn([i("layoutChange")],e.prototype,"fontStyle",void 0),Vn([i("layoutChange")],e.prototype,"fontWeight",void 0),Vn([i("layoutChange")],e.prototype,"fontSize",void 0),Vn([i("layoutChange")],e.prototype,"fontFamily",void 0),Vn([i()],e.prototype,"formatter",void 0),e}(n),Zn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=15,e.padding=8,e.strokeWidth=1,e}return Gn(e,t),Vn([i("layoutChange")],e.prototype,"size",void 0),Vn([i("layoutChange")],e.prototype,"shape",void 0),Vn([i("layoutChange")],e.prototype,"padding",void 0),Vn([i("change")],e.prototype,"strokeWidth",void 0),e}(n),Jn=function(t){function e(){var e=t.call(this)||this;e.marker=new Zn,e.label=new qn,e.paddingX=16,e.paddingY=8;var n=function(){return e.fireEvent({type:"change"})};e.marker.addEventListener("change",n),e.label.addEventListener("change",n);var i=function(){return e.fireEvent({type:"layoutChange"})};return e.marker.addEventListener("layoutChange",i),e.label.addEventListener("layoutChange",i),e}return Gn(e,t),Vn([i("layoutChange")],e.prototype,"paddingX",void 0),Vn([i("layoutChange")],e.prototype,"paddingY",void 0),e}(n),$n=function(e){function n(){var n=e.call(this)||this;return n.id=u(n),n.group=new Mt,n.itemSelection=jt.select(n.group).selectAll(),n.oldSize=[0,0],n.item=new Jn,n.data=[],n.enabled=!0,n.orientation=t.LegendOrientation.Vertical,n.position=t.LegendPosition.Right,n.spacing=20,n._size=[0,0],n.addPropertyListener("data",n.onDataChange),n.addPropertyListener("enabled",n.onEnabledChange),n.addPropertyListener("position",n.onPositionChange),n.item.marker.addPropertyListener("shape",n.onMarkerShapeChange,n),n.addEventListener("change",n.update),n.item.addEventListener("change",(function(){return n.fireEvent({type:"change"})})),n.item.addEventListener("layoutChange",(function(){return n.fireEvent({type:"layoutChange"})})),n}return Gn(n,e),Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),n.prototype.onDataChange=function(t){this.group.visible=t.value.length>0&&this.enabled},n.prototype.onEnabledChange=function(t){this.group.visible=t.value&&this.data.length>0},n.prototype.onPositionChange=function(e){switch(e.value){case"right":case"left":this.orientation=t.LegendOrientation.Vertical;break;case"bottom":case"top":this.orientation=t.LegendOrientation.Horizontal}},n.prototype.onMarkerShapeChange=function(){this.itemSelection=this.itemSelection.setData([]),this.itemSelection.exit.remove(),this.group.scene&&(this.group.scene.dirty=!1)},n.prototype.performLayout=function(e,n){var i=this.item,r=i.marker,o=i.paddingX,a=i.paddingY,s=this.itemSelection.setData(this.data,(function(t,e){var n=Xn(r.shape||e.marker.shape);return e.id+"-"+e.itemId+"-"+n.name}));s.exit.remove();var h=s.enter.append(jn).each((function(t,e){var n=Xn(r.shape||e.marker.shape);t.marker=new n})),c=this.itemSelection=s.merge(h),l=c.size,u=[],f=this.item.marker,p=this.item.label;c.each((function(t,e){t.markerSize=f.size,t.spacing=f.padding,t.fontStyle=p.fontStyle,t.fontWeight=p.fontWeight,t.fontSize=p.fontSize,t.fontFamily=p.fontFamily;var n=e.label.text;n.length>25&&(n=n.substring(0,25-"...".length)+"..."),t.text=n,u.push(t.computeBBox())}));var d=u.length&&u[0].height,y=0,g=0,m=0,v=0;switch(e=Math.max(1,e),n=Math.max(1,n),this.orientation){case t.LegendOrientation.Horizontal:if(!(isFinite(e)&&e>0))return!1;y=0;var b=0;do{var x=0;b=0,g=0,y++;for(var _=0;_<l;)(k=u[_]).width>g&&(g=k.width),++_%y==0&&(x+=g,g=0,b++);_%y!=0&&(x+=g,b++),m=x+(b-1)*o}while(m>e&&b>1);v=d*y+(y-1)*a;break;case t.LegendOrientation.Vertical:if(!(isFinite(n)&&n>0))return!1;y=2*l;do{y=(y>>1)+y%2,g=0,x=0;var w=0,O=0;for(_=0;_<l;){var k=u[_];O||(w+=k.height),k.width>g&&(g=k.width),++_%y==0&&(x+=g,g=0,O++)}_%y!=0&&(x+=g,O++),m=x+(O-1)*o,v=w+(y-1)*a}while(v>n&&y>1)}var S=(e-m)/2,P=(n-v)/2,D=0,C=0;g=0,c.each((function(t,e,n){t.translationX=Math.floor(S+D),t.translationY=Math.floor(P+C);var i=u[n];i.width>g&&(g=i.width),(n+1)%y==0?(D+=g+o,C=0,g=0):C+=i.height+a})),this.update();var M=this._size,A=this.oldSize;M[0]=m,M[1]=v,M[0]===A[0]&&M[1]===A[1]||(A[0]=M[0],A[1]=M[1])},n.prototype.update=function(){var t=this;this.itemSelection.each((function(e,n){var i=n.marker;e.markerFill=i.fill,e.markerStroke=i.stroke,e.markerStrokeWidth=t.item.marker.strokeWidth,e.markerFillOpacity=i.fillOpacity,e.markerStrokeOpacity=i.strokeOpacity,e.opacity=n.enabled?1:.5,e.color=t.item.label.color}))},n.prototype.getDatumForPoint=function(t,e){var n=this.group.pickNode(t,e);if(n&&n.parent)return n.parent.datum},n.className="Legend",Vn([i("layoutChange")],n.prototype,"data",void 0),Vn([i("layoutChange")],n.prototype,"enabled",void 0),Vn([i("layoutChange")],n.prototype,"orientation",void 0),Vn([i("layoutChange")],n.prototype,"position",void 0),Vn([i("layoutChange")],n.prototype,"spacing",void 0),n}(n),Qn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ti=function(){function t(){}return t.init=function(){var t=this,e=window.ResizeObserver;e?this.resizeObserver=new e((function(e){var n,i;try{for(var r=Qn(e),o=r.next();!o.done;o=r.next()){var a=o.value,s=a.contentRect,h=s.width,c=s.height;t.checkSize(t.elements.get(a.target),a.target,h,c)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})):window.setInterval((function(){t.elements.forEach((function(e,n){var i=n.clientWidth?n.clientWidth:0,r=n.clientHeight?n.clientHeight:0;t.checkSize(e,n,i,r)}))}),100),this.ready=!0},t.checkSize=function(t,e,n,i){t&&(t.size&&n===t.size.width&&i===t.size.height||(t.size={width:n,height:i},t.cb(t.size,e)))},t.observe=function(t,e){this.ready||this.init(),this.unobserve(t),this.resizeObserver&&this.resizeObserver.observe(t),this.elements.set(t,{cb:e})},t.unobserve=function(t){this.resizeObserver&&this.resizeObserver.unobserve(t),this.elements.delete(t)},t.elements=new Map,t.ready=!1,t}();function ei(t,e,n,i,r,o,a){var s=t-(t<i?i:t>i+o?i+o:t),h=e-(e<r?r:e>r+a?r+a:e);return Math.sqrt(s*s+h*h)<=n}var ni=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ii=function(){return(ii=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ri=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},oi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function ai(t,e){if("string"==typeof t)return t;e=e||{};var n=t.content,i=void 0===n?e.content||"":n,r=t.title,o=void 0===r?e.title||void 0:r,a=t.color,s=void 0===a?e.color||"white":a,h=t.backgroundColor,c=void 0===h?e.backgroundColor||"#888":h;return(o?'<div class="'+hi.defaultTooltipClass+'-title"\n        style="color: '+s+"; background-color: "+c+'">'+o+"</div>":"")+'<div class="'+hi.defaultTooltipClass+'-content">'+i+"</div>"}var si=function(t){function e(e,n){var i=t.call(this)||this;i.enabled=!0,i.class=hi.defaultTooltipClass,i.delay=0,i.tracking=!0,i.showTimeout=0,i.constrained=!1,i.chart=e,i.class="";var r=n.body,o=n.createElement("div");if(i.element=r.appendChild(o),window.IntersectionObserver){var a=i.chart.scene.canvas.element,s=new IntersectionObserver((function(t){var e,n;try{for(var r=oi(t),o=r.next();!o.done;o=r.next()){var s=o.value;s.target===a&&0===s.intersectionRatio&&i.toggle(!1)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),{root:r});s.observe(a),i.observer=s}return i}return ni(e,t),e.prototype.destroy=function(){var t=this.element.parentNode;t&&t.removeChild(this.element),this.observer&&this.observer.unobserve(this.chart.scene.canvas.element)},e.prototype.isVisible=function(){var t=this.element;if(t.classList)return!t.classList.contains(hi.defaultTooltipClass+"-hidden");var e=t.getAttribute("class");return!!e&&e.split(" ").indexOf(hi.defaultTooltipClass+"-hidden")<0},e.prototype.updateClass=function(t,e){var n=[hi.defaultTooltipClass,this.class];!0!==t&&n.push(hi.defaultTooltipClass+"-hidden"),!0!==e&&n.push(hi.defaultTooltipClass+"-arrow"),this.element.setAttribute("class",n.join(" "))},e.prototype.show=function(t,e,n){var i=this;void 0===n&&(n=!1);var r=this.element;if(void 0!==e)r.innerHTML=e;else if(!r.innerHTML)return;var o=t.pageX-r.clientWidth/2,a=t.pageY-r.clientHeight-8;if(this.constrained=!1,this.chart.container){var s=r.getBoundingClientRect(),h=window.innerWidth-s.width-1;o<0?(o=0,this.updateClass(!0,this.constrained=!0)):o>h&&(o=h,this.updateClass(!0,this.constrained=!0)),a<window.pageYOffset&&(a=t.pageY+20,this.updateClass(!0,this.constrained=!0))}if(r.style.left=Math.round(o)+"px",r.style.top=Math.round(a)+"px",this.delay>0&&!n)return this.toggle(!1),void(this.showTimeout=window.setTimeout((function(){i.toggle(!0)}),this.delay));this.toggle(!0)},e.prototype.toggle=function(t){t||(window.clearTimeout(this.showTimeout),this.chart.lastPick&&!this.delay&&(this.chart.dehighlightDatum(),this.chart.lastPick=void 0)),this.updateClass(t,this.constrained)},ri([i()],e.prototype,"enabled",void 0),ri([i()],e.prototype,"class",void 0),ri([i()],e.prototype,"delay",void 0),ri([i()],e.prototype,"tracking",void 0),e}(n),hi=function(t){function e(n){void 0===n&&(n=window.document);var i=t.call(this)||this;i.id=u(i),i.background=new Sn,i.legend=new $n,i.legendAutoPadding=new s,i.captionAutoPadding=0,i._container=void 0,i._data=[],i._autoSize=!1,i.padding=new s(20),i._axes=[],i._series=[],i._axesChanged=!1,i._seriesChanged=!1,i.layoutCallbackId=0,i._performLayout=function(){i.layoutCallbackId=0,i.background.width=i.width,i.background.height=i.height,i.performLayout(),i.layoutPending||i.fireEvent({type:"layoutDone"})},i.dataCallbackId=0,i.nodeData=new Map,i.updateCallbackId=0,i.legendBBox=new h(0,0,0,0),i._onMouseDown=i.onMouseDown.bind(i),i._onMouseMove=i.onMouseMove.bind(i),i._onMouseUp=i.onMouseUp.bind(i),i._onMouseOut=i.onMouseOut.bind(i),i._onClick=i.onClick.bind(i),i.pointerInsideLegend=!1;var r=new Mt,o=i.background;o.fill="white",r.appendChild(o);var a=i._element=n.createElement("div");a.setAttribute("class","ag-chart-wrapper");var c=new xn(n);i.scene=c,c.root=r,c.container=a,i.autoSize=!0,i.padding.addEventListener("layoutChange",i.scheduleLayout,i);var l=i.legend;if(l.addEventListener("layoutChange",i.scheduleLayout,i),l.item.label.addPropertyListener("formatter",i.updateLegend,i),l.addPropertyListener("position",i.onLegendPositionChange,i),i.tooltip=new si(i,n),i.tooltip.addPropertyListener("class",(function(){return i.tooltip.toggle()})),e.tooltipDocuments.indexOf(n)<0){var f=n.createElement("style");f.innerHTML='\n.ag-chart-tooltip {\n    display: table;\n    position: absolute;\n    user-select: none;\n    pointer-events: none;\n    white-space: nowrap;\n    z-index: 99999;\n    font: 12px Verdana, sans-serif;\n    color: black;\n    background: rgb(244, 244, 244);\n    border-radius: 5px;\n    box-shadow: 0 0 1px rgba(3, 3, 3, 0.7), 0.5vh 0.5vh 1vh rgba(3, 3, 3, 0.25);\n}\n\n.ag-chart-tooltip-hidden {\n    top: -10000px !important;\n}\n\n.ag-chart-tooltip-title {\n    font-weight: bold;\n    padding: 7px;\n    border-top-left-radius: 5px;\n    border-top-right-radius: 5px;\n    color: white;\n    background-color: #888888;\n    border-top-left-radius: 5px;\n    border-top-right-radius: 5px;\n}\n\n.ag-chart-tooltip-content {\n    padding: 7px;\n    line-height: 1.7em;\n    border-bottom-left-radius: 5px;\n    border-bottom-right-radius: 5px;\n    overflow: hidden;\n}\n\n.ag-chart-tooltip-content:empty {\n    padding: 0;\n    height: 7px;\n}\n\n.ag-chart-tooltip-arrow::before {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 6px solid #989898;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-top-color: #989898;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.ag-chart-tooltip-arrow::after {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid black;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-top-color: rgb(244, 244, 244);\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.ag-chart-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n',n.head.insertBefore(f,n.head.querySelector("style")),e.tooltipDocuments.push(n)}return i.setupDomListeners(c.canvas.element),i.addPropertyListener("title",i.onCaptionChange),i.addPropertyListener("subtitle",i.onCaptionChange),i.addEventListener("layoutChange",i.scheduleLayout),i}return ni(e,t),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},set:function(t){if(this._container!==t){var e=this.element.parentNode;null!=e&&e.removeChild(this.element),t&&t.appendChild(this.element),this._container=t}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(t){this._data=t,this.series.forEach((function(e){return e.data=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.scene.width},set:function(t){this.autoSize=!1,this.width!==t&&(this.scene.resize(t,this.height),this.fireEvent({type:"layoutChange"}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scene.height},set:function(t){this.autoSize=!1,this.height!==t&&(this.scene.resize(this.width,t),this.fireEvent({type:"layoutChange"}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoSize",{get:function(){return this._autoSize},set:function(t){if(this._autoSize!==t){this._autoSize=t;var e=this.element.style;if(t){var n=this;ti.observe(this.element,(function(t){t.width===n.width&&t.height===n.height||(n.scene.resize(t.width,t.height),n.fireEvent({type:"layoutChange"}))})),e.display="block",e.width="100%",e.height="100%"}else ti.unobserve(this.element),e.display="inline-block",e.width="auto",e.height="auto"}},enumerable:!0,configurable:!0}),e.prototype.download=function(t){this.scene.download(t)},e.prototype.destroy=function(){this.tooltip.destroy(),ti.unobserve(this.element),this.container=void 0,this.cleanupDomListeners(this.scene.canvas.element),this.scene.container=void 0},e.prototype.onLegendPositionChange=function(){this.legendAutoPadding.clear(),this.layoutPending=!0},e.prototype.onCaptionChange=function(t){var e=t.value,n=t.oldValue;n&&(n.removeEventListener("change",this.scheduleLayout,this),this.scene.root.removeChild(n.node)),e&&(e.addEventListener("change",this.scheduleLayout,this),this.scene.root.appendChild(e.node))},Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"axes",{get:function(){return this._axes},set:function(t){var e=this;this._axes.forEach((function(t){return e.detachAxis(t)})),this._axes=t.filter((function(t){return!t.linkedTo})).concat(t.filter((function(t){return t.linkedTo}))),this._axes.forEach((function(t){return e.attachAxis(t)})),this.axesChanged=!0},enumerable:!0,configurable:!0}),e.prototype.attachAxis=function(t){this.scene.root.insertBefore(t.group,this.seriesRoot)},e.prototype.detachAxis=function(t){this.scene.root.removeChild(t.group)},Object.defineProperty(e.prototype,"series",{get:function(){return this._series},set:function(t){var e=this;this.removeAllSeries(),t.forEach((function(t){return e.addSeries(t)}))},enumerable:!0,configurable:!0}),e.prototype.scheduleLayout=function(){this.layoutPending=!0},e.prototype.scheduleData=function(){this.dehighlightDatum(),this.dataPending=!0},e.prototype.addSeries=function(t,e){var n=this.series,i=this.seriesRoot;if(n.indexOf(t)<0){var r=e?n.indexOf(e):-1;return r>=0?(n.splice(r,0,t),i.insertBefore(t.group,e.group)):(n.push(t),i.append(t.group)),this.initSeries(t),this.seriesChanged=!0,this.axesChanged=!0,!0}return!1},e.prototype.initSeries=function(t){t.chart=this,t.data||(t.data=this.data),t.addEventListener("layoutChange",this.scheduleLayout,this),t.addEventListener("dataChange",this.scheduleData,this),t.addEventListener("legendChange",this.updateLegend,this),t.addEventListener("nodeClick",this.onSeriesNodeClick,this)},e.prototype.freeSeries=function(t){t.chart=void 0,t.removeEventListener("layoutChange",this.scheduleLayout,this),t.removeEventListener("dataChange",this.scheduleData,this),t.removeEventListener("legendChange",this.updateLegend,this),t.removeEventListener("nodeClick",this.onSeriesNodeClick,this)},e.prototype.addSeriesAfter=function(t,e){var n=this.series,i=this.seriesRoot;if(n.indexOf(t)<0){var r=e?this.series.indexOf(e):-1;r>=0?(r+1<n.length?i.insertBefore(t.group,n[r+1].group):i.append(t.group),this.initSeries(t),n.splice(r+1,0,t)):(n.length>0?i.insertBefore(t.group,n[0].group):i.append(t.group),this.initSeries(t),n.unshift(t)),this.seriesChanged=!0,this.axesChanged=!0}return!1},e.prototype.removeSeries=function(t){var e=this.series.indexOf(t);return e>=0&&(this.series.splice(e,1),this.freeSeries(t),this.seriesRoot.removeChild(t.group),this.seriesChanged=!0,!0)},e.prototype.removeAllSeries=function(){var t=this;this.series.forEach((function(e){t.freeSeries(e),t.seriesRoot.removeChild(e.group)})),this._series=[],this.seriesChanged=!0},e.prototype.assignSeriesToAxes=function(){var t=this;this.axes.forEach((function(e){var n=e.direction+"Axis",i=[];t.series.forEach((function(t){t[n]===e&&i.push(t)})),e.boundSeries=i})),this.seriesChanged=!1},e.prototype.assignAxesToSeries=function(t){var e=this;void 0===t&&(t=!1);var n={};this.axes.forEach((function(t){var e=t.direction;(n[e]||(n[e]=[])).push(t)})),this.series.forEach((function(i){i.directions.forEach((function(r){var o=r+"Axis";if(!i[o]||t){var a=n[r];if(a){var s=e.findMatchingAxis(a,i.getKeys(r));s&&(i[o]=s)}}}))})),this.axesChanged=!1},e.prototype.findMatchingAxis=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=i.keys;if(!r.length)return i;if(e)for(var o=0;o<e.length;o++)if(r.indexOf(e[o])>=0)return i}},Object.defineProperty(e.prototype,"axesChanged",{get:function(){return this._axesChanged},set:function(t){this._axesChanged=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"seriesChanged",{get:function(){return this._seriesChanged},set:function(t){this._seriesChanged=t,t&&(this.dataPending=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layoutPending",{get:function(){return!!this.layoutCallbackId},set:function(t){t?this.layoutCallbackId||this.dataPending||(this.layoutCallbackId=requestAnimationFrame(this._performLayout),this.series.forEach((function(t){return t.nodeDataPending=!0}))):this.layoutCallbackId&&(cancelAnimationFrame(this.layoutCallbackId),this.layoutCallbackId=0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataPending",{get:function(){return!!this.dataCallbackId},set:function(t){var e=this;this.dataCallbackId&&(clearTimeout(this.dataCallbackId),this.dataCallbackId=0),t&&(this.dataCallbackId=window.setTimeout((function(){e.dataPending=!1,e.processData()}),0))},enumerable:!0,configurable:!0}),e.prototype.processData=function(){this.layoutPending=!1,this.axesChanged&&(this.assignAxesToSeries(!0),this.assignSeriesToAxes()),this.seriesChanged&&this.assignSeriesToAxes(),this.series.forEach((function(t){return t.processData()})),this.updateLegend(),this.layoutPending=!0},e.prototype.createNodeData=function(){var t=this;this.nodeData.clear(),this.series.forEach((function(e){var n=e.visible?e.createNodeData():[];t.nodeData.set(e,n)}))},e.prototype.placeLabels=function(){var t=[],e=[];this.nodeData.forEach((function(n,i){i.visible&&i.label.enabled&&(t.push(i),e.push(i.getLabelData()))}));var n=this.seriesRect,i=n?function(t,e,n){void 0===n&&(n=5);var i=[];t=t.map((function(t){return t.slice().sort((function(t,e){return e.size-t.size}))}));for(var r=0;r<t.length;r++){var o=i[r]=[],a=t[r];if(a&&a.length&&a[0].label)for(var s=function(r,s){var h,c,l,u,f,p,d,y=a[r],g=y.label,m=.5*y.size,v=y.point.x-.5*g.width,b=y.point.y-m-g.height-n,x=g.width,_=g.height;return!e||(h=e.x,c=e.y,l=e.width,u=e.height,p=b,d=_,(f=v)+x<h+l&&f>h&&p>c&&p+d<c+u)?t.some((function(t){return t.some((function(t){return ei(t.point.x,t.point.y,.5*t.size,v,b,x,_)}))}))||i.some((function(t){return t.some((function(t){return e=t.x,n=t.y,i=t.width,r=t.height,a=b,s=x,h=_,e+i>(o=v)&&e<o+s&&n+r>a&&n<a+h;var e,n,i,r,o,a,s,h}))}))?"continue":void o.push({index:r,text:g.text,x:v,y:b,width:x,height:_}):"continue"},h=0,c=a.length;h<c;h++)s(h)}return i}(e,{x:0,y:0,width:n.width,height:n.height}):[];return new Map(i.map((function(e,n){return[t[n],e]})))},e.prototype.updateLegend=function(){var t=[];this.series.filter((function(t){return t.showInLegend})).forEach((function(e){return e.listSeriesItems(t)}));var e=this.legend.item.label.formatter;e&&t.forEach((function(t){return t.label.text=e({id:t.id,itemId:t.itemId,value:t.label.text})})),this.legend.data=t},Object.defineProperty(e.prototype,"updatePending",{get:function(){return!!this.updateCallbackId},set:function(t){var e=this;this.updateCallbackId&&(clearTimeout(this.updateCallbackId),this.updateCallbackId=0),t&&!this.layoutPending&&(this.updateCallbackId=window.setTimeout((function(){e.update()}),0))},enumerable:!0,configurable:!0}),e.prototype.update=function(){this.updatePending=!1,this.series.forEach((function(t){t.updatePending&&t.update()}))},e.prototype.positionCaptions=function(){var t=this.title,e=this.subtitle,n=!1,i=!1,r=10;if(t&&t.enabled){t.node.x=this.width/2,t.node.y=r,n=!0;var o=t.node.computeBBox();if(o&&(r=o.y+o.height),e&&e.enabled){e.node.x=this.width/2,e.node.y=r+10,i=!0;var a=e.node.computeBBox();a&&(r=a.y+a.height)}}t&&(t.node.visible=n),e&&(e.node.visible=i),this.captionAutoPadding=Math.floor(r)},e.prototype.positionLegend=function(){if(this.legend.enabled&&this.legend.data.length){var t,e=this.legend,n=this.captionAutoPadding,i=this.legendAutoPadding,r=this.width,o=this.height-n,a=e.group,s=e.spacing,h=0,c=0;switch(e.position){case"bottom":e.performLayout(r-2*s,0),t=a.computeBBox(),a.visible=t.height<Math.floor(.5*o),a.visible?(h=(r-t.width)/2-t.x,c=n+o-t.height-t.y-s,i.bottom=t.height):i.bottom=0;break;case"top":e.performLayout(r-2*s,0),t=a.computeBBox(),a.visible=t.height<Math.floor(.5*o),a.visible?(h=(r-t.width)/2-t.x,c=n+s-t.y,i.top=t.height):i.top=0;break;case"left":e.performLayout(0,o-2*s),t=a.computeBBox(),a.visible=t.width<Math.floor(.5*r),a.visible?(h=s-t.x,c=n+(o-t.height)/2-t.y,i.left=t.width):i.left=0;break;default:e.performLayout(0,o-2*s),t=a.computeBBox(),a.visible=t.width<Math.floor(.5*r),a.visible?(h=r-t.width-t.x-s,c=n+(o-t.height)/2-t.y,i.right=t.width):i.right=0}a.visible&&(a.translationX=Math.floor(h+a.translationX),a.translationY=Math.floor(c+a.translationY),this.legendBBox=a.computeBBox())}},e.prototype.setupDomListeners=function(t){t.addEventListener("mousedown",this._onMouseDown),t.addEventListener("mousemove",this._onMouseMove),t.addEventListener("mouseup",this._onMouseUp),t.addEventListener("mouseout",this._onMouseOut),t.addEventListener("click",this._onClick)},e.prototype.cleanupDomListeners=function(t){t.removeEventListener("mousedown",this._onMouseDown),t.removeEventListener("mousemove",this._onMouseMove),t.removeEventListener("mouseup",this._onMouseUp),t.removeEventListener("mouseout",this._onMouseOut),t.removeEventListener("click",this._onClick)},e.prototype.getSeriesRect=function(){return this.seriesRect},e.prototype.pickSeriesNode=function(t,e){if(this.seriesRect&&this.seriesRect.containsPoint(t,e))for(var n=this.series,i=void 0,r=n.length-1;r>=0;r--){var o=n[r];if(o.visible&&(i=o.pickGroup.pickNode(t,e)))return{series:o,node:i}}},e.prototype.pickClosestSeriesNodeDatum=function(t,e){if(this.seriesRect&&this.seriesRect.containsPoint(t,e)){for(var n,i=this.series,r=1/0,o=function(o){var a=i[o];if(!a.visible)return"continue";var s=a.group.transformPoint(t,e);a.getNodeData().forEach((function(t){if(t.point){var e,i,o=(e=s,i=t.point,Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)));o<r&&(r=o,n=t)}}))},a=i.length-1;a>=0;a--)o(a);return n}},e.prototype.onMouseMove=function(t){this.handleLegendMouseMove(t),this.tooltip.enabled&&(this.tooltip.delay>0&&this.tooltip.toggle(!1),this.handleTooltip(t))},e.prototype.handleTooltip=function(t){var e,n=this.lastPick,i=this.tooltip.tracking,r=t.offsetX,o=t.offsetY,a=this.pickSeriesNode(r,o);if(a&&a.node instanceof P){var s=a.node;if(e=s.datum,n&&n.datum===e&&(n.node=s,n.event=t),!s.datum.point||!i)return void(n&&n.node===s?a.series.tooltip.enabled&&this.tooltip.show(t):this.onSeriesDatumPick(t,s.datum,s,t))}var h=!1;if(i){var c=this.pickClosestSeriesNodeDatum(r,o);if(c&&c.point){var l=c.point,u=l.x,f=l.y,p=this.scene.canvas,d=c.series.group.inverseTransformPoint(u,f),y=p.element.getBoundingClientRect();this.onSeriesDatumPick({pageX:Math.round(y.left+window.pageXOffset+d.x),pageY:Math.round(y.top+window.pageYOffset+d.y)},c,e===c&&a?a.node:void 0,t)}else h=!0}!n||!h&&i||(this.dehighlightDatum(),this.tooltip.toggle(!1),this.lastPick=void 0)},e.prototype.onMouseDown=function(t){},e.prototype.onMouseUp=function(t){},e.prototype.onMouseOut=function(t){this.tooltip.toggle(!1)},e.prototype.onClick=function(t){this.checkSeriesNodeClick()||this.checkLegendClick(t)||this.fireEvent({type:"click",event:t})},e.prototype.checkSeriesNodeClick=function(){var t=this.lastPick;if(t&&t.event&&t.node){var e=t.event,n=t.datum;return n.series.fireNodeClickEvent(e,n),!0}return!1},e.prototype.onSeriesNodeClick=function(t){this.fireEvent(ii(ii({},t),{type:"seriesNodeClick"}))},e.prototype.checkLegendClick=function(t){var e=this.legend.getDatumForPoint(t.offsetX,t.offsetY);if(e){var n=e.id,i=e.itemId,r=e.enabled,o=vt(this.series,(function(t){return t.id===n}));if(o)return o.toggleSeriesItem(i,!r),r&&this.tooltip.toggle(!1),this.legend.fireEvent({type:"click",event:t,itemId:i,enabled:!r}),!0}return!1},e.prototype.handleLegendMouseMove=function(t){if(this.legend.enabled){var e=t.offsetX,n=t.offsetY,i=this.legend.getDatumForPoint(e,n);if(this.legendBBox.containsPoint(e,n))this.pointerInsideLegend||(this.pointerInsideLegend=!0);else if(this.pointerInsideLegend)return this.pointerInsideLegend=!1,void(this.highlightedDatum&&(this.highlightedDatum=void 0,this.series.forEach((function(t){return t.updatePending=!0}))));var r=this.highlightedDatum;if(i){var o=i.id,a=i.itemId;if(i.enabled){var s=vt(this.series,(function(t){return t.id===o}));s&&(this.highlightedDatum={series:s,itemId:a,datum:void 0})}}(this.highlightedDatum&&!r||this.highlightedDatum&&r&&(this.highlightedDatum.series!==r.series||this.highlightedDatum.itemId!==r.itemId))&&this.series.forEach((function(t){return t.updatePending=!0}))}},e.prototype.onSeriesDatumPick=function(t,e,n,i){var r=this.lastPick;if(r){if(r.datum===e)return;this.dehighlightDatum()}this.lastPick={datum:e,node:n,event:i},this.highlightDatum(e);var o=e.series.tooltip.enabled&&e.series.getTooltipHtml(e);o&&this.tooltip.show(t,o)},e.prototype.highlightDatum=function(t){this.scene.canvas.element.style.cursor=t.series.cursor,this.highlightedDatum=t,this.series.forEach((function(t){return t.updatePending=!0}))},e.prototype.dehighlightDatum=function(){this.scene.canvas.element.style.cursor="default",this.highlightedDatum=void 0,this.series.forEach((function(t){return t.updatePending=!0}))},e.defaultTooltipClass="ag-chart-tooltip",e.tooltipDocuments=[],ri([i("layoutChange")],e.prototype,"title",void 0),ri([i("layoutChange")],e.prototype,"subtitle",void 0),e}(n),ci=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),li=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContainerNode=!0,e.path=new Wt,e._enabled=!0,e._dirtyPath=!0,e._x=0,e._y=0,e._width=10,e._height=10,e}return ci(e,t),e.prototype.containsPoint=function(t,e){var n=this.transformPoint(t,e);return n.x>=this.x&&n.x<=this.x+this.width&&n.y>=this.y&&n.y<=this.y+this.height},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled!==t&&(this._enabled=t,this.dirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirtyPath",{get:function(){return this._dirtyPath},set:function(t){this._dirtyPath!==t&&(this._dirtyPath=t,t&&(this.dirty=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width!==t&&(this._width=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height!==t&&(this._height=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),e.prototype.updatePath=function(){var t=this.path;t.clear(),t.rect(this.x,this.y,this.width,this.height),this.dirtyPath=!1},e.prototype.computeBBox=function(){var t=this.x,e=this.y,n=this.width,i=this.height;return new h(t,e,n,i)},e.prototype.render=function(t){this.enabled&&(this.dirtyPath&&this.updatePath(),this.path.draw(t),t.clip());for(var e=this.children,n=e.length,i=0;i<n;i++){t.save();var r=e[i];r.visible&&r.render(t),t.restore()}},e.className="ClipRect",e}(d),ui=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._fill="#f2f2f2",e._stroke="#999999",e._strokeWidth=1,e._lineCap="square",e._centerX=0,e._centerY=0,e._width=8,e._gripLineGap=2,e._gripLineLength=8,e._height=16,e}return ui(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this._centerX},set:function(t){this._centerX!==t&&(this._centerX=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this._centerY},set:function(t){this._centerY!==t&&(this._centerY=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width!==t&&(this._width=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gripLineGap",{get:function(){return this._gripLineGap},set:function(t){this._gripLineGap!==t&&(this._gripLineGap=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gripLineLength",{get:function(){return this._gripLineLength},set:function(t){this._gripLineLength!==t&&(this._gripLineLength=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height!==t&&(this._height=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),e.prototype.computeBBox=function(){var t=this.centerX,e=this.centerY,n=this.width,i=this.height;return new h(t-n/2,e-i/2,n,i)},e.prototype.isPointInPath=function(t,e){var n=this.transformPoint(t,e);return this.computeBBox().containsPoint(n.x,n.y)},e.prototype.updatePath=function(){var t=this,e=t.path,n=t.centerX,i=t.centerY,r=t.width,o=t.height,a=this.alignment,s=this.align;e.clear();var h=n-r/2,c=i-o/2,l=s(a,h),u=s(a,c),f=l+s(a,h,r),p=u+s(a,c,o);e.moveTo(l,u),e.lineTo(f,u),e.lineTo(f,p),e.lineTo(l,p),e.lineTo(l,u);var d=this.gripLineGap/2,y=this.gripLineLength/2;e.moveTo(s(a,n-d),s(a,i-y)),e.lineTo(s(a,n-d),s(a,i+y)),e.moveTo(s(a,n+d),s(a,i-y)),e.lineTo(s(a,n+d),s(a,i+y))},e.className="RangeHandle",e}(Kt),pi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),di=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._stroke="#999999",e._strokeWidth=1,e._fill="#999999",e._fillOpacity=.2,e._lineCap="square",e._x=0,e._y=0,e._width=200,e._height=30,e.minRange=.05,e._min=0,e._max=1,e}return pi(e,t),Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width!==t&&(this._width=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height!==t&&(this._height=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(t){t=Math.min(Math.max(t,0),this.max-this.minRange),isNaN(t)||this._min!==t&&(this._min=t,this.dirtyPath=!0,this.onRangeChange&&this.onRangeChange(t,this.max))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(t){t=Math.max(Math.min(t,1),this.min+this.minRange),isNaN(t)||this._max!==t&&(this._max=t,this.dirtyPath=!0,this.onRangeChange&&this.onRangeChange(this.min,t))},enumerable:!0,configurable:!0}),e.prototype.computeBBox=function(){var t=this.x,e=this.y,n=this.width,i=this.height;return new h(t,e,n,i)},e.prototype.computeVisibleRangeBBox=function(){var t=this,e=t.x,n=t.y,i=t.width,r=t.height,o=t.min,a=t.max,s=e+i*o;return new h(s,n,e+i*a-s,r)},e.prototype.updatePath=function(){var t=this,e=t.path,n=t.x,i=t.y,r=t.width,o=t.height,a=t.min,s=t.max,h=this.alignment,c=this.align;e.clear();var l=c(h,n),u=c(h,i),f=l+c(h,n,r),p=u+c(h,i,o);e.moveTo(l,u),e.lineTo(f,u),e.lineTo(f,p),e.lineTo(l,p),e.lineTo(l,u);var d=c(h,n+r*a),y=c(h,n+r*s);e.moveTo(d,u),e.lineTo(d,p),e.lineTo(y,p),e.lineTo(y,u),e.lineTo(d,u)},e.className="RangeMask",e}(Kt),yi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gi=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.isContainerNode=!0,n.minHandle=new fi,n.maxHandle=new fi,n.mask=function(){var t=e.defaults,i=t.x,r=t.y,o=t.width,a=t.height,s=t.min,h=t.max,c=new di;c.x=i,c.y=r,c.width=o,c.height=a,c.min=s,c.max=h;var l=n,u=l.minHandle,f=l.maxHandle;return u.centerX=i,f.centerX=i+o,u.centerY=f.centerY=r+a/2,n.append([c,u,f]),c.onRangeChange=function(t,e){n.updateHandles(),n.onRangeChange&&n.onRangeChange(t,e)},c}(),n._x=e.defaults.x,n._y=e.defaults.y,n._width=e.defaults.width,n._height=e.defaults.height,n._min=e.defaults.min,n._max=e.defaults.max,n}return yi(e,t),Object.defineProperty(e.prototype,"x",{get:function(){return this.mask.x},set:function(t){this.mask.x=t,this.updateHandles()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.mask.y},set:function(t){this.mask.y=t,this.updateHandles()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.mask.width},set:function(t){this.mask.width=t,this.updateHandles()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.mask.height},set:function(t){this.mask.height=t,this.updateHandles()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this.mask.min},set:function(t){this.mask.min=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this.mask.max},set:function(t){this.mask.max=t},enumerable:!0,configurable:!0}),e.prototype.updateHandles=function(){var t=this,e=t.minHandle,n=t.maxHandle,i=t.x,r=t.y,o=t.width,a=t.height,s=t.mask;e.centerX=i+o*s.min,n.centerX=i+o*s.max,e.centerY=n.centerY=r+a/2},e.prototype.computeBBox=function(){return this.mask.computeBBox()},e.prototype.computeVisibleRangeBBox=function(){return this.mask.computeVisibleRangeBBox()},e.prototype.render=function(t){this.dirtyTransform&&this.computeTransformMatrix(),this.matrix.toContext(t),[this.mask,this.minHandle,this.maxHandle].forEach((function(e){t.save(),e.visible&&e.render(t),t.restore()}))},e.className="Range",e.defaults={x:0,y:0,width:200,height:30,min:0,max:1},e}(Mt),mi=function(){function t(t){this.rm=t}return Object.defineProperty(t.prototype,"fill",{get:function(){return this.rm.fill},set:function(t){this.rm.fill=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this.rm.stroke},set:function(t){this.rm.stroke=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strokeWidth",{get:function(){return this.rm.strokeWidth},set:function(t){this.rm.strokeWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fillOpacity",{get:function(){return this.rm.fillOpacity},set:function(t){this.rm.fillOpacity=t},enumerable:!0,configurable:!0}),t}(),vi=function(){function t(t){this.rh=t}return Object.defineProperty(t.prototype,"fill",{get:function(){return this.rh.fill},set:function(t){this.rh.fill=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this.rh.stroke},set:function(t){this.rh.stroke=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strokeWidth",{get:function(){return this.rh.strokeWidth},set:function(t){this.rh.strokeWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.rh.width},set:function(t){this.rh.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.rh.height},set:function(t){this.rh.height=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gripLineGap",{get:function(){return this.rh.gripLineGap},set:function(t){this.rh.gripLineGap=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gripLineLength",{get:function(){return this.rh.gripLineLength},set:function(t){this.rh.gripLineLength=t},enumerable:!0,configurable:!0}),t}(),bi=function(){function e(t){var e=this;this.rs=new gi,this.mask=new mi(this.rs.mask),this.minHandle=new vi(this.rs.minHandle),this.maxHandle=new vi(this.rs.maxHandle),this.minHandleDragging=!1,this.maxHandleDragging=!1,this.panHandleOffset=NaN,this._margin=10,this.chart=t,t.scene.root.append(this.rs),this.rs.onRangeChange=function(t,n){return e.updateAxes(t,n)}}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this.rs.visible},set:function(t){this.rs.visible=t,this.chart.layoutPending=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.rs.x},set:function(t){this.rs.x=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.rs.y},set:function(t){this.rs.y=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.rs.width},set:function(t){this.rs.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.rs.height},set:function(t){this.rs.height=t,this.chart.layoutPending=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"margin",{get:function(){return this._margin},set:function(t){this._margin=t,this.chart.layoutPending=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this.rs.min},set:function(t){this.rs.min=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this.rs.max},set:function(t){this.rs.max=t},enumerable:!0,configurable:!0}),e.prototype.updateAxes=function(e,n){var i=this.chart,r=!1;i.axes.forEach((function(i){i.direction===t.ChartAxisDirection.X&&(!r&&(e>0||n<1)&&(r=!0),i.visibleRange=[e,n],i.update())})),i.seriesRoot.enabled=r,i.series.forEach((function(t){return t.nodeDataPending=!0}))},e.prototype.onDragStart=function(t){if(this.enabled){var e=t.offsetX,n=t.offsetY,i=this.rs,r=i.minHandle,o=i.maxHandle,a=i.x,s=i.width,h=i.min,c=i.computeVisibleRangeBBox();this.minHandleDragging||this.maxHandleDragging||(r.containsPoint(e,n)?this.minHandleDragging=!0:o.containsPoint(e,n)?this.maxHandleDragging=!0:c.containsPoint(e,n)&&(this.panHandleOffset=(e-a)/s-h))}},e.prototype.onDrag=function(t){if(this.enabled){var e=this.rs,n=this.panHandleOffset,i=e.x,r=e.y,o=e.width,a=e.height,s=e.minHandle,c=e.maxHandle,l=this.chart.element.style,u=t.offsetX,f=t.offsetY,p=i+o*e.min,d=i+o*e.max,y=new h(p,r,d-p,a);if(s.containsPoint(u,f)||c.containsPoint(u,f)?l.cursor="ew-resize":y.containsPoint(u,f)?l.cursor="grab":l.cursor="default",this.minHandleDragging)e.min=v();else if(this.maxHandleDragging)e.max=v();else if(!isNaN(n)){var g=e.max-e.min,m=Math.min(v()-n,1-g);m<=e.min?(e.min=m,e.max=e.min+g):(e.max=m+g,e.min=e.max-g)}}function v(){return Math.min(Math.max((u-i)/o,0),1)}},e.prototype.onDragStop=function(){this.stopHandleDragging()},e.prototype.stopHandleDragging=function(){this.minHandleDragging=this.maxHandleDragging=!1,this.panHandleOffset=NaN},e}(),xi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_i=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},wi=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(_i(arguments[e]));return t},Oi=function(e){function n(t){void 0===t&&(t=window.document);var n=e.call(this,t)||this;n._seriesRoot=new li,n.navigator=new bi(n),n.scene.root.visible=!1;var i=n.scene.root;return i.append(n.seriesRoot),i.append(n.legend.group),n.navigator.enabled=!1,n}return xi(n,e),Object.defineProperty(n.prototype,"seriesRoot",{get:function(){return this._seriesRoot},enumerable:!0,configurable:!0}),n.prototype.performLayout=function(){if(!this.dataPending){this.scene.root.visible=!0;var e=this,n=e.width,i=e.height,r=e.axes,o=e.legend,a=e.navigator,s=new h(0,0,n,i);if(this.positionCaptions(),this.positionLegend(),o.enabled&&o.data.length){var c=this.legendAutoPadding,l=this.legend.spacing;switch(s.x+=c.left,s.y+=c.top,s.width-=c.left+c.right,s.height-=c.top+c.bottom,this.legend.position){case"right":s.width-=l;break;case"bottom":s.height-=l;break;case"left":s.x+=l,s.width-=l;break;case"top":s.y+=l,s.height-=l}}var u=this.captionAutoPadding,f=this.padding;this.updateAxes(),s.x+=f.left,s.width-=f.left+f.right,s.y+=f.top+u,s.height-=f.top+u+f.bottom,a.enabled&&(s.height-=a.height+a.margin);var p=0,d={top:!1,right:!1,bottom:!1,left:!1,angle:!1,radius:!1};r.forEach((function(e){e.group.visible=!0;var n=Math.floor(e.thickness||e.computeBBox().width),i=e.title&&e.title.padding.top||15;switch(d[e.position]&&(n+=i),e.position){case t.ChartAxisPosition.Top:d[t.ChartAxisPosition.Top]=!0,s.y+=n,s.height-=n,e.translation.y=Math.floor(s.y+1),e.label.mirrored=!0;break;case t.ChartAxisPosition.Right:d[t.ChartAxisPosition.Right]=!0,s.width-=n,e.translation.x=Math.floor(s.x+s.width),e.label.mirrored=!0;break;case t.ChartAxisPosition.Bottom:d[t.ChartAxisPosition.Bottom]=!0,s.height-=n,p+=n,e.translation.y=Math.floor(s.y+s.height+1);break;case t.ChartAxisPosition.Left:d[t.ChartAxisPosition.Left]=!0,s.x+=n,s.width-=n,e.translation.x=Math.floor(s.x)}})),r.forEach((function(e){switch(e.position){case t.ChartAxisPosition.Top:case t.ChartAxisPosition.Bottom:e.translation.x=Math.floor(s.x),e.range=[0,s.width],e.gridLength=s.height;break;case t.ChartAxisPosition.Left:case t.ChartAxisPosition.Right:e.translation.y=Math.floor(s.y),e.range=e instanceof ye||e instanceof Pe?[0,s.height]:[s.height,0],e.gridLength=s.width}})),this.createNodeData(),this.seriesRect=s,this.series.forEach((function(t){t.group.translationX=Math.floor(s.x),t.group.translationY=Math.floor(s.y),t.update()}));var y=this.seriesRoot;y.x=s.x,y.y=s.y,y.width=s.width,y.height=s.height,a.enabled&&(a.x=s.x,a.y=s.y+s.height+p+a.margin,a.width=s.width),this.axes.forEach((function(t){return t.update()}))}},n.prototype.initSeries=function(t){e.prototype.initSeries.call(this,t)},n.prototype.freeSeries=function(t){e.prototype.freeSeries.call(this,t)},n.prototype.setupDomListeners=function(t){e.prototype.setupDomListeners.call(this,t),this._onTouchStart=this.onTouchStart.bind(this),this._onTouchMove=this.onTouchMove.bind(this),this._onTouchEnd=this.onTouchEnd.bind(this),this._onTouchCancel=this.onTouchCancel.bind(this),t.addEventListener("touchstart",this._onTouchStart,{passive:!0}),t.addEventListener("touchmove",this._onTouchMove,{passive:!0}),t.addEventListener("touchend",this._onTouchEnd,{passive:!0}),t.addEventListener("touchcancel",this._onTouchCancel,{passive:!0})},n.prototype.cleanupDomListeners=function(t){e.prototype.cleanupDomListeners.call(this,t),t.removeEventListener("touchstart",this._onTouchStart),t.removeEventListener("touchmove",this._onTouchMove),t.removeEventListener("touchend",this._onTouchEnd),t.removeEventListener("touchcancel",this._onTouchCancel)},n.prototype.getTouchOffset=function(t){var e=this.scene.canvas.element.getBoundingClientRect(),n=t.touches[0];return n?{offsetX:n.clientX-e.left,offsetY:n.clientY-e.top}:void 0},n.prototype.onTouchStart=function(t){var e=this.getTouchOffset(t);e&&this.navigator.onDragStart(e)},n.prototype.onTouchMove=function(t){var e=this.getTouchOffset(t);e&&this.navigator.onDrag(e)},n.prototype.onTouchEnd=function(t){this.navigator.onDragStop()},n.prototype.onTouchCancel=function(t){this.navigator.onDragStop()},n.prototype.onMouseDown=function(t){e.prototype.onMouseDown.call(this,t),this.navigator.onDragStart(t)},n.prototype.onMouseMove=function(t){e.prototype.onMouseMove.call(this,t),this.navigator.onDrag(t)},n.prototype.onMouseUp=function(t){e.prototype.onMouseUp.call(this,t),this.navigator.onDragStop()},n.prototype.onMouseOut=function(t){e.prototype.onMouseOut.call(this,t),this.navigator.onDragStop()},n.prototype.assignAxesToSeries=function(t){void 0===t&&(t=!1),e.prototype.assignAxesToSeries.call(this,t),this.series.forEach((function(t){t.xAxis||console.warn("Could not find a matching xAxis for the "+t.id+" series."),t.yAxis||console.warn("Could not find a matching yAxis for the "+t.id+" series.")}))},n.prototype.updateAxes=function(){var e,n=this.navigator,i=!1;this.axes.forEach((function(r){var o,a=r.direction,s=r.boundSeries;if(r.linkedTo)r.domain=r.linkedTo.domain;else{var h=[];s.filter((function(t){return t.visible})).forEach((function(t){h.push(t.getDomain(a))}));var c=(o=new Array).concat.apply(o,wi(h)),l="y"===r.direction;r instanceof ue&&l?(r.setDomain(c,e),e=e||r.scale.ticks(r.tick.count).length):r.domain=c}r.direction===t.ChartAxisDirection.X&&(r.visibleRange=[n.min,n.max]),!i&&(r.visibleRange[0]>0||r.visibleRange[1]<1)&&(i=!0),r.update()})),this.seriesRoot.enabled=i},n.className="CartesianChart",n.type="cartesian",n}(hi),ki=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Si=function(t){function e(e){void 0===e&&(e=window.document);var n=t.call(this,e)||this;n._data={},n._seriesRoot=new li,n.scene.root.visible=!1;var i=n.scene.root;return i.append(n.seriesRoot),i.append(n.legend.group),n}return ki(e,t),Object.defineProperty(e.prototype,"seriesRoot",{get:function(){return this._seriesRoot},enumerable:!0,configurable:!0}),e.prototype.performLayout=function(){if(!this.dataPending){this.scene.root.visible=!0;var t=this.width,e=this.height,n=this.legend,i=new h(0,0,t,e);if(this.positionCaptions(),this.positionLegend(),n.enabled&&n.data.length){var r=this.legendAutoPadding,o=this.legend.spacing;switch(i.x+=r.left,i.y+=r.top,i.width-=r.left+r.right,i.height-=r.top+r.bottom,this.legend.position){case"right":i.width-=o;break;case"bottom":i.height-=o;break;case"left":i.x+=o,i.width-=o;break;case"top":i.y+=o,i.height-=o}}var a=this.captionAutoPadding,s=this.padding;i.x+=s.left,i.width-=s.left+s.right,i.y+=s.top+a,i.height-=s.top+a+s.bottom,this.seriesRect=i,this.series.forEach((function(t){t.group.translationX=Math.floor(i.x),t.group.translationY=Math.floor(i.y),t.update()}));var c=this.seriesRoot;c.x=i.x,c.y=i.y,c.width=i.width,c.height=i.height}},e.className="HierarchyChart",e.type="hierarchy",e}(hi),Pi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Di=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},Ci=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Di(arguments[e]));return t},Mi=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Pi(n,e),n.prototype.updateAxes=function(){this.axes.forEach((function(e){var n,i=e.direction,r=e.boundSeries,o=[],a=void 0;r.filter((function(t){return t.visible})).forEach((function(e){if(i===t.ChartAxisDirection.X)if(void 0===a){var n=e.getDomain(i);o.push(n),a="number"==typeof n[0]}else a&&o.push(e.getDomain(i));else o.push(e.getDomain(i))}));var s=(n=new Array).concat.apply(n,Ci(o));e.domain=xt(s,Dt)||s,e.update()}))},n.className="GroupedCategoryChart",n.type="groupedCategory",n}(Oi),Ai=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ji=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},Ti=function(t){function e(){var e=t.call(this)||this;return e.enabled=!0,e.fontSize=12,e.fontFamily="Verdana, sans-serif",e.color="rgba(70, 70, 70, 1)",e}return Ai(e,t),e.prototype.getFont=function(){return A(this.fontSize,this.fontFamily,this.fontStyle,this.fontWeight)},ji([i("change","dataChange")],e.prototype,"enabled",void 0),ji([i("change")],e.prototype,"fontSize",void 0),ji([i("change")],e.prototype,"fontFamily",void 0),ji([i("change")],e.prototype,"fontStyle",void 0),ji([i("change")],e.prototype,"fontWeight",void 0),ji([i("change")],e.prototype,"color",void 0),e}(n),Li=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Fi=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},Ni=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},Ei=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Ni(arguments[e]));return t},zi=function(){this.fill="yellow",this.stroke=void 0,this.strokeWidth=void 0},Bi=function(){this.strokeWidth=void 0,this.dimOpacity=void 0},Wi=function(){this.fill=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.item=new zi,this.series=new Bi},Ii=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.enabled=!0,e}return Li(e,t),Fi([i("change")],e.prototype,"enabled",void 0),e}(n),Ki=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.id=u(n),n.group=new Mt,n.pickGroup=n.group.appendChild(new Mt),n.directions=[t.ChartAxisDirection.X,t.ChartAxisDirection.Y],n.directionKeys={},n.label=new Ti,n.data=void 0,n.visible=!0,n.showInLegend=!0,n.cursor="default",n._nodeDataPending=!0,n._updatePending=!1,n.highlightStyle=new Wi,n.scheduleLayout=function(){n.fireEvent({type:"layoutChange"})},n.scheduleData=function(){n.fireEvent({type:"dataChange"})},n}return Li(n,e),Object.defineProperty(n.prototype,"type",{get:function(){return this.constructor.type||""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"grouped",{set:function(t){if(!0===t)throw new Error("AG Charts - grouped: true is unsupported for series of type: "+this.type)},enumerable:!0,configurable:!0}),n.prototype.setColors=function(t,e){},n.prototype.getKeys=function(t){var e=this,n=this.directionKeys,i=n&&n[t],r=[];return i&&i.forEach((function(t){var n=e[t];n&&(Array.isArray(n)?r.push.apply(r,Ei(n)):r.push(n))})),r},n.prototype.createNodeData=function(){return[]},n.prototype.getNodeData=function(){return[]},n.prototype.getLabelData=function(){return[]},Object.defineProperty(n.prototype,"nodeDataPending",{get:function(){return this._nodeDataPending},set:function(t){this._nodeDataPending!==t&&(this._nodeDataPending=t,this.updatePending=!0,t&&this.chart&&(this.chart.updatePending=t))},enumerable:!0,configurable:!0}),n.prototype.scheduleNodeDate=function(){this.nodeDataPending=!0},Object.defineProperty(n.prototype,"updatePending",{get:function(){return this._updatePending},set:function(t){this._updatePending!==t&&(this._updatePending=t,t&&this.chart&&(this.chart.updatePending=t))},enumerable:!0,configurable:!0}),n.prototype.scheduleUpdate=function(){this.updatePending=!0},n.prototype.getOpacity=function(t){var e=this.chart,n=this.highlightStyle.series.dimOpacity,i=void 0===n?1:n;return e&&e.highlightedDatum&&(e.highlightedDatum.series!==this||t&&e.highlightedDatum.itemId!==t.itemId)?i:1},n.prototype.getStrokeWidth=function(t,e){var n=this.chart,i=this.highlightStyle.series.strokeWidth;return!n||!n.highlightedDatum||n.highlightedDatum.series!==this||e&&n.highlightedDatum.itemId!==e.itemId||void 0===i?t:i},n.prototype.fireNodeClickEvent=function(t,e){},n.prototype.toggleSeriesItem=function(t,e){this.visible=e},n.prototype.onHighlightChange=function(){},n.prototype.fixNumericExtent=function(t,e){if(!t)return[0,1];var n=Ni(t,2),i=n[0],r=n[1];if((i=+i)==(r=+r)){var o=Math.abs(.01*i);i-=o,r+=o}return Ot(i)&&Ot(r)||(i=0,r=1),[i,r]},n.highlightedZIndex=1e12,Fi([i("dataChange")],n.prototype,"data",void 0),Fi([i("dataChange")],n.prototype,"visible",void 0),Fi([i("layoutChange")],n.prototype,"showInLegend",void 0),n}(n),Ri=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yi=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},Xi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.enabled=!0,e.shape=Ln,e.size=6,e.maxSize=30,e.strokeWidth=1,e}return Ri(e,t),Yi([i("change")],e.prototype,"enabled",void 0),Yi([i("change")],e.prototype,"shape",void 0),Yi([i("change")],e.prototype,"size",void 0),Yi([i("change")],e.prototype,"maxSize",void 0),Yi([i("change")],e.prototype,"domain",void 0),Yi([i("change")],e.prototype,"fill",void 0),Yi([i("change")],e.prototype,"stroke",void 0),Yi([i("change")],e.prototype,"strokeWidth",void 0),Yi([i("change")],e.prototype,"fillOpacity",void 0),Yi([i("change")],e.prototype,"strokeOpacity",void 0),e}(n),Hi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ui=function(e){function n(){var n,i=null!==e&&e.apply(this,arguments)||this;return i.directionKeys=((n={})[t.ChartAxisDirection.X]=["angleKey"],n[t.ChartAxisDirection.Y]=["radiusKey"],n),i.centerX=0,i.centerY=0,i.radius=0,i}return Hi(n,e),n}(Ki),Gi=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Hi(e,t)}(Xi),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Vi=function(t){function e(e){void 0===e&&(e=window.document);var n=t.call(this,e)||this;return n.padding=new s(40),n.scene.root.append(n.legend.group),n.padding.addEventListener("layoutChange",n.scheduleLayout,n),n}return Gi(e,t),Object.defineProperty(e.prototype,"seriesRoot",{get:function(){return this.scene.root},enumerable:!0,configurable:!0}),e.prototype.performLayout=function(){var t=new h(0,0,this.width,this.height);this.positionCaptions(),this.positionLegend();var e=this.captionAutoPadding;if(t.y+=e,t.height-=e,this.legend.enabled&&this.legend.data.length){var n=this.legendAutoPadding;t.x+=n.left,t.y+=n.top,t.width-=n.left+n.right,t.height-=n.top+n.bottom;var i=this.legend.spacing;switch(this.legend.position){case"right":t.width-=i;break;case"bottom":t.height-=i;break;case"left":t.x+=i,t.width-=i;break;case"top":t.y+=i,t.height-=i}}var r=this.padding;t.x+=r.left,t.y+=r.top,t.width-=r.left+r.right,t.height-=r.top+r.bottom,this.seriesRect=t;var o=t.x+t.width/2,a=t.y+t.height/2,s=Math.max(0,Math.min(t.width,t.height)/2);this.series.forEach((function(t){t instanceof Ui&&(t.centerX=o,t.centerY=a,t.radius=s,t.update())}))},e.className="PolarChart",e.type="polar",e}(hi),qi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zi=function(e){function n(){var n,i=null!==e&&e.apply(this,arguments)||this;return i.directionKeys=((n={})[t.ChartAxisDirection.X]=["xKey"],n[t.ChartAxisDirection.Y]=["yKey"],n),i}return qi(n,e),n.prototype.checkDomainXY=function(t,e,n,i){return(n&&Dt(t)||Pt(t))&&(i&&Dt(e)||Pt(e))?[t,e]:void 0},n.prototype.checkRangeXY=function(t,e,n,i){return!isNaN(t)&&!isNaN(e)&&n.inRange(t)&&i.inRange(e)},n}(Ki),Ji=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return qi(e,t),e}(Xi);function $i(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var n,i=void 0;if(Array.isArray(t)){if((n=t.length)!=e.length)return!1;for(i=n;0!=i--;)if(!$i(t[i],e[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();var r=Object.keys(t);if((n=r.length)!==Object.keys(e).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(e,r[i]))return!1;for(i=n;0!=i--;){var o=r[i];if(!$i(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}var Qi=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},tr=/(#\{(.*?)\})/g;function er(t,e,n){return t.replace(tr,(function(){var t=arguments[2],i=Qi(t.split(":"),2),r=i[0],o=i[1],a=e[r];if("number"==typeof a){if(l=o&&n&&n[o]){var s=l,h=s.locales,c=s.options;return a.toLocaleString(h,c)}return String(a)}if(a instanceof Date){var l;if("string"==typeof(l=o&&n&&n[o])){var u=rn.format(l);return u(a)}return a.toDateString()}return"string"==typeof a||a&&a.toString?String(a):""}))}var nr=null;function ir(t){return nr=nr||document.createElement("div"),t?(nr.innerText=t,nr.innerHTML):""}var rr,or,ar=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),sr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},hr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ar(e,t),sr([i("change")],e.prototype,"formatter",void 0),e}(Ti),lr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ar(e,t),sr([i("change")],e.prototype,"renderer",void 0),sr([i("change")],e.prototype,"format",void 0),e}(Ii),ur=function(e){function n(){var t=e.call(this)||this;t.tooltip=new lr,t.areaGroup=t.group.insertBefore(new Mt,t.pickGroup),t.strokeGroup=t.group.insertBefore(new Mt,t.pickGroup),t.markerGroup=t.pickGroup.appendChild(new Mt),t.labelGroup=t.group.appendChild(new Mt),t.fillSelection=jt.select(t.areaGroup).selectAll(),t.strokeSelection=jt.select(t.strokeGroup).selectAll(),t.markerSelection=jt.select(t.markerGroup).selectAll(),t.labelSelection=jt.select(t.labelGroup).selectAll(),t.seriesItemEnabled=new Map,t.xData=[],t.yData=[],t.areaSelectionData=[],t.markerSelectionData=[],t.labelSelectionData=[],t.yDomain=[],t.directionKeys={x:["xKey"],y:["yKeys"]},t.marker=new Ji,t.label=new cr,t.fills=["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],t.strokes=["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"],t.fillOpacity=1,t.strokeOpacity=1,t.lineDash=[0],t.lineDashOffset=0,t._xKey="",t.xName="",t._yKeys=[],t.yNames=[],t.strokeWidth=2,t.addEventListener("update",t.scheduleUpdate);var n=t,i=n.marker,r=n.label;return i.enabled=!1,i.addPropertyListener("shape",t.onMarkerShapeChange,t),i.addEventListener("change",t.scheduleUpdate,t),r.enabled=!1,r.addEventListener("change",t.scheduleUpdate,t),t}return ar(n,e),n.prototype.onMarkerShapeChange=function(){this.markerSelection=this.markerSelection.setData([]),this.markerSelection.exit.remove(),this.fireEvent({type:"legendChange"})},Object.defineProperty(n.prototype,"xKey",{get:function(){return this._xKey},set:function(t){this._xKey!==t&&(this._xKey=t,this.xData=[],this.scheduleData())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"yKeys",{get:function(){return this._yKeys},set:function(t){if(!$i(this._yKeys,t)){this._yKeys=t,this.yData=[];var e=this.seriesItemEnabled;e.clear(),t.forEach((function(t){return e.set(t,!0)})),this.scheduleData()}},enumerable:!0,configurable:!0}),n.prototype.setColors=function(t,e){this.fills=t,this.strokes=e},Object.defineProperty(n.prototype,"normalizedTo",{get:function(){return this._normalizedTo},set:function(t){var e=t?Math.abs(t):void 0;this._normalizedTo!==e&&(this._normalizedTo=e,this.scheduleData())},enumerable:!0,configurable:!0}),n.prototype.processData=function(){var t=this.xKey,e=this.yKeys,n=this.seriesItemEnabled,i=t&&e.length&&this.data?this.data:[],r=!0;this.xData=i.map((function(e){return r&&!(t in e)&&(r=!1,console.warn("The key '"+t+"' was not found in the data: ",e)),e[t]})),this.yData=i.map((function(t){return e.map((function(e){r&&!(e in t)&&(r=!1,console.warn("The key '"+e+"' was not found in the data: ",t));var i=t[e];return isFinite(i)&&n.get(e)?i:0}))}));var o,a,s=this.yData,h=this.normalizedTo,c=s.map((function(t){return _t(t)})),l=this.findLargestMinMax(c),u=this.yData.map((function(t){return t.reduce((function(t,e){return t+=Math.abs(e)}),0)}));return h&&isFinite(h)?(o=l.min<0?-h:0,a=l.max>0?h:0,s.forEach((function(t,e){return t.forEach((function(n,i){return t[i]=n/u[e]*h}))}))):(o=l.min,a=l.max),0===o&&0===a&&(a=1),this.yDomain=this.fixNumericExtent([o,a],"y"),this.fireEvent({type:"dataProcessed"}),!0},n.prototype.findLargestMinMax=function(t){var e,n,i=0,r=0;try{for(var o=hr(t),a=o.next();!a.done;a=o.next()){var s=a.value;s.min<i&&(i=s.min),s.max>r&&(r=s.max)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return{min:i,max:r}},n.prototype.getDomain=function(e){return e===t.ChartAxisDirection.X?this.xData:this.yDomain},n.prototype.update=function(){this.updatePending=!1,this.updateSelections(),this.updateNodes()},n.prototype.updateSelections=function(){this.nodeDataPending&&(this.nodeDataPending=!1,this.createSelectionData(),this.updateFillSelection(),this.updateStrokeSelection(),this.updateMarkerSelection(),this.updateLabelSelection())},n.prototype.updateNodes=function(){this.group.visible=this.visible&&this.xData.length>0&&this.yData.length>0,this.updateFillNodes(),this.updateStrokeNodes(),this.updateMarkerNodes(),this.updateLabelNodes()},n.prototype.createSelectionData=function(){var t=this,e=this,n=e.data,i=e.xAxis,r=e.yAxis,o=e.xData,a=e.yData,s=e.areaSelectionData,h=e.markerSelectionData,c=e.labelSelectionData;if(n&&i&&r&&o.length&&a.length){var l=this,u=l.yKeys,f=l.marker,p=l.label,d=l.fills,y=l.strokes,g=i.scale,m=r.scale,v=(g.bandwidth||0)/2,b=(m.bandwidth||0)/2,x=2*o.length-1;s.length=0,h.length=0,c.length=0,o.forEach((function(e,i){var r=a[i],o=n[i],l=g.convert(e)+v,_=0,w=0;r.forEach((function(e,n){var r,a=e<0?_:w,g=m instanceof it,v=m.convert(a+e,g?$:void 0),O=u[n],k=o[O];f&&h.push({index:i,series:t,itemId:O,datum:o,yValue:k,yKey:O,point:{x:l,y:v},fill:d[n%d.length],stroke:y[n%y.length]}),r=p.formatter?p.formatter({value:k}):Ot(k)?k.toFixed(2):String(k),p&&c.push({index:i,itemId:O,point:{x:l,y:v},label:r?{text:r,fontStyle:p.fontStyle,fontWeight:p.fontWeight,fontSize:p.fontSize,fontFamily:p.fontFamily,textAlign:"center",textBaseline:"bottom",fill:p.color}:void 0});var S=(s[n]||(s[n]={itemId:O,points:[]})).points;S[i]={x:l,y:v},S[x-i]={x:l,y:m.convert(a)+b},e<0?_+=e:w+=e}))}))}},n.prototype.updateFillSelection=function(){var t=this.fillSelection.setData(this.areaSelectionData);t.exit.remove();var e=t.enter.append(Kt).each((function(t){t.lineJoin="round",t.stroke=void 0,t.pointerEvents=f.None}));this.fillSelection=t.merge(e)},n.prototype.updateFillNodes=function(){var t=this,e=this,n=e.fills,i=e.fillOpacity,r=e.strokes,o=e.strokeOpacity,a=e.strokeWidth,s=e.shadow,h=e.seriesItemEnabled;this.fillSelection.each((function(e,c,l){var u=e.path;e.fill=n[l%n.length],e.fillOpacity=i,e.stroke=r[l%r.length],e.strokeOpacity=o,e.strokeWidth=a,e.lineDash=t.lineDash,e.lineDashOffset=t.lineDashOffset,e.fillShadow=s,e.visible=!!h.get(c.itemId),e.opacity=t.getOpacity(c),u.clear(),c.points.forEach((function(t,e){var n=t.x,i=t.y;e>0?u.lineTo(n,i):u.moveTo(n,i)})),u.closePath()}))},n.prototype.updateStrokeSelection=function(){var t=this.strokeSelection.setData(this.areaSelectionData);t.exit.remove();var e=t.enter.append(Kt).each((function(t){t.fill=void 0,t.lineJoin=t.lineCap="round",t.pointerEvents=f.None}));this.strokeSelection=t.merge(e)},n.prototype.updateStrokeNodes=function(){var t=this;if(this.data){var e=this.data,n=this.strokes,i=this.strokeOpacity,r=this.seriesItemEnabled;this.strokeSelection.each((function(o,a,s){var h=o.path;o.visible=!!r.get(a.itemId),o.opacity=t.getOpacity(a),o.stroke=n[s%n.length],o.strokeWidth=t.getStrokeWidth(t.strokeWidth,a),o.strokeOpacity=i,o.lineDash=t.lineDash,o.lineDashOffset=t.lineDashOffset,h.clear();for(var c=a.points,l=0;l<e.length;l++){var u=c[l],f=u.x,p=u.y;l>0?h.lineTo(f,p):h.moveTo(f,p)}}))}},n.prototype.updateMarkerSelection=function(){var t=Xn(this.marker.shape),e=t?this.markerSelectionData:[],n=this.markerSelection.setData(e);n.exit.remove();var i=n.enter.append(t);this.markerSelection=n.merge(i)},n.prototype.updateMarkerNodes=function(){var t=this;if(this.chart){var e=this,n=e.xKey,i=e.marker,r=e.seriesItemEnabled,o=e.yKeys,a=e.fills,s=e.strokes,h=e.chart.highlightedDatum,c=e.highlightStyle,l=c.fill,u=c.stroke,f=c.strokeWidth,p=c.item,d=p.fill,y=void 0===d?l:d,g=p.stroke,m=void 0===g?u:g,v=p.strokeWidth,b=void 0===v?f:v,x=i.size,_=i.formatter,w=void 0!==i.strokeWidth?i.strokeWidth:this.strokeWidth;this.markerSelection.each((function(e,c){var l=o.indexOf(c.yKey),u=c===h,f=u&&void 0!==y?y:i.fill||a[l%a.length],p=u&&void 0!==m?m:i.stroke||s[l%a.length],d=u&&void 0!==b?b:w,g=void 0;_&&(g=_({datum:c.datum,xKey:n,yKey:c.yKey,fill:f,stroke:p,strokeWidth:d,size:x,highlighted:u})),e.fill=g&&g.fill||f,e.stroke=g&&g.stroke||p,e.strokeWidth=g&&void 0!==g.strokeWidth?g.strokeWidth:d,e.size=g&&void 0!==g.size?g.size:x,e.translationX=c.point.x,e.translationY=c.point.y,e.visible=i.enabled&&e.size>0&&!!r.get(c.yKey)&&!isNaN(c.point.x),e.opacity=t.getOpacity(c)}))}},n.prototype.updateLabelSelection=function(){var t=this.labelSelection.setData(this.labelSelectionData);t.exit.remove();var e=t.enter.append(M);this.labelSelection=t.merge(e)},n.prototype.updateLabelNodes=function(){var t=this;if(this.chart){var e=this.label,n=e.enabled,i=e.fontStyle,r=e.fontWeight,o=e.fontSize,a=e.fontFamily,s=e.color;this.labelSelection.each((function(e,h){var c=h.point,l=h.label;l&&n?(e.fontStyle=i,e.fontWeight=r,e.fontSize=o,e.fontFamily=a,e.textAlign=l.textAlign,e.textBaseline=l.textBaseline,e.text=l.text,e.x=c.x,e.y=c.y-10,e.fill=s,e.visible=!0,e.opacity=t.getOpacity(h)):e.visible=!1}))}},n.prototype.getNodeData=function(){return this.markerSelectionData},n.prototype.fireNodeClickEvent=function(t,e){this.fireEvent({type:"nodeClick",event:t,series:this,datum:e.datum,xKey:this.xKey,yKey:e.yKey})},n.prototype.getTooltipHtml=function(t){var e=this.xKey,n=t.yKey;if(!e||!n)return"";var i=t.datum,r=i[e],o=i[n],a=this.xAxis,s=this.yAxis;if(!(a&&s&&Ot(o)))return"";var h=a.scale.convert(r),c=s.scale.convert(o);if(!a.inRange(h)||!s.inRange(c))return"";var l=this,u=l.xName,f=l.yKeys,p=l.yNames,d=l.yData,y=l.fills,g=l.strokes,m=l.tooltip,v=l.marker,b=v.size,x=v.formatter,_=v.strokeWidth,w=v.fill,O=v.stroke,k=a.formatDatum(r),S=s.formatDatum(o),P=f.indexOf(n),D=d[t.index][P],C=p[P],M=ir(C),A=ir(k+": "+S),j=void 0!==_?_:this.strokeWidth,T=w||y[P%y.length],L=O||g[P%y.length],F=void 0;x&&(F=x({datum:i,xKey:e,yKey:n,fill:T,stroke:L,strokeWidth:j,size:b,highlighted:!1}));var N=F&&F.fill||w,E={title:M,backgroundColor:N,content:A},z=m.renderer,B=m.format;if(B||z){var W={datum:i,xKey:e,xName:u,xValue:r,yKey:n,yValue:o,processedYValue:D,yName:C,color:N};if(B)return ai({content:er(B,W)},E);if(z)return ai(z(W),E)}return ai(E)},n.prototype.listSeriesItems=function(t){var e=this,n=e.data,i=e.id,r=e.xKey,o=e.yKeys,a=e.yNames,s=e.seriesItemEnabled,h=e.marker,c=e.fills,l=e.strokes,u=e.fillOpacity,f=e.strokeOpacity;n&&n.length&&r&&o.length&&o.forEach((function(e,n){t.push({id:i,itemId:e,enabled:s.get(e)||!1,label:{text:a[n]||o[n]},marker:{shape:h.shape,fill:h.fill||c[n%c.length],stroke:h.stroke||l[n%l.length],fillOpacity:u,strokeOpacity:f}})}))},n.prototype.toggleSeriesItem=function(t,e){this.seriesItemEnabled.set(t,e),this.scheduleData()},n.className="AreaSeries",n.type="area",sr([i("dataChange")],n.prototype,"fills",void 0),sr([i("dataChange")],n.prototype,"strokes",void 0),sr([i("update")],n.prototype,"fillOpacity",void 0),sr([i("update")],n.prototype,"strokeOpacity",void 0),sr([i("update")],n.prototype,"lineDash",void 0),sr([i("update")],n.prototype,"lineDashOffset",void 0),sr([i("update")],n.prototype,"xName",void 0),sr([i("update")],n.prototype,"yNames",void 0),sr([i("update")],n.prototype,"strokeWidth",void 0),sr([i("update")],n.prototype,"shadow",void 0),n}(Zi),fr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},dr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){t[t.Bar=0]="Bar",t[t.Label=1]="Label"}(rr||(rr={})),(or=t.BarLabelPlacement||(t.BarLabelPlacement={})).Inside="inside",or.Outside="outside";var yr,gr=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.placement=t.BarLabelPlacement.Inside,n}return fr(n,e),pr([i("change")],n.prototype,"formatter",void 0),pr([i("change")],n.prototype,"placement",void 0),n}(Ti),mr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return fr(e,t),pr([i("change")],e.prototype,"renderer",void 0),e}(Ii),vr=function(e){function n(){var n,i=e.call(this)||this;return i.rectGroup=i.pickGroup.appendChild(new Mt),i.labelGroup=i.group.appendChild(new Mt),i.rectSelection=jt.select(i.rectGroup).selectAll(),i.labelSelection=jt.select(i.labelGroup).selectAll(),i.nodeData=[],i.xData=[],i.yData=[],i.yDomain=[],i.label=new gr,i.seriesItemEnabled=new Map,i.tooltip=new mr,i.flipXY=!1,i.fills=["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],i.strokes=["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"],i.fillOpacity=1,i.strokeOpacity=1,i.lineDash=[0],i.lineDashOffset=0,i.groupScale=new pe,i.directionKeys=((n={})[t.ChartAxisDirection.X]=["xKey"],n[t.ChartAxisDirection.Y]=["yKeys"],n),i._xKey="",i._xName="",i.cumYKeyCount=[],i.flatYKeys=void 0,i.hideInLegend=[],i._yKeys=[],i._grouped=!1,i._yNames={},i._strokeWidth=1,i.addEventListener("update",i.scheduleUpdate),i.label.enabled=!1,i.label.addEventListener("change",i.scheduleUpdate,i),i}return fr(n,e),n.prototype.getKeys=function(t){var e=this,n=this.directionKeys,i=n&&n[this.flipXY?ae(t):t],r=[];return i&&i.forEach((function(t){var n=e[t];n&&(Array.isArray(n)?r=r.concat(function t(e,n){return void 0===n&&(n=[]),e.forEach((function(e){Array.isArray(e)?t(e,n):n.push(e)})),n}(n)):r.push(n))})),r},Object.defineProperty(n.prototype,"xKey",{get:function(){return this._xKey},set:function(t){this._xKey!==t&&(this._xKey=t,this.xData=[],this.scheduleData())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"xName",{get:function(){return this._xName},set:function(t){this._xName!==t&&(this._xName=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"yKeys",{get:function(){return this._yKeys},set:function(t){var e=this,n=void 0;if(function(t){return t.length>0&&Array.isArray(t[0])}(t)||(n=t,t=this.grouped?n.map((function(t){return[t]})):[n]),!$i(this._yKeys,t)){this.flatYKeys=n||void 0,this._yKeys=t;var i=0;this.cumYKeyCount=[];var r=[];t.forEach((function(t,n){t.length>0&&r.push(String(n)),e.cumYKeyCount.push(i),i+=t.length})),this.yData=[];var o=this.seriesItemEnabled;o.clear(),t.forEach((function(t){t.forEach((function(t){return o.set(t,!0)}))}));var a=this.groupScale;a.domain=r,a.padding=.1,a.round=!0,this.scheduleData()}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"grouped",{get:function(){return this._grouped},set:function(t){this._grouped!==t&&(this._grouped=t,this.flatYKeys&&(this.yKeys=this.flatYKeys))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"yNames",{get:function(){return this._yNames},set:function(t){if(Array.isArray(t)&&this.flatYKeys){var e={};this.flatYKeys.forEach((function(n,i){e[n]=t[i]})),t=e}this._yNames=t,this.scheduleData()},enumerable:!0,configurable:!0}),n.prototype.setColors=function(t,e){this.fills=t,this.strokes=e},Object.defineProperty(n.prototype,"normalizedTo",{get:function(){return this._normalizedTo},set:function(t){var e=t?Math.abs(t):void 0;this._normalizedTo!==e&&(this._normalizedTo=e,this.scheduleData())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(t){this._strokeWidth!==t&&(this._strokeWidth=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shadow",{get:function(){return this._shadow},set:function(t){this._shadow!==t&&(this._shadow=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),n.prototype.onHighlightChange=function(){this.updateRectNodes()},n.prototype.processData=function(){var t=this.xKey,e=this.yKeys,n=this.seriesItemEnabled,i=this.xAxis,r=t&&e.length&&this.data?this.data:[];if(!i)return!1;var o=!0;this.xData=r.map((function(e){return o&&!(t in e)&&(o=!1,console.warn("The key '"+t+"' was not found in the data: ",e)),Pt(e[t])?e[t]:String(e[t])})),this.yData=r.map((function(t){return e.map((function(e){return e.map((function(e){o&&!(e in t)&&(o=!1,console.warn("The key '"+e+"' was not found in the data: ",t));var i=t[e];return isFinite(i)&&n.get(e)?i:0}))}))}));var a,s,h=this.yData.map((function(t){return t.map((function(t){return _t(t)}))})),c=this.yData,l=this.normalizedTo,u=this.yData.map((function(t){return t.map((function(t){return t.reduce((function(t,e){return t+=Math.abs(e)}),0)}))})),f=this.findLargestMinMax(h);return l&&isFinite(l)?(a=f.min<0?-l:0,s=f.max>0?l:0,c.forEach((function(t,e){t.forEach((function(t,n){t.forEach((function(i,r){t[r]=i/u[e][n]*l}))}))}))):(a=f.min,s=f.max),a===s&&0===a&&(s=1),this.yDomain=this.fixNumericExtent([a,s],"y"),this.fireEvent({type:"dataProcessed"}),!0},n.prototype.findLargestMinMax=function(t){var e,n,i,r,o=0,a=0;try{for(var s=dr(t),h=s.next();!h.done;h=s.next()){var c=h.value;try{for(var l=(i=void 0,dr(c)),u=l.next();!u.done;u=l.next()){var f=u.value;f.min<o&&(o=f.min),f.max>a&&(a=f.max)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return{min:o,max:a}},n.prototype.getDomain=function(e){return this.flipXY&&(e=ae(e)),e===t.ChartAxisDirection.X?this.xData:this.yDomain},n.prototype.fireNodeClickEvent=function(t,e){this.fireEvent({type:"nodeClick",event:t,series:this,datum:e.datum,xKey:this.xKey,yKey:e.yKey})},n.prototype.getCategoryAxis=function(){return this.flipXY?this.yAxis:this.xAxis},n.prototype.getValueAxis=function(){return this.flipXY?this.xAxis:this.yAxis},n.prototype.createNodeData=function(){var e=this,n=this.chart,i=this.data,r=this.visible,o=this.getCategoryAxis(),a=this.getValueAxis();if(!(n&&i&&r&&o&&a)||n.layoutPending||n.dataPending)return[];var s=this.flipXY,h=o.scale,c=a.scale,l=this,u=l.groupScale,f=l.yKeys,p=l.cumYKeyCount,d=l.fills,y=l.strokes,g=l.strokeWidth,m=l.seriesItemEnabled,v=l.xData,b=l.yData,x=l.label,_=x.fontStyle,w=x.fontWeight,O=x.fontSize,k=x.fontFamily,S=x.color,P=x.formatter,D=x.placement;u.range=[0,h.bandwidth];var C=u.bandwidth,M=[];return v.forEach((function(n,r){for(var a=i[r],l=h.convert(n),v=b[r],x=0;x<v.length;x++)for(var A=v[x],j=0,T=0,L=0;L<A.length;L++){var F=A[L],N=f[x][L],E=l+u.convert(String(x));if(o.inRange(E,C)){var z=F<0?j:T,B=c instanceof it,W=c.convert(z+F,B?$:void 0),I=c.convert(z,B?$:void 0),K=a[N],R=void 0;R=P?P({value:Ot(K)?K:void 0}):Ot(K)?K.toFixed(2):"";var Y=void 0,X=void 0;s?(X=E+C/2,Y=D===t.BarLabelPlacement.Inside?W+(K>=0?-1:1)*Math.abs(I-W)/2:W+4*(K>=0?1:-1)):(Y=E+C/2,X=D===t.BarLabelPlacement.Inside?W+(K>=0?1:-1)*Math.abs(I-W)/2:W+(K>=0?-3:4));var H=void 0,U=void 0;D===t.BarLabelPlacement.Inside?(H="center",U="middle"):(H=s?K>=0?"start":"end":"center",U=s?"middle":K>=0?"bottom":"top");var G=p[x]+L;M.push({index:r,series:e,itemId:N,datum:a,yValue:K,yKey:N,x:s?Math.min(W,I):E,y:s?E:Math.min(W,I),width:s?Math.abs(I-W):C,height:s?C:Math.abs(I-W),fill:d[G%d.length],stroke:y[G%y.length],strokeWidth:g,label:m.get(N)&&R?{text:R,fontStyle:_,fontWeight:w,fontSize:O,fontFamily:k,textAlign:H,textBaseline:U,fill:S,x:Y,y:X}:void 0}),F<0?j+=F:T+=F}}})),this.nodeData=M},n.prototype.update=function(){this.updatePending=!1,this.updateSelections(),this.updateNodes()},n.prototype.updateSelections=function(){this.nodeDataPending&&(this.nodeDataPending=!1,this.createNodeData(),this.updateRectSelection(),this.updateLabelSelection())},n.prototype.updateNodes=function(){this.group.visible=this.visible,this.updateRectNodes(),this.updateLabelNodes()},n.prototype.updateRectSelection=function(){var t=this.rectSelection.setData(this.nodeData);t.exit.remove();var e=t.enter.append(Sn).each((function(t){t.tag=rr.Bar,t.crisp=!0}));this.rectSelection=t.merge(e)},n.prototype.updateRectNodes=function(){var t=this;if(this.chart){var e=this,n=e.fills,i=e.strokes,r=e.fillOpacity,o=e.strokeOpacity,a=e.shadow,s=e.formatter,h=e.xKey,c=e.flipXY,l=e.yKeys,u=e.chart.highlightedDatum,f=e.highlightStyle,p=f.fill,d=f.stroke,y=f.strokeWidth,g=f.item,m=g.fill,v=void 0===m?p:m,b=g.stroke,x=void 0===b?d:b,_=g.strokeWidth,w=void 0===_?y:_;this.rectSelection.each((function(e,f,p){for(var d=0,y=0,g=0;g<l.length;g++){var m=l[g];if((y=m.indexOf(f.yKey))>=0){d+=y;break}d+=m.length}var b=f===u,_=b&&void 0!==v?v:n[d%n.length],O=b&&void 0!==x?x:i[d%n.length],k=b&&void 0!==w?w:t.getStrokeWidth(t.strokeWidth,f),S=void 0;s&&(S=s({datum:f.datum,fill:_,stroke:O,strokeWidth:k,highlighted:b,xKey:h,yKey:f.yKey})),e.x=f.x,e.y=f.y,e.width=f.width,e.height=f.height,e.fill=S&&S.fill||_,e.stroke=S&&S.stroke||O,e.strokeWidth=S&&void 0!==S.strokeWidth?S.strokeWidth:k,e.fillOpacity=r,e.strokeOpacity=o,e.lineDash=t.lineDash,e.lineDashOffset=t.lineDashOffset,e.fillShadow=a,e.visible=c?f.width>0:f.height>0,e.zIndex=b?Ki.highlightedZIndex:p,e.opacity=t.getOpacity(f)}))}},n.prototype.updateLabelSelection=function(){var t=this.labelSelection.setData(this.nodeData);t.exit.remove();var e=t.enter.append(M).each((function(t){t.tag=rr.Label,t.pointerEvents=f.None}));this.labelSelection=t.merge(e)},n.prototype.updateLabelNodes=function(){var t=this;if(this.chart){this.chart.highlightedDatum;var e=this.label,n=e.enabled,i=e.fontStyle,r=e.fontWeight,o=e.fontSize,a=e.fontFamily,s=e.color;this.labelSelection.each((function(e,h,c){var l=h.label;l&&n?(e.fontStyle=i,e.fontWeight=r,e.fontSize=o,e.fontFamily=a,e.textAlign=l.textAlign,e.textBaseline=l.textBaseline,e.text=l.text,e.x=l.x,e.y=l.y,e.fill=s,e.visible=!0,e.opacity=t.getOpacity(h)):e.visible=!1}))}},n.prototype.getTooltipHtml=function(t){var e=this.xKey,n=this.yKeys,i=this.yData,r=this.getCategoryAxis(),o=this.getValueAxis(),a=t.yKey;if(!(i.length&&e&&a&&r&&o))return"";for(var s=i[t.index],h=0,c=0,l=0;l<n.length;l++){var u=n[l];if((c=u.indexOf(a))>=0){h+=c;break}h+=u.length}var f=this,p=f.xName,d=f.yNames,y=f.fills,g=f.strokes,m=f.tooltip,v=f.formatter,b=m.renderer,x=t.datum,_=d[a],w=y[h%y.length],O=g[h%y.length],k=this.getStrokeWidth(this.strokeWidth,x),S=x[e],P=x[a],D=s[l][c],C=ir(r.formatDatum(S)),M=ir(o.formatDatum(P)),A=ir(_),j=C+": "+M,T=void 0;v&&(T=v({datum:x,fill:w,stroke:O,strokeWidth:k,highlighted:!1,xKey:e,yKey:a}));var L=T&&T.fill||w,F={title:A,backgroundColor:L,content:j};return b?ai(b({datum:x,xKey:e,xValue:S,xName:p,yKey:a,yValue:P,processedYValue:D,yName:_,color:L}),F):ai(F)},n.prototype.listSeriesItems=function(t){var e=this,n=e.id,i=e.data,r=e.xKey,o=e.yKeys,a=e.yNames,s=e.cumYKeyCount,h=e.seriesItemEnabled,c=e.hideInLegend,l=e.fills,u=e.strokes,f=e.fillOpacity,p=e.strokeOpacity;i&&i.length&&r&&o.length&&this.yKeys.forEach((function(e,i){e.forEach((function(e,r){if(c.indexOf(e)<0){var o=s[i]+r;t.push({id:n,itemId:e,enabled:h.get(e)||!1,label:{text:a[e]||e},marker:{fill:l[o%l.length],stroke:u[o%u.length],fillOpacity:f,strokeOpacity:p}})}}))}))},n.prototype.toggleSeriesItem=function(t,e){var n=this.seriesItemEnabled;n.set(t,e);var i=this.yKeys.map((function(t){return t.slice()}));n.forEach((function(t,e){t||i.forEach((function(t){var n=t.indexOf(e);n>=0&&t.splice(n,1)}))}));var r=[];i.forEach((function(t,e){t.length>0&&r.push(String(e))})),this.groupScale.domain=r,this.scheduleData()},n.className="BarSeries",n.type="bar",pr([i("dataChange")],n.prototype,"flipXY",void 0),pr([i("dataChange")],n.prototype,"fills",void 0),pr([i("dataChange")],n.prototype,"strokes",void 0),pr([i("update")],n.prototype,"fillOpacity",void 0),pr([i("update")],n.prototype,"strokeOpacity",void 0),pr([i("update")],n.prototype,"lineDash",void 0),pr([i("update")],n.prototype,"lineDashOffset",void 0),pr([i("update")],n.prototype,"formatter",void 0),pr([i("layoutChange")],n.prototype,"hideInLegend",void 0),n}(Zi),br=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},_r=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},wr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return br(e,t),xr([i("change")],e.prototype,"formatter",void 0),e}(Ti),Or=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return br(e,t),xr([i("change")],e.prototype,"renderer",void 0),xr([i("change")],e.prototype,"format",void 0),e}(Ii),kr=function(e){function n(){var t=e.call(this)||this;t.xDomain=[],t.yDomain=[],t.xData=[],t.yData=[],t.lineNode=new Kt,t.nodeSelection=jt.select(t.pickGroup).selectAll(),t.nodeData=[],t.marker=new Ji,t.label=new wr,t.stroke="#874349",t.lineDash=[0],t.lineDashOffset=0,t.strokeWidth=2,t.strokeOpacity=1,t.tooltip=new Or,t._xKey="",t.xName="",t._yKey="",t.yName="";var n=t.lineNode;n.fill=void 0,n.lineJoin="round",n.pointerEvents=f.None,t.group.insertBefore(n,t.pickGroup),t.addEventListener("update",t.scheduleUpdate);var i=t,r=i.marker,o=i.label;return r.fill="#c16068",r.stroke="#874349",r.addPropertyListener("shape",t.onMarkerShapeChange,t),r.addEventListener("change",t.scheduleUpdate,t),o.enabled=!1,o.addEventListener("change",t.scheduleUpdate,t),t}return br(n,e),n.prototype.onMarkerShapeChange=function(){this.nodeSelection=this.nodeSelection.setData([]),this.nodeSelection.exit.remove(),this.fireEvent({type:"legendChange"})},n.prototype.setColors=function(t,e){this.stroke=t[0],this.marker.stroke=e[0],this.marker.fill=t[0]},Object.defineProperty(n.prototype,"xKey",{get:function(){return this._xKey},set:function(t){this._xKey!==t&&(this._xKey=t,this.xData=[],this.scheduleData())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"yKey",{get:function(){return this._yKey},set:function(t){this._yKey!==t&&(this._yKey=t,this.yData=[],this.scheduleData())},enumerable:!0,configurable:!0}),n.prototype.processData=function(){var t=this,e=t.xAxis,n=t.yAxis,i=t.xKey,r=t.yKey,o=t.xData,a=t.yData,s=i&&r&&this.data?this.data:[];if(!e||!n)return!1;var h=e.scale instanceof it,c=n.scale instanceof it;o.length=0,a.length=0;for(var l=0,u=s.length;l<u;l++){var f=s[l],p=f[i],d=f[r];h?o.push(p):o.push(Pt(p)?p:String(p)),c?a.push(d):a.push(Pt(d)?d:String(d))}return this.xDomain=h?this.fixNumericExtent(xt(o,Dt),"x"):o,this.yDomain=c?this.fixNumericExtent(xt(a,Dt),"y"):a,!0},n.prototype.getDomain=function(e){return e===t.ChartAxisDirection.X?this.xDomain:this.yDomain},n.prototype.onHighlightChange=function(){this.updateNodes()},n.prototype.resetHighlight=function(){this.lineNode.strokeWidth=this.strokeWidth},n.prototype.update=function(){this.updatePending=!1,this.updateSelections(),this.updateNodes()},n.prototype.updateSelections=function(){this.nodeDataPending&&(this.nodeDataPending=!1,this.updateLinePath(),this.updateNodeSelection())},n.prototype.updateLinePath=function(){var t=this.data,e=this.xAxis,n=this.yAxis;if(t&&e&&n){var i=this.xData,r=this.yData,o=this.lineNode,a=this.label,s=e.scale,h=n.scale,c=s instanceof it,l=h instanceof it,u=(s.bandwidth||0)/2,f=(h.bandwidth||0)/2,p=o.path,d=[];p.clear();for(var y=!0,g=void 0,m=void 0,v=0;v<i.length;v++){var b=m||this.checkDomainXY(i[v],r[v],c,l);if(b){var x=_r(b,2),_=x[0],w=x[1],O=s.convert(_)+u;if(isNaN(O)){g=void 0,y=!0;continue}var k=(s.bandwidth||.5*this.marker.size+(this.marker.strokeWidth||0))+1;m=this.checkDomainXY(i[v+1],r[v+1],c,l);var S=e.inRangeEx(O,0,k),P=m&&e.inRangeEx(s.convert(m[0])+u,0,k);if(-1===S&&-1===P){y=!0;continue}if(1===S&&1===g){y=!0;continue}g=S;var D=h.convert(w)+f;y?(p.moveTo(O,D),y=!1):p.lineTo(O,D);var C=void 0;C=a.formatter?a.formatter({value:w}):"number"==typeof w&&isFinite(w)?w.toFixed(2):w?String(w):"",d.push({series:this,datum:t[v],point:{x:O,y:D},label:C?{text:C,fontStyle:a.fontStyle,fontWeight:a.fontWeight,fontSize:a.fontSize,fontFamily:a.fontFamily,textAlign:"center",textBaseline:"bottom",fill:a.color}:void 0})}else g=void 0,y=!0}this.nodeData=d}},n.prototype.updateNodeSelection=function(){var t=this.marker,e=t.shape?this.nodeData:[],n=Xn(t.shape),i=this.nodeSelection.setData(e);i.exit.remove();var r=i.enter.append(Mt);r.append(n),r.append(M),this.nodeSelection=i.merge(r)},n.prototype.updateNodes=function(){this.group.visible=this.visible,this.updateLineNode(),this.updateMarkerNodes(),this.updateTextNodes()},n.prototype.updateLineNode=function(){var t=this.lineNode;t.stroke=this.stroke,t.strokeWidth=this.getStrokeWidth(this.strokeWidth),t.strokeOpacity=this.strokeOpacity,t.lineDash=this.lineDash,t.lineDashOffset=this.lineDashOffset,t.opacity=this.getOpacity()},n.prototype.updateMarkerNodes=function(){var t=this;if(this.chart){var e=this,n=e.marker,i=e.xKey,r=e.yKey,o=e.stroke,a=e.chart.highlightedDatum,s=e.highlightStyle,h=s.fill,c=s.stroke,l=s.strokeWidth,u=s.item,f=u.fill,p=void 0===f?h:f,d=u.stroke,y=void 0===d?c:d,g=u.strokeWidth,m=void 0===g?l:g,v=n.size,b=n.formatter,x=void 0!==n.strokeWidth?n.strokeWidth:this.strokeWidth,_=Xn(n.shape);this.nodeSelection.selectByClass(_).each((function(e,s){var h=s===a,c=h&&void 0!==p?p:n.fill,l=h&&void 0!==y?y:n.stroke||o,u=h&&void 0!==m?m:x,f=void 0;b&&(f=b({datum:s.datum,xKey:i,yKey:r,fill:c,stroke:l,strokeWidth:u,size:v,highlighted:h})),e.fill=f&&f.fill||c,e.stroke=f&&f.stroke||l,e.strokeWidth=f&&void 0!==f.strokeWidth?f.strokeWidth:u,e.size=f&&void 0!==f.size?f.size:v,e.translationX=s.point.x,e.translationY=s.point.y,e.opacity=t.getOpacity(s),e.visible=n.enabled&&e.size>0}))}},n.prototype.updateTextNodes=function(){var t=this;this.nodeSelection.selectByClass(M).each((function(e,n){var i=n.point,r=n.label,o=t.label,a=o.enabled,s=o.fontStyle,h=o.fontWeight,c=o.fontSize,l=o.fontFamily,u=o.color;r&&a?(e.fontStyle=s,e.fontWeight=h,e.fontSize=c,e.fontFamily=l,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline,e.text=r.text,e.x=i.x,e.y=i.y-10,e.fill=u,e.visible=!0):e.visible=!1}))},n.prototype.getNodeData=function(){return this.nodeData},n.prototype.fireNodeClickEvent=function(t,e){this.fireEvent({type:"nodeClick",event:t,series:this,datum:e.datum,xKey:this.xKey,yKey:this.yKey})},n.prototype.getTooltipHtml=function(t){var e=this.xKey,n=this.yKey,i=this.xAxis,r=this.yAxis;if(!(e&&n&&i&&r))return"";var o=this.xName,a=this.yName,s=this.tooltip,h=this.marker,c=s.renderer,l=s.format,u=t.datum,f=u[e],p=u[n],d=i.formatDatum(f),y=r.formatDatum(p),g=ir(this.title||a),m=ir(d+": "+y),v=h.formatter,b=h.fill,x=h.stroke,_=h.strokeWidth,w=h.size,O=void 0!==_?_:this.strokeWidth,k=void 0;v&&(k=v({datum:u,xKey:e,yKey:n,fill:b,stroke:x,strokeWidth:O,size:w,highlighted:!1}));var S=k&&k.fill||b,P={title:g,backgroundColor:S,content:m};if(l||c){var D={datum:u,xKey:e,xValue:f,xName:o,yKey:n,yValue:p,yName:a,title:g,color:S};if(l)return ai({content:er(l,D)},P);if(c)return ai(c(D),P)}return ai(P)},n.prototype.listSeriesItems=function(t){var e=this,n=e.id,i=e.data,r=e.xKey,o=e.yKey,a=e.yName,s=e.visible,h=e.title,c=e.marker,l=e.stroke,u=e.strokeOpacity;i&&i.length&&r&&o&&t.push({id:n,itemId:void 0,enabled:s,label:{text:h||a||o},marker:{shape:c.shape,fill:c.fill||"rgba(0, 0, 0, 0)",stroke:c.stroke||l||"rgba(0, 0, 0, 0)",fillOpacity:1,strokeOpacity:u}})},n.className="LineSeries",n.type="line",xr([i("layoutChange")],n.prototype,"title",void 0),xr([i("update")],n.prototype,"stroke",void 0),xr([i("update")],n.prototype,"lineDash",void 0),xr([i("update")],n.prototype,"lineDashOffset",void 0),xr([i("update")],n.prototype,"strokeWidth",void 0),xr([i("update")],n.prototype,"strokeOpacity",void 0),xr([i("update")],n.prototype,"xName",void 0),xr([i("update")],n.prototype,"yName",void 0),n}(Zi),Sr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pr=function(){return(Pr=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Dr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},Cr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),Dr([i("change")],e.prototype,"renderer",void 0),e}(Ii),Mr=function(e){function n(){var t=e.call(this)||this;t.xDomain=[],t.yDomain=[],t.xData=[],t.yData=[],t.sizeData=[],t.sizeScale=new gt,t.nodeData=[],t.markerSelection=jt.select(t.pickGroup).selectAll(),t.labelData=[],t.labelSelection=jt.select(t.group).selectAll(),t.marker=new Ji,t.label=new Ti,t._fill="#c16068",t._stroke="#874349",t._strokeWidth=2,t._fillOpacity=1,t._strokeOpacity=1,t.xKey="",t.yKey="",t.xName="",t.yName="",t.sizeName="Size",t.labelName="Label",t.tooltip=new Cr;var n=t,i=n.marker,r=n.label;return i.addPropertyListener("shape",t.onMarkerShapeChange,t),i.addEventListener("change",t.scheduleUpdate,t),t.addPropertyListener("xKey",(function(){return t.xData=[]})),t.addPropertyListener("yKey",(function(){return t.yData=[]})),t.addPropertyListener("sizeKey",(function(){return t.sizeData=[]})),r.enabled=!1,r.addEventListener("change",t.scheduleUpdate,t),r.addEventListener("dataChange",t.scheduleData,t),t}return Sr(n,e),Object.defineProperty(n.prototype,"fill",{get:function(){return this._fill},set:function(t){this._fill!==t&&(this._fill=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"stroke",{get:function(){return this._stroke},set:function(t){this._stroke!==t&&(this._stroke=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(t){this._strokeWidth!==t&&(this._strokeWidth=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fillOpacity",{get:function(){return this._fillOpacity},set:function(t){this._fillOpacity!==t&&(this._fillOpacity=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strokeOpacity",{get:function(){return this._strokeOpacity},set:function(t){this._strokeOpacity!==t&&(this._strokeOpacity=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),n.prototype.onHighlightChange=function(){this.updateMarkerNodes()},n.prototype.onMarkerShapeChange=function(){this.markerSelection=this.markerSelection.setData([]),this.markerSelection.exit.remove(),this.fireEvent({type:"legendChange"})},n.prototype.setColors=function(t,e){this.fill=t[0],this.stroke=e[0],this.marker.fill=t[0],this.marker.stroke=e[0]},n.prototype.processData=function(){var t=this,e=t.xKey,n=t.yKey,i=t.sizeKey,r=t.labelKey,o=t.xAxis,a=t.yAxis,s=t.marker,h=t.label;if(!o||!a)return!1;var c=e&&n&&this.data?this.data:[];this.xData=c.map((function(t){return t[e]})),this.yData=c.map((function(t){return t[n]})),this.sizeData=i?c.map((function(t){return t[i]})):[];var l=h.getFont();return this.labelData=r?c.map((function(t){var e=String(t[r]),n=D.getTextSize(e,l);return Pr({text:e},n)})):[],this.sizeScale.domain=s.domain?s.domain:xt(this.sizeData,Dt)||[1,1],o.scale instanceof it?this.xDomain=this.fixNumericExtent(xt(this.xData,Dt),"x"):this.xDomain=this.xData,a.scale instanceof it?this.yDomain=this.fixNumericExtent(xt(this.yData,Dt),"y"):this.yDomain=this.yData,!0},n.prototype.getDomain=function(e){return e===t.ChartAxisDirection.X?this.xDomain:this.yDomain},n.prototype.getNodeData=function(){return this.nodeData},n.prototype.getLabelData=function(){return this.nodeData},n.prototype.fireNodeClickEvent=function(t,e){this.fireEvent({type:"nodeClick",event:t,series:this,datum:e.datum,xKey:this.xKey,yKey:this.yKey,sizeKey:this.sizeKey})},n.prototype.createNodeData=function(){var t=this,e=t.chart,n=t.data,i=t.visible,r=t.xAxis,o=t.yAxis;if(!(e&&n&&i&&r&&o)||e.layoutPending||e.dataPending)return[];var a=r.scale,s=o.scale,h=a instanceof it,c=s instanceof it,l=(a.bandwidth||0)/2,u=(s.bandwidth||0)/2,f=this,p=f.xData,d=f.yData,y=f.sizeData,g=f.sizeScale,m=f.marker,v=[];g.range=[m.size,m.maxSize];for(var b=0;b<p.length;b++){var x=this.checkDomainXY(p[b],d[b],h,c);if(x){var _=a.convert(x[0])+l,w=s.convert(x[1])+u;this.checkRangeXY(_,w,r,o)&&v.push({series:this,datum:n[b],point:{x:_,y:w},size:y.length?g.convert(y[b]):m.size,label:this.labelData[b]})}}return this.nodeData=v},n.prototype.update=function(){this.updatePending=!1,this.updateSelections(),this.updateNodes()},n.prototype.updateSelections=function(){this.nodeDataPending&&(this.nodeDataPending=!1,this.createNodeData(),this.updateMarkerSelection(),this.updateLabelSelection())},n.prototype.updateNodes=function(){this.group.visible=this.visible,this.updateMarkerNodes(),this.updateLabelNodes()},n.prototype.updateLabelSelection=function(){var t=this.chart&&this.chart.placeLabels().get(this)||[],e=this.labelSelection.setData(t);e.exit.remove();var n=e.enter.append(M);this.labelSelection=e.merge(n)},n.prototype.updateMarkerSelection=function(){var t=Xn(this.marker.shape),e=this.markerSelection.setData(this.nodeData);e.exit.remove();var n=e.enter.append(t);this.markerSelection=e.merge(n)},n.prototype.updateLabelNodes=function(){var t=this.label;this.labelSelection.each((function(e,n){e.text=n.text,e.fill=t.color,e.x=n.x,e.y=n.y,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"}))},n.prototype.updateMarkerNodes=function(){var t=this;if(this.chart){var e=this,n=e.marker,i=e.xKey,r=e.yKey,o=e.strokeWidth,a=e.fillOpacity,s=e.strokeOpacity,h=e.fill,c=e.stroke,l=e.chart.highlightedDatum,u=e.sizeScale,f=e.sizeData,p=e.highlightStyle,d=p.fill,y=p.stroke,g=p.strokeWidth,m=p.item,v=m.fill,b=void 0===v?d:v,x=m.stroke,_=void 0===x?y:x,w=m.strokeWidth,O=void 0===w?g:w,k=void 0!==n.strokeWidth?n.strokeWidth:o,S=n.formatter;u.range=[n.size,n.maxSize],this.markerSelection.each((function(e,o,p){var d=o===l,y=d&&void 0!==b?b:n.fill||h,g=d&&void 0!==_?_:n.stroke||c,m=d&&void 0!==O?O:t.getStrokeWidth(k,o),v=f.length?u.convert(f[p]):n.size,x=void 0;S&&(x=S({datum:o.datum,xKey:i,yKey:r,fill:y,stroke:g,strokeWidth:m,size:v,highlighted:d})),e.fill=x&&x.fill||y,e.stroke=x&&x.stroke||g,e.strokeWidth=x&&void 0!==x.strokeWidth?x.strokeWidth:m,e.size=x&&void 0!==x.size?x.size:v,e.fillOpacity=void 0!==n.fillOpacity?n.fillOpacity:a,e.strokeOpacity=void 0!==n.strokeOpacity?n.strokeOpacity:s,e.translationX=o.point.x,e.translationY=o.point.y,e.opacity=t.getOpacity(o),e.zIndex=d?Ki.highlightedZIndex:p,e.visible=n.enabled&&e.size>0}))}},n.prototype.getTooltipHtml=function(t){var e=this.xKey,n=this.yKey,i=this.xAxis,r=this.yAxis;if(!(e&&n&&i&&r))return"";var o=this,a=o.fill,s=o.stroke,h=o.marker,c=o.tooltip,l=o.xName,u=o.yName,f=o.sizeKey,p=o.sizeName,d=o.labelKey,y=o.labelName,g=h.fill||a,m=h.stroke||s,v=this.getStrokeWidth(h.strokeWidth||this.strokeWidth,t),b=this.marker.formatter,x=void 0;b&&(x=b({datum:t,xKey:e,yKey:n,fill:g,stroke:m,strokeWidth:v,size:t.size,highlighted:!1}));var _=x&&x.fill||g||"gray",w=this.title||u,O=t.datum,k=O[e],S=O[n],P=ir(i.formatDatum(k)),D=ir(r.formatDatum(S)),C="<b>"+ir(l||e)+"</b>: "+P+"<br><b>"+ir(u||n)+"</b>: "+D;f&&(C+="<br><b>"+ir(p||f)+"</b>: "+ir(O[f])),d&&(C="<b>"+ir(y||d)+"</b>: "+ir(O[d])+"<br>"+C);var M={title:w,backgroundColor:_,content:C},A=c.renderer;return A?ai(A({datum:O,xKey:e,xValue:k,xName:l,yKey:n,yValue:S,yName:u,sizeKey:f,sizeName:p,labelKey:d,labelName:y,title:w,color:_}),M):ai(M)},n.prototype.listSeriesItems=function(t){var e=this,n=e.id,i=e.data,r=e.xKey,o=e.yKey,a=e.yName,s=e.title,h=e.visible,c=e.marker,l=e.fill,u=e.stroke,f=e.fillOpacity,p=e.strokeOpacity;i&&i.length&&r&&o&&t.push({id:n,itemId:void 0,enabled:h,label:{text:s||a||o},marker:{shape:c.shape,fill:c.fill||l||"rgba(0, 0, 0, 0)",stroke:c.stroke||u||"rgba(0, 0, 0, 0)",fillOpacity:void 0!==c.fillOpacity?c.fillOpacity:f,strokeOpacity:void 0!==c.strokeOpacity?c.strokeOpacity:p}})},n.className="ScatterSeries",n.type="scatter",Dr([i("layoutChange")],n.prototype,"title",void 0),Dr([i("dataChange")],n.prototype,"xKey",void 0),Dr([i("dataChange")],n.prototype,"yKey",void 0),Dr([i("dataChange")],n.prototype,"sizeKey",void 0),Dr([i("dataChange")],n.prototype,"labelKey",void 0),n}(Zi),Ar=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),jr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},Tr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},Lr=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Tr(arguments[e]));return t};!function(t){t[t.Bin=0]="Bin",t[t.Label=1]="Label"}(yr||(yr={}));var Fr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ar(e,t),jr([i("change")],e.prototype,"formatter",void 0),e}(Ti),Nr={count:function(t){return t.data.length},sum:function(t,e){return t.data.reduce((function(t,n){return t+n[e]}),0)},mean:function(t,e){return Nr.sum(t,e)/Nr.count(t,e)}},Er=function(){function t(t){var e=Tr(t,2),n=e[0],i=e[1];this.data=[],this.aggregatedValue=0,this.frequency=0,this.domain=[n,i]}return t.prototype.addDatum=function(t){this.data.push(t),this.frequency++},Object.defineProperty(t.prototype,"domainWidth",{get:function(){var t=Tr(this.domain,2),e=t[0];return t[1]-e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativeHeight",{get:function(){return this.aggregatedValue/this.domainWidth},enumerable:!0,configurable:!0}),t.prototype.calculateAggregatedValue=function(t,e){e||(t="count");var n=Nr[t];this.aggregatedValue=n(this,e)},t.prototype.getY=function(t){return t?this.relativeHeight:this.aggregatedValue},t}(),zr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ar(e,t),jr([i("change")],e.prototype,"renderer",void 0),e}(Ii),Br=function(e){function n(){var n,i=e.call(this)||this;return i.rectGroup=i.pickGroup.appendChild(new Mt),i.textGroup=i.group.appendChild(new Mt),i.rectSelection=jt.select(i.rectGroup).selectAll(),i.textSelection=jt.select(i.textGroup).selectAll(),i.binnedData=[],i.xDomain=[],i.yDomain=[],i.label=new Fr,i.seriesItemEnabled=!0,i.tooltip=new zr,i.fill=void 0,i.stroke=void 0,i.fillOpacity=1,i.strokeOpacity=1,i.lineDash=[0],i.lineDashOffset=0,i.directionKeys=((n={})[t.ChartAxisDirection.X]=["xKey"],n[t.ChartAxisDirection.Y]=["yKey"],n),i._xKey="",i._areaPlot=!1,i._bins=void 0,i._aggregation="count",i._binCount=void 0,i._xName="",i._yKey="",i._yName="",i._strokeWidth=1,i.label.enabled=!1,i.label.addEventListener("change",i.scheduleUpdate,i),i}return Ar(n,e),n.prototype.getKeys=function(t){var e=this,n=this.directionKeys,i=n&&n[t],r=[];return i&&i.forEach((function(t){var n=e[t];n&&(Array.isArray(n)?r.push.apply(r,Lr(n)):r.push(n))})),r},Object.defineProperty(n.prototype,"xKey",{get:function(){return this._xKey},set:function(t){this._xKey!==t&&(this._xKey=t,this.scheduleData())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"areaPlot",{get:function(){return this._areaPlot},set:function(t){this._areaPlot=t,this.scheduleData()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bins",{get:function(){return this._bins},set:function(t){this._bins=t,this.scheduleData()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"aggregation",{get:function(){return this._aggregation},set:function(t){this._aggregation=t,this.scheduleData()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binCount",{get:function(){return this._binCount},set:function(t){this._binCount=t,this.scheduleData()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"xName",{get:function(){return this._xName},set:function(t){this._xName!==t&&(this._xName=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"yKey",{get:function(){return this._yKey},set:function(t){this._yKey=t,this.seriesItemEnabled=!0,this.scheduleData()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"yName",{get:function(){return this._yName},set:function(t){this._yName=t,this.scheduleData()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(t){this._strokeWidth!==t&&(this._strokeWidth=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shadow",{get:function(){return this._shadow},set:function(t){this._shadow!==t&&(this._shadow=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),n.prototype.onHighlightChange=function(){this.updateRectNodes()},n.prototype.setColors=function(t,e){this.fill=t[0],this.stroke=e[0]},n.prototype.deriveBins=function(){var t=this,e=this.bins;if(this.binCount,!this.data)return[];if(e)return e;var n=this.data.map((function(e){return e[t.xKey]})),i=this.fixNumericExtent(xt(n,Dt),"x"),r=N(i[0],i[1],this.binCount||10),o=W(i[0],i[1],this.binCount||10),a=r[0];return Lr([[a-o,a]],r.map((function(t){return[t,t+o]})))},n.prototype.placeDataInBins=function(t){var e=this,n=this.xKey,i=this.deriveBins(),r=t.slice().sort((function(t,e){return t[n]<e[n]?-1:t[n]>e[n]?1:0})),o=0,a=[new Er(i[0])];t:for(var s=0,h=r.length;s<h;s++){for(var c=r[s];c[n]>i[o][1];){var l=i[++o];if(!l)break t;a.push(new Er(l))}a[o].addDatum(c)}return a.forEach((function(t){return t.calculateAggregatedValue(e._aggregation,e.yKey)})),a},Object.defineProperty(n.prototype,"xMax",{get:function(){var t=this;return this.data&&this.data.reduce((function(e,n){return Math.max(e,n[t.xKey])}),Number.NEGATIVE_INFINITY)},enumerable:!0,configurable:!0}),n.prototype.processData=function(){var t=this,e=this.xKey,n=this.data;this.binnedData=this.placeDataInBins(e&&n?n:[]);var i=xt(this.binnedData.map((function(e){return e.getY(t.areaPlot)})),Dt);this.yDomain=this.fixNumericExtent([0,i?i[1]:1],"y");var r=this.binnedData[0],o=this.binnedData[this.binnedData.length-1],a=r.domain[0],s=o.domain[1];return this.xDomain=[a,s],this.fireEvent({type:"dataProcessed"}),!0},n.prototype.getDomain=function(e){return e===t.ChartAxisDirection.X?this.xDomain:this.yDomain},n.prototype.fireNodeClickEvent=function(t,e){this.fireEvent({type:"nodeClick",event:t,series:this,datum:e.datum,xKey:this.xKey})},n.prototype.update=function(){this.updatePending=!1,this.updateSelections(),this.updateNodes()},n.prototype.updateSelections=function(){if(this.nodeDataPending){this.nodeDataPending=!1;var t=this.createNodeData();this.updateRectSelection(t),this.updateTextSelection(t)}},n.prototype.updateNodes=function(){this.group.visible=this.visible,this.updateRectNodes(),this.updateTextNodes()},n.prototype.createNodeData=function(){var t=this,e=this.xAxis,n=this.yAxis;if(!this.seriesItemEnabled||!e||!n)return[];var i=e.scale,r=n.scale,o=this.fill,a=this.stroke,s=this.strokeWidth,h=[],c=this.label,l=c.formatter,u=void 0===l?function(t){return String(t.value)}:l,f=c.fontStyle,p=c.fontWeight,d=c.fontSize,y=c.fontFamily,g=c.color;return this.binnedData.forEach((function(e){var n=e.aggregatedValue,c=e.frequency,l=Tr(e.domain,2),m=l[0],v=l[1],b=e.relativeHeight,x=i.convert(m),_=i.convert(v),w=t.areaPlot?b:t.yKey?n:c,O=r.convert(0),k=r.convert(w),S=_-x,P=Math.abs(k-O),D=0!==w?{text:u({value:e.aggregatedValue}),fontStyle:f,fontWeight:p,fontSize:d,fontFamily:y,fill:g,x:x+S/2,y:k+P/2}:void 0;h.push({series:t,datum:e,x:x,y:k,width:S,height:P,fill:o,stroke:a,strokeWidth:s,label:D})})),h},n.prototype.updateRectSelection=function(t){var e=this.rectSelection.setData(t);e.exit.remove();var n=e.enter.append(Sn).each((function(t){t.tag=yr.Bin,t.crisp=!0}));this.rectSelection=e.merge(n)},n.prototype.updateRectNodes=function(){var t=this;if(this.chart){var e=this,n=e.fillOpacity,i=e.strokeOpacity,r=e.shadow,o=e.chart.highlightedDatum,a=e.highlightStyle,s=a.fill,h=a.stroke,c=a.strokeWidth,l=a.item,u=l.fill,f=void 0===u?s:u,p=l.stroke,d=void 0===p?h:p,y=l.strokeWidth,g=void 0===y?c:y;this.rectSelection.each((function(e,a,s){var h=a===o,c=h&&void 0!==g?g:t.getStrokeWidth(a.strokeWidth,a);e.x=a.x,e.y=a.y,e.width=a.width,e.height=a.height,e.fill=h&&void 0!==f?f:a.fill,e.stroke=h&&void 0!==d?d:a.stroke,e.fillOpacity=n,e.strokeOpacity=i,e.strokeWidth=c,e.lineDash=t.lineDash,e.lineDashOffset=t.lineDashOffset,e.fillShadow=r,e.zIndex=h?Ki.highlightedZIndex:s,e.visible=a.height>0,e.opacity=t.getOpacity(a)}))}},n.prototype.updateTextSelection=function(t){var e=this.textSelection.setData(t);e.exit.remove();var n=e.enter.append(M).each((function(t){t.tag=yr.Label,t.pointerEvents=f.None,t.textAlign="center",t.textBaseline="middle"}));this.textSelection=e.merge(n)},n.prototype.updateTextNodes=function(){var t=this.label.enabled;this.textSelection.each((function(e,n){var i=n.label;i&&t?(e.text=i.text,e.x=i.x,e.y=i.y,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.fontSize=i.fontSize,e.fontFamily=i.fontFamily,e.fill=i.fill,e.visible=!0):e.visible=!1}))},n.prototype.getTooltipHtml=function(t){var e=this.xKey,n=this.yKey,i=this.xAxis,r=this.yAxis;if(!e||!i||!r)return"";var o=this,a=o.xName,s=o.yName,h=o.fill,c=o.tooltip,l=o.aggregation,u=c.renderer,f=t.datum,p=f.aggregatedValue,d=f.frequency,y=Tr(f.domain,2),g=y[0],m=y[1],v=ir(a||e)+": "+i.formatDatum(g)+" - "+i.formatDatum(m),b=n?"<b>"+ir(s||n)+" ("+l+")</b>: "+r.formatDatum(p)+"<br>":"",x={title:v,backgroundColor:h,content:b+="<b>Frequency</b>: "+d};return u?ai(u({datum:f,xKey:e,xValue:f.domain,xName:a,yKey:n,yValue:f.aggregatedValue,yName:s,color:h}),x):ai(x)},n.prototype.listSeriesItems=function(t){var e=this,n=e.id,i=e.data,r=e.yKey,o=e.yName,a=e.seriesItemEnabled,s=e.fill,h=e.stroke,c=e.fillOpacity,l=e.strokeOpacity;i&&i.length&&t.push({id:n,itemId:r,enabled:a,label:{text:o||r||"Frequency"},marker:{fill:s||"rgba(0, 0, 0, 0)",stroke:h||"rgba(0, 0, 0, 0)",fillOpacity:c,strokeOpacity:l}})},n.prototype.toggleSeriesItem=function(t,e){t===this.yKey&&(this.seriesItemEnabled=e),this.scheduleData()},n.className="HistogramSeries",n.type="histogram",jr([i("dataChange")],n.prototype,"fill",void 0),jr([i("dataChange")],n.prototype,"stroke",void 0),jr([i("layoutChange")],n.prototype,"fillOpacity",void 0),jr([i("layoutChange")],n.prototype,"strokeOpacity",void 0),jr([i("update")],n.prototype,"lineDash",void 0),jr([i("update")],n.prototype,"lineDashOffset",void 0),n}(Zi),Wr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ir=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},Kr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e}return Wr(e,t),Ir([i("dataChange")],e.prototype,"data",void 0),e}(Ki),Rr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},Xr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.enabled=!0,e.color="rgba(0, 0, 0, 0.5)",e.xOffset=0,e.yOffset=0,e.blur=5,e}return Rr(e,t),Yr([i("change")],e.prototype,"enabled",void 0),Yr([i("change")],e.prototype,"color",void 0),Yr([i("change")],e.prototype,"xOffset",void 0),Yr([i("change")],e.prototype,"yOffset",void 0),Yr([i("change")],e.prototype,"blur",void 0),e}(n);function Hr(t,e,n,i,r){var o=t.children,a=t.value&&(r-n)/t.value;o.forEach((function(t){t.x0=e,t.x1=i,t.y0=n,t.y1=n+=t.value*a}))}function Ur(t,e,n,i,r){var o=t.children,a=t.value&&(i-e)/t.value;o.forEach((function(t){t.x0=e,t.x1=e+=t.value*a,t.y0=n,t.y1=r}))}function Gr(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}var Vr=function t(e){function n(t,n,i,r,o){!function(t,e,n,i,r,o){for(var a,s,h,c,l,u,f,p,d,y,g=[],m=e.children,v=m.length,b=e.value,x=0,_=0;x<v;){a=r-n,s=o-i;do{c=m[_++].value}while(!c&&_<v);for(l=u=c,y=c*c*(d=Math.max(s/a,a/s)/(b*t)),p=Math.max(u/y,y/l);_<v;++_){if((h=m[_].value)<l&&(l=h),h>u&&(u=h),y=(c+=h)*c*d,(f=Math.max(u/y,y/l))>p){c-=h;break}p=f}var w={value:c,dice:a<s,children:m.slice(x,_)};g.push(w),w.dice?Ur(w,n,i,r,b?i+=s*c/b:o):Hr(w,n,i,b?n+=a*c/b:r,o),b-=c,x=_}}(e,t,n,i,r,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2),qr=function(){function t(){this.paddingStack=[0],this.dx=1,this.dy=1,this.round=!0,this.tile=Vr,this.paddingInner=function(t){return 0},this.paddingTop=function(t){return 0},this.paddingRight=function(t){return 0},this.paddingBottom=function(t){return 0},this.paddingLeft=function(t){return 0}}return Object.defineProperty(t.prototype,"size",{get:function(){return[this.dx,this.dy]},set:function(t){this.dx=t[0],this.dy=t[1]},enumerable:!0,configurable:!0}),t.prototype.processData=function(t){return t.x0=0,t.y0=0,t.x1=this.dx,t.y1=this.dy,t.eachBefore(this.positionNode.bind(this)),this.paddingStack=[0],this.round&&t.eachBefore(Gr),t},t.prototype.positionNode=function(t){var e=this.paddingStack[t.depth],n=t.x0+e,i=t.y0+e,r=t.x1-e,o=t.y1-e;r<n&&(n=r=(n+r)/2),o<i&&(i=o=(i+o)/2),t.x0=n,t.y0=i,t.x1=r,t.y1=o,t.children&&(e=this.paddingStack[t.depth+1]=this.paddingInner(t)/2,n+=this.paddingLeft(t)-e,i+=this.paddingTop(t)-e,(r-=this.paddingRight(t)-e)<n&&(n=r=(n+r)/2),(o-=this.paddingBottom(t)-e)<i&&(i=o=(i+o)/2),this.tile(t,n,i,r,o))},t}(),Zr=function(){function t(t){this.value=0,this.depth=0,this.height=0,this.parent=void 0,this.children=void 0,this.datum=t}return t.prototype.countFn=function(t){var e=0,n=t.children;if(n&&n.length)for(var i=n.length;--i>=0;)e+=n[i].value;else e=1;t.value=e},t.prototype.count=function(){return this.eachAfter(this.countFn)},t.prototype.each=function(t,e){var n=this,i=-1;return this.iterator((function(r){t.call(e,r,++i,n)})),this},t.prototype.eachAfter=function(t,e){for(var n=this,i=[n],r=[];n=i.pop();){r.push(n);var o=n.children;if(o)for(var a=0,s=o.length;a<s;++a)i.push(o[a])}for(var h=-1;n=r.pop();)t.call(e,n,++h,this);return this},t.prototype.eachBefore=function(t,e){for(var n=this,i=[n],r=-1;n=i.pop();){t.call(e,n,++r,this);var o=n.children;if(o)for(var a=o.length-1;a>=0;--a){var s=o[a];i.push(s)}}return this},t.prototype.find=function(t,e){var n,i=this,r=-1;return this.iterator((function(o){if(t.call(e,o,++r,i))return n=o,!1})),n},t.prototype.sum=function(t){return this.eachAfter((function(e){var n=+t(e.datum)||0,i=e.children;if(i)for(var r=i.length;--r>=0;)n+=i[r].value;e.value=n}))},t.prototype.sort=function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},t.prototype.path=function(t){for(var e=this,n=function(t,e){if(t&&e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=void 0;for(t=n.pop(),e=i.pop();t===e;)r=t,t=n.pop(),e=i.pop();return r}}(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},t.prototype.ancestors=function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},t.prototype.descendants=function(){var t=[];return this.iterator((function(e){return t.push(e)})),t},t.prototype.leaves=function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},t.prototype.links=function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},t.prototype.copy=function(){},t.prototype.iterator=function(t){var e,n=this,i=[n];t:do{for(e=i.reverse(),i=[];n=e.pop();){if(!1===t(n))break t;var r=n.children;if(r)for(var o=0,a=r.length;o<a;++o)i.push(r[o])}}while(i.length)},t}();function Jr(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Qr)):void 0===e&&(e=to);for(var n,i,r,o,a,s=new Zr(t),h=[s];n=h.pop();)if((r=e(n.datum))&&(a=(r=Array.from(r)).length))for(n.children=r,o=a-1;o>=0;--o)h.push(i=r[o]=new Zr(r[o])),i.parent=n,i.depth=n.depth+1;return s.eachBefore($r)}function $r(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Qr(t){return Array.isArray(t)?t[1]:void 0}function to(t){return t.children}var eo,no=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),io=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},ro=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return no(e,t),io([i("change")],e.prototype,"renderer",void 0),e}(Ii),oo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.padding=10,e}return no(e,t),io([i("change")],e.prototype,"padding",void 0),e}(Ti);!function(t){t[t.Name=0]="Name",t[t.Value=1]="Value"}(eo||(eo={}));var ao,so=function(t){function e(){var e,n,i=t.call(this)||this;return i.groupSelection=jt.select(i.pickGroup).selectAll(),i.labelMap=new Map,i.layout=new qr,i.title=((e=new oo).color="white",e.fontWeight="bold",e.fontSize=12,e.fontFamily="Verdana, sans-serif",e.padding=15,e),i.subtitle=function(){var t=new oo;return t.color="white",t.fontSize=9,t.fontFamily="Verdana, sans-serif",t.padding=13,t}(),i.labels={large:function(){var t=new Ti;return t.color="white",t.fontWeight="bold",t.fontSize=18,t}(),medium:function(){var t=new Ti;return t.color="white",t.fontWeight="bold",t.fontSize=14,t}(),small:function(){var t=new Ti;return t.color="white",t.fontWeight="bold",t.fontSize=10,t}(),color:function(){var t=new Ti;return t.color="white",t}()},i._nodePadding=2,i.labelKey="label",i.sizeKey="size",i.colorKey="color",i.colorDomain=[-5,5],i.colorRange=["#cb4b3f","#6acb64"],i.colorParents=!1,i.gradient=!0,i.colorName="Change",i.rootName="Root",i._shadow=((n=new Xr).color="rgba(0, 0, 0, 0.4)",n.xOffset=1.5,n.yOffset=1.5,n),i.tooltip=new ro,i.shadow.addEventListener("change",i.scheduleUpdate,i),i.title.addEventListener("change",i.scheduleUpdate,i),i.subtitle.addEventListener("change",i.scheduleUpdate,i),i.labels.small.addEventListener("change",i.scheduleUpdate,i),i.labels.medium.addEventListener("change",i.scheduleUpdate,i),i.labels.large.addEventListener("change",i.scheduleUpdate,i),i.labels.color.addEventListener("change",i.scheduleUpdate,i),i}return no(e,t),Object.defineProperty(e.prototype,"nodePadding",{get:function(){return this._nodePadding},set:function(t){this._nodePadding!==t&&(this._nodePadding=t,this.updateLayoutPadding(),this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadow",{get:function(){return this._shadow},set:function(t){this._shadow!==t&&(this._shadow=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),e.prototype.onHighlightChange=function(){this.updateNodes()},e.prototype.updateLayoutPadding=function(){var t=this.title,e=this.subtitle,n=this.nodePadding,i=this.labelKey;this.layout.paddingRight=function(t){return n},this.layout.paddingBottom=function(t){return n},this.layout.paddingLeft=function(t){return n},this.layout.paddingTop=function(r){var o=r.datum[i]||"";r.children&&(o=o.toUpperCase());var a=r.depth>1?e:t,s=D.getTextSize(o,[a.fontWeight,a.fontSize+"px",a.fontFamily].join(" ").trim()),h=r.x1-r.x0-2*n,c=r.depth>0&&r.children&&s.width<=h;return r.hasTitle=!!c,c?s.height+2*n:n}},e.prototype.processData=function(){if(!this.data)return!1;var t,e=this,n=e.data,i=e.sizeKey,r=e.labelKey,o=e.colorKey,a=e.colorDomain,s=e.colorRange,h=e.colorParents;t=i?Jr(n).sum((function(t){return t.children?1:t[i]})):Jr(n).sum((function(t){return t.children?0:1})),this.dataRoot=t;var c=new gt;c.domain=a,c.range=s;var l=this;return function t(e,n){void 0===n&&(n=0);var i=e.children,a=e.datum,s=a[r],u=o?a[o]:n;e.series=l,e.fill=!i||h?c.convert(u):"#272931",e.colorValue=u,e.label=s?i?s.toUpperCase():s:"",i&&i.forEach((function(e){return t(e,n+1)}))}(this.dataRoot),!0},e.prototype.getLabelCenterX=function(t){return(t.x0+t.x1)/2},e.prototype.getLabelCenterY=function(t){return(t.y0+t.y1)/2+2},e.prototype.update=function(){this.updatePending=!1,this.updateSelections(),this.updateNodes()},e.prototype.updateSelections=function(){if(this.nodeDataPending){this.nodeDataPending=!1;var t=this.chart,e=this.dataRoot;if(t&&e){var n=t.getSeriesRect();if(n){this.layout.size=[n.width,n.height],this.updateLayoutPadding();var i=this.layout.processData(e).descendants(),r=this.groupSelection.setData(i);r.exit.remove();var o=r.enter.append(Mt);o.append(Sn),o.append(M).each((function(t){return t.tag=eo.Name})),o.append(M).each((function(t){return t.tag=eo.Value})),this.groupSelection=r.merge(o)}}}},e.prototype.updateNodes=function(){var t=this;if(this.chart){var e=this,n=e.colorKey,i=e.labelMap,r=e.nodePadding,o=e.title,a=e.subtitle,s=e.labels,h=e.shadow,c=e.gradient,l=e.chart.highlightedDatum,u=e.highlightStyle,f=u.fill,p=u.stroke,d=u.strokeWidth,y=u.item,g=y.fill,m=void 0===g?f:g,v=y.stroke,b=void 0===v?p:v,x=y.strokeWidth,_=void 0===x?d:x;this.groupSelection.selectByClass(Sn).each((function(e,n){var i=n===l,r=i&&void 0!==m?m:n.fill,o=i&&void 0!==b?b:n.depth<2?void 0:"black",a=i&&void 0!==_?_:t.getStrokeWidth(1,n);e.fill=r,e.stroke=o,e.strokeWidth=a,e.crisp=!0,e.gradient=c,e.x=n.x0,e.y=n.y0,e.width=n.x1-n.x0,e.height=n.y1-n.y0})),this.groupSelection.selectByTag(eo.Name).each((function(e,n,c){var u,f=!n.children,p=n.x1-n.x0-2*r,d=n.y1-n.y0-2*r,y=n.hasTitle,g=n===l;u=f?p>40&&d>40?s.large:p>20&&d>20?s.medium:s.small:n.depth>1?a:o,e.fontWeight=u.fontWeight,e.fontSize=u.fontSize,e.fontFamily=u.fontFamily,e.textBaseline=f?"bottom":y?"top":"middle",e.textAlign=y?"left":"center",e.text=n.label;var m=e.computeBBox(),v=f&&!!m&&m.width<=p&&2*m.height+8<=d;i.set(c,e),e.fill=g?"black":u.color,e.fillShadow=v&&!g?h:void 0,e.visible=y||v,y?(e.x=n.x0+r,e.y=n.y0+r):(e.x=t.getLabelCenterX(n),e.y=t.getLabelCenterY(n))})),this.groupSelection.selectByTag(eo.Value).each((function(e,o,a){var c=!o.children,u=o.x1-o.x0-2*r,f=o===l,p=o.colorValue,d=s.color;e.fontSize=d.fontSize,e.fontFamily=d.fontFamily,e.fontStyle=d.fontStyle,e.fontWeight=d.fontWeight,e.textBaseline="top",e.textAlign="center",e.text="number"==typeof p&&isFinite(p)?String(Vt(o.colorValue))+"%":"";var y=e.computeBBox(),g=i.get(a),m=!!g&&g.visible,v=c&&!!n&&m&&!!y&&y.width<u;e.fill=f?"black":d.color,e.fillShadow=f?void 0:h,e.visible=v,v?(e.x=t.getLabelCenterX(o),e.y=t.getLabelCenterY(o)):!g||o.children&&o.children.length||(g.textBaseline="middle",g.y=t.getLabelCenterY(o))}))}},e.prototype.getDomain=function(t){return[0,1]},e.prototype.fireNodeClickEvent=function(t,e){this.fireEvent({type:"nodeClick",event:t,series:this,datum:e.datum,labelKey:this.labelKey,sizeKey:this.sizeKey,colorKey:this.colorKey})},e.prototype.getTooltipHtml=function(t){var e=this,n=e.tooltip,i=e.sizeKey,r=e.labelKey,o=e.colorKey,a=e.colorName,s=e.rootName,h=t.datum,c=n.renderer,l=t.depth?h[r]:s||h[r],u=void 0,f=t.fill||"gray";if(o&&a){var p=h[o];"number"==typeof p&&isFinite(p)&&(u="<b>"+a+"</b>: "+Vt(h[o]))}var d={title:l,backgroundColor:f,content:u};return c?ai(c({datum:t,sizeKey:i,labelKey:r,colorKey:o,title:l,color:f}),d):ai(d)},e.prototype.listSeriesItems=function(t){},e.className="TreemapSeries",e.type="treemap",io([i("dataChange")],e.prototype,"labelKey",void 0),io([i("dataChange")],e.prototype,"sizeKey",void 0),io([i("dataChange")],e.prototype,"colorKey",void 0),io([i("dataChange")],e.prototype,"colorDomain",void 0),io([i("dataChange")],e.prototype,"colorRange",void 0),io([i("dataChange")],e.prototype,"colorParents",void 0),io([i("update")],e.prototype,"gradient",void 0),e}(Kr),ho=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),co=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._centerX=0,e._centerY=0,e._centerOffset=0,e._innerRadius=10,e._outerRadius=20,e._startAngle=0,e._endAngle=2*Math.PI,e._angleOffset=0,e}return ho(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this._centerX},set:function(t){this._centerX!==t&&(this._centerX=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this._centerY},set:function(t){this._centerY!==t&&(this._centerY=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"centerOffset",{get:function(){return this._centerOffset},set:function(t){this._centerOffset!==t&&(this._centerOffset=Math.max(0,t),this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this._innerRadius},set:function(t){this._innerRadius!==t&&(this._innerRadius=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outerRadius",{get:function(){return this._outerRadius},set:function(t){this._outerRadius!==t&&(this._outerRadius=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this._startAngle},set:function(t){this._startAngle!==t&&(this._startAngle=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this._endAngle},set:function(t){this._endAngle!==t&&(this._endAngle=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angleOffset",{get:function(){return this._angleOffset},set:function(t){this._angleOffset!==t&&(this._angleOffset=t,this.dirtyPath=!0)},enumerable:!0,configurable:!0}),e.prototype.computeBBox=function(){var t=this.outerRadius;return new h(this.centerX-t,this.centerY-t,2*t,2*t)},e.prototype.isFullPie=function(){return Gt(Yt(this.startAngle),Yt(this.endAngle))},e.prototype.updatePath=function(){var t=this.path,e=this.angleOffset,n=Math.min(this.startAngle,this.endAngle)+e,i=Math.max(this.startAngle,this.endAngle)+e,r=.5*(n+i),o=Math.min(this.innerRadius,this.outerRadius),a=Math.max(this.innerRadius,this.outerRadius),s=this.centerOffset,h=this.isFullPie(),c=this.centerX,l=this.centerY;if(t.clear(),s&&(c+=s*Math.cos(r),l+=s*Math.sin(r)),h||(t.moveTo(c+o*Math.cos(n),l+o*Math.sin(n)),t.lineTo(c+a*Math.cos(n),l+a*Math.sin(n))),t.cubicArc(c,l,a,a,0,n,i,0),h)t.moveTo(c+o*Math.cos(i),l+o*Math.sin(i));else{var u=c+o*Math.cos(i);t.lineTo(Math.abs(u)<1e-8?0:u,l+o*Math.sin(i))}t.cubicArc(c,l,o,o,0,i,n,1),t.closePath(),this.dirtyPath=!1},e.className="Sector",e}(Kt),lo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),uo=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},fo=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},po=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(fo(arguments[e]));return t},yo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lo(e,t),e}(Wi);!function(t){t[t.Sector=0]="Sector",t[t.Callout=1]="Callout",t[t.Label=2]="Label"}(ao||(ao={}));var go,mo,vo,bo,xo,_o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.offset=3,e.minAngle=20,e}return lo(e,t),uo([i("change")],e.prototype,"offset",void 0),uo([i("dataChange")],e.prototype,"minAngle",void 0),uo([i("dataChange")],e.prototype,"formatter",void 0),e}(Ti),wo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.colors=["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"],e.length=10,e.strokeWidth=1,e}return lo(e,t),uo([i("change")],e.prototype,"colors",void 0),uo([i("change")],e.prototype,"length",void 0),uo([i("change")],e.prototype,"strokeWidth",void 0),e}(n),Oo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lo(e,t),uo([i("change")],e.prototype,"renderer",void 0),e}(Ii),ko=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showInLegend=!1,e}return lo(e,t),uo([i()],e.prototype,"showInLegend",void 0),e}(L),So=function(e){function n(){var t,n=e.call(this)||this;return n.radiusScale=new gt,n.groupSelection=jt.select(n.pickGroup).selectAll(),n.groupSelectionData=[],n.angleScale=((t=new gt).domain=[0,1],t.range=[-Math.PI,Math.PI].map((function(t){return t+Math.PI/2})),t),n.seriesItemEnabled=[],n.label=new _o,n.callout=new wo,n.tooltip=new Oo,n.angleKey="",n.angleName="",n._fills=["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],n._strokes=["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"],n.fillOpacity=1,n.strokeOpacity=1,n.lineDash=[0],n.lineDashOffset=0,n.rotation=0,n.outerRadiusOffset=0,n.innerRadiusOffset=0,n.strokeWidth=1,n.highlightStyle=new yo,n.addEventListener("update",n.scheduleUpdate,n),n.label.addEventListener("change",n.scheduleUpdate,n),n.label.addEventListener("dataChange",n.scheduleData,n),n.callout.addEventListener("change",n.scheduleLayout,n),n.addPropertyListener("data",(function(t){t.value&&(t.source.seriesItemEnabled=t.value.map((function(){return!0})))})),n}return lo(n,e),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(t){var e=this._title;function n(){this.fireEvent({type:"legendChange"})}e!==t&&(e&&(e.removeEventListener("change",this.scheduleUpdate,this),e.addPropertyListener("showInLegend",n,this),this.group.removeChild(e.node)),t&&(t.node.textBaseline="bottom",t.addEventListener("change",this.scheduleUpdate,this),t.addPropertyListener("showInLegend",n,this),this.group.appendChild(t.node)),this._title=t,this.scheduleUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fills",{get:function(){return this._fills},set:function(t){this._fills=t,this.scheduleUpdate()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strokes",{get:function(){return this._strokes},set:function(t){this._strokes=t,this.scheduleUpdate()},enumerable:!0,configurable:!0}),n.prototype.onHighlightChange=function(){this.updateNodes()},n.prototype.setColors=function(t,e){this.fills=t,this.strokes=e,this.callout.colors=e},n.prototype.getDomain=function(e){return e===t.ChartAxisDirection.X?this.angleScale.domain:this.radiusScale.domain},n.prototype.processData=function(){var t,e=this,n=this,i=n.angleKey,r=n.radiusKey,o=n.seriesItemEnabled,a=n.angleScale,s=n.groupSelectionData,h=n.label,c=i&&this.data?this.data:[],l=c.map((function(t,e){return o[e]&&Math.abs(+t[i])||0})),u=l.reduce((function(t,e){return t+e}),0),f=(t=0,l.map((function(e){return t+=e/u}))),p=h.formatter,d=h.enabled&&this.labelKey,y=[],g=[];if(d&&(y=p?c.map((function(t){return p({value:t[d]})})):c.map((function(t){return String(t[d])}))),r){var m=this.radiusMin,v=this.radiusMax,b=c.map((function(t){return Math.abs(t[r])})),x=void 0!==m?m:Math.min.apply(Math,po(b)),_=(void 0!==v?v:Math.max.apply(Math,po(b)))-x;g=b.map((function(t){return _?(t-x)/_:1}))}s.length=0;var w=Ut(this.rotation),O=Math.PI/2,k=0;return f.reduce((function(t,n){var i,o,l=r?g[k]:1,u=a.convert(t)+w,f=a.convert(n)+w,p=(u+f)/2,m=Math.abs(f-u),v=Math.cos(p),b=Math.sin(p),x=Ut(h.minAngle),_=d&&m>x,S=Ht(p),P=-3*Math.PI/4;return S>=P&&S<(P+=O)?(i="center",o="bottom"):S>=P&&S<(P+=O)?(i="left",o="middle"):S>=P&&S<(P+=O)?(i="center",o="hanging"):(i="right",o="middle"),s.push({series:e,datum:c[k],itemId:k,index:k,radius:l,startAngle:u,endAngle:f,midAngle:p,midCos:v,midSin:b,label:_?{text:y[k],textAlign:i,textBaseline:o}:void 0}),k++,n}),0),!0},n.prototype.update=function(){this.updatePending=!1;var t=this.radius,e=this.innerRadiusOffset,n=this.outerRadiusOffset,i=this.title;this.radiusScale.range=[e?t+e:0,t+(n||0)],this.group.translationX=this.centerX,this.group.translationY=this.centerY,i&&(0===Math.max(0,this.radiusScale.range[1])?i.node.visible=!1:(i.node.translationY=-t-n-2,i.node.visible=i.enabled)),this.updateSelections(),this.updateNodes()},n.prototype.updateSelections=function(){this.nodeDataPending&&(this.nodeDataPending=!1,this.updateGroupSelection())},n.prototype.updateGroupSelection=function(){var t=this.groupSelection.setData(this.groupSelectionData);t.exit.remove();var e=t.enter.append(Mt);e.append(co).each((function(t){return t.tag=ao.Sector})),e.append(Lt).each((function(t){t.tag=ao.Callout,t.pointerEvents=f.None})),e.append(M).each((function(t){t.tag=ao.Label,t.pointerEvents=f.None})),this.groupSelection=t.merge(e)},n.prototype.updateNodes=function(){var t=this;if(this.chart){this.group.visible=this.visible&&this.seriesItemEnabled.indexOf(!0)>=0;var e=this,n=e.fills,i=e.strokes,r=e.fillOpacity,o=e.strokeOpacity,a=e.radiusScale,s=e.callout,h=e.shadow,c=e.chart.highlightedDatum,l=e.highlightStyle,u=l.fill,f=l.stroke,p=l.strokeWidth,d=l.item,y=d.fill,g=void 0===y?u:y,m=d.stroke,v=void 0===m?f:m,b=d.strokeWidth,x=void 0===b?p:b,_=e.angleKey,w=e.radiusKey,O=e.formatter,k=[],S=a.convert(0);this.groupSelection.selectByTag(ao.Sector).each((function(e,s,l){var u=a.convert(s.radius),f=!!c&&c.series===t&&s.itemId===c.itemId,p=f&&void 0!==g?g:n[l%n.length],d=f&&void 0!==v?v:i[l%i.length],y=f&&void 0!==x?x:t.getStrokeWidth(t.strokeWidth),m=void 0;O&&(m=O({datum:s.datum,angleKey:_,radiusKey:w,fill:p,stroke:d,strokeWidth:y,highlighted:f}));var b=e.parent&&e.parent.parent;f&&b&&(b.removeChild(e.parent),b.appendChild(e.parent)),e.innerRadius=Math.max(0,S),e.outerRadius=Math.max(0,u),e.startAngle=s.startAngle,e.endAngle=s.endAngle,e.fill=m&&m.fill||p,e.stroke=m&&m.stroke||d,e.strokeWidth=m&&void 0!==m.strokeWidth?m.strokeWidth:y,e.fillOpacity=r,e.strokeOpacity=o,e.lineDash=t.lineDash,e.lineDashOffset=t.lineDashOffset,e.fillShadow=h,e.lineJoin="round",e.opacity=t.getOpacity(),k.push(e.centerOffset)}));var P=s.colors,D=s.length,C=s.strokeWidth;this.groupSelection.selectByTag(ao.Callout).each((function(t,e,n){var i=a.convert(e.radius),r=Math.max(0,i);e.label&&0!==r?(t.strokeWidth=C,t.stroke=P[n%P.length],t.x1=e.midCos*r,t.y1=e.midSin*r,t.x2=e.midCos*(r+D),t.y2=e.midSin*(r+D)):t.stroke=void 0}));var M=this.label,A=M.offset,j=M.fontStyle,T=M.fontWeight,L=M.fontSize,F=M.fontFamily,N=M.color;this.groupSelection.selectByTag(ao.Label).each((function(t,e,n){var i=e.label,r=a.convert(e.radius),o=Math.max(0,r);if(i&&0!==o){var s=k[n]+o+D+A;t.fontStyle=j,t.fontWeight=T,t.fontSize=L,t.fontFamily=F,t.text=i.text,t.x=e.midCos*s,t.y=e.midSin*s,t.fill=N,t.textAlign=i.textAlign,t.textBaseline=i.textBaseline}else t.fill=void 0}))}},n.prototype.fireNodeClickEvent=function(t,e){this.fireEvent({type:"nodeClick",event:t,series:this,datum:e.datum,angleKey:this.angleKey,labelKey:this.labelKey,radiusKey:this.radiusKey})},n.prototype.getTooltipHtml=function(t){var e=this.angleKey;if(!e)return"";var n=this,i=n.fills,r=n.tooltip,o=n.angleName,a=n.radiusKey,s=n.radiusName,h=n.labelKey,c=n.labelName,l=r.renderer,u=i[t.index%i.length],f=t.datum,p=h?f[h]+": ":"",d=f[e],y="number"==typeof d?Vt(d):d.toString(),g=this.title?this.title.text:void 0,m={title:g,backgroundColor:u,content:p+y};return l?ai(l({datum:f,angleKey:e,angleValue:d,angleName:o,radiusKey:a,radiusValue:a?f[a]:void 0,radiusName:s,labelKey:h,labelName:c,title:g,color:u}),m):ai(m)},n.prototype.listSeriesItems=function(t){var e=this,n=this.labelKey,i=this.data;if(i&&i.length&&n){var r=this.fills,o=this.strokes,a=this.id,s=this.title&&this.title.showInLegend&&this.title.text;i.forEach((function(i,h){var c=[];s&&c.push(s),c.push(String(i[n])),t.push({id:a,itemId:h,enabled:e.seriesItemEnabled[h],label:{text:c.join(" - ")},marker:{fill:r[h%r.length],stroke:o[h%o.length],fillOpacity:e.fillOpacity,strokeOpacity:e.strokeOpacity}})}))}},n.prototype.toggleSeriesItem=function(t,e){this.seriesItemEnabled[t]=e,this.scheduleData()},n.className="PieSeries",n.type="pie",uo([i("dataChange")],n.prototype,"angleKey",void 0),uo([i("update")],n.prototype,"angleName",void 0),uo([i("dataChange")],n.prototype,"radiusKey",void 0),uo([i("update")],n.prototype,"radiusName",void 0),uo([i("dataChange")],n.prototype,"radiusMin",void 0),uo([i("dataChange")],n.prototype,"radiusMax",void 0),uo([i("dataChange")],n.prototype,"labelKey",void 0),uo([i("update")],n.prototype,"labelName",void 0),uo([i("layoutChange")],n.prototype,"fillOpacity",void 0),uo([i("layoutChange")],n.prototype,"strokeOpacity",void 0),uo([i("update")],n.prototype,"lineDash",void 0),uo([i("update")],n.prototype,"lineDashOffset",void 0),uo([i("update")],n.prototype,"formatter",void 0),uo([i("dataChange")],n.prototype,"rotation",void 0),uo([i("layoutChange")],n.prototype,"outerRadiusOffset",void 0),uo([i("dataChange")],n.prototype,"innerRadiusOffset",void 0),uo([i("layoutChange")],n.prototype,"strokeWidth",void 0),uo([i("layoutChange")],n.prototype,"shadow",void 0),n}(Ui),Po=new je((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(t.getTime()+6e4*e)}),(function(t,e){return(e.getTime()-t.getTime())/6e4}),(function(t){return t.getUTCMinutes()})),Do=new je((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(t.getTime()+36e5*e)}),(function(t,e){return(e.getTime()-t.getTime())/36e5}),(function(t){return t.getUTCHours()})),Co=new je((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Mo=function(){return(Mo=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Ao={fills:["#f3622d","#fba71b","#57b757","#41a9c9","#4258c9","#9a42c8","#c84164","#888888"],strokes:["#aa4520","#b07513","#3d803d","#2d768d","#2e3e8d","#6c2e8c","#8c2d46","#5f5f5f"]},jo={arrayMerge:function(t,e,n){return e},isMergeableObject:function(t){return w(t)&&!(t instanceof Ae)}},To=function(){function t(e){var n=this.createChartConfigPerSeries(this.getDefaults());if(k(e)){var i=(e=O({},e,jo)).overrides;i&&(k(i.common)&&t.seriesTypes.concat(["cartesian","polar","hierarchy"]).forEach((function(t){n[t]=O(n[t],i.common,jo)})),i.cartesian&&(n.cartesian=O(n.cartesian,i.cartesian,jo),t.cartesianSeriesTypes.forEach((function(t){n[t]=O(n[t],i.cartesian,jo)}))),i.polar&&(n.polar=O(n.polar,i.polar,jo),t.polarSeriesTypes.forEach((function(t){n[t]=O(n[t],i.polar,jo)}))),i.hierarchy&&(n.hierarchy=O(n.hierarchy,i.hierarchy,jo),t.hierarchySeriesTypes.forEach((function(t){n[t]=O(n[t],i.hierarchy,jo)}))),t.seriesTypes.forEach((function(t){var e,r=i[t];r&&(r.series&&(r.series=((e={})[t]=r.series,e)),n[t]=O(n[t],r,jo))})))}this.palette=e&&e.palette?e.palette:this.getPalette(),this.config=Object.freeze(n)}return t.prototype.getPalette=function(){return Ao},t.getAxisDefaults=function(){return{top:{},right:{},bottom:{},left:{},thickness:0,title:{padding:{top:10,right:10,bottom:10,left:10},text:"Axis Title",fontStyle:void 0,fontWeight:"bold",fontSize:12,fontFamily:this.fontFamily,color:"rgb(70, 70, 70)"},label:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,padding:5,rotation:0,color:"rgb(87, 87, 87)",formatter:void 0},line:{width:1,color:"rgb(195, 195, 195)"},tick:{width:1,size:6,color:"rgb(195, 195, 195)",count:10},gridStyle:[{stroke:"rgb(219, 219, 219)",lineDash:[4,2]}]}},t.getSeriesDefaults=function(){return{tooltip:{enabled:!0,renderer:void 0},visible:!0,showInLegend:!0,cursor:"default",highlightStyle:{item:{fill:"yellow"},series:{dimOpacity:1}}}},t.getBarSeriesDefaults=function(){return Mo(Mo({},this.getSeriesDefaults()),{flipXY:!1,fillOpacity:1,strokeOpacity:1,xKey:"",xName:"",yKeys:[],yNames:[],grouped:!1,normalizedTo:void 0,strokeWidth:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0,placement:"inside"},shadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5}})},t.getCartesianSeriesMarkerDefaults=function(){return{enabled:!0,shape:"circle",size:6,maxSize:30,strokeWidth:1,formatter:void 0}},t.getChartDefaults=function(){return{width:600,height:300,autoSize:!0,background:{visible:!0,fill:"white"},padding:{top:20,right:20,bottom:20,left:20},title:{enabled:!1,padding:{top:10,right:10,bottom:10,left:10},text:"Title",fontStyle:void 0,fontWeight:"bold",fontSize:16,fontFamily:this.fontFamily,color:"rgb(70, 70, 70)"},subtitle:{enabled:!1,padding:{top:10,right:10,bottom:10,left:10},text:"Subtitle",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,color:"rgb(140, 140, 140)"},legend:{enabled:!0,position:"right",spacing:20,item:{paddingX:16,paddingY:8,marker:{shape:void 0,size:15,strokeWidth:1,padding:8},label:{color:"black",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,formatter:void 0}}},tooltip:{enabled:!0,tracking:!0,delay:0,class:hi.defaultTooltipClass}}},t.prototype.createChartConfigPerSeries=function(e){var n={cartesian:t.cartesianSeriesTypes,polar:t.polarSeriesTypes},i=function(t){n[t].forEach((function(n){e[n]||(e[n]=O({},e[t],jo))}))};for(var r in n)i(r);return e},t.prototype.getConfig=function(t,e){var n=g(this.config,t,e);return Array.isArray(n)?O([],n,jo):k(n)?O({},n,jo):n},t.prototype.getDefaults=function(){return O({},t.defaults,jo)},t.prototype.mergeWithParentDefaults=function(e){var n=Object.getPrototypeOf(Object.getPrototypeOf(this));if(n===Object.prototype){var i=O({},t.defaults,jo);return i=O(i,e,jo)}return O(n.getDefaults(),e,jo)},t.prototype.setSeriesColors=function(t,e,n){var i=this.palette,r=this.getSeriesColorCount(e);if(r===1/0||0===r)t.setColors(i.fills,i.strokes);else{var o=wt(i.fills,n,r),a=wt(i.strokes,n,r);t.setColors(o,a),n+=r}return n},t.prototype.getYKeyCount=function(t){if(!Array.isArray(t))return 0;var e=0;return t.forEach((function(t){Array.isArray(t)?e+=t.length:e+=1})),e},t.prototype.getSeriesColorCount=function(t){switch(t.type){case"bar":case"column":case"area":return this.getYKeyCount(t.yKeys);case"pie":return 1/0;default:return 1}},t.fontFamily="Verdana, sans-serif",t.cartesianDefaults=Mo(Mo({},t.getChartDefaults()),{axes:{number:Mo({},t.getAxisDefaults()),log:Mo(Mo({},t.getAxisDefaults()),{base:10}),category:Mo({},t.getAxisDefaults()),groupedCategory:Mo({},t.getAxisDefaults()),time:Mo({},t.getAxisDefaults())},series:{column:Mo(Mo({},t.getBarSeriesDefaults()),{flipXY:!1}),bar:Mo(Mo({},t.getBarSeriesDefaults()),{flipXY:!0}),line:Mo(Mo({},t.getSeriesDefaults()),{title:void 0,xKey:"",xName:"",yKey:"",yName:"",strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,marker:Mo({},t.getCartesianSeriesMarkerDefaults()),label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:t.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0}}),scatter:Mo(Mo({},t.getSeriesDefaults()),{title:void 0,xKey:"",yKey:"",sizeKey:void 0,labelKey:void 0,xName:"",yName:"",sizeName:"Size",labelName:"Label",strokeWidth:2,fillOpacity:1,strokeOpacity:1,marker:Mo({},t.getCartesianSeriesMarkerDefaults()),label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:t.fontFamily,color:"rgb(70, 70, 70)"}}),area:Mo(Mo({},t.getSeriesDefaults()),{title:void 0,xKey:"",xName:"",yKeys:[],yNames:[],normalizedTo:void 0,fillOpacity:.8,strokeOpacity:1,strokeWidth:2,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5},marker:Mo(Mo({},t.getCartesianSeriesMarkerDefaults()),{enabled:!1}),label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:t.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0}}),histogram:Mo(Mo({},t.getSeriesDefaults()),{title:void 0,xKey:"",yKey:"",xName:"",yName:"",strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,areaPlot:!1,binCount:10,bins:void 0,aggregation:"sum",label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:t.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0}})},navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8}}}),t.defaults={cartesian:t.cartesianDefaults,groupedCategory:t.cartesianDefaults,polar:Mo(Mo({},t.getChartDefaults()),{series:{pie:Mo(Mo({},t.getSeriesDefaults()),{title:{enabled:!0,showInLegend:!1,padding:new s(0),text:"",fontStyle:void 0,fontWeight:"bold",fontSize:14,fontFamily:t.fontFamily,color:"rgb(70, 70, 70)"},angleKey:"",angleName:"",radiusKey:void 0,radiusName:void 0,labelKey:void 0,labelName:void 0,label:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:t.fontFamily,color:"rgb(70, 70, 70)",offset:3,minAngle:20},callout:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,rotation:0,outerRadiusOffset:0,innerRadiusOffset:0,shadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5}})}}),hierarchy:Mo(Mo({},t.getChartDefaults()),{series:{treemap:Mo(Mo({},t.getSeriesDefaults()),{showInLegend:!1,labelKey:"label",sizeKey:"size",colorKey:"color",colorDomain:[-5,5],colorRange:["#cb4b3f","#6acb64"],colorParents:!1,gradient:!0,nodePadding:2,title:{enabled:!0,color:"white",fontStyle:void 0,fontWeight:"bold",fontSize:12,fontFamily:"Verdana, sans-serif",padding:15},subtitle:{enabled:!0,color:"white",fontStyle:void 0,fontWeight:void 0,fontSize:9,fontFamily:"Verdana, sans-serif",padding:13},labels:{large:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:18,fontFamily:"Verdana, sans-serif",color:"white"},medium:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:14,fontFamily:"Verdana, sans-serif",color:"white"},small:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:10,fontFamily:"Verdana, sans-serif",color:"white"},color:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:"Verdana, sans-serif",color:"white"}}})}})},t.cartesianSeriesTypes=["line","area","bar","column","scatter","histogram"],t.polarSeriesTypes=["pie"],t.hierarchySeriesTypes=["treemap"],t.seriesTypes=t.cartesianSeriesTypes.concat(t.polarSeriesTypes),t}(),Lo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Fo=function(){return(Fo=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},No=function(t){function e(e){return t.call(this,e)||this}return Lo(e,t),e.prototype.getDefaults=function(){var t="rgb(200, 200, 200)",e={title:{color:t},label:{color:t},gridStyle:[{stroke:"rgb(88, 88, 88)",lineDash:[4,2]}]},n={label:{color:t}},i={background:{fill:"rgb(34, 38, 41)"},title:{color:t},subtitle:{color:"rgb(150, 150, 150)"},axes:{number:Fo({},e),category:Fo({},e),time:Fo({},e)},legend:{item:{label:{color:t}}}};return this.mergeWithParentDefaults({cartesian:Fo(Fo({},i),{series:{bar:Fo({},n),column:Fo({},n),histogram:Fo({},n)}}),polar:Fo(Fo({},i),{series:{pie:Fo(Fo({},n),{title:{color:t}})}})})},e}(To),Eo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),zo={fills:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722"],strokes:["#ab2f26","#a31545","#6d1b7b","#482980","#2c397f","#1769aa","#0276ab","#008494","#00695f","#357a38","#618834","#909a28","#b3a429","#b38705","#b36a00","#b33d18"]},Bo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Eo(e,t),e.prototype.getPalette=function(){return zo},e}(To),Wo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Io={fills:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722"],strokes:["#ab2f26","#a31545","#6d1b7b","#482980","#2c397f","#1769aa","#0276ab","#008494","#00695f","#357a38","#618834","#909a28","#b3a429","#b38705","#b36a00","#b33d18"]},Ko=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wo(e,t),e.prototype.getPalette=function(){return Io},e}(No),Ro=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yo={fills:["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],strokes:["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"]},Xo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ro(e,t),e.prototype.getPalette=function(){return Yo},e}(To),Ho=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Uo={fills:["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],strokes:["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"]},Go=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ho(e,t),e.prototype.getPalette=function(){return Uo},e}(No),Vo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qo={fills:["#febe76","#ff7979","#badc58","#f9ca23","#f0932b","#eb4c4b","#6ab04c","#7ed6df","#e056fd","#686de0"],strokes:["#b28553","#b35555","#829a3e","#ae8d19","#a8671e","#a43535","#4a7b35","#58969c","#9d3cb1","#494c9d"]},Zo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vo(e,t),e.prototype.getPalette=function(){return qo},e}(To),Jo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$o={fills:["#febe76","#ff7979","#badc58","#f9ca23","#f0932b","#eb4c4b","#6ab04c","#7ed6df","#e056fd","#686de0"],strokes:["#b28553","#b35555","#829a3e","#ae8d19","#a8671e","#a43535","#4a7b35","#58969c","#9d3cb1","#494c9d"]},Qo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Jo(e,t),e.prototype.getPalette=function(){return $o},e}(No),ta=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ea={fills:["#5BC0EB","#FDE74C","#9BC53D","#E55934","#FA7921","#fa3081"],strokes:["#4086a4","#b1a235","#6c8a2b","#a03e24","#af5517","#af225a"]},na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.prototype.getPalette=function(){return ea},e}(To),ia=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ra={fills:["#5BC0EB","#FDE74C","#9BC53D","#E55934","#FA7921","#fa3081"],strokes:["#4086a4","#b1a235","#6c8a2b","#a03e24","#af5517","#af225a"]},oa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ia(e,t),e.prototype.getPalette=function(){return ra},e}(No),aa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),sa=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},ha=function(t){return t},ca=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e._domain=[1,10],e.baseLog=ha,e.basePow=ha,e._base=10,e}return aa(e,t),e.prototype.setDomain=function(e){var n=e[0],i=e[e.length-1];(0===n||0===i||n<0&&i>0||n>0&&i<0)&&(console.warn("Log scale domain should not start at, end at or cross zero."),0===n&&i>0?n=Number.EPSILON:0===i&&n<0?i=-Number.EPSILON:n<0&&i>0?Math.abs(i)>=Math.abs(n)?n=Number.EPSILON:i=-Number.EPSILON:n>0&&i<0&&(Math.abs(i)>=Math.abs(n)?n=-Number.EPSILON:i=Number.EPSILON),(e=e.slice())[0]=n,e[e.length-1]=i),t.prototype.setDomain.call(this,e)},e.prototype.getDomain=function(){return t.prototype.getDomain.call(this)},Object.defineProperty(e.prototype,"base",{get:function(){return this._base},set:function(t){this._base!==t&&(this._base=t,this.rescale())},enumerable:!0,configurable:!0}),e.prototype.rescale=function(){var n=this.base,i=e.makeLogFn(n),r=e.makePowFn(n);this.domain[0]<0?(i=this.reflect(i),r=this.reflect(r),this.transform=function(t){return-Math.log(-t)},this.untransform=function(t){return-Math.exp(-t)}):(this.transform=function(t){return Math.log(t)},this.untransform=function(t){return Math.exp(t)}),this.baseLog=i,this.basePow=r,t.prototype.rescale.call(this)},e.prototype.reflect=function(t){return function(e){return-t(-e)}},e.prototype.nice=function(){var t,e,n=this.domain,i=0,r=n.length-1,o=n[i],a=n[r];a<o&&(i=(t=sa([r,i],2))[0],r=t[1],o=(e=sa([a,o],2))[0],a=e[1]),n[i]=this.basePow(Math.floor(this.baseLog(o))),n[r]=this.basePow(Math.ceil(this.baseLog(a))),this.domain=n},e.pow10=function(t){return isFinite(t)?+("1e"+t):t<0?0:t},e.makePowFn=function(t){return 10===t?e.pow10:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}},e.makeLogFn=function(t){if(t===Math.E)return Math.log;if(10===t)return Math.log10;if(2===t)return Math.log2;var e=Math.log(t);return function(t){return Math.log(t)/e}},e.prototype.ticks=function(t){var e;void 0===t&&(t=10);var n=null==t?10:+t,i=this.base,r=this.domain,o=r[0],a=r[r.length-1],s=a<o;s&&(o=(e=sa([a,o],2))[0],a=e[1]);var h=this.baseLog(o),c=this.baseLog(a),l=[];if(!(i%1)&&c-h<n){if(h=Math.round(h)-1,c=Math.round(c)+1,o>0){for(;h<c;++h)for(var u=1,f=this.basePow(h);u<i;++u)if(!((p=f*u)<o)){if(p>a)break;l.push(p)}}else for(;h<c;++h)for(u=i-1,f=this.basePow(h);u>=1;--u){var p;if(!((p=f*u)<o)){if(p>a)break;l.push(p)}}2*l.length<n&&(l=N(o,a,n))}else l=N(h,c,Math.min(c-h,n)).map(this.basePow);return s?l.reverse():l},e.prototype.tickFormat=function(t,e){var n=this,i=this.base;if(null==e&&(e=10===i?".0e":","),"function"!=typeof e&&(e=et(e)),t===1/0)return e;null==t&&(t=10);var r=Math.max(1,i*t/this.ticks().length);return function(t){var o=t/n.basePow(Math.round(n.baseLog(t)));return o*i<i-.5&&(o*=i),o<=r?e(t):""}},e}(it),la=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ua=function(t){function e(){var e=t.call(this)||this;return e.scale=new ca,e.scale.clamper=le,e}return la(e,t),Object.defineProperty(e.prototype,"base",{get:function(){return this.scale.base},set:function(t){this.scale.base=t},enumerable:!0,configurable:!0}),e.className="LogAxis",e.type="log",e}(ue),fa=function(){return(fa=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},pa={background:{meta:{defaults:{visible:!0,fill:"white"}}},padding:{meta:{constructor:s,defaults:{top:20,right:20,bottom:20,left:20}}},tooltip:{meta:{defaults:{enabled:!0,tracking:!0,delay:0,class:hi.defaultTooltipClass}}},title:{meta:{constructor:L,defaults:{enabled:!1,padding:{meta:{constructor:s,defaults:{top:10,right:10,bottom:10,left:10}}},text:"Title",fontStyle:void 0,fontWeight:"bold",fontSize:14,fontFamily:"Verdana, sans-serif",color:"rgb(70, 70, 70)"}}},subtitle:{meta:{constructor:L,defaults:{enabled:!1,padding:{meta:{constructor:s,defaults:{top:10,right:10,bottom:10,left:10}}},text:"Subtitle",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:"Verdana, sans-serif",color:"rgb(140, 140, 140)"}}},legend:{meta:{constructor:$n,defaults:{enabled:!0,position:t.LegendPosition.Right,spacing:20}},item:{meta:{constructor:Jn,defaults:{paddingX:16,paddingY:8}},marker:{meta:{constructor:Zn,defaults:{shape:void 0,size:15,strokeWidth:1,padding:8}}},label:{meta:{constructor:qn,defaults:{color:"black",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:"Verdana, sans-serif",formatter:void 0}}}}}},da={container:void 0,autoSize:!0,width:600,height:300,data:[],title:void 0,subtitle:void 0,padding:{},background:{},legend:{item:{marker:{},label:{}}},navigator:{mask:{},minHandle:{},maxHandle:{}},listeners:void 0},ya={constructorParams:["document"],setAsIs:["container","data"],nonSerializable:["container","data"]},ga={visibleRange:[0,1],thickness:0,label:{},tick:{},title:{},line:{},gridStyle:[{stroke:"rgb(219, 219, 219)",lineDash:[4,2]}]},ma={visible:!0,showInLegend:!0,cursor:"default",listeners:void 0},va={item:{meta:{defaults:{fill:"yellow"}}},series:{meta:{defaults:{dimOpacity:1}}}},ba={fillOpacity:1,strokeOpacity:1,xKey:"",xName:"",yKeys:[],yNames:{},grouped:!1,normalizedTo:void 0,strokeWidth:1,lineDash:void 0,lineDashOffset:0,shadow:void 0},xa={meta:{constructor:Xr,defaults:{enabled:!0,color:"rgba(0, 0, 0, 0.5)",xOffset:0,yOffset:0,blur:5}}},_a={enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:"Verdana, sans-serif",color:"rgb(70, 70, 70)"},wa={meta:{defaults:fa(fa({},_a),{formatter:void 0,placement:t.BarLabelPlacement.Inside})}},Oa={meta:{defaults:{enabled:!0,renderer:void 0,format:void 0}}},ka={line:{meta:{defaults:{width:1,color:"rgb(195, 195, 195)"}}},title:{meta:{constructor:L,defaults:{padding:{meta:{constructor:s,defaults:{top:10,right:10,bottom:10,left:10}}},text:"Axis Title",fontStyle:void 0,fontWeight:"bold",fontSize:12,fontFamily:"Verdana, sans-serif",color:"rgb(70, 70, 70)"}}},label:{meta:{constructor:ie,defaults:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:"Verdana, sans-serif",padding:5,rotation:0,color:"rgb(87, 87, 87)",formatter:void 0}}},tick:{meta:{constructor:ne,setAsIs:["count"],defaults:{width:1,size:6,color:"rgb(195, 195, 195)",count:10}}}},Sa=fa(fa({meta:fa(fa({constructor:Oi},ya),{defaults:fa(fa({},da),{axes:[{type:ue.type,position:t.ChartAxisPosition.Left},{type:ye.type,position:t.ChartAxisPosition.Bottom}]})})},pa),{axes:(go={},go.number=fa({meta:{constructor:ue,setAsIs:["gridStyle","visibleRange"],defaults:ga}},ka),go[ua.type]=fa({meta:{constructor:ua,setAsIs:["gridStyle","visibleRange"],defaults:fa(fa({},ga),{base:10})}},ka),go[ye.type]=fa({meta:{constructor:ye,setAsIs:["gridStyle","visibleRange"],defaults:ga}},ka),go[Pe.type]=fa({meta:{constructor:Pe,setAsIs:["gridStyle","visibleRange"],defaults:ga}},ka),go[mn.type]=fa({meta:{constructor:mn,setAsIs:["gridStyle","visibleRange"],defaults:ga}},ka),go),series:(mo={column:{meta:{constructor:vr,setAsIs:["lineDash","yNames"],defaults:fa(fa({flipXY:!1},ma),ba)},highlightStyle:va,tooltip:Oa,label:wa,shadow:xa}},mo[vr.type]={meta:{constructor:vr,setAsIs:["lineDash","yNames"],defaults:fa(fa({flipXY:!0},ma),ba)},highlightStyle:va,tooltip:Oa,label:wa,shadow:xa},mo[kr.type]={meta:{constructor:kr,setAsIs:["lineDash"],defaults:fa(fa({},ma),{title:void 0,xKey:"",xName:"",yKey:"",yName:"",strokeWidth:2,strokeOpacity:1,lineDash:void 0,lineDashOffset:0})},tooltip:Oa,highlightStyle:va,label:{meta:{defaults:fa(fa({},_a),{formatter:void 0})}},marker:{meta:{constructor:Ji,defaults:{enabled:!0,shape:"circle",size:6,maxSize:30,strokeWidth:1,formatter:void 0}}}},mo[Mr.type]={meta:{constructor:Mr,defaults:fa(fa({},ma),{title:void 0,xKey:"",yKey:"",sizeKey:void 0,labelKey:void 0,xName:"",yName:"",sizeName:"Size",labelName:"Label",strokeWidth:2,fillOpacity:1,strokeOpacity:1})},tooltip:Oa,highlightStyle:va,marker:{meta:{constructor:Ji,defaults:{enabled:!0,shape:"circle",size:6,maxSize:30,strokeWidth:1,formatter:void 0}}},label:{meta:{defaults:fa({},_a)}}},mo[ur.type]={meta:{constructor:ur,setAsIs:["lineDash"],defaults:fa(fa({},ma),{xKey:"",xName:"",yKeys:[],yNames:[],normalizedTo:void 0,fillOpacity:1,strokeOpacity:1,strokeWidth:2,lineDash:void 0,lineDashOffset:0,shadow:void 0})},tooltip:Oa,highlightStyle:va,label:{meta:{defaults:fa(fa({},_a),{formatter:void 0})}},marker:{meta:{constructor:Ji,defaults:{enabled:!0,shape:"circle",size:6,maxSize:30,strokeWidth:1,formatter:void 0}}},shadow:xa},mo[Br.type]={meta:{constructor:Br,setAsIs:["lineDash"],defaults:fa(fa({},ma),{xKey:"",yKey:"",xName:"",yName:"",strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:void 0,lineDashOffset:0,areaPlot:!1,binCount:void 0,bins:void 0,aggregation:"sum"})},tooltip:Oa,highlightStyle:va,label:{meta:{defaults:fa(fa({},_a),{formatter:void 0})}},shadow:xa},mo),navigator:{meta:{constructor:bi,defaults:{enabled:!1,height:30}},mask:{meta:{constructor:mi,defaults:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2}}},minHandle:{meta:{constructor:vi,defaults:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8}}},maxHandle:{meta:{constructor:vi,defaults:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8}}}}}),Pa=fa(fa({meta:fa(fa({constructor:Vi},ya),{defaults:fa(fa({},da),{padding:{meta:{constructor:s,defaults:{top:40,right:40,bottom:40,left:40}}}})})},pa),{series:(vo={},vo[So.type]={meta:{constructor:So,setAsIs:["lineDash"],defaults:fa(fa({},ma),{title:void 0,angleKey:"",angleName:"",radiusKey:void 0,radiusName:void 0,labelKey:void 0,labelName:void 0,callout:{},fillOpacity:1,strokeOpacity:1,rotation:0,outerRadiusOffset:0,innerRadiusOffset:0,strokeWidth:1,lineDash:void 0,lineDashOffset:0,shadow:void 0})},tooltip:Oa,highlightStyle:va,title:{meta:{constructor:ko,defaults:{enabled:!0,showInLegend:!1,padding:{meta:{constructor:s,defaults:{top:10,right:10,bottom:10,left:10}}},text:"Series Title",fontStyle:void 0,fontWeight:"bold",fontSize:14,fontFamily:"Verdana, sans-serif",color:"black"}}},label:{meta:{defaults:fa(fa({},_a),{offset:3,minAngle:20})}},callout:{meta:{defaults:{length:10,strokeWidth:1}}},shadow:xa},vo)}),Da=fa(fa({meta:fa(fa({constructor:Si},ya),{defaults:fa({},da)})},pa),{series:(bo={},bo[so.type]={meta:{constructor:so,defaults:fa(fa({},ma),{showInLegend:!1,labelKey:"label",sizeKey:"size",colorKey:"color",colorDomain:[-5,5],colorRange:["#cb4b3f","#6acb64"],colorParents:!1,gradient:!0,nodePadding:2,title:{},subtitle:{},labels:{large:{},medium:{},small:{},color:{}}})},tooltip:Oa,highlightStyle:va,title:{meta:{defaults:{enabled:!0,color:"white",fontStyle:void 0,fontWeight:"bold",fontSize:12,fontFamily:"Verdana, sans-serif",padding:15}}},subtitle:{meta:{defaults:{enabled:!0,color:"white",fontStyle:void 0,fontWeight:void 0,fontSize:9,fontFamily:"Verdana, sans-serif",padding:13}}},labels:{meta:{defaults:{large:{},medium:{},small:{},color:{}}},large:{meta:{constructor:Ti,defaults:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:18,fontFamily:"Verdana, sans-serif",color:"white"}}},medium:{meta:{constructor:Ti,defaults:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:14,fontFamily:"Verdana, sans-serif",color:"white"}}},small:{meta:{constructor:Ti,defaults:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:10,fontFamily:"Verdana, sans-serif",color:"white"}}},color:{meta:{constructor:Ti,defaults:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:"Verdana, sans-serif",color:"white"}}}}},bo)});function Ca(t,e){var n;return fa(fa({},t),{meta:fa(fa({},t.meta),{defaults:fa(fa({},null===(n=t.meta)||void 0===n?void 0:n.defaults),{axes:e})})})}var Ma,Aa,ja=[{type:"number",position:t.ChartAxisPosition.Bottom},{type:"number",position:t.ChartAxisPosition.Left}],Ta=[{type:"number",position:t.ChartAxisPosition.Bottom},{type:"category",position:t.ChartAxisPosition.Left}],La=((xo={})[Oi.type]=Sa,xo[Mi.type]=(Aa=Mi,fa(fa({},Ma=Sa),{meta:fa(fa({},Ma.meta),{constructor:Aa})})),xo.line=Sa,xo.area=Sa,xo.bar=Ca(Sa,Ta),xo.column=Sa,xo.scatter=Ca(Sa,ja),xo.histogram=Ca(Sa,ja),xo[Vi.type]=Pa,xo.pie=Pa,xo[Si.type]=Da,xo.treemap=Da,xo),Fa=function(){return(Fa=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Na=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},Ea=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Na(arguments[e]));return t},za=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ba=new To,Wa=new No,Ia={undefined:Ba,null:Ba,"ag-default":Ba,"ag-material":new Bo,"ag-pastel":new Xo,"ag-solar":new Zo,"ag-vivid":new na},Ka={undefined:Wa,null:Wa,"ag-default-dark":Wa,"ag-material-dark":new Ko,"ag-pastel-dark":new Go,"ag-solar-dark":new Qo,"ag-vivid-dark":new oa},Ra=Fa(Fa({},Ka),Ia);function Ya(t){if(t instanceof To)return t;var e=Ra[t];return e||((t=t).baseTheme||t.overrides||t.palette?new(Ya(t.baseTheme).constructor)(t):Ba)}var Xa=0,Ha=function(){function t(){}return t.create=function(e,n,i){return e=Object.create(e),t.createOrUpdate({options:e,container:n,data:i,operation:function(t,e){return Va(t,void 0,void 0,e)}})},t.update=function(e,n,i,r){if(e&&n)return t.createOrUpdate({chart:e,options:n,container:i,data:r,operation:function(t,n){return qa(e,t,void 0,n)}})},t.createOrUpdate=function(t){var e=t.chart,n=t.options,i=t.container,r=t.data,o=t.operation;i&&(n.container=i),r&&(n.data=r),n.series&&n.series.length>0&&(n.series=is(n.series));var a=n&&!1!==n.autoSize,s=Ya(n.theme);Xa=0;var h=o(n,s);return null==e&&h instanceof hi&&(e=h),e&&a&&(e.autoSize=!0),h},t.createComponent=Va,t}(),Ua={"cartesian.series":"line","line.series":"line","area.series":"area","bar.series":"bar","column.series":"column","histogram.series":"histogram","scatter.series":"scatter","polar.series":"pie","pie.series":"pie"},Ga={area:"area",bar:"bar",histogram:"histogram",line:"line",pie:"pie",scatter:"scatter",ohlc:"ohlc",treemap:"treemap",column:"bar"};function Va(t,e,n,i){var r;if(t=Object.create(t),n instanceof Zn?t.type&&(t.shape=t.type):(t=$a(t,e),e?t.type&&(e=e+"."+t.type):e=t.type),e){var o=g(La,e);if(o){t=ts(e,t,o,i);var a=o.meta||{},s=a.constructorParams||[],h=["type","listeners"].concat(s),c=s.map((function(e){return t[e]})).filter((function(t){return void 0!==t}));n||(n=new((r=a.constructor).bind.apply(r,Ea([void 0],c))),i&&n instanceof Ki&&(Xa=i.setSeriesColors(n,t,Xa)));var l=function(r){if(h.indexOf(r)<0){var s=t[r];if(!s||!(r in o)||a.setAsIs&&a.setAsIs.indexOf(r)>=0)n[r]=s;else if(Array.isArray(s)){var c=s.map((function(t){var n=Va(t,e+"."+r,void 0,i);if(i&&"axes"===r){var o={getConfig:function(t){var e=t.split("."),r=e.slice(0,3).join(".")+"."+n.position,o=e.slice(3);o.length&&(r+="."+o.join("."));var a=i.getConfig(t),s=i.getConfig(r);return k(i.getConfig(r)),k(a)&&k(s)?O(a,s,jo):s}};qa(n,t,e+"."+r,o)}return n})).filter((function(t){return!!t}));n[r]=c}else if(o[r]&&n[r])Va(s,e+"."+r,n[r],i);else{var l=Va(s,s.type?e:e+"."+r,void 0,i);l&&(n[r]=l)}}};for(var u in t)l(u);var f=t.listeners;if(n&&n.addEventListener&&f)for(var u in f)if(f.hasOwnProperty(u)){var p=f[u];"function"==typeof p&&n.addEventListener(u,p)}return n}}}function qa(t,e,n,i){if(e&&k(e)&&(t instanceof Zn?e.type&&(e.shape=e.type):(e=$a(e,n),n?e.type&&(n=n+"."+e.type):n=e.type),n)){var r=n in La?t:void 0,o=g(La,n);if(o){e=ts(n,e,o,i);var a=o.meta||{},s=a&&a.constructorParams||[],h=["type"].concat(s);for(var c in e)if(h.indexOf(c)<0){var l=e[c],u=n+"."+c;if(a.setAsIs&&a.setAsIs.indexOf(c)>=0)t[c]=l;else{var f=t[c];if(Array.isArray(f)&&Array.isArray(l))r?"series"===c?Za(t,l,u,i):"axes"===c&&Ja(t,l,u,i):t[c]=l;else if(k(f))l?qa(f,l,l.type?n:u,i):c in e&&(t[c]=l);else{var p=k(l)&&Va(l,l.type?n:u,void 0,i);if(p)t[c]=p;else{if(r&&e.autoSize&&("width"===c||"height"===c))continue;t[c]=l}}}}}r&&(r.layoutPending=!0)}}function Za(t,e,n,i){for(var r,o=t.series.slice(),a=0;a<e.length;a++){var s=e[a];if(l=o[a]){s=$a(s,n);var h=Ga[s.type];if(l.type===h)i&&(Xa=i.setSeriesColors(l,s,Xa)),qa(l,s,n,i);else{var c=Va(s,n,void 0,i);t.removeSeries(l),t.addSeriesAfter(c,r),l=c}}else c=Va(s,n,void 0,i),t.addSeries(c);r=l}for(;a<o.length;a++){var l;(l=o[a])&&t.removeSeries(l)}}function Ja(t,e,n,i){var r,o,a=t.axes,s=[],h=[],c=function(t){var e=vt(a,(function(e){return e.type===t.type&&e.position===t.position}));if(e)h.push(e),qa(e,t,n,i);else{var r=Va(t,n,void 0,i);r&&s.push(r)}};try{for(var l=za(e),u=l.next();!u.done;u=l.next())c(u.value)}catch(t){r={error:t}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}t.axes=h.concat(s)}function $a(t,e){if(e||(e="",t=function(t){if(t.type)return t;var e=t.series&&t.series[0];return e&&e.type?((t=Object.create(t)).type=e.type,t):((t=Object.create(t)).type="cartesian",t)}(t)),!t.type){var n=Ua[e];n&&((t=Object.create(t)).type=n)}return t}function Qa(t){return["axes","series"].indexOf(t)>=0}function ts(t,e,n,i){var r=t.indexOf(".")<0,o=i&&i.getConfig(t),a=n&&n.meta&&n.meta.defaults,s=!1===e.enabled;for(var h in(a||o)&&(e=Object.create(e)),o)r&&Qa(h)||h in e||(e[h]=o[h]);for(var h in a)o&&h in o&&!Qa(h)||h in e||(e[h]=a[h]);return(o&&"enabled"in o||a&&"enabled"in a)&&!s&&(e.enabled=!0),e}function es(t){var e,n,i={column:[],bar:[],line:[],scatter:[],area:[],histogram:[],ohlc:[],pie:[],treemap:[]},r=[];try{for(var o=za(t),a=o.next();!a.done;a=o.next()){var s=a.value,h="column"===s.type||"bar"===s.type,c="area"===s.type&&!0===s.stacked;if(h||c){var l=s.type||"line";if("pie"===l||"treemap"===l)throw new Error("AG Grid - Unexpected series type of: "+l);0===i[l].length&&r.push(i[l]),i[l].push(s)}else r.push([s])}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function ns(t,e){var n,i,r={},o=["yKeys","fills","strokes","yNames","hideInChart","hideInLegend"],a=["yKey","fill","stroke","yName"];try{for(var s=za(t),h=s.next();!h.done;h=s.next()){var c=h.value;for(var l in c){var u=o.indexOf(l)>-1,f=a.indexOf(l)>-1;u&&c[l].length>0?r[l]=Ea(r[l]||[],c[l]):f?r[l+"s"]=Ea(r[l+"s"]||[],[c[l]]):e&&"showInLegend"===l?!1===c[l]&&(r.hideInLegend=Ea(r.hideInLegend||[],c.yKey?[c.yKey]:c.yKeys)):e&&"grouped"===l?!0===c[l]&&(r[l]=c[l]):r[l]=c[l]}}}catch(t){n={error:t}}finally{try{h&&!h.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return r}function is(t){var e,n,i=[];try{for(var r=za(es(t)),o=r.next();!o.done;o=r.next()){var a=o.value;switch(a[0].type){case"column":case"bar":i.push(ns(a,!0));break;case"area":i.push(ns(a,!1));break;case"line":default:if(a.length>1)throw new Error("AG-Grid - unexpected grouping of series type: "+a[0].type);i.push(a[0])}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return i}var rs={millisecond:Te,second:Le,minute:Fe,hour:Ne,day:Ee,sunday:Be,monday:We,tuesday:Ie,wednesday:Ke,thursday:Re,friday:Ye,saturday:Xe,month:He,year:Ue,utcMinute:Po,utcHour:Do,utcDay:Ge,utcMonth:Co,utcYear:Ve};t.AgChart=Ha,t.Arc=$t,t.AreaSeries=ur,t.AreaSeriesTooltip=lr,t.BandScale=pe,t.BarSeries=vr,t.BarSeriesLabel=gr,t.BarSeriesTooltip=mr,t.Caption=L,t.CartesianChart=Oi,t.CategoryAxis=ye,t.Chart=hi,t.ChartAxis=se,t.ChartTheme=To,t.ChartTooltip=si,t.ClipRect=li,t.DropShadow=Xr,t.Group=Mt,t.GroupedCategoryAxis=Pe,t.GroupedCategoryChart=Mi,t.HierarchyChart=Si,t.HistogramBin=Er,t.HistogramSeries=Br,t.HistogramSeriesTooltip=zr,t.Legend=$n,t.LegendItem=Jn,t.LegendLabel=qn,t.LegendMarker=Zn,t.Line=Lt,t.LineSeries=kr,t.LineSeriesTooltip=Or,t.LinearScale=gt,t.Marker=Dn,t.NumberAxis=ue,t.Padding=s,t.Path=Kt,t.PieSeries=So,t.PieSeriesTooltip=Oo,t.PieTitle=ko,t.PolarChart=Vi,t.Rect=Sn,t.ScatterSeries=Mr,t.ScatterSeriesTooltip=Cr,t.Scene=xn,t.Sector=co,t.Shape=P,t.TimeAxis=mn,t.TreemapSeries=so,t.TreemapSeriesLabel=oo,t.TreemapSeriesTooltip=ro,t.clamper=le,t.copy=wt,t.darkThemes=Ka,t.extent=xt,t.find=vt,t.findIndex=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},t.findMinMax=_t,t.flipChartAxisDirection=ae,t.getChartTheme=Ya,t.groupSeriesByType=es,t.lightThemes=Ia,t.mergeOptions=jo,t.normalizeAngle180=Ht,t.normalizeAngle360=Yt,t.normalizeAngle360Inclusive=Xt,t.processSeriesOptions=is,t.reduceSeries=ns,t.themes=Ra,t.time=rs,t.toDegrees=function(t){return t/Math.PI*180},t.toRadians=Ut,t.toTooltipHtml=ai,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).agCharts={});