@carbon/charts 0.30.4 → 0.30.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/build/demo/data/bar.d.ts +56 -94
  3. package/build/demo/data/bubble.d.ts +58 -13
  4. package/build/demo/data/donut.d.ts +3 -6
  5. package/build/demo/data/line.d.ts +35 -35
  6. package/build/demo/data/pie.d.ts +3 -6
  7. package/build/demo/data/scatter.d.ts +33 -20
  8. package/build/demo/data/step.d.ts +15 -16
  9. package/build/demo/data/time-series-axis.d.ts +12 -48
  10. package/build/src/charts/bar-grouped.d.ts +2 -2
  11. package/build/src/charts/bar-simple.d.ts +2 -4
  12. package/build/src/components/essentials/legend.d.ts +0 -4
  13. package/build/src/components/essentials/tooltip-bar.d.ts +1 -1
  14. package/build/src/components/essentials/tooltip-pie.d.ts +5 -0
  15. package/build/src/components/essentials/tooltip-scatter.d.ts +1 -1
  16. package/build/src/components/graphs/bar-grouped.d.ts +6 -4
  17. package/build/src/components/graphs/bar-simple.d.ts +0 -1
  18. package/build/src/components/graphs/bar-stacked.d.ts +0 -1
  19. package/build/src/components/graphs/bubble.d.ts +0 -1
  20. package/build/src/components/graphs/line.d.ts +3 -1
  21. package/build/src/components/graphs/pie.d.ts +0 -1
  22. package/build/src/components/graphs/scatter.d.ts +0 -1
  23. package/build/src/components/index.d.ts +1 -0
  24. package/build/src/interfaces/axis-scales.d.ts +4 -16
  25. package/build/src/interfaces/charts.d.ts +23 -1
  26. package/build/src/interfaces/enums.d.ts +0 -4
  27. package/build/src/interfaces/events.d.ts +29 -0
  28. package/build/src/model-pie.d.ts +1 -7
  29. package/build/src/model.d.ts +31 -13
  30. package/build/src/services/scales-cartesian.d.ts +11 -3
  31. package/build/src/tools.d.ts +2 -2
  32. package/build/stories/tutorials.stories.d.ts +1 -0
  33. package/bundle.js +1 -1
  34. package/chart.js +2 -2
  35. package/chart.js.map +1 -1
  36. package/charts/bar-grouped.d.ts +2 -2
  37. package/charts/bar-grouped.js.map +1 -1
  38. package/charts/bar-simple.d.ts +2 -4
  39. package/charts/bar-simple.js +0 -2
  40. package/charts/bar-simple.js.map +1 -1
  41. package/charts/donut.js +2 -2
  42. package/charts/donut.js.map +1 -1
  43. package/charts/pie.js +2 -2
  44. package/charts/pie.js.map +1 -1
  45. package/components/axes/grid.js +12 -19
  46. package/components/axes/grid.js.map +1 -1
  47. package/components/component.js +1 -1
  48. package/components/component.js.map +1 -1
  49. package/components/essentials/legend.d.ts +0 -4
  50. package/components/essentials/legend.js +12 -26
  51. package/components/essentials/legend.js.map +1 -1
  52. package/components/essentials/title.js +4 -4
  53. package/components/essentials/title.js.map +1 -1
  54. package/components/essentials/tooltip-bar.d.ts +1 -1
  55. package/components/essentials/tooltip-bar.js +13 -5
  56. package/components/essentials/tooltip-bar.js.map +1 -1
  57. package/components/essentials/tooltip-pie.d.ts +5 -0
  58. package/components/essentials/tooltip-pie.js +40 -0
  59. package/components/essentials/tooltip-pie.js.map +1 -0
  60. package/components/essentials/tooltip-scatter.d.ts +1 -1
  61. package/components/essentials/tooltip-scatter.js +8 -6
  62. package/components/essentials/tooltip-scatter.js.map +1 -1
  63. package/components/essentials/tooltip.js +14 -17
  64. package/components/essentials/tooltip.js.map +1 -1
  65. package/components/graphs/bar-grouped.d.ts +6 -4
  66. package/components/graphs/bar-grouped.js +64 -36
  67. package/components/graphs/bar-grouped.js.map +1 -1
  68. package/components/graphs/bar-simple.d.ts +0 -1
  69. package/components/graphs/bar-simple.js +16 -34
  70. package/components/graphs/bar-simple.js.map +1 -1
  71. package/components/graphs/bar-stacked.d.ts +0 -1
  72. package/components/graphs/bar-stacked.js +31 -112
  73. package/components/graphs/bar-stacked.js.map +1 -1
  74. package/components/graphs/bar.js.map +1 -1
  75. package/components/graphs/bubble.d.ts +0 -1
  76. package/components/graphs/bubble.js +16 -20
  77. package/components/graphs/bubble.js.map +1 -1
  78. package/components/graphs/donut.js +1 -1
  79. package/components/graphs/donut.js.map +1 -1
  80. package/components/graphs/line.d.ts +3 -1
  81. package/components/graphs/line.js +42 -31
  82. package/components/graphs/line.js.map +1 -1
  83. package/components/graphs/pie.d.ts +0 -1
  84. package/components/graphs/pie.js +15 -22
  85. package/components/graphs/pie.js.map +1 -1
  86. package/components/graphs/scatter.d.ts +0 -1
  87. package/components/graphs/scatter.js +26 -41
  88. package/components/graphs/scatter.js.map +1 -1
  89. package/components/index.d.ts +1 -0
  90. package/components/index.js +1 -0
  91. package/components/index.js.map +1 -1
  92. package/configuration.js +7 -0
  93. package/configuration.js.map +1 -1
  94. package/demo/data/bar.d.ts +56 -94
  95. package/demo/data/bar.js +106 -271
  96. package/demo/data/bar.js.map +1 -1
  97. package/demo/data/bubble.d.ts +58 -13
  98. package/demo/data/bubble.js +74 -174
  99. package/demo/data/bubble.js.map +1 -1
  100. package/demo/data/bundle.js +1 -1
  101. package/demo/data/donut.d.ts +3 -6
  102. package/demo/data/index.js +22 -4
  103. package/demo/data/index.js.map +1 -1
  104. package/demo/data/line.d.ts +35 -35
  105. package/demo/data/line.js +70 -196
  106. package/demo/data/line.js.map +1 -1
  107. package/demo/data/pie.d.ts +3 -6
  108. package/demo/data/pie.js +8 -10
  109. package/demo/data/pie.js.map +1 -1
  110. package/demo/data/scatter.d.ts +33 -20
  111. package/demo/data/scatter.js +50 -68
  112. package/demo/data/scatter.js.map +1 -1
  113. package/demo/data/step.d.ts +15 -16
  114. package/demo/data/time-series-axis.d.ts +12 -48
  115. package/demo/data/time-series-axis.js +34 -46
  116. package/demo/data/time-series-axis.js.map +1 -1
  117. package/demo/styles.css +28 -0
  118. package/demo/styles.css.map +1 -1
  119. package/demo/styles.min.css +1 -1
  120. package/demo/styles.min.css.map +1 -1
  121. package/demo/tsconfig.tsbuildinfo +38 -37
  122. package/interfaces/axis-scales.d.ts +4 -16
  123. package/interfaces/axis-scales.js.map +1 -1
  124. package/interfaces/charts.d.ts +23 -1
  125. package/interfaces/charts.js.map +1 -1
  126. package/interfaces/enums.d.ts +0 -4
  127. package/interfaces/enums.js +0 -5
  128. package/interfaces/enums.js.map +1 -1
  129. package/interfaces/events.d.ts +29 -0
  130. package/interfaces/events.js +33 -0
  131. package/interfaces/events.js.map +1 -1
  132. package/model-pie.d.ts +1 -7
  133. package/model-pie.js +2 -107
  134. package/model-pie.js.map +1 -1
  135. package/model.d.ts +31 -13
  136. package/model.js +204 -75
  137. package/model.js.map +1 -1
  138. package/package.json +3 -1
  139. package/services/essentials/dom-utils.js +3 -2
  140. package/services/essentials/dom-utils.js.map +1 -1
  141. package/services/scales-cartesian.d.ts +11 -3
  142. package/services/scales-cartesian.js +104 -122
  143. package/services/scales-cartesian.js.map +1 -1
  144. package/tools.d.ts +2 -2
  145. package/tools.js +23 -2
  146. package/tools.js.map +1 -1
  147. package/tsconfig.tsbuildinfo +93 -93
  148. package/build/src/model-simple-bar.d.ts +0 -11
  149. package/model-simple-bar.d.ts +0 -11
  150. package/model-simple-bar.js +0 -88
  151. package/model-simple-bar.js.map +0 -1
package/bundle.js CHANGED
@@ -12,4 +12,4 @@
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var e,n,r,i,o,a,s=function(t,e){return(s=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 u(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function l(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group"}(e||(e={})),function(t){t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout"}(n||(n={})),function(t){t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout"}(r||(r={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(i||(i={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(o||(o={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(a||(a={}));var c,h,f,d,p,g,v,m,y,_,b,w,x=Object.freeze({__proto__:null,get Axis(){return n},get Pie(){return r},get Bar(){return i},get Scatter(){return o},get Line(){return a}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(c||(c={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(h||(h={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(f||(f={})),function(t){t.PRIMARY="primary",t.SECONDARY="secondary"}(d||(d={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(p||(p={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(g||(g={})),function(t){t.DATAPOINT="datapoint",t.GRIDLINE="gridline",t.TITLE="title"}(v||(v={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(m||(m={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(y||(y={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(_||(_={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(b||(b={})),function(t){t.LEFT="left",t.RIGHT="right"}(w||(w={}));var T=Object.freeze({__proto__:null,get Roles(){return e},Events:x,get ChartTheme(){return c},get AxisPositions(){return h},get CartesianOrientations(){return f},get AxisTypes(){return d},get ScaleTypes(){return p},get TooltipPosition(){return g},get TooltipTypes(){return v},get LegendPositions(){return m},get LegendOrientations(){return y},get LayoutDirection(){return _},get LayoutGrowth(){return b},get CalloutDirections(){return w}}),M="object"==typeof global&&global&&global.Object===Object&&global,E="object"==typeof self&&self&&self.Object===Object&&self,O=M||E||Function("return this")(),S=O.Symbol,C=Object.prototype,A=C.hasOwnProperty,k=C.toString,P=S?S.toStringTag:void 0;var L=Object.prototype.toString;var D=S?S.toStringTag:void 0;function R(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":D&&D in Object(t)?function(t){var e=A.call(t,P),n=t[P];try{t[P]=void 0;var r=!0}catch(t){}var i=k.call(t);return r&&(e?t[P]=n:delete t[P]),i}(t):function(t){return L.call(t)}(t)}function j(t){return null!=t&&"object"==typeof t}var N=Array.isArray;function F(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var I=/^\s+|\s+$/g,U=/^[-+]0x[0-9a-f]+$/i,B=/^0b[01]+$/i,V=/^0o[0-7]+$/i,H=parseInt;function z(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||j(t)&&"[object Symbol]"==R(t)}(t))return NaN;if(F(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=F(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(I,"");var n=B.test(t);return n||V.test(t)?H(t.slice(2),n?2:8):U.test(t)?NaN:+t}function G(t){return t}function W(t){if(!F(t))return!1;var e=R(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Y,q=O["__core-js_shared__"],X=(Y=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var $=Function.prototype.toString;function Q(t){if(null!=t){try{return $.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Z=/^\[object .+?Constructor\]$/,J=Function.prototype,K=Object.prototype,tt=J.toString,et=K.hasOwnProperty,nt=RegExp("^"+tt.call(et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rt(t){return!(!F(t)||(e=t,X&&X in e))&&(W(t)?nt:Z).test(Q(t));var e}function it(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return rt(n)?n:void 0}var ot=it(O,"WeakMap"),at=Object.create,st=function(){function t(){}return function(e){if(!F(e))return{};if(at)return at(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function ut(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function lt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var ct=Date.now;var ht=function(){try{var t=it(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),ft=function(t){var e=0,n=0;return function(){var r=ct(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ht?function(t,e){return ht(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:G);function dt(t){return t!=t}function pt(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,dt,n)}(t,e,0)>-1}var gt=/^(?:0|[1-9]\d*)$/;function vt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&gt.test(t))&&t>-1&&t%1==0&&t<e}function mt(t,e,n){"__proto__"==e&&ht?ht(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function yt(t,e){return t===e||t!=t&&e!=e}var _t=Object.prototype.hasOwnProperty;function bt(t,e,n){var r=t[e];_t.call(t,e)&&yt(r,n)&&(void 0!==n||e in t)||mt(t,e,n)}function wt(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?mt(n,s,u):bt(n,s,u)}return n}var xt=Math.max;function Tt(t,e){return ft(function(t,e,n){return e=xt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=xt(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),ut(t,this,s)}}(t,e,G),t+"")}function Mt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Et(t){return null!=t&&Mt(t.length)&&!W(t)}var Ot=Object.prototype;function St(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ot)}function Ct(t){return j(t)&&"[object Arguments]"==R(t)}var At=Object.prototype,kt=At.hasOwnProperty,Pt=At.propertyIsEnumerable,Lt=Ct(function(){return arguments}())?Ct:function(t){return j(t)&&kt.call(t,"callee")&&!Pt.call(t,"callee")};var Dt="object"==typeof t&&t&&!t.nodeType&&t,Rt=Dt&&"object"==typeof module&&module&&!module.nodeType&&module,jt=Rt&&Rt.exports===Dt?O.Buffer:void 0,Nt=(jt?jt.isBuffer:void 0)||function(){return!1},Ft={};function It(t){return function(e){return t(e)}}Ft["[object Float32Array]"]=Ft["[object Float64Array]"]=Ft["[object Int8Array]"]=Ft["[object Int16Array]"]=Ft["[object Int32Array]"]=Ft["[object Uint8Array]"]=Ft["[object Uint8ClampedArray]"]=Ft["[object Uint16Array]"]=Ft["[object Uint32Array]"]=!0,Ft["[object Arguments]"]=Ft["[object Array]"]=Ft["[object ArrayBuffer]"]=Ft["[object Boolean]"]=Ft["[object DataView]"]=Ft["[object Date]"]=Ft["[object Error]"]=Ft["[object Function]"]=Ft["[object Map]"]=Ft["[object Number]"]=Ft["[object Object]"]=Ft["[object RegExp]"]=Ft["[object Set]"]=Ft["[object String]"]=Ft["[object WeakMap]"]=!1;var Ut="object"==typeof t&&t&&!t.nodeType&&t,Bt=Ut&&"object"==typeof module&&module&&!module.nodeType&&module,Vt=Bt&&Bt.exports===Ut&&M.process,Ht=function(){try{var t=Bt&&Bt.require&&Bt.require("util").types;return t||Vt&&Vt.binding&&Vt.binding("util")}catch(t){}}(),zt=Ht&&Ht.isTypedArray,Gt=zt?It(zt):function(t){return j(t)&&Mt(t.length)&&!!Ft[R(t)]},Wt=Object.prototype.hasOwnProperty;function Yt(t,e){var n=N(t),r=!n&&Lt(t),i=!n&&!r&&Nt(t),o=!n&&!r&&!i&&Gt(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var l in t)!e&&!Wt.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||vt(l,u))||s.push(l);return s}function qt(t,e){return function(n){return t(e(n))}}var Xt=qt(Object.keys,Object),$t=Object.prototype.hasOwnProperty;function Qt(t){return Et(t)?Yt(t):function(t){if(!St(t))return Xt(t);var e=[];for(var n in Object(t))$t.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Zt=Object.prototype.hasOwnProperty;function Jt(t){if(!F(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=St(t),n=[];for(var r in t)("constructor"!=r||!e&&Zt.call(t,r))&&n.push(r);return n}function Kt(t){return Et(t)?Yt(t,!0):Jt(t)}var te=it(Object,"create");var ee=Object.prototype.hasOwnProperty;var ne=Object.prototype.hasOwnProperty;function re(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ie(t,e){for(var n=t.length;n--;)if(yt(t[n][0],e))return n;return-1}re.prototype.clear=function(){this.__data__=te?te(null):{},this.size=0},re.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},re.prototype.get=function(t){var e=this.__data__;if(te){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ee.call(e,t)?e[t]:void 0},re.prototype.has=function(t){var e=this.__data__;return te?void 0!==e[t]:ne.call(e,t)},re.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=te&&void 0===e?"__lodash_hash_undefined__":e,this};var oe=Array.prototype.splice;function ae(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ae.prototype.clear=function(){this.__data__=[],this.size=0},ae.prototype.delete=function(t){var e=this.__data__,n=ie(e,t);return!(n<0)&&(n==e.length-1?e.pop():oe.call(e,n,1),--this.size,!0)},ae.prototype.get=function(t){var e=this.__data__,n=ie(e,t);return n<0?void 0:e[n][1]},ae.prototype.has=function(t){return ie(this.__data__,t)>-1},ae.prototype.set=function(t,e){var n=this.__data__,r=ie(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var se=it(O,"Map");function ue(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ce(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}le.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(se||ae),string:new re}},le.prototype.delete=function(t){var e=ue(this,t).delete(t);return this.size-=e?1:0,e},le.prototype.get=function(t){return ue(this,t).get(t)},le.prototype.has=function(t){return ue(this,t).has(t)},le.prototype.set=function(t,e){var n=ue(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var he=qt(Object.getPrototypeOf,Object),fe=Function.prototype,de=Object.prototype,pe=fe.toString,ge=de.hasOwnProperty,ve=pe.call(Object);function me(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=z(n))==n?n:0),void 0!==e&&(e=(e=z(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(z(t),e,n)}function ye(t){var e=this.__data__=new ae(t);this.size=e.size}ye.prototype.clear=function(){this.__data__=new ae,this.size=0},ye.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ye.prototype.get=function(t){return this.__data__.get(t)},ye.prototype.has=function(t){return this.__data__.has(t)},ye.prototype.set=function(t,e){var n=this.__data__;if(n instanceof ae){var r=n.__data__;if(!se||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new le(r)}return n.set(t,e),this.size=n.size,this};var _e="object"==typeof t&&t&&!t.nodeType&&t,be=_e&&"object"==typeof module&&module&&!module.nodeType&&module,we=be&&be.exports===_e?O.Buffer:void 0,xe=we?we.allocUnsafe:void 0;function Te(t,e){if(e)return t.slice();var n=t.length,r=xe?xe(n):new t.constructor(n);return t.copy(r),r}function Me(){return[]}var Ee=Object.prototype.propertyIsEnumerable,Oe=Object.getOwnPropertySymbols,Se=Oe?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Oe(t),(function(e){return Ee.call(t,e)})))}:Me;var Ce=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ce(e,Se(t)),t=he(t);return e}:Me;function Ae(t,e,n){var r=e(t);return N(t)?r:ce(r,n(t))}function ke(t){return Ae(t,Qt,Se)}function Pe(t){return Ae(t,Kt,Ce)}var Le=it(O,"DataView"),De=it(O,"Promise"),Re=it(O,"Set"),je=Q(Le),Ne=Q(se),Fe=Q(De),Ie=Q(Re),Ue=Q(ot),Be=R;(Le&&"[object DataView]"!=Be(new Le(new ArrayBuffer(1)))||se&&"[object Map]"!=Be(new se)||De&&"[object Promise]"!=Be(De.resolve())||Re&&"[object Set]"!=Be(new Re)||ot&&"[object WeakMap]"!=Be(new ot))&&(Be=function(t){var e=R(t),n="[object Object]"==e?t.constructor:void 0,r=n?Q(n):"";if(r)switch(r){case je:return"[object DataView]";case Ne:return"[object Map]";case Fe:return"[object Promise]";case Ie:return"[object Set]";case Ue:return"[object WeakMap]"}return e});var Ve=Be,He=Object.prototype.hasOwnProperty;var ze=O.Uint8Array;function Ge(t){var e=new t.constructor(t.byteLength);return new ze(e).set(new ze(t)),e}var We=/\w*$/;var Ye=S?S.prototype:void 0,qe=Ye?Ye.valueOf:void 0;function Xe(t,e){var n=e?Ge(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function $e(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return Ge(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?Ge(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Xe(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,We.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,qe?Object(qe.call(r)):{}}}function Qe(t){return"function"!=typeof t.constructor||St(t)?{}:st(he(t))}var Ze=Ht&&Ht.isMap,Je=Ze?It(Ze):function(t){return j(t)&&"[object Map]"==Ve(t)};var Ke=Ht&&Ht.isSet,tn=Ke?It(Ke):function(t){return j(t)&&"[object Set]"==Ve(t)},en={};function nn(t,e,n,r,i,o){var a,s=1&e,u=2&e,l=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!F(t))return t;var c=N(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&He.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return lt(t,a)}else{var h=Ve(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(Nt(t))return Te(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:Qe(t),!s)return u?function(t,e){return wt(t,Ce(t),e)}(t,function(t,e){return t&&wt(e,Kt(e),t)}(a,t)):function(t,e){return wt(t,Se(t),e)}(t,function(t,e){return t&&wt(e,Qt(e),t)}(a,t))}else{if(!en[h])return i?t:{};a=$e(t,h,s)}}o||(o=new ye);var d=o.get(t);if(d)return d;o.set(t,a),tn(t)?t.forEach((function(r){a.add(nn(r,e,n,r,t,o))})):Je(t)&&t.forEach((function(r,i){a.set(i,nn(r,e,n,i,t,o))}));var p=l?u?Pe:ke:u?keysIn:Qt,g=c?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),bt(a,i,nn(r,e,n,i,t,o))})),a}en["[object Arguments]"]=en["[object Array]"]=en["[object ArrayBuffer]"]=en["[object DataView]"]=en["[object Boolean]"]=en["[object Date]"]=en["[object Float32Array]"]=en["[object Float64Array]"]=en["[object Int8Array]"]=en["[object Int16Array]"]=en["[object Int32Array]"]=en["[object Map]"]=en["[object Number]"]=en["[object Object]"]=en["[object RegExp]"]=en["[object Set]"]=en["[object String]"]=en["[object Symbol]"]=en["[object Uint8Array]"]=en["[object Uint8ClampedArray]"]=en["[object Uint16Array]"]=en["[object Uint32Array]"]=!0,en["[object Error]"]=en["[object Function]"]=en["[object WeakMap]"]=!1;function rn(t){return nn(t,5)}function on(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new le;++e<n;)this.add(t[e])}function an(t,e){return t.has(e)}function sn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}on.prototype.add=on.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},on.prototype.has=function(t){return this.__data__.has(t)};var un,ln=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[un?a:++r];if(!1===e(i[s],s,i))break}return t},cn=function(){return O.Date.now()},hn=Math.max,fn=Math.min;function dn(t,e,n){var r,i,o,a,s,u,l=0,c=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,l=e,a=t.apply(o,n)}function p(t){return l=t,s=setTimeout(v,e),c?d(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=o}function v(){var t=cn();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?fn(n,o-(t-l)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,a)}function y(){var t=cn(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(v,e),d(u)}return void 0===s&&(s=setTimeout(v,e)),a}return e=z(e)||0,F(n)&&(c=!!n.leading,o=(h="maxWait"in n)?hn(z(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(cn())},y}function pn(t,e,n){(void 0===n||yt(t[e],n))&&(void 0!==n||e in t)||mt(t,e,n)}function gn(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function vn(t,e,n,r,i,o,a){var s=gn(t,n),u=gn(e,n),l=a.get(u);if(l)pn(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=N(u),p=!d&&Nt(u),g=!d&&!p&&Gt(u);h=u,d||p||g?N(s)?h=s:j(c=s)&&Et(c)?h=lt(s):p?(f=!1,h=Te(u,!0)):g?(f=!1,h=Xe(u,!0)):h=[]:function(t){if(!j(t)||"[object Object]"!=R(t))return!1;var e=he(t);if(null===e)return!0;var n=ge.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&pe.call(n)==ve}(u)||Lt(u)?(h=s,Lt(s)?h=function(t){return wt(t,Kt(t))}(s):F(s)&&!W(s)||(h=Qe(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),pn(t,n,h)}}function mn(t,e,n,r,i){t!==e&&ln(e,(function(o,a){if(i||(i=new ye),F(o))vn(t,e,a,n,mn,r,i);else{var s=r?r(gn(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),pn(t,a,s)}}),Kt)}function yn(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}var _n,bn,wn=(_n=function(t,e,n){mn(t,e,n)},Tt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=_n.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!F(n))return!1;var r=typeof e;return!!("number"==r?Et(n)&&vt(e,n.length):"string"==r&&e in n)&&yt(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&_n(t,a,n,i)}return t}))),xn=Re&&1/sn(new Re([,-0]))[1]==1/0?function(t){return new Re(t)}:function(){};function Tn(t){return t&&t.length?function(t,e,n){var r=-1,i=pt,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=yn;else if(o>=200){var l=e?null:xn(t);if(l)return sn(l);a=!1,i=an,u=new on}else u=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}(t):[]}function Mn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function En(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){t.debounce=dn,t.clone=rn,t.merge=wn,t.removeArrayDuplicates=Tn,t.clamp=me,t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)r.includes(i)||delete e.axes[i];return t.merge(e,n)},t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null},t.getTranformOffsets=function(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n<1?n.toPrecision(1):Math.floor(n)},t.arrayDifferences=function(t,e){var n={missing:[],added:[]};return t.forEach((function(t){-1===e.indexOf(t)&&n.missing.push(t)})),e.forEach((function(e){-1===t.indexOf(e)&&n.added.push(e)})),n},t.getDuplicateValues=function(t){var e=[],n=[];return t.forEach((function(t){-1!==e.indexOf(t)&&-1===n.indexOf(t)&&n.push(t),e.push(t)})),n},t.moveToFront=function(t){return t.each((function(){this.parentNode.appendChild(this)}))},t.getProperty=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t;if(r){for(var i=0,o=e;i<o.length;i++){var a=o[i];if(null===r[a]||void 0===r[a])return null;r=r[a]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===f.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t},t.generateSVGPathString=function(e,n){var r=t.flipSVGCoordinatesBasedOnOrientation(e,n),i=r.x0,o=r.x1,a=r.y0,s=r.y1;return"M"+i+","+a+"L"+i+","+s+"L"+o+","+s+"L"+o+","+a+"L"+i+","+a}}(bn||(bn={}));var On=En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var i;r=r||{},i="string"==typeof n[t]?n[t]:1===e?n[t].one:n[t].other.replace("{{count}}",e);if(r.addSuffix)return r.comparison>0?"in "+i:i+" ago";return i};var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};t.exports=e.default}));Mn(On);var Sn=En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}},t.exports=e.default}));Mn(Sn);var Cn=En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Sn)&&n.__esModule?n:{default:n};var i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.default=i,t.exports=e.default}));Mn(Cn);var An=En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,i){return n[t]};var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};t.exports=e.default}));Mn(An);var kn=En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));Mn(kn);var Pn=En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=kn)&&n.__esModule?n:{default:n};var i={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};e.default=i,t.exports=e.default}));Mn(Pn);var Ln=En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=r.match(t.matchPattern);if(!o)return null;var a=o[0],s=r.match(t.parsePattern);if(!s)return null;var u=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(a.length)}}},t.exports=e.default}));Mn(Ln);var Dn=En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}},t.exports=e.default}));Mn(Dn);var Rn=En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(Ln),r=i(Dn);function i(t){return t&&t.__esModule?t:{default:t}}var o={ordinalNumber:(0,n.default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.default=o,t.exports=e.default}));Mn(Rn);var jn=Mn(En((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(On),r=s(Cn),i=s(An),o=s(Pn),a=s(Rn);function s(t){return t&&t.__esModule?t:{default:t}}var u={code:"en-US",formatDistance:n.default,formatLong:r.default,formatRelative:i.default,localize:o.default,match:a.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),Nn={position:m.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Fn={x:{numberOfTicks:5},y:{numberOfTicks:5}},In={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},Un=bn.merge({},In,{gridline:{enabled:!0,threshold:.25}}),Bn=bn.merge({},Un,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),Vn={addSpaceOnEdges:1,showDayName:!1,localeObject:jn,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},Hn={width:null,height:null,resizable:!0,tooltip:In,legend:Nn,style:{prefix:"cc"}},zn=bn.merge({},Hn,{axes:{top:{includeZero:!0},bottom:{includeZero:!0},left:{includeZero:!0},right:{includeZero:!0}},timeScale:Vn,grid:Fn,tooltip:Un}),Gn=bn.merge({},zn,{bars:{maxWidth:16},timeScale:bn.merge(Vn,{addSpaceOnEdges:1}),tooltip:Bn}),Wn=bn.merge({},Gn,{}),Yn=bn.merge({},Gn,{}),qn=bn.merge({},Gn,{bars:bn.merge({},Gn.bars,{dividerSize:1.5})}),Xn=bn.merge({},zn,{points:{radius:3,filled:!1}}),$n=bn.merge({},zn,{points:{radius:4,fillOpacity:.3,filled:!0}}),Qn=bn.merge({},zn,{bubble:{radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),Zn=bn.merge({},Hn,{pie:{radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2},labels:{formatter:null}}}),Jn={chart:Hn,axisChart:zn,simpleBarChart:Wn,groupedBarChart:Yn,stackedBarChart:qn,bubbleChart:Qn,lineChart:Xn,scatterChart:$n,pieChart:Zn,donutChart:bn.merge({},Zn,{donut:{center:{numberFontSize:function(t){return Math.min(t/100*24,24)+"px"},titleFontSize:function(t){return Math.min(t/100*15,15)+"px"},titleYPosition:function(t){return Math.min(t/80*20,20)},numberFormatter:function(t){return Math.floor(t).toLocaleString()}}}})},Kn={opacity:{unselected:.3,selected:1}},tr={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},er={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},nr={default:{size:24}},rr=Object.freeze({__proto__:null,legend:Nn,grid:Fn,baseTooltip:In,axisChartTooltip:Un,barChartTooltip:Bn,timeScale:Vn,options:Jn,lines:Kn,transitions:tr,axis:er,spacers:nr,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),ir={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},or={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},ar={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},sr={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},ur={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},lr={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},cr={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},hr=function(t,e){return t[e]},fr=function(t){return hr(sr,t)},dr=function(t){return hr(ur,t)},pr=function(t){return hr(cr,t)},gr=function(t){return hr(or,t)},vr=function(t){return hr(ar,t)},mr=function(t){return hr(ir,t)},yr=function(t){return hr(lr,t)},_r=[vr(70),dr(50),yr(70),gr(70),mr(50),mr(90),pr(60),fr(80),gr(50),"#b28600",yr(50),dr(90),"#8a3800",vr(50)],br=[vr(60),dr(40),yr(60),gr(40),mr(50),mr(10),pr(30),fr(50),gr(60),"#d2a106",yr(40),dr(20),"#ba4e00",vr(30)],wr=_r,xr=br,Tr=br,Mr=_r,Er=Object.freeze({__proto__:null,WHITE:_r,DARK:br,G10:wr,G90:xr,G100:Tr,DEFAULT:Mr});function Or(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Sr(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Or(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}var Cr=Sr(Or).right;function Ar(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function kr(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}var Pr=Math.sqrt(50),Lr=Math.sqrt(10),Dr=Math.sqrt(2);function Rr(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=jr(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o}function jr(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Pr?10:o>=Lr?5:o>=Dr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Pr?10:o>=Lr?5:o>=Dr?2:1)}function Nr(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Pr?i*=10:o>=Lr?i*=5:o>=Dr&&(i*=2),e<t?-i:i}function Fr(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}function Ir(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Ur(){}function Br(t,e){var n=new Ur;if(t instanceof Ur)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function Vr(){}Ur.prototype=Br.prototype={constructor:Ur,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Hr=Br.prototype;Vr.prototype=function(t,e){var n=new Vr;if(t instanceof Vr)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:Vr,has:Hr.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Hr.remove,clear:Hr.clear,values:Hr.keys,size:Hr.size,empty:Hr.empty,each:Hr.each};var zr=Array.prototype,Gr=zr.map,Wr=zr.slice,Yr={name:"implicit"};function qr(){var t=Br(),e=[],n=[],r=Yr;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Yr)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Br();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=Wr.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return qr(e,n).unknown(r)},Ir.apply(i,arguments),i}function Xr(){var t,e,n=qr().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],h=o[c-0],f=o[1-c];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var d=kr(n).map((function(e){return h+t*e}));return i(c?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),c()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,c()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),c()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),c()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,c()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},n.copy=function(){return Xr(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},Ir.apply(c(),arguments)}function $r(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Qr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Zr(){}var Jr="\\s*([+-]?\\d+)\\s*",Kr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ti="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ei=/^#([0-9a-f]{3,8})$/,ni=new RegExp("^rgb\\("+[Jr,Jr,Jr]+"\\)$"),ri=new RegExp("^rgb\\("+[ti,ti,ti]+"\\)$"),ii=new RegExp("^rgba\\("+[Jr,Jr,Jr,Kr]+"\\)$"),oi=new RegExp("^rgba\\("+[ti,ti,ti,Kr]+"\\)$"),ai=new RegExp("^hsl\\("+[Kr,ti,ti]+"\\)$"),si=new RegExp("^hsla\\("+[Kr,ti,ti,Kr]+"\\)$"),ui={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function li(){return this.rgb().formatHex()}function ci(){return this.rgb().formatRgb()}function hi(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ei.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?fi(e):3===n?new vi(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new vi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new vi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ni.exec(t))?new vi(e[1],e[2],e[3],1):(e=ri.exec(t))?new vi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ii.exec(t))?di(e[1],e[2],e[3],e[4]):(e=oi.exec(t))?di(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ai.exec(t))?bi(e[1],e[2]/100,e[3]/100,1):(e=si.exec(t))?bi(e[1],e[2]/100,e[3]/100,e[4]):ui.hasOwnProperty(t)?fi(ui[t]):"transparent"===t?new vi(NaN,NaN,NaN,0):null}function fi(t){return new vi(t>>16&255,t>>8&255,255&t,1)}function di(t,e,n,r){return r<=0&&(t=e=n=NaN),new vi(t,e,n,r)}function pi(t){return t instanceof Zr||(t=hi(t)),t?new vi((t=t.rgb()).r,t.g,t.b,t.opacity):new vi}function gi(t,e,n,r){return 1===arguments.length?pi(t):new vi(t,e,n,null==r?1:r)}function vi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function mi(){return"#"+_i(this.r)+_i(this.g)+_i(this.b)}function yi(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function _i(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function bi(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xi(t,e,n,r)}function wi(t){if(t instanceof xi)return new xi(t.h,t.s,t.l,t.opacity);if(t instanceof Zr||(t=hi(t)),!t)return new xi;if(t instanceof xi)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new xi(a,s,u,t.opacity)}function xi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ti(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Mi(t){return function(){return t}}function Ei(t){return 1==(t=+t)?Oi:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Mi(isNaN(e)?n:e)}}function Oi(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Mi(isNaN(t)?e:t)}$r(Zr,hi,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:li,formatHex:li,formatHsl:function(){return wi(this).formatHsl()},formatRgb:ci,toString:ci}),$r(vi,gi,Qr(Zr,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mi,formatHex:mi,formatRgb:yi,toString:yi})),$r(xi,(function(t,e,n,r){return 1===arguments.length?wi(t):new xi(t,e,n,null==r?1:r)}),Qr(Zr,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new xi(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new xi(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new vi(Ti(t>=240?t-240:t+120,i,r),Ti(t,i,r),Ti(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Si=function t(e){var n=Ei(e);function r(t,e){var r=n((t=gi(t)).r,(e=gi(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Oi(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Ci(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function Ai(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Ni(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function ki(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Pi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Li(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Ni(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Di=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ri=new RegExp(Di.source,"g");function ji(t,e){var n,r,i,o=Di.lastIndex=Ri.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Di.exec(t))&&(r=Ri.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Pi(n,r)})),o=Ri.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function Ni(t,e){var n,r=typeof e;return null==e||"boolean"===r?Mi(e):("number"===r?Pi:"string"===r?(n=hi(e))?(e=n,Si):ji:e instanceof hi?Si:e instanceof Date?ki:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Ci:Array.isArray(e)?Ai:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Li:Pi)(t,e)}function Fi(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ii,Ui,Bi,Vi,Hi=180/Math.PI,zi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gi(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Hi,skewX:Math.atan(u)*Hi,scaleX:a,scaleY:s}}function Wi(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:Pi(t,i)},{i:u-2,x:Pi(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Pi(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Pi(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Pi(t,n)},{i:s-2,x:Pi(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Yi=Wi((function(t){return"none"===t?zi:(Ii||(Ii=document.createElement("DIV"),Ui=document.documentElement,Bi=document.defaultView),Ii.style.transform=t,t=Bi.getComputedStyle(Ui.appendChild(Ii),null).getPropertyValue("transform"),Ui.removeChild(Ii),Gi(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),qi=Wi((function(t){return null==t?zi:(Vi||(Vi=document.createElementNS("http://www.w3.org/2000/svg","g")),Vi.setAttribute("transform",t),(t=Vi.transform.baseVal.consolidate())?Gi((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):zi)}),", ",")",")");function Xi(t){return+t}var $i=[0,1];function Qi(t){return t}function Zi(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Ji(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Ki(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Zi(i,r),o=n(a,o)):(r=Zi(r,i),o=n(o,a)),function(t){return o(r(t))}}function to(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Zi(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Cr(t,e,1,r)-1;return o[n](i[n](e))}}function eo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function no(){var t,e,n,r,i,o,a=$i,s=$i,u=Ni,l=Qi;function c(){return r=Math.min(a.length,s.length)>2?to:Ki,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),Pi)))(n)))},h.domain=function(t){return arguments.length?(a=Gr.call(t,Xi),l===Qi||(l=Ji(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=Wr.call(t),c()):s.slice()},h.rangeRound=function(t){return s=Wr.call(t),u=Fi,c()},h.clamp=function(t){return arguments.length?(l=t?Ji(a):Qi,h):l!==Qi},h.interpolate=function(t){return arguments.length?(u=t,c()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function ro(t,e){return no()(t,e)}function io(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function oo(t){return(t=io(Math.abs(t)))?t[1]:NaN}var ao,so=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function uo(t){if(!(e=so.exec(t)))throw new Error("invalid format: "+t);var e;return new lo({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function lo(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function co(t,e){var n=io(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}uo.prototype=lo.prototype,lo.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ho={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(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 co(100*t,e)},r:co,s:function(t,e){var n=io(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ao=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+io(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function fo(t){return t}var po,go,vo,mo=Array.prototype.map,yo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _o(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?fo:(e=mo.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?fo:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(mo.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=uo(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):ho[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?o:/[%p]/.test(y)?u:"",w=ho[y],x=/[defgprs%]/.test(y);function T(t){var i,o,u,f=_,T=b;if("c"===y)T=w(t)+T,t="";else{var M=(t=+t)<0;if(t=isNaN(t)?c:w(Math.abs(t),v),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&(M=!1),f=(M?"("===h?h:l:"-"===h||"("===h?"":h)+f,T=("s"===y?yo[8+ao/3]:"")+T+(M&&"("===h?")":""),x)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){T=(46===u?a+t.slice(i+1):t.slice(i))+T,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var E=f.length+t.length+T.length,O=E<p?new Array(p-E+1).join(e):"";switch(g&&d&&(t=r(O+t,O.length?p-T.length:1/0),O=""),n){case"<":t=f+t+T+O;break;case"=":t=f+O+t+T;break;case"^":t=O.slice(0,E=O.length>>1)+f+t+T+O.slice(E);break;default:t=O+f+t+T}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),T.toString=function(){return t+""},T}return{format:h,formatPrefix:function(t,e){var n=h(((t=uo(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(oo(e)/3))),i=Math.pow(10,-r),o=yo[8+r/3];return function(t){return n(i*t)+o}}}}function bo(t,e,n,r){var i,o=Nr(t,e,n);switch((r=uo(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(oo(e)/3)))-oo(Math.abs(t)))}(o,a))||(r.precision=i),vo(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,oo(e)-oo(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-oo(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return go(r)}function wo(t){var e=t.domain;return t.ticks=function(t){var n=e();return Rr(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return bo(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=jr(s,u,n))>0?r=jr(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=jr(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function xo(){var t=ro(Qi,Qi);return t.copy=function(){return eo(t,xo())},Ir.apply(t,arguments),wo(t)}function To(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function Mo(t){return Math.log(t)}function Eo(t){return Math.exp(t)}function Oo(t){return-Math.log(-t)}function So(t){return-Math.exp(-t)}function Co(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ao(t){return function(e){return-t(-e)}}function ko(t){var e,n,r=t(Mo,Eo),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?Co:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=Ao(e),n=Ao(n),t(Oo,So)):t(Mo,Eo),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var l,c,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(c=1,l=n(f);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(c=o-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=Rr(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=go(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(To(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}po=_o({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),go=po.format,vo=po.formatPrefix;var Po=new Date,Lo=new Date;function Do(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return Do((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Po.setTime(+e),Lo.setTime(+r),t(Po),t(Lo),Math.floor(n(Po,Lo))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Ro=Do((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Ro.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Do((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Ro:null};var jo=Do((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),No=Do((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),Fo=Do((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),Io=Do((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}));function Uo(t){return Do((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-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Bo=Uo(0),Vo=Uo(1),Ho=(Uo(2),Uo(3),Uo(4)),zo=(Uo(5),Uo(6),Do((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()}))),Go=Do((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()}));Go.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Do((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Wo=Do((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}));function Yo(t){return Do((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var qo=Yo(0),Xo=Yo(1),$o=(Yo(2),Yo(3),Yo(4)),Qo=(Yo(5),Yo(6),Do((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 Zo(t){if(0<=t.y&&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 Jo(t){if(0<=t.y&&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 Ko(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Qo.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Do((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var ta,ea,na={"-":"",_:" ",0:"0"},ra=/^\s*\d+/,ia=/^%/,oa=/[\\^$*+?|[\]().{}]/g;function aa(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function sa(t){return t.replace(oa,"\\$&")}function ua(t){return new RegExp("^(?:"+t.map(sa).join("|")+")","i")}function la(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function ca(t,e,n){var r=ra.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ha(t,e,n){var r=ra.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function fa(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function da(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function pa(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ga(t,e,n){var r=ra.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function va(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ma(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ya(t,e,n){var r=ra.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function _a(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ba(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function wa(t,e,n){var r=ra.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function xa(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ta(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ma(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ea(t,e,n){var r=ra.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Oa(t,e,n){var r=ra.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Sa(t,e,n){var r=ia.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ca(t,e,n){var r=ra.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Aa(t,e,n){var r=ra.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ka(t,e){return aa(t.getDate(),e,2)}function Pa(t,e){return aa(t.getHours(),e,2)}function La(t,e){return aa(t.getHours()%12||12,e,2)}function Da(t,e){return aa(1+Io.count(Go(t),t),e,3)}function Ra(t,e){return aa(t.getMilliseconds(),e,3)}function ja(t,e){return Ra(t,e)+"000"}function Na(t,e){return aa(t.getMonth()+1,e,2)}function Fa(t,e){return aa(t.getMinutes(),e,2)}function Ia(t,e){return aa(t.getSeconds(),e,2)}function Ua(t){var e=t.getDay();return 0===e?7:e}function Ba(t,e){return aa(Bo.count(Go(t)-1,t),e,2)}function Va(t,e){var n=t.getDay();return t=n>=4||0===n?Ho(t):Ho.ceil(t),aa(Ho.count(Go(t),t)+(4===Go(t).getDay()),e,2)}function Ha(t){return t.getDay()}function za(t,e){return aa(Vo.count(Go(t)-1,t),e,2)}function Ga(t,e){return aa(t.getFullYear()%100,e,2)}function Wa(t,e){return aa(t.getFullYear()%1e4,e,4)}function Ya(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+aa(e/60|0,"0",2)+aa(e%60,"0",2)}function qa(t,e){return aa(t.getUTCDate(),e,2)}function Xa(t,e){return aa(t.getUTCHours(),e,2)}function $a(t,e){return aa(t.getUTCHours()%12||12,e,2)}function Qa(t,e){return aa(1+Wo.count(Qo(t),t),e,3)}function Za(t,e){return aa(t.getUTCMilliseconds(),e,3)}function Ja(t,e){return Za(t,e)+"000"}function Ka(t,e){return aa(t.getUTCMonth()+1,e,2)}function ts(t,e){return aa(t.getUTCMinutes(),e,2)}function es(t,e){return aa(t.getUTCSeconds(),e,2)}function ns(t){var e=t.getUTCDay();return 0===e?7:e}function rs(t,e){return aa(qo.count(Qo(t)-1,t),e,2)}function is(t,e){var n=t.getUTCDay();return t=n>=4||0===n?$o(t):$o.ceil(t),aa($o.count(Qo(t),t)+(4===Qo(t).getUTCDay()),e,2)}function os(t){return t.getUTCDay()}function as(t,e){return aa(Xo.count(Qo(t)-1,t),e,2)}function ss(t,e){return aa(t.getUTCFullYear()%100,e,2)}function us(t,e){return aa(t.getUTCFullYear()%1e4,e,4)}function ls(){return"+0000"}function cs(){return"%"}function hs(t){return+t}function fs(t){return Math.floor(+t/1e3)}!function(t){ta=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=ua(i),c=la(i),h=ua(o),f=la(o),d=ua(a),p=la(a),g=ua(s),v=la(s),m=ua(u),y=la(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:ka,e:ka,f:ja,H:Pa,I:La,j:Da,L:Ra,m:Na,M:Fa,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:hs,s:fs,S:Ia,u:Ua,U:Ba,V:Va,w:Ha,W:za,x:null,X:null,y:Ga,Y:Wa,Z:Ya,"%":cs},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:qa,e:qa,f:Ja,H:Xa,I:$a,j:Qa,L:Za,m:Ka,M:ts,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:hs,s:fs,S:es,u:ns,U:rs,V:is,w:os,W:as,x:null,X:null,y:ss,Y:us,Z:ls,"%":cs},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return M(t,e,n,r)},d:ba,e:ba,f:Oa,H:xa,I:xa,j:wa,L:Ea,m:_a,M:Ta,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:ya,Q:Ca,s:Aa,S:Ma,u:ha,U:fa,V:da,w:ca,W:pa,x:function(t,e,r){return M(t,n,e,r)},X:function(t,e,n){return M(t,r,e,n)},y:va,Y:ga,Z:ma,"%":Sa};function x(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=na[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function T(t,e){return function(n){var r,i,o=Ko(1900,void 0,1);if(M(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Jo(Ko(o.y,0,1))).getUTCDay(),r=i>4||0===i?Xo.ceil(r):Xo(r),r=Wo.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Zo(Ko(o.y,0,1))).getDay(),r=i>4||0===i?Vo.ceil(r):Vo(r),r=Io.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Jo(Ko(o.y,0,1)).getUTCDay():Zo(Ko(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Jo(o)):Zo(o)}}function M(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in na?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}})}(t),ea=ta.format,ta.parse,ta.utcFormat,ta.utcParse}({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"]});function ds(t){return new Date(t)}function ps(t){return t instanceof Date?+t:+new Date(+t)}function gs(t,e,n,r,i,o,a,s,u){var l=ro(Qi,Qi),c=l.invert,h=l.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function w(s){return(a(s)<s?f:o(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function x(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=Sr((function(t){return t[2]})).right(b,o);a===b.length?(i=Nr(n/31536e6,r/31536e6,e),e=t):a?(i=(a=b[o/b[a-1][2]<b[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(Nr(n,r,e),1),e=s)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(c(t))},l.domain=function(t){return arguments.length?h(Gr.call(t,ps)):h().map(ds)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=x(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?w:u(e)},l.nice=function(t,e){var n=h();return(t=x(t,n[0],n[n.length-1],e))?h(To(n,t)):l},l.copy=function(){return eo(l,gs(t,e,n,r,i,o,a,s,u))},l}var vs=function(){function t(t){this.state={options:{}},this.patternScale={},this.colorScale={},this.services=t}return t.prototype.sanitize=function(t){return t.datasets.forEach((function(t){t.data=t.data.map((function(t){return t.date&&!t.date.getTime&&(t.date=new Date(t.date)),t}))})),t},t.prototype.getDisplayData=function(){var t=Nn.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=bn.clone(this.get("data"));return n.datasets=n.datasets.filter((function(n){return e[n.label]===t})),n},t.prototype.getData=function(){return this.get("data")},t.prototype.setData=function(t){var e=this.sanitize(bn.clone(t)),n=this.generateDataLabels(e);return this.set({data:e,dataLabels:n}),e},t.prototype.generateDataLabels=function(t){var e={};return t.datasets.forEach((function(t){e[t.label]=Nn.items.status.ACTIVE})),e},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){void 0===e&&(e=!1),this.state=Object.assign({},this.state,t),e||this.update()},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:bn.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataLabels(),this.setColorScale(),this.services.events.dispatchEvent("model-update"))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Nn.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},t.prototype.setColorScale=function(){var t=this;if(this.getDisplayData().datasets[0].fillColors)this.getDisplayData().datasets.forEach((function(e){t.colorScale[e.label]=qr().range(e.fillColors).domain(t.allDataLabels)}));else{var e=Mr;this.getData().datasets.forEach((function(n,r){t.colorScale[n.label]=qr().range([e[r]]).domain(t.allDataLabels)}))}},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=this.getFillScale()[t](e);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale[t](e);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.updateAllDataLabels=function(){var t=this;this.allDataLabels?this.getDisplayData().labels.forEach((function(e){-1===t.allDataLabels.indexOf(e)&&t.allDataLabels.push(e)})):this.allDataLabels=this.getDisplayData().labels},t}(),ms=function(){function t(t,e){this.model=t,this.services=e,this.init()}return t.prototype.init=function(){},t.prototype.update=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t}(),ys="http://www.w3.org/1999/xhtml",_s={svg:"http://www.w3.org/2000/svg",xhtml:ys,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bs(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),_s.hasOwnProperty(e)?{space:_s[e],local:t}:t}function ws(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ys&&e.documentElement.namespaceURI===ys?e.createElement(t):e.createElementNS(n,t)}}function xs(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ts(t){var e=bs(t);return(e.local?xs:ws)(e)}function Ms(){}function Es(t){return null==t?Ms:function(){return this.querySelector(t)}}function Os(){return[]}function Ss(t){return null==t?Os:function(){return this.querySelectorAll(t)}}function Cs(t){return function(){return this.matches(t)}}function As(t){return new Array(t.length)}function ks(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ks.prototype={constructor:ks,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Ps(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new ks(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function Ls(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=l="$"+a.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):n[s]=new ks(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[d[s]]===u&&(i[s]=u)}function Ds(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Rs(t){return function(){this.removeAttribute(t)}}function js(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ns(t,e){return function(){this.setAttribute(t,e)}}function Fs(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Is(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Us(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Bs(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Vs(t){return function(){this.style.removeProperty(t)}}function Hs(t,e,n){return function(){this.style.setProperty(t,e,n)}}function zs(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Gs(t,e){return t.style.getPropertyValue(e)||Bs(t).getComputedStyle(t,null).getPropertyValue(e)}function Ws(t){return function(){delete this[t]}}function Ys(t,e){return function(){this[t]=e}}function qs(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Xs(t){return t.trim().split(/^|\s+/)}function $s(t){return t.classList||new Qs(t)}function Qs(t){this._node=t,this._names=Xs(t.getAttribute("class")||"")}function Zs(t,e){for(var n=$s(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Js(t,e){for(var n=$s(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ks(t){return function(){Zs(this,t)}}function tu(t){return function(){Js(this,t)}}function eu(t,e){return function(){(e.apply(this,arguments)?Zs:Js)(this,t)}}function nu(){this.textContent=""}function ru(t){return function(){this.textContent=t}}function iu(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ou(){this.innerHTML=""}function au(t){return function(){this.innerHTML=t}}function su(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function uu(){this.nextSibling&&this.parentNode.appendChild(this)}function lu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function cu(){return null}function hu(){var t=this.parentNode;t&&t.removeChild(this)}function fu(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function du(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Qs.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var pu={},gu=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(pu={mouseenter:"mouseover",mouseleave:"mouseout"}));function vu(t,e,n){return t=mu(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function mu(t,e,n){return function(r){var i=gu;gu=r;try{t.call(this,this.__data__,e,n)}finally{gu=i}}}function yu(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function _u(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function bu(t,e,n){var r=pu.hasOwnProperty(t.type)?vu:mu;return function(i,o,a){var s,u=this.__on,l=r(e,o,a);if(u)for(var c=0,h=u.length;c<h;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function wu(t,e,n){var r=Bs(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function xu(t,e){return function(){return wu(this,t,e)}}function Tu(t,e){return function(){return wu(this,t,e.apply(this,arguments))}}var Mu=[null];function Eu(t,e){this._groups=t,this._parents=e}function Ou(){return new Eu([[document.documentElement]],Mu)}function Su(t){return"string"==typeof t?new Eu([[document.querySelector(t)]],[document.documentElement]):new Eu([[t]],Mu)}function Cu(){for(var t,e=gu;t=e.sourceEvent;)e=t;return e}function Au(t){var e=Cu();return e.changedTouches&&(e=e.changedTouches[0]),function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}(t,e)}Eu.prototype=Ou.prototype={constructor:Eu,select:function(t){"function"!=typeof t&&(t=Es(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new Eu(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Ss(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new Eu(r,i)},filter:function(t){"function"!=typeof t&&(t=Cs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new Eu(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),l=-1,this.each((function(t){d[++l]=t})),d;var n=e?Ls:Ps,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,d=t.call(c,c&&c.__data__,l,r),p=d.length,g=s[l]=new Array(p),v=a[l]=new Array(p);n(c,h,g,v,u[l]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new Eu(a,r))._enter=s,a._exit=u,a},enter:function(){return new Eu(this._enter||this._groups.map(As),this._parents)},exit:function(){return new Eu(this._exit||this._groups.map(As),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new Eu(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Ds);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new Eu(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=bs(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?js:Rs:"function"==typeof e?n.local?Us:Is:n.local?Fs:Ns)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Vs:"function"==typeof e?zs:Hs)(t,e,null==n?"":n)):Gs(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ws:"function"==typeof e?qs:Ys)(t,e)):this.node()[t]},classed:function(t,e){var n=Xs(t+"");if(arguments.length<2){for(var r=$s(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?eu:e?Ks:tu)(n,e))},text:function(t){return arguments.length?this.each(null==t?nu:("function"==typeof t?iu:ru)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ou:("function"==typeof t?su:au)(t)):this.node().innerHTML},raise:function(){return this.each(uu)},lower:function(){return this.each(lu)},append:function(t){var e="function"==typeof t?t:Ts(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Ts(t),r=null==e?cu:"function"==typeof e?e:Es(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(hu)},clone:function(t){return this.select(t?du:fu)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=yu(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?bu:_u,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Tu:xu)(t,e))}};var ku={prefix:"bx",selectorTabbable:"\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n "},Pu=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];t.call(e,i[1],i[0])}},Object.defineProperties(e.prototype,n),e}()}(),Lu="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Du="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Ru="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Du):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},ju=["top","right","bottom","left","width","height","size","weight"],Nu="undefined"!=typeof MutationObserver,Fu=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){Ru(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};Fu.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Fu.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Fu.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Fu.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},Fu.prototype.connect_=function(){Lu&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Nu?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},Fu.prototype.disconnect_=function(){Lu&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},Fu.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),ju.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Fu.getInstance=function(){return this.instance_||(this.instance_=new Fu),this.instance_},Fu.instance_=null;var Iu=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n+=1){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Uu=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Du},Bu=Yu(0,0,0,0);function Vu(t){return parseFloat(t)||0}function Hu(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Vu(t["border-"+n+"-width"])}),0)}function zu(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Bu;var r=Uu(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=t["padding-"+i];e[i]=Vu(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Vu(r.width),u=Vu(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Hu(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Hu(r,"top","bottom")+a)),!function(t){return t===Uu(t).document.documentElement}(t)){var l=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return Yu(i.left,i.top,s,u)}var Gu="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Uu(t).SVGGraphicsElement}:function(t){return t instanceof Uu(t).SVGElement&&"function"==typeof t.getBBox};function Wu(t){return Lu?Gu(t)?function(t){var e=t.getBBox();return Yu(0,0,e.width,e.height)}(t):zu(t):Bu}function Yu(t,e,n,r){return{x:t,y:e,width:n,height:r}}var qu=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Yu(0,0,0,0),this.target=t};qu.prototype.isActive=function(){var t=Wu(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},qu.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Xu=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Iu(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Iu(this,{target:t,contentRect:n})},$u=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Pu,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n};$u.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Uu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new qu(t)),this.controller_.addObserver(this),this.controller_.refresh())}},$u.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Uu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},$u.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},$u.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},$u.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Xu(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},$u.prototype.clearActive=function(){this.activeObservations_.splice(0)},$u.prototype.hasActive=function(){return this.activeObservations_.length>0};var Qu="undefined"!=typeof WeakMap?new WeakMap:new Pu,Zu=function(t){if(!(this instanceof Zu))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=Fu.getInstance(),n=new $u(t,e,this);Qu.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Zu.prototype[t]=function(){return(e=Qu.get(this))[t].apply(e,arguments);var e}}));var Ju=void 0!==Du.ResizeObserver?Du.ResizeObserver:Zu,Ku=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=Su(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},u={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var l={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(l),a.width>0&&a.height>0))return l;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:bn.getProperty(t.node(),"width","baseVal","value"),height:bn.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();Su(this.getHolder()).classed(ku.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.addSVGElement=function(){var t=bn.getProperty(this.model.getOptions(),"style","prefix"),e=Su(this.getHolder()).append("svg").classed(ku.prefix+"--"+t+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=e.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=bn.debounce((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent("chart-resize"))}),12.5);new Ju(i).observe(e)}},e}(ms),tl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.init=function(){this.documentFragment=document.createDocumentFragment()},e.prototype.addEventListener=function(t,e){this.documentFragment.addEventListener(t,e)},e.prototype.removeEventListener=function(t,e){this.documentFragment.removeEventListener(t,e)},e.prototype.dispatchEvent=function(t,e){var n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)},e}(ms),el={value:function(){}};function nl(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new rl(r)}function rl(t){this._=t}function il(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ol(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function al(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=el,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}rl.prototype=nl.prototype={constructor:rl,on:function(t,e){var n,r=this._,i=il(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=al(r[n],t.name,e);else if(null==e)for(n in r)r[n]=al(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=ol(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new rl(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var sl,ul,ll=0,cl=0,hl=0,fl=0,dl=0,pl=0,gl="object"==typeof performance&&performance.now?performance:Date,vl="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ml(){return dl||(vl(yl),dl=gl.now()+pl)}function yl(){dl=0}function _l(){this._call=this._time=this._next=null}function bl(t,e,n){var r=new _l;return r.restart(t,e,n),r}function wl(){dl=(fl=gl.now())+pl,ll=cl=0;try{!function(){ml(),++ll;for(var t,e=sl;e;)(t=dl-e._time)>=0&&e._call.call(null,t),e=e._next;--ll}()}finally{ll=0,function(){var t,e,n=sl,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:sl=e);ul=t,Tl(r)}(),dl=0}}function xl(){var t=gl.now(),e=t-fl;e>1e3&&(pl-=e,fl=t)}function Tl(t){ll||(cl&&(cl=clearTimeout(cl)),t-dl>24?(t<1/0&&(cl=setTimeout(wl,t-gl.now()-pl)),hl&&(hl=clearInterval(hl))):(hl||(fl=gl.now(),hl=setInterval(xl,1e3)),ll=1,vl(wl)))}function Ml(t,e,n){var r=new _l;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}_l.prototype=bl.prototype={constructor:_l,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ml():+n)+(null==e?0:+e),this._next||ul===this||(ul?ul._next=this:sl=this,ul=this),this._call=t,this._time=n,Tl()},stop:function(){this._call&&(this._call=null,this._time=1/0,Tl())}};var El=nl("start","end","cancel","interrupt"),Ol=[];function Sl(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var l,c,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return Ml(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(Ml((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=bl((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:El,tween:Ol,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Cl(t,e){var n=kl(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Al(t,e){var n=kl(t,e);if(n.state>3)throw new Error("too late; already running");return n}function kl(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Pl(t,e){var n,r;return function(){var i=Al(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function Ll(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Al(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function Dl(t,e,n){var r=t._id;return t.each((function(){var t=Al(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return kl(t,r).value[e]}}function Rl(t,e){var n;return("number"==typeof e?Pi:e instanceof hi?Si:(n=hi(e))?(e=n,Si):ji)(t,e)}function jl(t){return function(){this.removeAttribute(t)}}function Nl(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fl(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function Il(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function Ul(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function Bl(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Vl(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Hl(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function zl(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Hl(t,i)),n}return i._value=e,i}function Gl(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Vl(t,i)),n}return i._value=e,i}function Wl(t,e){return function(){Cl(this,t).delay=+e.apply(this,arguments)}}function Yl(t,e){return e=+e,function(){Cl(this,t).delay=e}}function ql(t,e){return function(){Al(this,t).duration=+e.apply(this,arguments)}}function Xl(t,e){return e=+e,function(){Al(this,t).duration=e}}function $l(t,e){if("function"!=typeof e)throw new Error;return function(){Al(this,t).ease=e}}function Ql(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Cl:Al;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Zl=Ou.prototype.constructor;function Jl(t){return function(){this.style.removeProperty(t)}}function Kl(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function tc(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Kl(t,o,n)),r}return o._value=e,o}function ec(t){return function(e){this.textContent=t.call(this,e)}}function nc(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&ec(r)),e}return r._value=t,r}var rc=0;function ic(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function oc(t){return Ou().transition(t)}function ac(){return++rc}var sc=Ou.prototype;ic.prototype=oc.prototype={constructor:ic,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Es(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,h=o[a]=new Array(c),f=0;f<c;++f)(s=l[f])&&(u=t.call(s,s.__data__,f,l))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,Sl(h[f],e,n,f,h,kl(s,n)));return new ic(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ss(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var f,d=t.call(u,u.__data__,h,l),p=kl(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&Sl(f,e,n,g,d,p);o.push(d),a.push(u)}return new ic(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=Cs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new ic(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new ic(a,this._parents,this._name,this._id)},selection:function(){return new Zl(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ac(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=kl(a,e);Sl(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ic(r,this._parents,t,n)},call:sc.call,nodes:sc.nodes,node:sc.node,size:sc.size,empty:sc.empty,each:sc.each,on:function(t,e){var n=this._id;return arguments.length<2?kl(this.node(),n).on.on(t):this.each(Ql(n,t,e))},attr:function(t,e){var n=bs(t),r="transform"===n?qi:Rl;return this.attrTween(t,"function"==typeof e?(n.local?Bl:Ul)(n,r,Dl(this,"attr."+t,e)):null==e?(n.local?Nl:jl)(n):(n.local?Il:Fl)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=bs(t);return this.tween(n,(r.local?zl:Gl)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Yi:Rl;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Gs(this,t),a=(this.style.removeProperty(t),Gs(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Jl(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Gs(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Gs(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Dl(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Al(this,t),l=u.on,c=null==u.value[a]?o||(o=Jl(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=Gs(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,tc(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Dl(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,nc(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=kl(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?Pl:Ll)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Wl:Yl)(e,t)):kl(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ql:Xl)(e,t)):kl(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each($l(e,t)):kl(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=Al(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}))}))}};var uc={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function lc(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return uc.time=ml(),uc;return n}Ou.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},Ou.prototype.transition=function(t){var e,n;t instanceof ic?(e=t._id,t=t._name):(e=ac(),(n=uc).time=ml(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&Sl(a,t,e,l,s,n||lc(a,e));return new ic(r,this._parents,t,e)};var cc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return u(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener("model-update",(function(){t.pendingTransitions={}}))},e.prototype.getTransition=function(t,e){var n=this;if(!1===this.model.getOptions().animations||!1===e)return this.getInstantTransition(t);var r=oc(t).duration(bn.getProperty(tr,t,"duration")||tr.default.duration);return this.pendingTransitions[r._id]=r,r.on("end interrupt cancel",(function(){delete n.pendingTransitions[r._id]})),r},e.prototype.getInstantTransition=function(t){var e=this,n=oc(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(ms);function hc(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function fc(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function dc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t),r=fc(e);return n.setDate(n.getDate()+r),n}function pc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t).getTime(),r=fc(e);return new Date(n+r)}function gc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return pc(t,36e5*n)}function vc(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function mc(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=hc(t);return e.setHours(0,0,0,0),e}function yc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=mc(t),r=mc(e),i=n.getTime()-vc(n),o=r.getTime()-vc(r);return Math.round((i-o)/864e5)}function _c(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return pc(t,6e4*n)}function bc(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=hc(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function wc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t),r=fc(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=bc(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function xc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return pc(t,1e3*n)}function Tc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return wc(t,12*n)}function Mc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t),r=hc(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Ec(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=hc(t);return!isNaN(e)}function Oc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t),r=hc(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Sc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t),r=hc(e);return n.getFullYear()-r.getFullYear()}function Cc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t),r=hc(e);return n.getTime()-r.getTime()}function Ac(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Cc(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function kc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Cc(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Pc={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Lc(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Dc={date:Lc({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Lc({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Lc({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Rc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function jc(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function Nc(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}}var Fc,Ic={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Pc[t]?Pc[t]:1===e?Pc[t].one:Pc[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Dc,formatRelative:function(t,e,n,r){return Rc[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:jc({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:jc({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:jc({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:jc({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:jc({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Fc={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},i=n.match(Fc.matchPattern);if(!i)return null;var o=i[0],a=n.match(Fc.parsePattern);if(!a)return null;var s=Fc.valueCallback?Fc.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Nc({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Nc({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Nc({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Nc({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Nc({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Uc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return pc(t,-n)}function Bc(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Vc=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Bc("yy"===e?r%100:r,e.length)},Hc=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Bc(n+1,2)},zc=function(t,e){return Bc(t.getUTCDate(),e.length)},Gc=function(t,e){return Bc(t.getUTCHours()%12||12,e.length)},Wc=function(t,e){return Bc(t.getUTCHours(),e.length)},Yc=function(t,e){return Bc(t.getUTCMinutes(),e.length)},qc=function(t,e){return Bc(t.getUTCSeconds(),e.length)},Xc=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Bc(Math.floor(r*Math.pow(10,n-3)),e.length)};function $c(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=hc(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function Qc(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=hc(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=$c(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=$c(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Zc(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Qc(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=$c(n);return r}function Jc(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:fc(i),a=null==n.weekStartsOn?o:fc(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=hc(t),u=s.getUTCDay(),l=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function Kc(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=hc(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:fc(a),u=null==i.firstWeekContainsDate?s:fc(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=new Date(0);l.setUTCFullYear(r+1,0,u),l.setUTCHours(0,0,0,0);var c=Jc(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=Jc(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function th(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:fc(i),a=null==n.firstWeekContainsDate?o:fc(n.firstWeekContainsDate),s=Kc(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=Jc(u,e);return l}var eh="midnight",nh="noon",rh="morning",ih="afternoon",oh="evening",ah="night",sh={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Vc(t,e)},Y:function(t,e,n,r){var i=Kc(t,r),o=i>0?i:1-i;return"YY"===e?Bc(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Bc(o,e.length)},R:function(t,e){return Bc(Qc(t),e.length)},u:function(t,e){return Bc(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Bc(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Bc(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return Hc(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Bc(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=hc(t),r=Jc(n,e).getTime()-th(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Bc(i,e.length)},I:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=hc(t),n=$c(e).getTime()-Zc(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Bc(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):zc(t,e)},D:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=hc(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):Bc(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Bc(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Bc(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return Bc(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?nh:0===i?eh:i/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?oh:i>=12?ih:i>=4?rh:ah,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Gc(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Wc(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Bc(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Bc(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Yc(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):qc(t,e)},S:function(t,e){return Xc(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return lh(i);case"XXXX":case"XX":return ch(i);case"XXXXX":case"XXX":default:return ch(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return lh(i);case"xxxx":case"xx":return ch(i);case"xxxxx":case"xxx":default:return ch(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+uh(i,":");case"OOOO":default:return"GMT"+ch(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+uh(i,":");case"zzzz":default:return"GMT"+ch(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Bc(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Bc((r._originalDate||t).getTime(),e.length)}};function uh(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+Bc(o,2)}function lh(t,e){return t%60==0?(t>0?"-":"+")+Bc(Math.abs(t)/60,2):ch(t,e)}function ch(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Bc(Math.floor(i/60),2)+n+Bc(i%60,2)}function hh(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function fh(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var dh={p:fh,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return hh(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",hh(i,e)).replace("{{time}}",fh(o,e))}},ph=["D","DD"],gh=["YY","YYYY"];function vh(t){return-1!==ph.indexOf(t)}function mh(t){return-1!==gh.indexOf(t)}function yh(t){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if("YY"===t)throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if("D"===t)throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if("DD"===t)throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}var _h=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wh=/^'([^]*?)'?$/,xh=/''/g,Th=/[a-zA-Z]/;function Mh(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||Ic,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:fc(a),u=null==i.firstWeekContainsDate?s:fc(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=o.options&&o.options.weekStartsOn,c=null==l?0:fc(l),h=null==i.weekStartsOn?c:fc(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var f=hc(t);if(!Ec(f))throw new RangeError("Invalid time value");var d=vc(f),p=Uc(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(bh).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,dh[e])(t,o.formatLong,g):t})).join("").match(_h).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Eh(t);var n=sh[e];if(n)return!i.useAdditionalWeekYearTokens&&mh(t)&&yh(t),!i.useAdditionalDayOfYearTokens&&vh(t)&&yh(t),n(p,t,o.localize,g);if(e.match(Th))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Eh(t){return t.match(wh)[1].replace(xh,"'")}function Oh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return dc(t,-n)}function Sh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return gc(t,-n)}function Ch(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return _c(t,-n)}function Ah(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return wc(t,-n)}function kh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return xc(t,-n)}function Ph(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fc(e);return Tc(t,-n)}var Lh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return u(e,t),e.prototype.getDomainAxisPosition=function(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.setDefaultAxes=function(){bn.getProperty(this.model.getOptions(),"axes")||(this.model.getOptions().axes={left:{primary:!0,includeZero:!0},bottom:{secondary:!0,includeZero:!0,scaleType:this.model.getDisplayData().labels?p.LABELS:void 0}})},e.prototype.update=function(t){var e=this;this.setDefaultAxes(),this.determineOrientation(),Object.keys(h).map((function(t){return h[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.determineOrientation=function(){var t=this,e=this.model.getOptions();[h.LEFT,h.BOTTOM,h.RIGHT,h.TOP].forEach((function(n){var r=bn.getProperty(e,"axes",n);if(r){var i=r.scaleType||p.LINEAR;t.scaleTypes[n]=i,i===p.LINEAR?t.rangeAxisPosition=n:t.domainAxisPosition=n}})),this.rangeAxisPosition===h.LEFT&&this.domainAxisPosition===h.BOTTOM?this.orientation=f.VERTICAL:this.orientation=f.HORIZONTAL},e.prototype.getOrientation=function(){return this.orientation},e.prototype.getScaleByPosition=function(t){return this.scales[t]},e.prototype.getScaleTypeByPosition=function(t){return this.scaleTypes[t]},e.prototype.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[h.BOTTOM,h.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[h.LEFT,h.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainXScale=function(){return this.scales[this.getMainXAxisPosition()]},e.prototype.getMainYScale=function(){return this.scales[this.getMainYAxisPosition()]},e.prototype.getValueFromScale=function(t,e,n){var r=isNaN(e)?e.value:e,i=this.scaleTypes[t],o=this.scales[t];return i===p.LABELS?o(this.model.getDisplayData().labels[n])+o.step()/2:i===p.TIME?o(new Date(e.date||e.label)):o(r)},e.prototype.getDomainValue=function(t,e){return this.getValueFromScale(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueFromScale(this.rangeAxisPosition,t,e)},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=[];switch(this.scaleTypes[this.domainAxisPosition]){case p.LABELS:var r=e.labels.indexOf(t);e.datasets.forEach((function(t){n.push({datasetLabel:t.label,value:t.data[r]})}));break;case p.TIME:var i=Object.keys(e.datasets[0].data[0]).filter((function(t){return"value"!==t}))[0];e.datasets.forEach((function(e){var r=e.label;e.data.filter((function(e){var n=new Date(e[i]),r=new Date(t);return n.getTime()===r.getTime()})).forEach((function(t){n.push(Object.assign({datasetLabel:r,value:t.value},t))}))}))}return n},e.prototype.getScaleDomain=function(t){var e,n=this.model.getOptions(),r=bn.getProperty(n,"axes",t),i=r.includeZero,o=this.model.getDisplayData(),a=o.datasets,s=o.labels;if(r&&r.scaleType===p.LABELS)return s||this.model.getDisplayData().datasets[0].data.map((function(t,e){return e+1}));if(r.domain)return r.domain;if(r.stacked)e=Ar(s.reduce((function(t,e,n){var r=a.map((function(t){return isNaN(t.data[n])?t.data[n].value:t.data[n]})),i=r.reduce((function(t,e){return t+e}),0);return t.concat(i,Fr(r))}),[]).concat(0));else{var u=a.reduce((function(t,e){return e.data.forEach((function(e){t=r.scaleType===p.TIME?t.concat(e.date):t.concat(isNaN(e)?e.value:e)})),t}),[]);r.scaleType!==p.TIME&&i&&(u=u.concat(0)),e=Ar(u)}if(r.scaleType===p.TIME){var l=bn.getProperty(n,"timeScale","addSpaceOnEdges");if(l){var c=new Date(e[0]),h=new Date(e[1]);return function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t),r=hc(e),i=Mc(n,r),o=Math.abs(Sc(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Mc(n,r)===-i,s=i*(o-a);return 0===s?0:s}(h,c)>1?[Ph(c,l),Tc(h,l)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t),r=hc(e),i=Mc(n,r),o=Math.abs(Oc(n,r));n.setMonth(n.getMonth()-i*o);var a=Mc(n,r)===-i,s=i*(o-a);return 0===s?0:s}(h,c)>1?[Ah(c,l),wc(h,l)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=hc(t),r=hc(e),i=Mc(n,r),o=Math.abs(yc(n,r));n.setDate(n.getDate()-i*o);var a=Mc(n,r)===-i,s=i*(o-a);return 0===s?0:s}(h,c)>1?[Oh(c,l),dc(h,l)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Cc(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(h,c)>1?[Sh(c,l),gc(h,l)]:Ac(h,c)>30?[Ch(c,30*l),_c(h,30*l)]:Ac(h,c)>1?[Ch(c,l),_c(h,l)]:kc(h,c)>15?[kh(c,15*l),xc(h,15*l)]:kc(h,c)>1?[kh(c,l),xc(h,l)]:[c,h]}return[new Date(e[0]),new Date(e[1])]}return function(t,e){var n=t[0],r=t[1],i=(r-n)*e;return[n>=0&&n-i<0?0:n-i,r<=0&&r+i>0?0:r+i]}(e,er.paddingRatio)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=bn.getProperty(e,"axes",t);if(!n)return null;var r,i=bn.getProperty(n,"scaleType")||p.LINEAR;return this.scaleTypes[t]=i,(r=i===p.TIME?function(){return Ir.apply(gs(Go,zo,Bo,Io,Fo,No,jo,Ro,ea).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===p.LOG?function t(){var e=ko(no()).domain([1,10]);return e.copy=function(){return eo(e,t()).base(e.base())},Ir.apply(e,arguments),e}().base(n.base||10):i===p.LABELS?Xr():xo()).domain(this.getScaleDomain(t)),r},e}(ms),Dh=Math.PI,Rh=2*Dh,jh=Rh-1e-6;function Nh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Fh(){return new Nh}function Ih(t){return function(){return t}}Nh.prototype=Fh.prototype={constructor:Nh,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,l=o-t,c=a-e,h=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-u*l)>1e-6&&i){var f=n-o,d=r-a,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Dh-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%Rh+Rh),h>jh?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Dh)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Uh=Math.abs,Bh=Math.atan2,Vh=Math.cos,Hh=Math.max,zh=Math.min,Gh=Math.sin,Wh=Math.sqrt,Yh=Math.PI,qh=Yh/2,Xh=2*Yh;function $h(t){return t>1?0:t<-1?Yh:Math.acos(t)}function Qh(t){return t>=1?qh:t<=-1?-qh:Math.asin(t)}function Zh(t){return t.innerRadius}function Jh(t){return t.outerRadius}function Kh(t){return t.startAngle}function tf(t){return t.endAngle}function ef(t){return t&&t.padAngle}function nf(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,f=h*u-c*l;if(!(f*f<1e-12))return[t+(f=(c*(e-o)-h*(t-i))/f)*u,e+f*l]}function rf(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/Wh(s*s+u*u),c=l*u,h=-l*s,f=t+c,d=e+h,p=n+c,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,w=i-o,x=f*g-p*d,T=(_<0?-1:1)*Wh(Hh(0,w*w*b-x*x)),M=(x*_-y*T)/b,E=(-x*y-_*T)/b,O=(x*_+y*T)/b,S=(-x*y+_*T)/b,C=M-v,A=E-m,k=O-v,P=S-m;return C*C+A*A>k*k+P*P&&(M=O,E=S),{cx:M,cy:E,x01:-c,y01:-h,x11:M*(i/w-1),y11:E*(i/w-1)}}function of(){var t=Zh,e=Jh,n=Ih(0),r=null,i=Kh,o=tf,a=ef,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-qh,d=o.apply(this,arguments)-qh,p=Uh(d-f),g=d>f;if(s||(s=u=Fh()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>Xh-1e-12)s.moveTo(h*Vh(f),h*Gh(f)),s.arc(0,0,h,f,d,!g),c>1e-12&&(s.moveTo(c*Vh(d),c*Gh(d)),s.arc(0,0,c,d,f,g));else{var v,m,y=f,_=d,b=f,w=d,x=p,T=p,M=a.apply(this,arguments)/2,E=M>1e-12&&(r?+r.apply(this,arguments):Wh(c*c+h*h)),O=zh(Uh(h-c)/2,+n.apply(this,arguments)),S=O,C=O;if(E>1e-12){var A=Qh(E/c*Gh(M)),k=Qh(E/h*Gh(M));(x-=2*A)>1e-12?(b+=A*=g?1:-1,w-=A):(x=0,b=w=(f+d)/2),(T-=2*k)>1e-12?(y+=k*=g?1:-1,_-=k):(T=0,y=_=(f+d)/2)}var P=h*Vh(y),L=h*Gh(y),D=c*Vh(w),R=c*Gh(w);if(O>1e-12){var j,N=h*Vh(_),F=h*Gh(_),I=c*Vh(b),U=c*Gh(b);if(p<Yh&&(j=nf(P,L,I,U,N,F,D,R))){var B=P-j[0],V=L-j[1],H=N-j[0],z=F-j[1],G=1/Gh($h((B*H+V*z)/(Wh(B*B+V*V)*Wh(H*H+z*z)))/2),W=Wh(j[0]*j[0]+j[1]*j[1]);S=zh(O,(c-W)/(G-1)),C=zh(O,(h-W)/(G+1))}}T>1e-12?C>1e-12?(v=rf(I,U,P,L,h,C,g),m=rf(N,F,D,R,h,C,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),C<O?s.arc(v.cx,v.cy,C,Bh(v.y01,v.x01),Bh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,C,Bh(v.y01,v.x01),Bh(v.y11,v.x11),!g),s.arc(0,0,h,Bh(v.cy+v.y11,v.cx+v.x11),Bh(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,C,Bh(m.y11,m.x11),Bh(m.y01,m.x01),!g))):(s.moveTo(P,L),s.arc(0,0,h,y,_,!g)):s.moveTo(P,L),c>1e-12&&x>1e-12?S>1e-12?(v=rf(D,R,N,F,c,-S,g),m=rf(P,L,I,U,c,-S,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),S<O?s.arc(v.cx,v.cy,S,Bh(v.y01,v.x01),Bh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,S,Bh(v.y01,v.x01),Bh(v.y11,v.x11),!g),s.arc(0,0,c,Bh(v.cy+v.y11,v.cx+v.x11),Bh(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,Bh(m.y11,m.x11),Bh(m.y01,m.x01),!g))):s.arc(0,0,c,w,b,g):s.lineTo(D,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Yh/2;return[Vh(r)*n,Gh(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ih(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ih(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ih(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ih(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ih(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ih(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ih(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function af(t){this._context=t}function sf(t){return new af(t)}function uf(t){return t[0]}function lf(t){return t[1]}function cf(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function hf(t){return t}af.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var ff=Array.prototype.slice;function df(){}function pf(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function gf(t){this._context=t}function vf(t){return new gf(t)}function mf(t){this._context=t}function yf(t){return new mf(t)}function _f(t){this._context=t}function bf(t){return new _f(t)}function wf(t,e){this._basis=new gf(t),this._beta=e}gf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:pf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:pf(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},mf.prototype={areaStart:df,areaEnd:df,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:pf(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},_f.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:pf(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},wf.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var xf=function t(e){function n(t){return 1===e?new gf(t):new wf(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Tf(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Mf(t,e){this._context=t,this._k=(1-e)/6}Mf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tf(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Tf(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ef=function t(e){function n(t){return new Mf(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Of(t,e){this._context=t,this._k=(1-e)/6}Of.prototype={areaStart:df,areaEnd:df,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Tf(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Sf=function t(e){function n(t){return new Of(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Cf(t,e){this._context=t,this._k=(1-e)/6}Cf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tf(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Af=function t(e){function n(t){return new Cf(t,e)}return n.tension=function(e){return t(+e)},n}(0);function kf(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Pf(t,e){this._context=t,this._alpha=e}Pf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:kf(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Lf=function t(e){function n(t){return e?new Pf(t,e):new Mf(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Df(t,e){this._context=t,this._alpha=e}Df.prototype={areaStart:df,areaEnd:df,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:kf(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Rf=function t(e){function n(t){return e?new Df(t,e):new Of(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function jf(t,e){this._context=t,this._alpha=e}jf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kf(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Nf=function t(e){function n(t){return e?new jf(t,e):new Cf(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ff(t){this._context=t}function If(t){return new Ff(t)}function Uf(t){return t<0?-1:1}function Bf(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Uf(o)+Uf(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Vf(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Hf(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function zf(t){this._context=t}function Gf(t){this._context=new Wf(t)}function Wf(t){this._context=t}function Yf(t){return new zf(t)}function qf(t){return new Gf(t)}function Xf(t){this._context=t}function $f(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function Qf(t){return new Xf(t)}function Zf(t,e){this._context=t,this._t=e}function Jf(t){return new Zf(t,.5)}function Kf(t){return new Zf(t,0)}function td(t){return new Zf(t,1)}function ed(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function nd(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function rd(t,e){return t[e]}Ff.prototype={areaStart:df,areaEnd:df,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},zf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Hf(this,this._t0,Vf(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Hf(this,Vf(this,n=Bf(this,t,e)),n);break;default:Hf(this,this._t0,n=Bf(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Gf.prototype=Object.create(zf.prototype)).point=function(t,e){zf.prototype.point.call(this,e,t)},Wf.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},Xf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=$f(t),i=$f(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Zf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var id,od,ad=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:sf,curveLinearClosed:If,curveBasis:vf,curveBasisClosed:yf,curveBasisOpen:bf,curveBundle:xf,curveCardinal:Ef,curveCardinalClosed:Sf,curveCardinalOpen:Af,curveCatmullRom:Lf,curveCatmullRomClosed:Rf,curveCatmullRomOpen:Nf,curveMonotoneX:Yf,curveMonotoneY:qf,curveNatural:Qf,curveStep:Jf,curveStepAfter:td,curveStepBefore:Kf},e}return u(e,t),e.prototype.getD3Curve=function(){var t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){var n=this.curveTypes[t];return e&&Object.keys(e).forEach((function(t){n[t]&&(n=n[t](e[t]))})),n}return console.warn("The curve type '"+t+"' is invalid, using 'curveLinear' instead"),this.curveTypes.curveLinear},e}(ms),sd=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(Su(this.services.domUtils.getMainSVG()))}return t.prototype.init=function(){},t.prototype.render=function(t){console.error("render() method is not implemented")},t.prototype.destroy=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t.prototype.setParent=function(t){var e=this.parent;if(this.parent=t,(!e||e.node()!==t.node())&&this.type){var n=bn.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(ku.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(ku.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=bn.getProperty(this.model.getOptions(),"style","prefix");return Ku.appendOrSelect(this.parent,"g."+ku.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),ud=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return u(n,t),n.prototype.render=function(){var t=this,n=this.getContainerSVG().attr("role",e.GRAPHICS_DOCUMENT),r=this.model.getOptions(),i=n.selectAll("g.legend-item").data(this.getLegendItemArray()),o=i.enter().append("g").classed("legend-item",!0),a=r.legend.checkbox.radius;o.append("rect").classed("checkbox",!0).merge(i.select("rect.checkbox")).attr("width",2*a).attr("height",2*a).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.value===r.legend.items.status.ACTIVE?t.model.getStrokeColor(e.key):null})).classed("active",(function(t,e){return t.value===r.legend.items.status.ACTIVE})),o.append("text").merge(i.select("text")).text((function(t){return t.key})).attr("alignment-baseline","middle"),this.breakItemsIntoLines(o),i.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var s=bn.getProperty(this.model.getOptions(),"legend","clickable");n.classed("clickable",s),s&&o.size()>0&&this.addEventListeners()},n.prototype.breakItemsIntoLines=function(t){var e,n=this,r=this.getContainerSVG(),i=this.model.getOptions(),o=i.legend.checkbox.radius,a=i.legend.items.horizontalSpace,s=i.legend.items.verticalSpace,u=i.legend.items.textYOffset,l=2*o+i.legend.checkbox.spaceAfter,c=i.legend.items.status.DISABLED,h=this.model.get("dataLabels"),f=Object.keys(h).some((function(t){return h[t]===c})),d=bn.getProperty(i,"legend","orientation"),p=0,g=0,v=0;t.merge(r.selectAll("g.legend-item")).each((function(t,i){var c=Su(this),h=Su(r.selectAll("g.legend-item").nodes()[i-1]);if(0===v||h.empty()||d===y.VERTICAL)d===y.VERTICAL&&0!==i&&g++;else{var m=Ku.getSVGElementSize(n.parent,{useAttr:!0}),_=Ku.getSVGElementSize(Su(this).select("text"),{useBBox:!0}),b=Ku.getSVGElementSize(h.select("text"),{useBBox:!0});(p=p+b.width+l+a)+l+_.width>m.width&&(g++,p=0,v=0)}c.select("rect.checkbox").attr("x",p).attr("y",0+g*s);var w=u+g*s;c.select("text").attr("x",p+l).attr("y",0+w),e=w,f&&c.select("g.check").empty()?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*o-1).attr("height",2*o-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):f||c.select("g.check").empty()||c.select("g.check").remove(),v++})),Ku.appendOrSelect(r,"rect.spacer").attr("x",0).attr("y",e).attr("width",16).attr("height",16).attr("fill","none")},n.prototype.getLegendItemArray=function(){var t=this.model.get("dataLabels");return Object.keys(t).map((function(e){return{key:e,value:t[e]}}))},n.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions();e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent("legend-item-onhover",{hoveredElement:Su(this)});var e=n.legend.checkbox.radius,r=Su(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower()})).on("click",(function(){t.services.events.dispatchEvent("legend-item-onclick",{clickedElement:Su(this)});var e=Su(this).datum();t.model.toggleDataLabel(e.key)})).on("mouseout",(function(){var e=Su(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent("legend-item-onmouseout",{hoveredElement:e})}))},n}(sd),ld=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return u(e,t),e.prototype.truncateTitle=function(){var t=Ku.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=Ku.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=Ku.appendOrSelect(e,"tspan").node().getComputedTextLength(),r=Math.floor(t-n),i=this.model.getOptions().title,o=this.getSubstringIndex(e.node(),0,i.length-1,r);e.text(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:v.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();Ku.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).text(this.model.getOptions().title),this.truncateTitle()},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(sd);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(od||(od={}));var cd=((id={})[od.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},id[od.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},id[od.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},id[od.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},id),hd="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},fd=function(){function t(t){void 0===t&&(t={}),this.positions=cd,this.positions=Object.assign({},cd,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),u=s.bottom-r().height,l=s.right-r().width;u=u<0?e.offsetHeight:u,l=l<0?e.offsetWidth:l;var c=e.offsetHeight*e.offsetWidth,h=c-u*l;return{placement:n,weight:(h=0===h?c:h)/c}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:hd.innerHeight-hd.scrollY,height:hd.innerWidth-hd.scrollX}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}(),dd=(new fd,function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new fd,i.init(),i}return u(e,t),e.prototype.init=function(){var t=this,e=Su(this.services.domUtils.getHolder()),n=bn.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Ku.appendOrSelect(e,"div."+ku.prefix+"--"+n+"--tooltip");var r=Ku.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(i){if(i.detail.type===v.DATAPOINT&&bn.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===v.GRIDLINE&&bn.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")){var o=Su(gu.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o)):a=t.getTooltipHTML(o,v.DATAPOINT),bn.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(o,a)):r.html(a),t.positionTooltip()}else if(i.detail.type===v.TITLE){var s=Ku.appendOrSelect(e,"svg."+ku.prefix+"--"+n+"--chart-svg"),u=Ku.getSVGElementSize(s).width*bn.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",u),r.html(t.getTooltipHTML(i.detail.hoveredElement,v.TITLE));var l=t.getTooltipPosition(i.detail.hoveredElement.node());t.positionTooltip(l)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===v.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=bn.getProperty(t,"data")?t.data:t,r=bn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n.value):n.value.toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+(n.datasetLabel?n.datasetLabel:n.label)+'</p>\n\t\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.sort((function(t,e){return e.value-t.value}));var r=this.services.cartesianScales.getDomainScale().scaleType;return"<ul class='multi-tooltip'>"+n.map((function(t){var n=t.value;n instanceof Object&&(n=r===p.TIME?t.value.date:t.value.value);var i=bn.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(n):n.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.getTooltipPosition=function(t){var e=Su(this.services.domUtils.getHolder()).node().getBoundingClientRect(),n=t.getBoundingClientRect(),r=this.model.getOptions().tooltip.title.verticalOffset,i={left:n.left-e.left+n.width/2,top:n.top-e.top-r};return{placement:g.BOTTOM,position:i}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=Au(n);if(t){var o=t.placement===g.TOP?od.TOP:od.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[od.RIGHT,od.LEFT,od.TOP,od.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.datapoint.horizontalOffset;a===od.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(sd)),pd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.init=function(){var e=this,n=Su(this.services.domUtils.getHolder()),r=bn.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Ku.appendOrSelect(n,"div."+ku.prefix+"--"+r+"--tooltip");var i=Ku.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(o){if(o.detail.type===v.DATAPOINT&&bn.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===v.GRIDLINE&&bn.getProperty(e.model.getOptions(),"tooltip","gridline","enabled")){var a=o.detail.hoveredElement.datum(),s=o.detail.hoveredElement.node(),u=void 0;o.detail.multidata?(a=o.detail.multidata,u=e.getMultilineTooltipHTML(a)):u=e.getTooltipHTML(o.detail.hoveredElement.datum()),bn.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u);var l=e.getTooltipPosition(s);e.positionTooltip(o.detail.multidata?void 0:l)}else if(o.detail.type===v.TITLE){var c=Ku.appendOrSelect(n,"svg."+ku.prefix+"--"+r+"--chart-svg"),h=Ku.getSVGElementSize(c).width*bn.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",h),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,v.TITLE));l=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node());e.positionTooltip(l)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t){var e=Su(t).datum(),n=Su(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.datapoint.verticalOffset;if(e.value<=0){var o={left:r.left-n.left+r.width/2,top:r.bottom-n.top+i};return{placement:g.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:g.TOP,position:o}},e.prototype.getTooltipHTML=function(t){return'<div class="datapoint-tooltip"><p class="value">'+(bn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en"))+"</p></div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.reverse(),this.services.cartesianScales.getOrientation()===f.VERTICAL&&n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=bn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(r):r.toLocaleString("en"),"<ul class='multi-tooltip'>"+n.map((function(t){var n=bn.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+n+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"<li>\n\t\t\t\t\t<div class='total-val'>\n\t\t\t\t\t\t<p class='label'>Total</p>\n\t\t\t\t\t\t<p class='value'>"+r+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>"},e}(dd),gd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===v.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);var r=bn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(e.value):e.value.toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e.datasetLabel,e.label)+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e.datasetLabel+'</p>\n\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t</div>"},e}(dd),vd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=this.services.cartesianScales.getMainXScale();return e.step?Math.min(t.bars.maxWidth,e.step()/2):Math.min(t.bars.maxWidth,5/e.ticks().length*t.bars.maxWidth)},e}(sd),md=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return u(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.getContainerSVG().selectAll("g.bars").data(this.model.getDisplayData().datasets,(function(t){return t.label}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").classed("bars",!0).attr("role",e.GROUP).merge(r).selectAll("path.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}),(function(t){return t.label}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillScale()(t.label)})).attr("d",(function(t,e){var r=n.getBarWidth(),i=n.services.cartesianScales.getDomainValue(t,e)-r/2,o=i+r,a=n.services.cartesianScales.getRangeValue(0),s=n.services.cartesianScales.getRangeValue(t,e);return bn.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=Su(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",hi(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_MOUSEMOVE,{element:Su(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_CLICK,{element:Su(this),datum:e})})).on("mouseout",(function(e){var n=Su(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()(e.label)})),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(vd),yd=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return u(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getGroupWidth=function(){var t=this.model.getDisplayData().datasets;return t.length*this.getBarWidth()+5*(t.length-1)},n.prototype.setGroupScale=function(){var t=this.model.getDisplayData().datasets;this.groupScale=Xr().domain(t.map((function(t){return t.label}))).rangeRound([0,this.getGroupWidth()])},n.prototype.getBarWidth=function(){var e=this.model.getDisplayData().datasets,n=this.services.cartesianScales.getDomainScale();return Math.min(n.step()/2/e.length,t.prototype.getBarWidth.call(this))},n.prototype.render=function(t){var n=this,r=this.model.getDisplayData();this.setGroupScale();var i=this.getContainerSVG().selectAll("g.bars").data(r.labels);i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("bars",!0).attr("role",e.GROUP).attr("aria-labelledby",(function(t){return t})).merge(i).attr("transform",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-n.getGroupWidth()/2+n.getBarWidth();return n.services.cartesianScales.getOrientation()===f.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}));o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("d",(function(t){var e=n.groupScale(t.datasetLabel),r=n.getBarWidth(),i=e-r/2,o=e+r/2,a=n.services.cartesianScales.getRangeValue(0),s=n.services.cartesianScales.getRangeValue(t.value);return bn.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){return this.model.getDisplayData().datasets.map((function(n){return{label:t,datasetLabel:n.label,value:n.data[e].value?n.data[e].value:n.data[e]}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=Su(this);n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",hi(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_MOUSEMOVE,{element:Su(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_CLICK,{element:Su(this),datum:e})})).on("mouseout",(function(e){var n=Su(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(vd),_d=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return u(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getStackData=function(){var t,e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(n)===p.TIME){var r=[];e.datasets.forEach((function(t){r=r.concat(t.data.map((function(t){return Number(t.date)})))})),t=(r=bn.removeArrayDuplicates(r).sort()).map((function(t,n){var r={};return e.datasets.forEach((function(e){var n=e.data.find((function(e){return Number(e.date)===Number(t)}));r[e.label]=n?n.value:0})),r.label=t,r}))}else t=e.labels.map((function(t,n){var r={};return e.datasets.forEach((function(t){r[t.label]=isNaN(t.data[n])?t.data[n].value:t.data[n]})),r.label=t,r}));return t},n.prototype.render=function(t){var n=this,r=this.model.getOptions(),i=this.getContainerSVG(),o=this.model.getDisplayData(),a=this.getStackData(),s=o.datasets.map((function(t){return t.label})),u=i.selectAll("g.bars").data(function(){var t=Ih([]),e=nd,n=ed,r=rd;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var h,f=s[o],d=c[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(o=0,a=e(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Ih(ff.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Ih(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?nd:"function"==typeof t?t:Ih(ff.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?ed:t,i):n},i}().keys(s)(a),(function(t){return t.key}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",e.GROUP);var l=i.selectAll("g.bars").selectAll("path.bar").data((function(t){return function(t){return Object.keys(t).map((function(e){"object"==typeof t[e]&&(t[e].datasetLabel=t.key,t[e].label=t[e].data.label,t[e].value=t[e].data[t.key])})),t}(t)}),(function(t){return t.label}));l.exit().remove();var c=this.services.cartesianScales.getRangeScale();l.enter().append("path").merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("height",(function(t,e){var i,o=t.datasetLabel,a=s.indexOf(o);return i=c.scaleType===p.LABELS?Math.abs(c.scale.range()[0]-n.services.cartesianScales.getRangeValue(t.label,e)):n.services.cartesianScales.getRangeValue(t[0])-n.services.cartesianScales.getRangeValue(t[1]),a>0&&i>=r.bars.dividerSize?i-r.bars.dividerSize:i})).attr("d",(function(t,e){var i=n.getBarWidth(),o=n.services.cartesianScales.getDomainValue(t,e)-i/2,a=o+i,s=n.services.cartesianScales.getRangeValue(t[0],e),u=n.services.cartesianScales.getRangeValue(t[1],e);return Math.abs(u-s)>0&&Math.abs(u-s)>r.bars.dividerSize&&(n.services.cartesianScales.getOrientation()===f.VERTICAL?u+=1:u-=1),bn.generateSVGPathString({x0:o,x1:a,y0:s,y1:u},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=Su(this);n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",hi(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=Su(this),r=Su(this).datum();n.classed("hovered",!0);var i=r.data,o=i.label;delete i.label;var a=Object.keys(i).map((function(t){return{datasetLabel:t,value:i[t],label:o}}));t.services.events.dispatchEvent(x.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{multidata:a,hoveredElement:n,type:v.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_CLICK,{element:Su(this),datum:e})})).on("mouseout",(function(e){var n=Su(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(vd),bd=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return u(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=(this.model.getOptions(),this.getContainerSVG().selectAll("g.dots").data(this.model.getDisplayData().datasets,(function(t){return t.label})));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").classed("dots",!0).attr("role",e.GROUP).merge(r).selectAll("circle.dot").data((function(t,e){return n.addLabelsToDataPoints(t,e)})),o=i.enter().append("circle").attr("opacity",0).merge(i);this.styleCircles(o,t),this.addEventListeners()},n.prototype.styleCircles=function(t,n){var r=this,i=this.model.getOptions(),o=i.points.filled;t.raise().classed("dot",!0).classed("filled",(function(t){return r.model.getIsFilled(t.datasetLabel,t.label,t,o)})).classed("unfilled",(function(t){return!r.model.getIsFilled(t.datasetLabel,t.label,t,o)})).attr("cx",(function(t,e){return r.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("scatter-update-enter",n)).attr("cy",(function(t,e){return r.services.cartesianScales.getRangeValue(t,e)})).attr("r",i.points.radius).attr("fill",(function(t){if(r.model.getIsFilled(t.datasetLabel,t.label,t,o))return r.model.getFillColor(t.datasetLabel,t.label,t)})).attr("fill-opacity",o?.2:1).attr("stroke",(function(t){return r.model.getStrokeColor(t.datasetLabel,t.label,t)})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.filter((function(t){var e=isNaN(t)?t.value:t;return null!=e})).map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,class:e.class,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle").on("mouseover mousemove",(function(e){var n=Su(this);n.classed("hovered",!0).style("fill",(function(e){return t.model.getFillColor(e.datasetLabel,e.label,e)}));var r="mouseover"===gu.type?x.Scatter.SCATTER_MOUSEOVER:x.Scatter.SCATTER_MOUSEMOVE;t.services.events.dispatchEvent(r,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(x.Scatter.SCATTER_CLICK,{element:Su(this),datum:e})})).on("mouseout",(function(e){var n=Su(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(x.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(sd),wd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return u(e,t),e.prototype.getRadiusScale=function(t){var e=t.data(),n=e.map((function(t){return t.radius})).filter((function(t){return t})),r=this.model.getOptions(),i=Ku.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0});return xo().domain(Ar(n)).range(r.bubble.radiusRange(i,e))},e.prototype.styleCircles=function(t,e){var n=this,r=this.model.getOptions(),i=this.getRadiusScale(t);t.raise().classed("dot",!0).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return i(t.radius)})).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("fill-opacity",r.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t.datasetLabel,t.label,t.value)})).attr("opacity",1)},e.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getOptions(),r=this.model.getDisplayData().labels;return t.data.map((function(e,i){return{date:e.date,label:r[i],datasetLabel:t.label,value:isNaN(e)?e.value:e,radius:e.radius||n.points.radius}}))},e}(bd),xd=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return u(n,t),n.prototype.init=function(){var t=this;this.services.events.addEventListener("legend-item-onhover",(function(e){var n=e.detail.hoveredElement;t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.label!==n.datum().key?Kn.opacity.unselected:Kn.opacity.selected}))})),this.services.events.addEventListener("legend-item-onmouseout",(function(e){t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Kn.opacity.selected)}))},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this.getContainerSVG();this.lineGenerator=function(){var t=uf,e=lf,n=Ih(!0),r=null,i=sf,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=Fh())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(l)return o=null,l+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:Ih(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Ih(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ih(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}().x((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).y((function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).curve(this.services.curves.getD3Curve()).defined((function(t,e){var n=isNaN(t)?t.value:t;return null!=n}));var i=r.selectAll("g.lines").data(this.model.getDisplayData().datasets,(function(t){return t.label}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("lines",!0),a=this;o.append("path").attr("opacity",0).merge(r.selectAll("g.lines path")).attr("stroke",(function(t){var e=Su(this.parentNode).datum();return a.model.getStrokeColor(e.label)})).datum((function(t){var e=Su(this.parentNode).datum();return this._datasetLabel=e.label,e.data})).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.map((function(t){return t.value||t})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",1).attr("class","line").attr("d",this.lineGenerator)},n}(sd);function Td(t,e){var n=this,r=Ni(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Md=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return u(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getDataList=function(){var t=this.model.getDisplayData();return t.datasets[0].data.map((function(e,n){return{label:t.labels[n],value:e.value?e.value:e}}))},n.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this,i=this.getContainerSVG(),o=this.model.getOptions(),a=this.getDataList(),s=this.computeRadius();this.arc=of().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=of().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=hf,e=cf,n=null,r=Ih(0),i=Ih(Xh),o=Ih(0);function a(a){var s,u,l,c,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(Xh,Math.max(-Xh,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,l=d?(m-f*_)/d:0;s<f;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Ih(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ih(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ih(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ih(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(a).sort((function(t,e){return t.index-e.index})),l=Ku.appendOrSelect(i,"g.slices").attr("role",e.GROUP).selectAll("path.slice").data(u,(function(t){return t.data.label}));l.exit().attr("opacity",0).remove(),l.enter().append("path").classed("slice",!0).attr("opacity",0).merge(l).attr("fill",(function(t){return n.model.getFillScale()(t.data.label)})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+bn.convertValueToPercentage(t.data.value,a)+"%"})).attrTween("d",(function(t){return Td.bind(this)(t,r.arc)}));var c=Ku.appendOrSelect(i,"g.labels").attr("role",e.GROUP).selectAll("text.pie-label").data(u,(function(t){return t.data.label}));c.exit().attr("opacity",0).remove();var h=c.enter().append("text").classed("pie-label",!0),f=[];h.merge(c).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):bn.convertValueToPercentage(t.data.value,a)+"%"})).datum((function(t){var e=this.getComputedTextLength();t.textOffsetX=e/2,t.textOffsetY=parseFloat(getComputedStyle(this).fontSize)/2;var n=s+7,r=(t.endAngle-t.startAngle)/2+t.startAngle;return t.xPosition=(t.textOffsetX+n)*Math.sin(r),t.yPosition=(t.textOffsetY+n)*-Math.cos(r),t})).attr("transform",(function(t,e){var n=a.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,s=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,s=t.yPosition-o.pie.callout.offsetY,t.direction=w.RIGHT,f.push(t)):(i=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,s=t.yPosition-o.pie.callout.offsetY,t.direction=w.LEFT,f.push(t)),"translate("+i+", "+s+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(f);var d=s+o.pie.xOffset,p=s+o.pie.yOffset;f.length>0&&(p+=o.pie.yOffsetCallout),i.attr("transform","translate("+d+", "+p+")"),this.addEventListeners()},n.prototype.renderCallouts=function(t){var n=Ku.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",e.GROUP),r=this.model.getOptions(),i=n.selectAll("g.callout").data(t);i.exit().remove();var o=i.enter().append("g").classed("callout",!0).attr("role",e.GRAPHICS_SYMBOL+" "+e.GROUP).attr("aria-roledescription","label callout");o.merge(i).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===w.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-r.pie.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+r.pie.callout.horizontalLineLength),t})),o.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum((function(t){return Su(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),o.append("line").classed("horizontal-line",!0).merge(i.selectAll("line.horizontal-line")).datum((function(t){return Su(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e){t.services.events.dispatchEvent(x.Pie.SLICE_MOUSEOVER,{element:Su(this),datum:e})})).on("mousemove",(function(e){var n=Su(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(x.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(x.Pie.SLICE_CLICK,{element:Su(this),datum:e})})).on("mouseout",(function(e){var n=Su(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(x.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.computeRadius=function(){var t=this.model.getOptions(),e=Ku.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},n}(sd),Ed=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return u(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this,r=Ku.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();Ku.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(Su(this))})),Ku.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text(bn.getProperty(i,"donut","center","label"))},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=bn.getProperty(e,"donut","center","number");n||(n=this.getDataList().reduce((function(t,e){return t+e.value}),0));var r=Pi(parseInt(t.text().replace(/[, ]+/g,""),10)||0,n);return function(n){var i=e.donut.center.numberFormatter;t.text(i(r(n)))}},e}(Md),Od=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return u(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||nr.default.size).attr("height",this.configs.size||nr.default.size).attr("opacity",0)},e}(sd);function Sd(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Cd(t,e){var n,r,i,o,a,s=new Ld(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Ad);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Ld(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Pd)}function Ad(t){return t.children}function kd(t){t.data=t.data.data}function Pd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ld(t){this.data=t,this.depth=this.height=0,this.parent=null}function Dd(t){if("function"!=typeof t)throw new Error;return t}function Rd(){return 0}function jd(t){return function(){return t}}function Nd(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)}function Fd(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function Id(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}Ld.prototype=Cd.prototype={constructor:Ld,count:function(){return this.eachAfter(Sd)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Cd(this).eachBefore(kd)}};var Ud=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,l,c,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,w=y.length,x=e.value;_<w;){u=i-n,l=o-r;do{c=y[b++].value}while(!c&&b<w);for(h=f=c,v=c*c*(g=Math.max(l/u,u/l)/(x*t)),p=Math.max(f/v,v/h);b<w;++b){if(c+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=c*c*g,(d=Math.max(f/v,v/h))>p){c-=s;break}p=d}m.push(a={value:c,dice:u<l,children:y.slice(_,b)}),a.dice?Fd(a,n,r,i,x?r+=l*c/x:o):Id(a,n,r,x?n+=u*c/x:i,o),x-=c,_=b}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Bd(){var t=Ud,e=!1,n=1,r=1,i=[0],o=Rd,a=Rd,s=Rd,u=Rd,l=Rd;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Nd),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<c&&(c=f=(c+f)/2),e.x0=r,e.y0=c,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=o(e)/2,r+=l(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<c&&(c=f=(c+f)/2),t(e,r,c,h,f))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=Dd(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:jd(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:jd(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:jd(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:jd(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:jd(+t),c):l},c}var Vd=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===_.ROW_REVERSE||a.configs.direction===_.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return u(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){var e=bn.getProperty(t,"data","growth","x");return e===b.PREFERRED||e===b.FIXED})).each((function(t){e+=t.data.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){return bn.getProperty(t,"data","growth","x")===b.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Ku.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=Cd({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===_.ROW||this.configs.direction===_.ROW_REVERSE?Fd:Id;Bd().tile(s).size([i,o])(a);var u=this.configs.direction===_.ROW||this.configs.direction===_.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));l.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),l.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(Su(n));var i=bn.getProperty(e,"data","growth","x");i!==b.PREFERRED&&i!==b.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=bn.getProperty(t,"data","growth","x"),n=Ku.getSVGElementSize(Su(this),{useBBox:!0});if(e===b.PREFERRED){var r=u?n.width:n.height,a=u?i:o;t.data.size=r/a*100}})),l.exit().remove(),this.children.filter((function(t){return bn.getProperty(t,"growth","x")===b.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=Cd({children:this.children}).sum((function(t){return t.size})),Bd().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){bn.getProperty(e,"data","growth","x")===b.STRETCH&&n.render(t)}))}))},e.prototype.setModel=function(e){t.prototype.setModel.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setModel(e)}))}))},e.prototype.setServices=function(e){t.prototype.setServices.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setServices(e)}))}))},e.prototype.destroy=function(){this.children.forEach((function(t){t.components.forEach((function(t){return t.destroy()}))}))},e.instanceID=Math.floor(99999999999*Math.random()),e}(sd),Hd=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function zd(t,e,n,r){var i=0===e,o=2===Number(Mh(new Date(t),"c")),a=1===Number(Mh(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||Yd(t)||qd(t)||Xd(t);case"daily":return r?i||o||Xd(t):i||qd(t)||Xd(t);case"monthly":return i||Xd(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function Gd(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Wd(t){return 1===t.length?"15seconds":function(t){var e=Hd.reduce((function(e,n,r){n[0];var i=n[1];return Math.abs(e-t)<Math.abs(i-t)?e:r}),0);return Hd[e][0]}(Fr(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function Yd(t){var e=Gd(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function qd(t){var e=Gd(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function Xd(t){var e=Gd(t),n=e.M,r=e.d,i=e.s,o=e.m,a=e.H;return 1===n&&1===r&&0===a&&0===o&&0===i}var $d=Array.prototype.slice;function Qd(t){return t}function Zd(t){return"translate("+(t+.5)+",0)"}function Jd(t){return"translate(0,"+(t+.5)+")"}function Kd(t){return function(e){return+t(e)}}function tp(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function ep(){return!this.__axis}function np(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?Zd:Jd;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Qd:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?tp:Kd)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(f,e).order(),x=w.exit(),T=w.enter().append("g").attr("class","tick"),M=w.select("line"),E=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(T),M=M.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),E=E.merge(T.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),w=w.transition(h),M=M.transition(h),E=E.transition(h),x=x.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),T.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:y(t))}))),x.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),w.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),M.attr(l+"2",u*o),E.attr(l,u*p).text(d),_.filter(ep).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=$d.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:$d.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:$d.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function rp(t){return np(1,t)}function ip(t){return np(2,t)}function op(t){return np(3,t)}function ap(t){return np(4,t)}var sp=function(t){function n(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",r&&(i.configs=r),i.margins=i.configs.margins,i}return u(n,t),n.prototype.render=function(t){void 0===t&&(t=!0);var n,r,i=this.configs.position,o=this.model.getOptions(),a=bn.getProperty(o,"axes",i),s=bn.getProperty(a,"ticks","number"),u=null!==s,l=i===h.LEFT||i===h.RIGHT,c=bn.getProperty(o,"timeScale"),f=this.getContainerSVG(),d=Ku.getSVGElementSize(this.parent,{useAttrs:!0}),g=d.width,v=d.height;i===h.BOTTOM||i===h.TOP?(n=this.configs.axes[h.LEFT]?this.margins.left:0,r=this.configs.axes[h.RIGHT]?g-this.margins.right:g):(n=v-this.margins.bottom,r=this.margins.top);var m,y=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===p.LABELS?y.rangeRound([n,r]):y.range([n,r]),i){case h.LEFT:m=ap;break;case h.BOTTOM:m=op;break;case h.RIGHT:m=ip;break;case h.TOP:m=rp}var _=Ku.appendOrSelect(f,"g.axis."+i),b=!_.select("g.ticks").empty(),w=Ku.appendOrSelect(_,"g.ticks");b||w.attr("role",e.GRAPHICS_OBJECT+" "+e.GROUP);var x=Ku.appendOrSelect(_,"g.ticks.invisible").style("opacity","0").attr("aria-hidden",!0),T=Ku.appendOrSelect(x,"g.tick"),M=Ku.appendOrSelect(T,"text").text("0"),E=Ku.getSVGElementSize(M.node(),{useBBox:!0}).height;T.remove();var O=this.scaleType===p.TIME||a.scaleType===p.TIME,S=m(y).tickSizeOuter(0);if(y.ticks){var C=void 0;if(u?C=s:(C=er.ticks.number,l&&(C=this.getNumberOfFittingTicks(v,E,2.5))),S.ticks(C),O){var A=y.ticks(C).concat(y.domain()).map((function(t){return+t})).sort();A=bn.removeArrayDuplicates(A),bn.getProperty(o,"timeScale","addSpaceOnEdges")&&A.length>2&&(A.splice(A.length-1,1),A.splice(0,1)),S.tickValues(A)}var k=void 0;if(O){var P=Wd(S.tickValues());k=function(t,e){return function(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=bn.getProperty(r,"timeIntervalFormats")[o],u=bn.getProperty(s,"primary"),l=bn.getProperty(s,"secondary");return Mh(a,zd(t,e,n,i)?u:l,{locale:r.localeObject})}(t,e,P,c)}}else k=bn.getProperty(a,"ticks","formatter");S.tickFormat(k)}switch(i){case h.LEFT:w.attr("transform","translate("+this.margins.left+", 0)");break;case h.BOTTOM:w.attr("transform","translate(0, "+(v-this.margins.bottom)+")");break;case h.RIGHT:w.attr("transform","translate("+(g-this.margins.right)+", 0)");break;case h.TOP:w.attr("transform","translate(0, "+this.margins.top+")")}if(a.title){var L=Ku.appendOrSelect(_,"text.axis-title").text(a.title);switch(i){case h.LEFT:L.attr("transform","rotate(-90)").attr("y",0).attr("x",-y.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case h.BOTTOM:L.attr("transform","translate("+(this.margins.left/2+y.range()[1]/2)+", "+v+")").style("text-anchor","middle");break;case h.RIGHT:L.attr("transform","rotate(90)").attr("y",-g).attr("x",y.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case h.TOP:var D=Ku.getSVGElementSize(L,{useBBox:!0}).height;L.attr("transform","translate("+(this.margins.left/2+y.range()[1]/2)+", "+D/2+")").style("text-anchor","middle")}}if(O){var R=Wd(S.tickValues()),j=c.showDayName,N=w;t&&(w=w.transition(this.services.transitions.getTransition("axis-update",t))),w=w.call(S),N.selectAll(".tick").data(S.tickValues(),y).order().select("text").style("font-weight",(function(t,e){return zd(t,e,R,j)?"bold":"normal"}))}else w=t&&b?w.transition(this.services.transitions.getTransition("axis-update")).call(S):w.call(S);if(x.call(S),i===h.BOTTOM||i===h.TOP){var F=!1;if(y.step){F=x.selectAll("g.tick text").nodes().some((function(t){return Ku.getSVGElementSize(t,{useBBox:!0}).width>=y.step()}))}else{var I=bn.getProperty(a,"ticks","rotateIfSmallerThan")||er.ticks.rotateIfSmallerThan;F=g/(O?S.tickValues().length:y.ticks().length)/2<I}F?(u||(S.ticks(this.getNumberOfFittingTicks(g,E,3.5)),x.call(S),w.call(S)),_.selectAll("g.ticks g.tick text").attr("transform","rotate(45)").style("text-anchor",i===h.TOP?"end":"start")):_.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=Ku.appendOrSelect(t,"g.axis."+e),r=this;n.selectAll("g.tick text").on("mouseover",(function(t){r.services.events.dispatchEvent(x.Axis.LABEL_MOUSEOVER,{element:Su(this),datum:t})})).on("mousemove",(function(t){r.services.events.dispatchEvent(x.Axis.LABEL_MOUSEMOVE,{element:Su(this),datum:t})})).on("click",(function(t){r.services.events.dispatchEvent(x.Axis.LABEL_CLICK,{element:Su(this),datum:t})})).on("mouseout",(function(t){r.services.events.dispatchEvent(x.Axis.LABEL_MOUSEOUT,{element:Su(this),datum:t})}))},n.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},n.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},n.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return bn.clamp(r,2,er.ticks.number)},n.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;Ku.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},n}(sd),up=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.children={},e.margins={top:0,right:0,bottom:0,left:0},e}return u(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(h),i=bn.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[h[t]]&&(n[h[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=h[t];if(e.configs.axes[n]&&!e.children[n]){var r=new sp(e.model,e.services,{position:n,axes:e.configs.axes,margins:e.margins});r.setModel(e.model),r.setServices(e.services),r.setParent(e.parent),e.children[n]=r}})),Object.keys(this.children).forEach((function(n){e.children[n].render(t)}));var o={};Object.keys(this.children).forEach((function(t){var n,r=e.children[t],i=r.configs.position,a=r.getInvisibleAxisRef(),s=Ku.getSVGElementSize(a,{useBBox:!0}),u=s.width,l=s.height;switch(n=r.getTitleRef().empty()?0:Ku.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i){case h.TOP:o.top=l+n;break;case h.BOTTOM:o.bottom=l+n;break;case h.LEFT:o.left=u+n;break;case h.RIGHT:o.right=u+n}})),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(sd),lp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return u(e,t),e.prototype.render=function(){this.drawBackdrop(),Ku.appendOrSelect(this.backdrop,"g.x.grid"),Ku.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(),this.drawYGrid(),bn.getProperty(this.model.getOptions(),"tooltip","gridline","enabled")&&this.addGridEventListeners()},e.prototype.drawXGrid=function(){var t=this.parent,e=this.backdrop.attr("height"),n=op(this.services.cartesianScales.getMainXScale()).tickSizeInner(-e).tickSizeOuter(0),r=bn.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");n.ticks(r);var i=t.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+e+")").call(n);this.cleanGrid(i)},e.prototype.drawYGrid=function(){var t=this.parent,e=this.backdrop.attr("width"),n=ap(this.services.cartesianScales.getMainYScale()).tickSizeInner(-e).tickSizeOuter(0),r=bn.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");n.ticks(r);var i=t.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")").call(n);this.cleanGrid(i)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(bn.getTranslationValues(t).tx)-Number(bn.getTranslationValues(e).tx)})),i=-1;r.forEach((function(e,n){t[0]>=+bn.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var o,a=r[i],s=r[e];if(a)if(s)o=+bn.getTranslationValues(s).tx-+bn.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=Ku.getSVGElementSize(u).width-+bn.getTranslationValues(a).tx}else o=+bn.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold},e.prototype.getActiveGridline=function(t){var e=bn.getProperty(this.model.getOptions,"tooltip","gridline","threshold")?bn.getProperty(this.model.getOptions,"tooltip","gridline","threshold"):this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var n=bn.getTranslationValues(this),r=Number(n.tx)-e,i=Number(n.tx)+e;return r<=t[0]&&t[0]<=i}))},e.prototype.addGridEventListeners=function(){var t=this,e=this.parent;Ku.appendOrSelect(e,"rect.chart-grid-backdrop").on("mousemove mouseover",(function(){var n=Au(t.services.domUtils.getMainSVG()),r=Su(this);e.selectAll(".x.grid .tick").classed("active",!1);var i,o=t.getActiveGridline(n);o.empty()?t.services.events.dispatchEvent("hide-tooltip",{}):(o.classed("active",!0),o.each((function(e){i=t.services.cartesianScales.getDataFromDomain(e)})),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:r,multidata:i,type:v.GRIDLINE}))})).on("mouseout",(function(){e.selectAll(".x.grid .tick").classed("active",!1),t.services.events.dispatchEvent("hide-tooltip",{})}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=Ku.appendOrSelect(t,"svg.chart-grid-backdrop");var l=Ku.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(l).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),l.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(sd),cp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return u(e,t),e.prototype.render=function(t){var e=this.getContainerSVG(),n=this.services.cartesianScales.getDomainScale().range(),r=n[0],i=n[1],o=+this.services.cartesianScales.getRangeValue(0)+.5,a=bn.flipSVGCoordinatesBasedOnOrientation({x0:r,x1:i,y0:o,y1:o},this.services.cartesianScales.getOrientation());Ku.appendOrSelect(e,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",a.y0).attr("y2",a.y1).attr("x1",a.x0).attr("x2",a.x1)},e}(sd),hp=function(){function t(t,e){this.services={domUtils:Ku,events:tl,transitions:cc},this.model=new vs(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},!0),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener("model-update",(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener("chart-resize",(function(){n.update(!1)})),this.components=this.getComponents(),this.update()},t.prototype.getComponents=function(){return console.error("getComponents() method is not implemented"),null},t.prototype.update=function(t){var e=this;if(void 0===t&&(t=!0),this.components){Object.keys(this.services).forEach((function(t){e.services[t].update()})),this.components.forEach((function(e){return e.render(t)}));var n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map((function(t){return n[t].end().catch((function(t){return t}))}));Promise.all(r).then((function(){return e.services.events.dispatchEvent("render-finished")}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},!0)},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new ld(this.model,this.services)],growth:{x:b.PREFERRED,y:b.FIXED}},n={id:"legend",components:[new ud(this.model,this.services)],growth:{x:b.PREFERRED,y:b.FIXED}},r={id:"graph-frame",components:t,growth:{x:b.STRETCH,y:b.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=_.COLUMN;if(i){var a=bn.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=_.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):"right"===a?(o=_.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):"bottom"===a&&(o=_.COLUMN_REVERSE)}var s={id:"spacer",components:[new Od(this.model,this.services)],growth:{x:b.PREFERRED,y:b.FIXED}},u={id:"full-frame",components:[new Vd(this.model,this.services,l(i?[n]:[],[s,r]),{direction:o})],growth:{x:b.STRETCH,y:b.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var h={id:"spacer",components:[new Od(this.model,this.services)],growth:{x:b.PREFERRED,y:b.FIXED}};c.push(h)}return c.push(u),[new Vd(this.model,this.services,c,{direction:_.COLUMN})]},t}(),fp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Lh,curves:ad}),r}return u(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new ld(this.model,this.services)],growth:{x:b.PREFERRED,y:b.FIXED}},n={id:"legend",components:[new ud(this.model,this.services)],growth:{x:b.PREFERRED,y:b.FIXED}},r={id:"graph-frame",components:t,growth:{x:b.STRETCH,y:b.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=_.COLUMN;if(i){var a=bn.getProperty(this.model.getOptions(),"legend","position");a===m.LEFT?(o=_.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):a===m.RIGHT?(o=_.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):a===m.BOTTOM&&(o=_.COLUMN_REVERSE)}var s={id:"spacer",components:[new Od(this.model,this.services)],growth:{x:b.PREFERRED,y:b.FIXED}},u={id:"full-frame",components:[new Vd(this.model,this.services,l(i?[n]:[],[s,r]),{direction:o})],growth:{x:b.STRETCH,y:b.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var h={id:"spacer",components:[new Od(this.model,this.services)],growth:{x:b.PREFERRED,y:b.FIXED}};c.push(h)}return c.push(u),[new Vd(this.model,this.services,c,{direction:_.COLUMN})]},e}(hp),dp=function(t){function e(e){return t.call(this,e)||this}return u(e,t),e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=Nn.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=Nn.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=bn.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=qr().range(t.fillColors).domain(this.allDataLabels);else{var e=Mr;this.colorScale=qr().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(vs),pp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new dp(r.services),r.model.setOptions(bn.mergeDefaultChartOptions(Jn.simpleBarChart,n.options)),r.init(e,n),r}return u(e,t),e.prototype.getComponents=function(){var t=[new up(this.model,this.services),new lp(this.model,this.services),new md(this.model,this.services),new cp(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new pd(this.model,this.services)),e},e}(fp),gp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(bn.mergeDefaultChartOptions(Jn.groupedBarChart,n.options)),r.init(e,n),r}return u(e,t),e.prototype.getComponents=function(){var t=[new up(this.model,this.services),new lp(this.model,this.services),new yd(this.model,this.services),new cp(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new pd(this.model,this.services)),e},e}(fp),vp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(bn.mergeDefaultChartOptions(Jn.stackedBarChart,n.options)),r.init(e,n),r}return u(e,t),e.prototype.getComponents=function(){var t=[new up(this.model,this.services),new lp(this.model,this.services),new _d(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new pd(this.model,this.services)),e},e}(fp),mp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(bn.mergeDefaultChartOptions(Jn.bubbleChart,n.options)),r.init(e,n),r}return u(e,t),e.prototype.getComponents=function(){var t=[new up(this.model,this.services),new lp(this.model,this.services),new wd(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new gd(this.model,this.services)),e},e}(fp),yp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(bn.mergeDefaultChartOptions(Jn.lineChart,n.options)),r.init(e,n),r}return u(e,t),e.prototype.getComponents=function(){var t=[new up(this.model,this.services),new lp(this.model,this.services),new xd(this.model,this.services),new bd(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new gd(this.model,this.services)),e},e}(fp),_p=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(bn.mergeDefaultChartOptions(Jn.scatterChart,n.options)),r.init(e,n),r}return u(e,t),e.prototype.getComponents=function(){var t=[new up(this.model,this.services),new lp(this.model,this.services),new bd(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new gd(this.model,this.services)),e},e}(fp),bp=function(t){function e(e){return t.call(this,e)||this}return u(e,t),e.prototype.sanitize=function(t){var e=bn.getProperty(t,"datasets",0);if(e){var n=t.labels.map((function(t,n){return{label:t,value:e.data[n],fillColor:e.fillColors?e.fillColors[n]:void 0}})).sort((function(t,e){return e.value-t.value}));e.data=n.map((function(t){return t.value})),t.labels=n.map((function(t){return t.label})),e.fillColors&&(e.fillColors=n.map((function(t){return t.fillColor})))}return t},e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=Nn.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=Nn.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=bn.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.toggleDataLabel=function(t){var e=Nn.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=qr().range(t.fillColors).domain(this.allDataLabels);else{var e=Mr;this.colorScale=qr().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(vs),wp=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new bp(i.services),r?i:(i.model.setOptions(bn.mergeDefaultChartOptions(Jn.pieChart,n.options)),i.init(e,n),i)}return u(e,t),e.prototype.getComponents=function(){var t=[new Md(this.model,this.services)],e=this.getChartComponents(t);return e.push(new dd(this.model,this.services)),e},e}(hp),xp=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(bn.mergeDefaultChartOptions(Jn.donutChart,n.options)),r.init(e,n),r}return u(e,t),e.prototype.getComponents=function(){var t=[new Ed(this.model,this.services)],e=this.getChartComponents(t);return e.push(new dd(this.model,this.services)),e},e}(wp),Tp=Mr;t.BubbleChart=mp,t.DonutChart=xp,t.GroupedBarChart=gp,t.LineChart=yp,t.PieChart=wp,t.ScatterChart=_p,t.SimpleBarChart=pp,t.StackedBarChart=vp,t.colorPalettes=Er,t.configurations=rr,t.defaultColors=Tp,t.interfaces=T,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var e,n,r,i,o,a,s,u,c,l,h=function(t,e){return(h=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 f(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function d(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group"}(e||(e={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize"}(n||(n={})),function(t){t.UPDATE="model-update"}(r||(r={})),function(t){t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout"}(i||(i={})),function(t){t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout"}(o||(o={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(a||(a={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(s||(s={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(u||(u={})),function(t){t.SHOW="show-tooltip",t.HIDE="hide-tooltip"}(c||(c={})),function(t){t.ITEM_HOVER="legend-item-onhover",t.ITEM_CLICK="legend-item-onclick",t.ITEM_MOUSEOUT="legend-item-onmouseout",t.ITEMS_UPDATE="legend-items-update"}(l||(l={}));var p,g,v,m,y,_,b,w,x,T,M,E=Object.freeze({__proto__:null,get Chart(){return n},get Model(){return r},get Axis(){return i},get Pie(){return o},get Bar(){return a},get Scatter(){return s},get Line(){return u},get Tooltip(){return c},get Legend(){return l}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(p||(p={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(g||(g={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(v||(v={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(m||(m={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(y||(y={})),function(t){t.DATAPOINT="datapoint",t.GRIDLINE="gridline",t.TITLE="title"}(_||(_={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(b||(b={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(w||(w={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(x||(x={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(T||(T={})),function(t){t.LEFT="left",t.RIGHT="right"}(M||(M={}));var O=Object.freeze({__proto__:null,get Roles(){return e},Events:E,get ChartTheme(){return p},get AxisPositions(){return g},get CartesianOrientations(){return v},get ScaleTypes(){return m},get TooltipPosition(){return y},get TooltipTypes(){return _},get LegendPositions(){return b},get LegendOrientations(){return w},get LayoutDirection(){return x},get LayoutGrowth(){return T},get CalloutDirections(){return M}}),S="object"==typeof global&&global&&global.Object===Object&&global,A="object"==typeof self&&self&&self.Object===Object&&self,C=S||A||Function("return this")(),P=C.Symbol,k=Object.prototype,D=k.hasOwnProperty,L=k.toString,R=P?P.toStringTag:void 0;var I=Object.prototype.toString;var j=P?P.toStringTag:void 0;function N(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":j&&j in Object(t)?function(t){var e=D.call(t,R),n=t[R];try{t[R]=void 0;var r=!0}catch(t){}var i=L.call(t);return r&&(e?t[R]=n:delete t[R]),i}(t):function(t){return I.call(t)}(t)}function U(t){return null!=t&&"object"==typeof t}var F=Array.isArray;function H(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var V=/^\s+|\s+$/g,B=/^[-+]0x[0-9a-f]+$/i,G=/^0b[01]+$/i,z=/^0o[0-7]+$/i,W=parseInt;function Y(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||U(t)&&"[object Symbol]"==N(t)}(t))return NaN;if(H(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=H(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(V,"");var n=G.test(t);return n||z.test(t)?W(t.slice(2),n?2:8):B.test(t)?NaN:+t}function q(t){return t}function X(t){if(!H(t))return!1;var e=N(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var $,Q=C["__core-js_shared__"],Z=($=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"";var J=Function.prototype.toString;function K(t){if(null!=t){try{return J.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var tt=/^\[object .+?Constructor\]$/,et=Function.prototype,nt=Object.prototype,rt=et.toString,it=nt.hasOwnProperty,ot=RegExp("^"+rt.call(it).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function at(t){return!(!H(t)||(e=t,Z&&Z in e))&&(X(t)?ot:tt).test(K(t));var e}function st(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return at(n)?n:void 0}var ut=st(C,"WeakMap"),ct=Object.create,lt=function(){function t(){}return function(e){if(!H(e))return{};if(ct)return ct(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function ht(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ft(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var dt=Date.now;var pt=function(){try{var t=st(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),gt=function(t){var e=0,n=0;return function(){var r=dt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(pt?function(t,e){return pt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:q);function vt(t){return t!=t}function mt(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,vt,n)}(t,e,0)>-1}var yt=/^(?:0|[1-9]\d*)$/;function _t(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function bt(t,e,n){"__proto__"==e&&pt?pt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function wt(t,e){return t===e||t!=t&&e!=e}var xt=Object.prototype.hasOwnProperty;function Tt(t,e,n){var r=t[e];xt.call(t,e)&&wt(r,n)&&(void 0!==n||e in t)||bt(t,e,n)}function Mt(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?bt(n,s,u):Tt(n,s,u)}return n}var Et=Math.max;function Ot(t,e){return gt(function(t,e,n){return e=Et(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Et(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),ht(t,this,s)}}(t,e,q),t+"")}function St(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function At(t){return null!=t&&St(t.length)&&!X(t)}var Ct=Object.prototype;function Pt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ct)}function kt(t){return U(t)&&"[object Arguments]"==N(t)}var Dt=Object.prototype,Lt=Dt.hasOwnProperty,Rt=Dt.propertyIsEnumerable,It=kt(function(){return arguments}())?kt:function(t){return U(t)&&Lt.call(t,"callee")&&!Rt.call(t,"callee")};var jt="object"==typeof t&&t&&!t.nodeType&&t,Nt=jt&&"object"==typeof module&&module&&!module.nodeType&&module,Ut=Nt&&Nt.exports===jt?C.Buffer:void 0,Ft=(Ut?Ut.isBuffer:void 0)||function(){return!1},Ht={};function Vt(t){return function(e){return t(e)}}Ht["[object Float32Array]"]=Ht["[object Float64Array]"]=Ht["[object Int8Array]"]=Ht["[object Int16Array]"]=Ht["[object Int32Array]"]=Ht["[object Uint8Array]"]=Ht["[object Uint8ClampedArray]"]=Ht["[object Uint16Array]"]=Ht["[object Uint32Array]"]=!0,Ht["[object Arguments]"]=Ht["[object Array]"]=Ht["[object ArrayBuffer]"]=Ht["[object Boolean]"]=Ht["[object DataView]"]=Ht["[object Date]"]=Ht["[object Error]"]=Ht["[object Function]"]=Ht["[object Map]"]=Ht["[object Number]"]=Ht["[object Object]"]=Ht["[object RegExp]"]=Ht["[object Set]"]=Ht["[object String]"]=Ht["[object WeakMap]"]=!1;var Bt="object"==typeof t&&t&&!t.nodeType&&t,Gt=Bt&&"object"==typeof module&&module&&!module.nodeType&&module,zt=Gt&&Gt.exports===Bt&&S.process,Wt=function(){try{var t=Gt&&Gt.require&&Gt.require("util").types;return t||zt&&zt.binding&&zt.binding("util")}catch(t){}}(),Yt=Wt&&Wt.isTypedArray,qt=Yt?Vt(Yt):function(t){return U(t)&&St(t.length)&&!!Ht[N(t)]},Xt=Object.prototype.hasOwnProperty;function $t(t,e){var n=F(t),r=!n&&It(t),i=!n&&!r&&Ft(t),o=!n&&!r&&!i&&qt(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var c in t)!e&&!Xt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_t(c,u))||s.push(c);return s}function Qt(t,e){return function(n){return t(e(n))}}var Zt=Qt(Object.keys,Object),Jt=Object.prototype.hasOwnProperty;function Kt(t){return At(t)?$t(t):function(t){if(!Pt(t))return Zt(t);var e=[];for(var n in Object(t))Jt.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var te=Object.prototype.hasOwnProperty;function ee(t){if(!H(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Pt(t),n=[];for(var r in t)("constructor"!=r||!e&&te.call(t,r))&&n.push(r);return n}function ne(t){return At(t)?$t(t,!0):ee(t)}var re=st(Object,"create");var ie=Object.prototype.hasOwnProperty;var oe=Object.prototype.hasOwnProperty;function ae(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function se(t,e){for(var n=t.length;n--;)if(wt(t[n][0],e))return n;return-1}ae.prototype.clear=function(){this.__data__=re?re(null):{},this.size=0},ae.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ae.prototype.get=function(t){var e=this.__data__;if(re){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ie.call(e,t)?e[t]:void 0},ae.prototype.has=function(t){var e=this.__data__;return re?void 0!==e[t]:oe.call(e,t)},ae.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=re&&void 0===e?"__lodash_hash_undefined__":e,this};var ue=Array.prototype.splice;function ce(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ce.prototype.clear=function(){this.__data__=[],this.size=0},ce.prototype.delete=function(t){var e=this.__data__,n=se(e,t);return!(n<0)&&(n==e.length-1?e.pop():ue.call(e,n,1),--this.size,!0)},ce.prototype.get=function(t){var e=this.__data__,n=se(e,t);return n<0?void 0:e[n][1]},ce.prototype.has=function(t){return se(this.__data__,t)>-1},ce.prototype.set=function(t,e){var n=this.__data__,r=se(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var le=st(C,"Map");function he(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function fe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function de(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}fe.prototype.clear=function(){this.size=0,this.__data__={hash:new ae,map:new(le||ce),string:new ae}},fe.prototype.delete=function(t){var e=he(this,t).delete(t);return this.size-=e?1:0,e},fe.prototype.get=function(t){return he(this,t).get(t)},fe.prototype.has=function(t){return he(this,t).has(t)},fe.prototype.set=function(t,e){var n=he(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var pe=Qt(Object.getPrototypeOf,Object),ge=Function.prototype,ve=Object.prototype,me=ge.toString,ye=ve.hasOwnProperty,_e=me.call(Object);function be(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=Y(n))==n?n:0),void 0!==e&&(e=(e=Y(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(Y(t),e,n)}function we(t){var e=this.__data__=new ce(t);this.size=e.size}we.prototype.clear=function(){this.__data__=new ce,this.size=0},we.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},we.prototype.get=function(t){return this.__data__.get(t)},we.prototype.has=function(t){return this.__data__.has(t)},we.prototype.set=function(t,e){var n=this.__data__;if(n instanceof ce){var r=n.__data__;if(!le||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new fe(r)}return n.set(t,e),this.size=n.size,this};var xe="object"==typeof t&&t&&!t.nodeType&&t,Te=xe&&"object"==typeof module&&module&&!module.nodeType&&module,Me=Te&&Te.exports===xe?C.Buffer:void 0,Ee=Me?Me.allocUnsafe:void 0;function Oe(t,e){if(e)return t.slice();var n=t.length,r=Ee?Ee(n):new t.constructor(n);return t.copy(r),r}function Se(){return[]}var Ae=Object.prototype.propertyIsEnumerable,Ce=Object.getOwnPropertySymbols,Pe=Ce?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Ce(t),(function(e){return Ae.call(t,e)})))}:Se;var ke=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)de(e,Pe(t)),t=pe(t);return e}:Se;function De(t,e,n){var r=e(t);return F(t)?r:de(r,n(t))}function Le(t){return De(t,Kt,Pe)}function Re(t){return De(t,ne,ke)}var Ie=st(C,"DataView"),je=st(C,"Promise"),Ne=st(C,"Set"),Ue=K(Ie),Fe=K(le),He=K(je),Ve=K(Ne),Be=K(ut),Ge=N;(Ie&&"[object DataView]"!=Ge(new Ie(new ArrayBuffer(1)))||le&&"[object Map]"!=Ge(new le)||je&&"[object Promise]"!=Ge(je.resolve())||Ne&&"[object Set]"!=Ge(new Ne)||ut&&"[object WeakMap]"!=Ge(new ut))&&(Ge=function(t){var e=N(t),n="[object Object]"==e?t.constructor:void 0,r=n?K(n):"";if(r)switch(r){case Ue:return"[object DataView]";case Fe:return"[object Map]";case He:return"[object Promise]";case Ve:return"[object Set]";case Be:return"[object WeakMap]"}return e});var ze=Ge,We=Object.prototype.hasOwnProperty;var Ye=C.Uint8Array;function qe(t){var e=new t.constructor(t.byteLength);return new Ye(e).set(new Ye(t)),e}var Xe=/\w*$/;var $e=P?P.prototype:void 0,Qe=$e?$e.valueOf:void 0;function Ze(t,e){var n=e?qe(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Je(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return qe(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?qe(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ze(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,Xe.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,Qe?Object(Qe.call(r)):{}}}function Ke(t){return"function"!=typeof t.constructor||Pt(t)?{}:lt(pe(t))}var tn=Wt&&Wt.isMap,en=tn?Vt(tn):function(t){return U(t)&&"[object Map]"==ze(t)};var nn=Wt&&Wt.isSet,rn=nn?Vt(nn):function(t){return U(t)&&"[object Set]"==ze(t)},on={};function an(t,e,n,r,i,o){var a,s=1&e,u=2&e,c=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!H(t))return t;var l=F(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&We.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return ft(t,a)}else{var h=ze(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(Ft(t))return Oe(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:Ke(t),!s)return u?function(t,e){return Mt(t,ke(t),e)}(t,function(t,e){return t&&Mt(e,ne(e),t)}(a,t)):function(t,e){return Mt(t,Pe(t),e)}(t,function(t,e){return t&&Mt(e,Kt(e),t)}(a,t))}else{if(!on[h])return i?t:{};a=Je(t,h,s)}}o||(o=new we);var d=o.get(t);if(d)return d;o.set(t,a),rn(t)?t.forEach((function(r){a.add(an(r,e,n,r,t,o))})):en(t)&&t.forEach((function(r,i){a.set(i,an(r,e,n,i,t,o))}));var p=c?u?Re:Le:u?keysIn:Kt,g=l?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),Tt(a,i,an(r,e,n,i,t,o))})),a}on["[object Arguments]"]=on["[object Array]"]=on["[object ArrayBuffer]"]=on["[object DataView]"]=on["[object Boolean]"]=on["[object Date]"]=on["[object Float32Array]"]=on["[object Float64Array]"]=on["[object Int8Array]"]=on["[object Int16Array]"]=on["[object Int32Array]"]=on["[object Map]"]=on["[object Number]"]=on["[object Object]"]=on["[object RegExp]"]=on["[object Set]"]=on["[object String]"]=on["[object Symbol]"]=on["[object Uint8Array]"]=on["[object Uint8ClampedArray]"]=on["[object Uint16Array]"]=on["[object Uint32Array]"]=!0,on["[object Error]"]=on["[object Function]"]=on["[object WeakMap]"]=!1;function sn(t){return an(t,5)}function un(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new fe;++e<n;)this.add(t[e])}function cn(t,e){return t.has(e)}function ln(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}un.prototype.add=un.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},un.prototype.has=function(t){return this.__data__.has(t)};var hn,fn=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[hn?a:++r];if(!1===e(i[s],s,i))break}return t},dn=function(){return C.Date.now()},pn=Math.max,gn=Math.min;function vn(t,e,n){var r,i,o,a,s,u,c=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function p(t){return c=t,s=setTimeout(v,e),l?d(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=o}function v(){var t=dn();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?gn(n,o-(t-c)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,a)}function y(){var t=dn(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(v,e),d(u)}return void 0===s&&(s=setTimeout(v,e)),a}return e=Y(e)||0,H(n)&&(l=!!n.leading,o=(h="maxWait"in n)?pn(Y(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(dn())},y}function mn(t,e,n){(void 0===n||wt(t[e],n))&&(void 0!==n||e in t)||bt(t,e,n)}function yn(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function _n(t,e,n,r,i,o,a){var s=yn(t,n),u=yn(e,n),c=a.get(u);if(c)mn(t,n,c);else{var l,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=F(u),p=!d&&Ft(u),g=!d&&!p&&qt(u);h=u,d||p||g?F(s)?h=s:U(l=s)&&At(l)?h=ft(s):p?(f=!1,h=Oe(u,!0)):g?(f=!1,h=Ze(u,!0)):h=[]:function(t){if(!U(t)||"[object Object]"!=N(t))return!1;var e=pe(t);if(null===e)return!0;var n=ye.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&me.call(n)==_e}(u)||It(u)?(h=s,It(s)?h=function(t){return Mt(t,ne(t))}(s):H(s)&&!X(s)||(h=Ke(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),mn(t,n,h)}}function bn(t,e,n,r,i){t!==e&&fn(e,(function(o,a){if(i||(i=new we),H(o))_n(t,e,a,n,bn,r,i);else{var s=r?r(yn(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),mn(t,a,s)}}),ne)}function wn(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}var xn,Tn,Mn=(xn=function(t,e,n){bn(t,e,n)},Ot((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=xn.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!H(n))return!1;var r=typeof e;return!!("number"==r?At(n)&&_t(e,n.length):"string"==r&&e in n)&&wt(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&xn(t,a,n,i)}return t}))),En=Ne&&1/ln(new Ne([,-0]))[1]==1/0?function(t){return new Ne(t)}:function(){};function On(t){return t&&t.length?function(t,e,n){var r=-1,i=mt,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=wn;else if(o>=200){var c=e?null:En(t);if(c)return ln(c);a=!1,i=cn,u=new un}else u=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}(t):[]}function Sn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function An(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){t.debounce=vn,t.clone=sn,t.merge=Mn,t.removeArrayDuplicates=On,t.clamp=be,t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)if(r.includes(i)){var o=n.axes[i];(o.primary||o.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var a=o.mapsTo;if(null==a){var s=o.scaleType;null==s?o.mapsTo="value":s===m.TIME?o.mapsTo="date":s===m.LABELS&&(o.mapsTo="key")}}else delete e.axes[i];return t.merge(e,n)},t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null},t.getTranformOffsets=function(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n<1?n.toPrecision(1):Math.floor(n)},t.arrayDifferences=function(t,e){var n={missing:[],added:[]};return t.forEach((function(t){-1===e.indexOf(t)&&n.missing.push(t)})),e.forEach((function(e){-1===t.indexOf(e)&&n.added.push(e)})),n},t.getDuplicateValues=function(t){var e=[],n=[];return t.forEach((function(t){-1!==e.indexOf(t)&&-1===n.indexOf(t)&&n.push(t),e.push(t)})),n},t.moveToFront=function(t){return t.each((function(){this.parentNode.appendChild(this)}))},t.getProperty=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t;if(r){for(var i=0,o=e;i<o.length;i++){var a=o[i];if(null===r[a]||void 0===r[a])return null;r=r[a]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===v.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t},t.generateSVGPathString=function(e,n){var r=t.flipSVGCoordinatesBasedOnOrientation(e,n),i=r.x0,o=r.x1,a=r.y0,s=r.y1;return"M"+i+","+a+"L"+i+","+s+"L"+o+","+s+"L"+o+","+a+"L"+i+","+a}}(Tn||(Tn={}));var Cn=An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var i;r=r||{},i="string"==typeof n[t]?n[t]:1===e?n[t].one:n[t].other.replace("{{count}}",e);if(r.addSuffix)return r.comparison>0?"in "+i:i+" ago";return i};var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};t.exports=e.default}));Sn(Cn);var Pn=An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}},t.exports=e.default}));Sn(Pn);var kn=An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Pn)&&n.__esModule?n:{default:n};var i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.default=i,t.exports=e.default}));Sn(kn);var Dn=An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,i){return n[t]};var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};t.exports=e.default}));Sn(Dn);var Ln=An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));Sn(Ln);var Rn=An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ln)&&n.__esModule?n:{default:n};var i={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};e.default=i,t.exports=e.default}));Sn(Rn);var In=An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=r.match(t.matchPattern);if(!o)return null;var a=o[0],s=r.match(t.parsePattern);if(!s)return null;var u=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(a.length)}}},t.exports=e.default}));Sn(In);var jn=An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,c=s[0],l=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}},t.exports=e.default}));Sn(jn);var Nn=An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(In),r=i(jn);function i(t){return t&&t.__esModule?t:{default:t}}var o={ordinalNumber:(0,n.default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.default=o,t.exports=e.default}));Sn(Nn);var Un=Sn(An((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Cn),r=s(kn),i=s(Dn),o=s(Rn),a=s(Nn);function s(t){return t&&t.__esModule?t:{default:t}}var u={code:"en-US",formatDistance:n.default,formatLong:r.default,formatRelative:i.default,localize:o.default,match:a.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),Fn={position:b.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Hn={x:{numberOfTicks:5},y:{numberOfTicks:5}},Vn={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},Bn=Tn.merge({},Vn,{gridline:{enabled:!0,threshold:.25}}),Gn=Tn.merge({},Bn,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),zn={addSpaceOnEdges:1,showDayName:!1,localeObject:Un,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},Wn={width:null,height:null,resizable:!0,tooltip:Vn,legend:Fn,style:{prefix:"cc"},data:{groupMapsTo:"group"},color:{scale:null}},Yn=Tn.merge({},Wn,{axes:{top:{includeZero:!0},bottom:{includeZero:!0},left:{includeZero:!0},right:{includeZero:!0}},timeScale:zn,grid:Hn,tooltip:Bn}),qn=Tn.merge({},Yn,{bars:{maxWidth:16},timeScale:Tn.merge(zn,{addSpaceOnEdges:1}),tooltip:Gn}),Xn=Tn.merge({},qn,{}),$n=Tn.merge({},qn,{}),Qn=Tn.merge({},qn,{bars:Tn.merge({},qn.bars,{dividerSize:1.5})}),Zn=Tn.merge({},Yn,{points:{radius:3,filled:!1}}),Jn=Tn.merge({},Yn,{points:{radius:4,fillOpacity:.3,filled:!0}}),Kn=Tn.merge({},Yn,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),tr=Tn.merge({},Wn,{pie:{radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2},labels:{formatter:null}}}),er={chart:Wn,axisChart:Yn,simpleBarChart:Xn,groupedBarChart:$n,stackedBarChart:Qn,bubbleChart:Kn,lineChart:Zn,scatterChart:Jn,pieChart:tr,donutChart:Tn.merge({},tr,{donut:{center:{numberFontSize:function(t){return Math.min(t/100*24,24)+"px"},titleFontSize:function(t){return Math.min(t/100*15,15)+"px"},titleYPosition:function(t){return Math.min(t/80*20,20)},numberFormatter:function(t){return Math.floor(t).toLocaleString()}}}})},nr={opacity:{unselected:.3,selected:1}},rr={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},ir={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},or={default:{size:24}},ar=Object.freeze({__proto__:null,legend:Fn,grid:Hn,baseTooltip:Vn,axisChartTooltip:Bn,barChartTooltip:Gn,timeScale:zn,options:er,lines:nr,transitions:rr,axis:ir,spacers:or,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),sr={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},ur={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},cr={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},lr={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},hr={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},fr={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},dr={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},pr=function(t,e){return t[e]},gr=function(t){return pr(lr,t)},vr=function(t){return pr(hr,t)},mr=function(t){return pr(dr,t)},yr=function(t){return pr(ur,t)},_r=function(t){return pr(cr,t)},br=function(t){return pr(sr,t)},wr=function(t){return pr(fr,t)},xr=[_r(70),vr(50),wr(70),yr(70),br(50),br(90),mr(60),gr(80),yr(50),"#b28600",wr(50),vr(90),"#8a3800",_r(50)],Tr=[_r(60),vr(40),wr(60),yr(40),br(50),br(10),mr(30),gr(50),yr(60),"#d2a106",wr(40),vr(20),"#ba4e00",_r(30)],Mr=xr,Er=Tr,Or=Tr,Sr=xr,Ar=Object.freeze({__proto__:null,WHITE:xr,DARK:Tr,G10:Mr,G90:Er,G100:Or,DEFAULT:Sr});function Cr(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Pr(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Cr(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}var kr=Pr(Cr).right;function Dr(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function Lr(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}var Rr=Math.sqrt(50),Ir=Math.sqrt(10),jr=Math.sqrt(2);function Nr(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=Ur(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o}function Ur(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Rr?10:o>=Ir?5:o>=jr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Rr?10:o>=Ir?5:o>=jr?2:1)}function Fr(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Rr?i*=10:o>=Ir?i*=5:o>=jr&&(i*=2),e<t?-i:i}function Hr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Vr(){}function Br(t,e){var n=new Vr;if(t instanceof Vr)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function Gr(){}Vr.prototype=Br.prototype={constructor:Vr,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var zr=Br.prototype;Gr.prototype=function(t,e){var n=new Gr;if(t instanceof Gr)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:Gr,has:zr.has,add:function(t){return this["$"+(t+="")]=t,this},remove:zr.remove,clear:zr.clear,values:zr.keys,size:zr.size,empty:zr.empty,each:zr.each};var Wr=Array.prototype,Yr=Wr.map,qr=Wr.slice,Xr={name:"implicit"};function $r(){var t=Br(),e=[],n=[],r=Xr;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Xr)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Br();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=qr.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return $r(e,n).unknown(r)},Hr.apply(i,arguments),i}function Qr(){var t,e,n=$r().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=o[1]<o[0],h=o[l-0],f=o[1-l];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*c,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var d=Lr(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],l()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,l()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return Qr(r(),o).round(a).paddingInner(s).paddingOuter(u).align(c)},Hr.apply(l(),arguments)}function Zr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Jr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Kr(){}var ti="\\s*([+-]?\\d+)\\s*",ei="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ni="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ri=/^#([0-9a-f]{3,8})$/,ii=new RegExp("^rgb\\("+[ti,ti,ti]+"\\)$"),oi=new RegExp("^rgb\\("+[ni,ni,ni]+"\\)$"),ai=new RegExp("^rgba\\("+[ti,ti,ti,ei]+"\\)$"),si=new RegExp("^rgba\\("+[ni,ni,ni,ei]+"\\)$"),ui=new RegExp("^hsl\\("+[ei,ni,ni]+"\\)$"),ci=new RegExp("^hsla\\("+[ei,ni,ni,ei]+"\\)$"),li={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function hi(){return this.rgb().formatHex()}function fi(){return this.rgb().formatRgb()}function di(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ri.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?pi(e):3===n?new yi(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new yi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new yi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ii.exec(t))?new yi(e[1],e[2],e[3],1):(e=oi.exec(t))?new yi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ai.exec(t))?gi(e[1],e[2],e[3],e[4]):(e=si.exec(t))?gi(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ui.exec(t))?xi(e[1],e[2]/100,e[3]/100,1):(e=ci.exec(t))?xi(e[1],e[2]/100,e[3]/100,e[4]):li.hasOwnProperty(t)?pi(li[t]):"transparent"===t?new yi(NaN,NaN,NaN,0):null}function pi(t){return new yi(t>>16&255,t>>8&255,255&t,1)}function gi(t,e,n,r){return r<=0&&(t=e=n=NaN),new yi(t,e,n,r)}function vi(t){return t instanceof Kr||(t=di(t)),t?new yi((t=t.rgb()).r,t.g,t.b,t.opacity):new yi}function mi(t,e,n,r){return 1===arguments.length?vi(t):new yi(t,e,n,null==r?1:r)}function yi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function _i(){return"#"+wi(this.r)+wi(this.g)+wi(this.b)}function bi(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function wi(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function xi(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Mi(t,e,n,r)}function Ti(t){if(t instanceof Mi)return new Mi(t.h,t.s,t.l,t.opacity);if(t instanceof Kr||(t=di(t)),!t)return new Mi;if(t instanceof Mi)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Mi(a,s,u,t.opacity)}function Mi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ei(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Oi(t){return function(){return t}}function Si(t){return 1==(t=+t)?Ai:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Oi(isNaN(e)?n:e)}}function Ai(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Oi(isNaN(t)?e:t)}Zr(Kr,di,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:hi,formatHex:hi,formatHsl:function(){return Ti(this).formatHsl()},formatRgb:fi,toString:fi}),Zr(yi,mi,Jr(Kr,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new yi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new yi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_i,formatHex:_i,formatRgb:bi,toString:bi})),Zr(Mi,(function(t,e,n,r){return 1===arguments.length?Ti(t):new Mi(t,e,n,null==r?1:r)}),Jr(Kr,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Mi(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Mi(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new yi(Ei(t>=240?t-240:t+120,i,r),Ei(t,i,r),Ei(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Ci=function t(e){var n=Si(e);function r(t,e){var r=n((t=mi(t)).r,(e=mi(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Ai(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Pi(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function ki(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Ui(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function Di(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Li(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ri(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Ui(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Ii=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ji=new RegExp(Ii.source,"g");function Ni(t,e){var n,r,i,o=Ii.lastIndex=ji.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Ii.exec(t))&&(r=ji.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Li(n,r)})),o=ji.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function Ui(t,e){var n,r=typeof e;return null==e||"boolean"===r?Oi(e):("number"===r?Li:"string"===r?(n=di(e))?(e=n,Ci):Ni:e instanceof di?Ci:e instanceof Date?Di:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Pi:Array.isArray(e)?ki:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ri:Li)(t,e)}function Fi(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Hi,Vi,Bi,Gi,zi=180/Math.PI,Wi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yi(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*zi,skewX:Math.atan(u)*zi,scaleX:a,scaleY:s}}function qi(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:Li(t,i)},{i:u-2,x:Li(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Li(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Li(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Li(t,n)},{i:s-2,x:Li(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Xi=qi((function(t){return"none"===t?Wi:(Hi||(Hi=document.createElement("DIV"),Vi=document.documentElement,Bi=document.defaultView),Hi.style.transform=t,t=Bi.getComputedStyle(Vi.appendChild(Hi),null).getPropertyValue("transform"),Vi.removeChild(Hi),Yi(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),$i=qi((function(t){return null==t?Wi:(Gi||(Gi=document.createElementNS("http://www.w3.org/2000/svg","g")),Gi.setAttribute("transform",t),(t=Gi.transform.baseVal.consolidate())?Yi((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Wi)}),", ",")",")");function Qi(t){return+t}var Zi=[0,1];function Ji(t){return t}function Ki(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function to(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function eo(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ki(i,r),o=n(a,o)):(r=Ki(r,i),o=n(o,a)),function(t){return o(r(t))}}function no(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Ki(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=kr(t,e,1,r)-1;return o[n](i[n](e))}}function ro(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function io(){var t,e,n,r,i,o,a=Zi,s=Zi,u=Ui,c=Ji;function l(){return r=Math.min(a.length,s.length)>2?no:eo,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=r(s,a.map(t),Li)))(n)))},h.domain=function(t){return arguments.length?(a=Yr.call(t,Qi),c===Ji||(c=to(a)),l()):a.slice()},h.range=function(t){return arguments.length?(s=qr.call(t),l()):s.slice()},h.rangeRound=function(t){return s=qr.call(t),u=Fi,l()},h.clamp=function(t){return arguments.length?(c=t?to(a):Ji,h):c!==Ji},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function oo(t,e){return io()(t,e)}function ao(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function so(t){return(t=ao(Math.abs(t)))?t[1]:NaN}var uo,co=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lo(t){if(!(e=co.exec(t)))throw new Error("invalid format: "+t);var e;return new ho({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function ho(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function fo(t,e){var n=ao(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}lo.prototype=ho.prototype,ho.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var po={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(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 fo(100*t,e)},r:fo,s:function(t,e){var n=ao(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(uo=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ao(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function go(t){return t}var vo,mo,yo,_o=Array.prototype.map,bo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wo(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?go:(e=_o.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?go:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(_o.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=lo(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):po[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?o:/[%p]/.test(y)?u:"",w=po[y],x=/[defgprs%]/.test(y);function T(t){var i,o,u,f=_,T=b;if("c"===y)T=w(t)+T,t="";else{var M=(t=+t)<0;if(t=isNaN(t)?l:w(Math.abs(t),v),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&(M=!1),f=(M?"("===h?h:c:"-"===h||"("===h?"":h)+f,T=("s"===y?bo[8+uo/3]:"")+T+(M&&"("===h?")":""),x)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){T=(46===u?a+t.slice(i+1):t.slice(i))+T,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var E=f.length+t.length+T.length,O=E<p?new Array(p-E+1).join(e):"";switch(g&&d&&(t=r(O+t,O.length?p-T.length:1/0),O=""),n){case"<":t=f+t+T+O;break;case"=":t=f+O+t+T;break;case"^":t=O.slice(0,E=O.length>>1)+f+t+T+O.slice(E);break;default:t=O+f+t+T}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),T.toString=function(){return t+""},T}return{format:h,formatPrefix:function(t,e){var n=h(((t=lo(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(so(e)/3))),i=Math.pow(10,-r),o=bo[8+r/3];return function(t){return n(i*t)+o}}}}function xo(t,e,n,r){var i,o=Fr(t,e,n);switch((r=lo(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(so(e)/3)))-so(Math.abs(t)))}(o,a))||(r.precision=i),yo(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,so(e)-so(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-so(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return mo(r)}function To(t){var e=t.domain;return t.ticks=function(t){var n=e();return Nr(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return xo(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=Ur(s,u,n))>0?r=Ur(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Ur(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function Mo(){var t=oo(Ji,Ji);return t.copy=function(){return ro(t,Mo())},Hr.apply(t,arguments),To(t)}function Eo(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function Oo(t){return Math.log(t)}function So(t){return Math.exp(t)}function Ao(t){return-Math.log(-t)}function Co(t){return-Math.exp(-t)}function Po(t){return isFinite(t)?+("1e"+t):t<0?0:t}function ko(t){return function(e){return-t(-e)}}function Do(t){var e,n,r=t(Oo,So),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?Po:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=ko(e),n=ko(n),t(Ao,Co)):t(Oo,So),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var c,l,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,c=n(f);l<o;++l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(l=o-1,c=n(f);l>=1;--l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else g=Nr(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=mo(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(Eo(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}vo=wo({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),mo=vo.format,yo=vo.formatPrefix;var Lo=new Date,Ro=new Date;function Io(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return Io((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Lo.setTime(+e),Ro.setTime(+r),t(Lo),t(Ro),Math.floor(n(Lo,Ro))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var jo=Io((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));jo.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Io((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):jo:null};var No=Io((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),Uo=Io((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),Fo=Io((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),Ho=Io((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}));function Vo(t){return Io((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-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Bo=Vo(0),Go=Vo(1),zo=(Vo(2),Vo(3),Vo(4)),Wo=(Vo(5),Vo(6),Io((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()}))),Yo=Io((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()}));Yo.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Io((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var qo=Io((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}));function Xo(t){return Io((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var $o=Xo(0),Qo=Xo(1),Zo=(Xo(2),Xo(3),Xo(4)),Jo=(Xo(5),Xo(6),Io((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 Ko(t){if(0<=t.y&&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 ta(t){if(0<=t.y&&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 ea(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Jo.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Io((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var na,ra,ia={"-":"",_:" ",0:"0"},oa=/^\s*\d+/,aa=/^%/,sa=/[\\^$*+?|[\]().{}]/g;function ua(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function ca(t){return t.replace(sa,"\\$&")}function la(t){return new RegExp("^(?:"+t.map(ca).join("|")+")","i")}function ha(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function fa(t,e,n){var r=oa.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function da(t,e,n){var r=oa.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function pa(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function ga(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function va(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ma(t,e,n){var r=oa.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ya(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _a(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ba(t,e,n){var r=oa.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function wa(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function xa(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ta(t,e,n){var r=oa.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ma(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ea(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Oa(t,e,n){var r=oa.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Sa(t,e,n){var r=oa.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Aa(t,e,n){var r=oa.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ca(t,e,n){var r=aa.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Pa(t,e,n){var r=oa.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ka(t,e,n){var r=oa.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Da(t,e){return ua(t.getDate(),e,2)}function La(t,e){return ua(t.getHours(),e,2)}function Ra(t,e){return ua(t.getHours()%12||12,e,2)}function Ia(t,e){return ua(1+Ho.count(Yo(t),t),e,3)}function ja(t,e){return ua(t.getMilliseconds(),e,3)}function Na(t,e){return ja(t,e)+"000"}function Ua(t,e){return ua(t.getMonth()+1,e,2)}function Fa(t,e){return ua(t.getMinutes(),e,2)}function Ha(t,e){return ua(t.getSeconds(),e,2)}function Va(t){var e=t.getDay();return 0===e?7:e}function Ba(t,e){return ua(Bo.count(Yo(t)-1,t),e,2)}function Ga(t,e){var n=t.getDay();return t=n>=4||0===n?zo(t):zo.ceil(t),ua(zo.count(Yo(t),t)+(4===Yo(t).getDay()),e,2)}function za(t){return t.getDay()}function Wa(t,e){return ua(Go.count(Yo(t)-1,t),e,2)}function Ya(t,e){return ua(t.getFullYear()%100,e,2)}function qa(t,e){return ua(t.getFullYear()%1e4,e,4)}function Xa(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ua(e/60|0,"0",2)+ua(e%60,"0",2)}function $a(t,e){return ua(t.getUTCDate(),e,2)}function Qa(t,e){return ua(t.getUTCHours(),e,2)}function Za(t,e){return ua(t.getUTCHours()%12||12,e,2)}function Ja(t,e){return ua(1+qo.count(Jo(t),t),e,3)}function Ka(t,e){return ua(t.getUTCMilliseconds(),e,3)}function ts(t,e){return Ka(t,e)+"000"}function es(t,e){return ua(t.getUTCMonth()+1,e,2)}function ns(t,e){return ua(t.getUTCMinutes(),e,2)}function rs(t,e){return ua(t.getUTCSeconds(),e,2)}function is(t){var e=t.getUTCDay();return 0===e?7:e}function os(t,e){return ua($o.count(Jo(t)-1,t),e,2)}function as(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Zo(t):Zo.ceil(t),ua(Zo.count(Jo(t),t)+(4===Jo(t).getUTCDay()),e,2)}function ss(t){return t.getUTCDay()}function us(t,e){return ua(Qo.count(Jo(t)-1,t),e,2)}function cs(t,e){return ua(t.getUTCFullYear()%100,e,2)}function ls(t,e){return ua(t.getUTCFullYear()%1e4,e,4)}function hs(){return"+0000"}function fs(){return"%"}function ds(t){return+t}function ps(t){return Math.floor(+t/1e3)}!function(t){na=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=la(i),l=ha(i),h=la(o),f=ha(o),d=la(a),p=ha(a),g=la(s),v=ha(s),m=la(u),y=ha(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Da,e:Da,f:Na,H:La,I:Ra,j:Ia,L:ja,m:Ua,M:Fa,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ds,s:ps,S:Ha,u:Va,U:Ba,V:Ga,w:za,W:Wa,x:null,X:null,y:Ya,Y:qa,Z:Xa,"%":fs},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:$a,e:$a,f:ts,H:Qa,I:Za,j:Ja,L:Ka,m:es,M:ns,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ds,s:ps,S:rs,u:is,U:os,V:as,w:ss,W:us,x:null,X:null,y:cs,Y:ls,Z:hs,"%":fs},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return M(t,e,n,r)},d:xa,e:xa,f:Aa,H:Ma,I:Ma,j:Ta,L:Sa,m:wa,M:Ea,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:ba,Q:Pa,s:ka,S:Oa,u:da,U:pa,V:ga,w:fa,W:va,x:function(t,e,r){return M(t,n,e,r)},X:function(t,e,n){return M(t,r,e,n)},y:ya,Y:ma,Z:_a,"%":Ca};function x(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=ia[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function T(t,e){return function(n){var r,i,o=ea(1900,void 0,1);if(M(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=ta(ea(o.y,0,1))).getUTCDay(),r=i>4||0===i?Qo.ceil(r):Qo(r),r=qo.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Ko(ea(o.y,0,1))).getDay(),r=i>4||0===i?Go.ceil(r):Go(r),r=Ho.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?ta(ea(o.y,0,1)).getUTCDay():Ko(ea(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ta(o)):Ko(o)}}function M(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in ia?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}})}(t),ra=na.format,na.parse,na.utcFormat,na.utcParse}({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"]});function gs(t){return new Date(t)}function vs(t){return t instanceof Date?+t:+new Date(+t)}function ms(t,e,n,r,i,o,a,s,u){var c=oo(Ji,Ji),l=c.invert,h=c.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function w(s){return(a(s)<s?f:o(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function x(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=Pr((function(t){return t[2]})).right(b,o);a===b.length?(i=Fr(n/31536e6,r/31536e6,e),e=t):a?(i=(a=b[o/b[a-1][2]<b[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(Fr(n,r,e),1),e=s)}return null==i?e:e.every(i)}return c.invert=function(t){return new Date(l(t))},c.domain=function(t){return arguments.length?h(Yr.call(t,vs)):h().map(gs)},c.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=x(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(t,e){return null==e?w:u(e)},c.nice=function(t,e){var n=h();return(t=x(t,n[0],n[n.length-1],e))?h(Eo(n,t)):c},c.copy=function(){return ro(c,ms(t,e,n,r,i,o,a,s,u))},c}var ys=Math.PI,_s=2*ys,bs=_s-1e-6;function ws(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function xs(){return new ws}function Ts(t){return function(){return t}}ws.prototype=xs.prototype={constructor:ws,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,c=o-t,l=a-e,h=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var f=n-o,d=r-a,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((ys-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*c)+","+(e+_*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,c=e+s,l=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%_s+_s),h>bs?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=ys)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Ms=Math.abs,Es=Math.atan2,Os=Math.cos,Ss=Math.max,As=Math.min,Cs=Math.sin,Ps=Math.sqrt,ks=Math.PI,Ds=ks/2,Ls=2*ks;function Rs(t){return t>1?0:t<-1?ks:Math.acos(t)}function Is(t){return t>=1?Ds:t<=-1?-Ds:Math.asin(t)}function js(t){return t.innerRadius}function Ns(t){return t.outerRadius}function Us(t){return t.startAngle}function Fs(t){return t.endAngle}function Hs(t){return t&&t.padAngle}function Vs(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<1e-12))return[t+(f=(l*(e-o)-h*(t-i))/f)*u,e+f*c]}function Bs(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/Ps(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,w=i-o,x=f*g-p*d,T=(_<0?-1:1)*Ps(Ss(0,w*w*b-x*x)),M=(x*_-y*T)/b,E=(-x*y-_*T)/b,O=(x*_+y*T)/b,S=(-x*y+_*T)/b,A=M-v,C=E-m,P=O-v,k=S-m;return A*A+C*C>P*P+k*k&&(M=O,E=S),{cx:M,cy:E,x01:-l,y01:-h,x11:M*(i/w-1),y11:E*(i/w-1)}}function Gs(){var t=js,e=Ns,n=Ts(0),r=null,i=Us,o=Fs,a=Hs,s=null;function u(){var u,c,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Ds,d=o.apply(this,arguments)-Ds,p=Ms(d-f),g=d>f;if(s||(s=u=xs()),h<l&&(c=h,h=l,l=c),h>1e-12)if(p>Ls-1e-12)s.moveTo(h*Os(f),h*Cs(f)),s.arc(0,0,h,f,d,!g),l>1e-12&&(s.moveTo(l*Os(d),l*Cs(d)),s.arc(0,0,l,d,f,g));else{var v,m,y=f,_=d,b=f,w=d,x=p,T=p,M=a.apply(this,arguments)/2,E=M>1e-12&&(r?+r.apply(this,arguments):Ps(l*l+h*h)),O=As(Ms(h-l)/2,+n.apply(this,arguments)),S=O,A=O;if(E>1e-12){var C=Is(E/l*Cs(M)),P=Is(E/h*Cs(M));(x-=2*C)>1e-12?(b+=C*=g?1:-1,w-=C):(x=0,b=w=(f+d)/2),(T-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(T=0,y=_=(f+d)/2)}var k=h*Os(y),D=h*Cs(y),L=l*Os(w),R=l*Cs(w);if(O>1e-12){var I,j=h*Os(_),N=h*Cs(_),U=l*Os(b),F=l*Cs(b);if(p<ks&&(I=Vs(k,D,U,F,j,N,L,R))){var H=k-I[0],V=D-I[1],B=j-I[0],G=N-I[1],z=1/Cs(Rs((H*B+V*G)/(Ps(H*H+V*V)*Ps(B*B+G*G)))/2),W=Ps(I[0]*I[0]+I[1]*I[1]);S=As(O,(l-W)/(z-1)),A=As(O,(h-W)/(z+1))}}T>1e-12?A>1e-12?(v=Bs(U,F,k,D,h,A,g),m=Bs(j,N,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<O?s.arc(v.cx,v.cy,A,Es(v.y01,v.x01),Es(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,Es(v.y01,v.x01),Es(v.y11,v.x11),!g),s.arc(0,0,h,Es(v.cy+v.y11,v.cx+v.x11),Es(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Es(m.y11,m.x11),Es(m.y01,m.x01),!g))):(s.moveTo(k,D),s.arc(0,0,h,y,_,!g)):s.moveTo(k,D),l>1e-12&&x>1e-12?S>1e-12?(v=Bs(L,R,j,N,l,-S,g),m=Bs(k,D,U,F,l,-S,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),S<O?s.arc(v.cx,v.cy,S,Es(v.y01,v.x01),Es(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,S,Es(v.y01,v.x01),Es(v.y11,v.x11),!g),s.arc(0,0,l,Es(v.cy+v.y11,v.cx+v.x11),Es(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,Es(m.y11,m.x11),Es(m.y01,m.x01),!g))):s.arc(0,0,l,w,b,g):s.lineTo(L,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ks/2;return[Os(r)*n,Cs(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ts(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ts(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ts(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ts(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ts(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ts(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ts(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function zs(t){this._context=t}function Ws(t){return new zs(t)}function Ys(t){return t[0]}function qs(t){return t[1]}function Xs(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function $s(t){return t}zs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Qs=Array.prototype.slice;function Zs(){}function Js(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Ks(t){this._context=t}function tu(t){return new Ks(t)}function eu(t){this._context=t}function nu(t){return new eu(t)}function ru(t){this._context=t}function iu(t){return new ru(t)}function ou(t,e){this._basis=new Ks(t),this._beta=e}Ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Js(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Js(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},eu.prototype={areaStart:Zs,areaEnd:Zs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Js(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ru.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Js(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ou.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var au=function t(e){function n(t){return 1===e?new Ks(t):new ou(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function su(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function uu(t,e){this._context=t,this._k=(1-e)/6}uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:su(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:su(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var cu=function t(e){function n(t){return new uu(t,e)}return n.tension=function(e){return t(+e)},n}(0);function lu(t,e){this._context=t,this._k=(1-e)/6}lu.prototype={areaStart:Zs,areaEnd:Zs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:su(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var hu=function t(e){function n(t){return new lu(t,e)}return n.tension=function(e){return t(+e)},n}(0);function fu(t,e){this._context=t,this._k=(1-e)/6}fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:su(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var du=function t(e){function n(t){return new fu(t,e)}return n.tension=function(e){return t(+e)},n}(0);function pu(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function gu(t,e){this._context=t,this._alpha=e}gu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:pu(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vu=function t(e){function n(t){return e?new gu(t,e):new uu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function mu(t,e){this._context=t,this._alpha=e}mu.prototype={areaStart:Zs,areaEnd:Zs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:pu(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var yu=function t(e){function n(t){return e?new mu(t,e):new lu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function _u(t,e){this._context=t,this._alpha=e}_u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pu(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var bu=function t(e){function n(t){return e?new _u(t,e):new fu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function wu(t){this._context=t}function xu(t){return new wu(t)}function Tu(t){return t<0?-1:1}function Mu(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Tu(o)+Tu(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Eu(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ou(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Su(t){this._context=t}function Au(t){this._context=new Cu(t)}function Cu(t){this._context=t}function Pu(t){return new Su(t)}function ku(t){return new Au(t)}function Du(t){this._context=t}function Lu(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function Ru(t){return new Du(t)}function Iu(t,e){this._context=t,this._t=e}function ju(t){return new Iu(t,.5)}function Nu(t){return new Iu(t,0)}function Uu(t){return new Iu(t,1)}function Fu(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Hu(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Vu(t,e){return t[e]}wu.prototype={areaStart:Zs,areaEnd:Zs,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ou(this,this._t0,Eu(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ou(this,Eu(this,n=Mu(this,t,e)),n);break;default:Ou(this,this._t0,n=Mu(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Au.prototype=Object.create(Su.prototype)).point=function(t,e){Su.prototype.point.call(this,e,t)},Cu.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},Du.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Lu(t),i=Lu(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Iu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Bu=function(){function t(t){this.state={options:{}},this.colorScale={},this.services=t}return t.prototype.transformToTabularData=function(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){var n=t.label;t.data.forEach((function(t,i){var o={group:n,key:r[i]};isNaN(t)?(o.value=t.value,o.date=t.date):o.value=t,e.push(o)}))})),e},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return this.getTabularData(t)},t.prototype.getDisplayData=function(){if(!this.get("data"))return null;var t=Fn.items.status.ACTIVE,e=this.getDataGroups(),n=Tn.clone(this.get("data")),r=this.getOptions().data.groupMapsTo;return n.filter((function(n){return e.find((function(t){return t.name===n[r]})).status===t}))},t.prototype.getData=function(){return this.get("data")},t.prototype.setData=function(t){var e=this.sanitize(Tn.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=Fn.items.status.ACTIVE;return Br(t,(function(t){return t[e]})).keys().map((function(t){return{name:t,status:n}}))},t.prototype.getDataGroups=function(){return this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=Fn.items.status.ACTIVE;return this.getDataGroups().filter((function(e){return e.status===t}))},t.prototype.getDataGroupNames=function(){return this.getDataGroups().map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(){return this.getActiveDataGroups().map((function(t){return t.name}))},t.prototype.getGroupedData=function(){var t=this.getDisplayData(),e={},n=this.getOptions().data.groupMapsTo;return t.map((function(t){var r=t[n];null!==e[r]&&void 0!==e[r]?e[r].push(t):e[r]=[t]})),Object.keys(e).map((function(t){return{name:t,data:e[t]}}))},t.prototype.getDataValuesGroupedByKeys=function(){var t=this.getOptions().data.groupMapsTo,e=this.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),i=Br(e,(function(t){return t[n]})).keys(),o=this.getDataGroupNames();return i.map((function(i){var a={sharedStackKey:i};return o.forEach((function(o){var s=e.find((function(e){return e[t]===o&&e[n].toString()===i}));a[o]=s?s[r]:null})),a}))},t.prototype.getStackedData=function(){var t=this.getOptions().data.groupMapsTo,e=this.getDataGroupNames(),n=this.getDataValuesGroupedByKeys();return function(){var t=Ts([]),e=Hu,n=Fu,r=Vu;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(o=0;o<c;++o){for(var h,f=s[o],d=l[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(o=0,a=e(l);o<c;++o)l[a[o]].index=o;return n(l,a),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Ts(Qs.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Ts(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Hu:"function"==typeof t?t:Ts(Qs.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Fu:t,i):n},i}().keys(e)(n).map((function(n,r){return Object.keys(n).filter((function(t){return!isNaN(t)})).map((function(i){var o=n[i];return o[t]=e[r],o}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){void 0===e&&(e=!1),this.state=Object.assign({},this.state,t),e||this.update()},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:Tn.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(E.Model.UPDATE))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Fn.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),o=i.some((function(t){return t.status===r})),a=i.filter((function(t){return t.status===n}));if(o)if(1===a.length&&a[0].name===t)i.forEach((function(t,e){i[e].status=n}));else{var s=i.findIndex((function(e){return e.name===t}));i[s].status=i[s].status===r?n:r}else i.forEach((function(e,o){i[o].status=e.name===t?n:r}));this.services.events.dispatchEvent(E.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},t.prototype.setColorScale=function(){var t=Sr,e=this.getOptions(),n=Tn.getProperty(e,"color","scale");if(null!==n&&0!==Object.keys(n).length){var r=[],i=0;this.allDataGroups.forEach((function(e){n[e]?r.push(n[e]):r.push(t[i]),i===t.length-1?i=0:i++})),this.colorScale=$r().range(r).domain(this.allDataGroups)}else this.colorScale=$r().range(t).domain(this.allDataGroups)},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=this.getFillScale()(t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale(t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t}(),Gu=function(){function t(t,e){this.model=t,this.services=e,this.init()}return t.prototype.init=function(){},t.prototype.update=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t}(),zu="http://www.w3.org/1999/xhtml",Wu={svg:"http://www.w3.org/2000/svg",xhtml:zu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yu(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Wu.hasOwnProperty(e)?{space:Wu[e],local:t}:t}function qu(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===zu&&e.documentElement.namespaceURI===zu?e.createElement(t):e.createElementNS(n,t)}}function Xu(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function $u(t){var e=Yu(t);return(e.local?Xu:qu)(e)}function Qu(){}function Zu(t){return null==t?Qu:function(){return this.querySelector(t)}}function Ju(){return[]}function Ku(t){return null==t?Ju:function(){return this.querySelectorAll(t)}}function tc(t){return function(){return this.matches(t)}}function ec(t){return new Array(t.length)}function nc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}nc.prototype={constructor:nc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function rc(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new nc(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function ic(t,e,n,r,i,o,a){var s,u,c,l={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=c="$"+a.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<f;++s)(u=l[c="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],l[c]=null):n[s]=new nc(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&l[d[s]]===u&&(i[s]=u)}function oc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ac(t){return function(){this.removeAttribute(t)}}function sc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function uc(t,e){return function(){this.setAttribute(t,e)}}function cc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function lc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function hc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function fc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function dc(t){return function(){this.style.removeProperty(t)}}function pc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function gc(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function vc(t,e){return t.style.getPropertyValue(e)||fc(t).getComputedStyle(t,null).getPropertyValue(e)}function mc(t){return function(){delete this[t]}}function yc(t,e){return function(){this[t]=e}}function _c(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function bc(t){return t.trim().split(/^|\s+/)}function wc(t){return t.classList||new xc(t)}function xc(t){this._node=t,this._names=bc(t.getAttribute("class")||"")}function Tc(t,e){for(var n=wc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Mc(t,e){for(var n=wc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ec(t){return function(){Tc(this,t)}}function Oc(t){return function(){Mc(this,t)}}function Sc(t,e){return function(){(e.apply(this,arguments)?Tc:Mc)(this,t)}}function Ac(){this.textContent=""}function Cc(t){return function(){this.textContent=t}}function Pc(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function kc(){this.innerHTML=""}function Dc(t){return function(){this.innerHTML=t}}function Lc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Rc(){this.nextSibling&&this.parentNode.appendChild(this)}function Ic(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function jc(){return null}function Nc(){var t=this.parentNode;t&&t.removeChild(this)}function Uc(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Fc(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}xc.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Hc={},Vc=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Hc={mouseenter:"mouseover",mouseleave:"mouseout"}));function Bc(t,e,n){return t=Gc(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Gc(t,e,n){return function(r){var i=Vc;Vc=r;try{t.call(this,this.__data__,e,n)}finally{Vc=i}}}function zc(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Wc(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function Yc(t,e,n){var r=Hc.hasOwnProperty(t.type)?Bc:Gc;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function qc(t,e,n){var r=fc(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Xc(t,e){return function(){return qc(this,t,e)}}function $c(t,e){return function(){return qc(this,t,e.apply(this,arguments))}}var Qc=[null];function Zc(t,e){this._groups=t,this._parents=e}function Jc(){return new Zc([[document.documentElement]],Qc)}function Kc(t){return"string"==typeof t?new Zc([[document.querySelector(t)]],[document.documentElement]):new Zc([[t]],Qc)}function tl(){for(var t,e=Vc;t=e.sourceEvent;)e=t;return e}function el(t){var e=tl();return e.changedTouches&&(e=e.changedTouches[0]),function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}(t,e)}Zc.prototype=Jc.prototype={constructor:Zc,select:function(t){"function"!=typeof t&&(t=Zu(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,c=r[i]=new Array(u),l=0;l<u;++l)(o=s[l])&&(a=t.call(o,o.__data__,l,s))&&("__data__"in o&&(a.__data__=o.__data__),c[l]=a);return new Zc(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Ku(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,c=0;c<u;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new Zc(r,i)},filter:function(t){"function"!=typeof t&&(t=tc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new Zc(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n=e?ic:rc,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=t.call(l,l&&l.__data__,c,r),p=d.length,g=s[c]=new Array(p),v=a[c]=new Array(p);n(l,h,g,v,u[c]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new Zc(a,r))._enter=s,a._exit=u,a},enter:function(){return new Zc(this._enter||this._groups.map(ec),this._parents)},exit:function(){return new Zc(this._exit||this._groups.map(ec),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],h=c.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new Zc(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=oc);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,c=i[o]=new Array(u),l=0;l<u;++l)(a=s[l])&&(c[l]=a);c.sort(e)}return new Zc(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=Yu(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?sc:ac:"function"==typeof e?n.local?hc:lc:n.local?cc:uc)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?dc:"function"==typeof e?gc:pc)(t,e,null==n?"":n)):vc(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?mc:"function"==typeof e?_c:yc)(t,e)):this.node()[t]},classed:function(t,e){var n=bc(t+"");if(arguments.length<2){for(var r=wc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Sc:e?Ec:Oc)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ac:("function"==typeof t?Pc:Cc)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?kc:("function"==typeof t?Lc:Dc)(t)):this.node().innerHTML},raise:function(){return this.each(Rc)},lower:function(){return this.each(Ic)},append:function(t){var e="function"==typeof t?t:$u(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:$u(t),r=null==e?jc:"function"==typeof e?e:Zu(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Nc)},clone:function(t){return this.select(t?Fc:Uc)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=zc(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Yc:Wc,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?$c:Xc)(t,e))}};var nl={prefix:"bx",selectorTabbable:"\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n "},rl=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];t.call(e,i[1],i[0])}},Object.defineProperties(e.prototype,n),e}()}(),il="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,ol="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),al="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(ol):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},sl=["top","right","bottom","left","width","height","size","weight"],ul="undefined"!=typeof MutationObserver,cl=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){al(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};cl.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},cl.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},cl.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},cl.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},cl.prototype.connect_=function(){il&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ul?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},cl.prototype.disconnect_=function(){il&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},cl.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),sl.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},cl.getInstance=function(){return this.instance_||(this.instance_=new cl),this.instance_},cl.instance_=null;var ll=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n+=1){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},hl=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||ol},fl=yl(0,0,0,0);function dl(t){return parseFloat(t)||0}function pl(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+dl(t["border-"+n+"-width"])}),0)}function gl(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return fl;var r=hl(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=t["padding-"+i];e[i]=dl(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=dl(r.width),u=dl(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=pl(r,"left","right")+o),Math.round(u+a)!==n&&(u-=pl(r,"top","bottom")+a)),!function(t){return t===hl(t).document.documentElement}(t)){var c=Math.round(s+o)-e,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return yl(i.left,i.top,s,u)}var vl="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof hl(t).SVGGraphicsElement}:function(t){return t instanceof hl(t).SVGElement&&"function"==typeof t.getBBox};function ml(t){return il?vl(t)?function(t){var e=t.getBBox();return yl(0,0,e.width,e.height)}(t):gl(t):fl}function yl(t,e,n,r){return{x:t,y:e,width:n,height:r}}var _l=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=yl(0,0,0,0),this.target=t};_l.prototype.isActive=function(){var t=ml(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},_l.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var bl=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return ll(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);ll(this,{target:t,contentRect:n})},wl=function(t,e,n){if(this.activeObservations_=[],this.observations_=new rl,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n};wl.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof hl(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new _l(t)),this.controller_.addObserver(this),this.controller_.refresh())}},wl.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof hl(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},wl.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},wl.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},wl.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new bl(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},wl.prototype.clearActive=function(){this.activeObservations_.splice(0)},wl.prototype.hasActive=function(){return this.activeObservations_.length>0};var xl="undefined"!=typeof WeakMap?new WeakMap:new rl,Tl=function(t){if(!(this instanceof Tl))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=cl.getInstance(),n=new wl(t,e,this);xl.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Tl.prototype[t]=function(){return(e=xl.get(this))[t].apply(e,arguments);var e}}));var Ml=void 0!==ol.ResizeObserver?ol.ResizeObserver:Tl,El=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=Kc(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},u={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var c={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(c),a.width>0&&a.height>0))return c;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:Tn.getProperty(t.node(),"width","baseVal","value"),height:Tn.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(c),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();Kc(this.getHolder()).classed(nl.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.addSVGElement=function(){var t=Tn.getProperty(this.model.getOptions(),"style","prefix"),e=Kc(this.getHolder()).append("svg").classed(nl.prefix+"--"+t+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=e.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=Tn.debounce((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(E.Chart.RESIZE))}),12.5);new Ml(i).observe(e)}},e}(Gu),Ol=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.init=function(){this.documentFragment=document.createDocumentFragment()},e.prototype.addEventListener=function(t,e){this.documentFragment.addEventListener(t,e)},e.prototype.removeEventListener=function(t,e){this.documentFragment.removeEventListener(t,e)},e.prototype.dispatchEvent=function(t,e){var n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)},e}(Gu),Sl={value:function(){}};function Al(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Cl(r)}function Cl(t){this._=t}function Pl(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function kl(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Dl(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Sl,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Cl.prototype=Al.prototype={constructor:Cl,on:function(t,e){var n,r=this._,i=Pl(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Dl(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Dl(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=kl(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Cl(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Ll,Rl,Il=0,jl=0,Nl=0,Ul=0,Fl=0,Hl=0,Vl="object"==typeof performance&&performance.now?performance:Date,Bl="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Gl(){return Fl||(Bl(zl),Fl=Vl.now()+Hl)}function zl(){Fl=0}function Wl(){this._call=this._time=this._next=null}function Yl(t,e,n){var r=new Wl;return r.restart(t,e,n),r}function ql(){Fl=(Ul=Vl.now())+Hl,Il=jl=0;try{!function(){Gl(),++Il;for(var t,e=Ll;e;)(t=Fl-e._time)>=0&&e._call.call(null,t),e=e._next;--Il}()}finally{Il=0,function(){var t,e,n=Ll,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ll=e);Rl=t,$l(r)}(),Fl=0}}function Xl(){var t=Vl.now(),e=t-Ul;e>1e3&&(Hl-=e,Ul=t)}function $l(t){Il||(jl&&(jl=clearTimeout(jl)),t-Fl>24?(t<1/0&&(jl=setTimeout(ql,t-Vl.now()-Hl)),Nl&&(Nl=clearInterval(Nl))):(Nl||(Ul=Vl.now(),Nl=setInterval(Xl,1e3)),Il=1,Bl(ql)))}function Ql(t,e,n){var r=new Wl;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Wl.prototype=Yl.prototype={constructor:Wl,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Gl():+n)+(null==e?0:+e),this._next||Rl===this||(Rl?Rl._next=this:Ll=this,Rl=this),this._call=t,this._time=n,$l()},stop:function(){this._call&&(this._call=null,this._time=1/0,$l())}};var Zl=Al("start","end","cancel","interrupt"),Jl=[];function Kl(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return Ql(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(Ql((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,l=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Yl((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Zl,tween:Jl,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function th(t,e){var n=nh(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function eh(t,e){var n=nh(t,e);if(n.state>3)throw new Error("too late; already running");return n}function nh(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function rh(t,e){var n,r;return function(){var i=eh(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function ih(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=eh(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function oh(t,e,n){var r=t._id;return t.each((function(){var t=eh(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return nh(t,r).value[e]}}function ah(t,e){var n;return("number"==typeof e?Li:e instanceof di?Ci:(n=di(e))?(e=n,Ci):Ni)(t,e)}function sh(t){return function(){this.removeAttribute(t)}}function uh(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ch(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function lh(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function hh(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function fh(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function dh(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function ph(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function gh(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ph(t,i)),n}return i._value=e,i}function vh(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&dh(t,i)),n}return i._value=e,i}function mh(t,e){return function(){th(this,t).delay=+e.apply(this,arguments)}}function yh(t,e){return e=+e,function(){th(this,t).delay=e}}function _h(t,e){return function(){eh(this,t).duration=+e.apply(this,arguments)}}function bh(t,e){return e=+e,function(){eh(this,t).duration=e}}function wh(t,e){if("function"!=typeof e)throw new Error;return function(){eh(this,t).ease=e}}function xh(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?th:eh;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Th=Jc.prototype.constructor;function Mh(t){return function(){this.style.removeProperty(t)}}function Eh(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Oh(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Eh(t,o,n)),r}return o._value=e,o}function Sh(t){return function(e){this.textContent=t.call(this,e)}}function Ah(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Sh(r)),e}return r._value=t,r}var Ch=0;function Ph(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function kh(t){return Jc().transition(t)}function Dh(){return++Ch}var Lh=Jc.prototype;Ph.prototype=kh.prototype={constructor:Ph,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Zu(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,c=r[a],l=c.length,h=o[a]=new Array(l),f=0;f<l;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,Kl(h[f],e,n,f,h,nh(s,n)));return new Ph(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ku(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,h=0;h<l;++h)if(u=c[h]){for(var f,d=t.call(u,u.__data__,h,c),p=nh(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&Kl(f,e,n,g,d,p);o.push(d),a.push(u)}return new Ph(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=tc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new Ph(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],h=c.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new Ph(a,this._parents,this._name,this._id)},selection:function(){return new Th(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Dh(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)if(a=s[c]){var l=nh(a,e);Kl(a,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Ph(r,this._parents,t,n)},call:Lh.call,nodes:Lh.nodes,node:Lh.node,size:Lh.size,empty:Lh.empty,each:Lh.each,on:function(t,e){var n=this._id;return arguments.length<2?nh(this.node(),n).on.on(t):this.each(xh(n,t,e))},attr:function(t,e){var n=Yu(t),r="transform"===n?$i:ah;return this.attrTween(t,"function"==typeof e?(n.local?fh:hh)(n,r,oh(this,"attr."+t,e)):null==e?(n.local?uh:sh)(n):(n.local?lh:ch)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Yu(t);return this.tween(n,(r.local?gh:vh)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Xi:ah;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=vc(this,t),a=(this.style.removeProperty(t),vc(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Mh(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=vc(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=vc(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,oh(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=eh(this,t),c=u.on,l=null==u.value[a]?o||(o=Mh(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=vc(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Oh(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(oh(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ah(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=nh(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?rh:ih)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?mh:yh)(e,t)):nh(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?_h:bh)(e,t)):nh(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(wh(e,t)):nh(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=eh(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}))}))}};var Rh={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ih(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Rh.time=Gl(),Rh;return n}Jc.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},Jc.prototype.transition=function(t){var e,n;t instanceof Ph?(e=t._id,t=t._name):(e=Dh(),(n=Rh).time=Gl(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)(a=s[c])&&Kl(a,t,e,c,s,n||Ih(a,e));return new Ph(r,this._parents,t,e)};var jh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return f(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener("model-update",(function(){t.pendingTransitions={}}))},e.prototype.getTransition=function(t,e){var n=this;if(!1===this.model.getOptions().animations||!1===e)return this.getInstantTransition(t);var r=kh(t).duration(Tn.getProperty(rr,t,"duration")||rr.default.duration);return this.pendingTransitions[r._id]=r,r.on("end interrupt cancel",(function(){delete n.pendingTransitions[r._id]})),r},e.prototype.getInstantTransition=function(t){var e=this,n=kh(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(Gu);function Nh(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function Uh(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Fh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t),r=Uh(e);return n.setDate(n.getDate()+r),n}function Hh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t).getTime(),r=Uh(e);return new Date(n+r)}function Vh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return Hh(t,36e5*n)}function Bh(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Gh(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Nh(t);return e.setHours(0,0,0,0),e}function zh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Gh(t),r=Gh(e),i=n.getTime()-Bh(n),o=r.getTime()-Bh(r);return Math.round((i-o)/864e5)}function Wh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return Hh(t,6e4*n)}function Yh(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Nh(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function qh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t),r=Uh(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Yh(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function Xh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return Hh(t,1e3*n)}function $h(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return qh(t,12*n)}function Qh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t),r=Nh(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Zh(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Nh(t);return!isNaN(e)}function Jh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t),r=Nh(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Kh(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t),r=Nh(e);return n.getFullYear()-r.getFullYear()}function tf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t),r=Nh(e);return n.getTime()-r.getTime()}function ef(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tf(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function nf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tf(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var rf={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function of(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var af={date:of({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:of({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:of({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},sf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function uf(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function cf(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,c=s[0],l=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}}var lf,hf={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof rf[t]?rf[t]:1===e?rf[t].one:rf[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:af,formatRelative:function(t,e,n,r){return sf[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:uf({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:uf({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:uf({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:uf({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:uf({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(lf={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},i=n.match(lf.matchPattern);if(!i)return null;var o=i[0],a=n.match(lf.parsePattern);if(!a)return null;var s=lf.valueCallback?lf.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:cf({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:cf({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:cf({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:cf({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:cf({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ff(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return Hh(t,-n)}function df(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var pf=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return df("yy"===e?r%100:r,e.length)},gf=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):df(n+1,2)},vf=function(t,e){return df(t.getUTCDate(),e.length)},mf=function(t,e){return df(t.getUTCHours()%12||12,e.length)},yf=function(t,e){return df(t.getUTCHours(),e.length)},_f=function(t,e){return df(t.getUTCMinutes(),e.length)},bf=function(t,e){return df(t.getUTCSeconds(),e.length)},wf=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return df(Math.floor(r*Math.pow(10,n-3)),e.length)};function xf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=Nh(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function Tf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Nh(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=xf(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=xf(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Mf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Tf(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=xf(n);return r}function Ef(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:Uh(i),a=null==n.weekStartsOn?o:Uh(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Nh(t),u=s.getUTCDay(),c=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function Of(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Nh(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:Uh(a),u=null==i.firstWeekContainsDate?s:Uh(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=Ef(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=Ef(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function Sf(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:Uh(i),a=null==n.firstWeekContainsDate?o:Uh(n.firstWeekContainsDate),s=Of(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var c=Ef(u,e);return c}var Af="midnight",Cf="noon",Pf="morning",kf="afternoon",Df="evening",Lf="night",Rf={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return pf(t,e)},Y:function(t,e,n,r){var i=Of(t,r),o=i>0?i:1-i;return"YY"===e?df(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):df(o,e.length)},R:function(t,e){return df(Tf(t),e.length)},u:function(t,e){return df(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return df(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return df(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return gf(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return df(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Nh(t),r=Ef(n,e).getTime()-Sf(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):df(i,e.length)},I:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Nh(t),n=xf(e).getTime()-Mf(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):df(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):vf(t,e)},D:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Nh(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):df(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return df(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return df(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return df(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?Cf:0===i?Af:i/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?Df:i>=12?kf:i>=4?Pf:Lf,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return mf(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):yf(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):df(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):df(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):_f(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):bf(t,e)},S:function(t,e){return wf(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return jf(i);case"XXXX":case"XX":return Nf(i);case"XXXXX":case"XXX":default:return Nf(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return jf(i);case"xxxx":case"xx":return Nf(i);case"xxxxx":case"xxx":default:return Nf(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+If(i,":");case"OOOO":default:return"GMT"+Nf(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+If(i,":");case"zzzz":default:return"GMT"+Nf(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return df(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return df((r._originalDate||t).getTime(),e.length)}};function If(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+df(o,2)}function jf(t,e){return t%60==0?(t>0?"-":"+")+df(Math.abs(t)/60,2):Nf(t,e)}function Nf(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+df(Math.floor(i/60),2)+n+df(i%60,2)}function Uf(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function Ff(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var Hf={p:Ff,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return Uf(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",Uf(i,e)).replace("{{time}}",Ff(o,e))}},Vf=["D","DD"],Bf=["YY","YYYY"];function Gf(t){return-1!==Vf.indexOf(t)}function zf(t){return-1!==Bf.indexOf(t)}function Wf(t){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if("YY"===t)throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if("D"===t)throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if("DD"===t)throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}var Yf=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qf=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xf=/^'([^]*?)'?$/,$f=/''/g,Qf=/[a-zA-Z]/;function Zf(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||hf,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:Uh(a),u=null==i.firstWeekContainsDate?s:Uh(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=o.options&&o.options.weekStartsOn,l=null==c?0:Uh(c),h=null==i.weekStartsOn?l:Uh(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var f=Nh(t);if(!Zh(f))throw new RangeError("Invalid time value");var d=Bh(f),p=ff(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(qf).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Hf[e])(t,o.formatLong,g):t})).join("").match(Yf).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Jf(t);var n=Rf[e];if(n)return!i.useAdditionalWeekYearTokens&&zf(t)&&Wf(t),!i.useAdditionalDayOfYearTokens&&Gf(t)&&Wf(t),n(p,t,o.localize,g);if(e.match(Qf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Jf(t){return t.match(Xf)[1].replace($f,"'")}function Kf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return Fh(t,-n)}function td(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return Vh(t,-n)}function ed(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return Wh(t,-n)}function nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return qh(t,-n)}function rd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return Xh(t,-n)}function id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Uh(e);return $h(t,-n)}var od,ad,sd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return f(e,t),e.prototype.getDomainAxisPosition=function(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(g).map((function(t){return g[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=Tn.getProperty(t,"axes");return!0===Tn.getProperty(e,"axes",g.RIGHT,"main")?g.RIGHT:g.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=Tn.getProperty(t,"axes");return!0===Tn.getProperty(e,"axes",g.TOP,"main")?g.TOP:g.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Tn.getProperty(n,"axes",t),i=Tn.getProperty(n,"axes",e),o=r.scaleType||m.LINEAR,a=i.scaleType||m.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return a===m.LABELS||a===m.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):o===m.LABELS||o===m.TIME?(s.domainAxisPosition=t,s.rangeAxisPosition=e):(s.domainAxisPosition=e,s.rangeAxisPosition=t),s},e.prototype.findDomainAndRangeAxes=function(){var t=this.findMainVerticalAxisPosition(),e=this.findMainHorizontalAxisPosition(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.domainAxisPosition,this.rangeAxisPosition=n.rangeAxisPosition},e.prototype.determineOrientation=function(){this.rangeAxisPosition===g.LEFT&&this.domainAxisPosition===g.BOTTOM?this.orientation=v.VERTICAL:this.orientation=v.HORIZONTAL},e.prototype.getOrientation=function(){return this.orientation},e.prototype.getScaleByPosition=function(t){return this.scales[t]},e.prototype.getScaleTypeByPosition=function(t){return this.scaleTypes[t]},e.prototype.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[g.BOTTOM,g.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[g.LEFT,g.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainXScale=function(){return this.scales[this.getMainXAxisPosition()]},e.prototype.getMainYScale=function(){return this.scales[this.getMainYAxisPosition()]},e.prototype.getValueFromScale=function(t,e,n){var r=this.model.getOptions(),i=Tn.getProperty(r,"axes",t),o=this.scaleTypes[t],a=this.scales[t],s=i.mapsTo,u=void 0!==e[s]?e[s]:e;return o===m.LABELS?a(u)+a.step()/2:o===m.TIME?a(new Date(u)):a(u)},e.prototype.getDomainValue=function(t,e){return this.getValueFromScale(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueFromScale(this.rangeAxisPosition,t,e)},e.prototype.getDomainIdentifier=function(){var t=this.model.getOptions();return Tn.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return Tn.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===m.TIME?e.filter((function(e){return e[n].getTime()===t.getTime()})):e.filter((function(e){return e[n]===t}))},e.prototype.getScaleDomain=function(t){var e,n,r=this.model.getOptions(),i=Tn.getProperty(r,"axes",t),o=i.includeZero,a=Tn.getProperty(i,"scaleType")||m.LINEAR,s=this.model.getDisplayData(),u=i.mapsTo;if(i.domain)return i.domain;if(i&&i.scaleType===m.LABELS)return Br(s,(function(t){return t[u]})).keys();i.stacked?n=this.model.getDataValuesGroupedByKeys().map((function(t){return function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):n=s.map((function(t){return t[u]}));if(i.scaleType!==m.TIME&&o&&n.push(0),e=Dr(n),i.scaleType===m.TIME){var c=Tn.getProperty(r,"timeScale","addSpaceOnEdges");if(c){var l=new Date(e[0]),h=new Date(e[1]);return function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t),r=Nh(e),i=Qh(n,r),o=Math.abs(Kh(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Qh(n,r)===-i,s=i*(o-a);return 0===s?0:s}(h,l)>1?[id(l,c),$h(h,c)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t),r=Nh(e),i=Qh(n,r),o=Math.abs(Jh(n,r));n.setMonth(n.getMonth()-i*o);var a=Qh(n,r)===-i,s=i*(o-a);return 0===s?0:s}(h,l)>1?[nd(l,c),qh(h,c)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nh(t),r=Nh(e),i=Qh(n,r),o=Math.abs(zh(n,r));n.setDate(n.getDate()-i*o);var a=Qh(n,r)===-i,s=i*(o-a);return 0===s?0:s}(h,l)>1?[Kf(l,c),Fh(h,c)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tf(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(h,l)>1?[td(l,c),Vh(h,c)]:ef(h,l)>30?[ed(l,30*c),Wh(h,30*c)]:ef(h,l)>1?[ed(l,c),Wh(h,c)]:nf(h,l)>15?[rd(l,15*c),Xh(h,15*c)]:nf(h,l)>1?[rd(l,c),Xh(h,c)]:[l,h]}}return e=function(t,e){var n=t[0],r=t[1],i=(r-n)*e;return[n>=0&&n-i<0?0:n-i,r<=0&&r+i>0?0:r+i]}(e,ir.paddingRatio),a===m.TIME&&(e=e.map((function(t){return new Date(t)}))),e},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Tn.getProperty(e,"axes",t);if(!n)return null;var r,i=Tn.getProperty(n,"scaleType")||m.LINEAR;return this.scaleTypes[t]=i,(r=i===m.TIME?function(){return Hr.apply(ms(Yo,Wo,Bo,Ho,Fo,Uo,No,jo,ra).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===m.LOG?function t(){var e=Do(io()).domain([1,10]);return e.copy=function(){return ro(e,t()).base(e.base())},Hr.apply(e,arguments),e}().base(n.base||10):i===m.LABELS?Qr():Mo()).domain(this.getScaleDomain(t)),r},e}(Gu),ud=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Ws,curveLinearClosed:xu,curveBasis:tu,curveBasisClosed:nu,curveBasisOpen:iu,curveBundle:au,curveCardinal:cu,curveCardinalClosed:hu,curveCardinalOpen:du,curveCatmullRom:vu,curveCatmullRomClosed:yu,curveCatmullRomOpen:bu,curveMonotoneX:Pu,curveMonotoneY:ku,curveNatural:Ru,curveStep:ju,curveStepAfter:Uu,curveStepBefore:Nu},e}return f(e,t),e.prototype.getD3Curve=function(){var t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){var n=this.curveTypes[t];return e&&Object.keys(e).forEach((function(t){n[t]&&(n=n[t](e[t]))})),n}return console.warn("The curve type '"+t+"' is invalid, using 'curveLinear' instead"),this.curveTypes.curveLinear},e}(Gu),cd=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(Kc(this.services.domUtils.getMainSVG()))}return t.prototype.init=function(){},t.prototype.render=function(t){console.error("render() method is not implemented")},t.prototype.destroy=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t.prototype.setParent=function(t){var e=this.parent;if(this.parent=t,(!e||e.node()!==t.node())&&this.type){var n=Tn.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(nl.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(nl.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=Tn.getProperty(this.model.getOptions(),"style","prefix");return El.appendOrSelect(this.parent,"g."+nl.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),ld=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return f(n,t),n.prototype.render=function(){var t=this,n=this.getContainerSVG().attr("role",e.GRAPHICS_DOCUMENT),r=this.model.getOptions(),i=n.selectAll("g.legend-item").data(this.model.getDataGroups(),(function(t){return t.name})),o=i.enter().append("g").classed("legend-item",!0),a=r.legend.checkbox.radius;o.append("rect").classed("checkbox",!0).merge(i.select("rect.checkbox")).attr("width",2*a).attr("height",2*a).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.status===r.legend.items.status.ACTIVE?t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===r.legend.items.status.ACTIVE})),o.append("text").merge(i.select("text")).text((function(t){return t.name})).attr("alignment-baseline","middle"),this.breakItemsIntoLines(o),i.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var s=Tn.getProperty(this.model.getOptions(),"legend","clickable");n.classed("clickable",s),s&&o.size()>0&&this.addEventListeners()},n.prototype.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.legend.checkbox.radius,o=r.legend.items.horizontalSpace,a=r.legend.items.verticalSpace,s=r.legend.items.textYOffset,u=2*i+r.legend.checkbox.spaceAfter,c=r.legend.items.status.DISABLED,l=this.model.getDataGroups().some((function(t){return t.status===c})),h=Tn.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var c=Kc(this),g=Kc(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===w.VERTICAL)h===w.VERTICAL&&0!==r&&d++;else{var v=El.getSVGElementSize(e.parent,{useAttr:!0}),m=El.getSVGElementSize(Kc(this).select("text"),{useBBox:!0}),y=El.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+o)+u+m.width>v.width&&(d++,f=0,p=0)}c.select("rect.checkbox").attr("x",f).attr("y",0+d*a);var _=s+d*a;c.select("text").attr("x",f+u).attr("y",0+_),l&&c.select("g.check").empty()?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):l||c.select("g.check").empty()||c.select("g.check").remove(),p++}))},n.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions();e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(E.Legend.ITEM_HOVER,{hoveredElement:Kc(this)});var e=n.legend.checkbox.radius,r=Kc(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower()})).on("click",(function(){t.services.events.dispatchEvent(E.Legend.ITEM_CLICK,{clickedElement:Kc(this)});var e=Kc(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=Kc(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(E.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},n}(cd),hd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return f(e,t),e.prototype.truncateTitle=function(){var t=El.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=El.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=El.appendOrSelect(e,"tspan").node().getComputedTextLength(),r=Math.floor(t-n),i=this.model.getOptions().title,o=this.getSubstringIndex(e.node(),0,i.length-1,r);e.text(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent(E.Tooltip.SHOW,{hoveredElement:e,type:_.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent(E.Tooltip.HIDE,{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();El.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).text(this.model.getOptions().title),this.truncateTitle()},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(cd);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(ad||(ad={}));var fd=((od={})[ad.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},od[ad.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},od[ad.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},od[ad.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},od),dd="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},pd=function(){function t(t){void 0===t&&(t={}),this.positions=fd,this.positions=Object.assign({},fd,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),u=s.bottom-r().height,c=s.right-r().width;u=u<0?e.offsetHeight:u,c=c<0?e.offsetWidth:c;var l=e.offsetHeight*e.offsetWidth,h=l-u*c;return{placement:n,weight:(h=0===h?l:h)/l}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:dd.innerHeight-dd.scrollY,height:dd.innerWidth-dd.scrollX}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}(),gd=(new pd,function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new pd,i.init(),i}return f(e,t),e.prototype.init=function(){var t=this,e=Kc(this.services.domUtils.getHolder()),n=Tn.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=El.appendOrSelect(e,"div."+nl.prefix+"--"+n+"--tooltip");var r=El.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(i){if(i.detail.type===_.DATAPOINT&&Tn.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===_.GRIDLINE&&Tn.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")){var o=Kc(Vc.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o)):a=t.getTooltipHTML(o,_.DATAPOINT),Tn.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(o,a)):r.html(a),t.positionTooltip()}else if(i.detail.type===_.TITLE){var s=El.appendOrSelect(e,"svg."+nl.prefix+"--"+n+"--chart-svg"),u=El.getSVGElementSize(s).width*Tn.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",u),r.html(t.getTooltipHTML(i.detail.hoveredElement,_.TITLE));var c=t.getTooltipPosition(i.detail.hoveredElement.node());t.positionTooltip(c)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===_.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=Tn.getProperty(t,"data")?t.data:t,r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Tn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n[i]):n[i].toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+n[r]+'</p>\n\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this;t.sort((function(t,e){return e.value-t.value}));this.services.cartesianScales.getDomainScale().scaleType;return"<ul class='multi-tooltip'>"+t.map((function(t){var n=e.model.getOptions().data.groupMapsTo,r=e.services.cartesianScales.getRangeIdentifier(),i=Tn.getProperty(e.model.getOptions(),"tooltip","valueFormatter"),o=i?i(t[r]):t[r].toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t[n])+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t[n]+'</p>\n\t\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.getTooltipPosition=function(t){var e=Kc(this.services.domUtils.getHolder()).node().getBoundingClientRect(),n=t.getBoundingClientRect(),r=this.model.getOptions().tooltip.title.verticalOffset,i={left:n.left-e.left+n.width/2,top:n.top-e.top-r};return{placement:y.BOTTOM,position:i}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=el(n);if(t){var o=t.placement===y.TOP?ad.TOP:ad.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[ad.RIGHT,ad.LEFT,ad.TOP,ad.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.datapoint.horizontalOffset;a===ad.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(cd)),vd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.init=function(){var e=this,n=Kc(this.services.domUtils.getHolder()),r=Tn.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=El.appendOrSelect(n,"div."+nl.prefix+"--"+r+"--tooltip");var i=El.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(o){if(o.detail.type===_.DATAPOINT&&Tn.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===_.GRIDLINE&&Tn.getProperty(e.model.getOptions(),"tooltip","gridline","enabled")){var a=o.detail.hoveredElement.datum(),s=o.detail.hoveredElement.node(),u=void 0;o.detail.multidata?(a=o.detail.multidata,u=e.getMultilineTooltipHTML(a)):(a=o.detail.data?o.detail.data:o.detail.hoveredElement.datum(),u=e.getTooltipHTML(a)),Tn.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u);var c=e.getTooltipPosition(s,a);e.positionTooltip(o.detail.multidata?void 0:c)}else if(o.detail.type===_.TITLE){var l=El.appendOrSelect(n,"svg."+nl.prefix+"--"+r+"--chart-svg"),h=El.getSVGElementSize(l).width*Tn.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",h),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,_.TITLE));c=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node());e.positionTooltip(c)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t,e){void 0===e&&(e=Kc(t).datum());var n=Kc(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.datapoint.verticalOffset;if(e.value<=0){var o={left:r.left-n.left+r.width/2,top:r.bottom-n.top+i};return{placement:y.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:y.TOP,position:o}},e.prototype.getTooltipHTML=function(t){return'<div class="datapoint-tooltip"><p class="value">'+(Tn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en"))+"</p></div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.reverse(),this.services.cartesianScales.getOrientation()===v.VERTICAL&&n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=Tn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(r):r.toLocaleString("en"),"<ul class='multi-tooltip'>"+n.map((function(t){var n=Tn.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+n+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"<li>\n\t\t\t\t\t<div class='total-val'>\n\t\t\t\t\t\t<p class='label'>Total</p>\n\t\t\t\t\t\t<p class='value'>"+r+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>"},e}(gd),md=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.getTooltipHTML=function(t,e){if(e===_.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=t.data,r=this.model.getOptions().data.groupMapsTo,i=Tn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n.value):n.value.toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t<p class="label">'+n[r]+'</p>\n\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t</div>"},e}(gd),yd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===_.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);var r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Tn.getProperty(this.model.getOptions(),"tooltip","valueFormatter"),a=o?o(e[i]):e[i].toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e[r])+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e[r]+'</p>\n\t\t\t\t<p class="value">'+a+"</p>\n\t\t\t</div>"},e}(gd),_d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=this.services.cartesianScales.getMainXScale();return e.step?Math.min(t.bars.maxWidth,e.step()/2):Math.min(t.bars.maxWidth,5/e.ticks().length*t.bars.maxWidth)},e}(cd),bd=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return f(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG().selectAll("path.bar").data(this.model.getDisplayData(),(function(t){return t[r]}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillColor(t[r])})).attr("d",(function(t,e){var r=n.getBarWidth(),i=n.services.cartesianScales.getDomainValue(t,e)-r/2,o=i+r,a=n.services.cartesianScales.getRangeValue(0),s=n.services.cartesianScales.getRangeValue(t,e);return Tn.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(t){var n=Kc(this);n.classed("hovered",!0),n.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",di(n.attr("fill")).darker(.7).toString()),e.services.events.dispatchEvent(E.Bar.BAR_MOUSEOVER,{element:n,datum:t}),e.services.events.dispatchEvent(E.Tooltip.SHOW,{hoveredElement:n,type:_.DATAPOINT})})).on("mousemove",(function(t){e.services.events.dispatchEvent(E.Bar.BAR_MOUSEMOVE,{element:Kc(this),datum:t})})).on("click",(function(t){e.services.events.dispatchEvent(E.Bar.BAR_CLICK,{element:Kc(this),datum:t})})).on("mouseout",(function(n){var r=Kc(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(E.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(E.Tooltip.HIDE,{hoveredElement:r})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n}(_d),wd=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.padding=5,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return f(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.getDataCorrespondingToLabel=function(t){var e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier();return e.filter((function(e){return e[n]===t}))},n.prototype.getGroupWidth=function(){var t=this.model.getActiveDataGroupNames().length,e=this.getTotalGroupPadding();return this.getBarWidth()*t+e},n.prototype.getTotalGroupPadding=function(){var t=this.model.getActiveDataGroupNames().length;if(1===t)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t-1)},n.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=Tn.getProperty(t,"bars","width"),n=Tn.getProperty(t,"bars","maxWidth");if(null!==e){if(null===n)return e;if(e<=n)return e}var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},n.prototype.setGroupScale=function(){this.groupScale=Qr().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},n.prototype.render=function(t){var n=this,r=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var a=this.getContainerSVG(),s=Br(r,(function(t){return t[o]})).keys(),u=a.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var c=u.enter().append("g").classed("bars",!0).attr("role",e.GROUP).attr("aria-labelledby",(function(t){return t})).merge(u).attr("transform",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-n.getGroupWidth()/2;return n.services.cartesianScales.getOrientation()===v.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return n.getDataCorrespondingToLabel(t)}));c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillColor(t[i])})).attr("d",(function(t){var e=n.groupScale(t[i]),r=e,o=e+n.getBarWidth(),a=n.services.cartesianScales.getRangeValue(0),s=n.services.cartesianScales.getRangeValue(t.value);return Tn.generateSVGPathString({x0:r,x1:o,y0:a,y1:s},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=Kc(this);n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",di(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(E.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(E.Tooltip.SHOW,{hoveredElement:n,type:_.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(E.Bar.BAR_MOUSEMOVE,{element:Kc(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(E.Bar.BAR_CLICK,{element:Kc(this),datum:e})})).on("mouseout",(function(e){var n=Kc(this);n.classed("hovered",!1);var r=t.model.getOptions().data.groupMapsTo;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillColor(e[r])})),t.services.events.dispatchEvent(E.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(E.Tooltip.HIDE,{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n}(_d),xd=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return f(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.services.cartesianScales.getDomainIdentifier(),u=Br(i,(function(t){return t[s]})).keys(),c=this.model.getStackedData(),l=r.selectAll("g.bars").data(c,(function(t){return t.key}));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",e.GROUP);var h=r.selectAll("g.bars").selectAll("path.bar").data((function(t){return t.filter((function(t){return!(0===t[0]&&0===t[1])}))}));h.exit().remove(),h.enter().append("path").merge(h).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillColor(t[a])})).attr("d",(function(t,e){var r=u[e],i=n.getBarWidth(),a=n.services.cartesianScales.getDomainValue(r,e)-i/2,s=a+i,c=n.services.cartesianScales.getRangeValue(t[0],e),l=n.services.cartesianScales.getRangeValue(t[1],e);return Math.abs(l-c)>0&&Math.abs(l-c)>o.bars.dividerSize&&(n.services.cartesianScales.getOrientation()===v.VERTICAL?l+=1:l-=1),Tn.generateSVGPathString({x0:a,x1:s,y0:c,y1:l},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(t){var n=Kc(this);n.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",di(n.attr("fill")).darker(.7).toString()),e.services.events.dispatchEvent(E.Bar.BAR_MOUSEOVER,{element:n,datum:t})})).on("mousemove",(function(t){var n,r=Kc(this),i=t.data[t.group],o=e.services.cartesianScales.getRangeIdentifier(),a=e.model.getOptions().data.groupMapsTo;e.services.events.dispatchEvent("show-tooltip",{hoveredElement:r,data:(n={},n[o]=i,n[a]=t.group,n),type:_.DATAPOINT})})).on("click",(function(t){e.services.events.dispatchEvent(E.Bar.BAR_CLICK,{element:Kc(this),datum:t})})).on("mouseout",(function(n){var r=Kc(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(E.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(E.Tooltip.HIDE,{hoveredElement:r})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n}(_d),Td=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return f(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this.getContainerSVG(),r=this.model.getGroupedData(),i=n.selectAll("g.dots").data(r,(function(t){return t.name}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("dots",!0).attr("role",e.GROUP),a=this.services.cartesianScales.getRangeIdentifier(),s=o.merge(i).selectAll("circle.dot").data((function(t){return t.data.filter((function(t){return null!==t[a]&&void 0!==t[a]}))})),u=s.enter().append("circle").attr("opacity",0).merge(s);this.styleCircles(u,t),this.addEventListeners()},n.prototype.styleCircles=function(t,n){var r=this,i=this.model.getOptions(),o=i.points.filled,a=i.data.groupMapsTo,s=this.services.cartesianScales.getDomainIdentifier(),u=this.services.cartesianScales.getRangeIdentifier();t.raise().classed("dot",!0).classed("filled",(function(t){return r.model.getIsFilled(t[a],t[s],t,o)})).classed("unfilled",(function(t){return!r.model.getIsFilled(t[a],t[s],t,o)})).attr("cx",(function(t,e){return r.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("scatter-update-enter",n)).attr("cy",(function(t,e){return r.services.cartesianScales.getRangeValue(t,e)})).attr("r",i.points.radius).attr("fill",(function(t){if(r.model.getIsFilled(t[a],t[s],t,o))return r.model.getFillColor(t[a],t[s],t)})).attr("fill-opacity",o?.2:1).attr("stroke",(function(t){return r.model.getStrokeColor(t[a],t[s],t)})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[u]})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover mousemove",(function(r){var i=Kc(this);i.classed("hovered",!0).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)}));var o="mouseover"===Vc.type?E.Scatter.SCATTER_MOUSEOVER:E.Scatter.SCATTER_MOUSEMOVE;t.services.events.dispatchEvent(o,{element:i,datum:r}),t.services.events.dispatchEvent(E.Tooltip.SHOW,{hoveredElement:i,type:_.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(E.Scatter.SCATTER_CLICK,{element:Kc(this),datum:e})})).on("mouseout",(function(e){var n=Kc(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(E.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(E.Tooltip.HIDE,{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n}(cd),Md=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return f(e,t),e.prototype.getRadiusScale=function(t){var e=this.model.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=El.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=i.length>0,s=a?Dr(i):[1,1];return Mo().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,r=this.model.getOptions(),i=r.bubble.radiusMapsTo,o=this.getRadiusScale(t),a=r.data.groupMapsTo,s=this.services.cartesianScales.getDomainIdentifier();t.raise().classed("dot",!0).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return o(t[i]||1)})).attr("fill",(function(t){return n.model.getFillColor(t[a],t[s],t)})).attr("fill-opacity",r.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t[a],t[s],t)})).attr("opacity",1)},e}(Td),Ed=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.lines").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?nr.opacity.unselected:nr.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.lines").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",nr.opacity.selected)},e}return f(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this.getContainerSVG(),i=function(){var t=Ys,e=qs,n=Ts(!0),r=null,i=Ws,o=null;function a(a){var s,u,c,l=a.length,h=!1;for(null==r&&(o=i(c=xs())),s=0;s<=l;++s)!(s<l&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(c)return o=null,c+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:Ts(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Ts(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ts(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}().x((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).y((function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).curve(this.services.curves.getD3Curve()).defined((function(t,e){var r=t[n.services.cartesianScales.getRangeIdentifier()];return null!=r})),o=this.model.getGroupedData(),a=r.selectAll("g.lines").data(o,(function(t){return t.name}));a.exit().attr("opacity",0).remove(),a.enter().append("g").classed("lines",!0).append("path").attr("opacity",0).merge(r.selectAll("g.lines path")).attr("stroke",(function(t,e){return n.model.getStrokeColor(t.name)})).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){var e=t.data,r=n.services.cartesianScales.getRangeIdentifier();return e.map((function(t){return t[r]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",1).attr("class","line").attr("d",(function(t){var e=t.data;return i(e)}))},n.prototype.destroy=function(){this.parent.selectAll("path").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n}(cd);function Od(t,e){var n=this,r=Ui(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Sd=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return f(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(E.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(E.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},n.prototype.render=function(t){void 0===t&&(t=!0);var n=this,r=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.computeRadius();this.arc=Gs().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=Gs().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=$s,e=Xs,n=null,r=Ts(0),i=Ts(Ls),o=Ts(0);function a(a){var s,u,c,l,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(Ls,Math.max(-Ls,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,c=d?(m-f*_)/d:0;s<f;++s,v=l)u=p[s],l=v+((h=g[u])>0?h*c:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Ts(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ts(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ts(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ts(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(i).sort((function(t,e){return t.index-e.index})),c=El.appendOrSelect(r,"g.slices").attr("role",e.GROUP).selectAll("path.slice").data(u,(function(t){return t.data[a]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return n.model.getFillColor(t.data[a])})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+Tn.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return Od.bind(this)(t,n.arc)}));var l=El.appendOrSelect(r,"g.labels").attr("role",e.GROUP).selectAll("text.pie-label").data(u,(function(t){return t.data[a]}));l.exit().attr("opacity",0).remove();var h=l.enter().append("text").classed("pie-label",!0),f=[];h.merge(l).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):Tn.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=this.getComputedTextLength();t.textOffsetX=e/2,t.textOffsetY=parseFloat(getComputedStyle(this).fontSize)/2;var n=s+7,r=(t.endAngle-t.startAngle)/2+t.startAngle;return t.xPosition=(t.textOffsetX+n)*Math.sin(r),t.yPosition=(t.textOffsetY+n)*-Math.cos(r),t})).attr("transform",(function(t,e){var n=i.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var a=void 0,s=void 0;return t.index===n-1?(a=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,s=t.yPosition-o.pie.callout.offsetY,t.direction=M.RIGHT,f.push(t)):(a=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,s=t.yPosition-o.pie.callout.offsetY,t.direction=M.LEFT,f.push(t)),"translate("+a+", "+s+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(f);var d=s+o.pie.xOffset,p=s+o.pie.yOffset;f.length>0&&(p+=o.pie.yOffsetCallout),r.attr("transform","translate("+d+", "+p+")"),this.addEventListeners()},n.prototype.renderCallouts=function(t){var n=El.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",e.GROUP),r=this.model.getOptions(),i=n.selectAll("g.callout").data(t);i.exit().remove();var o=i.enter().append("g").classed("callout",!0).attr("role",e.GRAPHICS_SYMBOL+" "+e.GROUP).attr("aria-roledescription","label callout");o.merge(i).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===M.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-r.pie.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+r.pie.callout.horizontalLineLength),t})),o.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum((function(t){return Kc(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),o.append("line").classed("horizontal-line",!0).merge(i.selectAll("line.horizontal-line")).datum((function(t){return Kc(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e){t.services.events.dispatchEvent(E.Pie.SLICE_MOUSEOVER,{element:Kc(this),datum:e})})).on("mousemove",(function(e){var n=Kc(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(E.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(E.Tooltip.SHOW,{hoveredElement:n,type:_.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(E.Pie.SLICE_CLICK,{element:Kc(this),datum:e})})).on("mouseout",(function(e){var n=Kc(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(E.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(E.Tooltip.HIDE,{hoveredElement:n})}))},n.prototype.computeRadius=function(){var t=this.model.getOptions(),e=El.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},n}(cd),Ad=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return f(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this,r=El.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();El.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(Kc(this))})),El.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text(Tn.getProperty(i,"donut","center","label"))},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=Tn.getProperty(e,"donut","center","number");n||(n=this.model.getDisplayData().reduce((function(t,e){return t+e.value}),0));var r=Li(parseInt(t.text().replace(/[, ]+/g,""),10)||0,n);return function(n){var i=e.donut.center.numberFormatter;t.text(i(r(n)))}},e}(Sd),Cd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return f(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||or.default.size).attr("height",this.configs.size||or.default.size).attr("opacity",0)},e}(cd);function Pd(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function kd(t,e){var n,r,i,o,a,s=new Id(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Dd);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)c.push(r=n.children[o]=new Id(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Rd)}function Dd(t){return t.children}function Ld(t){t.data=t.data.data}function Rd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Id(t){this.data=t,this.depth=this.height=0,this.parent=null}function jd(t){if("function"!=typeof t)throw new Error;return t}function Nd(){return 0}function Ud(t){return function(){return t}}function Fd(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)}function Hd(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c}function Vd(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c}Id.prototype=kd.prototype={constructor:Id,count:function(){return this.eachAfter(Pd)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return kd(this).eachBefore(Ld)}};var Bd=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,c,l,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,w=y.length,x=e.value;_<w;){u=i-n,c=o-r;do{l=y[b++].value}while(!l&&b<w);for(h=f=l,v=l*l*(g=Math.max(c/u,u/c)/(x*t)),p=Math.max(f/v,v/h);b<w;++b){if(l+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=l*l*g,(d=Math.max(f/v,v/h))>p){l-=s;break}p=d}m.push(a={value:l,dice:u<c,children:y.slice(_,b)}),a.dice?Hd(a,n,r,i,x?r+=c*l/x:o):Vd(a,n,r,x?n+=u*l/x:i,o),x-=l,_=b}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Gd(){var t=Bd,e=!1,n=1,r=1,i=[0],o=Nd,a=Nd,s=Nd,u=Nd,c=Nd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Fd),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,l+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=jd(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:Ud(+t),l):o},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:Ud(+t),l):a},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Ud(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Ud(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:Ud(+t),l):c},l}var zd=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===x.ROW_REVERSE||a.configs.direction===x.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return f(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){var e=Tn.getProperty(t,"data","growth","x");return e===T.PREFERRED||e===T.FIXED})).each((function(t){e+=t.data.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){return Tn.getProperty(t,"data","growth","x")===T.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=El.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=kd({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===x.ROW||this.configs.direction===x.ROW_REVERSE?Hd:Vd;Gd().tile(s).size([i,o])(a);var u=this.configs.direction===x.ROW||this.configs.direction===x.ROW_REVERSE,c=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));c.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),c.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(Kc(n));var i=Tn.getProperty(e,"data","growth","x");i!==T.PREFERRED&&i!==T.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=Tn.getProperty(t,"data","growth","x"),n=El.getSVGElementSize(Kc(this),{useBBox:!0});if(e===T.PREFERRED){var r=u?n.width:n.height,a=u?i:o;t.data.size=r/a*100}})),c.exit().remove(),this.children.filter((function(t){return Tn.getProperty(t,"growth","x")===T.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=kd({children:this.children}).sum((function(t){return t.size})),Gd().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){Tn.getProperty(e,"data","growth","x")===T.STRETCH&&n.render(t)}))}))},e.prototype.setModel=function(e){t.prototype.setModel.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setModel(e)}))}))},e.prototype.setServices=function(e){t.prototype.setServices.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setServices(e)}))}))},e.prototype.destroy=function(){this.children.forEach((function(t){t.components.forEach((function(t){return t.destroy()}))}))},e.instanceID=Math.floor(99999999999*Math.random()),e}(cd),Wd=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function Yd(t,e,n,r){var i=0===e,o=2===Number(Zf(new Date(t),"c")),a=1===Number(Zf(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||$d(t)||Qd(t)||Zd(t);case"daily":return r?i||o||Zd(t):i||Qd(t)||Zd(t);case"monthly":return i||Zd(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function qd(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Xd(t){return 1===t.length?"15seconds":function(t){var e=Wd.reduce((function(e,n,r){n[0];var i=n[1];return Math.abs(e-t)<Math.abs(i-t)?e:r}),0);return Wd[e][0]}(function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function $d(t){var e=qd(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function Qd(t){var e=qd(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function Zd(t){var e=qd(t),n=e.M,r=e.d,i=e.s,o=e.m,a=e.H;return 1===n&&1===r&&0===a&&0===o&&0===i}var Jd=Array.prototype.slice;function Kd(t){return t}function tp(t){return"translate("+(t+.5)+",0)"}function ep(t){return"translate(0,"+(t+.5)+")"}function np(t){return function(e){return+t(e)}}function rp(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function ip(){return!this.__axis}function op(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",l=1===t||3===t?tp:ep;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Kd:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?rp:np)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(f,e).order(),x=w.exit(),T=w.enter().append("g").attr("class","tick"),M=w.select("line"),E=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(T),M=M.merge(T.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),E=E.merge(T.append("text").attr("fill","currentColor").attr(c,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),w=w.transition(h),M=M.transition(h),E=E.transition(h),x=x.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?l(t):this.getAttribute("transform")})),T.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:y(t))}))),x.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),w.attr("opacity",1).attr("transform",(function(t){return l(y(t))})),M.attr(c+"2",u*o),E.attr(c,u*p).text(d),_.filter(ip).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Jd.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Jd.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Jd.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function ap(t){return op(1,t)}function sp(t){return op(2,t)}function up(t){return op(3,t)}function cp(t){return op(4,t)}var lp=function(t){function n(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",r&&(i.configs=r),i.margins=i.configs.margins,i}return f(n,t),n.prototype.render=function(t){void 0===t&&(t=!0);var n,r,i=this.configs.position,o=this.model.getOptions(),a=Tn.getProperty(o,"axes",i),s=Tn.getProperty(a,"ticks","number"),u=null!==s,c=i===g.LEFT||i===g.RIGHT,l=Tn.getProperty(o,"timeScale"),h=this.getContainerSVG(),f=El.getSVGElementSize(this.parent,{useAttrs:!0}),d=f.width,p=f.height;i===g.BOTTOM||i===g.TOP?(n=this.configs.axes[g.LEFT]?this.margins.left:0,r=this.configs.axes[g.RIGHT]?d-this.margins.right:d):(n=p-this.margins.bottom,r=this.margins.top);var v,y=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===m.LABELS?y.rangeRound([n,r]):y.range([n,r]),i){case g.LEFT:v=cp;break;case g.BOTTOM:v=up;break;case g.RIGHT:v=sp;break;case g.TOP:v=ap}var _=El.appendOrSelect(h,"g.axis."+i),b=!_.select("g.ticks").empty(),w=El.appendOrSelect(_,"g.ticks");b||w.attr("role",e.GRAPHICS_OBJECT+" "+e.GROUP);var x=El.appendOrSelect(_,"g.ticks.invisible").style("opacity","0").attr("aria-hidden",!0),T=El.appendOrSelect(x,"g.tick"),M=El.appendOrSelect(T,"text").text("0"),E=El.getSVGElementSize(M.node(),{useBBox:!0}).height;T.remove();var O=this.scaleType===m.TIME||a.scaleType===m.TIME,S=v(y).tickSizeOuter(0);if(y.ticks){var A=void 0;if(u?A=s:(A=ir.ticks.number,c&&(A=this.getNumberOfFittingTicks(p,E,2.5))),S.ticks(A),O){var C=y.ticks(A).concat(y.domain()).map((function(t){return+t})).sort();C=Tn.removeArrayDuplicates(C),Tn.getProperty(o,"timeScale","addSpaceOnEdges")&&C.length>2&&(C.splice(C.length-1,1),C.splice(0,1)),S.tickValues(C)}var P=void 0;if(O){var k=Xd(S.tickValues());P=function(t,e){return function(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=Tn.getProperty(r,"timeIntervalFormats")[o],u=Tn.getProperty(s,"primary"),c=Tn.getProperty(s,"secondary");return Zf(a,Yd(t,e,n,i)?u:c,{locale:r.localeObject})}(t,e,k,l)}}else P=Tn.getProperty(a,"ticks","formatter");S.tickFormat(P)}switch(i){case g.LEFT:w.attr("transform","translate("+this.margins.left+", 0)");break;case g.BOTTOM:w.attr("transform","translate(0, "+(p-this.margins.bottom)+")");break;case g.RIGHT:w.attr("transform","translate("+(d-this.margins.right)+", 0)");break;case g.TOP:w.attr("transform","translate(0, "+this.margins.top+")")}if(a.title){var D=El.appendOrSelect(_,"text.axis-title").text(a.title);switch(i){case g.LEFT:D.attr("transform","rotate(-90)").attr("y",0).attr("x",-y.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case g.BOTTOM:D.attr("transform","translate("+(this.margins.left/2+y.range()[1]/2)+", "+p+")").style("text-anchor","middle");break;case g.RIGHT:D.attr("transform","rotate(90)").attr("y",-d).attr("x",y.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case g.TOP:var L=El.getSVGElementSize(D,{useBBox:!0}).height;D.attr("transform","translate("+(this.margins.left/2+y.range()[1]/2)+", "+L/2+")").style("text-anchor","middle")}}if(O){var R=Xd(S.tickValues()),I=l.showDayName,j=w;t&&(w=w.transition(this.services.transitions.getTransition("axis-update",t))),w=w.call(S),j.selectAll(".tick").data(S.tickValues(),y).order().select("text").style("font-weight",(function(t,e){return Yd(t,e,R,I)?"bold":"normal"}))}else w=t&&b?w.transition(this.services.transitions.getTransition("axis-update")).call(S):w.call(S);if(x.call(S),i===g.BOTTOM||i===g.TOP){var N=!1;if(y.step){N=x.selectAll("g.tick text").nodes().some((function(t){return El.getSVGElementSize(t,{useBBox:!0}).width>=y.step()}))}else{var U=Tn.getProperty(a,"ticks","rotateIfSmallerThan")||ir.ticks.rotateIfSmallerThan;N=d/(O?S.tickValues().length:y.ticks().length)/2<U}N?(u||(S.ticks(this.getNumberOfFittingTicks(d,E,3.5)),x.call(S),w.call(S)),_.selectAll("g.ticks g.tick text").attr("transform","rotate(45)").style("text-anchor",i===g.TOP?"end":"start")):_.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=El.appendOrSelect(t,"g.axis."+e),r=this;n.selectAll("g.tick text").on("mouseover",(function(t){r.services.events.dispatchEvent(E.Axis.LABEL_MOUSEOVER,{element:Kc(this),datum:t})})).on("mousemove",(function(t){r.services.events.dispatchEvent(E.Axis.LABEL_MOUSEMOVE,{element:Kc(this),datum:t})})).on("click",(function(t){r.services.events.dispatchEvent(E.Axis.LABEL_CLICK,{element:Kc(this),datum:t})})).on("mouseout",(function(t){r.services.events.dispatchEvent(E.Axis.LABEL_MOUSEOUT,{element:Kc(this),datum:t})}))},n.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},n.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},n.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return Tn.clamp(r,2,ir.ticks.number)},n.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;El.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},n}(cd),hp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.children={},e.margins={top:0,right:0,bottom:0,left:0},e}return f(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(g),i=Tn.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[g[t]]&&(n[g[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=g[t];if(e.configs.axes[n]&&!e.children[n]){var r=new lp(e.model,e.services,{position:n,axes:e.configs.axes,margins:e.margins});r.setModel(e.model),r.setServices(e.services),r.setParent(e.parent),e.children[n]=r}})),Object.keys(this.children).forEach((function(n){e.children[n].render(t)}));var o={};Object.keys(this.children).forEach((function(t){var n,r=e.children[t],i=r.configs.position,a=r.getInvisibleAxisRef(),s=El.getSVGElementSize(a,{useBBox:!0}),u=s.width,c=s.height;switch(n=r.getTitleRef().empty()?0:El.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i){case g.TOP:o.top=c+n;break;case g.BOTTOM:o.bottom=c+n;break;case g.LEFT:o.left=u+n;break;case g.RIGHT:o.right=u+n}})),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(cd),fp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return f(e,t),e.prototype.render=function(){this.drawBackdrop(),El.appendOrSelect(this.backdrop,"g.x.grid"),El.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(),this.drawYGrid(),Tn.getProperty(this.model.getOptions(),"tooltip","gridline","enabled")&&this.addGridEventListeners()},e.prototype.drawXGrid=function(){var t=this.parent,e=this.backdrop.attr("height"),n=up(this.services.cartesianScales.getMainXScale()).tickSizeInner(-e).tickSizeOuter(0),r=Tn.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");n.ticks(r);var i=t.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+e+")").call(n);this.cleanGrid(i)},e.prototype.drawYGrid=function(){var t=this.parent,e=this.backdrop.attr("width"),n=cp(this.services.cartesianScales.getMainYScale()).tickSizeInner(-e).tickSizeOuter(0),r=Tn.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");n.ticks(r);var i=t.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")").call(n);this.cleanGrid(i)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(Tn.getTranslationValues(t).tx)-Number(Tn.getTranslationValues(e).tx)})),i=-1;r.forEach((function(e,n){t[0]>=+Tn.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var o,a=r[i],s=r[e];if(a)if(s)o=+Tn.getTranslationValues(s).tx-+Tn.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=El.getSVGElementSize(u).width-+Tn.getTranslationValues(a).tx}else o=+Tn.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold},e.prototype.getActiveGridline=function(t){var e=Tn.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Tn.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.addGridEventListeners=function(){var t=this,e=this.parent;El.appendOrSelect(e,"rect.chart-grid-backdrop").on("mousemove mouseover",(function(){var n=el(t.services.domUtils.getMainSVG()),r=Kc(this);e.selectAll(".x.grid .tick").classed("active",!1);var i=t.getActiveGridline(n);if(i.empty())return t.services.events.dispatchEvent(E.Tooltip.HIDE);i.classed("active",!0);var o=t.services.cartesianScales.getDataFromDomain(i.datum());t.services.events.dispatchEvent(E.Tooltip.SHOW,{hoveredElement:r,multidata:o,type:_.GRIDLINE})})).on("mouseout",(function(){e.selectAll(".x.grid .tick").classed("active",!1),t.services.events.dispatchEvent(E.Tooltip.HIDE)}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=El.appendOrSelect(t,"svg.chart-grid-backdrop");var c=El.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(cd),dp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return f(e,t),e.prototype.render=function(t){var e=this.getContainerSVG(),n=this.services.cartesianScales.getDomainScale().range(),r=n[0],i=n[1],o=+this.services.cartesianScales.getRangeValue(0)+.5,a=Tn.flipSVGCoordinatesBasedOnOrientation({x0:r,x1:i,y0:o,y1:o},this.services.cartesianScales.getOrientation());El.appendOrSelect(e,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",a.y0).attr("y2",a.y1).attr("x1",a.x0).attr("x2",a.x1)},e}(cd),pp=function(){function t(t,e){this.services={domUtils:El,events:Ol,transitions:jh},this.model=new Bu(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},!0),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener("model-update",(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener("chart-resize",(function(){n.update(!1)})),this.components=this.getComponents(),this.update()},t.prototype.getComponents=function(){return console.error("getComponents() method is not implemented"),null},t.prototype.update=function(t){var e=this;if(void 0===t&&(t=!0),this.components){Object.keys(this.services).forEach((function(t){e.services[t].update()})),this.components.forEach((function(e){return e.render(t)}));var n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map((function(t){return n[t].end().catch((function(t){return t}))}));Promise.all(r).then((function(){return e.services.events.dispatchEvent(E.Chart.RENDER_FINISHED)}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},!0)},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new hd(this.model,this.services)],growth:{x:T.PREFERRED,y:T.FIXED}},n={id:"legend",components:[new ld(this.model,this.services)],growth:{x:T.PREFERRED,y:T.FIXED}},r={id:"graph-frame",components:t,growth:{x:T.STRETCH,y:T.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=x.COLUMN;if(i){var a=Tn.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=x.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=w.VERTICAL)):"right"===a?(o=x.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=w.VERTICAL)):"bottom"===a&&(o=x.COLUMN_REVERSE)}var s={id:"spacer",components:[new Cd(this.model,this.services)],growth:{x:T.PREFERRED,y:T.FIXED}},u={id:"full-frame",components:[new zd(this.model,this.services,d(i?[n]:[],[s,r]),{direction:o})],growth:{x:T.STRETCH,y:T.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Cd(this.model,this.services)],growth:{x:T.PREFERRED,y:T.FIXED}};c.push(l)}return c.push(u),[new zd(this.model,this.services,c,{direction:x.COLUMN})]},t}(),gp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:sd,curves:ud}),r}return f(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new hd(this.model,this.services)],growth:{x:T.PREFERRED,y:T.FIXED}},n={id:"legend",components:[new ld(this.model,this.services)],growth:{x:T.PREFERRED,y:T.FIXED}},r={id:"graph-frame",components:t,growth:{x:T.STRETCH,y:T.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=x.COLUMN;if(i){var a=Tn.getProperty(this.model.getOptions(),"legend","position");a===b.LEFT?(o=x.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=w.VERTICAL)):a===b.RIGHT?(o=x.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=w.VERTICAL)):a===b.BOTTOM&&(o=x.COLUMN_REVERSE)}var s={id:"spacer",components:[new Cd(this.model,this.services)],growth:{x:T.PREFERRED,y:T.FIXED}},u={id:"full-frame",components:[new zd(this.model,this.services,d(i?[n]:[],[s,r]),{direction:o})],growth:{x:T.STRETCH,y:T.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Cd(this.model,this.services)],growth:{x:T.PREFERRED,y:T.FIXED}};c.push(l)}return c.push(u),[new zd(this.model,this.services,c,{direction:x.COLUMN})]},e}(pp),vp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Tn.mergeDefaultChartOptions(er.simpleBarChart,n.options)),r.init(e,n),r}return f(e,t),e.prototype.getComponents=function(){var t=[new hp(this.model,this.services),new fp(this.model,this.services),new bd(this.model,this.services),new dp(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new vd(this.model,this.services)),e},e}(gp),mp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Tn.mergeDefaultChartOptions(er.groupedBarChart,n.options)),r.init(e,n),r}return f(e,t),e.prototype.getComponents=function(){var t=[new hp(this.model,this.services),new fp(this.model,this.services),new wd(this.model,this.services),new dp(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new vd(this.model,this.services)),e},e}(gp),yp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Tn.mergeDefaultChartOptions(er.stackedBarChart,n.options)),r.init(e,n),r}return f(e,t),e.prototype.getComponents=function(){var t=[new hp(this.model,this.services),new fp(this.model,this.services),new xd(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new vd(this.model,this.services)),e},e}(gp),_p=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Tn.mergeDefaultChartOptions(er.bubbleChart,n.options)),r.init(e,n),r}return f(e,t),e.prototype.getComponents=function(){var t=[new hp(this.model,this.services),new fp(this.model,this.services),new Md(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new yd(this.model,this.services)),e},e}(gp),bp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Tn.mergeDefaultChartOptions(er.lineChart,n.options)),r.init(e,n),r}return f(e,t),e.prototype.getComponents=function(){var t=[new hp(this.model,this.services),new fp(this.model,this.services),new Ed(this.model,this.services),new Td(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new yd(this.model,this.services)),e},e}(gp),wp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Tn.mergeDefaultChartOptions(er.scatterChart,n.options)),r.init(e,n),r}return f(e,t),e.prototype.getComponents=function(){var t=[new hp(this.model,this.services),new fp(this.model,this.services),new Td(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new yd(this.model,this.services)),e},e}(gp),xp=function(t){function e(e){return t.call(this,e)||this}return f(e,t),e.prototype.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}(Bu),Tp=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new xp(i.services),r?i:(i.model.setOptions(Tn.mergeDefaultChartOptions(er.pieChart,n.options)),i.init(e,n),i)}return f(e,t),e.prototype.getComponents=function(){var t=[new Sd(this.model,this.services)],e=this.getChartComponents(t);return e.push(new md(this.model,this.services)),e},e}(pp),Mp=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Tn.mergeDefaultChartOptions(er.donutChart,n.options)),r.init(e,n),r}return f(e,t),e.prototype.getComponents=function(){var t=[new Ad(this.model,this.services)],e=this.getChartComponents(t);return e.push(new md(this.model,this.services)),e},e}(Tp),Ep=Sr;t.BubbleChart=_p,t.DonutChart=Mp,t.GroupedBarChart=mp,t.LineChart=bp,t.PieChart=Tp,t.ScatterChart=wp,t.SimpleBarChart=vp,t.StackedBarChart=yp,t.colorPalettes=Ar,t.configurations=ar,t.defaultColors=Ep,t.interfaces=O,Object.defineProperty(t,"__esModule",{value:!0})}));